/* ============================================================
   MyWebinar — Portal Materi Webinar
   Palet "Kopi Senja": krem hangat + coklat kopi. Kontras AA.
   ============================================================ */
:root {
  --cream: #FBF3E4;
  --cream-2: #F4E8D2;
  --coffee: #6F4E37;
  --coffee-dark: #3A2A1E;
  --coffee-mid: #8A6A4F;
  --accent: #C2410C;       /* terracotta untuk aksi */
  --accent-dark: #9A330A;
  --ink: #2A1E14;
  --muted: #6B5847;
  --line: #E2D4BC;
  --white: #FFFDF8;
  --good: #2F855A;
  --bad: #9A3412;
  --tip-bg: #FDF1D8; --tip-bar: #D99A2B;
  --ok-bg: #E3F3E8;  --ok-bar: #2F855A;
  --warn-bg: #FBE6DC; --warn-bar: #C2410C;
  --bad-bg: #FBE6DC; --good-bg: #E3F3E8;
  --shadow: 0 6px 24px rgba(58, 42, 30, 0.12);
  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 980px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-size: 17px;
}
code { background: var(--cream-2); padding: 1px 5px; border-radius: 5px; font-size: .9em; }

/* --- aksesibilitas --- */
.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;
}
.skip-link {
  position: absolute; left: -999px; top: 0; background: var(--coffee-dark); color: #fff;
  padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* --- app bar --- */
.appbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px clamp(14px, 4vw, 32px);
  background: var(--coffee-dark); color: var(--cream);
  position: sticky; top: 0; z-index: 30;
}
.brand { color: var(--cream); text-decoration: none; font-weight: 700; font-size: 1.15rem; white-space: nowrap; }
.brand-mark { color: var(--accent); }
.breadcrumb { flex: 1; font-size: .9rem; color: var(--cream-2); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; overflow: hidden; }
.crumb { color: var(--cream-2); text-decoration: none; }
.crumb:hover { text-decoration: underline; }
.crumb-current { color: #fff; font-weight: 600; }
.crumb-sep { opacity: .5; }
.help-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--cream-2);
  background: transparent; color: var(--cream); font-weight: 700; cursor: pointer; flex: none;
}
.help-btn:hover { background: rgba(255,255,255,.12); }

/* --- sample banner --- */
.sample-banner {
  background: #FDEBCB; color: #7A4B00; border-bottom: 1px solid #F0C786;
  padding: 8px clamp(14px, 4vw, 32px); font-size: .9rem;
}

/* --- layout --- */
.app { max-width: var(--maxw); margin: 0 auto; padding: clamp(20px, 4vw, 40px); min-height: 60vh; outline: none; }
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 24px; border-top: 1px solid var(--line); margin-top: 40px; }
.page-title { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 6px; color: var(--coffee-dark); }
.page-sub { color: var(--muted); margin: 0 0 24px; }

/* --- buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  background: var(--cream-2); color: var(--coffee-dark); transition: transform .05s, background .15s;
}
.btn:hover { background: var(--line); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--coffee); }
.btn-ghost:hover { background: var(--cream-2); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-block { width: 100%; }

/* --- landing --- */
.landing { text-align: center; padding: clamp(20px, 6vw, 60px) 0; }
.landing-title { font-size: clamp(2rem, 6vw, 3.2rem); color: var(--coffee-dark); margin: 0 0 12px; line-height: 1.1; }
.landing-subtitle { font-size: clamp(1.05rem, 2.5vw, 1.4rem); color: var(--coffee); margin: 0 auto 14px; max-width: 620px; }
.landing-intro { color: var(--muted); max-width: 560px; margin: 0 auto 28px; }
.howto { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 36px; }
.howto-step { background: var(--white); border: 1px solid var(--line); border-radius: 999px; padding: 8px 18px; color: var(--coffee-dark); box-shadow: var(--shadow); }
.howto-step b { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; text-align: center; line-height: 22px; margin-right: 6px; font-size: .85rem; }

