/* MyBini dark-v3 — amandemen sesi 4 (26 Nov 2026).
   Home = palet Nila 50/30/20 (page #12182B / card #26304E / accent #E8C46A)
   di :root; picker palet dihapus atas permintaan Demmy. Halaman legal ikut
   :root. Mode karakter tetap token Figma 02 Tokens.
   Turunan hanya color-mix(in srgb, …) dari token aktif.
   Tipografi dinaikkan (isi ≥16 px, meta ≥14 px), tracking dilonggarkan.
   2.5D: [data-tilt] perspective + .tilt-inner preserve-3d (JS app.js),
   lapisan .tilt-back Z-16 / .portrait-pop Z26, breath transform+opacity,
   nod 420 ms saat balasan. Reduced-motion: instant, tilt dilewati. */

@font-face {
  font-family: Inter;
  src: url('assets/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  /* Palet home "Nila" (50 page / 30 card / 20 accent) */
  --page: #12182B; --card: #26304E; --trust: #26304E; --divider: #46536F;
  --ink: #F1EEE4; --muted: #C7CDDD;
  --accent: #E8C46A; --action: #E8C46A; --hover: #E8C46A; --on-action: #12182B;
  --control: #97A3C4; --focus: #E8C46A;
  /* Turunan (color-mix dari token di atas) */
  --link: var(--accent);
  --bubble-out: color-mix(in srgb, var(--card) 94%, var(--ink));
  --wash: color-mix(in srgb, var(--accent) 10%, var(--page));
  --thread-bg: color-mix(in srgb, var(--card) 60%, var(--page));
  --sheet-bg: color-mix(in srgb, var(--card) 88%, var(--ink));
  --rule-soft: color-mix(in srgb, var(--divider) 45%, var(--page));
  --shadow: color-mix(in srgb, #000 40%, transparent);
  --font: Inter, system-ui, sans-serif;
  --gutter: clamp(1rem, 4vw, 4rem);
  --shell: 78rem;
  --story: 52ch;
  --ease: cubic-bezier(.2, 0, 0, 1);
}

/* Mode Catherine — espresso flat (page = card = trust) */
body[data-mode="catherine"] {
  --page: #2B1B14; --card: #2B1B14; --trust: #2B1B14; --divider: #D8B98A;
  --ink: #EFE3D2; --muted: #EFE3D2;
  --accent: #D8B98A; --action: #D8B98A; --hover: #D8B98A; --on-action: #2B1B14;
  --control: #D8B98A; --focus: #EFE3D2;
}
/* Mode Rina — plum; dua keluarga: orchid (accent/control) vs wine (action) */
body[data-mode="rina"] {
  --page: #461D3A; --card: #461D3A; --trust: #461D3A; --divider: #BA71A2;
  --ink: #ECD0EC; --muted: #ECD0EC;
  --accent: #BA71A2; --action: #7E2A53; --hover: #7E2A53; --on-action: #ECD0EC;
  --control: #BA71A2; --focus: #ECD0EC;
  /* orchid murni < 4.5:1 di atas plum untuk teks kecil → angkat ke arah ink */
  --link: color-mix(in srgb, var(--accent) 62%, var(--ink));
}
/* Mode Grace — jet flat; crimson aksen, bukan warna antarmuka Home */
body[data-mode="grace"] {
  --page: #0A0A0A; --card: #0A0A0A; --trust: #0A0A0A; --divider: #E63946;
  --ink: #F5E6E8; --muted: #F5E6E8;
  --accent: #E63946; --action: #E63946; --hover: #E63946; --on-action: #0A0A0A;
  --control: #E63946; --focus: #F5E6E8;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--page); overflow-x: clip; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--page); color: var(--ink);
  font: 400 1.0625rem/1.6 var(--font);
  transition: background-color .24s var(--ease), color .24s var(--ease);
  overflow-x: clip;
}
h1, h2, h3, p, figure, blockquote, fieldset { margin: 0; }
h1, h2, h3 { letter-spacing: -.025em; font-weight: 730; }
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: .18em; }
button { font: inherit; letter-spacing: inherit; cursor: pointer; }
fieldset { padding: 0; border: 0; min-width: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; z-index: 60; top: .5rem; left: var(--gutter); padding: .7rem 1rem; background: var(--sheet-bg); color: var(--ink); border-radius: 8px; transform: translateY(-180%); }
.skip:focus { transform: none; }
.shell { width: min(var(--shell), calc(100% - var(--gutter) * 2)); margin-inline: auto; }

/* Masthead — slim, logo kiri, menu di tengah halaman */
.mast { border-bottom: 1px solid var(--divider); }
.mast-row { position: relative; display: flex; align-items: center; min-height: 3rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; color: #ffddc3; }
.brand svg { display: block; height: 20px; width: auto; max-width: 100%; }
.mast nav { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 1.25rem; }
.mast nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); font-size: .95rem; font-weight: 590; text-decoration: none; white-space: nowrap; }
.mast nav a:hover { color: var(--ink); }
.mast nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
@media (max-width: 22.5rem) {
  /* 320–360px: lockup dikecilkan + gap nav dirapatkan supaya brand tidak
     bertabrakan dengan menu tengah (brand right < nav left, gap ≥8px). */
  .brand svg { height: 16px; }
  .mast nav { gap: 1rem; }
}

