/* Inovasi Guru — gaya dasar tanpa build tool.
 * Mobile-first, nuansa aplikasi: header ramping + navigasi bawah, kartu dengan
 * warna & efek per jenis karya (t-{jenis}). Efek gerak dimatikan bila pengguna
 * memilih "kurangi gerakan". Tanpa font/CDN eksternal. */
:root {
  --bg: #f5f7f5;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --ink: #15201c;
  --muted: #5a6662;
  --line: #e2e7e3;
  --brand: #0f5c4d;
  --brand-2: #138a72;
  --brand-ink: #ffffff;
  --brand-soft: #e2f1eb;
  --accent: #c8702a;
  --ok: #1d6b3a;
  --ok-bg: #e7f4ea;
  --err: #a12a2a;
  --err-bg: #fbeaea;
  --warn-bg: #fff4dc;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 33, 28, .05), 0 6px 20px rgba(16, 33, 28, .06);
  --shadow-lg: 0 2px 4px rgba(16, 33, 28, .06), 0 14px 34px rgba(16, 33, 28, .12);
  --header-h: 60px;
  --bottom-h: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  /* Warna per jenis karya */
  --t-media: #0e8f80;
  --t-lkpd: #2f6fd6;
  --t-modul: #7a4dd4;
  --t-game: #df6c22;
  --t-web: #4a58d0;
  --t-link: #5f6f80;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1412;
    --surface: #171e1b;
    --surface-2: #1d2622;
    --ink: #e6ece9;
    --muted: #9aa7a2;
    --line: #2a3430;
    --brand: #55b39d;
    --brand-2: #6fcab3;
    --brand-ink: #08130f;
    --brand-soft: #1b2e28;
    --accent: #e19a5b;
    --ok: #7fd19a;
    --ok-bg: #16281c;
    --err: #f09a9a;
    --err-bg: #2f1717;
    --warn-bg: #2d2513;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 20px rgba(0, 0, 0, .25);
    --shadow-lg: 0 2px 4px rgba(0, 0, 0, .4), 0 14px 34px rgba(0, 0, 0, .4);
    --t-media: #2fb5a4;
    --t-lkpd: #5b93ee;
    --t-modul: #9d7aea;
    --t-game: #f08a46;
    --t-web: #7684ec;
    --t-link: #8a99aa;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.15rem, 3.2vw, 1.4rem); }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.inline { display: inline; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px; z-index: 100; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
svg.i { width: 22px; height: 22px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px);
  border-bottom: 1px solid var(--line);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) { .site-header { background: var(--surface); } }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.brand-mark { display: block; width: 44px; height: 44px; object-fit: contain; flex: none; }
.nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; }
.nav a.active, .nav a:hover { color: var(--ink); }
.nav a.btn { color: var(--brand-ink); }
.header-icon { display: none; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: var(--ink); }
.header-icon:hover { background: var(--surface-2); }

/* ---------- Navigasi bawah (mobile) ---------- */
.bottom-nav { display: none; }
@media (max-width: 768px) {
  .nav { display: none; }
  .header-icon { display: grid; }
  body { padding-bottom: calc(var(--bottom-h) + env(safe-area-inset-bottom)); }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom));
    padding: 0 6px env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--line);
  }
  .bottom-nav a {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    min-height: 44px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600;
    transition: color .2s;
  }
  .bottom-nav a svg.i { width: 24px; height: 24px; transition: transform .25s var(--ease); }
  .bottom-nav a.active { color: var(--brand); }
  .bottom-nav a.active svg.i { transform: translateY(-1px); }
  .bottom-nav a:active svg.i { transform: scale(.9); }
  .bn-fab-circle {
    display: grid; place-items: center; width: 46px; height: 46px; margin-top: -18px; border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff;
    box-shadow: 0 8px 20px rgba(15, 92, 77, .35);
  }
  .bottom-nav .bn-fab, .bottom-nav .bn-fab.active { color: var(--brand); }
  .site-footer { padding-bottom: 12px; }
}

/* ---------- Footer ---------- */
.site-footer { margin-top: 48px; border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 24px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 4px; }
.footer-grid nav a { color: var(--muted); }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-grid nav { flex-direction: row; flex-wrap: wrap; gap: 6px 16px; }
}

/* ---------- Tombol & form ---------- */
.btn, button.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 12px; border: 1px solid var(--brand);
  background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), filter .2s, box-shadow .2s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: .9rem; border-radius: 10px; }
