:root {
  --bg: #0e0b10;
  --bg-2: #161219;
  --panel: #1c1720;
  --panel-2: #241e29;
  --line: #2f2734;
  --text: #f3edf2;
  --muted: #a99fac;
  --accent: #ff7a9c;
  --accent-2: #e2557f;
  --green: #5fd49a;
  --yellow: #f2c45a;
  --red: #ff5a64;
  --radius: 18px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Songti SC", "Noto Serif SC", "SimSun", serif;
  --sans: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --tabbar: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
img { display: block; max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.row { display: flex; align-items: center; flex-wrap: wrap; }
.gap { gap: 12px; }

/* ── Layout ─────────────────────────────────────────── */
.sidebar { display: none; }
main { min-height: 100%; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); }

.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 20;
  height: calc(var(--tabbar) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(14, 11, 16, .92); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.tabbar a { display: grid; place-items: center; align-content: center; gap: 2px; font-size: 11px; color: var(--muted); }
.tabbar a span { font-size: 20px; line-height: 1; }
.tabbar a.active { color: var(--accent); }

@media (min-width: 900px) {
  body { display: grid; grid-template-columns: 260px 1fr; }
  .tabbar { display: none; }
  main { padding-bottom: 0; height: 100vh; overflow-y: auto; }
  .sidebar {
    display: flex; flex-direction: column; gap: 6px;
    height: 100vh; position: sticky; top: 0; padding: 22px 14px;
    background: var(--bg-2); border-right: 1px solid var(--line); overflow-y: auto;
  }
  .brand { display: flex; align-items: center; gap: 10px; font: 600 22px var(--serif); padding: 0 10px 16px; }
  .brand img { width: 32px; height: 32px; }
  .sidebar nav a { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 12px; color: var(--muted); }
  .sidebar nav a span { width: 20px; text-align: center; font-size: 17px; }
  .sidebar nav a:hover { background: var(--panel); color: var(--text); }
  .sidebar nav a.active { background: var(--panel-2); color: var(--text); }
  .sidebar h3 { margin: 22px 12px 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .sidebar-chats { display: grid; gap: 2px; padding: 0 2px; }
  .sidebar-chats p { padding: 0 10px; }
  .side-chat { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; }
  .side-chat:hover { background: var(--panel); }
  .side-chat img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
  .side-chat span { display: grid; min-width: 0; }
  .side-chat small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .brand-mobile { display: none; }
}

/* ── Common bits ────────────────────────────────────── */
.page-title { font: 600 28px var(--serif); margin: 8px 0 18px; }
.section-title { font: 600 19px var(--serif); margin: 28px 0 12px; display: flex; align-items: baseline; gap: 10px; }
.section-title small { font: 13px var(--sans); }
.age { font: 400 .7em var(--sans); color: var(--muted); }

.flag { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 99px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px); white-space: nowrap; vertical-align: middle; }
.flag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.flag.green { color: var(--green); }
.flag.yellow { color: var(--yellow); }
.flag.red { color: var(--red); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 11.5px; color: var(--muted); background: var(--panel-2); padding: 3px 9px; border-radius: 99px; }
.tags.big span { font-size: 13px; padding: 5px 11px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 99px; background: var(--panel-2); border: 1px solid var(--line); font-weight: 600; transition: transform .12s, background .2s; }
.btn:hover { background: #2d2533; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: 0; color: #1a0910; }
.btn.big { padding: 14px 26px; font-size: 16px; width: 100%; }
.btn.small { padding: 6px 14px; font-size: 13px; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: rgba(255, 90, 100, .35); }
.link { color: var(--accent); font-weight: 600; padding: 6px 0 0; }

.toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 24px); transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: 99px; z-index: 100; animation: up .25s ease; box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .3s; }
.toast.out { opacity: 0; }
@keyframes up { from { opacity: 0; transform: translate(-50%, 10px); } }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,.9); display: grid; place-items: center; padding: 20px; animation: fade .2s; cursor: zoom-out; }
.lightbox figure { margin: 0; max-width: min(560px, 100%); }
.lightbox img { border-radius: 16px; max-height: 80vh; margin: auto; }
.lightbox figcaption { text-align: center; color: var(--muted); margin-top: 12px; font-style: italic; font-family: var(--serif); }
@keyframes fade { from { opacity: 0; } }

