:root {
  --bg: #f2f2f7; --panel: #ffffff; --panel-2: #f2f2f7; --fg: #1d1d1f; --muted: #6e6e73; --line: #e3e3e8;
  --accent: #1d1d1f; --accent-ink: #ffffff; --accent-soft: #ebebf0; --accent-fg: #1d1d1f;
  --gold: #8a6f45; --gold-fill: #c9b088; --gold-soft: #f4eee4; --gold-ink: #1d1d1f;
  --wall: #f2f2f7; --wall-dot: rgba(0, 0, 0, .035);
  --in: #ffffff; --in-fg: #1d1d1f; --out: #1d1d1f; --out-fg: #ffffff; --out-meta: rgba(255, 255, 255, .62); --read: #d6bf96;
  --danger: #e5352b; --ok: #248a3d; --online: #34c759; --hover: #f5f5f7; --sel: #ebebf0; --chip: #e8e8ed;
  --bar: rgba(242, 242, 247, .82); --bar-line: rgba(0, 0, 0, .08);
  --warn-bg: #fbf3e2; --warn-fg: #5e4718; --toast-bg: rgba(29, 29, 31, .94); --toast-fg: #f5f5f7;
  --av-a: #a7a7ad; --av-b: #7c7c82;
  --shadow: 0 1px 1px rgba(0, 0, 0, .04); --shadow-lg: 0 14px 44px rgba(0, 0, 0, .16);
  --scrim: rgba(0, 0, 0, .38);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --r: 18px; --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #000000; --panel: #1c1c1e; --panel-2: #2c2c2e; --fg: #f5f5f7; --muted: #98989f; --line: #2f2f32;
  --accent: #f5f5f7; --accent-ink: #000000; --accent-soft: #2c2c2e; --accent-fg: #f5f5f7;
  --gold: #d5bd92; --gold-fill: #c9b088; --gold-soft: #2b2519; --gold-ink: #1d1d1f;
  --wall: #000000; --wall-dot: rgba(255, 255, 255, .035);
  --in: #1c1c1e; --in-fg: #f5f5f7; --out: #f5f5f7; --out-fg: #000000; --out-meta: rgba(0, 0, 0, .5); --read: #8a6f45;
  --danger: #ff453a; --ok: #30d158; --online: #30d158; --hover: #2c2c2e; --sel: #2c2c2e; --chip: #2c2c2e;
  --bar: rgba(10, 10, 11, .78); --bar-line: rgba(255, 255, 255, .09);
  --warn-bg: #2b2519; --warn-fg: #e9d6ae; --toast-bg: rgba(58, 58, 60, .96); --toast-fg: #f5f5f7;
  --av-a: #636366; --av-b: #48484a;
  --shadow: 0 1px 1px rgba(0, 0, 0, .3); --shadow-lg: 0 14px 44px rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}}
:root[data-theme="dark"] {
  --bg: #000000; --panel: #1c1c1e; --panel-2: #2c2c2e; --fg: #f5f5f7; --muted: #98989f; --line: #2f2f32;
  --accent: #f5f5f7; --accent-ink: #000000; --accent-soft: #2c2c2e; --accent-fg: #f5f5f7;
  --gold: #d5bd92; --gold-fill: #c9b088; --gold-soft: #2b2519; --gold-ink: #1d1d1f;
  --wall: #000000; --wall-dot: rgba(255, 255, 255, .035);
  --in: #1c1c1e; --in-fg: #f5f5f7; --out: #f5f5f7; --out-fg: #000000; --out-meta: rgba(0, 0, 0, .5); --read: #8a6f45;
  --danger: #ff453a; --ok: #30d158; --online: #30d158; --hover: #2c2c2e; --sel: #2c2c2e; --chip: #2c2c2e;
  --bar: rgba(10, 10, 11, .78); --bar-line: rgba(255, 255, 255, .09);
  --warn-bg: #2b2519; --warn-fg: #e9d6ae; --toast-bg: rgba(58, 58, 60, .96); --toast-fg: #f5f5f7;
  --av-a: #636366; --av-b: #48484a;
  --shadow: 0 1px 1px rgba(0, 0, 0, .3); --shadow-lg: 0 14px 44px rgba(0, 0, 0, .6); --scrim: rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font-family: var(--font); font-size: 15px; line-height: 1.4; }
body { overflow: hidden; overscroll-behavior: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: var(--accent-fg); }
[hidden] { display: none !important; }
.ic { width: 24px; height: 24px; flex: none; display: block; }
.ic.sm { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; margin-right: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }

#app { height: 100dvh; display: flex; flex-direction: column; }

.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); }
.boot-err { max-width: 340px; text-align: center; padding: 20px; }
.logo { width: 48px; height: 48px; background: var(--fg);
  -webkit-mask: url(icons/logo-mask.png) center / contain no-repeat; mask: url(icons/logo-mask.png) center / contain no-repeat; }
.logo > * { display: none; }
.logo.big { width: 64px; height: 64px; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.92); opacity: .8; } }

.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.field { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--panel-2); outline: none; font-size: 16px; }
.field:focus { border-color: var(--accent); background: var(--panel); }
textarea.field { resize: none; }
.hint { font-size: 12px; color: var(--muted); margin-top: -6px; }
.hint.ok { color: var(--ok); } .hint.bad { color: var(--danger); }
.agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.agree input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.auth-err { min-height: 18px; color: var(--danger); font-size: 13px; }
.auth-err.ok { color: var(--ok); }
.linkbtn { color: var(--accent-fg); font-weight: 600; font-size: 14px; }
.linkbtn.center { align-self: center; } .linkbtn.right { align-self: flex-end; margin-top: -4px; }

#auth { --a-bg: #000; --a-card: rgba(28, 28, 30, .55); --a-line: rgba(255, 255, 255, .12); --a-line-hi: rgba(255, 255, 255, .28);
  --a-fg: #f5f5f7; --a-muted: rgba(235, 235, 245, .6); --a-accent: #d5bd92; --a-field: rgba(255, 255, 255, .05);
  --a-err: #ff6961; --a-ok: #30d158; --a-btn: #f5f5f7; --a-btn-ink: #000;
  flex: 1; overflow: auto; position: relative; background: var(--a-bg); color: var(--a-fg); color-scheme: dark; }
.smoke { position: fixed; inset: 0; width: 100%; height: 100%; filter: blur(30px); transform: scale(1.1); pointer-events: none; }
.auth-wrap { position: relative; z-index: 1; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 16px calc(28px + var(--safe-b)); gap: 14px; }
.auth-lang { display: flex; gap: 6px; }
.achip { padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--a-muted); border: 1px solid transparent; }
.achip[aria-pressed="true"] { color: var(--a-fg); border-color: var(--a-line-hi); background: rgba(255, 255, 255, .06); }
.auth-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 14px; padding: 28px 22px 22px; border-radius: 28px;
  background: var(--a-card); border: 1px solid var(--a-line); box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); }
.auth-head { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin-bottom: 4px; }
.auth-head .logo { width: 56px; height: 56px; background: var(--a-fg); }
.auth-head h1 { margin: 14px 0 0; font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.auth-head p { margin: 0; color: var(--a-muted); font-size: 15px; max-width: 32ch; text-wrap: balance; }

.seg-label { font-size: 13px; font-weight: 600; color: var(--a-muted); margin-bottom: -6px; }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 16px; background: var(--a-field); border: 1px solid var(--a-line); }
.seg-btn { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 4px; border-radius: 12px; font-size: 13.5px; font-weight: 600; color: var(--a-muted); transition: background .15s, color .15s; }
.seg-btn .ic.sm { margin: 0; }
.seg-btn[aria-checked="true"] { background: rgba(255, 255, 255, .14); color: var(--a-fg); box-shadow: inset 0 0 0 1px var(--a-line-hi); }