main { flex: 1; }

/* Intro Home — landing, di tengah */
.intro { max-width: 48rem; margin-inline: auto; text-align: center; padding-block: 2rem 1.7rem; }
.intro h1 { font-size: clamp(2.25rem, 1.7rem + 2.8vw, 4.2rem); line-height: 1.06; }
.accent-word { color: var(--accent); }
.lede { margin-top: 1.25rem; margin-inline: auto; max-width: 46ch; color: var(--muted); font-size: 1.125rem; line-height: 1.6; }
.disclosure { margin-top: .8rem; color: var(--muted); font-size: .9375rem; }
.disclosure strong { color: var(--ink); }

/* Fitur home — 3 kartu terpisah (bukan satu band), berderet menyamping
   ≥48rem; di HP bertumpuk dengan ikon di kiri. */
.features { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.feature { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .95rem; align-items: start; padding: 1.05rem 1.15rem; border: 1px solid var(--rule-soft); border-radius: 18px; background: var(--card); }
.feat-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: color-mix(in srgb, var(--accent) 15%, var(--page)); border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--page)); color: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.feat-icon svg { width: 26px; height: 26px; }
/* Ketersediaan platform (sesi 8): Telegram & web tersedia, app segera hadir.
   Pill ikon+nama+status; Telegram = link bot, Web = halaman ini, App = dashed. */