.btn-ghost, button.btn-ghost { background: transparent; color: var(--brand); }
.btn-light { background: #fff; color: #0f5c4d; border-color: #fff; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-block { width: 100%; }
button.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
button.link:hover { color: var(--ink); }
label { display: block; font-weight: 600; margin: 0 0 4px; }
.hint { font-weight: 400; color: var(--muted); font-size: .875rem; }
input[type=text], input[type=url], input[type=search], input[type=email], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface); color: var(--ink); font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { min-height: 110px; resize: vertical; }
input[type=file] { font: inherit; max-width: 100%; }
.field { margin-bottom: 18px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; }
.check input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--brand); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 20px; }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.error { color: var(--err); font-size: .875rem; margin-top: 4px; }
.alert { margin: 16px 0; padding: 12px 16px; border-radius: 12px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.warn { background: var(--warn-bg); }

/* ---------- Tata letak umum ---------- */
.section { padding-top: 28px; padding-bottom: 28px; }
@media (max-width: 640px) { .section { padding-top: 20px; padding-bottom: 20px; } }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; }
.see-all { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; text-decoration: none; font-size: .92rem; white-space: nowrap; }
.see-all svg.i { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.see-all:hover svg.i { transform: translateX(3px); }
.page-head { margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.empty { text-align: center; padding: 40px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface); }

/* ---------- Hero beranda ---------- */
.hero {
  position: relative; overflow: hidden; padding: 44px 0 30px;
  background:
    radial-gradient(900px 300px at 85% -10%, color-mix(in srgb, var(--brand-2) 22%, transparent), transparent 70%),
    radial-gradient(600px 260px at -10% 110%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%);
}
.hero-inner { max-width: 760px; margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; margin-bottom: 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .8rem; letter-spacing: .02em;
}
.hero h1 { font-size: clamp(2rem, 7vw, 3.3rem); margin-bottom: 12px; }
.hero-lead { font-size: clamp(1rem, 2.6vw, 1.15rem); color: var(--muted); margin: 0 auto 20px; max-width: 620px; }
.hero-actions { justify-content: center; margin-top: 14px; }
.hero-stat { margin: 14px 0 0; }
.studio-note { margin-top: 18px; }

.search-pill {
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow);
}
.search-pill:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft), var(--shadow); }
.search-pill svg.i { color: var(--muted); }
.search-pill input[type=search] { border: 0; box-shadow: none; padding: 8px 4px; min-height: 40px; background: transparent; }
.search-pill input[type=search]:focus { box-shadow: none; }
.search-pill .btn { border-radius: 999px; }
.hero .search-pill { max-width: 560px; margin: 0 auto; }

/* ---------- Ubin jenis karya ---------- */
.t-media-interaktif { --t: var(--t-media); }
.t-lkpd { --t: var(--t-lkpd); }
.t-modul { --t: var(--t-modul); }
.t-game { --t: var(--t-game); }
.t-aplikasi-web { --t: var(--t-web); }
.t-tautan { --t: var(--t-link); }

.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .type-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .type-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.type-tile {
  display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s, border-color .2s;
}
.type-tile::after {
  content: ""; position: absolute; right: -24px; top: -24px; width: 90px; height: 90px; border-radius: 50%;
  background: var(--t); opacity: .1; transition: transform .35s var(--ease);
}
.type-icon {
  display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 8px; border-radius: 12px;
  background: var(--t); color: #fff;
}
.type-name { font-weight: 700; line-height: 1.25; }
.type-count { font-size: .82rem; color: var(--muted); }
.type-tile:active { transform: scale(.97); }
@media (hover: hover) {
  .type-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--t); }
  .type-tile:hover::after { transform: scale(1.5); }
}

/* ---------- Chip ---------- */
.chip-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  text-decoration: none; color: var(--ink); font-size: .9rem; font-weight: 500; white-space: nowrap;
  transition: border-color .2s, color .2s, transform .15s;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip:active { transform: scale(.96); }
.chip-on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.chip-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: .75rem; font-weight: 700; }
@media (max-width: 768px) {
  .chip-scroll {
    flex-wrap: nowrap; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    margin: 0 -16px; padding: 2px 16px 6px;
  }
  .chip-scroll::-webkit-scrollbar { display: none; }
  .chip-scroll .chip { scroll-snap-align: start; }
}

/* ---------- Kartu karya ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
/* Warna bawaan berspesifisitas nol (:where), agar t-{jenis} selalu menang. */
:where(.work-card, .type-tile) { --t: var(--t-media); }
.work-card {
  position: relative; display: flex; flex-direction: column; overflow: hidden; padding: 0; height: 100%;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.work-card .cover {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden;
  background: var(--t); color: #fff; text-decoration: none;
}
.work-card .cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s var(--ease); }
.cover-fx {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  background-color: var(--t);
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(0, 0, 0, .18));
}
.cover-fx::before { content: ""; position: absolute; inset: 0; opacity: .9; pointer-events: none; }
.cover-icon { width: 46px !important; height: 46px !important; position: relative; transition: transform .4s var(--ease); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .2)); }
.cover-label { position: relative; font-weight: 700; font-size: .85rem; opacity: .95; padding: 0 12px; text-align: center; }
.type-badge {
  position: absolute; left: 10px; top: 10px; display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px 4px 8px; border-radius: 999px; font-size: .74rem; font-weight: 700;
  background: rgba(255, 255, 255, .92); color: var(--t);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.type-badge svg.i { width: 15px; height: 15px; }
@media (prefers-color-scheme: dark) { .type-badge { background: rgba(15, 20, 18, .85); } }
.work-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.work-card h3 { margin: 0; font-size: 1.02rem; line-height: 1.3; }
.work-card h3 a { color: var(--ink); text-decoration: none; }
.work-card .summary { margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.author { display: flex; align-items: center; gap: 8px; margin: auto 0 0; padding-top: 4px; position: relative; z-index: 2; }
.author a { color: var(--muted); text-decoration: none; font-weight: 600; }
.author a:hover { color: var(--brand); }
.author-mark {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand); font-size: .72rem; font-weight: 800;
}
.work-card:active { transform: scale(.98); }
@media (hover: hover) {
  .work-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--t) 45%, var(--line)); }
  .work-card:hover h3 a { color: var(--brand); }
  .work-card:hover .cover img { transform: scale(1.05); }
}

