/* Kumo v2 — dusk cream, plum ink. One light source (top left), three shadow levels, one motion curve.
   Glass only on the top bar and floating things; gradient only on headline keywords and primary buttons;
   glow only behind selected cards. Six category accents, used only on their tags and card details. */
:root {
  --bg: #f4eee9; --surface: #fffcf9; --sunk: #f1e9e4; --ink: #241a2b; --muted: #6c6172; --faint: #9a8f9f;
  --line: rgba(52, 33, 58, .09); --ring: rgba(52, 33, 58, .06);
  --rose: #d9607a; --violet: #8a63d2; --brand: linear-gradient(120deg, #d9607a 0%, #a85fb0 55%, #8a63d2 100%);
  --bad: #c0392b;
  /* light from the top left: shadows fall to the bottom right; a hairline highlight sits on the top-left edge */
  --hl: inset 1px 1px 0 rgba(255, 255, 255, .85);
  --sh-1: 1px 2px 3px rgba(60, 36, 58, .05), 3px 8px 20px rgba(60, 36, 58, .07);
  --sh-2: 2px 6px 10px rgba(60, 36, 58, .07), 8px 20px 44px rgba(60, 36, 58, .13);
  --sh-3: 4px 12px 24px rgba(40, 22, 40, .14), 14px 36px 72px rgba(40, 22, 40, .22);
  --r-s: 12px; --r: 16px; --r-l: 24px;
  --t1: 200ms; --t2: 320ms; --ease: cubic-bezier(.2, .7, .2, 1);
  --pad: 24px; --sec: 64px; --gap: 16px;
  --display: 'Fraunces', 'Songti SC', 'Noto Serif SC', serif;
  --body: 'Inter', -apple-system, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body {
  margin: 0; font: 15px/1.6 var(--body); color: var(--ink); min-height: calc(100vh - var(--kumo-bar, 0px));
  background-color: var(--bg);
  background-image: radial-gradient(900px 600px at 0% -10%, rgba(233, 150, 170, .30), transparent 60%),
    radial-gradient(800px 600px at 105% 10%, rgba(160, 140, 230, .22), transparent 60%),
    radial-gradient(900px 700px at 50% 110%, rgba(240, 190, 140, .18), transparent 60%);
  background-attachment: fixed;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.sp { flex: 1; }
.hint { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); }
.wrap.narrow { max-width: 760px; }
.gap { height: 48px; }
.grad { font-style: normal; background: var(--brand); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- motion: one entrance, one hover lift ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.rise { animation: rise var(--t2) var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- picture skeletons ---------- */
@keyframes shimmer { to { background-position: -200% 0; } }
.ph { position: relative; display: block; overflow: hidden; background: linear-gradient(90deg, #ece3de 0%, #f6f0ec 50%, #ece3de 100%) 0 0 / 200% 100%; animation: shimmer 1.4s linear infinite; }
.ph img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--t2) var(--ease), transform var(--t2) var(--ease); }
.ph.ok { animation: none; background: var(--sunk); }
.ph.ok img { opacity: 1; }
.ph.none { animation: none; background: linear-gradient(135deg, #eadfe6, #e3dcef); }
.av { width: var(--s); height: var(--s); border-radius: 50%; flex: none; box-shadow: 0 0 0 2px var(--surface), 1px 2px 6px rgba(60, 36, 58, .12); }
.av img { object-position: 50% 20%; }
.av.mono { display: inline-grid; place-items: center; background: linear-gradient(135deg, #f0dbe2, #e2daf2); color: #6b4a78; font: 600 calc(var(--s) * .42)/1 var(--display); }
.av.mono.ghost { background: var(--sunk); color: var(--muted); }
.stack { display: inline-flex; }
.stack .av + .av { margin-left: calc(var(--s) * -.3); }
.mono-big { display: grid; place-items: center; font: 600 56px/1 var(--display); color: #6b4a78; background: linear-gradient(135deg, #f0dbe2, #e2daf2); }

/* ---------- surfaces ---------- */
.glass { background: rgba(255, 252, 249, .72); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: var(--hl), 0 0 0 1px rgba(255, 255, 255, .5), var(--sh-2); }
.card, .feat, .play, .post, .dcard, .rchat, .pcard, .emptycard, .pvcard, .fgrp, .slot, .popt, .vcard, .pick, .create-banner {
  background: var(--surface); border-radius: var(--r); box-shadow: var(--hl), 0 0 0 1px var(--ring), var(--sh-1);
}

/* ---------- buttons, chips, tags ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r-s); font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap; background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line), 1px 2px 4px rgba(60, 36, 58, .05); transition: transform var(--t1) var(--ease), box-shadow var(--t1) var(--ease); }
.btn:hover { transform: translateY(-1px); box-shadow: var(--hl), 0 0 0 1px var(--line), var(--sh-1); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { color: #fff; background: var(--brand); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .3), 2px 6px 16px rgba(168, 95, 176, .32); }
.btn.primary:hover { box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .3), 4px 10px 24px rgba(168, 95, 176, .4); }
.btn.big { height: 48px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.wide { width: 100%; }
.btn.ghost { background: transparent; box-shadow: 0 0 0 1px var(--line); }
.btn.on { box-shadow: 0 0 0 1.5px var(--violet); color: var(--violet); }
.btn.danger { color: var(--bad); }
.btn.stop { color: var(--bad); }
.ib { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-s); font-size: 16px; color: var(--muted); transition: background var(--t1); }
.ib:hover { background: rgba(52, 33, 58, .06); color: var(--ink); }
.ib.sm { width: 32px; height: 32px; }
.link { color: var(--violet); font-weight: 600; font-size: 14px; text-decoration: none; }
.link:hover { text-decoration: underline; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row.end { justify-content: flex-end; }
.row.center { justify-content: center; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 16px; border-radius: 99px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); text-decoration: none; transition: color var(--t1), box-shadow var(--t1); }
.chip::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--faint)); }
.chip.ghost::before { display: none; }
.chip i { font-style: normal; font-size: 12px; color: var(--faint); }
.chip[aria-pressed="true"] { color: var(--ink); box-shadow: 0 0 0 2px var(--c, var(--violet)), 0 4px 14px color-mix(in srgb, var(--c, var(--violet)) 22%, transparent); }
.ctag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.ctag.mine { --c: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 8px; font-size: 12px; color: var(--muted); background: var(--sunk); }
.topics { display: flex; flex-wrap: wrap; gap: 8px; }
.topic { min-height: 36px; padding: 8px 16px; border-radius: 99px; font-size: 14px; text-align: left; background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); transition: box-shadow var(--t1), transform var(--t1) var(--ease); }
.topic:hover { transform: translateY(-1px); box-shadow: 0 0 0 1.5px var(--violet); }
.tick { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--surface); opacity: 0; transform: scale(.6); transition: opacity var(--t1), transform var(--t1) var(--ease); }
.tick::after { content: ''; position: absolute; left: 8px; top: 5px; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
/* one selected state everywhere: a 2px ring, the tick, and a soft glow behind */
.pick.on, .vcard.on, .pcard.on, .popt.on, .vthumb.on { box-shadow: 0 0 0 2px var(--violet), var(--sh-2); }
.pick.on::before, .vcard.on::before, .pcard.on::before { content: ''; position: absolute; inset: 12%; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgba(168, 95, 176, .45), transparent); filter: blur(24px); }
.pick.on .tick, .vcard.on .tick, .pcard.on .tick { opacity: 1; transform: none; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 40; box-shadow: var(--hl), 0 1px 0 var(--line), 2px 6px 20px rgba(60, 36, 58, .06); }
.top-in { max-width: 1200px; margin: 0 auto; padding: 0 var(--pad); height: 64px; display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo b { font: 700 22px/1 var(--display); }
.mark { width: 24px; height: 24px; border-radius: 8px 8px 8px 2px; background: var(--brand); box-shadow: 2px 3px 8px rgba(168, 95, 176, .35); }
.tnav { display: flex; gap: 4px; }
.tnav a { height: 36px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; transition: color var(--t1), background var(--t1); }
.tnav a:hover { color: var(--ink); background: rgba(52, 33, 58, .05); }
.tnav a.on { color: var(--ink); background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); }
.quota { font-size: 12px; color: var(--muted); white-space: nowrap; }
.quota.out { color: var(--bad); }
.pchip { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 99px; font-size: 13px; font-weight: 600; text-decoration: none; background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); }
.lang { height: 36px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--muted); box-shadow: 0 0 0 1px var(--line); }

/* ---------- sections ---------- */
.sec { padding: var(--sec) 0; }
.sec.tight { padding: 32px 0; }
.sec + .sec.tight, .sec.tight + .sec { padding-top: 32px; }
.band { background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .28)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8), inset 0 -1px 0 var(--line); }
.head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; }
.head > div:first-child { flex: 1; min-width: 0; }
.head h2 { font: 700 28px/1.2 var(--display); letter-spacing: -.01em; }
.head .sub { margin-top: 8px; color: var(--muted); max-width: 64ch; }
.head-acts { display: flex; gap: 8px; flex: none; }
.empty { padding: 48px 0; text-align: center; color: var(--muted); }
.ai-note { margin-top: 16px; font-size: 13px; color: var(--faint); }
.back { display: inline-flex; margin-bottom: 24px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; }
.back:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 48px 0 var(--sec); }
.hero-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .04em; color: var(--violet); }
.hero h1 { margin-top: 16px; font: 700 48px/1.15 var(--display); letter-spacing: -.02em; }
.lead { margin-top: 16px; font-size: 17px; color: var(--muted); max-width: 46ch; }
.hero .row { margin-top: 32px; gap: 16px; }
.stage { position: relative; padding-bottom: 32px; }
.stage-img { aspect-ratio: 16 / 10; border-radius: var(--r-l); box-shadow: var(--hl), var(--sh-2); }
.cast-row { position: absolute; left: 24px; bottom: 0; display: flex; gap: 8px; }
.cast-card { width: 80px; border-radius: 14px; overflow: hidden; background: var(--surface); box-shadow: var(--hl), var(--sh-2); }
.cc-img { aspect-ratio: 4 / 5; }
.cc-img img { object-position: 50% 0; }
.cast-card b { display: block; padding: 4px 8px; font-size: 12px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo { position: absolute; right: 24px; bottom: 0; width: min(320px, 50%); height: 304px; border-radius: var(--r); display: flex; flex-direction: column; overflow: hidden; }
.demo-h { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; font-size: 13px; box-shadow: 0 1px 0 var(--line); flex: none; }
.demo-h b { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-k { font-size: 11px; color: var(--faint); }
.dot-live { width: 8px; height: 8px; border-radius: 50%; background: #3fbf7f; box-shadow: 0 0 0 4px rgba(63, 191, 127, .18); }
.demo-msgs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; padding: 16px; overflow: hidden; }
.demo-msgs > :first-child { margin-top: auto; }
.dm { display: flex; gap: 8px; align-items: flex-end; animation: rise var(--t2) var(--ease) both; }
.dm .col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dm small { font-size: 11px; color: var(--muted); }
.dm .bub { padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--surface); font-size: 13px; line-height: 1.5; box-shadow: var(--hl), 0 0 0 1px var(--ring); }
.dm.u { justify-content: flex-end; }
.dm.u .bub { border-radius: 14px 14px 4px 14px; background: var(--brand); color: #fff; box-shadow: none; }

/* ---------- recent chats ---------- */
.rgrid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.rchat { display: flex; align-items: center; gap: 12px; padding: 16px; text-decoration: none; transition: transform var(--t1) var(--ease), box-shadow var(--t1) var(--ease); }
.rchat:hover { transform: translateY(-2px); box-shadow: var(--hl), 0 0 0 1px var(--ring), var(--sh-2); }
.rc-t { flex: 1; min-width: 0; display: grid; }
.rc-t b, .rc-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-t b { font-size: 14px; }
.rc-t span { font-size: 13px; color: var(--muted); }
.rchat small { font-size: 12px; color: var(--faint); align-self: flex-start; }

/* ---------- doors (scene rooms, stories, groups) ---------- */
.dgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.dgrid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.door { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: 320px; border-radius: var(--r-l); overflow: hidden; text-decoration: none; color: #fff; isolation: isolate; box-shadow: var(--hl), var(--sh-1); transition: transform var(--t2) var(--ease), box-shadow var(--t2) var(--ease); }
.door-img { position: absolute; inset: 0; z-index: -2; }
.door-img img { object-position: 50% 30%; }
.door::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 12, 24, 0) 25%, rgba(20, 12, 24, .55) 55%, rgba(20, 12, 24, .88) 100%); }
.door:hover { transform: translateY(-4px); box-shadow: var(--hl), var(--sh-2); }
.door:hover .door-img img { transform: scale(1.04); }
.door-body { display: flex; flex-direction: column; gap: 8px; padding: 24px; }
.door-k { align-self: flex-start; height: 24px; display: inline-flex; align-items: center; padding: 0 8px; border-radius: 8px; font-size: 12px; font-weight: 600; background: color-mix(in srgb, var(--c) 70%, transparent); }
.door b { font: 700 22px/1.25 var(--display); }
.door-line { font-size: 14px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.door-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.door-foot .av { box-shadow: 0 0 0 2px rgba(20, 12, 24, .6); }
.door-go { font-size: 14px; font-weight: 600; }
.collage { display: flex; }
.collage .ph { flex: 1; height: 100%; }
.collage .ph img { object-position: 50% 10%; }

/* ---------- featured: big cards with example chats ---------- */
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.feat { display: grid; grid-template-columns: 200px minmax(0, 1fr); overflow: hidden; transition: transform var(--t2) var(--ease), box-shadow var(--t2) var(--ease); }
.feat:hover { transform: translateY(-4px); box-shadow: var(--hl), 0 0 0 1px var(--ring), var(--sh-2); }
.feat-pic { position: relative; display: block; text-decoration: none; color: #fff; overflow: hidden; }
.feat-pic .fp { position: absolute; inset: 0; }
.feat-pic .fp img { object-position: 50% 15%; }
.feat:hover .fp img { transform: scale(1.04); }
.feat-pic::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(20, 12, 24, .82)); }
.feat-name { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; display: grid; gap: 4px; }
.feat-name .ctag { justify-self: start; background: rgba(255, 255, 255, .9); }
.feat-name b { font: 700 22px/1.2 var(--display); }
.feat-name span:last-child { font-size: 13px; color: rgba(255, 255, 255, .85); }
.feat-body { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.feat-k { font-size: 12px; font-weight: 600; color: var(--c); letter-spacing: .04em; }
.ex { display: flex; flex-direction: column; gap: 8px; }
.ex .bub { max-width: 88%; padding: 8px 12px; font-size: 14px; line-height: 1.55; border-radius: 14px; }
.ex .bub.u { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--sunk); }
.ex .bub.a { align-self: flex-start; border-radius: 14px 14px 14px 4px; background: color-mix(in srgb, var(--c, var(--violet)) 10%, var(--surface)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c, var(--violet)) 18%, transparent); }
.feat .card-acts { margin-top: auto; }