.avail { list-style: none; margin: 0 auto 1.6rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem; max-width: 48rem; }
.avail-item { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--rule-soft); border-radius: 999px; background: var(--card); color: var(--ink); font-size: .9375rem; text-decoration: none; }
a.avail-item:hover { border-color: var(--accent); }
.avail-item svg { width: 18px; height: 18px; flex: none; color: var(--accent); }
.avail-name { font-weight: 600; }
.avail-badge { display: inline-flex; align-items: center; gap: .4rem; font-size: .8125rem; color: var(--muted); }
.avail-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.avail-item.soon { border-style: dashed; color: var(--muted); }
.avail-item.soon svg { color: var(--muted); }
.feat-copy strong { display: block; font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.feat-copy p { margin-top: .2rem; color: var(--muted); font-size: 1rem; line-height: 1.5; }

/* Kartu karakter — bintang home, 2.5D tilt, klik → profil */
.cast-cards { padding-block: 1.9rem 3rem; }
.cast-cards h2 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; color: var(--ink); margin-bottom: 1.1rem; }
.card-grid { display: grid; gap: 1.25rem; }
.cast-card { display: flex; flex-direction: column; border: 1px solid var(--rule-soft); border-radius: 16px; background: var(--card); color: inherit; text-decoration: none; perspective: 900px; box-shadow: 0 10px 30px var(--shadow); transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.cast-card:hover { border-color: var(--control); box-shadow: 0 18px 44px var(--shadow); }
.card-inner { display: flex; flex-direction: column; flex: 1; transform-style: preserve-3d; will-change: transform; transition: transform .18s var(--ease); }
.cast-card:hover .card-inner { transform: translateY(-4px); }
.tilt-live .card-inner, .tilt-live .tilt-inner { transition: none; }
.card-art { background: var(--wash); transform-style: preserve-3d; border-radius: 15px 15px 0 0; }
.card-art .portrait { width: 100%; height: auto; aspect-ratio: 620 / 904; object-fit: contain; border-radius: 15px 15px 0 0; transform: translateZ(18px); animation: breathCard 6s ease-in-out infinite; }
.card-body { display: flex; flex-direction: column; gap: .5rem; flex: 1; padding: 1.05rem 1.15rem 1.2rem; background: var(--card); border-radius: 0 0 15px 15px; }
.card-name { font-size: 1.5rem; line-height: 1.1; }
.card-meta { color: var(--muted); font-size: 1rem; line-height: 1.45; }
.card-cta { display: inline-flex; align-items: center; gap: .4rem; width: max-content; margin-top: auto; padding: .55rem 1rem; border: 1px solid var(--control); border-radius: 999px; background: var(--action); color: var(--on-action); font-size: .95rem; font-weight: 650; transition: background-color .12s var(--ease); }
.cast-card:hover .card-cta { background: var(--hover); }

/* Sesi 21 (hasil konsultasi qwen4-max + Kimi-K3.1-Pro): HP = foto kecil di
   samping nama/meta, chat full-width di bawahnya, ringkasan & tentang di bawah.
   Foto TIDAK dipaksa mengikuti tinggi chat (itu yang bikin strip 1:3,9). */
.spread { display: grid; gap: 1rem 1.25rem; padding-block: 1.5rem 2.5rem;
  grid-template-columns: 6rem minmax(0, 1fr);
  grid-template-areas: "scene head" "exchange exchange" "ring ring" "bio bio" "foot foot"; }
.profile-head { min-width: 0; grid-area: head; align-self: center; }
.profile-top { display: contents; }
.profile-top .scene { min-width: 0; display: flex; align-items: flex-start; position: relative;
  border-radius: 14px; grid-area: scene; }
.profile-top .exchange { grid-area: exchange; }
.profile-more { display: contents; }
.profile-more .ringkasan { grid-area: ring; max-width: 68ch; }
.identity-bio { max-width: 68ch; }
.identity-bio { grid-area: bio; max-width: 68ch; }
.profile-more .disclosure { grid-area: foot; margin-top: 0; }
/* Latar blur dari foto yang sama mengisi tinggi kolom, foto aslinya utuh di tengah */
.profile-top .scene::before { content: ""; position: absolute; inset: -8px; z-index: 0; border-radius: 16px;
  background-size: cover; background-position: 50% 25%; filter: blur(22px) brightness(.5) saturate(1.35); }
body[data-mode="catherine"] .profile-top .scene::before { background-image: url(assets/hero-catherine.webp); }
body[data-mode="rina"] .profile-top .scene::before { background-image: url(assets/kartu-rina.webp); }
body[data-mode="grace"] .profile-top .scene::before { background-image: url(assets/kartu-grace.webp); }
.profile-top .scene-art { max-width: none; height: auto; width: calc(100% - 18px); position: relative; z-index: 1; }
.profile-top .tilt-inner, .profile-top .portrait-pop, .profile-top .portrait-frame { height: 100%; }
/* Foto utuh (tidak di-crop): di kolom sempit muncul letterbox dengan latar
   blur dari foto yang sama, jadi tidak ada wajah terpotong maupun ruang kosong. */
.profile-top .portrait { width: 100%; height: auto; aspect-ratio: 620 / 904; object-fit: contain; }
.profile-top .portrait-frame { box-shadow: 0 10px 30px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); }
.profile-top .exchange { min-width: 0; }
.profile-top .chat { margin-top: 0; height: 520px; max-width: none; border-radius: 18px; }