/* --- packages --- */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.pkg-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
  transition: transform .12s, border-color .12s;
}
.pkg-card:hover { transform: translateY(-3px); border-color: var(--coffee-mid); }
.pkg-card--rec { border-color: var(--accent); border-width: 2px; }
.pkg-star { position: absolute; top: -12px; right: 16px; background: var(--accent); color: #fff; border-radius: 999px; width: 30px; height: 30px; display: grid; place-items: center; box-shadow: var(--shadow); }
.pkg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pkg-title { font-size: 1.4rem; margin: 0; color: var(--coffee-dark); }
.pkg-badge { background: var(--cream-2); color: var(--coffee); font-size: .72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; letter-spacing: .03em; }
.pkg-price { font-size: 1.5rem; font-weight: 800; color: var(--accent); }
.pkg-tagline { font-style: italic; color: var(--coffee-mid); margin: 0; }
.pkg-desc { color: var(--muted); font-size: .95rem; margin: 4px 0; }
.pkg-list-label { margin: 6px 0 2px; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--coffee); }
.pkg-list { list-style: none; margin: 0 0 4px; padding: 0; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.pkg-list li { position: relative; padding-left: 24px; font-size: .9rem; line-height: 1.4; color: var(--ink); }
.pkg-list li::before { content: "✓"; position: absolute; left: 0; top: -1px; color: var(--accent); font-weight: 800; }
.pkg-meta { font-size: .85rem; color: var(--coffee); font-weight: 600; }

/* --- materials --- */
.mat-header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.pkg-price-inline { font-size: 1.3rem; font-weight: 800; color: var(--accent); }
.mat-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.mat-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
}
.mat-info { display: flex; gap: 14px; align-items: flex-start; flex: 1; min-width: 220px; }
.mat-index { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--coffee-dark); color: var(--cream); display: grid; place-items: center; font-weight: 700; }
.mat-title { margin: 0 0 3px; font-size: 1.15rem; color: var(--coffee-dark); }
.mat-desc { margin: 0 0 5px; color: var(--muted); font-size: .92rem; }
.mat-meta { font-size: .82rem; color: var(--coffee); font-weight: 600; }
.mat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { margin-top: 10px; }
.back-link a { color: var(--coffee); }