/* Pola sampul per jenis (karya tanpa gambar sampul) */
.t-media-interaktif .cover-fx::before {
  background:
    repeating-radial-gradient(circle at 85% 115%, rgba(255, 255, 255, .14) 0 5px, transparent 5px 20px),
    radial-gradient(circle at 18% 25%, rgba(255, 255, 255, .28) 0 3px, transparent 4px);
}
.t-lkpd .cover-fx::before {
  background:
    linear-gradient(90deg, transparent 0 28px, rgba(255, 255, 255, .28) 28px 30px, transparent 30px),
    repeating-linear-gradient(180deg, transparent 0 17px, rgba(255, 255, 255, .16) 17px 18px);
}
.t-modul .cover-fx::before {
  background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .09) 0 10px, transparent 10px 22px);
}
.t-game .cover-fx::before {
  background: radial-gradient(rgba(255, 255, 255, .3) 1.6px, transparent 2.2px) 0 0 / 16px 16px;
}
.t-aplikasi-web .cover-fx::before {
  background:
    linear-gradient(rgba(255, 255, 255, .22), rgba(255, 255, 255, .22)) 0 0 / 100% 20px no-repeat,
    linear-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(255, 255, 255, .08) 1px, transparent 1px) 0 0 / 18px 18px;
}
.t-tautan .cover-fx::before {
  background: repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 14px);
}

/* Efek gerak per jenis (hover di desktop, sentuh/fokus di HP) */
@media (prefers-reduced-motion: no-preference) {
  .t-media-interaktif .cover::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
    transform: translateX(-120%);
  }
  .t-media-interaktif:hover .cover::after, .t-media-interaktif:focus-within .cover::after { animation: fx-shimmer 1s var(--ease); }
  .t-lkpd:hover .cover-icon, .t-lkpd:focus-within .cover-icon { animation: fx-write .8s var(--ease); }
  .t-modul .cover { transform-origin: left center; transition: transform .4s var(--ease); }
  .t-modul:hover .cover, .t-modul:focus-within .cover { transform: perspective(700px) rotateY(-5deg); }
  .t-game:hover .cover-icon, .t-game:focus-within .cover-icon, .t-game .type-tile:hover .type-icon { animation: fx-bounce .7s var(--ease); }
  .t-aplikasi-web:hover .cover-fx, .t-aplikasi-web:focus-within .cover-fx { filter: brightness(1.12) saturate(1.1); }
  .t-tautan:hover .cover-icon, .t-tautan:focus-within .cover-icon { transform: translateX(6px) rotate(-12deg); }
  .type-tile.t-game:hover .type-icon { animation: fx-bounce .7s var(--ease); }
  .type-tile.t-lkpd:hover .type-icon svg { animation: fx-write .8s var(--ease); }
  .type-tile.t-media-interaktif:hover .type-icon { animation: fx-pulse .9s var(--ease); }
}
@keyframes fx-shimmer { to { transform: translateX(120%); } }
@keyframes fx-write { 0%, 100% { transform: none; } 30% { transform: translate(-4px, 2px) rotate(-10deg); } 60% { transform: translate(4px, -1px) rotate(6deg); } }
@keyframes fx-bounce { 0%, 100% { transform: none; } 30% { transform: translateY(-9px) scale(1.06); } 55% { transform: translateY(0) scale(.97); } 75% { transform: translateY(-3px); } }
@keyframes fx-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--t) 50%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }

/* Muncul halus saat masuk layar (kelas js-reveal ditambah app.js; tanpa JS tetap tampil) */
@media (prefers-reduced-motion: no-preference) {
  .js-reveal [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
  .js-reveal [data-reveal].is-visible { opacity: 1; transform: none; }
}

/* Rak geser (beranda): geser horizontal di HP, grid di desktop */
.rail { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
@media (max-width: 1023px) {
  .rail {
    display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin: 0 -16px; padding: 4px 16px 14px; scroll-padding: 0 16px;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail-item { flex: 0 0 78%; scroll-snap-align: start; }
}
@media (min-width: 560px) and (max-width: 1023px) { .rail-item { flex-basis: 44%; } }

/* Katalog: daftar ala aplikasi di HP */
@media (max-width: 639px) {
  .cards-catalog { grid-template-columns: 1fr; gap: 12px; }
  .cards-catalog .work-card { flex-direction: row; height: auto; }
  .cards-catalog .work-card .cover { flex: 0 0 112px; aspect-ratio: auto; min-height: 112px; }
  .cards-catalog .cover-icon { width: 34px !important; height: 34px !important; }
  .cards-catalog .cover-label, .cards-catalog .summary { display: none; }
  .cards-catalog .type-badge { left: 6px; top: 6px; padding: 3px 6px; font-size: 0; gap: 0; }
  .cards-catalog .type-badge svg.i { width: 14px; height: 14px; }
  .cards-catalog .work-card .body { padding: 10px 12px; gap: 6px; }
  .cards-catalog .work-card h3 { font-size: .96rem; }
  .cards-catalog .tags .tag:nth-child(n+3):not([class*=offline]) { display: none; }
}

/* ---------- Katalog: bilah cari & filter sheet ---------- */
.catalog-bar { display: flex; gap: 8px; align-items: flex-start; }
.catalog-bar .search-pill { flex: 1; min-width: 0; padding-left: 14px; }
@media (max-width: 768px) {
  .catalog-bar {
    position: sticky; top: var(--header-h); z-index: 30; margin: 0 -16px; padding: 10px 16px;
    background: var(--bg); border-bottom: 1px solid transparent;
  }
}
.filter-sheet > summary { list-style: none; }
.filter-sheet > summary::-webkit-details-marker { display: none; }
.filter-toggle { min-height: 52px; border-radius: 999px; background: var(--surface); position: relative; }
.count-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: #fff; font-size: .72rem; font-weight: 800;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; align-items: end; margin-bottom: 16px; }
.filter-check { align-self: center; }
.sheet-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-lg); }
@media (min-width: 769px) {
  .catalog-form { position: relative; }
  .filter-sheet[open] .sheet-panel { position: absolute; left: 0; right: 0; top: calc(100% + 10px); z-index: 30; }
  .sheet-panel .btn-block { width: auto; }
}
@media (max-width: 768px) {
  /* Latar gelap di elemen details (bukan di tombol: efek filter tombol membatasi position:fixed). */
  .filter-sheet[open]::before {
    content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(8, 14, 12, .45);
  }
  .sheet-open .catalog-bar, .catalog-bar:has(.filter-sheet[open]) { z-index: 70; }
  .sheet-open .bottom-nav { display: none; }
  .filter-sheet[open] .sheet-panel {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; max-height: 86vh; overflow-y: auto;
    border-radius: 22px 22px 0 0; padding: 12px 16px calc(16px + env(safe-area-inset-bottom));
    animation: sheet-up .28s var(--ease);
  }
  .filter-sheet[open] .sheet-panel::before {
    content: ""; display: block; width: 44px; height: 5px; margin: 0 auto 12px; border-radius: 999px; background: var(--line);
  }
  .filters { grid-template-columns: 1fr 1fr; }
  .filter-toggle span:not(.count-badge) { display: none; }
  .filter-toggle { width: 52px; padding: 0; }
  .filter-toggle .count-badge { position: absolute; top: -2px; right: -2px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .filter-sheet[open] .sheet-panel { animation: none; } }

/* ---------- CTA ---------- */
.cta-card {
  display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center;
  padding: 28px; border-radius: 22px; color: #fff;
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(255, 255, 255, .16), transparent 70%),
    linear-gradient(135deg, #138a72, #0f5c4d 60%, #0b4a3e);
  box-shadow: var(--shadow-lg);
}
.cta-card h2 { color: #fff; }
.cta-card p { opacity: .92; }
.steps { margin: 0; padding-left: 1.2em; display: grid; gap: 4px; }
@media (max-width: 640px) { .cta-card { grid-template-columns: 1fr; padding: 22px; } .cta-card .btn { width: 100%; } }

/* ---------- Detail karya (UI-2a) ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-bottom: 8px; color: var(--muted); font-weight: 600; text-decoration: none; }
.back-link svg.i { width: 18px; height: 18px; transform: rotate(180deg); }
.back-link:hover { color: var(--brand); }
.detail-head { margin-bottom: 18px; }
.detail-head h1 { margin: 10px 0 8px; }
.detail-lead { font-size: clamp(1rem, 2.6vw, 1.15rem); color: var(--muted); margin-bottom: 10px; }
.detail-head .author { margin: 0; }
.tag-type { display: inline-flex; align-items: center; gap: 4px; background: var(--t, var(--brand)); color: #fff; }
.tag-type svg.i { width: 14px; height: 14px; }
.preview { margin-bottom: 4px; }
.preview .frame { display: block; }
.preview-poster {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius);
  background: var(--t, var(--brand)); color: #fff; text-decoration: none; box-shadow: var(--shadow);
}
.preview-poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.preview-poster .cover-icon { width: 64px !important; height: 64px !important; opacity: .55; }
.poster-play {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .45));
}
.poster-play-circle {
  display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%;
  background: rgba(255, 255, 255, .95); color: var(--t, var(--brand)); box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
  transition: transform .25s var(--ease);
}
.poster-play-circle svg.i { width: 30px; height: 30px; margin-left: 4px; }
.poster-label { font-weight: 800; font-size: 1.05rem; text-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.preview-poster:active .poster-play-circle { transform: scale(.92); }
@media (hover: hover) { .preview-poster:hover .poster-play-circle { transform: scale(1.08); } }
@media (prefers-reduced-motion: no-preference) {
  .poster-play-circle { animation: fx-ring 2.4s var(--ease) infinite; }
}
@keyframes fx-ring { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55), 0 10px 30px rgba(0, 0, 0, .3); } 70%, 100% { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0), 0 10px 30px rgba(0, 0, 0, .3); } }
.detail-actions { margin: 16px 0 8px; }
.external-card { border-left: 4px solid var(--t, var(--brand)); }
.detail aside .card + .card, .detail aside .card + details { margin-top: 16px; }

/* Bilah aksi menempel (HP) menggantikan navigasi bawah di halaman detail */
.action-bar { display: none; }
@media (max-width: 768px) {
  .has-actionbar .bottom-nav { display: none; }
  .has-actionbar .detail-actions { display: none; }
  .action-bar {
    display: flex; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--line);
  }
  .action-bar .btn { flex: 1; min-height: 48px; padding: 8px 10px; }
  .action-bar .btn:first-child { flex: 1.6; }
  .action-bar svg.i { width: 18px; height: 18px; }
}

/* Kartu Bagikan */
.share-card:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.share-title { margin-bottom: 10px; }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.share-btn {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; font-size: .9rem;
  text-decoration: none; cursor: pointer; transition: transform .15s var(--ease), border-color .2s;
}
.share-btn:active { transform: scale(.96); }
.s-wa { background: #25d366; border-color: #25d366; color: #fff; }
.s-fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.s-tg { background: #229ed9; border-color: #229ed9; color: #fff; }
.share-qr { display: flex; gap: 14px; align-items: center; margin-top: 14px; }
.share-qr .qr { flex: none; width: 120px; height: 120px; }
.share-qr p { margin: 0; }

/* ---------- Profil guru ---------- */
.profile-hero {
  position: relative; overflow: hidden; padding: 22px; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(500px 200px at 100% 0%, color-mix(in srgb, var(--brand-2) 18%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}
.profile-id { display: flex; gap: 16px; align-items: center; }
.profile-id h1 { margin: 0 0 4px; font-size: clamp(1.4rem, 5vw, 2rem); }
.profile-avatar { flex: none; width: 88px; height: 88px; border-radius: 26px; object-fit: cover; box-shadow: var(--shadow); }
.profile-initial {
  display: grid; place-items: center; background: linear-gradient(135deg, var(--brand-2), var(--brand));
  color: #fff; font-size: 2.2rem; font-weight: 800;
}
.profile-badge { display: inline-flex; align-items: center; gap: 4px; margin: 0 0 4px; color: var(--ok); font-weight: 700; font-size: .85rem; }
.profile-badge svg.i { width: 16px; height: 16px; }
.profile-meta { margin: 0; }
.profile-bio { margin: 14px 0 10px; }
.profile-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.profile-stats div { display: flex; flex-direction: column; line-height: 1.2; }
.profile-stats strong { font-size: 1.3rem; }
.profile-stats span { font-size: .8rem; color: var(--muted); }
.profile-stats .btn { margin-left: auto; }
.profile-stats .btn svg.i { width: 18px; height: 18px; }
@media (max-width: 480px) { .profile-avatar { width: 72px; height: 72px; border-radius: 22px; } }

/* ---------- Studio ---------- */
.page-head p { margin: 6px 0 0; max-width: 70ch; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 18px; }
.tool-card { display: flex; gap: 14px; align-items: flex-start; }
.tool-card h2 { font-size: 1.15rem; margin-bottom: 6px; }
@media (max-width: 480px) { .tool-card { flex-direction: column; } .tool-card .btn { width: 100%; } }
.tool-icon {
  display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), #b9551a); color: #fff; box-shadow: var(--shadow);
}

/* ---------- Halaman error ---------- */
.error-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-top: 32px; padding-bottom: 32px; }
.error-wrap .brand { margin-bottom: 28px; }
.error-code {
  margin: 0; font-size: clamp(4.5rem, 22vw, 8rem); font-weight: 900; line-height: 1; letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--brand-2), var(--brand) 50%, var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-wrap h1 { margin-top: 10px; }

/* ---------- Halaman statis (prose) ---------- */
.prose { font-size: 1.02rem; }
.prose h1 { margin-bottom: .4em; }
.prose li { margin-bottom: .35em; }
.prose code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }

/* ---------- Menu akun (dasbor, hanya HP) ---------- */
.account-menu { display: none; }
@media (max-width: 768px) {
  .account-menu {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 16px;
  }
  .account-menu a, .account-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
    color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: left;
  }
  .account-menu svg.i { color: var(--brand); width: 20px; height: 20px; }
  .account-menu form { margin: 0; }
}

/* ---------- Dasbor (UI-2b) ---------- */
.dash-hero {
  padding: 20px; border-radius: 22px; border: 1px solid var(--line);
  background:
    radial-gradient(520px 220px at 100% 0%, color-mix(in srgb, var(--brand-2) 16%, transparent), transparent 70%),
    var(--surface);
  box-shadow: var(--shadow);
}
.dash-id { display: flex; gap: 14px; align-items: center; }
.dash-id h1 { margin: 0 0 2px; font-size: clamp(1.3rem, 5vw, 1.8rem); }
.dash-id p { margin: 0; }
.dash-initial {
  display: grid; place-items: center; flex: none; width: 56px; height: 56px; border-radius: 18px;
  background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff; font-size: 1.5rem; font-weight: 800;
}
.dash-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 18px 0 0; }
.dash-stats div { padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.dash-stats dt { font-size: .76rem; color: var(--muted); font-weight: 600; }
.dash-stats dd { margin: 0; font-size: 1.4rem; font-weight: 800; line-height: 1.2; }
.dash-stats .is-alert { background: var(--warn-bg); }
.dash-stats .is-alert dd { color: var(--accent); }
.dash-quota { margin-top: 16px; }
.dash-quota p { margin: 0 0 6px; }
.dash-actions { margin-top: 16px; }
.dash-actions svg.i { width: 18px; height: 18px; }
@media (max-width: 560px) {
  .dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-actions .btn { flex: 1; padding-left: 12px; padding-right: 12px; white-space: nowrap; }
}

.notice-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--surface);
}
.notice-icon { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); color: var(--muted); }
.notice-icon svg.i { width: 18px; height: 18px; }
.notice.is-new { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); background: var(--brand-soft); }
.notice.is-new .notice-icon { background: var(--brand); color: var(--brand-ink); }
.notice-new { color: var(--brand); }

