/* Layout: menu pil melayang di tengah atas; setiap <section class="screen"> mengisi satu layar desktop/tablet
   sehingga satu bagian = satu tampilan saat share screen. Satu tema terang yang disengaja. */
:root {
  --bg: #F3F6FB;
  --bg-2: #EAF0FB;
  --surface: #FFFFFF;
  --ink: #15224A;
  --muted: #56627F;
  --accent: #3355F0;
  --accent-soft: #E7ECFF;
  --warm: #FF7A45;
  --warm-soft: #FFEDE4;
  --line: #E0E6F1;
  --stage: #EEF2FA;
  --ok: #12805A;
  --warn: #C2410C;
  --shadow: 0 18px 50px rgba(30, 50, 110, 0.10), 0 2px 6px rgba(30, 50, 110, 0.06);
  --shadow-sm: 0 6px 18px rgba(30, 50, 110, 0.08);
  --font-display: "Bricolage Grotesque", "Trebuchet MS", sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --radius: 26px;
  --wrap: 1240px;
  --hdr: 84px;
  color-scheme: light;
  font-size: clamp(15px, 0.55vw + 0.6vh, 19px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; scroll-padding-top: var(--hdr); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}
body::before {
  content: ""; position: fixed; inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg);
}
img { max-width: 100%; }
a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap {
  width: 100%; max-width: var(--wrap); margin: 0 auto;
  padding-left: max(28px, env(safe-area-inset-left, 0px));
  padding-right: max(28px, env(safe-area-inset-right, 0px));
}