/* ---------- character cards ---------- */
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 24px; }
.bar .chips { flex: 1; }
.search input { width: 260px; height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-s); background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px var(--gap); align-items: stretch; }
.card { position: relative; display: flex; flex-direction: column; overflow: visible; transition: transform var(--t2) var(--ease), box-shadow var(--t2) var(--ease); }
.card:hover { transform: translateY(-4px); box-shadow: var(--hl), 0 0 0 1px var(--ring), var(--sh-2); }
.card-pic { position: relative; display: block; border-radius: var(--r) var(--r) 0 0; overflow: hidden; }
.card-pic .cp { aspect-ratio: 5 / 4; }
.card-pic .cp img { object-position: 50% 0; }
.card:hover .cp img { transform: scale(1.04); }
.card-pic .ctag { position: absolute; left: 12px; top: 12px; background: rgba(255, 252, 249, .92); box-shadow: 1px 2px 6px rgba(60, 36, 58, .12); }
.card-pic::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--c); opacity: .8; }
.card-body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.card-name { display: grid; gap: 2px; text-decoration: none; }
.card-name b { font: 700 18px/1.3 var(--display); }
.card-name span { font-size: 13px; color: var(--muted); }
.intro { font-size: 14px; line-height: 1.55; }
.card-acts { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.vcount { margin-left: auto; font-size: 12px; color: var(--faint); }

/* ---------- ways to play ---------- */
.pgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.play { display: flex; flex-direction: column; gap: 16px; padding: 24px; position: relative; overflow: hidden; }
.play::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); }
.play-h { display: flex; gap: 12px; align-items: center; }
.play-h > div { display: grid; gap: 4px; justify-items: start; }
.play-h b { font: 700 18px/1.3 var(--display); }
.play-how { font-size: 14px; color: var(--muted); }
.play-say { padding: 12px 16px; border-radius: var(--r-s); background: var(--sunk); font-size: 14px; }
.play-say span { display: block; margin-bottom: 4px; font-size: 12px; color: var(--faint); }
.play .card-acts { padding-top: 0; }