/* Kartu "Karya saya": HP = kartu ala aplikasi, desktop = baris ringkas. */
:where(.my-work) { --t: var(--t-media); }
.my-works { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.my-work {
  position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 14px; padding: 12px;
  border-left: 4px solid var(--t); transition: transform .2s var(--ease), box-shadow .2s;
}
.my-work-thumb {
  grid-row: span 2; display: grid; place-items: center; align-self: start; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: 12px; color: #fff;
  background: linear-gradient(135deg, color-mix(in srgb, var(--t) 70%, #fff), var(--t));
}
.my-work-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.my-work-thumb svg.i { width: 30px; height: 30px; }
.my-work-body { min-width: 0; }
.my-work h3 { margin: 0 0 6px; font-size: 1rem; line-height: 1.3; }
.my-work h3 a { color: var(--ink); text-decoration: none; }
.my-work h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.my-work-meta { margin: 6px 0 0; }
.my-work-stats { display: flex; gap: 14px; margin: 4px 0 0; }
.my-work-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.my-work-stats svg.i { width: 15px; height: 15px; }
.my-work-actions { position: relative; z-index: 1; display: flex; gap: 8px; }
.my-work:active { transform: scale(.99); }
@media (hover: hover) { .my-work:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
@media (max-width: 767px) {
  .my-work-actions { grid-column: 1 / -1; margin-top: 8px; }
  .my-work-actions .btn { flex: 1; }
}
@media (min-width: 768px) {
  .my-work { grid-template-columns: 136px minmax(0, 1fr) auto; align-items: center; }
  .my-work-thumb { grid-row: auto; align-self: center; }
}

/* ---------- Form unggah/revisi bertahap (UI-2b) ---------- */
.form-steps {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 0 14px; padding: 2px 0 10px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.form-steps::-webkit-scrollbar { display: none; }
.form-steps a {
  display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 40px; padding: 6px 14px 6px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.form-steps a.is-current { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.form-steps a.has-error { border-color: var(--err); color: var(--err); background: var(--err-bg); }
.form-steps a.has-error .step-num { background: var(--err); }
@media (max-width: 768px) {
  .form-steps {
    position: sticky; top: var(--header-h); z-index: 30; margin: 0 -16px 14px; padding: 8px 16px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
}
.form-section { margin-bottom: 16px; scroll-margin-top: calc(var(--header-h) + 72px); }
.form-section .field:last-child { margin-bottom: 0; }
.step-head { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 1.1rem; }
.step-num {
  display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink); font-size: .85rem; font-weight: 800;
}

.file-pick {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px;
  border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2);
  transition: border-color .2s, background-color .2s;
}
.file-pick input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-pick:hover, .file-pick:focus-within { border-color: var(--brand); }
.file-pick:focus-within { box-shadow: 0 0 0 3px var(--brand-soft); }
.file-pick.is-picked { border-style: solid; border-color: var(--brand); background: var(--brand-soft); }
.file-pick-icon {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px;
  background: var(--surface); color: var(--brand); box-shadow: var(--shadow);
}
.file-pick-text { display: flex; flex-direction: column; min-width: 0; }
.file-pick-text strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-preview, .file-current { display: block; width: 100%; max-width: 280px; aspect-ratio: 16 / 9; object-fit: cover; margin-top: 10px; border-radius: 12px; border: 1px solid var(--line); }
.file-preview[hidden] { display: none; }

/* Bilah simpan: di HP menempel di bawah (menggantikan navigasi bawah). */
.save-bar { margin-top: 4px; }
@media (max-width: 768px) {
  .has-savebar .bottom-nav { display: none; }
  .has-savebar .save-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
    border-top: 1px solid var(--line);
  }
  .has-savebar .save-bar .btn { width: 100%; min-height: 48px; }
}

.danger-zone { margin-top: 16px; border-color: color-mix(in srgb, var(--err) 35%, var(--line)); }
.danger-zone > p:first-child { color: var(--err); }
.danger-zone form + form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.danger-zone .small { margin: 0 0 8px; }

/* ---------- Hero bermerek (banner Inovasi Guru) ---------- */
.hero-brand {
  color: #fff;
  background:
    linear-gradient(180deg, rgba(4, 12, 26, .72), rgba(4, 12, 26, .9)),
    url("/images/banner-900.webp") center / cover no-repeat, #06101f;
}
@media (min-width: 900px) {
  .hero-brand {
    background:
      linear-gradient(180deg, rgba(4, 12, 26, .66), rgba(4, 12, 26, .88)),
      url("/images/banner-1600.webp") center / cover no-repeat, #06101f;
  }
}
.hero-brand h1 { color: #fff; }
.hero-brand .hero-lead, .hero-brand .muted { color: rgba(255, 255, 255, .8); }
.hero-brand .eyebrow { background: rgba(94, 234, 255, .14); color: #8ff0ff; }
.hero-brand .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .6); }
.hero-brand .btn-ghost:hover { background: rgba(255, 255, 255, .08); }
.hero-brand .search-pill { border-color: transparent; }
.hero-logo { display: block; width: 72px; height: 72px; margin: 0 auto 10px; filter: drop-shadow(0 6px 18px rgba(0, 200, 255, .35)); }

/* ---------- Karya berbayar (Marketplace T2) ---------- */
.tag.tag-price { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); color: var(--accent); }
.locked-card { border-left: 4px solid var(--accent); }
.locked-title { font-size: 1.15rem; color: var(--accent); }
.btn-locked { background: var(--surface-2); border-color: var(--line); color: var(--ink); cursor: default; }
.btn-locked:hover { filter: none; }

/* ---------- Monetisasi (Marketplace T5) ---------- */
.terms-list { padding-left: 1.2em; margin: 0 0 16px; }
.terms-list li { margin-bottom: 6px; }
.sell-box { margin: 8px 0 0; padding: 14px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 12px; min-width: 0; }
.sell-box legend { padding: 0 6px; }
.monet-admin { margin-top: 8px; }
.monet-form { display: grid; gap: 8px; margin-top: 8px; }

/* ---------- Kurasi & admin (UI-3) ---------- */
.page-head-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 8px; }
.page-head-row h1 { margin: 0; }
.count-pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .75rem; font-weight: 800; }
.back-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; }

.tabs.tabs-scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs-scroll::-webkit-scrollbar { display: none; }
.tabs-scroll a { flex: none; gap: 6px; min-height: 40px; }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); color: var(--muted); font-size: .72rem; font-weight: 800; }
.tabs a.active .tab-count { background: rgba(255, 255, 255, .22); color: inherit; }