/* ── Home ───────────────────────────────────────────── */
.home, .chats, .settings, .swipe, .profile { padding: 18px 16px 30px; max-width: 1200px; margin: 0 auto; }
.home-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand-mobile { font: 600 26px var(--serif); margin: 0; color: var(--text); }
.search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 0 16px; }
.search span { color: var(--muted); font-size: 18px; }
.search input { flex: 1; background: none; border: 0; outline: 0; padding: 11px 0; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 16px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 7px 15px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }

.continue-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.continue-card { flex: none; width: 250px; display: flex; gap: 12px; align-items: center; padding: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.continue-card img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; }
.continue-card div { display: grid; min-width: 0; }
.continue-card small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; } }
.card { background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: #43384a; }
.card-img { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-img .flag { position: absolute; top: 10px; left: 10px; }
.card-body { padding: 12px 13px 14px; }
.card-body h3 { margin: 0 0 4px; font: 600 17px var(--serif); }
.card-body p { margin: 0 0 10px; font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ── Profile ────────────────────────────────────────── */
.back { display: inline-block; color: var(--muted); margin-bottom: 12px; font-size: 15px; }
.profile-grid { display: grid; gap: 22px; }
@media (min-width: 900px) { .profile-grid { grid-template-columns: 340px 1fr; gap: 36px; align-items: start; } .profile-photo { position: sticky; top: 20px; } }
.profile-photo img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 22px; margin-bottom: 14px; }
.profile-info h1 { font: 600 34px var(--serif); margin: 0 0 8px; }
.hook { font: italic 18px/1.5 var(--serif); color: #e6d9e3; margin: 16px 0; }
.scene-card { margin-top: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.scene-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.role { font-size: 14px; margin: 0 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.preview.clamp { max-height: 150px; overflow: hidden; mask-image: linear-gradient(#000 60%, transparent); -webkit-mask-image: linear-gradient(#000 60%, transparent); }
.preview .narr { font: italic 14.5px/1.55 var(--serif); color: var(--muted); margin: 6px 0; }
.preview .say { margin: 6px 0; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.ph { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 3/4; padding: 0; }
.ph img { width: 100%; height: 100%; object-fit: cover; }
.ph.locked img { filter: blur(14px) brightness(.55); transform: scale(1.15); }
.ph.locked span { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; font-size: 22px; }
.ph.locked small { font-size: 11px; color: var(--muted); }
.profile .danger { margin-top: 26px; }

/* ── Swipe ──────────────────────────────────────────── */
.swipe { max-width: 460px; display: flex; flex-direction: column; min-height: calc(100vh - var(--tabbar)); }
.swipe .page-title { margin-bottom: 4px; text-align: center; }
.deck { position: relative; flex: 1; min-height: min(600px, 72vh); margin: 14px 0; }
.swipe-card { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; background: var(--panel); touch-action: none; user-select: none; box-shadow: 0 20px 50px rgba(0,0,0,.5); cursor: grab; }
.swipe-card.behind { transform: scale(.95) translateY(10px); opacity: .5; }
.swipe-card > img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.swipe-info { position: absolute; inset: auto 0 0 0; padding: 70px 20px 20px; background: linear-gradient(transparent, rgba(8,6,10,.92) 30%); }
.swipe-info h2 { font: 600 26px var(--serif); margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.swipe-info .hook { font-size: 16px; margin: 6px 0 10px; }
.swipe-info .small { color: #d6cbd4; margin: 10px 0 8px; }
.swipe-quote { background: rgba(255,255,255,.06); border-radius: 12px; padding: 8px 12px; font-size: 13.5px; display: grid; gap: 4px; }
.swipe-quote i { color: var(--muted); font-family: var(--serif); }
.stamp { position: absolute; top: 34px; padding: 6px 14px; border: 3px solid; border-radius: 10px; font: 800 24px var(--sans); letter-spacing: .1em; opacity: 0; }
.stamp.like { left: 24px; color: var(--green); transform: rotate(-12deg); }
.stamp.nope { right: 24px; color: var(--red); transform: rotate(12deg); }
.swipe-actions { display: flex; justify-content: center; align-items: center; gap: 16px; padding-bottom: 8px; }
.round { width: 50px; height: 50px; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); font-size: 18px; display: grid; place-items: center; transition: transform .12s; }
.round:active { transform: scale(.9); }
.round.big { width: 64px; height: 64px; font-size: 24px; }
.round.love { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a0910; border: 0; }
.deck-empty { position: absolute; inset: 0; display: grid; place-content: center; gap: 14px; text-align: center; color: var(--muted); }

/* ── Chats list ─────────────────────────────────────── */
.chats { max-width: 720px; }
.chat-row { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--radius); }
.chat-row:hover { background: var(--panel); }
.chat-row img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.chat-row div { flex: 1; display: grid; min-width: 0; }
.chat-row b { font: 600 17px var(--serif); }
.chat-row small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-row time { font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 60px 0; color: var(--muted); display: grid; gap: 14px; justify-items: center; }

/* ── Chat ───────────────────────────────────────────── */
body[data-route="chat"] .tabbar { display: none; }
body[data-route="chat"] main { padding-bottom: 0; }
.chat { position: relative; height: 100dvh; display: grid; overflow: hidden; }
.chat-bg { position: absolute; inset: -40px; background-size: cover; background-position: center; filter: blur(28px) brightness(.32) saturate(1.2); z-index: 0; }
.stage { display: none; }
.chat-main { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 0; height: 100dvh; }
@media (min-width: 900px) {
  .chat { grid-template-columns: minmax(280px, 38%) 1fr; height: 100vh; }
  .chat-main { height: 100vh; border-left: 1px solid rgba(255,255,255,.06); background: rgba(14,11,16,.55); }
  .stage { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; padding: 30px; }
  .stage img { position: absolute; inset: 30px 30px 110px; width: calc(100% - 60px); height: calc(100% - 140px); object-fit: cover; border-radius: 26px; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
  .stage-name { position: relative; text-align: center; display: grid; justify-items: center; gap: 6px; }
  .stage-name h2 { margin: 0; font: 600 28px var(--serif); }
  .chat-head .icon-btn:first-child { display: none; }
}

.chat-head { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; background: rgba(14,11,16,.7); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(255,255,255,.06); }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; font-size: 24px; color: var(--muted); flex: none; }
.icon-btn:hover { background: rgba(255,255,255,.06); color: var(--text); }
.who { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; }
.who img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.who span { display: grid; }
.who b { font: 600 17px var(--serif); }
.who small { font-size: 12px; color: var(--muted); }
.banner { display: block; text-align: center; padding: 10px 14px; background: rgba(255,122,156,.15); color: var(--accent); font-weight: 600; font-size: 14px; }

.messages { flex: 1; overflow-y: auto; padding: 18px 14px 10px; overscroll-behavior: contain; }
@media (min-width: 900px) { .messages { padding: 24px 28px 10px; } }
.scene-chip { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin: 0 auto 18px; padding: 6px 14px; width: fit-content; border-radius: 99px; background: rgba(0,0,0,.35); }

.msg { position: relative; display: flex; gap: 10px; margin: 0 0 16px; animation: msgIn .25s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } }
.msg .avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex: none; margin-top: 2px; }
.bot-body { max-width: min(560px, 86%); display: grid; gap: 6px; justify-items: start; }
.narr { margin: 0; font: italic 15px/1.55 var(--serif); color: #c3b6c1; padding: 0 4px; }
.say { margin: 0; background: rgba(36, 30, 41, .92); border: 1px solid rgba(255,255,255,.06); padding: 9px 14px; border-radius: 4px 18px 18px 18px; }
.msg.user { justify-content: flex-end; }
.msg.user .bubble { max-width: min(520px, 82%); background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1d0a12; padding: 9px 14px; border-radius: 18px 4px 18px 18px; }
.msg.user .bubble p { margin: 0; }
.msg.user .bubble p + p { margin-top: 4px; }
.msg.user .bubble .narr { color: #4a1a2c; padding: 0; }

.photo-msg { padding: 0; border-radius: 16px; overflow: hidden; width: 210px; background: var(--panel); border: 1px solid rgba(255,255,255,.08); text-align: left; cursor: zoom-in; }
.photo-msg img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }
.photo-msg span { display: block; padding: 8px 12px; font-size: 12.5px; color: var(--muted); }

.msg-actions { display: flex; gap: 6px; margin-top: 2px; }
.msg-actions button { font-size: 12.5px; color: var(--muted); padding: 5px 11px; border-radius: 99px; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.06); }
.msg-actions button:hover { color: var(--text); }
.msg-menu { align-self: center; opacity: 0; font-size: 13px; color: var(--muted); padding: 6px; transition: opacity .15s; }
.msg:hover .msg-menu, .msg:focus-within .msg-menu { opacity: .7; }
@media (pointer: coarse) { .msg-menu { opacity: .35; } }
.msg.user .msg-menu { order: -1; }
.msg-actions { flex-wrap: wrap; }

/* Side characters */
.speaker { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 -2px 2px; font-size: 12.5px; font-weight: 600; color: var(--sc, var(--muted)); }
.speaker i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font: 700 11px var(--sans); font-style: normal; color: #120d14; background: var(--sc); }
.speaker.main { color: var(--accent); }
.say.side { margin-left: 12px; background: color-mix(in srgb, var(--sc) 14%, rgba(28, 23, 32, .94)); border-color: color-mix(in srgb, var(--sc) 30%, transparent); }

.typing { display: flex; gap: 4px; padding: 12px 16px; background: rgba(36,30,41,.92); border-radius: 4px 18px 18px 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; }
.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.error-card { margin: 6px auto 14px; max-width: 420px; text-align: center; padding: 14px 16px; border-radius: 16px; background: rgba(255,90,100,.12); border: 1px solid rgba(255,90,100,.3); }
.error-card p { margin: 0 0 10px; font-size: 14px; }

.composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(14,11,16,.8); backdrop-filter: blur(14px); border-top: 1px solid rgba(255,255,255,.06); }
.composer textarea { flex: 1; resize: none; max-height: 140px; overflow-y: auto; scrollbar-width: none; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 11px 16px; outline: 0; line-height: 1.4; }
.composer textarea:focus { border-color: #4a3d50; }
.send { width: 44px; height: 44px; flex: none; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #1a0910; font-size: 17px; display: grid; place-items: center; }
.composer.busy .send { background: var(--panel-2); color: var(--text); border: 1px solid var(--line); }

/* ── Onboarding & settings ──────────────────────────── */
.onboard { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.onboard-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 24px; padding: 26px; text-align: center; }
.onboard-img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 14px; }
.onboard h1 { font: 600 26px var(--serif); margin: 0 0 4px; }
.onboard form { text-align: left; display: grid; gap: 16px; margin-top: 18px; }

label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
input:not([type=radio]):not([type=checkbox]):not([type=range]), select {
  width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 14px; outline: 0; font-weight: 400;
}
input:focus, select:focus { border-color: var(--accent); }
input[type=range] { accent-color: var(--accent); }
fieldset.pron { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
fieldset.pron legend { font-size: 14px; font-weight: 600; margin-bottom: 6px; padding: 0; }
fieldset.pron label { display: block; }
fieldset.pron input { position: absolute; opacity: 0; }
fieldset.pron span { display: block; text-align: center; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-weight: 500; font-size: 13.5px; cursor: pointer; }
fieldset.pron input:checked + span { border-color: var(--accent); background: rgba(255,122,156,.12); color: var(--accent); }
fieldset.pron input:focus-visible + span { outline: 2px solid var(--accent); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 18px; height: 18px; }

.settings { max-width: 640px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; margin-bottom: 16px; display: grid; gap: 14px; }
.panel h2 { margin: 0; font: 600 19px var(--serif); }
.panel p { margin: 0; }
.panel a { color: var(--accent); }
.key-row { display: flex; gap: 8px; }
.ok { color: var(--green); }
.bad { color: var(--red); }
.danger-zone { margin-top: 26px; }

/* ── Language ───────────────────────────────────────── */
.sidebar nav a b, .tabbar a b { font-weight: inherit; }
.lang-switch { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; padding: 3px; flex: none; }
.lang-switch button { padding: 6px 12px; border-radius: 99px; font-size: 13px; color: var(--muted); }
.lang-switch button.on { background: var(--text); color: var(--bg); font-weight: 600; }
fieldset.langs { grid-template-columns: 1fr 1fr; }
/* Chinese has no true italics: narration stays upright, set apart by colour and font. */
:lang(zh) .narr, :lang(zh) .hook, :lang(zh) .swipe-quote i, :lang(zh) .lightbox figcaption { font-style: normal; }
:lang(zh) body { line-height: 1.65; }
:lang(zh) .say, :lang(zh) .msg.user .bubble { letter-spacing: .02em; }

/* iPhone: 16px+ inputs stop Safari from zooming in when typing. */
@media (pointer: coarse) {
  input:not([type=radio]):not([type=checkbox]):not([type=range]), select, textarea { font-size: 16px; }
}