/* ---------- feed ---------- */
.fgrid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); align-items: stretch; }
.feed { display: grid; gap: 24px; }
.post { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.post-h { display: flex; gap: 12px; align-items: center; }
.post-h > div { display: grid; }
.post-h b { font-size: 15px; }
.post-h span { font-size: 12px; color: var(--faint); }
.post-t { font-size: 15px; line-height: 1.7; }
.post-img { display: block; border-radius: var(--r-s); overflow: hidden; }
.post-img .pi { aspect-ratio: 16 / 9; }
.post-img .pi img { object-position: 50% 25%; }
.fgrid3 .post-img .pi { aspect-ratio: 16 / 7; }
.post-f { display: flex; align-items: center; gap: 8px; margin-top: auto; font-size: 13px; color: var(--muted); }
.like { color: var(--faint); }
.like.on { color: var(--rose); }
.comments { display: grid; gap: 8px; padding-top: 16px; box-shadow: inset 0 1px 0 var(--line); }
.cm { display: flex; gap: 8px; align-items: flex-start; }
.cm p { padding: 8px 12px; border-radius: 12px; background: var(--sunk); font-size: 14px; }
.cm p b { margin-right: 8px; font-size: 13px; }
.cm.them p { background: color-mix(in srgb, var(--c) 10%, var(--surface)); }
.cform { display: flex; gap: 8px; }
.cform input { flex: 1; height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--sunk); }