/* Kartu daftar umum: antrean, revisi, laporan, pengguna, audit. */
:where(.item-card) { --t: var(--brand); }
.item-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.item-card {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; padding: 14px;
  border-left: 4px solid var(--t); transition: transform .2s var(--ease), box-shadow .2s;
}
.item-card.item-plain { grid-template-columns: minmax(0, 1fr); }
.item-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, color-mix(in srgb, var(--t) 70%, #fff), var(--t));
}
.item-icon svg.i { width: 22px; height: 22px; }
.item-body { min-width: 0; }
.item-body h3 { margin: 0 0 4px; font-size: 1rem; line-height: 1.3; }
.item-body h3 a { color: var(--ink); text-decoration: none; }
.item-body h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.item-body p { margin: 0 0 6px; }
.item-actions { position: relative; z-index: 1; grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.item-actions .btn { flex: 1; }
.item-card:active { transform: scale(.995); }
@media (hover: hover) { .item-card:has(h3 a):hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); } }
@media (min-width: 768px) {
  .item-card { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; }
  .item-card.item-plain { grid-template-columns: minmax(0, 1fr) auto; }
  .item-actions { grid-column: auto; margin-top: 0; }
  .item-actions .btn { flex: none; }
}
.item-list-compact .item-card { padding: 10px 14px; }