/* Header: pil putih melayang, menu di tengah */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 25;
  height: var(--hdr); display: flex; align-items: center; justify-content: center;
  padding: 0 16px; pointer-events: none;
}
.nav {
  pointer-events: auto;
  display: flex; gap: 4px; padding: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none;
  background: rgba(255, 255, 255, 0.86); backdrop-filter: blur(14px);
  border-radius: 999px; box-shadow: var(--shadow-sm); border: 1px solid var(--line);
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  white-space: nowrap; text-decoration: none; color: var(--muted);
  font-size: 0.92rem; font-weight: 500; padding: 0.55rem 1rem; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav a:hover { color: var(--ink); background: var(--accent-soft); }
.nav a[aria-current="page"] { color: #FFFFFF; background: var(--ink); }
.nav a.soon::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #C3CBDD; }

/* Satu bagian = satu layar */
.screen {
  min-height: calc(100vh - var(--hdr));
  display: flex; flex-direction: column; justify-content: center;
  padding-block: clamp(14px, 3vh, 40px);
  scroll-snap-align: start;
  position: relative;
}
.screen.tint { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
.screen.white { background: linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%); }

/* Navigasi titik di sisi kanan */
.dots {
  position: fixed; right: max(14px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%);
  z-index: 20; display: flex; flex-direction: column; gap: 10px;
}
.dots a { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #C9D1E3; display: block; }
.dots a[aria-current="true"] { background: var(--accent); transform: scale(1.25); }
.dots a span {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  font-size: 0.78rem; background: var(--ink); color: #FFFFFF; padding: 3px 10px; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.dots a:hover span, .dots a:focus-visible span { opacity: 1; }

/* Typography */
h1, h2, h3 { font-family: var(--font-display); line-height: 1.06; text-wrap: balance; margin: 0; letter-spacing: -0.02em; color: var(--ink); }
h1 { font-size: clamp(2.6rem, 8.5vh, 5.4rem); font-weight: 800; }
h2 { font-size: clamp(1.9rem, 5.6vh, 3.4rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; letter-spacing: -0.01em; }
h1 em, h2 em { font-style: normal; color: var(--accent); }
p { margin: 0; max-width: 64ch; }
.lead { font-size: 1.18rem; color: var(--muted); }
.eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }
.stack { display: flex; flex-direction: column; gap: 0.9rem; }
.stack-lg { display: flex; flex-direction: column; gap: clamp(14px, 2.6vh, 28px); }
.section-head { display: flex; flex-direction: column; gap: 0.6rem; }

/* Grids */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(20px, 3vw, 48px); align-items: center; }
.split.wide-left { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.split > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.grid-2 > *, .grid-3 > *, .grid-4 > * { min-width: 0; }
@media (max-width: 900px) and (orientation: portrait) {
  .split, .split.wide-left { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* Cards */
.card {
  background: var(--surface); border-radius: var(--radius); padding: clamp(16px, 2.4vh, 26px);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 0.7rem;
}
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card.accent { background: var(--ink); color: #FFFFFF; }
.card.accent h3, .card.accent .eyebrow { color: #FFFFFF; }
.card.accent .muted { color: #C5CEE6; }
.card.highlight { outline: 3px solid var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-mono); font-size: 0.8rem; padding: 0.4rem 0.85rem; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow-sm); }

/* Buttons */
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font-family: var(--font-body); font-weight: 600; font-size: 0.98rem;
  padding: 0.75rem 1.3rem; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 0; background: var(--ink); color: #FFFFFF; min-height: 46px; box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--accent); }
.btn.ghost { background: var(--surface); color: var(--ink); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.warm { background: var(--warm); }
.btn.warm:hover { background: #F0602A; }
.btn.is-disabled { opacity: 0.55; pointer-events: none; }

/* 3D stage */
.stage {
  position: relative; width: 100%; height: clamp(300px, 62vh, 700px); max-width: 100%;
  border-radius: var(--radius); overflow: hidden; touch-action: pan-y;
  background: radial-gradient(120% 90% at 50% 15%, #FFFFFF 0%, var(--stage) 70%);
  box-shadow: var(--shadow);
}
.stage.short { height: clamp(260px, 52vh, 600px); }
.stage.bare { background: transparent; box-shadow: none; }
.stage canvas { display: block; width: 100%; height: 100%; }
.stage-hint {
  position: absolute; left: 16px; bottom: 14px; font-family: var(--font-mono); font-size: 0.72rem;
  color: var(--muted); background: rgba(255, 255, 255, 0.85); padding: 4px 12px; border-radius: 999px;
  pointer-events: none; box-shadow: var(--shadow-sm);
}
.stage-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--muted); }

/* Controls */
.control { display: flex; flex-direction: column; gap: 2px; }
.control label { display: flex; justify-content: space-between; gap: 12px; font-weight: 600; font-size: 0.92rem; }
.control output { font-family: var(--font-mono); font-weight: 500; color: var(--accent); font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 26px; margin: 0; }

.readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.readout div { background: var(--accent-soft); border-radius: 14px; padding: 0.55rem 0.75rem; display: flex; flex-direction: column; }
.readout span { font-size: 0.78rem; color: var(--muted); }
.readout b { font-family: var(--font-mono); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.readout.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.readout.two b { font-size: 0.95rem; }

.big-number { font-family: var(--font-display); font-size: clamp(2.6rem, 7vh, 4rem); font-weight: 800; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }

.rules { display: flex; flex-direction: column; gap: 6px; }
.rule { display: grid; grid-template-columns: 30px minmax(0, 1fr) 46px; gap: 8px; align-items: center; font-size: 0.82rem; }
.rule .id { font-family: var(--font-mono); color: var(--muted); }
.rule .txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rule .bar { height: 7px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.rule .bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; border-radius: 4px; }
.rule .val { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 1.1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
tr:last-child td { border-bottom: 0; }
td.num { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap.flat { box-shadow: none; border-radius: 0; background: transparent; }

/* Step rail */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.steps a { text-decoration: none; color: var(--ink); border-radius: 20px; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 2px; background: var(--surface); box-shadow: var(--shadow-sm); }
.steps a:hover { outline: 2px solid var(--accent); }
.steps b { font-family: var(--font-mono); color: var(--accent); font-size: 0.8rem; }
.steps span { font-weight: 600; line-height: 1.3; }
@media (max-width: 760px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.question {
  font-family: var(--font-display); font-size: clamp(1.4rem, 3.6vh, 2.1rem); font-weight: 700; line-height: 1.2;
  padding: clamp(16px, 2.6vh, 26px) 1.6rem; background: var(--surface); border-radius: var(--radius);
  box-shadow: var(--shadow); max-width: none; position: relative;
}
.question::before { content: "?"; position: absolute; right: 20px; top: -18px; width: 40px; height: 40px; border-radius: 50%; background: var(--warm); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }

.term { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.term div { background: var(--surface); border-radius: 20px; padding: 0.8rem 1rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; justify-content: center; }
.term div.academic { background: var(--accent); }
.term div.academic small, .term div.academic strong { color: #FFFFFF; }
.term small { display: block; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.term strong { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; }
.term .arrow { font-family: var(--font-mono); color: var(--accent); font-size: 1.4rem; align-self: center; }
.chunk-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--warm); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 500; }
.formula { font-family: var(--font-mono); font-size: 1.3rem; background: var(--surface); border-radius: 20px; padding: 1rem 1.3rem; box-shadow: var(--shadow-sm); overflow-x: auto; max-width: none; }

/* Sort game */
.game { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.game-card { background: var(--surface); border-radius: 20px; padding: 0.9rem 1.1rem; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 0.6rem; border: 2px solid transparent; }
.game-card p { font-weight: 500; font-size: 0.95rem; }
.game-card .choices { display: flex; gap: 8px; flex-wrap: wrap; }
.game-card button { font: inherit; font-size: 0.85rem; font-weight: 600; padding: 0.45rem 0.9rem; border-radius: 999px; cursor: pointer; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); min-height: 38px; }
.game-card button:hover { border-color: var(--accent); background: var(--accent-soft); }
.game-card .feedback { font-size: 0.85rem; color: var(--muted); }
.game-card.right { border-color: var(--ok); }
.game-card.right .feedback b { color: var(--ok); }
.game-card.wrong { border-color: var(--warn); }
.game-card.wrong .feedback b { color: var(--warn); }
@media (max-width: 760px) { .game { grid-template-columns: minmax(0, 1fr); } }

/* Peta pertemuan */
.map { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .map { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.map a, .map div.tile {
  text-decoration: none; color: var(--ink); background: var(--surface); border-radius: 22px; padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.35rem; min-height: clamp(120px, 21vh, 190px); box-shadow: var(--shadow-sm);
}
.map a:hover { outline: 2px solid var(--accent); }
.map .p { font-family: var(--font-display); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.map .t { font-weight: 600; line-height: 1.3; }
.status { align-self: flex-start; margin-top: auto; font-family: var(--font-mono); font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; background: var(--bg); color: var(--muted); }
.status.open { background: var(--accent); color: #FFFFFF; }
.status.self { background: var(--warm-soft); color: #9A3412; }
.status.present { background: var(--ink); color: #FFFFFF; }

/* Pengajar: foto | teks | foto, dengan latar foto yang sama */
.teacher { display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.5fr) minmax(0, 0.72fr); grid-template-areas: "a t b"; gap: clamp(18px, 2.6vw, 40px); align-items: center; }
.teacher .left { grid-area: a; }
.teacher .right { grid-area: b; }
.teacher .teacher-text { grid-area: t; min-width: 0; }
@media (orientation: portrait) and (max-width: 1024px) {
  .teacher { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "a b" "t t"; }
}
.person { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; min-width: 0; }
.photo {
  width: min(100%, 46vh); aspect-ratio: 3 / 4;
  border-radius: 999px 999px 28px 28px; overflow: hidden; box-shadow: var(--shadow);
  background:
    radial-gradient(60% 45% at 50% 30%, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(180deg, #E2E9FF 0%, #F5F7FE 100%);
}
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; display: block; }
.person figcaption { font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); background: var(--surface); padding: 4px 12px; border-radius: 999px; box-shadow: var(--shadow-sm); }
.bio { display: flex; flex-direction: column; gap: 0.35rem; }
.bio p { color: var(--muted); }
.bio .role { color: var(--ink); font-weight: 600; }
.achievements { display: flex; flex-direction: column; gap: 0.7rem; margin-top: 0.5rem; }
.ach { background: var(--surface); border-radius: 18px; padding: 0.7rem 1rem; box-shadow: var(--shadow-sm); display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; align-items: start; }
.ach .n { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-family: var(--font-mono); font-weight: 500; display: flex; align-items: center; justify-content: center; }
.logos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; align-items: center; }
.badge {
  width: 100px; height: 50px; padding: 5px 9px; border-radius: 12px; background: #FFFFFF;
  border: 1px solid var(--line); box-shadow: 0 2px 6px rgba(30, 50, 110, 0.06);
  display: inline-flex; align-items: center; justify-content: center;
}
.badge img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }
.badge .logo-chip { border: 0; padding: 0; background: none; text-align: center; line-height: 1.1; }
.ach strong { display: block; line-height: 1.3; text-wrap: balance; }
.ach .desc { display: block; margin-top: 2px; font-size: 0.85rem; line-height: 1.45; color: var(--muted); text-wrap: pretty; max-width: 60ch; }
.contacts { display: grid; grid-template-columns: repeat(3, max-content); gap: 8px; margin-top: 0.4rem; }
.contact {
  display: grid; grid-template-columns: 24px auto; grid-template-rows: auto auto; column-gap: 9px; align-items: center;
  padding: 0.45rem 0.95rem 0.45rem 0.7rem; border-radius: 16px; background: var(--surface);
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-sm); line-height: 1.2;
}
.contact img { grid-row: 1 / span 2; width: 24px; height: 24px; object-fit: contain; }
.contact strong { font-size: 0.8rem; }
.contact small { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.contact:hover { outline: 2px solid var(--accent); }
@media (orientation: portrait) and (max-width: 1024px) { .contacts { grid-template-columns: repeat(3, minmax(0, max-content)); } }

.site-footer { padding-block: 22px 30px; color: var(--muted); font-size: 0.85rem; scroll-snap-align: end; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

ul.clean, ol.clean { margin: 0; padding-left: 1.3rem; display: flex; flex-direction: column; gap: 0.4rem; }
.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Layar pendek (misalnya 1024×768): rapatkan jarak */
@media (max-height: 800px) {
  .card { padding: 14px 18px; gap: 0.5rem; }
  .stack-lg { gap: 12px; }
}

/* Tablet tegak: kolom menumpuk, jadi panggung 3D dan foto dibuat lebih pendek */
@media (orientation: portrait) and (max-width: 1024px) {
  .stage, .stage.short { height: clamp(220px, 30vh, 420px); }
  .photo { width: min(100%, 24vh); }
  h1 { font-size: clamp(2.2rem, 5vh, 3.6rem); }
  h2 { font-size: clamp(1.7rem, 3.6vh, 2.6rem); }
  .question { font-size: 1.3rem; }
  .teacher { gap: 16px; }
  .achievements { gap: 0.5rem; }
}
@media (orientation: portrait) and (max-width: 1024px) {
  #lab .stage, #surface .stage, #dataset .stage { height: 21vh; }
  #jembatan .stage { height: 26vh; }
  #lab .rules { gap: 3px; }
  #dataset .card { padding: 12px 16px; }
}
@media (max-height: 800px) {
  .achievements { gap: 0.4rem; margin-top: 0.2rem; }
  .ach { padding: 0.45rem 0.8rem; }
  #pengajar .stack { gap: 0.55rem; }
}
@media (orientation: portrait) and (max-width: 1024px) {
  .photo { width: min(100%, 21vh); }
}

@media (max-height: 800px) {
  .badge { width: 88px; height: 42px; padding: 4px 8px; }
  .ach .desc { font-size: 0.8rem; }
}
@media (orientation: portrait) and (max-width: 1024px) {
  .photo { width: min(100%, 19vh); }
  .badge { width: 80px; height: 40px; padding: 4px 7px; }
  .ach { padding: 0.45rem 0.8rem; }
  .achievements { gap: 0.4rem; }
  #pengajar .stack { gap: 0.5rem; }
}

/* Tiga metode inferensi */
.controls-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding-block: 14px; }
.method { display: flex; flex-direction: column; gap: 10px; }
.method-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.method .formula { margin: 0; font-size: 0.95rem; padding: 8px 12px; }
.method #tsukaZ { display: block; margin-top: 4px; color: var(--accent); font-size: 0.78rem; }
.scale { position: relative; height: 10px; border-radius: 6px; background: linear-gradient(90deg, #DDE7FF, #8FA6F7 55%, var(--warm)); }
.scale .mark { position: absolute; top: -5px; width: 4px; height: 20px; margin-left: -2px; border-radius: 2px; background: var(--ink); transition: left 0.2s; }
@media (max-height: 800px) { #metode .method { gap: 6px; } #metode .method .small { line-height: 1.4; } }
@media (orientation: portrait) and (max-width: 1024px) { .controls-row { gap: 12px; } #metode #methods { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; } #metode .method-head { flex-direction: column; gap: 2px; } #metode .split { grid-template-columns: 1fr; } }

/* Formulir */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.92rem; }
.field small { font-size: 0.78rem; }
input[type="text"], input[type="number"], select, textarea {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 0.65rem 0.9rem; width: 100%; transition: border-color 0.15s, background 0.15s;
}
textarea { resize: vertical; min-height: 4.2rem; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: var(--surface); }
.inline-field { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.inline-field input { width: 4.2rem; padding: 0.45rem 0.6rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.ok { color: #1B8A5A; font-weight: 600; }
.err { color: #C2410C; font-weight: 600; }

/* Daftar kelas */
.roster-card { height: min(64vh, 620px); }
.roster-head { display: flex; align-items: baseline; justify-content: space-between; }
.roster { list-style: none; margin: 0; padding: 0 4px 0 0; overflow-y: auto; flex: 1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px 10px; align-content: start; }
.roster li { display: flex; flex-direction: column; padding: 5px 9px; border-radius: 10px; background: var(--bg); font-size: 0.88rem; min-width: 0; }
.roster li span, .roster li small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.roster li small { font-size: 0.72rem; }

/* Spin kelompok */
.groups-grid { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); gap: 8px; }
.group-card { background: var(--surface); border-radius: 14px; padding: 8px 10px; box-shadow: var(--shadow-sm); min-width: 0; }
.group-card strong { display: block; font-size: 0.78rem; font-family: var(--font-mono); color: var(--accent); margin-bottom: 2px; }
.group-card ol { margin: 0; padding-left: 1.1rem; font-size: 0.8rem; line-height: 1.35; min-height: 4.3em; }
.group-card li { line-height: 1.25; margin-bottom: 2px; overflow-wrap: anywhere; }
.group-card li.fresh { color: var(--warm); font-weight: 700; }
#kelompok .btn-row { gap: 8px; }
#kelompok .btn { padding-inline: 1rem; }
@media (max-height: 800px) { .roster-card { height: 58vh; } .group-card ol { font-size: 0.74rem; } }
@media (orientation: portrait) and (max-width: 1024px) {
  #daftar .split, #kelompok .split { grid-template-columns: 1fr; }
  .roster-card { height: 34vh; }
  #kelompok .stage { height: 30vh; }
}

/* Exit ticket */
.ticket-q { font-weight: 600; }

tr.bonus td { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
tr.bonus td:last-child { font-weight: 500; }

.formula-read { display: block; margin-top: 6px; font-family: var(--font-body); font-size: 0.9rem; color: var(--muted); }

/* Pengumpulan */
.status-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.status-pill { font-family: var(--font-mono); font-size: 0.82rem; padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--bg); color: var(--muted); }
.status-pill.done { background: #E3F6EC; color: #1B8A5A; font-weight: 600; }
input[type="file"] { font: inherit; font-size: 0.85rem; padding: 0.45rem; background: var(--bg); border: 1.5px dashed var(--line); border-radius: 14px; width: 100%; }