.scene { min-width: 0; }
.scene-art { position: relative; width: 100%; max-width: 24rem; perspective: 950px; }
.tilt-inner { position: relative; transform-style: preserve-3d; will-change: transform; }
.tilt-back { position: absolute; inset: 0; border-radius: 14px; background: var(--card); border: 1px solid var(--rule-soft); transform: translateZ(-16px) scale(1.02); }
.portrait-pop { position: relative; transform-style: preserve-3d; transform: translateZ(26px); animation: breath 5.6s ease-in-out infinite; }
.portrait-frame { border-radius: 12px; overflow: hidden; background: var(--wash); box-shadow: 0 18px 44px var(--shadow); }
.portrait { width: 100%; height: auto; aspect-ratio: 620 / 904; object-fit: contain; }
@keyframes breath { 0%, 100% { transform: translateZ(26px) translateY(0); } 50% { transform: translateZ(26px) translateY(-5px); } }
@keyframes breathCard { 0%, 100% { transform: translateZ(18px) translateY(0); } 50% { transform: translateZ(18px) translateY(-3px); } }

.exchange { min-width: 0; }

/* Chat Telegram (sesi 7) — palet dark tetap ala Telegram asli, sama di semua mode */
.chat {
  --chat-bg: #0e1621; --chat-line: rgba(255, 255, 255, .06); --chat-surface: #242f3d;
  --bubble-in: #182533; --bubble-out: #2b5278; --chat-accent: #64b5ef;
  --chat-muted: #8a9bb0; --chat-ink: #f5f5f5;
  position: relative; display: flex; flex-direction: column; width: 100%; max-width: 34rem;
  height: 620px; margin-top: 1.25rem; background: var(--chat-bg);
  border: 1px solid var(--chat-line); border-radius: 22px; overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.chat-head { flex: 0 0 56px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid var(--chat-line); }
.chat-avatar { width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: var(--chat-surface) center 18% / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }
.chat-who { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.chat-name { font-size: .9375rem; font-weight: 600; color: var(--chat-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status { font-size: .8125rem; color: var(--chat-accent); }
.chat-more { margin-left: auto; color: var(--chat-muted); font-size: 1.125rem; line-height: 1; padding: 8px 4px; }
.chat-body { position: relative; flex: 1 1 auto; min-height: 0; }
.thread { position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 16px 16px; display: flex; flex-direction: column; background-image: radial-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px); background-size: 19px 19px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .14) transparent; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px); mask-image: linear-gradient(180deg, transparent 0, #000 14px); }
.thread::-webkit-scrollbar { width: 6px; }
.thread::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .14); border-radius: 6px; }
.thread-push { flex: 1 1 auto !important; min-height: 0; }
.thread > * { flex: 0 0 auto; }
.thread-fade { position: absolute; left: 0; right: 0; bottom: 0; height: 24px; pointer-events: none; background: linear-gradient(180deg, rgba(14, 22, 33, 0), var(--chat-bg)); opacity: 0; transition: opacity .2s ease; }
.thread-fade.on { opacity: 1; }
.time { margin: 0 auto 14px; width: fit-content; padding: 3px 12px; border-radius: 999px; background: rgba(255, 255, 255, .05); color: var(--chat-muted); font-size: .8125rem; }
.msg { display: flex; margin-top: 14px; }
.msg.in { justify-content: flex-start; }
.msg.out { justify-content: flex-end; }
.msg.in + .msg.in, .msg.out + .msg.out { margin-top: 4px; }
.inner { max-width: 82%; display: flex; flex-direction: column; }
.msg.in .inner { align-items: flex-start; }
.msg.out .inner { align-items: flex-end; }
.bubble { position: relative; padding: 9px 13px; font-size: 1rem; line-height: 1.45; overflow-wrap: anywhere; word-break: break-word; }
.bubble.enter { animation: bubbleIn .24s cubic-bezier(.2, .8, .2, 1); }
.msg.in .bubble { background: var(--bubble-in); color: var(--chat-ink); border-radius: 16px 16px 16px 6px; }
.msg.out .bubble { background: var(--bubble-out); color: #fff; border-radius: 16px 16px 6px 16px; }
/* Ekor bawah ala Telegram (masuk kiri, keluar kanan): kurva mulai dari
   tepi bubble lalu menyapu ke ujung luar — bukan kotak tempelan. */
.msg.in .bubble::after { content: ''; position: absolute; left: -6px; bottom: 0; width: 12px; height: 14px; background: var(--bubble-in); clip-path: path('M6 0 C6 9 4 13 0 14 L12 14 L12 0 Z'); }
.msg.out .bubble::after { content: ''; position: absolute; right: -6px; bottom: 0; width: 12px; height: 14px; background: var(--bubble-out); clip-path: path('M6 0 C6 9 8 13 12 14 L0 14 L0 0 Z'); }
@keyframes bubbleIn { from { opacity: 0; transform: translateY(8px); } }
.meta { display: inline-flex; gap: 6px; align-items: center; font-size: .75rem; color: var(--chat-muted); margin-top: 4px; padding: 0 4px; min-height: 14px; }
.meta .tick { color: var(--chat-accent); }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; background: var(--bubble-in); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--chat-muted); animation: dot 1.2s infinite; }
.dot:nth-child(2) { animation-delay: .16s; }
.dot:nth-child(3) { animation-delay: .32s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.tip { margin-top: 10px; max-width: 82%; }
.chips-label { color: var(--chat-muted); font-size: .8125rem; margin-bottom: 7px; }
.chips { display: flex; flex-direction: column; gap: 7px; }
.chip { max-width: 100%; min-height: 44px; padding: 9px 18px; border: 1px solid rgba(100, 181, 239, .26); border-radius: 999px; background: rgba(100, 181, 239, .10); color: #d3e9fa; text-align: left; font-size: 1rem; line-height: 1.4; transition: background-color .12s var(--ease), border-color .12s var(--ease); }
.chip:hover { background: rgba(100, 181, 239, .17); border-color: rgba(100, 181, 239, .44); }
.chip:active { transform: translateY(1px); }
.end { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 6px; }
.end-note { color: var(--chat-muted); font-size: .9375rem; }
.restart { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--chat-accent); font-size: .9375rem; font-weight: 600; }
.restart:hover { text-decoration: underline; text-underline-offset: 4px; }
.chat-foot { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; padding: 10px 16px 12px; border-top: 1px solid var(--chat-line); }
.input { flex: 1 1 auto; min-width: 0; height: 48px; border-radius: 999px; background: var(--chat-surface); display: flex; align-items: center; padding: 0 18px; color: var(--chat-muted); font-size: 1rem; cursor: text; }
.send { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer; background: var(--chat-surface); color: var(--chat-accent); display: grid; place-items: center; transition: background-color .16s var(--ease), color .16s var(--ease); }
.send:hover { background: var(--bubble-out); color: #fff; }
.send svg { width: 20px; height: 20px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(8px); z-index: 60; max-width: min(90vw, 30rem); padding: 12px 18px; border-radius: 14px; background: #242f3d; color: #f5f5f5; font-size: .9375rem; line-height: 1.4; box-shadow: 0 12px 32px rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Halaman karakter: nama lengkap display + bio DI BAWAH nama (bukan di bawah foto) */
.cast { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; border-bottom: 1px solid var(--divider); }
.identity { min-width: 0; }
.identity h1 { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); line-height: 1.06; }
.identity-meta { margin-top: .55rem; color: var(--muted); font-size: 1rem; }
/* Nama disesuaikan dengan foto 96px di sebelahnya (sesi 21) */
.profile-head .room-name { font-size: clamp(1.45rem, 1.1rem + 2vw, 2.15rem); line-height: 1.1; text-wrap: balance; }
.identity-bio { margin-top: 1.15rem; max-width: 46ch; }
.bio-tag { font-size: .9rem; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--link); }
.identity-bio p { margin-top: .45rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.identity .disclosure { margin-top: 1rem; }
.profile-nav a { position: relative; display: inline-flex; align-items: center; min-height: 44px; padding: .8rem 0; color: var(--muted); font-size: 1rem; font-weight: 590; text-decoration: none; }
.profile-nav a[aria-current] { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }

/* Footer — 18+ + Batasan konten + Privasi */
.foot { border-top: 1px solid var(--divider); padding: 1.5rem 0 2.2rem; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem 2.5rem; }
.foot-left { display: flex; gap: 1rem; align-items: flex-start; }
.foot-brand { display: inline-flex; min-height: 44px; align-items: center; color: #ffddc3; }
.foot-brand svg { height: 30px; width: auto; }
.foot-lines { display: grid; gap: .2rem; color: var(--muted); font-size: .9rem; }
.foot-nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.foot-nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .95rem; font-weight: 560; }
.foot-nav a[aria-current] { color: var(--ink); }

/* Legal — artikel + rail info di kanan (≥64rem); kolom baca tetap sempit */
.legal { padding: 1.75rem 0 2.5rem; max-width: min(62ch, 34rem); min-width: 0; }
.legal-wrap { display: grid; gap: 2rem; }
.legal-side { display: none; }
@media (min-width: 64rem) {
  .legal-wrap { grid-template-columns: minmax(0, 33rem) 15.5rem; gap: 3.5rem; max-width: 52rem; margin-inline: auto; }
  .legal-side { display: grid; align-content: start; gap: 1.1rem; margin-top: 2rem; padding-left: 1.5rem; border-left: 1px solid var(--rule-soft); position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow: auto; scrollbar-width: thin; }
  .side-tag { color: var(--muted); font-size: .8125rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
  .legal-side nav { display: grid; gap: .1rem; }
  .legal-side nav a { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; font-weight: 600; text-decoration: none; }
  .legal-side nav a:hover, .legal-side nav a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
  .legal-side nav a[aria-current="page"] { color: var(--ink); font-weight: 700; text-decoration: none; }
  .legal-side .toc { margin-top: -.7rem; }
  .legal-side .toc a { min-height: 44px; font-size: .9rem; font-weight: 550; color: var(--muted); text-decoration: none; }
  .legal-side .toc a:hover, .legal-side .toc a:focus-visible { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
  .side-note { color: var(--muted); font-size: .875rem; line-height: 1.55; }
  .side-bot { display: inline-flex; align-items: center; min-height: 44px; font-size: .9375rem; font-weight: 600; }
}
.section-tag { color: var(--muted); font-size: .875rem; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; }
.legal h1 { margin-top: .7rem; font-size: clamp(2.35rem, 1.8rem + 2.9vw, 4rem); line-height: 1.08; }
.legal .lede { margin-top: 1.2rem; font-size: 1.125rem; }
.legal section { margin-top: 2rem; }


/* Sesi 18: blok Ringkasan di halaman karakter — 2-3 kalimat faktual yang
   bisa dikutip utuh mesin jawaban. Warna ikut mode karakter. */
.ringkasan { margin-top: 1.15rem; padding: .85rem 1rem .9rem; border-left: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent); border-radius: 0 .6rem .6rem 0; }
.ringkasan p { margin-top: .45rem; font-size: 1rem; line-height: 1.55; color: var(--ink); }
.legal h2 { font-size: 1.35rem; line-height: 1.2; font-weight: 700; scroll-margin-top: 1.5rem; }
.legal p { margin-top: .6rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.legal .stamp { margin-top: .5rem; color: var(--muted); font-size: .9375rem; font-weight: 600; letter-spacing: .01em; }
.legal ul { margin-top: .6rem; padding-left: 1.15rem; display: grid; gap: .45rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; }
.legal ol { margin-top: .6rem; padding-left: 1.4rem; display: grid; gap: .55rem; color: var(--muted); font-size: 1.0625rem; line-height: 1.65; list-style: decimal; }
.legal li::marker { color: var(--control); }
.legal ol li::marker { color: var(--control); font-weight: 650; }
.legal strong { color: var(--ink); }
.notice { margin-top: 2.2rem; padding: 1rem 1.1rem; border: 1px solid var(--rule-soft); border-radius: 14px; background: var(--card); color: var(--muted); font-size: .9375rem; }
.plain { display: inline-flex; align-items: center; min-height: 44px; margin-top: 1.8rem; font-weight: 600; }
.contact { margin-top: .9rem; display: grid; gap: .25rem; padding: .8rem 1.1rem; border: 1px solid var(--rule-soft); border-radius: 14px; background: var(--card); }
.contact a { display: flex; align-items: center; gap: .7rem; min-height: 44px; font-weight: 600; text-decoration: none; }
.contact a > span { min-width: 0; overflow-wrap: anywhere; }
.contact a:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact svg { width: 20px; height: 20px; flex: none; color: var(--control); }
.contact-label { display: block; color: var(--muted); font-size: .8125rem; font-weight: 550; letter-spacing: .03em; }

/* Sheet Telegram — dialog modal, focus trap, Escape */
.sheet-veil { position: fixed; inset: 0; z-index: 40; background: color-mix(in srgb, var(--page) 72%, transparent); }
.sheet { position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; margin-inline: auto; padding: 26px 22px 22px; border: 1px solid var(--rule-soft); border-bottom: 0; border-radius: 20px 20px 0 0; background: var(--sheet-bg); }
.sheet-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none; color: var(--muted); font-size: 1.5rem; line-height: 1; }
.sheet-close:hover { color: var(--ink); }
.sheet h2 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.02em; }
.sheet-sub { margin-top: .6rem; color: var(--muted); font-size: 1rem; line-height: 1.55; }
.sheet-note { margin-top: .9rem; color: var(--muted); font-size: .9375rem; line-height: 1.5; }
.sheet-note a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.sheet-actions { margin-top: 1.2rem; display: grid; gap: 10px; }
.btn-primary { display: flex; align-items: center; justify-content: center; min-height: 48px; border: 1px solid var(--control); border-radius: 999px; background: var(--action); color: var(--on-action); font-weight: 650; font-size: 1.0625rem; text-decoration: none; transition: background-color .12s var(--ease); }
.btn-primary:hover { background: var(--hover); }
.btn-quiet { min-height: 44px; border: 1px solid var(--control); border-radius: 999px; background: transparent; color: var(--ink); font-size: 1rem; font-weight: 590; }

@media (min-width: 48rem) {
  .features { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; }
  .feature { grid-template-columns: 1fr; gap: .9rem; padding: 1.3rem 1.25rem 1.4rem; align-content: start; }
  .card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sheet { bottom: auto; top: 50%; transform: translateY(-50%); width: min(420px, calc(100vw - 48px)); border-bottom: 1px solid var(--rule-soft); border-radius: 20px; }
}

@media (min-width: 56rem) {
  .mast-row { min-height: 3.25rem; }
  .brand svg { height: 23px; }
  .mast nav { gap: 1.75rem; }
  .mast nav a { font-size: 1rem; }
  .intro { padding-block: 2.8rem 2.3rem; }
  .spread { gap: 1.5rem 2rem; padding-block: 2rem 3.75rem; align-items: start; }
  .spread { grid-template-columns: 30rem minmax(0, 38rem);
    grid-template-areas: "scene head" "scene exchange" ". ring" ". bio" ". foot"; gap: 1.25rem 2rem; }
  .profile-head { align-self: start; }
  .identity-bio { max-width: none; }
  .profile-head .room-name { font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem); }
  .identity-meta { font-size: 1.05rem; }
  .profile-top .scene { position: sticky; top: 1.5rem; }
  .profile-top .chat { height: 560px; }
  .legal { padding: 2.5rem 0 3.5rem; }
}

@media (max-width: 40rem) {
  .foot-row { flex-direction: column; }
  .profile-top .chat { height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
/* Sesi 17: blok FAQ di halaman beta (AEO). Pertanyaan pakai h3 supaya
   hierarki tetap h1 → h2 (bagian) → h3 (pertanyaan); ukuran isi ≥16px. */
.legal h3 { font-size: 1.05rem; line-height: 1.35; font-weight: 600; margin-top: 1.25rem; color: var(--ink); }
.legal h3 + p { margin-top: .35rem; }