/* Panel keputusan kurator: kartu radio berwarna per aksi. */
.decision-card:focus { outline: 3px solid var(--accent); outline-offset: 2px; }
.choice-grid { display: grid; gap: 8px; margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.choice {
  --c: var(--brand); position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; margin: 0;
  padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer;
  transition: border-color .2s, background-color .2s;
}
.choice input { width: 20px; height: 20px; margin: 0; accent-color: var(--c); }
.choice.tone-ok { --c: var(--ok); }
.choice.tone-warn { --c: var(--accent); }
.choice.tone-err { --c: var(--err); }
.choice:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 10%, var(--surface)); color: var(--c); }
.choice:focus-within { box-shadow: 0 0 0 3px var(--brand-soft); }

/* Perbandingan revisi: kartu per bagian (lama → baru). */
.diff-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.diff-item { padding: 14px; }
.diff-label { margin: 0 0 8px; font-weight: 700; }
.diff-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; }
.diff-pair > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 8px 10px; border-radius: 10px; overflow-wrap: anywhere; }
.diff-old { background: var(--surface-2); }
.diff-new { background: var(--ok-bg); }
.diff-arrow { width: 18px; height: 18px; color: var(--muted); }
.diff-img { width: 100%; max-width: 160px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; }
@media (max-width: 480px) {
  .diff-pair { grid-template-columns: minmax(0, 1fr); }
  .diff-arrow { transform: rotate(90deg); justify-self: center; }
}