/* ---------- create banner (outside the grid) ---------- */
.create-banner { display: flex; align-items: center; gap: 24px; padding: 24px; text-decoration: none; transition: transform var(--t2) var(--ease), box-shadow var(--t2) var(--ease); }
.create-banner:hover { transform: translateY(-2px); box-shadow: var(--hl), 0 0 0 1px var(--ring), var(--sh-2); }
.cb-pics { display: flex; flex: none; }
.cb-pics .ph { width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 3px var(--surface); }
.cb-pics .ph + .ph { margin-left: -16px; }
.cb-pics img { object-position: 50% 20%; }
.cb-t { flex: 1; display: grid; gap: 4px; }
.cb-t b { font: 700 20px/1.3 var(--display); }
.cb-t span { font-size: 14px; color: var(--muted); }

/* ---------- character page ---------- */
.dlayout { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 48px; align-items: start; }
.dside { position: sticky; top: 88px; display: grid; gap: 16px; }
.dpic { border-radius: var(--r-l); overflow: hidden; box-shadow: var(--hl), var(--sh-2); }
.dpic .dp { aspect-ratio: 4 / 5; }
.vrow { display: flex; gap: 8px; }
.vthumb { position: relative; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 12px 0 4px; border-radius: 99px; background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; }
.vthumb .ph { width: 40px; height: 40px; border-radius: 50%; }
.vthumb .ph img { object-position: 50% 20%; }
.dmain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dmain > .ctag { align-self: flex-start; }
.dmain h1 { font: 700 40px/1.15 var(--display); }
.dtitle { color: var(--muted); font-size: 16px; margin-top: -8px; }
.dintro { font-size: 17px; }
.dmain > .row { margin-top: 8px; }
.dcard { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.dcard h3 { font: 700 18px/1.3 var(--display); }
.dcols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.dopen { margin: 0; padding: 16px; border-radius: var(--r-s); background: color-mix(in srgb, var(--c, var(--violet)) 8%, var(--surface)); font-size: 15px; line-height: 1.7; }
.vgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.vcard { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 8px; text-align: left; transition: box-shadow var(--t1); }
.vc-img { aspect-ratio: 4 / 5; border-radius: 10px; }
.vc-img img { object-position: 50% 0; }
.vc-b { display: grid; align-content: start; gap: 4px; padding: 8px 8px 8px 0; }
.vc-b b { font-size: 15px; }
.vc-b span { font-size: 13px; color: var(--muted); line-height: 1.55; }
.aff { display: grid; grid-template-columns: auto auto minmax(80px, 1fr); align-items: center; gap: 4px 12px; padding: 12px 16px; border-radius: var(--r-s); background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--ring); }
.aff-k { font-size: 12px; color: var(--faint); }
.aff b { font-size: 14px; }
.aff-bar { height: 8px; border-radius: 8px; background: var(--sunk); overflow: hidden; }
.aff-bar i { display: block; height: 100%; border-radius: 8px; background: var(--brand); }
.aff small { grid-column: 1 / -1; font-size: 12px; color: var(--muted); }

