/* Layar cerita, pemilih cerita, Buku Hikayat (paket F Tahap 3). Variabel tema dari style.css. */

/* ---------- Overlay umum ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  padding: 16px; background: rgba(6, 5, 12, .72); backdrop-filter: blur(2px);
}
.overlay > .panel {
  width: min(760px, 100%); max-height: calc(100dvh - 32px); overflow: auto; padding: 20px 22px;
  display: flex; flex-direction: column; gap: 12px; animation: pop-in .22s ease-out;
}
.overlay > .panel > .btn:last-child { align-self: center; min-width: 140px; }
/* Isi panel tidak boleh menyusut (panel yang menggulir, bukan anaknya yang gepeng). */
.overlay > .panel > * { flex-shrink: 0; }
@keyframes pop-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.overlay h2 { color: var(--gold-hi); text-align: center; }

/* ---------- Lencana jenis akhir ---------- */
.end-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-variant: small-caps;
  letter-spacing: .06em; border: 1px solid currentColor; white-space: nowrap;
}
.end-badge.end-key-gemilang { color: #f6d77a; background: rgba(246, 215, 122, .12); }
.end-badge.end-key-pahit { color: #e8b48a; background: rgba(232, 180, 138, .12); }
.end-badge.end-key-kelam { color: #c79cf0; background: rgba(120, 70, 170, .2); }
.end-badge.end-key-rahasia { color: #8fe0d0; background: rgba(80, 190, 170, .14); }

/* ---------- Buku Hikayat ---------- */
.btn-book { margin-top: 2px; }
.book-list { display: flex; flex-direction: column; gap: 10px; }
.book-empty { color: var(--muted); text-align: center; padding: 18px 8px; font-style: italic; }
.book-story { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: rgba(0, 0, 0, .22); }
.book-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.book-name { color: var(--gold-hi); font-size: 1.08rem; overflow-wrap: anywhere; }
.book-count { color: var(--muted); font-size: .85rem; }
.book-bar { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .08); margin: 6px 0 8px; overflow: hidden; }
.book-bar::after { content: ""; display: block; height: 100%; width: var(--pct, 0%); background: linear-gradient(90deg, #b8892f, #f1d68e); }
.book-ends { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.book-end { display: flex; gap: 8px; align-items: center; min-width: 0; }
.book-end-title { overflow-wrap: anywhere; }

/* ---------- Pilihan cerita di lobby ---------- */
.story-pick {
  display: flex; align-items: center; gap: 14px; padding: 12px 16px;
  background:
    radial-gradient(400px 120px at 0% 0%, rgba(214, 178, 94, .12), transparent 70%),
    linear-gradient(180deg, var(--panel-a), var(--panel-b));
}
.sp-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.sp-label { color: var(--muted); font-size: .75rem; font-variant: small-caps; letter-spacing: .08em; }
.sp-title { color: var(--gold-hi); font-size: 1.2rem; overflow-wrap: anywhere; }
.sp-desc { color: var(--ink); font-size: .9rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-meta, .picker-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: .8rem; }
.sp-host { color: var(--muted); font-size: .85rem; max-width: 40%; text-align: right; }
.sp-change { flex: none; min-height: 44px; }

/* ---------- Pemilih cerita ---------- */
.picker-panel { width: min(900px, 100%); }
.picker-special { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
/* Tab kitab membungkus (tanpa gulir samping, tanpa tab terpotong). Layar lebar: nama penuh; sempit: nomor. */
.picker-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.picker-tab {
  flex: none; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(214, 178, 94, .3);
  background: transparent; color: var(--muted); cursor: pointer; font-variant: small-caps; white-space: nowrap;
}
.picker-tab .pt-short { display: none; }
.picker-tab:hover { color: var(--ink); border-color: var(--gold); }
.picker-tab.is-on { color: #1a1208; border-color: #f6e3a8; background: linear-gradient(#f1d68e, #b8892f); font-weight: 700; }
.picker-tab.is-empty { opacity: .6; }
@media (max-width: 1100px) {
  .picker-tab { min-width: 44px; min-height: 44px; padding: 4px 10px; justify-content: center; }
  .picker-tab .pt-short { display: inline; }
  .picker-tab .pt-full { display: none; }
}
.picker-book { flex: 1 0 100%; color: var(--gold); font-size: 1rem; }
/* Kartu menyesuaikan: kitab dengan satu cerita memakai lebar penuh (flex, bukan grid berkolom tetap). */
.picker-list { display: flex; flex-wrap: wrap; gap: 10px; min-height: 120px; align-content: flex-start; }
.picker-list > .picker-card { flex: 1 1 280px; }
.picker-empty { flex: 1 0 100%; color: var(--muted); text-align: center; padding: 24px 0; font-style: italic; }
.picker-card {
  display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0, 0, 0, .25); min-width: 0;
}
.picker-card.is-sel { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 16px rgba(214, 178, 94, .25); }
.picker-card.is-random { background: radial-gradient(300px 100px at 100% 0%, rgba(150, 110, 220, .2), transparent), rgba(0, 0, 0, .25); }
.picker-card.is-arena { background: radial-gradient(300px 100px at 100% 0%, rgba(200, 90, 70, .18), transparent), rgba(0, 0, 0, .25); }
.picker-name { color: var(--gold-hi); font-size: 1.05rem; overflow-wrap: anywhere; }
.picker-desc { font-size: .88rem; line-height: 1.4; color: var(--ink); }
.picker-card .btn { align-self: flex-start; margin-top: auto; min-height: 40px; }

/* ---------- Layar cerita: kerangka ---------- */
.screen-story {
  position: fixed; inset: var(--topbar) 0 0 0; overflow: hidden; color: var(--ink);
  --party-w: 248px; --gap: 10px; --hud-h: 54px; --panel-h: min(46vh, 360px);
  background: #0b0a12;
}
.st-stage { position: absolute; inset: 0; overflow: hidden; }
.st-scene { position: absolute; inset: 0; }
.st-scene > canvas, .st-scene > div:not(.st-fb-hill) { max-width: none; }
/* Latar cadangan (bila js/scenes.js tidak tersedia) */
.st-scene.is-fallback { background: linear-gradient(180deg, var(--sky-a, #4a5a80), var(--sky-b, #10121c)); }
.st-fb-hill {
  position: absolute; left: -10%; right: -10%; border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  transform: translate3d(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -6px), 0);
}
.st-fb-hill.is-far { bottom: 22%; height: 40%; background: rgba(0, 0, 0, .28); }
.st-fb-hill.is-near { bottom: -6%; height: 42%; background: rgba(0, 0, 0, .55); transform: translate3d(calc(var(--px, 0) * -30px), calc(var(--py, 0) * -10px), 0); }
/* Penggelap bawah supaya panel teks terbaca di atas latar terang */
.st-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 30%, transparent 50%, rgba(0, 0, 0, .45) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .35) 0, transparent 18%, transparent 52%, rgba(0, 0, 0, .55) 100%);
}
.st-stage.is-camp::before {
  content: ""; position: absolute; left: 50%; bottom: calc(var(--panel-h) + 4px); width: 340px; height: 220px;
  transform: translateX(-50%); pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 160, 60, .55), rgba(255, 110, 30, .18) 40%, transparent 70%);
  animation: fire-flicker 1.6s ease-in-out infinite alternate;
}
@keyframes fire-flicker { from { opacity: .75; transform: translateX(-50%) scale(.96); } to { opacity: 1; transform: translateX(-50%) scale(1.04); } }

/* ---------- Potret tokoh ---------- */
.st-cast { position: absolute; left: 0; right: var(--party-w); bottom: calc(var(--panel-h) + var(--gap) * 2); top: calc(var(--hud-h) + 10px); pointer-events: none; z-index: 2; }
.st-portrait {
  position: absolute; bottom: 0; margin: 0; width: min(24vh, 210px); display: flex; flex-direction: column; align-items: center;
  filter: brightness(.62) saturate(.8); transition: filter .35s, transform .35s; transform-origin: 50% 100%;
}
.st-portrait.side-l.slot-0 { left: 4%; }
.st-portrait.side-l.slot-1 { left: calc(4% + min(17vh, 150px)); z-index: -1; transform: scale(.9); }
.st-portrait.side-r.slot-0 { right: 4%; }
.st-portrait.side-r.slot-1 { right: calc(4% + min(17vh, 150px)); z-index: -1; transform: scale(.9); }
.st-portrait.is-speaking { filter: none; transform: translateY(-6px) scale(1.04); z-index: 1; }
.st-portrait-art {
  width: 100%; aspect-ratio: 5 / 6; border-radius: 14px 14px 6px 6px; overflow: hidden;
  border: 2px solid rgba(214, 178, 94, .6); background: radial-gradient(circle at 50% 35%, #3a3050, #12101c);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .6);
}
.st-portrait.is-speaking .st-portrait-art { border-color: var(--gold-hi); box-shadow: 0 0 22px rgba(241, 214, 142, .45), 0 10px 28px rgba(0, 0, 0, .6); }
.st-portrait-art > svg { width: 100%; height: 100%; display: block; }
.st-portrait-name {
  margin-top: -12px; padding: 3px 12px; border-radius: 999px; font-size: .85rem; max-width: 110%;
  background: linear-gradient(180deg, var(--panel-a), var(--panel-b)); border: 1px solid var(--gold);
  color: var(--gold-hi); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative;
}
.st-portrait.is-speaking.mood-marah .st-portrait-art, .st-portrait.is-speaking.mood-teriak .st-portrait-art { animation: shake .4s ease-in-out 2; }
.st-portrait.is-speaking.mood-takut .st-portrait-art { animation: shiver .18s linear 6; }
.st-portrait.is-speaking.mood-sedih { filter: saturate(.7); }
.st-portrait.is-speaking.mood-bisik { filter: brightness(.85); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes shiver { 50% { transform: translateX(1.5px); } }

/* ---------- HUD ---------- */
.st-hud {
  position: absolute; top: var(--gap); left: var(--gap); right: calc(var(--party-w) + var(--gap) * 2); height: var(--hud-h);
  display: flex; align-items: center; gap: 12px; padding: 4px 12px 4px 6px; z-index: 5; border-radius: 12px;
  background: linear-gradient(180deg, rgba(30, 24, 16, .86), rgba(18, 14, 10, .86)); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.st-fate { position: relative; flex: none; display: flex; align-items: center; gap: 4px; }
.st-fate svg { width: 46px; height: 46px; display: block; }
.st-fate-seg { fill: none; stroke: rgba(255, 255, 255, .14); stroke-width: 4; stroke-linecap: round; }
.st-fate-seg.is-on { stroke: #c79cf0; filter: drop-shadow(0 0 3px rgba(199, 156, 240, .8)); }
.st-fate.is-warn .st-fate-seg.is-on { stroke: #e0715f; filter: drop-shadow(0 0 4px rgba(224, 113, 95, .9)); }
.st-fate-num { fill: var(--ink); font: 700 13px var(--font); }
.st-fate-label { color: var(--muted); font-size: .72rem; font-variant: small-caps; }
.st-fate.is-warn svg { animation: fate-warn 1.4s ease-in-out infinite; }
.st-fate.is-pulse svg { animation: fate-pulse .7s ease-out; }
@keyframes fate-warn { 50% { transform: scale(1.08); } }
@keyframes fate-pulse { 0% { transform: scale(1.35); filter: brightness(1.8); } 100% { transform: scale(1); } }
.st-hud-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.st-title { color: var(--gold-hi); font-variant: small-caps; letter-spacing: .05em; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-step { color: var(--muted); font-size: .8rem; }
.st-gold { flex: none; color: #f6d77a; font-weight: 700; white-space: nowrap; }
.st-goal-btn { flex: none; min-height: 40px; }
.st-party-toggle { display: none; }

/* ---------- Panel party (kanan) ---------- */
.st-party {
  position: absolute; top: var(--gap); right: var(--gap); bottom: var(--gap); width: var(--party-w); z-index: 5;
  overflow-y: auto; overflow-x: hidden; padding: 10px; border-radius: 12px; display: flex; flex-direction: column; gap: 10px;
  background: linear-gradient(180deg, rgba(36, 29, 20, .92), rgba(18, 14, 10, .94)); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45); scrollbar-width: thin;
}
.st-side-title { color: var(--gold-hi); font-size: 1rem; }
.st-side-sub { margin: 0 0 4px; color: var(--gold); font-variant: small-caps; font-size: .9rem; letter-spacing: .05em; }
.st-heroes { display: flex; flex-direction: column; gap: 6px; }
.st-hero {
  display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 8px; align-items: center; padding: 6px;
  border-radius: 9px; background: rgba(0, 0, 0, .25); border-left: 3px solid var(--pc, var(--line));
}
.st-hero.is-mine { background: rgba(214, 178, 94, .08); }
.st-hero-pic, .st-cand-pic { width: 42px; height: 42px; flex: none; display: block; }
.st-hero-pic > svg, .st-cand-pic > svg, .st-line-pic > svg, .st-opt-cpic > svg { width: 100%; height: 100%; display: block; }
.st-pic-empty { display: block; width: 100%; height: 100%; border-radius: 50%; background: #2a2233; }
.st-hero-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-hero-top { display: flex; justify-content: space-between; gap: 4px; align-items: baseline; }
.st-hero-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .92rem; }
.st-hero-lv { color: var(--gold); font-size: .75rem; flex: none; }
.st-hero-role { color: var(--muted); font-size: .74rem; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.st-hero-own { display: flex; align-items: center; gap: 5px; font-size: .72rem; color: var(--muted); min-width: 0; }
.st-hero-own span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--pc, #a99c80); box-shadow: 0 0 6px var(--pc, transparent); display: inline-block; }
.st-hero-own .st-dot, .st-voter .st-dot { background: var(--pc); }
.st-hp-num, .st-hud-mid, .st-item-name, .st-hero-role { font-size-adjust: none; }
.st-hp { position: relative; height: 14px; border-radius: 7px; background: rgba(0, 0, 0, .5); overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); }
.st-hp-fill { position: absolute; inset: 0 auto 0 0; width: var(--hp, 100%); background: linear-gradient(180deg, #8fdc6a, #4a9a34); transition: width .4s; }
.st-hp.is-mid .st-hp-fill { background: linear-gradient(180deg, #f0cf5a, #b08a1e); }
.st-hp.is-low .st-hp-fill { background: linear-gradient(180deg, #ef7a62, #a83a26); }
.st-hp-num { position: absolute; inset: 0; text-align: center; font-size: .68rem; line-height: 13px; font-weight: 700; text-shadow: 0 1px 2px #000; }
.st-vars { margin: 0; display: flex; flex-direction: column; gap: 3px; }
.st-var { display: flex; justify-content: space-between; gap: 6px; font-size: .82rem; }
.st-var dt { color: var(--muted); }
.st-var dd { margin: 0; color: var(--gold-hi); font-weight: 700; }
.st-bag { display: flex; flex-direction: column; gap: 5px; }
.st-bag-empty { color: var(--muted); font-size: .8rem; font-style: italic; }
.st-item { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 6px; align-items: center; font-size: .82rem; }
.st-item-ico { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; background: rgba(214, 178, 94, .1); border: 1px solid rgba(214, 178, 94, .3); }
.st-item-ico > svg { width: 22px; height: 22px; display: block; }
.st-item-glyph { color: var(--gold); }
.st-item-txt { min-width: 0; display: flex; flex-direction: column; }
.st-item-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.25; }
.st-item-desc { color: var(--muted); font-size: .7rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.st-bag .st-item-desc { display: none; }
.st-item-n { color: var(--gold-hi); }
.st-use { min-height: 30px; padding: 2px 8px; font-size: .78rem; }
.st-use-menu { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border-radius: 8px; background: rgba(0, 0, 0, .35); }
.st-use-q { width: 100%; font-size: .76rem; color: var(--muted); }
.st-use-hero { min-height: 32px; padding: 2px 8px; font-size: .78rem; }

/* ---------- Panel teks + aksi (bawah) ---------- */
.st-panel {
  position: absolute; left: var(--gap); right: calc(var(--party-w) + var(--gap) * 2); bottom: var(--gap); height: var(--panel-h);
  z-index: 4; display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 12px; border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(40, 31, 20, .93), rgba(20, 15, 10, .95)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .015) 0 1px, transparent 1px 4px);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(214, 178, 94, .14), inset 0 0 50px rgba(0, 0, 0, .4), 0 12px 32px rgba(0, 0, 0, .55);
}
.st-panel::before {
  content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .7;
}
.st-panel.is-holding .st-act { pointer-events: none; opacity: .7; }
/* Fase baca: panel setinggi isinya supaya latar lebih banyak terlihat */
.st-panel[data-phase="read"], .st-panel[data-phase="battle"] { height: auto; min-height: 168px; max-height: var(--panel-h); }
.st-panel[data-phase="read"] .st-lines, .st-panel[data-phase="battle"] .st-lines { flex: 1 1 auto; }
/* Fase dengan banyak tombol: teks di kiri, aksi di kanan */
.st-panel[data-phase="vote"], .st-panel[data-phase="check"], .st-panel[data-phase="camp"],
.st-panel[data-phase="shop"], .st-panel[data-phase="talent"] {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px;
}
.st-lines {
  flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; cursor: pointer;
  scrollbar-width: thin; padding-right: 4px;
}
.st-act { flex: none; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.st-panel.no-lines[data-phase] { grid-template-columns: minmax(0, 1fr); }
.st-panel.no-lines .st-lines { display: none; }
.st-panel.no-lines .st-talent-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Tombol Lanjut selalu terlihat walau daftar aksi (toko) panjang */
/* Bilah pijakan padat (bukan gradien) supaya tidak tampak menimpa kartu yang tergulir di bawahnya. */
.st-act .st-next-row {
  position: sticky; bottom: 0; z-index: 2; padding: 8px 0 2px; margin-top: 4px;
  background: #1b150e; border-top: 1px solid var(--line); box-shadow: 0 -6px 10px rgba(0, 0, 0, .35);
}
.st-panel[data-phase="vote"] .st-act, .st-panel[data-phase="check"] .st-act, .st-panel[data-phase="camp"] .st-act,
.st-panel[data-phase="shop"] .st-act, .st-panel[data-phase="talent"] .st-act { overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }

/* Baris yang belum tampil tetap memesan tempat (panel tidak melompat saat teks mengetik). */
.st-line { display: flex; visibility: hidden; gap: 10px; align-items: flex-start; }
.st-line.is-shown { visibility: visible; animation: line-in .3s ease-out; }
.st-text { display: grid; }
.st-ghost, .st-typed { grid-area: 1 / 1; }
.st-ghost { visibility: hidden; }
@keyframes line-in { from { opacity: 0; transform: translateY(4px); } }
.st-line-pic { width: 38px; height: 38px; flex: none; }
.st-line-body { min-width: 0; flex: 1; }
.st-who { display: inline-block; color: var(--gold-hi); font-variant: small-caps; letter-spacing: .05em; font-weight: 700; font-size: .92rem; margin-bottom: 1px; }
.st-line.who-hero .st-who { color: var(--pc, var(--gold-hi)); }
.st-text { font-size: 1.08rem; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; min-height: 1.5em; }
.st-line.who-narator .st-text { font-style: italic; color: #e6dcc4; }
.st-line.who-cast .st-text, .st-line.who-hero .st-text { padding-left: 10px; border-left: 2px solid rgba(214, 178, 94, .35); }
.st-line.is-active.who-cast .st-text, .st-line.is-active.who-hero .st-text { border-left-color: var(--gold-hi); }
.st-line.mood-bisik .st-text { font-size: .98rem; opacity: .85; }
.st-line.mood-teriak .st-text { font-weight: 700; letter-spacing: .01em; }
.st-note {
  align-self: flex-start; padding: 3px 12px; border-radius: 999px; font-size: .85rem; color: var(--gold-hi);
  background: rgba(214, 178, 94, .12); border: 1px solid rgba(214, 178, 94, .45);
}
.st-note.is-tie { color: #ffe27a; border-color: #ffe27a; }

.st-act-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-act-title { color: var(--gold-hi); font-size: 1.05rem; }
.st-hint { color: var(--muted); font-size: .85rem; }
.st-next-row { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.st-next { min-height: 44px; min-width: 150px; font-size: 1.05rem; }
.st-next.is-early { filter: saturate(.75); }
.st-ready { display: flex; align-items: center; gap: 5px; margin-right: auto; }
.st-ready-dot { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--pc); background: transparent; transition: background .2s; }
.st-ready-dot.is-ready { background: var(--pc); box-shadow: 0 0 6px var(--pc); }
.st-ready-n { color: var(--muted); font-size: .82rem; margin-left: 4px; }

/* Timer cincin */
.st-timer { position: relative; width: 40px; height: 40px; flex: none; }
.st-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.st-timer-bg { fill: rgba(0, 0, 0, .35); stroke: rgba(255, 255, 255, .12); stroke-width: 3; }
.st-timer-fg { fill: none; stroke: var(--gold); stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.st-timer.is-low .st-timer-fg { stroke: var(--danger); }
.st-timer-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: .82rem; font-weight: 700; }

/* Voting */
.st-opts { display: flex; flex-direction: column; gap: 8px; }
.st-opt {
  position: relative; display: flex; flex-direction: column; gap: 5px; text-align: left; padding: 10px 14px; min-height: 48px;
  border-radius: 10px; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  background: linear-gradient(180deg, rgba(64, 50, 30, .9), rgba(32, 25, 16, .92));
  transition: transform .15s, border-color .15s, box-shadow .15s; animation: card-in .35s ease-out both;
}
.st-opt:nth-child(2) { animation-delay: .06s; } .st-opt:nth-child(3) { animation-delay: .12s; }
.st-opt:nth-child(4) { animation-delay: .18s; } .st-opt:nth-child(5) { animation-delay: .24s; }
@keyframes card-in { from { opacity: 0; transform: translateX(14px); } }
.st-opt:hover:not(:disabled) { border-color: var(--gold); transform: translateX(-3px); box-shadow: 0 0 14px rgba(214, 178, 94, .2); }
.st-opt.is-mine { border-color: var(--gold-hi); box-shadow: 0 0 0 1px var(--gold-hi), 0 0 18px rgba(241, 214, 142, .3); }
.st-opt.is-mine::before { content: "✦"; position: absolute; right: 10px; top: 8px; color: var(--gold-hi); }
.st-opt.is-locked { opacity: .55; }
.st-opt:disabled { cursor: default; }
.st-opt.is-mine:disabled { opacity: 1; }
.st-opt-label { font-size: 1rem; line-height: 1.35; padding-right: 16px; overflow-wrap: anywhere; }
.st-opt-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.st-opt-class, .st-cost, .st-lock, .st-chip, .st-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: .75rem;
  border: 1px solid rgba(214, 178, 94, .4); color: var(--gold-hi); background: rgba(214, 178, 94, .08);
}
.st-opt-cpic { width: 18px; height: 18px; display: inline-block; }
.st-lock { color: #f0a08f; border-color: rgba(224, 113, 95, .5); background: rgba(224, 113, 95, .1); }
.st-voters { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.st-voter { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; color: var(--muted); max-width: 120px; }
.st-voter span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Uji */
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.st-chip.is-heal { color: #a5e88a; border-color: rgba(127, 207, 106, .5); background: rgba(127, 207, 106, .1); }
.st-chip.is-ok { color: #a5e88a; border-color: rgba(127, 207, 106, .5); }
.st-chip.is-bad { color: #f0a08f; border-color: rgba(224, 113, 95, .5); }
.st-cands { display: flex; flex-direction: column; gap: 6px; }
.st-cand {
  display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px;
  border-radius: 9px; background: rgba(0, 0, 0, .25); border: 1px solid transparent; border-left: 3px solid var(--pc, var(--line));
}
.st-cand.is-attempt { border-color: var(--gold); background: rgba(214, 178, 94, .12); }
.st-cand.is-help { border-color: rgba(127, 207, 106, .55); }
.st-cand-info { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.st-cand-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.st-cand-mod { color: var(--gold); font-size: .85rem; }
.st-tag.is-help { color: #a5e88a; border-color: rgba(127, 207, 106, .5); }
.st-cand-acts { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.st-cand-acts .btn { min-height: 36px; padding: 4px 10px; font-size: .85rem; }
.st-check-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.st-check-foot .st-hint { margin-right: auto; }
.st-roll-btn { min-height: 46px; min-width: 170px; font-size: 1.08rem; animation: roll-glow 1.6s ease-in-out infinite; }
@keyframes roll-glow { 50% { box-shadow: 0 0 26px rgba(241, 214, 142, .7), inset 0 1px 0 rgba(255, 255, 255, .5); } }
.st-roll {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: rgba(0, 0, 0, .3); animation: pop-in .3s ease-out;
}
.st-roll-die {
  width: 44px; height: 44px; flex: none; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.2rem;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  background: linear-gradient(160deg, #f6e9c6, #c9a14a); color: #2a1a08;
}
.st-roll-calc { flex: 1; min-width: 0; color: var(--muted); }
.st-roll-o { font-weight: 700; font-size: 1.1rem; font-variant: small-caps; letter-spacing: .05em; }
.st-roll.is-success .st-roll-o { color: #a5e88a; }
.st-roll.is-crit .st-roll-o { color: #ffe27a; text-shadow: 0 0 10px rgba(255, 226, 122, .7); }
.st-roll.is-crit .st-roll-die { background: linear-gradient(160deg, #fffbe0, #ffd84a); }
.st-roll.is-fail .st-roll-o, .st-roll.is-fumble .st-roll-o { color: #f0a08f; }
.st-roll.is-fumble .st-roll-die { background: linear-gradient(160deg, #f0c4b8, #c0503f); color: #fff; }

/* Kemah & bakat */
.st-camp, .st-talent-rows { display: flex; flex-direction: column; gap: 8px; }
.st-camp-row, .st-talent-row {
  display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 10px;
  background: rgba(0, 0, 0, .22); border-left: 3px solid var(--pc, var(--line));
}
.st-camp-row:not(.is-mine), .st-talent-row:not(.is-mine) { flex-direction: row; align-items: center; justify-content: space-between; }
.st-camp-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-camp-who .st-cand-pic { width: 32px; height: 32px; }
.st-camp-state { color: var(--muted); font-size: .82rem; white-space: nowrap; }
.st-camp-state.is-done { color: #a5e88a; }
.st-camp-choices, .st-talent-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.st-talent-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.st-camp-choice, .st-talent-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 6px; min-height: 64px; text-align: center;
  border-radius: 9px; border: 1px solid var(--line); color: var(--ink); cursor: pointer;
  background: linear-gradient(180deg, rgba(64, 50, 30, .9), rgba(32, 25, 16, .92)); transition: border-color .15s, box-shadow .15s;
}
.st-talent-card { align-items: flex-start; text-align: left; }
.st-camp-choice:hover:not(:disabled), .st-talent-card:hover:not(:disabled) { border-color: var(--gold); }
.st-camp-choice.is-mine, .st-talent-card.is-mine { border-color: var(--gold-hi); box-shadow: 0 0 14px rgba(241, 214, 142, .3); }
.st-talent-card.is-mine:disabled { opacity: 1; }
.st-camp-ico { font-size: 1.2rem; color: var(--gold-hi); }
.st-camp-choice b, .st-talent-card b { color: var(--gold-hi); font-size: .9rem; }
.st-camp-choice small, .st-talent-card small { color: var(--muted); font-size: .72rem; line-height: 1.25; }
.st-camp-res { display: flex; flex-wrap: wrap; gap: 6px; }
.st-talent { display: flex; flex-direction: column; gap: 8px; }
.st-talent > .st-act-title { font-size: 1.2rem; text-align: center; animation: pop-in .4s ease-out; }

/* Toko */
.st-purse { color: #f6d77a; font-weight: 700; }
.st-shop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.st-shop-item {
  display: grid; grid-template-columns: 32px minmax(0, 1fr); grid-template-areas: "ico txt" "meta meta" "buy buy"; gap: 4px 8px;
  padding: 8px; border-radius: 10px; border: 1px solid var(--line); background: rgba(0, 0, 0, .25);
}
.st-shop-item .st-item-ico { grid-area: ico; width: 32px; height: 32px; }
.st-shop-item .st-item-txt { grid-area: txt; }
.st-shop-item.is-out { opacity: .55; }
.st-shop-meta { grid-area: meta; display: flex; justify-content: space-between; font-size: .8rem; }
.st-price { color: #f6d77a; }
.st-left { color: var(--muted); }
.st-buy { grid-area: buy; min-height: 36px; }

/* Tarung */
.st-battle-wait, .st-battle-res { text-align: center; font-size: 1.1rem; color: var(--gold-hi); padding: 6px 0; }
.st-battle-res.is-lose { color: #f0a08f; }

/* ---------- Akhir ---------- */
.st-end {
  position: absolute; top: calc(var(--hud-h) + var(--gap) * 2); left: var(--gap); right: calc(var(--party-w) + var(--gap) * 2); bottom: var(--gap);
  z-index: 6; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; scrollbar-width: thin;
}
.st-end-card { width: min(860px, 100%); padding: 22px 24px; display: flex; flex-direction: column; gap: 12px; animation: pop-in .5s ease-out; }
.st-end-card.end-key-gemilang { box-shadow: 0 0 0 1px rgba(246, 215, 122, .5), 0 0 40px rgba(246, 215, 122, .18), 0 12px 32px rgba(0, 0, 0, .5); }
.st-end-card.end-key-kelam { box-shadow: 0 0 0 1px rgba(199, 156, 240, .45), 0 0 40px rgba(120, 70, 170, .25), 0 12px 32px rgba(0, 0, 0, .5); }
.st-end-card.end-key-rahasia { box-shadow: 0 0 0 1px rgba(143, 224, 208, .45), 0 0 40px rgba(80, 190, 170, .2), 0 12px 32px rgba(0, 0, 0, .5); }
.st-end-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.st-end-title { color: var(--gold-hi); font-size: 1.9rem; overflow-wrap: anywhere; }
.st-end-slot { color: var(--muted); }
.st-end-lines { display: flex; flex-direction: column; gap: 6px; font-style: italic; color: #e6dcc4; line-height: 1.5; }
.st-end-sub { color: var(--gold); font-size: 1.05rem; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-top: 4px; }
.st-epis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-epi { display: flex; gap: 10px; align-items: flex-start; }
.st-epi b { color: var(--gold-hi); font-size: .92rem; display: block; }
.st-epi p { font-size: .9rem; line-height: 1.45; }
.st-goals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; perspective: 900px; }
.st-goal { min-width: 0; animation: goal-flip .7s ease-out both; animation-delay: var(--delay, 0ms); }
@keyframes goal-flip { from { opacity: 0; transform: rotateY(90deg); } to { opacity: 1; transform: none; } }
.st-goal-inner {
  height: 100%; display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 10px;
  background: rgba(0, 0, 0, .3); border: 1px solid var(--line); border-top: 3px solid var(--pc, var(--line));
}
.st-goal.is-ok .st-goal-inner { border-color: rgba(127, 207, 106, .5); border-top-color: var(--pc); }
.st-goal.is-fail .st-goal-inner { border-color: rgba(224, 113, 95, .45); border-top-color: var(--pc); }
.st-goal-top { display: flex; align-items: center; gap: 8px; }
.st-goal-top .st-cand-pic { width: 36px; height: 36px; }
.st-goal-who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-goal-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-goal-who small { color: var(--muted); font-size: .75rem; }
.st-goal-mark { font-size: 1.5rem; font-weight: 700; }
.st-goal.is-ok .st-goal-mark, .st-goal.is-ok .st-goal-state { color: #a5e88a; }
.st-goal.is-fail .st-goal-mark, .st-goal.is-fail .st-goal-state { color: #f0a08f; }
.st-goal-goal { font-size: .85rem; color: var(--ink); }
.st-goal-state { font-variant: small-caps; font-weight: 700; font-size: .85rem; }
.st-goal-text { font-size: .82rem; color: var(--muted); font-style: italic; }
.st-stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.st-stat { padding: 8px 10px; border-radius: 8px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.st-stat dt { color: var(--muted); font-size: .75rem; }
.st-stat dd { margin: 2px 0 0; color: var(--gold-hi); font-weight: 700; overflow-wrap: anywhere; }
.st-end-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; padding-top: 6px; }
.st-end-foot .btn { min-height: 44px; }
.st-end-foot .st-hint { width: 100%; text-align: center; }

/* ---------- Dialog tujuan rahasia ---------- */
.goal-panel { width: min(560px, 100%); }
.goal-item { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid var(--line); }
.goal-head { display: flex; align-items: center; gap: 10px; }
.goal-head b { color: var(--gold-hi); display: block; }
.goal-head small { color: var(--muted); }
.goal-brief { color: var(--ink); line-height: 1.45; font-style: italic; }
.goal-goal { color: var(--gold-hi); line-height: 1.45; padding-left: 10px; border-left: 2px solid var(--gold); }
.goal-secret { color: var(--muted); font-size: .8rem; text-align: center; }

/* ---------- Dadu & twist ---------- */
.st-dice { z-index: 30; }
.st-fx { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.st-stage.is-twist .st-scene.is-fallback { transition: filter 1.2s; filter: saturate(1.3) contrast(1.1) hue-rotate(-12deg); }
.st-stage.fx-invert .st-scene.is-fallback { filter: invert(.85) hue-rotate(180deg) saturate(1.3); }
.st-stage.fx-bleed::after {
  background:
    radial-gradient(ellipse at 50% 45%, transparent 35%, rgba(150, 10, 20, .65) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .35) 0, transparent 18%, transparent 52%, rgba(0, 0, 0, .55) 100%);
  animation: bleed-in 1.6s ease-out;
}
@keyframes bleed-in { from { opacity: 0; } }
.st-stage.fx-shatter { animation: stage-quake .6s ease-out; }
@keyframes stage-quake { 15% { transform: translate(-6px, 3px); } 35% { transform: translate(5px, -4px); } 55% { transform: translate(-3px, 2px); } 80% { transform: translate(2px, 0); } }
.st-shard {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .35), rgba(200, 220, 255, .08) 50%, rgba(255, 255, 255, .25));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6);
  animation: shard-fall 1.6s cubic-bezier(.5, 0, .9, .6) forwards; animation-delay: var(--delay, 0ms);
}
@keyframes shard-fall {
  0% { opacity: .95; transform: none; }
  25% { opacity: .9; transform: translate(calc(var(--dx) * .2), 4px) rotate(calc(var(--rot) * .2)); }
  100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) * 6)) rotate(var(--rot)); }
}

/* ---------- Tarung: bilah barang & Auto (tambahan F di layar tarung) ---------- */
.bt-items { display: flex; gap: 6px; flex: none; padding-left: 8px; border-left: 1px solid var(--line); }
.bt-item {
  position: relative; width: 46px; height: 46px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: var(--gold-hi);
  background: linear-gradient(180deg, rgba(64, 50, 30, .95), rgba(32, 25, 16, .95));
}
.bt-item > svg { width: 28px; height: 28px; }
.bt-item.is-sel { border-color: var(--gold-hi); box-shadow: 0 0 12px rgba(241, 214, 142, .5); }
.bt-item-n { position: absolute; right: 2px; bottom: 0; font-size: .7rem; font-weight: 700; text-shadow: 0 1px 2px #000; }
.bt-item-ico { font-size: 1.2rem; }
.bt-auto { min-height: 36px; padding: 2px 12px; font-size: .85rem; flex: none; }
.bt-auto.is-on { background: rgba(214, 178, 94, .22); border-color: var(--gold-hi); color: var(--gold-hi); }

/* ---------- Tablet ---------- */
@media (max-width: 1200px) {
  .screen-story { --party-w: 206px; }
  .st-hero { grid-template-columns: 34px minmax(0, 1fr); }
  .st-hero-pic { width: 34px; height: 34px; }
  .st-text { font-size: 1.02rem; }
}
@media (max-width: 1100px) {
  .st-panel[data-phase="vote"], .st-panel[data-phase="check"], .st-panel[data-phase="camp"],
  .st-panel[data-phase="shop"], .st-panel[data-phase="talent"] { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 12px; }
  .st-shop { grid-template-columns: minmax(0, 1fr); }
  .story-pick { flex-wrap: wrap; }
}
@media (max-width: 800px) and (min-height: 501px) {
  .screen-story { --party-w: 0px; }
  .st-party { left: auto; width: min(280px, 86vw); transform: translateX(calc(100% + 20px)); transition: transform .25s; z-index: 20; }
  .st-party.is-open { transform: none; }
  .st-party-toggle { display: inline-flex; flex: none; min-height: 40px; }
  .st-hud, .st-panel, .st-end { right: var(--gap); }
  .st-cast { right: 0; }
  .picker-list, .picker-special, .st-epis, .st-goals { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- HP miring / layar pendek ---------- */
@media (max-height: 500px) {
  .screen-story { --hud-h: 72px; --gap: 6px; --party-w: 0px; }
  .st-stage { right: 58%; }
  /* HUD dua baris: judul cerita utuh di baris atas, emas + tombol di baris bawah. */
  .st-hud {
    left: var(--gap); right: calc(58% + var(--gap)); height: auto; padding: 4px 6px 4px 4px;
    display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; gap: 2px 6px; align-items: center;
  }
  .st-fate { grid-row: 1 / 3; grid-column: 1; }
  .st-hud-mid { grid-row: 1; grid-column: 2 / 5; }
  .st-gold { grid-row: 2; grid-column: 2; font-size: .85rem; }
  .st-goal-btn { grid-row: 2; grid-column: 3; justify-self: end; }
  .st-party-toggle { grid-row: 2; grid-column: 4; display: inline-flex; }
  .st-fate svg { width: 38px; height: 38px; }
  .st-fate-label, .st-step { display: none; }
  .st-title { font-size: .86rem; white-space: normal; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .st-goal-btn, .st-party-toggle { min-height: 34px; padding: 2px 8px; font-size: .78rem; }
  /* Layar akhir menutup seluruh layar: HUD tidak boleh tembus. */
  .screen-story.is-end .st-hud, .screen-story.is-end .st-stage { visibility: hidden; }
  .screen-story.is-end .st-end { background: #120e0a; }
  .st-cast { right: 0; top: calc(var(--hud-h) + 8px); bottom: 6px; }
  .st-portrait { width: min(30vh, 120px); }
  .st-portrait.side-l.slot-1 { left: calc(4% + 70px); }
  .st-portrait.side-r.slot-1 { right: calc(4% + 70px); }
  .st-portrait-name { font-size: .72rem; }
  .st-stage.is-camp::before { bottom: 0; width: 200px; height: 140px; }
  .st-panel, .st-panel[data-phase] {
    display: flex; flex-direction: column; left: 42%; right: 0; top: 0; bottom: 0; height: auto; max-height: none; min-height: 0; border-radius: 0;
    padding: 8px 10px; gap: 6px; overflow-y: auto; border-width: 0 0 0 1px;
  }
  .st-panel::before { display: none; }
  .st-lines { flex: none; overflow: visible; gap: 6px; }
  .st-panel[data-phase] .st-act { overflow: visible; }
  .st-text { font-size: .95rem; line-height: 1.4; }
  .st-line-pic { width: 30px; height: 30px; }
  .st-next-row, .st-act .st-next-row { position: sticky; bottom: -8px; padding: 6px 0 8px; }
  .st-next, .st-roll-btn { min-height: 44px; }
  .st-opt { min-height: 44px; padding: 8px 10px; }
  .st-opt-label { font-size: .92rem; }
  .st-cand-acts .btn, .st-buy { min-height: 44px; }
  .st-camp-choice, .st-talent-card { min-height: 56px; padding: 6px 4px; }
  .st-camp-choice small { display: none; }
  .st-shop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .st-party {
    top: 0; bottom: 0; right: 0; width: min(300px, 70vw); border-radius: 0; z-index: 20;
    transform: translateX(calc(100% + 20px)); transition: transform .25s;
  }
  .st-party.is-open { transform: none; box-shadow: -10px 0 30px rgba(0, 0, 0, .6); }
  .st-use, .st-use-hero { min-height: 44px; }
  .st-end { top: 0; left: 0; right: 0; bottom: 0; }
  .st-end-card { padding: 14px; border-radius: 0; }
  .st-end-title { font-size: 1.4rem; }
  .st-epis, .st-goals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .story-pick { padding: 6px 10px; gap: 8px; }
  .sp-desc { -webkit-line-clamp: 1; font-size: .8rem; }
  .sp-title { font-size: 1rem; }
  .sp-meta { display: none; }
  .overlay > .panel { padding: 12px 14px; gap: 8px; max-height: calc(100dvh - 16px); }
  .overlay { padding: 8px; }
  .picker-tab { min-height: 44px; }
  .picker-card .btn, .overlay > .panel > .btn:last-child { min-height: 44px; }
}

/* ---------- Gerak dikurangi ---------- */
@media (prefers-reduced-motion: reduce) {
  .st-portrait, .st-portrait.is-speaking { transition: none; transform: none; }
  .st-fb-hill, .st-fb-hill.is-near { transform: none; }
  .st-shard { display: none; }
  .st-stage.fx-shatter, .st-fate.is-warn svg, .st-fate.is-pulse svg, .st-roll-btn, .st-goal, .st-stage.is-camp::before { animation: none; }
  .st-party { transition: none; }
}

/* ---------- Suara dialog ---------- */
.snd-note { margin: 0; font-size: .78rem; opacity: .75; }
.st-ai { margin: 2px 10px 0; font-size: .72rem; opacity: .7; text-align: right; }
.st-ai[hidden] { display: none; }
.st-line.has-voice { cursor: pointer; }
.st-line.has-voice .st-who::after { content: ' \266A'; opacity: .6; }
@media (max-height: 420px) { .sound-panel { max-height: calc(100vh - var(--topbar) - 8px); overflow-y: auto; } }