.report-details { padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.report-form { position: relative; z-index: 1; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 6px; }
@media (min-width: 768px) {
  .item-card.report-card { grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); }
  .report-form { grid-column: auto; margin-top: 0; }
}

.admin-menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 12px 0 18px; }
.admin-menu a {
  display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); color: var(--ink); font-weight: 600; text-decoration: none;
}
.admin-menu svg.i { color: var(--brand); width: 20px; height: 20px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
@media (max-width: 560px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat-card { padding: 16px; }
.stat-card p { margin: 0 0 4px; }
.stat-num { font-size: clamp(1.4rem, 5vw, 1.9rem); font-weight: 800; line-height: 1.2; }
.stat-card .bar { margin: 6px 0; }
.stat-card.is-warn { background: var(--warn-bg); }
.stat-card.is-err { background: var(--err-bg); color: var(--err); }
.stat-link { color: inherit; text-decoration: none; }
.admin-search { max-width: 520px; margin: 0 0 16px; }
.user-initial { --t: var(--brand); }
.user-email { overflow-wrap: anywhere; }
.role-form select { flex: 1; min-width: 120px; width: auto; }
.audit-filter { margin-bottom: 16px; }
.audit-filter select { flex: 1; max-width: 320px; width: auto; }
.audit-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.audit-item.is-fail { --t: var(--err); }
.audit-meta code { display: block; margin-top: 6px; padding: 8px; border-radius: 8px; background: var(--surface-2); font-size: .8rem; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- Komponen lama (dasbor, kurasi, admin, detail) ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 6px; position: relative; z-index: 2; }
.tag { font-size: .76rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); }
.tag.status-menunggu { background: var(--warn-bg); color: var(--accent); }
.tag.status-publik { background: var(--ok-bg); color: var(--ok); }
.tag.status-ditolak, .tag.status-diturunkan { background: var(--err-bg); color: var(--err); }
.tag.offline-siap { background: var(--ok-bg); color: var(--ok); }
.tag.offline-sebagian { background: var(--warn-bg); color: var(--accent); }
.tag.offline-butuh { background: var(--line); color: var(--muted); }
.layout-side { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; }
@media (max-width: 900px) { .layout-side { grid-template-columns: minmax(0, 1fr); } }
.layout-side > * { min-width: 0; }
.frame { width: 100%; aspect-ratio: 16 / 10; min-height: 360px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
@media (max-width: 640px) { .frame { min-height: 300px; aspect-ratio: 3 / 4; } }
.meta-list { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; }
.stats { display: flex; gap: 18px; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); }
table.list th, table.list td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: .85rem; color: var(--muted); font-weight: 600; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs a { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 14px; border-radius: 999px; text-decoration: none; color: var(--muted); border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .9rem; }
.tabs a.active { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.prose { max-width: 72ch; }
.prose h2 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--brand-soft); }
.qr { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: 8px; }
.qr svg { width: 100%; height: 100%; display: block; }
.pagination { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 24px; list-style: none; padding: 0; }
.pagination a, .pagination span { display: inline-grid; place-items: center; min-width: 40px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; background: var(--surface); }
.pagination .current { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pagination .disabled { color: var(--muted); }
details.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; background: var(--surface); }
details.box summary { cursor: pointer; font-weight: 600; }
.bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--brand); }

/* Fase 1.5 P5: katalog (urutan & filter aktif), peringatan ringkasan */
.result-bar { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.result-bar .tabs { align-items: center; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.warn-text { background: var(--warn-bg); color: var(--ink); padding: 4px 8px; border-radius: 6px; margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Akademi Kreator (docs/rencana-akademi.md) */
.akademi-card { border-left: 4px solid var(--brand); }
.akademi-card .bar, .akademi-jalur .bar { margin: 6px 0 10px; }
.akademi-jalur { list-style: none; padding: 0; }
.misi-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.misi { display: flex; gap: 12px; align-items: flex-start; }
.misi-body { flex: 1; min-width: 0; }
.misi-body h3 { font-size: 1rem; margin: 0 0 4px; }
.misi-check { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; }
.misi-done .misi-check { background: var(--brand); border-color: var(--brand); }
.misi-done .misi-body h3 { color: var(--muted, inherit); }
.akademi-modul { margin-bottom: 12px; }
.embed { position: relative; height: 0; padding-top: 56.25%; margin: 10px 0 16px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0; }
@supports (aspect-ratio: 16 / 9) { .embed { height: auto; padding-top: 0; aspect-ratio: 16 / 9; } }
.akademi-sertifikat { text-align: center; padding: 36px 24px; border: 3px double var(--brand); }
.akademi-sertifikat h1 { margin: 6px 0 14px; }
.akademi-sertifikat-nama { font-size: 1.8rem; font-weight: 800; margin: 4px 0 10px; }
.akademi-sertifikat-jalur { font-size: 1.2rem; font-weight: 700; margin: 4px 0 14px; }
.akademi-sertifikat-qr .qr { width: 120px; margin: 14px auto 4px; }
@media print {
  .site-header, .site-footer, .bottom-nav, .no-print, .alert { display: none !important; }
  .akademi-sertifikat { border-width: 4px; box-shadow: none; }
}
tr.is-me td { font-weight: 700; background: color-mix(in srgb, var(--brand) 8%, transparent); }