.afields { display: flex; flex-direction: column; gap: 10px; }
.afield-group { display: flex; flex-direction: column; gap: 6px; }
.afield { position: relative; display: flex; align-items: center; height: 58px; border-radius: 16px; background: var(--a-field); border: 1px solid var(--a-line); transition: border-color .15s, background .15s; }
.afield:focus-within { border-color: var(--a-line-hi); background: rgba(255, 255, 255, .08); }
.afield-ic { position: absolute; left: 14px; color: var(--a-muted); display: grid; }
.afield-ic .ic { width: 20px; height: 20px; }
.afield:focus-within .afield-ic { color: var(--a-fg); }
.afield-input { width: 100%; height: 100%; border: 0; outline: none; background: none; color: var(--a-fg); font-size: 16px; padding: 20px 14px 4px 46px; border-radius: inherit; }
.afield-input::placeholder { color: transparent; }
.afield-label { position: absolute; left: 46px; top: 50%; transform: translateY(-50%); color: var(--a-muted); font-size: 15px; pointer-events: none; transition: top .15s, font-size .15s, transform .15s; }
.afield-input:focus + .afield-label, .afield-input:not(:placeholder-shown) + .afield-label, .afield.has-value .afield-label { top: 13px; transform: none; font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.afield-input[type="date"] { color-scheme: dark; }
.afield-input:-webkit-autofill { -webkit-text-fill-color: var(--a-fg); transition: background-color 9999s; }

.pin-block { display: flex; flex-direction: column; gap: 8px; }
.pin-row { display: flex; align-items: center; justify-content: space-between; }
.pin-label { font-size: 13px; font-weight: 600; color: var(--a-muted); display: flex; align-items: center; gap: 4px; }
.pin-label .ic.sm { margin: 0; }
.pin { display: flex; align-items: center; gap: 8px; }
.pin-box { position: relative; flex: 1; min-width: 0; }
.pin-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.pin-cell { height: 54px; border-radius: 14px; background: var(--a-field); border: 1px solid var(--a-line); display: grid; place-items: center;
  font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; transition: border-color .12s, background .12s; }
.pin-cell.filled { border-color: var(--a-line-hi); background: rgba(255, 255, 255, .09); }
.pin-cell.cur { border-color: var(--a-fg); box-shadow: 0 0 0 3px rgba(255, 255, 255, .12); }
.pin-real { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; font-size: 16px; border: 0; cursor: text; caret-color: transparent; }
.pin-eye { width: 44px; height: 54px; border-radius: 14px; display: grid; place-items: center; color: var(--a-muted); border: 1px solid var(--a-line); flex: none; }
.pin-eye[aria-pressed="true"] { color: var(--a-fg); border-color: var(--a-line-hi); }

.abtn { display: flex; align-items: center; justify-content: center; gap: 8px; height: 54px; border-radius: 16px; background: var(--a-btn); color: var(--a-btn-ink);
  font-size: 16px; font-weight: 600; margin-top: 2px; transition: transform .1s, opacity .2s; }
.abtn .ic { width: 20px; height: 20px; }
.ic.flip { transform: scaleX(-1); }
.abtn:active { transform: scale(.985); }
.abtn:disabled { opacity: .6; cursor: default; }
.abtn.busy span::after { content: '…'; }
#auth .linkbtn { color: var(--a-accent); font-size: 13.5px; }
#auth .hint { color: var(--a-muted); font-size: 12.5px; margin: 0 4px; }
#auth .hint.ok { color: var(--a-ok); } #auth .hint.bad { color: var(--a-err); }
#auth .auth-err { min-height: 18px; color: var(--a-err); font-size: 13.5px; }
#auth .auth-err.ok { color: var(--a-ok); }
#auth .agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--a-muted); }
#auth .agree input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--a-accent); flex: none; }
.auth-swap { margin: 2px 0 0; text-align: center; font-size: 13.5px; color: var(--a-muted); }
.auth-note { margin: 0; font-size: 13px; color: var(--a-muted); }
#auth .demo-note { max-width: 420px; display: flex; gap: 8px; font-size: 12.5px; color: var(--a-muted); align-items: flex-start; }
#auth .demo-note .ic { width: 18px; height: 18px; flex: none; }
@media (max-width: 380px) { .pin-cell { height: 48px; font-size: 19px; } .pin-cells { gap: 5px; } .auth-card { padding: 24px 16px 18px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 18px; border-radius: 14px; font-weight: 700; transition: transform .1s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.ghost { background: var(--chip); }
.btn.sm { padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn.sm .ic { width: 18px; height: 18px; }
.btn.wide { width: 100%; }
.btn.sticky { position: sticky; bottom: 0; margin-top: 12px; box-shadow: 0 -8px 16px var(--panel); }
.ib { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; color: var(--muted); transition: background .15s; }
.ib:hover { background: var(--hover); }
.ib.accent { color: var(--accent-fg); }
.ib.danger { color: var(--danger); }
.ib.inline { display: inline-grid; width: 34px; height: 34px; vertical-align: middle; }
.ib.inline .ic { width: 18px; height: 18px; }
.chip { padding: 7px 14px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 600; color: var(--muted); }
.chip[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-fg); }

.av { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 600; letter-spacing: .01em; background-image: linear-gradient(180deg, var(--av-a), var(--av-b)); overflow: hidden; flex: none; position: relative; user-select: none; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av .ic { width: 55%; height: 55%; }
.av-ai { background: var(--accent) !important; color: var(--accent-ink); }
.av.round-ic { width: 44px; height: 44px; background: var(--accent); }
.av.round-ic.big { width: 84px; height: 84px; }
.av-wrap { position: relative; flex: none; }
.dot { position: absolute; right: 1px; bottom: 1px; width: 13px; height: 13px; border-radius: 50%; background: var(--online); border: 2.5px solid var(--panel); }
.ai-badge { margin-left: 6px; font-size: 10px; font-weight: 800; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; vertical-align: 2px;
  background: var(--chip); color: var(--muted); }

#shell { flex: 1; display: flex; min-height: 0; position: relative; overflow: hidden; }
.pane { min-height: 0; display: flex; flex-direction: column; background: var(--bg); }
.side { width: 100%; position: relative; }
.main { position: absolute; inset: 0; transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.8,.2,1); z-index: 5; background: var(--wall); visibility: hidden; }
#shell.chat-open .main { transform: none; visibility: visible; }
@media (min-width: 900px) {
  .side { width: 380px; border-right: 1px solid var(--line); flex: none; }
  .main { position: static; transform: none; flex: 1; visibility: visible; }
  .chead .back { display: none; }
}

.top { display: flex; align-items: center; gap: 4px; padding: calc(10px + var(--safe-t)) 8px 6px 18px; min-height: 60px; }
.brand { flex: 1; font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: -.025em; }
.side-body { flex: 1; min-height: 0; overflow: auto; position: relative; display: flex; flex-direction: column; }
.demo-bar, .offline-bar { margin: 0 12px 8px; padding: 9px 12px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-fg); font-size: 12.5px; display: flex; gap: 8px; align-items: center; }
.demo-bar .ic { width: 18px; height: 18px; }
.offline-bar { background: var(--warn-bg); color: var(--warn-fg); }

.search { display: flex; align-items: center; gap: 8px; margin: 2px 12px 8px; padding: 0 12px; height: 42px; border-radius: 14px; background: var(--chip); color: var(--muted); }
.search .ic { width: 20px; height: 20px; }
.search input { flex: 1; border: 0; background: none; outline: none; height: 100%; font-size: 15px; min-width: 0; }
.chips { display: flex; gap: 8px; padding: 0 12px 6px; overflow-x: auto; scrollbar-width: none; }

.list { display: flex; flex-direction: column; padding-bottom: 90px; }
.side-body > .list { flex: 1 0 auto; }
.list-label { padding: 12px 18px 6px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.row { display: flex; align-items: center; gap: 13px; padding: 9px 14px; text-align: left; width: 100%; transition: background .12s; border-radius: 0; }
.row:hover { background: var(--hover); }
.row.sel { background: var(--sel); }
.row.static:hover { background: none; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-top { display: flex; align-items: baseline; gap: 8px; }
.row-title { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-time { font-size: 12px; color: var(--muted); flex: none; }
.row.has-unread .row-time { color: var(--accent-fg); font-weight: 700; }
.row-sub { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; min-width: 0; }
.row-sub > span:first-child, .row-sub .pv { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub.missed, .pv.missed { color: var(--danger); }
.row-sub .typing, .typing { color: var(--accent-fg); font-weight: 600; animation: hm-blink 1.4s ease-in-out infinite; }
@keyframes hm-blink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .typing { animation: none; } }
.pv .tick { width: 17px; height: 17px; display: inline-block; vertical-align: -4px; margin-right: 2px; color: var(--muted); }
.pv .tick.read { color: var(--gold); }
.badge { min-width: 21px; height: 21px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; flex: none; }
.tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-fg); }
.empty { padding: 40px 24px; text-align: center; color: var(--muted); }
.muted { color: var(--muted); }
.sm { font-size: 13px; }

.fab { position: sticky; bottom: 16px; align-self: flex-end; margin: -74px 16px 16px 0; flex: none; width: 58px; height: 58px; border-radius: 20px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; box-shadow: var(--shadow-lg); z-index: 2; }

.tabs { display: flex; border-top: 1px solid var(--bar-line); padding-bottom: var(--safe-b); background: var(--bar); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 0 7px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tab-ic { position: relative; padding: 3px 18px; border-radius: 999px; transition: background .15s; }
.tab[aria-current="page"] { color: var(--fg); }
.tab[aria-current="page"] .tab-ic { background: var(--accent-soft); color: var(--accent-fg); }
.tab-badge { position: absolute; top: -4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

.settings { padding: 4px 12px 24px; display: flex; flex-direction: column; gap: 14px; }
.me-card { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; background: var(--panel); border-radius: 22px; text-align: center; }
.me-av { position: relative; border-radius: 50%; }
.me-cam { position: absolute; right: -2px; bottom: -2px; width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; border: 3px solid var(--panel-2); }
.me-cam .ic { width: 16px; height: 16px; }
.me-name { font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -.015em; margin-top: 8px; display: flex; align-items: center; justify-content: center; }
.me-user { color: var(--accent-fg); font-weight: 600; }
.me-about { color: var(--muted); max-width: 300px; }
.me-card .btn { margin-top: 10px; }
.set-group { background: var(--panel); border-radius: 14px; overflow: hidden; }
.set-item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; text-align: left; }
.set-item + .set-item { border-top: 1px solid var(--line); }
.set-item:hover { background: var(--hover); }
.set-item .ic { color: var(--muted); }
.set-item.danger, .set-item.danger .ic { color: var(--danger); }
.set-label { display: flex; flex-direction: column; font-weight: 600; min-width: 0; }
.set-label small { color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.ver { text-align: center; color: var(--muted); font-size: 12px; }

.welcome { flex: 1; display: grid; place-content: center; justify-items: center; text-align: center; gap: 6px; color: var(--muted); padding: 24px; }
.welcome h2 { margin: 12px 0 0; color: var(--fg); }
.chat { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative;
  background-color: var(--wall); background-image: radial-gradient(var(--wall-dot) 1.2px, transparent 1.3px); background-size: 22px 22px; }
.chead { display: flex; align-items: center; gap: 2px; padding: calc(6px + var(--safe-t)) 4px 6px; background: var(--bar); border-bottom: 1px solid var(--bar-line); min-height: 60px; position: relative; z-index: 2; -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); }
.chead-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 12px; text-align: left; }
.chead-text { min-width: 0; display: flex; flex-direction: column; }
.ctitle { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.csub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chead .ib { color: var(--fg); }

.msgs { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.msgs-inner { display: flex; flex-direction: column; padding: 10px 10px 6px; max-width: 860px; margin: 0 auto; min-height: 100%; justify-content: flex-end; }
.older { text-align: center; font-size: 12px; color: var(--muted); padding: 8px; }
.day, .unread-sep, .sys { display: flex; justify-content: center; margin: 10px 0 6px; }
.day span, .sys span { padding: 5px 12px; border-radius: 10px; background: var(--panel); color: var(--muted); font-size: 12px; font-weight: 600; box-shadow: var(--shadow); text-align: center; max-width: 85%; }
.unread-sep span { padding: 5px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-fg); font-size: 12px; font-weight: 700; }

.msg { display: flex; flex-direction: column; max-width: min(78%, 520px); margin-top: 2px; position: relative; }
.msg.first { margin-top: 8px; }
.msg.in { align-self: flex-start; align-items: flex-start; }
.msg.out { align-self: flex-end; align-items: flex-end; }
.bubble { position: relative; padding: 7px 10px 6px 11px; border-radius: var(--r); box-shadow: var(--shadow); min-width: 64px; max-width: 100%; transition: transform .15s; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.in .bubble { background: var(--in); color: var(--in-fg); }
.msg.out .bubble { background: var(--out); color: var(--out-fg); }
.msg.in.first .bubble { border-top-left-radius: 6px; }
.msg.out.first .bubble { border-top-right-radius: 6px; }
.msg.ai .bubble { border: 1px solid var(--line); }
.sender { font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 1px; }
.txt { white-space: pre-wrap; }
.txt a { color: inherit; text-decoration: underline; }
.txt.big { font-size: 40px; line-height: 1.15; }
.bubble:has(.txt.big) { background: none !important; box-shadow: none; padding: 0 2px; }
.msg.out .bubble:has(.txt.big) .meta { color: var(--muted); }
.meta { float: right; margin: 6px -2px -2px 10px; font-size: 11px; display: inline-flex; align-items: center; gap: 3px; opacity: .8; position: relative; top: 4px; white-space: nowrap; }
.msg.out .meta { color: var(--out-meta); opacity: 1; }
.msg.in .meta { color: var(--muted); }
.meta .tick { width: 16px; height: 16px; }
.meta .tick.read { color: var(--read); }
.deleted .txt { font-style: italic; opacity: .75; }
.quote { display: flex; flex-direction: column; text-align: left; padding: 6px 10px; margin: 2px 0 5px; border-radius: 10px; border-left: 3px solid var(--muted); background: var(--panel-2); font-size: 13px; max-width: 100%; width: 100%; }
.msg.out .quote { background: rgba(255,255,255,.16); border-left-color: #fff; }
.quote b { font-size: 12.5px; color: var(--accent-fg); }
.msg.out .quote b { color: #fff; }
.quote span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.bubble.has-media { padding: 4px 4px 6px; }
.bubble.has-media .txt { padding: 4px 6px 0; }
.bubble.has-media > .meta { margin-right: 4px; }
.mimg { display: block; width: min(300px, 64vw); border-radius: 14px; overflow: hidden; background: rgba(0,0,0,.08); }
.mimg img, .mvid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mvid { width: min(300px, 64vw); border-radius: 14px; overflow: hidden; background: #000; }
.mvid video { height: auto; max-height: 360px; object-fit: contain; }
.mfile, .mcall { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px; min-width: 210px; text-decoration: none; color: inherit; }
.fic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--panel-2); color: var(--fg); flex: none; }
.msg.out .fic { background: color-mix(in srgb, var(--out-fg) 12%, transparent); color: var(--out-fg); }
.fmeta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.fmeta b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.fmeta small { opacity: .75; }
.mcall.missed .fic { color: var(--danger); }
.voice { display: flex; align-items: center; gap: 10px; min-width: 220px; padding: 4px 2px 0; }
.vplay { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; flex: none; }
.msg.out .vplay { background: #fff; color: var(--out); }
.vmid { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.vbar { height: 6px; border-radius: 3px; background: rgba(128, 128, 136, .28); cursor: pointer; overflow: hidden; }
.msg.out .vbar { background: rgba(255,255,255,.3); }
.vbar i { display: block; height: 100%; width: 0; background: currentColor; border-radius: 3px; }
.vtime { font-size: 11.5px; opacity: .8; }
.rx { display: flex; gap: 4px; margin: -6px 8px 2px; z-index: 1; flex-wrap: wrap; }
.rx-chip { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; background: var(--panel); box-shadow: var(--shadow); border: 1.5px solid var(--wall); font-size: 14px; }
.rx-chip small { font-size: 11px; color: var(--muted); font-weight: 700; }
.rx-chip.mine { border-color: var(--accent); }
.mmore { position: absolute; top: 4px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--panel); color: var(--muted); box-shadow: var(--shadow); opacity: 0; transition: opacity .15s; }
.mmore .ic { width: 18px; height: 18px; }
.msg.in .mmore { right: -32px; } .msg.out .mmore { left: -32px; }
.msg:hover .mmore { opacity: 1; }
.msg.flash .bubble { animation: flash 1.2s ease; }
@keyframes flash { 30% { box-shadow: 0 0 0 4px var(--accent); } }
.dots { display: inline-flex; gap: 4px; padding: 6px 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.jump { position: absolute; right: 14px; bottom: 84px; width: 42px; height: 42px; border-radius: 50%; background: var(--panel); box-shadow: var(--shadow-lg); display: grid; place-items: center; color: var(--muted); z-index: 3; }
.jump .badge { position: absolute; top: -6px; right: -4px; }

.cbottom { padding: 6px 8px calc(8px + var(--safe-b)); display: flex; flex-direction: column; gap: 6px; }
.netbar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 16px; background: var(--warn-bg); color: var(--warn-fg); box-shadow: var(--shadow); max-width: 860px; width: 100%; margin: 0 auto; }
.netbar-ic .ic { width: 20px; height: 20px; }
.netbar-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.netbar-txt small { opacity: .85; }
.netbar .btn { flex: none; white-space: nowrap; }
.sms-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; padding: 1px 4px; border-radius: 4px; background: rgba(255,255,255,.22); margin-right: 2px; }
.msg.in .sms-tag { background: var(--chip); }
.replybar { display: flex; align-items: center; gap: 6px; background: var(--panel); border-radius: 16px; padding: 6px 6px 6px 8px; box-shadow: var(--shadow); max-width: 860px; width: 100%; margin: 0 auto; }
.replybar .quote { margin: 0; flex: 1; min-width: 0; }
.progress { position: relative; height: 26px; border-radius: 13px; background: var(--panel); overflow: hidden; box-shadow: var(--shadow); max-width: 860px; width: 100%; margin: 0 auto; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); transition: width .2s; }
.progress span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 26px; font-weight: 600; color: var(--accent-fg); }
.composer { display: flex; align-items: flex-end; gap: 6px; max-width: 860px; width: 100%; margin: 0 auto; }
.composer.flat { padding: 12px 0 0; }
.cfield { flex: 1; min-width: 0; display: flex; align-items: flex-end; background: var(--panel); border-radius: 24px; box-shadow: var(--shadow); padding: 3px; min-height: 50px; }
.cfield textarea { flex: 1; min-width: 0; border: 0; outline: none; background: none; resize: none; padding: 12px 4px; font-size: 16px; line-height: 1.35; max-height: 140px; }
.cfield .field { border: 0; background: none; }
.cfield .ib { width: 44px; height: 44px; }
.send { width: 50px; height: 50px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; box-shadow: none; transition: transform .1s; }
.send:active { transform: scale(.92); }
.cfield.rec { align-items: center; gap: 10px; padding-right: 16px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1s infinite; }
.rec-time { font-variant-numeric: tabular-nums; font-weight: 700; }
.rec-hint { color: var(--muted); font-size: 13px; flex: 1; text-align: right; }
.blocked-bar { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; text-align: center; padding: 12px; background: var(--panel); border-radius: 16px; color: var(--muted); font-size: 14px; box-shadow: var(--shadow); }

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .2s; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 88dvh; background: var(--panel); border-radius: 24px 24px 0 0; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; transform: translateY(100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); padding-bottom: var(--safe-b); }
.sheet.full { height: 92dvh; }
.sheet-wrap.in .scrim { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; }
@media (min-width: 700px) {
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 24px; transform: translateY(24px) scale(.98); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet-wrap.in .sheet { opacity: 1; }
  .sheet.full { height: min(760px, 90dvh); }
}
.sheet::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 4px 20px; }
.sheet-head h2 { flex: 1; margin: 0; font-family: var(--font-display); font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.sheet-body { overflow: auto; padding: 8px 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.sheet-body > .search { margin: 0; }
.sheet-body .row { padding: 8px 6px; border-radius: 14px; }
.sheet-body .list { padding-bottom: 8px; }
.sheet-body .list-label { padding: 8px 6px 2px; }
.dlg-text { margin: 4px 0; font-size: 16px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.opt-list { display: flex; flex-direction: column; }
.opt { display: flex; align-items: center; gap: 14px; padding: 13px 8px; border-radius: 12px; text-align: left; font-weight: 600; width: 100%; }
.opt:hover { background: var(--hover); }
.opt .ic { color: var(--muted); }
.opt[aria-pressed="true"] { color: var(--accent-fg); }
.opt[aria-pressed="true"] .ic { color: var(--accent-fg); margin-left: auto; }
.opt.danger, .opt.danger .ic { color: var(--danger); }
.opt.accent, .opt.accent .ic { color: var(--accent-fg); }
.rx-pick { display: flex; justify-content: space-between; background: var(--panel-2); border-radius: 999px; padding: 6px; }
.rx-pick button { width: 46px; height: 46px; border-radius: 50%; font-size: 26px; transition: transform .1s; }
.rx-pick button:active { transform: scale(1.25); }
.rx-pick button.on { background: var(--accent-soft); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; max-height: 46dvh; overflow: auto; }
.emoji-grid button { font-size: 26px; height: 44px; border-radius: 10px; }
.emoji-grid button:hover { background: var(--hover); }
.att-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 6px 0 10px; }
.att { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; padding: 8px 4px; border-radius: 14px; }
.att-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--panel-2); color: var(--fg); }
.prose p { margin: 0 0 10px; }
.preview { flex: 1; display: grid; place-items: center; background: #000; border-radius: 16px; overflow: hidden; min-height: 200px; }
.preview img { max-width: 100%; max-height: 58dvh; object-fit: contain; display: block; }
.picked { display: flex; gap: 6px; flex-wrap: wrap; }
.pchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px 3px 3px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-fg); font-weight: 600; font-size: 13px; }
.checkbox { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: none; }
.checkbox.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.checkbox .ic { width: 16px; height: 16px; }
.center-col { display: flex; justify-content: center; padding: 8px 0; }

.info-top { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; padding: 6px 0 12px; }
.info-top h2 { margin: 10px 0 0; font-size: 22px; display: flex; align-items: center; gap: 4px; }
.info-actions { display: flex; gap: 10px; margin-top: 14px; }
.pill { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 16px; border-radius: 16px; background: var(--panel-2); color: var(--accent-fg); font-size: 12.5px; font-weight: 700; min-width: 110px; }
.info-sec { background: var(--panel-2); border-radius: 18px; padding: 10px 12px; }
.info-sec h3 { margin: 4px 6px 8px; font-size: 13px; color: var(--muted); font-weight: 700; }
.info-sec p { margin: 0 6px 6px; }
.media-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mthumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #000; display: grid; place-items: center; color: #fff; }
.mthumb img { width: 100%; height: 100%; object-fit: cover; }

.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.94); display: flex; flex-direction: column; opacity: 0; transition: opacity .18s; color: #fff; }
.viewer.in { opacity: 1; }
.viewer-top { display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 8px 8px; }
.viewer-top .ib { color: #fff; }
.viewer-who { flex: 1; display: flex; flex-direction: column; }
.viewer-who small { opacity: .7; }
.viewer-img { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px; }
.viewer-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.viewer-cap { padding: 12px 16px calc(16px + var(--safe-b)); text-align: center; }

.call { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  background: radial-gradient(900px 640px at 50% 0%, #2c2c2e, #000 72%); color: #fff; padding: calc(40px + var(--safe-t)) 16px calc(28px + var(--safe-b));
  opacity: 0; transition: opacity .2s; }
.call.in { opacity: 1; }
.call .rv { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; display: none; }
.call.video.live .rv { display: block; }
.call.demo-mirror .rv { transform: scaleX(-1); filter: saturate(.6) blur(1px); }
.call .lv { position: absolute; right: 14px; top: calc(14px + var(--safe-t)); width: 110px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 16px; background: #222; box-shadow: var(--shadow-lg); transform: scaleX(-1); display: none; z-index: 2; }
.call.video .lv { display: block; }
.call-who { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 1; text-align: center; margin-top: 30px; }
.call.video.live .call-who { margin-top: 0; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.call.video.live .call-who .av { display: none; }
.call-name { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.call-status { opacity: .85; font-variant-numeric: tabular-nums; }
.call-demo { margin-top: 8px; font-size: 12px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.14); }
.call-ctrl { position: relative; z-index: 2; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }
.cbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #fff; }
.cbtn .ic { width: 64px; height: 64px; padding: 19px; border-radius: 50%; background: rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.cbtn.on .ic { background: #fff; color: #000; }
.cbtn.red .ic { background: #ff3b30; }
.cbtn.green .ic { background: #34c759; animation: pulse 1.2s infinite; }

#toast { position: fixed; left: 50%; bottom: calc(86px + var(--safe-b)); transform: translate(-50%, 20px); background: var(--toast-bg); color: var(--toast-fg); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); padding: 11px 18px; border-radius: 14px;
  font-size: 14px; font-weight: 600; max-width: calc(100% - 32px); width: max-content; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 100; box-shadow: var(--shadow-lg); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

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

.plus-badge { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-left: 5px; border-radius: 6px; font-size: 13px; font-weight: 900; line-height: 1;
  color: var(--gold-ink); background: var(--gold-fill); vertical-align: 1px; flex: none; }
.av-plus { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--gold-fill); background-clip: padding-box; }
.plus-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; width: 100%; text-align: left; color: #fff;
  background: #000; box-shadow: inset 0 0 0 1px rgba(201, 176, 136, .45); }
.plus-card .set-label b { color: #f5f5f7; }
.plus-card .set-label small { color: rgba(235, 235, 245, .62); }
.plus-card .chev { transform: rotate(-90deg); opacity: .9; }
.plus-logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(201, 176, 136, .14); color: var(--gold-fill); flex: none; }
.plus-logo.big { width: 64px; height: 64px; border-radius: 20px; background: #000; color: var(--gold-fill); box-shadow: inset 0 0 0 1px rgba(201, 176, 136, .5); }
.plus-logo.big .ic { width: 34px; height: 34px; }
.plus-hero { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 4px; }
.plus-hero h2 { margin: 12px 0 0; font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.plus-hero p { margin: 0; color: var(--muted); }
.feat-h { margin: 10px 2px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.feat { display: flex; gap: 12px; align-items: flex-start; padding: 6px 2px; }
.feat-ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-fg); flex: none; }
.feat-ic .ic { width: 20px; height: 20px; }
.feat .set-label small { margin-top: 1px; }
.plus-lock { margin-left: auto; font-size: 10.5px; font-weight: 800; padding: 3px 7px; border-radius: 7px; color: var(--gold); background: var(--gold-soft); flex: none; }
.center { text-align: center; }
.ai-wait { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 18px 4px; }
.ai-out { white-space: pre-wrap; background: var(--panel-2); border-radius: 16px; padding: 14px; line-height: 1.5; }
.quote.static { margin: 0; }
.sug { text-align: left; padding: 13px 14px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-fg); font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.swatch { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 10px; border-radius: 16px; background: var(--panel-2); font-size: 13px; font-weight: 600; border: 2px solid transparent; }
.swatch.on { border-color: var(--accent); }
.swatch .plus-lock { position: absolute; top: 6px; right: 6px; margin: 0; padding: 2px 6px; }
.sw-dot { width: 40px; height: 40px; border-radius: 50%; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.sw-wall { width: 64px; height: 48px; border-radius: 10px; border: 1px solid var(--line); }

:root[data-accent="ocean"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #0b84d8; --out: #0b84d8; --accent-soft: #e2f2fd; --accent-fg: #0a6fb6; }
:root[data-accent="forest"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #1f9d55; --out: #1f9d55; --accent-soft: #e3f6ea; --accent-fg: #187a43; }
:root[data-accent="sunset"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #f0592a; --out: #e8501f; --accent-soft: #fde9e1; --accent-fg: #c9451c; }
:root[data-accent="rose"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #e0377c; --out: #d92f73; --accent-soft: #fce6ef; --accent-fg: #b8275f; }
:root[data-accent="champagne"] { --accent: #8a6f45; --out: #8a6f45; --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent-soft: #f4eee4; --accent-fg: #6f5734; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"])[data-accent="ocean"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #3aa7f0; --out: #0b6fb8; --accent-soft: #0f2a3d; --accent-fg: #7cc4f5; }
  :root:not([data-theme="light"])[data-accent="forest"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #34c172; --out: #18884a; --accent-soft: #12301f; --accent-fg: #7fdca6; }
  :root:not([data-theme="light"])[data-accent="sunset"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #ff7a4d; --out: #d9481b; --accent-soft: #3a1e14; --accent-fg: #ffab8c; }
  :root:not([data-theme="light"])[data-accent="rose"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #ff5c9a; --out: #c72a68; --accent-soft: #3a1424; --accent-fg: #ff9cc2; }
  :root:not([data-theme="light"])[data-accent="champagne"] { --accent: #c9b088; --out: #c9b088; --accent-ink: #000; --out-fg: #000; --out-meta: rgba(0,0,0,.55); --read: #000; --accent-soft: #2b2519; --accent-fg: #d5bd92; }
}
:root[data-theme="dark"][data-accent="ocean"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #3aa7f0; --out: #0b6fb8; --accent-soft: #0f2a3d; --accent-fg: #7cc4f5; }
:root[data-theme="dark"][data-accent="forest"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #34c172; --out: #18884a; --accent-soft: #12301f; --accent-fg: #7fdca6; }
:root[data-theme="dark"][data-accent="sunset"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #ff7a4d; --out: #d9481b; --accent-soft: #3a1e14; --accent-fg: #ffab8c; }
:root[data-theme="dark"][data-accent="rose"] { --accent-ink: #fff; --out-fg: #fff; --out-meta: rgba(255,255,255,.72); --read: #fff; --accent: #ff5c9a; --out: #c72a68; --accent-soft: #3a1424; --accent-fg: #ff9cc2; }
:root[data-theme="dark"][data-accent="champagne"] { --accent: #c9b088; --out: #c9b088; --accent-ink: #000; --out-fg: #000; --out-meta: rgba(0,0,0,.55); --read: #000; --accent-soft: #2b2519; --accent-fg: #d5bd92; }

:root[data-wall="plain"] .chat, .sw-wall[data-wall="plain"] { background-image: none; background-color: var(--wall); }
.sw-wall[data-wall="dots"] { background-color: var(--wall); background-image: radial-gradient(var(--wall-dot) 1.6px, transparent 1.7px); background-size: 10px 10px; }
:root[data-wall="grid"] .chat, .sw-wall[data-wall="grid"] { background-color: var(--wall);
  background-image: linear-gradient(var(--wall-dot) 1px, transparent 1px), linear-gradient(90deg, var(--wall-dot) 1px, transparent 1px); background-size: 24px 24px; }
.sw-wall[data-wall="grid"] { background-size: 10px 10px; }
:root[data-wall="aurora"] .chat, .sw-wall[data-wall="aurora"] { background-color: var(--wall);
  background-image: radial-gradient(60% 50% at 10% 0%, var(--accent-soft), transparent 70%), radial-gradient(50% 40% at 100% 60%, rgba(201, 176, 136, .14), transparent 70%), radial-gradient(60% 50% at 30% 100%, rgba(6, 182, 212, .12), transparent 70%);
  background-size: auto; background-attachment: local; }
:root[data-wall="lines"] .chat, .sw-wall[data-wall="lines"] { background-color: var(--wall);
  background-image: repeating-linear-gradient(135deg, var(--wall-dot) 0 2px, transparent 2px 14px); background-size: auto; }

.push-ask { display: flex; align-items: center; gap: 10px; margin: 0 12px 8px; padding: 10px 6px 10px 12px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-fg); }
.push-ask > .ic { flex: none; }
.push-ask .set-label { flex: 1; min-width: 0; }
.push-ask .set-label small { color: var(--accent-fg); opacity: .85; }
.push-ask .ib { color: var(--accent-fg); width: 36px; height: 36px; }

.gc-banner { display: flex; align-items: center; gap: 10px; padding: 8px 10px 8px 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.gc-live { width: 10px; height: 10px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 4px rgba(52, 199, 89, .2); animation: pulse 1.4s infinite; flex: none; }
.gc-banner-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13.5px; line-height: 1.3; }
.gc-banner-txt small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.call.gcall { justify-content: flex-start; gap: 12px; padding: calc(14px + var(--safe-t)) 10px calc(22px + var(--safe-b)); background: #000; }
.gc-title { display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.gc-title b { font-size: 18px; }
.gc-status { font-size: 13px; opacity: .8; font-variant-numeric: tabular-nums; }
.gc-grid { flex: 1; min-height: 0; width: 100%; max-width: 1100px; display: grid; gap: 8px; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); grid-auto-rows: minmax(0, 1fr); overflow: auto; }
.call.gcall.solo .gc-grid { max-width: 520px; }
.gc-tile { position: relative; min-height: 140px; border-radius: 18px; overflow: hidden; background: #1c1c1e; display: grid; place-items: center; }
.gc-tile video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gc-tile.mine video { transform: scaleX(-1); }
.gc-tile .gc-av { display: none; }
.gc-tile.novideo video { display: none; }
.gc-tile.novideo .gc-av { display: block; }
.gc-tile audio { display: none; }
.gc-name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 4px 9px; border-radius: 10px; background: rgba(0, 0, 0, .55); font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 4px; }
.gc-name .ic.sm { margin: 0; color: #ff6961; }
@media (max-width: 520px) { .gc-tile { min-height: 110px; } }

:root { --star: var(--gold-fill); }
.ib.on { background: var(--accent-soft); color: var(--accent-fg); }
.chip .ic.sm { margin-right: 4px; vertical-align: -3px; }
.list.cards { gap: 8px; padding: 4px 12px 90px; }
.mcard { position: relative; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: background .15s, border-color .15s; }
.mcard:hover { background: var(--hover); }
.mcard.active { background: var(--accent-soft); border-color: var(--accent); }
.mcard-main { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 12px 46px 10px 12px; text-align: left; border-radius: inherit; }
.mcard-body { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.mcard-profile { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding-top: 2px; }
.mcard-name { display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 15.5px; font-weight: 700; line-height: 1.25; }
.mcard-title { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-text { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--muted); font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.mcard-text .pv, .mcard-text > span { white-space: normal; }
.mcard-text .tick { width: 17px; height: 17px; display: inline-block; vertical-align: -4px; margin-right: 2px; }
.mcard-text .tick.read { color: var(--gold); }
.mcard.has-unread .mcard-text { color: var(--fg); }
.mcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-left: 60px; min-height: 21px; }
.mcard-date { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mcard.has-unread .mcard-date { color: var(--accent-fg); font-weight: 700; }
.mcard-star { position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); opacity: .55; transition: opacity .15s, transform .15s, color .15s; }
.mcard-star .ic { width: 20px; height: 20px; }
.mcard:hover .mcard-star, .mcard-star:focus-visible { opacity: 1; }
.mcard-star[aria-pressed="true"] { color: var(--star); opacity: 1; }
.mcard-star:active { transform: scale(1.2); }
.mcard .dot { border-color: var(--panel); }
.mcard.active .dot { border-color: var(--accent-soft); }
.chips .chip { flex: none; white-space: nowrap; display: inline-flex; align-items: center; }

html, body { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -.01em; }
.side-body { background: var(--bg); }
.top { background: var(--bg); }
.search { background: var(--chip); border-radius: 12px; height: 38px; }
.chip { background: var(--chip); color: var(--fg); font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.tab[aria-current="page"] .tab-ic { background: none; color: var(--fg); }
.tab { color: var(--muted); font-weight: 500; font-size: 11px; }
.tab-badge { background: var(--danger); }
.mcard { border-color: transparent; border-radius: 16px; }
.mcard.active { background: var(--panel); border-color: var(--fg); }
.mcard.active .dot { border-color: var(--panel); }
.ib:hover { background: var(--accent-soft); }
.ib.on { background: var(--accent); color: var(--accent-ink); }
.welcome .logo { margin-bottom: 4px; }
.welcome h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: -.02em; }
.btn { font-weight: 600; border-radius: 12px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.badge { font-weight: 700; }
.msg.out .quote { border-left-color: currentColor; background: rgba(127, 127, 127, .18); }
.msg.out .quote b { color: inherit; }
.quote b { color: var(--fg); }
.rx-chip.mine { border-color: var(--fg); }
.unread-sep span { background: var(--chip); color: var(--fg); }
.day span, .sys span { background: var(--panel); color: var(--muted); }
.pill { color: var(--fg); background: var(--panel); }
.info-sec { background: var(--panel); }
.feat-ic { background: var(--gold-soft); color: var(--gold); }
.checkbox.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pchip { background: var(--chip); color: var(--fg); }
.tag { background: var(--chip); color: var(--fg); }
.push-ask { background: var(--panel); color: var(--fg); border: 1px solid var(--line); }
.push-ask .set-label small, .push-ask .ib { color: var(--muted); }
.demo-bar { background: var(--panel); color: var(--muted); border: 1px solid var(--line); }
.sug { background: var(--panel-2); color: var(--fg); }
.swatch.on { border-color: var(--fg); }
.me-cam { background: var(--accent); color: var(--accent-ink); border-color: var(--panel); }
.ic-custom { display: inline-block; background: currentColor; -webkit-mask: var(--src) center / contain no-repeat; mask: var(--src) center / contain no-repeat; }
.av-ai { background: #000 !important; }
.av-ai img { width: 100%; height: 100%; object-fit: cover; }

.brand-home { display: flex; align-items: center; gap: 10px; letter-spacing: .02em; }
.brand-mark { width: 34px; height: 34px; flex: none; }

.splash { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; pointer-events: none; }
.sp-bg { position: absolute; inset: 0; background: var(--bg); }
.sp-stage { position: relative; width: 132px; height: 132px; }
.sp-bird, .sp-l { position: absolute; inset: 0; }
.sp-l { background: var(--fg); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.sp-crest { --m: url(icons/splash/crest.png); transform-origin: 62% 13%; }
.sp-neck { --m: url(icons/splash/bird.png); transform-origin: 76% 56%; }
.sp-body { --m: url(icons/splash/body.png); }
.sp-right { --m: url(icons/splash/right.png); }
.sp-shine { --m: url(icons/logo-mask.png); opacity: 0;
  background: linear-gradient(105deg, transparent 38%, rgba(255,255,255,.0) 40%, var(--gold) 47%, #fff 50%, var(--gold) 53%, transparent 62%) 120% 0 / 300% 100% no-repeat; }
:root[data-theme="light"] .sp-shine { background-image: linear-gradient(105deg, transparent 38%, var(--gold-fill) 47%, #fff 50%, var(--gold-fill) 53%, transparent 62%); }

.invite-box { margin: 12px 16px; padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.invite-box p { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.45; word-break: break-word; }
.invite-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.pin-mark { display: inline-flex; color: var(--muted); }
.pin-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 16px; border: 0; border-bottom: 1px solid var(--line); background: var(--panel); color: var(--fg); text-align: left; font: inherit; cursor: pointer; }
.pin-bar[hidden], .find-bar[hidden] { display: none; }
.pin-txt { display: flex; flex-direction: column; min-width: 0; font-size: 13px; }
.pin-txt b { font-weight: 600; }
.pin-txt span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.find-bar { display: flex; align-items: center; gap: 4px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); background: var(--panel); }
.find-bar .search { flex: 1; margin: 0; }
.find-n { font-size: 12px; color: var(--muted); min-width: 34px; text-align: center; }
.flip-up .ic { transform: rotate(180deg); }
.msg.find-hit .bubble { box-shadow: 0 0 0 2px var(--gold); }
.fwd { font-size: 12px; color: var(--muted); font-style: italic; margin-bottom: 2px; }
.meta .edited { margin-right: 4px; font-style: italic; }
.poll { min-width: 220px; max-width: 300px; }
.poll-q { font-weight: 600; margin-bottom: 2px; }
.poll-hint, .poll-foot { font-size: 12px; color: var(--muted); }
.poll-hint { margin-bottom: 8px; }
.poll-foot { margin-top: 6px; }
.poll-opt { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.poll-opt:disabled { cursor: default; }
.poll-check { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid currentColor; opacity: .55; display: grid; place-items: center; }
.poll-check.on { opacity: 1; background: currentColor; }
.poll-check.on .ic { color: var(--in); }
.msg.out .poll-check.on .ic { color: var(--out); }
.poll-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.poll-row { display: flex; justify-content: space-between; gap: 8px; }
.poll-bar { height: 4px; border-radius: 2px; background: color-mix(in srgb, currentColor 15%, transparent); overflow: hidden; }
.poll-bar i { display: block; height: 100%; background: currentColor; border-radius: 2px; transition: width .25s ease; }
.poll-edit { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.mloc { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; min-width: 220px; }
.mloc-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.mloc.live .fmeta b::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #34c759; vertical-align: 2px; }
.checkbox.off { opacity: .3; }
.lockscreen { position: fixed; inset: 0; z-index: 9000; background: var(--bg); display: grid; place-items: center; padding: 24px; }
.lock-box { width: 100%; max-width: 340px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.lock-box h2 { margin: 8px 0 0; font-size: 22px; }
.lock-box p { margin: 0 0 8px; }
.lock-box .pin { width: 100%; }

.mloc .btn { background: color-mix(in srgb, currentColor 12%, transparent); color: inherit; border: 0; }
.sheet .pin, .lockscreen .pin { --a-field: var(--panel-2); --a-line: var(--line); --a-line-hi: var(--muted); --a-fg: var(--fg); --a-muted: var(--muted); color: var(--fg); }
.sheet .pin-cell.filled, .lockscreen .pin-cell.filled { background: var(--panel-2); }
.locked-row { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--fg); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.locked-row span { flex: 1; }
.locked-row small { color: var(--muted); font-weight: 500; }
.vtrans { margin-top: 6px; font-size: 14px; line-height: 1.4; opacity: .9; white-space: pre-wrap; }
.vtrans-btn { margin-top: 4px; padding: 2px 0; border: 0; background: none; color: inherit; opacity: .7; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.vtrans-btn:disabled { text-decoration: none; cursor: default; }
.tab-ic { padding: 3px 14px; }
.tab > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; padding: 0 2px; }
.story-strip { display: flex; gap: 12px; padding: 6px 14px 12px; overflow-x: auto; scrollbar-width: none; }
.story-strip::-webkit-scrollbar { display: none; }
.story-b { flex: none; width: 68px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.story-ring { position: relative; padding: 2px; border-radius: 50%; border: 2px solid var(--line); }
.story-ring.on { border-color: var(--gold); }
.story-ring .av { border: 2px solid var(--bg); }
.story-add { position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; border: 2px solid var(--bg); }
.story-add .ic.sm { margin: 0; width: 14px; height: 14px; }
.story-n { font-size: 12px; max-width: 68px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.story-prev { border-radius: 18px; min-height: 240px; display: grid; place-items: center; padding: 20px; transition: background .2s; }
.story-ta { width: 100%; background: none; border: 0; resize: none; color: #fff; font-size: 22px; font-weight: 600; text-align: center; outline: none; }
.story-ta::placeholder { color: rgba(255, 255, 255, .6); }
.story-dots { display: flex; gap: 10px; justify-content: center; margin: 14px 0 6px; }
.story-dot { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line); }
.story-dot.on { border-color: var(--fg); box-shadow: 0 0 0 2px var(--panel) inset; }
.story-view { position: fixed; inset: 0; z-index: 45; background: #000; color: #fff; display: flex; flex-direction: column; opacity: 0; transition: opacity .18s; padding-top: var(--safe-t); padding-bottom: var(--safe-b); }
.story-view.in { opacity: 1; }
.sv-bars { display: flex; gap: 4px; padding: 10px 10px 0; }
.sv-bar { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .3); overflow: hidden; }
.sv-bar i { display: block; height: 100%; width: 0; background: #fff; }
.sv-bar i.done { width: 100%; }
.sv-bar i.run { animation: sv-fill linear forwards; }
@keyframes sv-fill { from { width: 0; } to { width: 100%; } }
.sv-top { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 14px; }
.sv-top .ib { color: #fff; margin-left: auto; }
.sv-who { display: flex; flex-direction: column; line-height: 1.2; }
.sv-who small { opacity: .7; }
.sv-stage { position: relative; flex: 1; min-height: 0; display: grid; }
.sv-stage > * { grid-area: 1 / 1; }
.sv-media { display: grid; place-items: center; position: relative; min-height: 0; }
.sv-media img { max-width: 100%; max-height: 100%; object-fit: contain; }
.sv-cap { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; padding: 10px 18px; background: rgba(0, 0, 0, .45); font-size: 16px; }
.sv-text { display: grid; place-items: center; padding: 32px; border-radius: 0; }
.sv-text p { margin: 0; font-size: 26px; font-weight: 600; text-align: center; line-height: 1.3; white-space: pre-wrap; word-break: break-word; }
.sv-tap { position: relative; z-index: 1; width: 35%; }
.sv-tap.right { justify-self: end; width: 65%; }
.sv-tap.left { justify-self: start; }
.sv-foot { display: flex; gap: 8px; align-items: center; padding: 10px 12px 14px; }
.sv-reply { flex: 1; min-width: 0; padding: 11px 16px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); background: rgba(255, 255, 255, .08); color: #fff; outline: none; }
.sv-reply::placeholder { color: rgba(255, 255, 255, .6); }
.sv-foot .btn.ghost { background: rgba(255, 255, 255, .16); color: #fff; }
.feed { padding-bottom: 16px; }
.post { padding: 12px 14px 6px; display: flex; flex-direction: column; gap: 8px; }
.post-head { display: flex; align-items: center; gap: 6px; }
.post-who { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; text-align: left; }
.post-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.post-meta b { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-meta small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-text { white-space: pre-wrap; word-break: break-word; font-size: 15.5px; line-height: 1.45; }
.post-img { border-radius: 14px; overflow: hidden; background: var(--panel-2); }
.post-img img { display: block; width: 100%; max-height: 520px; object-fit: cover; }
.post-actions { display: flex; gap: 4px; margin: 0 -6px; }
.post-act { display: inline-flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-size: 14px; font-weight: 500; }
.post-act:hover { background: var(--hover); }
.post-act.on { color: var(--fg); font-weight: 600; }
.post-act small { font-variant-numeric: tabular-nums; }
.post-ta { min-height: 120px; resize: vertical; }
.post-prev { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.post-prev img { max-width: 100%; max-height: 260px; border-radius: 12px; }
.comments { max-height: 55vh; overflow-y: auto; }
.comment { display: flex; gap: 10px; align-items: flex-start; padding: 8px 2px; }
.comment-b { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--panel-2); border-radius: 14px; padding: 8px 12px; }
.comment-b span { white-space: pre-wrap; word-break: break-word; }
.comment-b small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.comment-in { display: flex; gap: 8px; align-items: center; padding-top: 10px; }
.comment-in .field { flex: 1; margin: 0; }
.prof-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 6px 0 12px; }
.prof-head h2 { margin: 8px 0 0; font-size: 22px; }
.prof-about { margin: 6px 0 0; max-width: 340px; color: var(--muted); }
.prof-counts { display: flex; gap: 18px; margin: 10px 0 4px; color: var(--muted); }
.prof-counts b { color: var(--fg); }
.sv-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.sv-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-row .ch-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--chip); display: grid; place-items: center; font-weight: 700; color: var(--muted); flex: none; }
.ch-row.has-unread .row-title { font-weight: 700; }
.sv-add { margin: 14px 16px 0; }
.sv-info { padding: 14px 18px; font-size: 13px; }
.invite-code { font-size: 28px; font-weight: 700; letter-spacing: .12em; text-align: center; padding: 16px; border-radius: 16px; background: var(--panel-2); margin: 6px 0 10px; font-variant-numeric: tabular-nums; user-select: all; }
.dlg-actions.center { justify-content: center; }
.center-col { display: flex; justify-content: center; margin-bottom: 8px; }
.secret-mark { display: inline-flex; color: var(--gold); margin-right: 2px; }
.secret-mark .ic.sm { margin-right: 2px; }
.secret-note { margin-top: 6px; display: flex; align-items: center; gap: 4px; justify-content: center; }
.safety-code { font-size: 22px; font-weight: 600; text-align: center; letter-spacing: .06em; padding: 18px; border-radius: 16px; background: var(--panel-2); line-height: 1.6; word-spacing: .3em; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .sv-bar i.run { animation-duration: 1ms !important; width: 100%; } }
.game-card { display: flex; align-items: center; gap: 12px; width: calc(100% - 24px); margin: 4px 12px 8px; padding: 12px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); text-align: left; }
.game-card:hover { background: var(--hover); }
.gc-mark { width: 44px; height: 44px; flex: none; border-radius: 13px; display: grid; place-items: center; background: var(--gold-fill); color: var(--gold-ink); font: 700 20px/1 var(--font-display); }
.game-card.done .gc-mark { background: var(--chip); color: var(--muted); }
.gc-main { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.gc-main small { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-side { display: flex; align-items: center; gap: 8px; flex: none; }
.gc-streak { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.gc-btn { padding: 6px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; }
.game-card.done .gc-btn { background: var(--chip); color: var(--fg); }
.game-view { position: fixed; inset: 0; z-index: 45; background: var(--bg); color: var(--fg); display: flex; flex-direction: column; padding-top: var(--safe-t); padding-bottom: var(--safe-b); opacity: 0; transform: translateY(12px); transition: opacity .18s, transform .18s; }
.game-view.in { opacity: 1; transform: none; }
.ad-banner { height: 50px; flex: none; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.gv-top { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.gv-title { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.gv-title small { color: var(--muted); }
.gv-gold { font-weight: 600; font-variant-numeric: tabular-nums; }
.gv-body { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 14px 12px 12px; gap: 12px; }
.kw-hint { min-height: 20px; display: flex; gap: 12px; color: var(--gold); font-weight: 600; font-size: 14px; }
.kw-grid { display: grid; gap: 6px; }
.kw-line { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.kw-line.shake, .cn-grid.shake { animation: g-shake .35s; }
@keyframes g-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.kw-cell { width: min(15vw, 58px); height: min(15vw, 58px); display: grid; place-items: center; border: 2px solid var(--line); border-radius: 10px; font: 700 26px/1 var(--font-display); text-transform: uppercase; }
.kw-cell.filled { border-color: var(--muted); }
.kw-cell.s2 { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--gold-ink); }
.kw-cell.s1 { background: #8e8e93; border-color: #8e8e93; color: #fff; }
.kw-cell.s0 { background: var(--panel-2); border-color: var(--panel-2); color: var(--muted); }
.kw-kb { margin-top: auto; width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 6px; padding-bottom: 6px; }
.kw-row { display: flex; gap: 4px; justify-content: center; }
.kw-key { flex: 1; min-width: 0; height: 50px; border-radius: 8px; background: var(--chip); color: var(--fg); font-weight: 600; font-size: 16px; }
.kw-key.wide { flex: 1.6; font-size: 13px; }
.kw-key.s2 { background: var(--gold-fill); color: var(--gold-ink); }
.kw-key.s1 { background: #8e8e93; color: #fff; }
.kw-key.s0 { opacity: .4; }
.cn-intro { margin: 0; color: var(--muted); text-align: center; }
.cn-solved, .cn-grid { width: 100%; max-width: 520px; display: grid; gap: 8px; }
.cn-grid { grid-template-columns: repeat(4, 1fr); }
.cn-tile { min-height: 64px; padding: 6px 4px; border-radius: 12px; background: var(--chip); color: var(--fg); font-weight: 700; font-size: clamp(10px, 2.9vw, 14px); line-height: 1.15; word-break: break-word; hyphens: auto; }
.cn-tile.on { background: var(--accent); color: var(--accent-ink); }
.cn-tile.marked { box-shadow: inset 0 0 0 2px var(--gold); }
.cn-group { border-radius: 12px; padding: 12px; text-align: center; color: #1d1d1f; display: flex; flex-direction: column; gap: 2px; }
.cn-group b { font-size: 15px; }
.cn-group span { font-size: 13px; }
.cn-group.c0 { background: #e9d9b9; } .cn-group.c1 { background: #c9b088; } .cn-group.c2 { background: #d4d4d8; } .cn-group.c3 { background: #a1a1a6; }
.cn-group.missed { opacity: .6; }
.cn-lives { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; }
.cn-lives i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.cn-lives i.on { background: var(--fg); }
.cn-msg { min-height: 20px; font-weight: 600; color: var(--gold); }
.cn-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.qz { width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 14px; }
.qz-step { color: var(--muted); font-size: 14px; text-align: center; }
.qz-dots { display: flex; gap: 6px; justify-content: center; }
.qz-dots i { width: 26px; height: 5px; border-radius: 3px; background: var(--line); }
.qz-dots i.cur { background: var(--fg); } .qz-dots i.ok { background: var(--gold-fill); } .qz-dots i.no { background: #8e8e93; }
.qz-q { margin: 6px 0; font: 600 22px/1.3 var(--font-display); text-align: center; }
.qz-opts { display: grid; gap: 10px; }
.qz-opt { padding: 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); font-size: 17px; font-weight: 600; color: var(--fg); }
.qz-opt.cut { opacity: .3; text-decoration: line-through; }
.qz-opt.ok { background: var(--gold-fill); border-color: var(--gold-fill); color: var(--gold-ink); }
.qz-opt.no { background: #8e8e93; border-color: #8e8e93; color: #fff; }
.gr-head { text-align: center; display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.gr-big { font: 700 26px/1.2 var(--font-display); }
.gr-score { color: var(--muted); }
.gr-grid { margin: 8px auto; text-align: center; font-size: 22px; line-height: 1.25; font-family: inherit; white-space: pre; }
.gr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.gr-stats span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 4px; border-radius: 14px; background: var(--panel-2); }
.gr-stats b { font-size: 18px; font-variant-numeric: tabular-nums; }
.gr-stats small { color: var(--muted); font-size: 12px; }
.gr-stats.big b { font-size: 22px; }
.gr-gain { text-align: center; color: var(--gold); font-weight: 600; margin: 4px 0 10px; }
.rw-sec { margin: 18px 0 0; }
.rw-sec h3 { margin: 0 0 4px; font-size: 17px; }
.rw-sec .btn.wide { margin-top: 8px; }
.muted.xs { font-size: 12px; margin: 6px 0 0; }
.rw-item { gap: 10px; }
.rw-how { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.rw-how li { margin: 4px 0; }
.chest-out { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 0 20px; }
.chest-big { font: 700 34px/1.1 var(--font-display); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { .kw-line.shake, .cn-grid.shake { animation: none; } .game-view { transition: none; } }
.feed.grid-mode { padding: 0 2px 16px; }
.pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.pg-cell { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--panel-2); padding: 0; }
.pg-cell img, .pg-cell video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pg-cell.text { display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; font-size: 12px; line-height: 1.3; color: var(--fg); background: var(--gold-soft); overflow: hidden; }
.pg-cell.text span { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.pg-badge { position: absolute; top: 6px; right: 6px; padding: 2px 6px; border-radius: 8px; background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; font-weight: 600; }
.post-media { position: relative; margin: 0 -14px; }
.pc-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; background: #000; }
.pc-track::-webkit-scrollbar { display: none; }
.pc-slide { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; }
.pc-slide img, .pc-slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pc-dots { display: flex; gap: 5px; justify-content: center; padding: 8px 0 0; }
.pc-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.pc-dots i.on { background: var(--fg); }
.pc-heart { position: absolute; left: 50%; top: 45%; transform: translate(-50%, -50%) scale(0); font-size: 92px; color: #fff; text-shadow: 0 4px 24px rgba(0, 0, 0, .4); pointer-events: none; opacity: 0; }
.pc-heart.pop { animation: pc-pop .8s ease-out; }
@keyframes pc-pop { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.3); } 20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1); } }
.post-act.end { margin-left: auto; }
.tag-link { color: var(--gold); font-weight: 600; padding: 0; display: inline; }
.cmp-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.cmp-strip:empty { display: none; }
.cmp-item { position: relative; flex: none; width: 92px; height: 92px; border-radius: 12px; overflow: hidden; background: var(--panel-2); }
.cmp-item img, .cmp-item video { width: 100%; height: 100%; object-fit: cover; }
.cmp-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 16px; line-height: 1; }
.cmp-progress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; margin: 6px 0 10px; }
.cmp-progress i { display: block; height: 100%; width: 0; background: var(--gold); transition: width .2s; }
.chips.center { justify-content: center; margin: 6px 0 10px; }
.reels { position: fixed; inset: 0; z-index: 45; background: #000; color: #fff; opacity: 0; transition: opacity .18s; }
.reels.in { opacity: 1; }
.rl-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 6px) 10px 6px; background: linear-gradient(rgba(0, 0, 0, .5), transparent); }
.rl-top .ib { color: #fff; }
.rl-scroll { height: 100%; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; }
.rl-scroll::-webkit-scrollbar { display: none; }
.rl-page { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; }
.rl-page video { width: 100%; height: 100%; object-fit: contain; }
.rl-side { position: absolute; right: 10px; bottom: calc(var(--safe-b) + 110px); display: flex; flex-direction: column; gap: 16px; }
.rl-btn { display: flex; flex-direction: column; align-items: center; color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.rl-btn b { font-size: 30px; line-height: 1; }
.rl-btn small { font-size: 12px; }
.rl-info { position: absolute; left: 12px; right: 70px; bottom: calc(var(--safe-b) + 18px); text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.rl-who { display: flex; align-items: center; gap: 8px; color: #fff; }
.rl-info p { margin: 6px 0 0; font-size: 14px; }
@media (prefers-reduced-motion: reduce) { .pc-heart.pop { animation-duration: .01s; } }