/* ---------- scene / story pages ---------- */
.scenep .dcols { margin: 24px 0 var(--gap); }
.scenep > .wrap > .dcard { margin-top: var(--gap); }
.sbanner { position: relative; display: flex; align-items: flex-end; min-height: 360px; border-radius: var(--r-l); overflow: hidden; color: #fff; isolation: isolate; box-shadow: var(--hl), var(--sh-2); }
.sb-img { position: absolute; inset: 0; z-index: -2; }
.sbanner.story .sb-img img { object-position: 50% 50%; }
.sbanner::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(20, 12, 24, .05) 20%, rgba(20, 12, 24, .85)); }
.sb-in { display: grid; gap: 8px; justify-items: start; padding: 32px; max-width: 720px; }
.sb-in h1 { font: 700 36px/1.2 var(--display); }
.sb-in p { color: rgba(255, 255, 255, .88); }
.sb-host { font-size: 14px; }
.castlist { display: grid; gap: 12px; }
.castp { display: flex; gap: 12px; align-items: center; }
.castp > div { display: grid; }
.castp b { font-size: 15px; }
.castp span { font-size: 13px; color: var(--muted); }
.hosttag { font-style: normal; display: inline-flex; height: 20px; align-items: center; padding: 0 8px; margin-left: 4px; border-radius: 6px; font-size: 11px; color: #fff; background: var(--brand); vertical-align: 2px; }
.acts { margin: 0; padding-left: 24px; display: grid; gap: 8px; }
.ppick { display: grid; gap: 8px; }
.pn-l { font-size: 13px; font-weight: 600; color: var(--muted); }
.slot { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.slot b { font-size: 14px; width: 64px; flex: none; }
.slot span { flex: 1; font-size: 13px; color: var(--muted); min-width: 0; }
.slot.vacant { box-shadow: 0 0 0 1px var(--line); background: transparent; }

/* ---------- group set-up ---------- */
.pickgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); padding-bottom: 160px; }
.pick { position: relative; display: flex; flex-direction: column; text-align: left; overflow: visible; transition: transform var(--t1) var(--ease), box-shadow var(--t1); }
.pick:hover { transform: translateY(-2px); }
.pk-img { aspect-ratio: 1; border-radius: var(--r) var(--r) 0 0; }
.pk-img img { object-position: 50% 0; }
.pk-b { display: grid; gap: 2px; padding: 12px; }
.pk-b b { font-size: 15px; }
.pk-b span { font-size: 12px; color: var(--muted); line-height: 1.45; }
.gform { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 30; width: min(760px, calc(100vw - 32px)); display: grid; gap: 12px; padding: 16px; border-radius: var(--r); }
.gf-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.gf-row input { flex: 1; min-width: 0; height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-s); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }

/* ---------- me ---------- */
.pcard { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.pc-h { display: flex; gap: 12px; align-items: center; }
.pc-h > div { display: grid; }
.pc-h b { font: 700 18px/1.3 var(--display); }
.pc-h span { font-size: 13px; color: var(--muted); }
.pcard dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.pcard dt { color: var(--faint); }
.pcard dd { margin: 0; }
.emptycard { display: grid; justify-items: start; gap: 8px; padding: 24px; }
.emptycard p { color: var(--muted); font-size: 14px; }
.emptycard .btn { margin-top: 8px; }
.data { padding-left: 24px; color: var(--muted); display: grid; gap: 8px; margin: 0 0 24px; max-width: 72ch; }

/* ---------- dialogs, toast, menus ---------- */
.dlg { border: 0; padding: 0; border-radius: var(--r-l); width: min(520px, calc(100vw - 32px)); max-height: calc(calc(100dvh - var(--kumo-bar, 0px)) - 32px); background: var(--surface); color: var(--ink); box-shadow: var(--hl), var(--sh-3); }
.dlg::backdrop { background: rgba(36, 26, 43, .42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.dlg-in { display: grid; gap: 16px; padding: 24px; }
.dlg-in h3 { font: 700 22px/1.3 var(--display); }
.dlg-in h4 { font-size: 14px; }
.dlg-in input:not([type]), .dlg-in textarea, .fl input:not([type=range]), .fl textarea, .note-row input, #ltNew, #sumBox { width: 100%; border: 0; border-radius: var(--r-s); padding: 10px 12px; background: var(--sunk); line-height: 1.5; resize: vertical; }
.fl input:focus, .fl textarea:focus, .dlg-in input:focus, .dlg-in textarea:focus, .cform input:focus, .gf-row input:focus, .search input:focus { outline: 0; box-shadow: 0 0 0 2px var(--violet); background: var(--surface); }
.plist { display: grid; gap: 8px; }
.popt { position: relative; display: grid; gap: 2px; padding: 12px 16px; text-align: left; }
.popt.row-av { display: flex; align-items: center; gap: 12px; }
.popt span { font-size: 13px; color: var(--muted); }
.excerpt { margin: 0; padding: 12px 16px; border-radius: var(--r-s); background: var(--sunk); font-size: 14px; }
.reasons { display: grid; gap: 8px; }
.sw { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.sw input { margin-top: 4px; accent-color: var(--violet); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 90; max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: var(--r-s); background: var(--ink); color: #fff; font-size: 14px; box-shadow: var(--sh-3); }
.menu { position: absolute; right: 16px; top: 64px; z-index: 6; display: grid; min-width: 176px; padding: 8px; border-radius: var(--r-s); }
.menu a, .menu button { padding: 8px 12px; border-radius: 8px; text-align: left; text-decoration: none; font-size: 14px; }
.menu a:hover, .menu button:hover { background: rgba(52, 33, 58, .06); }
.menu [data-act=delChat] { color: var(--bad); }

/* ---------- footer ---------- */
.foot { padding: 32px 0 48px; font-size: 13px; color: var(--faint); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot b { color: var(--muted); }

/* ---------- chat ---------- */
body.is-chat { height: calc(100dvh - var(--kumo-bar, 0px)); overflow: hidden; display: flex; flex-direction: column; }
body.is-chat #app { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.chat-wrap { flex: 1; min-height: 0; display: grid; grid-template-columns: 288px minmax(0, 1fr) 0; width: 100%; }
.chat-wrap.nolist { grid-template-columns: 0 minmax(0, 1fr) 0; }
.chat-wrap.withpanel { grid-template-columns: 288px minmax(0, 1fr) 344px; }
.chat-wrap.nolist.withpanel { grid-template-columns: 0 minmax(0, 1fr) 344px; }
.chat-wrap.nolist .side { display: none; }
.side { display: flex; flex-direction: column; gap: 16px; padding: 16px; overflow-y: auto; background: rgba(255, 252, 249, .45); box-shadow: inset -1px 0 0 var(--line); }
.side-h { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.cvlist { display: grid; gap: 4px; }
.cv { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: var(--r-s); text-decoration: none; transition: background var(--t1); }
.cv:hover { background: rgba(52, 33, 58, .05); }
.cv.on { background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line), var(--sh-1); }
.cv > span:not(.stack):not(.av) { flex: 1; min-width: 0; display: grid; }
.cv b, .cv small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv b { font-size: 14px; }
.cv small { font-size: 12px; color: var(--muted); }
.cv time { font-size: 11px; color: var(--faint); align-self: flex-start; }
.chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; isolation: isolate; }
.chat-bg { position: absolute; inset: 0; z-index: -1; background-size: cover; background-position: 50% 30%; opacity: .1; filter: saturate(.8) blur(2px); }
.chat-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(244, 238, 233, .2), rgba(244, 238, 233, .9)); }
.chead { position: relative; z-index: 5; display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 16px; border-radius: 0; }
.who { min-width: 0; display: grid; }
.who b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who b small { font-weight: 400; color: var(--muted); }
.who > span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai { font-style: normal; margin-right: 8px; padding: 0 6px; border-radius: 6px; font-size: 11px; font-weight: 600; color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }
.rename { height: 32px; padding: 0 8px; border: 0; border-radius: 8px; box-shadow: 0 0 0 2px var(--violet); }
.progress { display: flex; gap: 4px; }
.progress i { width: 24px; height: 6px; border-radius: 6px; background: var(--line); }
.progress i.done { background: var(--violet); }
.progress i.now { background: var(--brand); box-shadow: 0 0 0 2px rgba(168, 95, 176, .2); }
.msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; padding: 24px max(16px, calc((100% - 760px) / 2)); }
.msg { display: flex; gap: 12px; align-items: flex-start; }
.msg .col { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: min(640px, 86%); }
.msg .who { font-size: 12px; color: var(--muted); font-weight: 600; }
.msg .bub { padding: 12px 16px; border-radius: 4px 16px 16px 16px; background: var(--surface); line-height: 1.65; box-shadow: var(--hl), 0 0 0 1px var(--ring), 1px 2px 6px rgba(60, 36, 58, .05); overflow-wrap: anywhere; }
.msg .bub p + p { margin-top: 8px; }
.msg.u { flex-direction: column; align-items: flex-end; }
.msg.u .bub { max-width: min(560px, 86%); border-radius: 16px 4px 16px 16px; background: var(--brand); color: #fff; box-shadow: 2px 4px 12px rgba(168, 95, 176, .22); white-space: pre-wrap; }
.msg.err .bub { color: var(--bad); }
.msg .note { font-size: 12px; color: var(--faint); }
.tools { display: flex; gap: 4px; opacity: 0; transition: opacity var(--t1); }
.msg:hover .tools, .msg:focus-within .tools { opacity: 1; }
@media (hover: none) { .tools { opacity: 1; } }
.tools button { height: 24px; padding: 0 8px; border-radius: 6px; font-size: 12px; color: var(--faint); }
.tools button:hover { color: var(--ink); background: rgba(52, 33, 58, .06); }
.rawgroup { display: flex; flex-direction: column; gap: 16px; }
.choices { display: grid; gap: 8px; margin-top: 4px; }
.choice { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border-radius: var(--r-s); text-align: left; font-size: 14px; background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); transition: box-shadow var(--t1), transform var(--t1) var(--ease); }
.choice i { font-style: normal; flex: none; width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 12px; font-weight: 700; color: #fff; background: var(--brand); }
.choice:hover:not(:disabled) { transform: translateX(2px); box-shadow: 0 0 0 1.5px var(--violet); }
.choice:disabled { opacity: .55; cursor: default; }
.actcard { align-self: center; display: grid; justify-items: center; gap: 4px; width: min(440px, 100%); padding: 16px 24px; border-radius: var(--r); text-align: center; background: rgba(255, 252, 249, .8); box-shadow: var(--hl), 0 0 0 1px var(--ring); }
.actcard .ak { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--violet); }
.actcard b { font: 700 18px/1.3 var(--display); }
.actcard span { font-size: 13px; color: var(--muted); }
.actcard.end { box-shadow: 0 0 0 2px var(--violet), var(--sh-1); }
.actcard .row { margin-top: 8px; }
.sysnote { align-self: center; font-size: 12px; color: var(--faint); }
.sumnote { align-self: center; max-width: 560px; font-size: 12px; color: var(--muted); text-align: center; }
.dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); animation: blink 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.jump { position: absolute; left: 50%; bottom: 160px; transform: translateX(-50%); z-index: 5; height: 32px; padding: 0 16px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.cfoot { flex: none; display: grid; gap: 8px; padding: 12px max(16px, calc((100% - 760px) / 2)) 8px; background: rgba(255, 252, 249, .7); box-shadow: inset 0 1px 0 var(--line); }
.status { font-size: 13px; color: var(--muted); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.mentions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mention { display: inline-flex; align-items: center; gap: 4px; height: 32px; padding: 0 12px 0 6px; border-radius: 99px; font-size: 13px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.mention:hover { box-shadow: 0 0 0 1.5px var(--violet); }
.composer { display: flex; gap: 8px; align-items: flex-end; }
.composer textarea { flex: 1; resize: none; min-height: 48px; max-height: 180px; padding: 12px 16px; border: 0; border-radius: 14px; background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--line); line-height: 1.5; }
.composer textarea:focus { outline: 0; box-shadow: 0 0 0 2px var(--violet); }
.composer .btn { height: 48px; }
.cnote { font-size: 12px; color: var(--faint); }
.gen { display: inline-flex; align-items: center; gap: 4px; color: var(--violet); }
.gen i { width: 6px; height: 6px; border-radius: 50%; background: var(--violet); animation: blink 1.2s infinite; }
.panel { min-width: 0; min-height: 0; overflow: hidden; display: flex; flex-direction: column; background: rgba(255, 252, 249, .55); box-shadow: inset 1px 0 0 var(--line); }
.pn-h { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 8px 16px; box-shadow: inset 0 -1px 0 var(--line); }
.pn-body { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 16px; align-content: start; }
.pn-sec { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--surface); box-shadow: var(--hl), 0 0 0 1px var(--ring); }
.pn-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.pn-k { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-size: 11px; color: #fff; background: var(--brand); }
.pn-role { display: flex; gap: 12px; align-items: center; }
.pn-role > div { display: grid; }
.pn-role span { font-size: 13px; color: var(--muted); }
.pn-p { font-size: 13px; line-height: 1.6; }
.notes { display: grid; gap: 8px; }
.note-row { display: flex; gap: 4px; }
.panel .row input { flex: 1; }

/* ---------- workshop ---------- */
.cgrid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; }
.form { display: grid; gap: var(--gap); }
.fgrp { margin: 0; border: 0; padding: 24px; display: grid; gap: 16px; }
.fgrp legend { float: left; width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 0; font: 700 18px/1.3 var(--display); }
.fgrp legend small { font: 400 13px var(--body); color: var(--muted); }
.gk { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 50%; font: 700 12px var(--body); color: #fff; background: var(--brand); transform: translateY(-2px); }
.fl { display: grid; gap: 8px; }
.fl > span { font-size: 14px; font-weight: 600; }
.fl em { font-style: normal; font-size: 12px; color: var(--rose); }
.opt { font-style: normal; font-size: 12px; font-weight: 400; color: var(--faint); }
.avs { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.sliders { display: grid; gap: 8px; }
.sl { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; align-items: center; gap: 12px; font-size: 13px; color: var(--muted); }
.sl span:last-child { text-align: right; }
.sl input { width: 100%; accent-color: var(--violet); }
.privacy { font-size: 13px; color: var(--muted); }
.trial { position: sticky; top: 88px; display: grid; gap: 16px; }
.pvcard { display: grid; gap: 12px; padding: 16px; }
.pv-k { font-size: 12px; font-weight: 600; color: var(--faint); }
.pv-top { display: flex; gap: 12px; align-items: center; }
.pv-top > div { display: grid; }
.pv-top span { font-size: 13px; color: var(--muted); }
.pv-open { font-size: 14px; padding: 12px; border-radius: var(--r-s); background: var(--sunk); }
.thead { display: flex; align-items: center; }
.chat.mini { height: 440px; border-radius: var(--r); background: rgba(255, 252, 249, .6); box-shadow: var(--hl), 0 0 0 1px var(--ring); overflow: hidden; }
.chat.mini .msgs { padding: 16px; }
.chat.mini .composer { padding: 8px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pickgrid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .feat { grid-template-columns: 160px minmax(0, 1fr); }
  .hero h1 { font-size: 40px; }
  .chat-wrap.withpanel { grid-template-columns: 240px minmax(0, 1fr) 304px; }
  .dlayout { grid-template-columns: 300px minmax(0, 1fr); gap: 32px; }
  .cgrid { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 32px; }
  .fgrid { grid-template-columns: 1fr; }
  .dgrid3, .fgrid3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 861px) { .only-m { display: none !important; } }
@media (max-width: 860px) {
  :root { --pad: 16px; --sec: 48px; }
  .hide-m { display: none !important; }
  .top-in { gap: 8px; height: 56px; }
  .tnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; gap: 0; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 252, 249, .86); -webkit-backdrop-filter: blur(16px) saturate(1.4); backdrop-filter: blur(16px) saturate(1.4); box-shadow: 0 -1px 0 var(--line), 0 -4px 16px rgba(60, 36, 58, .06); }
  .tnav a { flex: 1; justify-content: center; padding: 0 4px; font-size: 13px; }
  body:not(.is-chat) { padding-bottom: 72px; }
  body.is-chat .top { display: none; }
  /* a backdrop filter would trap the fixed bottom nav inside the bar, so the bar is plain here and the nav carries the glass */
  .top { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 252, 249, .94); }
  .rgrid { grid-template-columns: 1fr; gap: 8px; }
  .hero { padding-top: 32px; }
  .hero h1 { font-size: 32px; }
  .lead { font-size: 15px; }
  .hero .row { margin-top: 24px; gap: 8px; }
  .hero .row .btn { flex: 1; padding: 0 12px; }
  .stage { padding-bottom: 0; display: grid; gap: 16px; }
  .cast-row { position: absolute; left: 16px; top: calc((100vw - 32px) * .625 - 64px); bottom: auto; }
  .cast-card { width: 64px; }
  .cast-card b { font-size: 11px; padding: 2px 4px; }
  .demo { position: relative; right: auto; bottom: auto; width: 100%; height: 272px; margin-top: 24px; }
  .head { flex-wrap: wrap; }
  .head h2 { font-size: 24px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 8px; }
  .card-body { padding: 12px; }
  .card-name b { font-size: 16px; }
  .intro { font-size: 13px; }
  .card .tags span:nth-child(3) { display: none; }
  .card-acts .btn.sm { padding: 0 10px; }
  .card-acts a.btn.sm { display: none; }
  .vcount { display: none; }
  .dgrid3, .fgrid3, .pgrid, .dgrid2, .dcols, .vgrid { grid-template-columns: 1fr; }
  .door { min-height: 280px; }
  .feat { grid-template-columns: 1fr; }
  .feat-pic { aspect-ratio: 16 / 10; }
  .feat-body { padding: 16px; }
  .bar { gap: 12px; }
  .bar .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--pad) * -1); padding: 4px var(--pad); scrollbar-width: none; }
  .bar .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
  .search, .search input { width: 100%; }
  .rgrid .rchat:nth-child(n+3) { display: none; }
  .create-banner { flex-wrap: wrap; gap: 16px; padding: 16px; }
  .create-banner .btn { width: 100%; }
  .dlayout { grid-template-columns: 1fr; gap: 24px; }
  .dside { position: static; }
  .dpic .dp { aspect-ratio: 5 / 4; }
  .dpic .dp img { object-position: 50% 0; }
  .vrow { overflow-x: auto; }
  .dmain h1 { font-size: 32px; }
  .sbanner { min-height: 280px; }
  .sb-in { padding: 24px; }
  .sb-in h1 { font-size: 28px; }
  .pickgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 200px; }
  .gform { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .cgrid { grid-template-columns: 1fr; }
  .trial { position: static; }
  .chat-wrap, .chat-wrap.nolist, .chat-wrap.withpanel, .chat-wrap.nolist.withpanel { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .panel { position: fixed; inset: 0; z-index: 60; display: none; background: var(--bg); }
  .chat-wrap.withpanel .panel { display: flex; }
  .chead { padding: 8px; gap: 8px; }
  .msgs { padding: 16px 12px; }
  .msg .col { max-width: 88%; }
  .cfoot { padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); }
  .cnote { font-size: 11px; }
  .jump { bottom: 176px; }
  .post { padding: 16px; }
  .foot .wrap { flex-direction: column; }
}
@media (max-width: 420px) {
  .logo b { font-size: 20px; }
  .tnav a { font-size: 12px; }
}
