/* Ruang Pendampingan — gaya modul (tanpa build tool, tanpa font/CDN eksternal).
 * Mobile-first. Tema: ikut sistem, bisa dipaksa lewat [data-theme] (tombol tema).
 * Semua animasi dimatikan bila pengguna memilih "kurangi gerakan". */
:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --surface-2: #eef3f0;
  --ink: #14201c;
  --muted: #5b6763;
  --line: #e0e7e3;
  --brand: #0f5c4d;
  --brand-2: #138a72;
  --brand-ink: #ffffff;
  --brand-soft: #e1f1ea;
  --accent: var(--brand);
  --ok: #1d6b3a;
  --ok-bg: #e5f4e9;
  --err: #a12a2a;
  --err-bg: #fbe9e9;
  --warn: #8a5a00;
  --warn-bg: #fff3d6;
  --s-m: #1d7a46;
  --s-dp: #2f6fd6;
  --s-bm: #c8702a;
  --s-bt: #7a8580;
  --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, .07), 0 16px 40px rgba(16, 33, 28, .14);
  --ease: cubic-bezier(.2, .7, .2, 1);
  --top-h: 58px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0e1311;
  --surface: #161d1a;
  --surface-2: #1c2521;
  --ink: #e5ece9;
  --muted: #9aa8a2;
  --line: #29332f;
  --brand: #55b39d;
  --brand-2: #6fcab3;
  --brand-ink: #07120e;
  --brand-soft: #1a2d27;
  --ok: #7fd19a;
  --ok-bg: #15281b;
  --err: #f09a9a;
  --err-bg: #2f1717;
  --warn: #f0c46a;
  --warn-bg: #2d2513;
  --s-m: #5fcf8b;
  --s-dp: #6fa2f2;
  --s-bm: #eea064;
  --s-bt: #9aa8a2;
  --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, .45), 0 16px 40px rgba(0, 0, 0, .45);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1311;
    --surface: #161d1a;
    --surface-2: #1c2521;
    --ink: #e5ece9;
    --muted: #9aa8a2;
    --line: #29332f;
    --brand: #55b39d;
    --brand-2: #6fcab3;
    --brand-ink: #07120e;
    --brand-soft: #1a2d27;
    --ok: #7fd19a;
    --ok-bg: #15281b;
    --err: #f09a9a;
    --err-bg: #2f1717;
    --warn: #f0c46a;
    --warn-bg: #2d2513;
    --s-m: #5fcf8b;
    --s-dp: #6fa2f2;
    --s-bm: #eea064;
    --s-bt: #9aa8a2;
    --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, .45), 0 16px 40px rgba(0, 0, 0, .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
a { color: var(--brand); }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 1.9rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.tiny { font-size: .78rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* Tata letak */
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.page { padding-block: 20px 72px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.grid { display: grid; gap: 16px; }
.grid-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 720px) {
  .grid-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-side { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
}

/* Bilah atas */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.topbar-row { display: flex; align-items: center; gap: 12px; min-height: var(--top-h); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; min-width: 0; }
.brand-dot {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #fff));
  display: grid; place-items: center; color: #fff; font-size: .9rem; font-weight: 800;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--accent) 35%, transparent);
}
.brand-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { display: block; font-weight: 500; font-size: .75rem; color: var(--muted); }
.topnav { display: none; gap: 2px; margin-left: 8px; }
.topnav a { padding: 8px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .92rem; }
.topnav a:hover { background: var(--surface-2); color: var(--ink); }
.topnav a.active { background: var(--brand-soft); color: var(--brand); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
@media (min-width: 900px) { .topnav { display: flex; } }

/* Navigasi bawah (HP) */
.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
.bottomnav a { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.bottomnav a.active { color: var(--brand); }
.bottomnav svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .bottomnav { display: none; } .page { padding-bottom: 40px; } }

/* Ikon */
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Kartu */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow);
}
.card-hover { transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-accent { border-top: 4px solid var(--accent); }
.card-link { color: inherit; text-decoration: none; display: block; }

/* Statistik */
.stat { padding: 16px; }
.stat-num { font-size: 1.9rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat-label { color: var(--muted); font-size: .82rem; font-weight: 600; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.mini-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px; text-align: center; }
.mini-stats strong { display: block; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.mini-stats span { font-size: .72rem; color: var(--muted); font-weight: 600; }
.meter { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.meter > i { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .8s var(--ease); }

/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; 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 .12s var(--ease), filter .15s, background-color .2s, box-shadow .2s;
}
.btn:hover { filter: brightness(1.07); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-busy { opacity: .6; pointer-events: none; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .88rem; border-radius: 10px; }
.btn-lg { min-height: 56px; padding: 14px 24px; font-size: 1.08rem; border-radius: 16px; }
.btn-block { width: 100%; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-soft { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.btn-icon { min-height: 40px; width: 40px; padding: 0; border-radius: 12px; background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn-icon:hover { background: var(--surface-2); }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }

/* Formulir */
.field { margin-bottom: 16px; }
label, .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 4px; }
input[type=text], input[type=search], input[type=date], input[type=number], input[type=tel], input[type=email], select, textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit;
  transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
input[type=color] { width: 56px; height: 46px; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); }
.error { color: var(--err); font-size: .85rem; margin-top: 4px; }
.is-invalid { border-color: var(--err) !important; }
.code-input {
  text-align: center; text-transform: uppercase; letter-spacing: .4em; font-size: 1.6rem !important;
  font-weight: 800; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 64px !important;
}

/* Peringatan & lencana */
.alert { padding: 12px 16px; border-radius: 12px; margin-bottom: 16px; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--err-bg); color: var(--err); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: .75rem; font-weight: 700; background: var(--surface-2); color: var(--muted); white-space: nowrap;
}
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.live { background: var(--err-bg); color: var(--err); }
.badge.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.code-chip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 800; letter-spacing: .18em; font-size: 1.15rem; padding: 6px 12px; border-radius: 10px; background: var(--surface-2); }
.st { display: inline-grid; place-items: center; min-width: 34px; height: 26px; padding: 0 6px; border-radius: 8px; font-size: .75rem; font-weight: 800; color: #fff; }
.st-M { background: var(--s-m); }
.st-DP { background: var(--s-dp); }
.st-BM { background: var(--s-bm); }
.st-BT { background: var(--s-bt); }
.st-none { background: var(--surface-2); color: var(--muted); }

/* Tabel */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Daftar */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-2); color: var(--muted); font-weight: 800; font-size: .85rem;
}
.avatar.on { background: var(--ok-bg); color: var(--ok); }

/* Stepper segmen */
.stepper { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.stepper li + li { margin-top: 8px; }
.step {
  width: 100%; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); font: inherit; cursor: pointer; transition: border-color .2s, background-color .2s, transform .12s var(--ease);
}
.step:hover { border-color: var(--brand); }
.step:active { transform: scale(.99); }
.step-num { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; background: var(--surface-2); color: var(--muted); transition: background-color .2s, color .2s; }
.step-title { font-weight: 700; }
.step-meta { font-size: .78rem; color: var(--muted); }
.step.done .step-num { background: var(--brand-soft); color: var(--brand); }
.step.active { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.step.active .step-num { background: var(--brand); color: var(--brand-ink); }

/* Sakelar */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.toggle {
  position: relative; width: 58px; height: 34px; border-radius: 99px; border: 0; cursor: pointer; flex: none;
  background: var(--line); transition: background-color .25s var(--ease);
}
.toggle::after {
  content: ""; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .25s var(--ease);
}
.toggle[aria-pressed="true"] { background: var(--ok); }
.toggle[aria-pressed="true"]::after { transform: translateX(24px); }

/* Pilihan status observasi (segmented) */
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  margin: 0; display: grid; place-items: center; min-height: 44px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); font-weight: 800; font-size: .9rem;
  transition: background-color .15s, color .15s, border-color .15s, transform .1s;
}
.seg label:active { transform: scale(.96); }
.seg input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.seg input[value=M]:checked + label { background: var(--s-m); border-color: var(--s-m); color: #fff; }
.seg input[value=DP]:checked + label { background: var(--s-dp); border-color: var(--s-dp); color: #fff; }
.seg input[value=BM]:checked + label { background: var(--s-bm); border-color: var(--s-bm); color: #fff; }
.seg input[value=BT]:checked + label { background: var(--s-bt); border-color: var(--s-bt); color: #fff; }
.obs-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.obs-item:last-child { border-bottom: 0; }
.obs-item textarea { min-height: 46px; margin-top: 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .8rem; color: var(--muted); }
.sticky-bar {
  position: sticky; bottom: 0; z-index: 20; margin-top: 16px; padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* Beranda guru */
.hero {
  border-radius: 22px; padding: 22px; color: #fff; position: relative; overflow: hidden;
  background: var(--accent);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255, 255, 255, .1);
}
.hero h1 { color: #fff; margin: 0; }
.hero .muted { color: rgba(255, 255, 255, .82); }
.now-card .eyebrow { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.now-title { font-size: 1.4rem; font-weight: 800; margin: 4px 0 8px; }
.attend-btn { position: relative; overflow: hidden; }
.attend-done {
  display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 16px;
  background: var(--ok-bg); color: var(--ok); font-weight: 700;
}
.attend-done .check-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--ok); color: var(--ok-bg); display: grid; place-items: center; flex: none; }
.pop-in { animation: popIn .45s var(--ease) both; }
.fade-in { animation: fadeIn .35s var(--ease) both; }
.swap { animation: swapIn .45s var(--ease) both; }

/* Pilih nama */
.name-list { max-height: 52vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.name-opt { display: block; }
.name-opt input { position: absolute; opacity: 0; }
.name-opt span {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 6px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600;
  transition: border-color .15s, background-color .15s;
}
.name-opt input:checked + span { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.name-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }

/* QR */
.qr-box { background: #fff; border-radius: 16px; padding: 12px; display: inline-block; line-height: 0; box-shadow: var(--shadow); }
.qr-box svg { width: 100%; height: auto; display: block; }
.qr-sm { width: 160px; }
.qr-md { width: 220px; }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--surface-2); border-radius: 10px; color: transparent !important; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 70%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}
.sk-line { height: 14px; margin: 8px 0; }
.sk-title { height: 26px; width: 70%; margin: 8px 0 12px; }

/* Toast */
.toasts { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 900px) { .toasts { bottom: 24px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 600; font-size: .92rem;
  animation: toastIn .35s var(--ease) both;
}
.toast.err { background: var(--err); color: #fff; }
.toast.out { animation: toastOut .3s var(--ease) both; }

/* Konfeti */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 95; }

/* Mode Layar (proyektor) */
.screen-body { background: #0b1210; color: #eef4f1; overflow: hidden; }
.screen { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: clamp(16px, 3vw, 40px); gap: clamp(12px, 2vw, 28px); }
.screen-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.screen-school { display: flex; align-items: center; gap: 16px; }
.screen-school .brand-dot { width: clamp(44px, 4vw, 64px); height: clamp(44px, 4vw, 64px); font-size: clamp(1rem, 1.4vw, 1.4rem); border-radius: 16px; }
.screen-school h1 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2.6rem); margin: 0; }
.screen-school p { margin: 0; color: #9fb3ab; font-size: clamp(.9rem, 1.2vw, 1.2rem); }
.screen-main { display: grid; gap: clamp(16px, 3vw, 48px); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .screen-main { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.screen-eyebrow { color: var(--accent); font-weight: 800; letter-spacing: .12em; text-transform: uppercase; font-size: clamp(.9rem, 1.3vw, 1.3rem); }
.screen-title { font-size: clamp(2rem, 5vw, 5rem); font-weight: 900; line-height: 1.05; margin: .15em 0 .3em; color: #fff; letter-spacing: -.02em; }
.screen-goal { font-size: clamp(1rem, 1.8vw, 1.7rem); color: #c7d6d0; max-width: 40ch; }
.screen-qr { text-align: center; }
.screen-qr .qr-box { width: min(38vh, 100%); padding: clamp(10px, 1.4vw, 20px); border-radius: 24px; }
.screen-qr .hint { color: #9fb3ab; font-size: clamp(.9rem, 1.3vw, 1.3rem); margin-top: 12px; }
.screen-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 900; letter-spacing: .25em; font-size: clamp(1.4rem, 3vw, 3rem); color: #fff; }
.screen-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.screen-stat { display: flex; align-items: baseline; gap: 12px; }
.screen-stat strong { font-size: clamp(2.4rem, 5vw, 5rem); font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; line-height: 1; }
.screen-stat span { color: #9fb3ab; font-size: clamp(1rem, 1.5vw, 1.5rem); }
.timer { font-variant-numeric: tabular-nums; font-weight: 900; font-size: clamp(2rem, 4.4vw, 4.4rem); color: #fff; }
.timer.over { color: #f3a86a; }
.screen-tools { display: flex; gap: 8px; }
.screen-tools .btn-icon { color: #eef4f1; border-color: rgba(255, 255, 255, .2); }
.presence-closed { padding: 10px 16px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #c7d6d0; display: inline-block; }
.bump { animation: bump .5s var(--ease); }

/* Cetak */
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 12mm; }
  body { background: #fff; color: #000; font-size: 11px; }
  .topbar, .bottomnav, .no-print, .toasts { display: none !important; }
  .print-only { display: block; }
  .page { padding: 0; }
  .card, .table-wrap { box-shadow: none; border: 0; padding: 0; }
  th { background: #eee !important; color: #000; position: static; }
  th, td { padding: 4px 6px; border: 1px solid #999; }
  .st { color: #000 !important; background: none !important; border: 1px solid #999; }
  a { color: #000; text-decoration: none; }
}

/* ===== Fase 2A ===== */

/* Tab guru (bawah di HP, baris di atas konten di layar lebar) */
.guru-tabs {
  position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(5, 1fr);
  background: var(--surface);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px);
}
.guru-tabs a { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 2px; font-size: .68rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.guru-tabs a.active { color: var(--accent); }
.guru-tabs a.active::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.guru-tabs svg { width: 22px; height: 22px; }
.guru-tabs .dot { position: absolute; top: 6px; right: calc(50% - 16px); width: 8px; height: 8px; border-radius: 50%; background: var(--err); }
.has-tabs .page { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.has-tabs .toasts { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

/* Progres */
.progress-card { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; }
.ring { --p: 0; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); transition: --p .8s var(--ease); }
.ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--surface); }
.ring span { position: relative; font-weight: 900; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.steps-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.steps-mini li { display: flex; align-items: center; gap: 10px; font-size: .9rem; }
.steps-mini .tick { width: 22px; height: 22px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.steps-mini .tick svg { width: 14px; height: 14px; stroke-width: 3; }
.steps-mini li.done .tick { background: var(--ok); color: #fff; }
.steps-mini .info { margin-left: auto; color: var(--muted); font-size: .8rem; font-weight: 600; }
.steps-mini a { color: inherit; text-decoration: none; display: contents; }

/* Linimasa segmen */
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { position: relative; padding: 0 0 16px 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .node { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); }
.timeline li.done .node { background: var(--accent); border-color: var(--accent); }
.timeline li.done::before { background: var(--accent); }
.timeline li.now .node { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); animation: pulse 1.8s infinite; }
.timeline .t-title { font-weight: 700; }
.timeline li.now .t-title { color: var(--accent); }
.timeline .t-meta { font-size: .78rem; color: var(--muted); }

/* Grafik batang horizontal (satu seri; label teks memakai warna tinta) */
.bars { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.bar-row { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 3.6rem; gap: 10px; align-items: center; padding: 4px 0; }
.bar-label { font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 14px; border-radius: 0 4px 4px 0; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 0 4px 4px 0; transition: width .6s var(--ease); }
.bar-val { font-size: .82rem; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); }
.bars.narrow-label .bar-row { grid-template-columns: 1.6rem 1fr 3.6rem; }
.chart-meta { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.answers-wall { display: flex; flex-wrap: wrap; gap: 8px; }
.answers-wall span { padding: 6px 12px; border-radius: 12px; background: var(--surface-2); font-size: .9rem; animation: fadeIn .4s var(--ease) both; }
.avg-big { font-size: 2rem; font-weight: 900; font-variant-numeric: tabular-nums; }

/* Kuis (guru) */
.quiz-card { border: 2px solid var(--accent); }
.quiz-opts { display: grid; gap: 8px; }
.quiz-opts input { position: absolute; opacity: 0; }
.quiz-opts label { margin: 0; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; transition: border-color .15s, background-color .15s; }
.quiz-opts input:checked + label { border-color: var(--accent); background: var(--brand-soft); }
.quiz-opts input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.scale input { position: absolute; opacity: 0; }
.scale label { margin: 0; display: grid; place-items: center; min-height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 800; font-size: 1.1rem; cursor: pointer; transition: background-color .15s, color .15s, transform .1s; }
.scale label:active { transform: scale(.95); }
.scale input:checked + label { background: var(--accent); border-color: var(--accent); color: #fff; }
.scale input:focus-visible + label { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.scale-ends { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 4px; }

/* Materi */
.seg-block { scroll-margin-top: 80px; }
.seg-block.is-now > .card-head h2 { color: var(--accent); }
.seg-block.is-now { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent), var(--shadow); }
.mat { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.mat:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.mat-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.mat-head h3 { margin: 0; }
.read-btn[aria-pressed="true"] { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.prose { overflow-wrap: anywhere; }
.prose h1, .prose h2, .prose h3 { font-size: 1.05rem; margin: 1em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li + li { margin-top: 4px; }
.prose blockquote { margin: 0 0 1em; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; }
.prose code { font-size: .88em; background: var(--surface-2); padding: 1px 5px; border-radius: 6px; }
.prose img { border-radius: 10px; }
.mat-img { display: block; border-radius: 12px; border: 1px solid var(--line); margin-top: 8px; max-height: 420px; object-fit: contain; background: var(--surface-2); }
.pill-link { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: .9rem; text-decoration: none; }
.pill-link:hover { filter: brightness(.97); }

/* Tabel materi: gulir horizontal di dalam kartu (HP) */
.prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 12px; margin: 0 0 1em; }
.prose th, .prose td { min-width: 9rem; }
.prose input[type=checkbox] { width: 16px; height: 16px; margin: 0 6px 0 0; vertical-align: -2px; accent-color: var(--accent); }
.prose li:has(> input[type=checkbox]) { list-style: none; margin-left: -1.3em; }

/* Sematan materi */
.embed { position: relative; aspect-ratio: 16 / 9; margin-top: 10px; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Mode Layar: kuis */
.screen-quiz .bars { gap: 4px; }
.screen-quiz .bar-row { grid-template-columns: minmax(0, 14rem) 1fr 6rem; gap: 16px; }
.screen-quiz .bar-label { font-size: clamp(1rem, 1.8vw, 1.6rem); color: #eef4f1; white-space: normal; }
.screen-quiz .bar-track { height: clamp(18px, 2.6vw, 34px); background: rgba(255, 255, 255, .08); }
.screen-quiz .bar-val { font-size: clamp(1rem, 1.8vw, 1.6rem); color: #fff; }
.screen-quiz .answers-wall span { background: rgba(255, 255, 255, .1); color: #fff; font-size: clamp(1rem, 1.6vw, 1.5rem); }
.screen-quiz .chart-meta { color: #9fb3ab; font-size: clamp(.9rem, 1.3vw, 1.2rem); }
.screen-quiz-title { font-size: clamp(1.6rem, 3.6vw, 3.6rem); font-weight: 900; color: #fff; line-height: 1.1; margin: .1em 0 .6em; }

/* Pre/post per guru: dua batang per baris (pre abu-abu, post aksen) */
.pair-row { display: grid; grid-template-columns: minmax(0, 9rem) 1fr 5.4rem; gap: 10px; align-items: center; padding: 5px 0; }
.pair-tracks { display: grid; gap: 2px; }
.pair-tracks .bar-track { height: 10px; }
.bar-fill.pre { background: var(--s-bt); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; background: var(--accent); }
.swatch-pre { background: var(--s-bt); }

/* Indikator koneksi & antrean luring */
.net-pill { position: fixed; top: calc(var(--top-h) + 8px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 80; padding: 6px 14px; border-radius: 99px; font-size: .8rem; font-weight: 700; background: var(--warn-bg); color: var(--warn); box-shadow: var(--shadow); }
.net-pill.ok { background: var(--ok-bg); color: var(--ok); }

/* Asisten (chat) */
.chat { display: grid; gap: 10px; max-height: 60vh; overflow-y: auto; }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 88%; white-space: pre-wrap; overflow-wrap: anywhere; animation: fadeIn .3s var(--ease) both; }
.msg.bot { background: var(--surface-2); justify-self: start; border-bottom-left-radius: 4px; }
.msg.me { background: var(--brand); color: var(--brand-ink); justify-self: end; border-bottom-right-radius: 4px; }
.msg.err { background: var(--err-bg); color: var(--err); }

/* Generator AI */
.ai-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ai-item:last-child { border-bottom: 0; }
.ai-item ol { margin: 6px 0 0; padding-left: 1.2em; font-size: .88rem; }
.ai-item .benar { font-weight: 800; color: var(--ok); }

/* Laporan cetak */
.report h2 { font-size: 12.5pt; margin: 6mm 0 2mm; }
.report p, .report li { font-size: 11pt; text-align: justify; }
.report-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4mm; }
.report-photos figure { margin: 0; break-inside: avoid; }
.report-photos img { width: 100%; height: 55mm; object-fit: cover; border: 1px solid #ccc; }
.report-photos figcaption { font-size: 9pt; text-align: center; }

/* Pad tanda tangan */
.sign-pad { display: block; width: 100%; height: auto; aspect-ratio: 600 / 220; border: 2px dashed var(--line); border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; }

/* Galeri foto */
.photo-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.photo { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface-2); }
.photo figcaption { padding: 10px; }
.photo input[type=text] { min-height: 38px; padding: 6px 10px; font-size: .9rem; }
.photo.is-pick { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent), var(--shadow); }
.upload-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 4px; }
.upload-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }

/* Daftar hadir resmi (A4 tegak) */
.sheet-body { background: #e9eeeb; }
.sheet { width: 210mm; min-height: 297mm; margin: 16px auto; padding: 14mm 14mm 18mm; background: #fff; color: #111; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font: 11pt/1.4 "Times New Roman", Georgia, serif; }
.kop { text-align: center; border-bottom: 3px double #111; padding-bottom: 3mm; margin-bottom: 5mm; }
.kop-1 { font-weight: 700; font-size: 14pt; letter-spacing: .02em; }
.kop-n { font-size: 10.5pt; }
.sheet-title { text-align: center; font-size: 14pt; letter-spacing: .12em; margin: 0 0 4mm; }
.sheet-meta { width: auto; margin-bottom: 4mm; font-size: 11pt; }
.sheet-meta td { border: 0; padding: 1px 6px 1px 0; background: none; }
.sheet-table { font-size: 10.5pt; }
.sheet-table th, .sheet-table td { border: 1px solid #333; padding: 3px 5px; color: #111; background: none; position: static; text-transform: none; letter-spacing: 0; font-size: 10pt; vertical-align: middle; }
.sheet-table th { background: #eee; text-align: center; }
.sheet-table tr { break-inside: avoid; }
.ttd-cell { height: 13mm; text-align: center; }
.ttd-cell img { max-height: 12mm; max-width: 40mm; }
.sheet-sign { margin: 10mm 0 0 auto; width: 75mm; text-align: center; }
.sheet-sign .line { margin-top: 20mm; font-weight: 700; text-decoration: underline; }
@media screen and (max-width: 860px) { .sheet { zoom: .6; } }
@media print {
  @page lembar { size: A4 portrait; margin: 0; }
  .sheet-body { background: #fff; }
  .sheet { page: lembar; margin: 0; box-shadow: none; zoom: 1; }
}

/* Alat fasilitator (Mode Layar) */
.tools { position: fixed; inset: 3vh 3vw; z-index: 60; background: #121a17; color: #eef4f1; border: 1px solid rgba(255, 255, 255, .12); border-radius: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); padding: clamp(14px, 2vw, 28px); display: grid; grid-template-rows: auto 1fr; overflow: auto; animation: popIn .3s var(--ease) both; }
.tools-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; }
.tools-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tools-tabs button { border: 1px solid rgba(255, 255, 255, .18); background: transparent; color: #c7d6d0; border-radius: 99px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.tools-tabs button[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.tools .btn-icon { color: #eef4f1; border-color: rgba(255, 255, 255, .2); }
.tools .btn-ghost { color: #eef4f1; border-color: rgba(255, 255, 255, .25); }
.tools input[type=number], .tools select { background: #1b2622; color: #eef4f1; border-color: rgba(255, 255, 255, .2); }
.tools label { color: #c7d6d0; }
.tool[data-tool="roda"] { display: grid; gap: 24px; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .tool[data-tool="roda"] { grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); } }
.tool[hidden] { display: none !important; }
.wheel-wrap { position: relative; width: min(70vh, 100%); margin: 0 auto; aspect-ratio: 1; }
.wheel-wrap canvas { width: 100%; height: 100%; }
.wheel-pin { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 18px solid transparent; border-right: 18px solid transparent; border-top: 34px solid #fff; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .5)); }
.tool-side { display: grid; gap: 14px; }
.tool-result { font-size: clamp(1.6rem, 3.6vw, 3.4rem); font-weight: 900; line-height: 1.1; min-height: 2.4em; color: #fff; }
.groups { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 18px; }
.group { background: rgba(255, 255, 255, .06); border-radius: 16px; padding: 14px 16px; animation: fadeIn .35s var(--ease) both; }
.group h3 { margin: 0 0 8px; color: var(--accent); font-size: 1.2rem; }
.group ol { margin: 0; padding-left: 1.3em; font-size: clamp(1rem, 1.4vw, 1.3rem); }
.timer.big { font-size: clamp(5rem, 20vw, 16rem); text-align: center; line-height: 1; margin: 2vh 0 3vh; }
.timer.big.ring-now { animation: bump .5s var(--ease) 3; color: #f3a86a; }
.cloud { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 22px; padding: 24px 0; min-height: 40vh; }
.cloud span { font-weight: 800; line-height: 1; color: #fff; animation: fadeIn .4s var(--ease) both; }
.cloud span:nth-child(3n+1) { color: var(--accent); }
.cloud span:nth-child(3n+2) { color: #9fd9c8; }

/* Sertifikat (A4 landscape) */
.cert-body { background: #e9eeeb; }
.cert-sheet {
  width: 297mm; height: 210mm; margin: 16px auto; background: #fff; color: #18241f; position: relative; overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .15); font-family: Georgia, "Times New Roman", serif;
}
.cert-frame { position: absolute; inset: 10mm; border: 2.5mm solid var(--accent); border-radius: 4mm; }
.cert-frame::after { content: ""; position: absolute; inset: 2.5mm; border: .6mm solid color-mix(in srgb, var(--accent) 55%, #fff); border-radius: 2mm; }
.cert-corner { position: absolute; width: 70mm; height: 70mm; border-radius: 50%; background: color-mix(in srgb, var(--accent) 12%, #fff); }
.cert-inner { position: absolute; inset: 22mm 26mm; display: flex; flex-direction: column; align-items: center; text-align: center; }
.cert-org { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 11pt; letter-spacing: .25em; text-transform: uppercase; color: #4a5a54; }
.cert-title { font-size: 36pt; letter-spacing: .06em; margin: 6mm 0 2mm; color: var(--accent); font-weight: 700; }
.cert-no { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 10pt; color: #4a5a54; }
.cert-given { margin-top: 8mm; font-size: 13pt; color: #4a5a54; }
.cert-name { font-size: 30pt; font-weight: 700; margin: 3mm 0 1mm; padding: 0 10mm 2mm; border-bottom: .5mm solid #c9d3cf; }
.cert-school { font-size: 13pt; color: #3a4a44; }
.cert-text { font-size: 13pt; margin-top: 6mm; max-width: 200mm; line-height: 1.5; }
.cert-foot { margin-top: auto; width: 100%; display: flex; align-items: flex-end; justify-content: space-between; gap: 10mm; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.cert-qr { display: flex; align-items: flex-end; gap: 4mm; text-align: left; font-size: 8pt; color: #4a5a54; }
.cert-qr .qr { width: 26mm; height: 26mm; line-height: 0; }
.cert-qr .qr svg { width: 100%; height: 100%; }
.cert-sign { text-align: center; font-size: 11pt; min-width: 70mm; }
.cert-sign .line { border-top: .4mm solid #18241f; margin-top: 18mm; padding-top: 2mm; font-weight: 700; }
.cert-toolbar { max-width: 297mm; margin: 16px auto 0; padding: 0 16px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
@media screen and (max-width: 1150px) {
  .cert-sheet { zoom: .5; }
}
@media print {
  /* Halaman bernama: margin 0 hanya untuk piagam, rekap tetap 12mm. */
  @page piagam { size: A4 landscape; margin: 0; }
  .cert-body { background: #fff; }
  .cert-sheet { page: piagam; margin: 0; box-shadow: none; page-break-after: always; break-after: page; zoom: 1; }
  .cert-sheet:last-child { page-break-after: auto; break-after: auto; }
  .cert-toolbar { display: none; }
  .cert-sheet, .cert-frame, .cert-corner { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Animasi */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.85); } 60% { transform: scale(1.04); } 100% { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes swapIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