/* --- upsell --- */
.upsell { background: linear-gradient(135deg, var(--coffee-dark), var(--coffee)); color: var(--cream); border-radius: var(--radius); padding: 26px; margin: 8px 0 20px; box-shadow: var(--shadow); }
.upsell-title { margin: 0 0 8px; font-size: 1.35rem; color: #fff; }
.upsell-body { margin: 0 0 18px; color: var(--cream-2); }
.upsell .btn-primary { background: var(--accent); }

/* ===== viewer = player gaya video (YouTube-like) ===== */
.viewer { outline: none; }
.player { width: 100%; margin: 0 auto; }

/* "layar video" 16:9 */
.vstage {
  position: relative; width: 100%; aspect-ratio: 16 / 9; max-height: 78vh;
  background: #241a12; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; user-select: none;
}
.player.hide-ui { cursor: none; }

/* isi slide mengisi penuh layar video */
.slide-stage {
  position: absolute; inset: 0; background: var(--cream);
  display: flex; align-items: center; justify-content: center;
  padding: clamp(20px, 4vw, 54px) clamp(20px, 5vw, 64px) clamp(56px, 8vw, 84px);
  overflow: hidden;
}
.slide-anim { width: 100%; animation: slideIn .5s cubic-bezier(.2,.75,.2,1) both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

.slide-img { width: 100%; height: 100%; object-fit: contain; }
.slide-html { width: 100%; }
.slide-html h2 { font-size: clamp(1.5rem, 4.2vw, 2.7rem); color: var(--coffee-dark); margin: 0 0 .5em; line-height: 1.15; animation: riseIn .55s ease both .05s; }
.slide-html h3 { font-size: clamp(1.2rem, 3.2vw, 1.9rem); color: var(--coffee); margin: 0 0 .4em; }
.slide-html ul, .slide-html ol { font-size: clamp(1.05rem, 2.5vw, 1.55rem); margin: 0; padding-left: 1.4em; }
.slide-html li { margin: .32em 0; animation: riseIn .5s ease both; }
.slide-html li:nth-child(1) { animation-delay: .14s; }
.slide-html li:nth-child(2) { animation-delay: .24s; }
.slide-html li:nth-child(3) { animation-delay: .34s; }
.slide-html li:nth-child(4) { animation-delay: .44s; }
.slide-html li:nth-child(5) { animation-delay: .54s; }
.slide-html p { font-size: clamp(1rem, 2.4vw, 1.4rem); }
.slide-html .slide-kicker { color: var(--accent); font-weight: 700; font-style: italic; margin-top: .6em; animation: riseIn .6s ease both .5s; }
.slide-html .slide-flow { font-size: clamp(1.1rem, 3vw, 1.7rem); font-weight: 700; color: var(--coffee-dark); text-align: center; background: var(--cream-2); padding: .5em; border-radius: 10px; }
.demo-embed { width: 100%; aspect-ratio: 16 / 9; max-height: 62vh; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.demo-embed iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.slide-placeholder { text-align: center; color: var(--coffee-mid); }
.slide-placeholder h2 { font-size: clamp(1.4rem, 4vw, 2.2rem); color: var(--coffee-dark); }

/* bar atas (judul + posisi) */
.player-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 4;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; color: #fff; font-size: .92rem;
  background: linear-gradient(to bottom, rgba(20,12,6,.6), rgba(20,12,6,0));
  transition: opacity .25s; pointer-events: none;
}
.pt-title { font-weight: 700; }
.pt-pos { opacity: .9; }

/* tombol putar besar di tengah */
.center-play {
  position: absolute; inset: 0; margin: auto; z-index: 5;
  width: 88px; height: 88px; border: none; background: transparent; cursor: pointer;
  display: grid; place-items: center; transition: opacity .2s, transform .2s;
}
.cp-ring { width: 88px; height: 88px; border-radius: 50%; background: rgba(36,26,18,.72); display: grid; place-items: center; box-shadow: 0 6px 24px rgba(0,0,0,.35); transition: transform .15s, background .15s; }
.center-play:hover .cp-ring { transform: scale(1.06); background: var(--accent); }
.cp-icon { color: #fff; font-size: 2rem; margin-left: 5px; }
.center-play.cp-off { display: none; }
.player[data-mode="playing"] .center-play { opacity: 0; transform: scale(.7); pointer-events: none; }

/* caption gaya subtitle */
.vcaption {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%); z-index: 4;
  max-width: 86%; text-align: center; padding: 6px 14px; border-radius: 8px;
  background: rgba(20,12,6,.82); color: #fff; font-size: clamp(1rem, 2.3vw, 1.35rem); line-height: 1.4;
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.vcaption.show { opacity: 1; }
.cap-line { display: inline; }

/* bar kontrol bawah */
.vcontrols {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 0 10px 8px; color: #fff;
  background: linear-gradient(to top, rgba(20,12,6,.78), rgba(20,12,6,0));
  transition: opacity .25s;
}
.player.hide-ui .vcontrols, .player.hide-ui .player-top { opacity: 0; pointer-events: none; }

/* timeline / chapter scrubber */
.timeline { display: flex; gap: 3px; padding: 10px 4px 8px; }
.seg { flex: 1; height: 6px; min-width: 4px; border: none; padding: 0; border-radius: 3px; background: rgba(255,255,255,.28); cursor: pointer; transition: background .15s, transform .15s; }
.seg:hover { transform: scaleY(1.5); background: rgba(255,255,255,.55); }
.seg-done { background: rgba(255,255,255,.6); }
.seg-now { background: var(--accent); }

.vbar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 2px; }
.vbar-left, .vbar-right { display: flex; align-items: center; gap: 4px; }
.vbtn { background: transparent; border: none; color: #fff; cursor: pointer; font-size: 1.1rem; line-height: 1; padding: 8px; border-radius: 8px; min-width: 38px; }
.vbtn:hover:not(:disabled) { background: rgba(255,255,255,.18); }
.vbtn:disabled { opacity: .4; cursor: not-allowed; }
.vbtn-lg { font-size: 1.25rem; }
.vbtn-txt { font-size: .82rem; font-weight: 800; letter-spacing: .03em; min-width: 0; padding: 7px 9px; opacity: .75; }
.vbtn-txt.on { opacity: 1; color: #FFD9B0; background: rgba(255,255,255,.12); }
.vcounter { font-size: .85rem; opacity: .92; margin-left: 4px; font-variant-numeric: tabular-nums; }
.voice-chip { background: rgba(255,255,255,.15); color: #fff; border-radius: 999px; padding: 2px 9px; font-size: .78rem; font-weight: 600; }
.vsel-wrap { display: inline-flex; align-items: center; gap: 4px; }
.vsel-wrap .vsel-ico { font-size: .85rem; opacity: .8; }
.vsel { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: 5px 6px; font-size: .8rem; font-weight: 700; font-family: inherit; cursor: pointer; }
.vsel:hover { background: rgba(255,255,255,.2); }
.vsel option { color: #1a1a1a; }
/* dialog ElevenLabs (atur key + generate) */
.el-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(20,14,8,.55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.el-card { position: relative; background: var(--white); color: var(--ink); width: min(440px, 100%); border-radius: 16px; padding: 24px; box-shadow: 0 24px 60px rgba(0,0,0,.35); }
.el-card .el-title { margin: 0 0 10px; font-size: 1.2rem; }
.el-x { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 1.05rem; cursor: pointer; color: var(--muted); }
.el-note { font-size: .82rem; color: var(--muted); background: var(--cream-2); border-radius: 10px; padding: 9px 11px; margin: 0 0 14px; line-height: 1.45; }
.el-err { font-size: .85rem; color: #B91C1C; background: #FEE2E2; border: 1px solid #FCA5A5; border-radius: 10px; padding: 9px 11px; margin: 0 0 12px; }
.el-field { display: block; margin-bottom: 12px; }
.el-field span { display: block; font-size: .82rem; font-weight: 700; margin-bottom: 4px; color: var(--ink); }
.el-field input { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font-size: .95rem; font-family: inherit; background: var(--cream); color: var(--ink); }
.el-actions { display: flex; gap: 8px; margin: 6px 0 4px; flex-wrap: wrap; }
.el-actions .btn { flex: 1; min-width: 140px; }
.el-status { font-size: .82rem; color: var(--muted); margin: 10px 0 0; min-height: 1.2em; line-height: 1.45; }

/* fullscreen */
.player.is-fs { width: 100vw; height: 100vh; display: flex; align-items: center; background: #000; }
.player.is-fs .vstage { aspect-ratio: auto; width: 100%; height: 100%; max-height: none; border-radius: 0; box-shadow: none; }
.player:fullscreen { width: 100vw; height: 100vh; display: flex; align-items: center; background: #000; }
.player:fullscreen .vstage { aspect-ratio: auto; width: 100%; height: 100%; max-height: none; border-radius: 0; }

.viewer-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 14px; }
.viewer-hint { color: var(--muted); font-size: .82rem; margin-left: auto; }

/* ===================== SISTEM LAYOUT SLIDE (sl-*) ===================== */
.slide-stage:has(.sl-wrap) { padding: 0; align-items: stretch; }
.sl-wrap { width: 100%; min-height: 100%; display: flex; flex-direction: column; justify-content: center; gap: .55em;
  padding: clamp(22px,4vw,52px) clamp(24px,5vw,68px) clamp(62px,8vw,84px); text-align: left; }
.sl-kicker { font-size: clamp(.78rem,1.5vw,1rem); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); }
.sl-title { font-size: clamp(1.5rem,4vw,2.6rem); line-height: 1.12; color: var(--coffee-dark); margin: .05em 0 .15em; }
.sl-title::after { content: ""; display: block; width: 64px; height: 4px; border-radius: 2px; background: var(--accent); margin-top: .4em; }
.sl-title--xl { font-size: clamp(1.9rem,5.5vw,3.4rem); }
.sl-sub { font-size: clamp(1.05rem,2.4vw,1.5rem); color: var(--coffee); margin: 0; }
.sl-footer { font-size: clamp(.95rem,2vw,1.2rem); color: var(--muted); margin: .35em 0 0; }
.sl-center { text-align: center; }

.ico { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-chip { width: 2.4em; height: 2.4em; border-radius: 12px; background: var(--cream-2); color: var(--accent-dark); display: grid; place-items: center; flex: none; }
.icon-chip .ico { width: 1.3em; height: 1.3em; }

/* fragmen reveal (sinkron narasi) */
.frag { opacity: .16; filter: saturate(.4); transform: translateY(6px); transition: opacity .4s ease, transform .4s ease, filter .4s ease; }
.frag.is-on { opacity: 1; filter: none; transform: none; }
.frag.is-active .pt-card, .frag.is-active .step-card, .frag.is-active .cmp-card, .frag.is-active .recap-item { box-shadow: 0 0 0 2px var(--accent); }

/* cover */
.sl-wrap.sl--cover { background: radial-gradient(120% 120% at 82% 8%, var(--cream-2), var(--cream)); }
.cover-ico { color: var(--accent); width: clamp(2.6rem,7vw,4.6rem); height: clamp(2.6rem,7vw,4.6rem); margin-bottom: .1em; }
.cover-ico .ico { width: 100%; height: 100%; }

/* divider (panel gelap) */
.sl-wrap.sl--divider { background: var(--coffee-dark); align-items: flex-start; }
.sl-wrap.sl--divider .sl-title { color: #fff; }
.sl-wrap.sl--divider .sl-sub { color: var(--cream-2); }
.div-num { font-size: clamp(4rem,16vw,9rem); font-weight: 900; color: rgba(255,255,255,.10); line-height: .8; display: block; margin-bottom: -.1em; }

/* points */
.sl-points { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.pt-card { display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 12px; padding: 14px 16px; }
.pt-text { font-size: clamp(1.02rem,2.2vw,1.4rem); font-weight: 700; color: var(--coffee-dark); line-height: 1.25; }
.pt-sub { font-size: clamp(.88rem,1.7vw,1.05rem); color: var(--muted); margin-top: 3px; }

/* split */
.sl-split { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; align-items: center; }
.split-left { display: flex; flex-direction: column; gap: 10px; }
.split-right { display: flex; align-items: center; justify-content: center; }
.visual-ico { width: clamp(130px,55%,230px); aspect-ratio: 1; color: var(--accent); background: linear-gradient(135deg, var(--cream-2), #EFE0C6); border-radius: 26px; display: grid; place-items: center; box-shadow: var(--shadow); }
.visual-ico .ico { width: 52%; height: 52%; }

/* stat */
.sl-wrap.sl--stat { align-items: center; text-align: center; }
.sl-wrap.sl--stat .sl-title { align-self: center; }
.sl-wrap.sl--stat .sl-title::after { margin-left: auto; margin-right: auto; }
.sl-stats { display: flex; flex-wrap: wrap; gap: 18px 34px; justify-content: center; align-items: flex-end; margin: .15em 0; }
.stat-card { display: flex; flex-direction: column; align-items: center; }
.stat-val { font-size: clamp(3rem,11vw,6.4rem); font-weight: 900; line-height: .88; color: var(--accent); }
.stat-unit { font-size: clamp(1rem,2.3vw,1.4rem); font-weight: 700; color: var(--coffee); text-transform: uppercase; letter-spacing: .04em; }

/* quote */
.sl-wrap.sl--quote { align-items: center; }
.sl-wrap.sl--quote:has(.sl-quote--invert) { background: var(--coffee-dark); }
.sl-quote { text-align: center; max-width: 20ch; margin: auto; }
.sl-quote blockquote { font-size: clamp(1.6rem,4.4vw,3rem); font-weight: 800; line-height: 1.2; color: var(--coffee-dark); margin: 0; }
.sl-quote blockquote::before { content: "“"; color: var(--accent); }
.sl-quote blockquote::after { content: "”"; color: var(--accent); }
.sl-quote--invert blockquote { color: #fff; }
.sl-quote cite { display: block; margin-top: .6em; font-size: 1rem; color: var(--muted); font-style: normal; }
.sl-quote--invert cite { color: var(--cream-2); }

/* steps */
.sl-steps { display: flex; flex-wrap: wrap; gap: 12px; align-items: stretch; margin-top: .3em; }
.step-card { flex: 1 1 150px; min-width: 140px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px; padding: 16px 14px 14px; position: relative; }
.step-num { position: absolute; top: -13px; left: 14px; width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .85rem; }
.step-card .icon-chip { margin: 2px 0 6px; }
.step-title { font-weight: 800; color: var(--coffee-dark); font-size: clamp(1rem,2.1vw,1.3rem); }
.step-desc { color: var(--muted); font-size: clamp(.85rem,1.7vw,1.02rem); margin-top: 3px; }

/* compare */
.sl-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; align-items: stretch; margin-top: .2em; }
.cmp-card { background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.cmp--bad { background: var(--bad-bg); border-color: #E9B8A6; }
.cmp--good { background: var(--good-bg); border-color: #A9D6BB; }
.cmp-label { font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--coffee-dark); font-size: clamp(1rem,2vw,1.2rem); }
.cmp--bad .cmp-label { color: var(--bad); }
.cmp--good .cmp-label { color: var(--good); }
.cmp-text { margin: 0; color: var(--ink); font-size: clamp(.95rem,1.9vw,1.12rem); }

/* ===== KOTAK PROMPT (try-it, bisa disalin) ===== */
.promptcard { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--white); }
.promptcard-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--coffee-dark); color: var(--cream); padding: 8px 12px; }
.promptcard-dots::before { content: "● ● ●"; letter-spacing: 2px; color: rgba(255,255,255,.4); font-size: .55rem; }
.promptcard-tag { font-size: .82rem; font-weight: 600; flex: 1; min-width: 120px; }
.promptcard-copy { display: inline-flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; border: none; border-radius: 8px; padding: 6px 13px; font: inherit; font-weight: 800; font-size: .85rem; cursor: pointer; }
.promptcard-copy:hover { background: var(--accent-dark); }
.promptcard-copy.copied { background: var(--good); }
.promptcard-copy .ico { width: 1.05em; height: 1.05em; }
/* Viewport = area kode yang bisa scroll, plus pita "scan" yang DIAM di tengah
   (efek karaoke) saat narasi berjalan; kode lewat di bawahnya. Tepi atas/bawah
   di-fade supaya jelas masih ada bagian lain di luar pandangan. */
.promptcard-viewport { position: relative; }
.promptcard-scroll {
  max-height: 46vh; overflow-y: auto; scroll-behavior: smooth; background: var(--cream);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 26px, #000 calc(100% - 26px), transparent 100%);
}
.promptcard-scroll::-webkit-scrollbar { width: 9px; }
.promptcard-scroll::-webkit-scrollbar-thumb { background: rgba(120,90,60,.35); border-radius: 8px; }
.promptcard-body { margin: 0; padding: 16px 18px; font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: clamp(.95rem,1.9vw,1.15rem); line-height: 1.55; color: var(--ink); white-space: pre-wrap; word-break: break-word; background: transparent; }
.promptcard-body mark { background: #FCE3C4; color: var(--accent-dark); padding: 0 3px; border-radius: 4px; font-weight: 700; }
.promptcard-scan { position: absolute; left: 0; right: 0; top: 42%; height: 2.2em; pointer-events: none; opacity: 0; transition: opacity .35s ease; background: linear-gradient(90deg, transparent, rgba(213,138,72,.16) 14%, rgba(213,138,72,.16) 86%, transparent); border-top: 1px solid rgba(213,138,72,.45); border-bottom: 1px solid rgba(213,138,72,.45); }
.player[data-mode="playing"] .sl--prompt .promptcard-scan { opacity: 1; }
.player:fullscreen .promptcard-scroll, .player.is-fs .promptcard-scroll { max-height: 64vh; }
@media (prefers-reduced-motion: reduce) { .promptcard-scroll { scroll-behavior: auto; } .promptcard-scan { display: none; } }
.promptcard-hint { margin: 0; padding: 10px 16px; font-size: .9rem; color: var(--muted); background: var(--cream-2); border-top: 1px solid var(--line); }
.sl-wrap.sl--prompt { justify-content: center; }

/* embed / browser chrome */
.sl-embed { display: flex; justify-content: center; }
.browser { width: 100%; max-height: 60vh; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.browser-bar { display: flex; align-items: center; gap: 6px; background: var(--cream-2); padding: 8px 12px; border-bottom: 1px solid var(--line); }
.browser-bar > span { width: 11px; height: 11px; border-radius: 50%; background: #D9C4A6; flex: none; }
.browser-url { flex: 1; background: var(--white); border-radius: 6px; padding: 3px 10px; font-size: .8rem; color: var(--muted); margin-left: 8px; }
.browser-body { aspect-ratio: 16/10; }
.browser-body iframe, .browser-body img { width: 100%; height: 100%; border: 0; display: block; object-fit: cover; }
/* chrome-less embeds (html mock / screenshot) — size the bare element so it isn't tiny */
.sl-embed > iframe, .sl-embed > img { width: 100%; aspect-ratio: 16 / 9; max-height: 72vh; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); display: block; }
.sl-embed > img { object-fit: contain; background: var(--cream-2); }

/* callout / note */
.callout { display: flex; gap: 12px; align-items: flex-start; background: var(--tip-bg); border-left: 5px solid var(--tip-bar); border-radius: 10px; padding: 14px 16px; margin-top: .4em; }
.callout .ico { width: 1.4em; height: 1.4em; flex: none; color: var(--tip-bar); margin-top: 2px; }
.callout p { margin: 0; color: var(--ink); font-size: clamp(.95rem,2vw,1.15rem); }
.callout--ok { background: var(--ok-bg); border-color: var(--ok-bar); } .callout--ok .ico { color: var(--ok-bar); }
.callout--warn { background: var(--warn-bg); border-color: var(--warn-bar); } .callout--warn .ico { color: var(--warn-bar); }
.callout--lg p { font-size: clamp(1.1rem,2.6vw,1.5rem); font-weight: 600; }

/* recap */
.sl-recap { display: flex; flex-direction: column; gap: 10px; }
.recap-item { display: flex; align-items: center; gap: 12px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; font-size: clamp(1rem,2.1vw,1.3rem); font-weight: 600; color: var(--coffee-dark); }
.recap-item .ico { width: 1.3em; height: 1.3em; color: var(--good); flex: none; }
.sl-ribbon { text-align: center; background: var(--coffee-dark); color: var(--cream); border-radius: 999px; padding: 8px 18px; font-weight: 700; align-self: center; }

/* --- skrip page --- */
.skrip-toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.skrip-body { display: flex; flex-direction: column; gap: 14px; }
.skrip-block { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.skrip-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.skrip-block-head h3 { margin: 0; font-size: 1.05rem; color: var(--coffee-dark); }
.skrip-block p { margin: 0; color: var(--ink); }
.skrip-full { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; line-height: 1.7; }

/* --- drawer / bottom-sheet --- */
.drawer-overlay { position: fixed; inset: 0; background: rgba(42,30,20,.45); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: min(420px, 88vw); z-index: 50;
  background: var(--cream); box-shadow: -6px 0 24px rgba(0,0,0,.2); display: flex; flex-direction: column;
  animation: slideIn .18s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); background: var(--coffee-dark); color: var(--cream); }
.drawer-close { background: transparent; border: none; color: var(--cream); font-size: 1.2rem; cursor: pointer; }
.drawer-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.drawer-block { text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; }
.drawer-block:hover { border-color: var(--coffee-mid); }
.drawer-active { border-color: var(--accent); border-width: 2px; background: #FFF7EC; }
.drawer-block-title { font-weight: 700; color: var(--coffee-dark); font-size: .9rem; }
.drawer-block-text { color: var(--muted); font-size: .85rem; }
.drawer-foot { padding: 12px; border-top: 1px solid var(--line); }

/* --- help modal --- */
.help-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 50; width: min(540px, 92vw); max-height: 86vh; overflow-y: auto; background: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow); }
.help-body { padding: 18px 20px; }
.help-body h3 { color: var(--coffee-dark); margin: 14px 0 6px; font-size: 1rem; }
.help-body ul { margin: 0; padding-left: 1.2em; }

/* --- empty / boot --- */
.empty, .boot-error { text-align: center; padding: 60px 20px; }
.empty-icon { font-size: 3rem; color: var(--coffee-mid); }
.empty-title { color: var(--coffee-dark); margin: 10px 0; }
.empty-detail { color: var(--muted); margin-bottom: 22px; }
.empty-inline { background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); padding: 20px; color: var(--muted); text-align: center; }
.boot-error h1 { color: var(--accent-dark); }
.boot-error p { color: var(--muted); max-width: 560px; margin: 0 auto 20px; }

/* --- responsive (mobile) --- */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .breadcrumb { display: none; }
  .vstage { max-height: none; }
  .vcaption { bottom: 64px; font-size: 1rem; max-width: 92%; }
  .center-play { width: 70px; height: 70px; }
  .cp-ring { width: 70px; height: 70px; }
  .vbtn { min-width: 34px; padding: 7px; font-size: 1rem; }
  .vcounter { display: none; }
  .player-top { font-size: .82rem; }
  .viewer-hint { display: none; }
  /* layout slide menumpuk di mobile */
  .sl-wrap { padding: 16px 16px 60px; gap: .45em; }
  .sl-split { grid-template-columns: 1fr; gap: 14px; }
  .split-right { display: none; }
  .sl-split:has(.promptcard) .split-right { display: block; }
  .sl-steps { flex-direction: column; }
  .step-num { top: 12px; }
  .mat-row { flex-direction: column; align-items: stretch; }
  .mat-actions .btn { flex: 1; }
  /* drawer jadi bottom-sheet */
  .drawer { top: auto; bottom: 0; right: 0; width: 100%; height: 72vh; border-radius: var(--radius) var(--radius) 0 0; animation: sheetUp .2s ease; }
  @keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ============ Auth & akun (signin) ============ */
.account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.acct-email { font-size: .82rem; opacity: .8; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-link { font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--accent, #6ea8fe); }
.acct-link:hover { text-decoration: underline; }
.acct-logout { font: inherit; font-size: .82rem; cursor: pointer; background: transparent; border: 1px solid currentColor; color: inherit; opacity: .8; border-radius: 8px; padding: 4px 10px; }
.acct-logout:hover { opacity: 1; }

.auth-page { min-height: 60vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 380px; background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.auth-title { margin: 0 0 6px; font-size: 1.5rem; color: var(--coffee-dark); }
.auth-sub { margin: 0 0 18px; color: var(--muted); font-size: .9rem; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--coffee-dark); }
.auth-field input { font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); }
.auth-field input::placeholder { color: var(--coffee-mid); }
.auth-field input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.auth-msg { margin: 0; font-size: .85rem; padding: 8px 10px; border-radius: 8px; }
.auth-msg--err { color: var(--bad); background: var(--warn-bg); border: 1px solid var(--warn-bar); }
.auth-msg--ok { color: var(--good); background: var(--ok-bg); border: 1px solid var(--ok-bar); }
.auth-link { display: block; margin: 14px auto 0; background: none; border: none; color: var(--accent); font: inherit; font-size: .85rem; cursor: pointer; text-decoration: underline; }
.btn-block { width: 100%; }

/* ============ Panel admin ============ */
.admin { max-width: 760px; margin: 0 auto; }
.admin-form { display: flex; flex-direction: column; gap: 14px; background: var(--card, #161a22); border: 1px solid var(--border, #2a2f3a); border-radius: var(--radius, 14px); padding: 20px; margin-bottom: 28px; }
.admin-pkgs { border: 1px solid var(--border, #2a2f3a); border-radius: 10px; padding: 10px 14px; display: flex; gap: 18px; flex-wrap: wrap; }
.admin-pkgs legend { padding: 0 6px; font-size: .8rem; opacity: .7; }
.admin-pkg { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; text-transform: capitalize; }
.admin-expiry { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; font-size: .9rem; }
.admin-days input { width: 80px; font: inherit; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--border, #2a2f3a); background: var(--bg, #0e1117); color: inherit; }
.admin-h2 { font-size: 1.1rem; margin: 8px 0 12px; }
.grant-list { display: flex; flex-direction: column; gap: 8px; }
.grant-row { display: grid; grid-template-columns: 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px 14px; border: 1px solid var(--border, #2a2f3a); border-radius: 10px; font-size: .88rem; }
.grant-email { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.grant-pkg { text-transform: capitalize; opacity: .85; }
.grant-exp { opacity: .7; font-size: .82rem; }
.btn-sm { padding: 4px 10px; font-size: .8rem; }
@media (max-width: 560px) {
  .grant-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .acct-email { display: none; }
}
