/* Frontend visual system. Loaded after style.css; no build step or remote assets. */
:root {
  color-scheme: dark;
  --bg: #121217;
  --bg2: #19191f;
  --panel: #1c1c24;
  --panel2: #252530;
  --line: rgba(234, 231, 255, .085);
  --text: #eeedf5;
  --dim: #a19eaf;
  --accent: #ab99ed;
  --accent2: #8f7dcc;
  --gold: #d8bc88;
  --ok: #94c7b1;
  --sidebar-w: 224px;
  --accent-soft: rgba(171, 153, 237, .1);
  --elevated: #22222c;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
[v-cloak] { display: none; }
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { -webkit-appearance: none; }
button, a, input, textarea, select { touch-action: manipulation; }
button { transition: background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .18s var(--ease); }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
input::placeholder, textarea::placeholder { color: #8b879b; }
svg { flex-shrink: 0; }
.uiIcon { display: inline-block; width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.18em; }
.iconText { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
::selection { background: #65538e; color: #fff; }
::-webkit-scrollbar { width: 5px; height: 5px; }
.app { height: 100vh; height: 100dvh; }
.sidebar { background: #16161c; padding: 28px 16px 14px; gap: 8px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 27px; text-align: left; background: none; border: 0; color: var(--text); cursor: pointer; order: -2; flex-shrink: 0; }
.brandMark { width: 34px; height: 36px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; }
.brand > span { font-size: 20px; font-weight: 700; letter-spacing: 2px; }
.navGroup { margin-bottom: 15px; }
.navGroupTitle { padding: 0 14px 9px; color: #8f8a9d; font-size: 11px; letter-spacing: 1.5px; }
.navItem { width: 100%; min-height: 44px; gap: 12px; padding: 11px 14px; margin-bottom: 3px; color: #aaa6b9; font-size: 13px; border: 0; background: none; text-align: left; font-weight: 500; }
.navItem svg { width: 18px; height: 18px; stroke-width: 1.6; }
.navItem.active { background: var(--accent-soft); color: #cec0fb; }
.navItem.active::before { display: none; }
.navItem:hover { background: rgba(255,255,255,.035); }
.navItem.active:hover { background: rgba(171,153,237,.15); }
.sideUser { order: 2; margin-top: auto; padding: 14px 8px; width: 100%; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); text-align: left; }
.sideAvatar { width: 36px; height: 36px; background: #343040; color: #d7c9f9; font-weight: 500; font-size: 14px; }
.sideUserName { font-size: 13px; }
.sideUserSub { font-size: 11px; margin-top: 4px; }
.accountArrow { display: flex; margin-left: auto; color: var(--dim); }
.topbar { height: 74px; flex-basis: 74px; padding: 0 36px; background: rgba(18,18,23,.94); gap: 16px; }
.pageBreadcrumb { display: flex; gap: 14px; color: #d5d1df; font-size: 13px; white-space: nowrap; }
.topRight { margin-left: auto; gap: 12px; }
.balanceChip { min-height: 36px; padding: 7px 10px 7px 12px; background: rgba(216,188,136,.06); border-color: rgba(216,188,136,.16); border-radius: 9px; font-size: 12px; font-weight: 600; }
.balanceChip svg { width: 13px; height: 13px; }
.balancePlus { display: flex; align-items: center; margin-left: 5px; padding-left: 9px; border-left: 1px solid rgba(216,188,136,.2); }
.balancePlus .uiIcon { width: 14px; height: 16px; fill: none; stroke: currentColor; }
.iconBtn { width: 38px; height: 38px; border-color: transparent; background: transparent; color: #aaa5b9; }
.iconBtn:hover { background: rgba(255,255,255,.055); color: var(--text); }
.dotBadge { background: var(--accent); box-shadow: none; }
.content { padding: 32px 36px 44px; scrollbar-gutter: stable; }
.content > .panel, .content > .listItem, .content > .grid2, .content > .grid3 { max-width: 1080px; }
.homeContent { padding-top: 26px; }
.homeIntro { position: relative; display: grid; grid-template-columns: minmax(0,1.4fr) minmax(240px,1fr); gap: 24px; max-width: 1280px; min-height: 288px; margin-bottom: 24px; }
.introCopy { padding: 23px 0 16px; align-self: center; }
.introCopy h1 { font-family: "Noto Serif SC", "Songti SC", "SimSun", serif; font-weight: 500; font-size: clamp(29px,3.05vw,46px); line-height: 1.48; letter-spacing: 1px; margin: 16px 0 12px; text-wrap: pretty; }
.introCopy h1 > span { color: #b8a6e8; }
.introActions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 26px; }
.btnPrimary { display: inline-flex; align-items: center; justify-content: center; gap: 18px; background: #b6a1ec; color: #211a33; border: 1px solid transparent; border-radius: 10px; min-height: 42px; font-size: 13px; font-weight: 600; box-shadow: none; }
.btnPrimary:hover:not(:disabled) { background: #c6b4f5; transform: translateY(-1px); }
.featuredStory { position: relative; overflow: hidden; border-radius: 18px; min-height: 288px; padding: 0; border: 1px solid rgba(171,153,237,.14); background: var(--panel); color: #fff; text-align: left; cursor: pointer; }
.featuredStory > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 34%; transition: transform .5s var(--ease); }
.featuredStory:hover > img { transform: scale(1.04); }
.featureShade { position: absolute; inset: 0; background: linear-gradient(0deg,rgba(18,14,26,.98),rgba(18,14,26,.25) 74%); }
.featureCopy { position: absolute; bottom: 22px; left: 22px; right: 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.featureCopy strong { display: block; font-size: clamp(20px,2vw,26px); font-family: "Songti SC", "SimSun", serif; font-weight: 500; margin: 0; letter-spacing: 1px; }
.featureCopy > .uiIcon { width: 20px; height: 20px; color: #e1d5f4; }
.dailyBanner { display: flex; align-items: center; gap: 14px; max-width: 1280px; padding: 16px 20px; margin-bottom: 36px; border: 1px solid var(--line); border-radius: 12px; background: #1a1921; }
.dailyIcon { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; background: var(--accent-soft); border-radius: 10px; color: #b7a4e5; }
.dailyIcon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.dailyCopy { display: flex; flex: 1; align-items: center; flex-wrap: wrap; gap: 8px 20px; min-width: 0; }
.dailyCopy strong { color: #ddd6ea; font-size: 13px; font-weight: 500; }
.dailyCopy > span { color: #9b94aa; font-size: 11px; line-height: 1.6; }
.dailyBanner .btnGhost { font-size: 11px; white-space: nowrap; min-height: 36px; padding: 8px 13px; }
.dailyBanner .btnGhost:disabled { opacity: 1; color: var(--dim); background: transparent; border-color: transparent; }
.discoverHead { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; max-width: 1280px; margin-bottom: 22px; }
.discoverHead h2 { display: flex; align-items: center; gap: 12px; font-size: 21px; letter-spacing: .5px; font-weight: 600; margin: 0; }
.resultCount { border: 1px solid var(--line); border-radius: 6px; padding: 2px 6px; color: var(--dim); font-size: 10px; font-weight: 400; letter-spacing: 0; }
.topTabs { display: flex; margin: 0; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #19191f; }
.topTab { padding: 7px 16px; min-height: 32px; border-radius: 6px; font-size: 12px; color: #a49cb2; }
.topTab.active { background: #302a3e; color: #d8c8fb; }
.searchBox { display: flex; align-items: center; gap: 12px; padding: 0 14px; background: var(--bg2); border: 1px solid rgba(171,153,237,.28); border-radius: 11px; max-width: 1280px; margin-bottom: 22px; }
.searchBox > svg { width: 19px; height: 19px; fill: none; stroke: var(--dim); stroke-width: 1.6; }
.searchBox input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: none; min-height: 48px; padding: 10px 0; }
.searchBox input:focus-visible { outline: none; }
.searchBox:focus-within { box-shadow: 0 0 0 2px rgba(171,153,237,.24); }
.searchClose { min-width: 36px; min-height: 40px; background: none; color: var(--dim); border: 0; cursor: pointer; }
.searchClose, .sheetHead button, .directiveClose { display: grid; place-items: center; }
.characterGrid { grid-template-columns: repeat(auto-fill,minmax(220px,1fr)); gap: 22px; max-width: 1280px; align-items: start; }
.characterCard { display: block; width: 100%; padding: 0; text-align: left; color: var(--text); border-radius: 14px; background: #1b1a22; border-color: rgba(255,255,255,.065); }
.characterCard:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.2); border-color: rgba(171,153,237,.3); }
.characterCard .cardImgWrap { aspect-ratio: 1/1.06; }
.characterCard .cardImg { transition: transform .5s var(--ease); }
.characterCard:hover .cardImg { transform: scale(1.04); }
.characterCard .cardShade { background: linear-gradient(0deg,rgba(27,26,34,.8),transparent 50%); }
.characterCard .cardBody { position: static; padding: 17px 16px 15px; }
.characterCard .cardTitle { font-size: 16px; font-weight: 600; text-shadow: none; margin-bottom: 8px; line-height: 1.5; }
.characterCard .cardDesc { font-size: 12px; line-height: 1.8; color: #a7a0b5; min-height: 43px; margin-bottom: 12px; }
.characterCard .cardTags { gap: 6px; margin-bottom: 16px; }
.characterCard .cardTag { font-size: 10px; background: #27232f; color: #b8a8ce; border: 0; padding: 4px 7px; border-radius: 5px; }
.characterCard .cardFoot { border-top: 1px solid var(--line); padding-top: 12px; gap: 6px; color: #aba1b7; font-size: 10px; }
.characterCard .cardCreator { max-width: 50%; }
.cardPop { color: #b7accc; white-space: nowrap; }
.cardPop svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.tier { left: 12px; top: 12px; padding: 4px 8px; border-radius: 5px; font-size: 10px; box-shadow: none !important; letter-spacing: 1px; }
.tier.SSR { color: #e7cf9b; border-color: rgba(216,188,136,.35); }
.badgeNew { top: 12px; right: 12px; background: rgba(21,19,29,.65); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.2); border-radius: 5px; font-size: 9px; font-weight: 400; color: #e0d6ec; padding: 4px 7px; }
.cardEnter { position: absolute; bottom: 14px; right: 14px; color: #e1d5f4; font-size: 11px; padding: 6px 9px; background: rgba(20,17,29,.55); border: 1px solid rgba(255,255,255,.15); border-radius: 6px; opacity: 0; transform: translateY(5px); transition: .2s var(--ease); }
.card:hover .cardEnter, .card:focus-visible .cardEnter { opacity: 1; transform: none; }
.skeletonCard { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); padding-bottom: 20px; }
.skeletonCard > div { aspect-ratio: 1/1.06; background: #24212d; animation: skeletonPulse 1.6s ease-in-out infinite alternate; }
.skeletonCard > span { display: block; width: 65%; height: 10px; margin: 18px 16px 0; border-radius: 5px; background: var(--panel2); }
.skeletonCard > span:last-child { width: 40%; }
@keyframes skeletonPulse { to { opacity: .4; } }
.discoveryEmpty { border: 1px dashed rgba(171,153,237,.2); border-radius: 16px; padding: 36px 20px; max-width: 1280px; }
.emptySymbol { display: block; color: var(--accent); margin-bottom: 12px; }
.emptySymbol .uiIcon { width: 48px; height: 48px; stroke-width: 1.2; }
.empty h3 { font-size: 16px; font-weight: 500; color: #d9d2e5; }
.empty p { line-height: 1.8; color: var(--dim); }
.btnGhost { background: rgba(255,255,255,.025); color: #c0afd9; border-color: rgba(171,153,237,.16); font-size: 13px; min-height: 40px; }
.btnGhost:hover:not(:disabled) { background: var(--accent-soft); border-color: rgba(171,153,237,.32); }
.pageTitle { font-size: 26px; letter-spacing: .5px; font-weight: 600; margin-bottom: 8px; }
.pageSub { font-size: 13px; line-height: 1.8; margin-bottom: 26px; }
.panel { padding: 24px; border-radius: 14px; }
.formRow label { font-size: 12px; margin-bottom: 8px; }
.formRow input, .formRow textarea, .formRow select { background: #15151c; font-size: 14px; padding: 12px 14px; line-height: 1.6; border-radius: 9px; }
.formRow textarea { min-height: 84px; }
.drawControls { display: grid; grid-template-columns: minmax(0,1fr) 82px auto; gap: 10px; }
.drawControls select { min-width: 0; padding: 10px; min-height: 44px; border-radius: 9px; background: #25242d; border: 1px solid var(--line); color: var(--text); }
.listItem { padding: 17px 20px; border-radius: 12px; }
.liTitle { font-size: 14px; line-height: 1.5; }
.liSub { font-size: 12px; line-height: 1.6; }
.switchTitle { font-size: 14px; }
.switchDesc, .muted { font-size: 12px; line-height: 1.7; }
.switch { border: 0; padding: 0; }
.switch.on { background: #8871bb; }
.sheetMask { background: rgba(5,5,9,.65); backdrop-filter: blur(5px); }
.sheet { width: min(500px,calc(100vw - 32px)); border-radius: 18px; max-height: 85dvh; background: #1d1c25; box-shadow: 0 32px 90px rgba(0,0,0,.4); }
.sheetHead { padding: 20px 22px; }
.sheetHead h3 { font-size: 17px; font-weight: 600; }
.sheetHead button { min-width: 36px; min-height: 36px; border-radius: 9px; }
.sheetHead button:hover { background: var(--panel2); }
.sheetBody { padding: 18px 22px 24px; gap: 12px; }
.pkg { padding: 17px; border-radius: 10px; background: #24212e; }
.pkg:hover { border-color: rgba(171,153,237,.4); }
.pkgSub { line-height: 1.7; }
.pkgTag { background: #786195; }
.toastMsg { top: 22px; background: #302a3e; color: #eee7f9; border-color: rgba(171,153,237,.3); border-radius: 10px; padding: 12px 20px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
/* Conversation layout and reading experience */
.chatLayout { flex: 1; position: relative; }
.convList { display: none; width: 260px; flex-basis: 260px; background: #17171e; }
.conversationsOpen .convList { display: flex; }
.convHead { padding: 22px 16px; min-height: 76px; font-size: 14px; gap: 8px; }
.convHead .btnGhost { min-height: 30px; margin-left: auto; }
.convScroll { padding: 10px; }
.convItem { padding: 13px 10px; margin-bottom: 5px; gap: 10px; }
.convItem.active { background: var(--accent-soft); }
.convAvatar { width: 40px; height: 40px; border-radius: 11px; }
.convName { font-size: 12px; }
.convTime { font-size: 9px; color: #a199ac; }
.convPreview { font-size: 11px; color: #a199ac; margin-top: 6px; }
.convMore { display: grid; place-items: center; color: #aca0c0; opacity: 1; align-self: center; min-width: 24px; min-height: 36px; }
.pinMark { display: inline-flex; vertical-align: middle; color: var(--accent); }
.pinMark .uiIcon { width: 11px; height: 11px; }
.convClose, .convBackdrop { display: none; }
.chatMain { position: relative; isolation: isolate; background: var(--bg); }
.chatBackdrop { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.chatBackdrop img { width: 100%; height: 100%; object-fit: cover; opacity: .065; filter: blur(5px) saturate(.6); }
.chatBackdrop::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg,var(--bg),transparent 45%,var(--bg)); }
.chatTop, .chatEmptyTop { height: 76px; flex: 0 0 76px; display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(18,18,23,.65); border-bottom: 1px solid var(--line); }
.chatEmptyTop { color: var(--dim); font-size: 13px; }
.chatTopAvatar { width: 40px; height: 40px; border-radius: 11px; }
.chatTopName { font-size: 15px; }
.chatTopSub { margin-top: 5px; font-size: 11px; }
.chatTopRight { gap: 3px; }
.story { padding: 28px 32px; overscroll-behavior: contain; }
.storyInner { max-width: 760px; gap: 20px; }
.storyMsg { font-size: 15px; line-height: 2.05; color: #e3ddea; }
.storyMsg.assistant { padding: 0 2px; color: #e3ddea; }
.storyMsg.user { max-width: 82%; background: #2b2538; border-color: rgba(171,153,237,.14); border-radius: 14px 14px 3px 14px; padding: 12px 18px; color: #e0d4f0; }
.chatEmpty { margin: auto; padding: clamp(38px,10vh,120px) 8px; }
.chatEmpty .emptySymbol { color: #88739e; }
.chatEmpty .emptySymbol .uiIcon { width: 64px; height: 64px; }
.chatEmpty h2 { font-family: "Songti SC","SimSun",serif; font-size: clamp(20px,2vw,27px); color: #e4ddeb; font-weight: 400; line-height: 1.7; }
.chatEmpty .btnPrimary { margin-top: 18px; }
.statusPanel { width: min(100%,480px); max-width: 100%; padding: 17px 19px; background: rgba(36,31,48,.82); border-color: rgba(171,153,237,.18); box-shadow: none; border-radius: 12px; }
.statusHead { color: #c7b1e5; font-size: 12px; margin-bottom: 12px; }
.statusRow { font-size: 12px; padding: 6px 0; align-items: center; }
.statusKey { color: #ada0bd; width: 100px; }
.statusVal { color: #ddd2e9; }
.stBar { flex: 1; max-width: 160px; height: 4px; }
.stBar i { background: #ad91d7; }
.stNum { color: #c5abdf; }
.unlockCard { background: rgba(37,29,43,.75); border-color: rgba(171,153,237,.22); padding: 14px 16px; }
.unlockCard:hover { border-color: rgba(171,153,237,.45); }
.unlockIcon { background: var(--accent-soft); }
.unlockTitle { color: #d0bbdf; }
.unlockSub { color: #a69aaf; }
.optionsBlock { gap: 9px; }
.optionsTitle { font-size: 11px; color: #a69aaf; margin: 4px 0; }
.option { width: 100%; text-align: left; background: rgba(30,28,38,.85); font-size: 13px; border-color: var(--line); border-radius: 10px; padding: 13px 16px; color: #d4c9df; }
.option:hover { background: #30263c; border-color: rgba(171,153,237,.3); }
.composerWrap { padding: 14px 28px 18px; background: rgba(20,19,26,.94); }
.composerTools, .quickFormat, .composer, .composerFoot, .directivePanel { max-width: 760px; margin-left: auto; margin-right: auto; }
.composerTools { gap: 6px; margin-bottom: 12px; }
.toolChip { border-radius: 6px; padding: 6px 9px; min-height: 30px; font-size: 11px; background: transparent; color: #a89bb8; border-color: transparent; }
.toolChip:hover { background: rgba(171,153,237,.06); color: #d3bee9; }
.toolChip.on { background: var(--accent-soft); border-color: rgba(171,153,237,.13); color: #c7aee4; }
.toolChip.on::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #b398d4; }
.toolChip select { font-size: 11px; }
.toolChip .uiIcon { width: 13px; height: 13px; }
.quickFormat { gap: 2px; margin-bottom: 9px; }
.qfBtn { display: inline-flex; align-items: center; gap: 5px; background: none; border-color: transparent; color: #a498b2; padding: 4px 8px; min-height: 26px; font-size: 11px; }
.qfBtn .uiIcon, .directiveBadge .uiIcon { width: 13px; height: 13px; }
.qfBtn:hover { background: var(--accent-soft); border-color: transparent; }
.composer { padding: 7px; gap: 6px; border: 1px solid rgba(171,153,237,.2); background: #211e2a; border-radius: 13px; align-items: flex-end; }
.composer:focus-within { border-color: #9275b0; box-shadow: 0 0 0 3px rgba(171,153,237,.05); }
.composerInput { border: 0; background: transparent; padding: 10px 9px; min-height: 42px; font-size: 14px; line-height: 1.6; border-radius: 7px; }
.composerInput:focus-visible { outline: 0; }
.sendBtn { width: 40px; height: 40px; border-radius: 9px; background: #b9a0df; }
.sendBtn svg { stroke: #21172e; }
.sendBtn:hover:not(:disabled) { background: #d0b9f0; }
.sendBtn:disabled { opacity: .35; }
.composerFoot { display: flex; align-items: center; gap: 14px; color: #a397af; font-size: 10px; padding-top: 10px; }
.composerFoot button { border: 0; background: none; color: #baa0d2; font-size: 10px; cursor: pointer; padding: 4px 0; }
.composerFoot button .uiIcon { width: 12px; height: 12px; }
.enterHint { margin-left: auto; color: #91829f; }
.directivePanel { background: #25202e; border-color: rgba(171,153,237,.22); }
.directiveHint { color: #b0a1bd; font-size: 12px; }
.detailView { background: var(--bg); }
.detailHero { min-height: 360px; overflow: hidden; }
.detailHeroBg { filter: blur(42px) brightness(.3) saturate(.65); }
.detailPoster { width: min(250px,36vh); border-radius: 14px; }
.detailTitle { font-size: 28px; font-weight: 600; }
.detailCard { background: #1c1a23; padding: 22px; border-color: var(--line); }
.detailCardHead h3 { font-size: 15px; }
.detailBar { background: rgba(20,18,26,.96); max-width: none; justify-content: center; }
.detailBarIcons { flex: 0 0 auto; }
.startChatBtn { max-width: 640px; background: #b7a0df; color: #22192f; box-shadow: none; font-size: 14px; }
.barIcon { width: 44px; height: 44px; }
.detailBack { width: 44px; height: 44px; }
.detailTimes, .notesToggle { color: #a59aae; }
.notesToggle { display: flex; width: max-content; }
.notesBody { font-size: 14px; }
.authorRow { background: #282031; border-color: rgba(171,153,237,.18); }
.authorAvatarRing { background: #877095; }
.commentAvatar { background: #51415f; }
.commentStars { display: inline-flex; align-items: center; gap: 2px; }
.commentStars .uiIcon { width: 12px; height: 12px; fill: currentColor; }
.barIcon .uiIcon, .detailBack .uiIcon { width: 19px; height: 19px; }
.barIcon.on .uiIcon { fill: currentColor; fill-opacity: .2; }
.startChatBtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.startChatBtn .uiIcon { width: 18px; height: 18px; }
@media (min-width: 1500px) {
  .content { padding-left: 52px; padding-right: 52px; }
  .topbar { padding-left: 52px; padding-right: 52px; }
  .homeIntro { min-height: 310px; }
  .characterGrid { grid-template-columns: repeat(auto-fill,minmax(240px,1fr)); }
}
@media (max-width: 1120px) and (min-width: 921px) {
  :root { --sidebar-w: 200px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .brand { gap: 8px; }
  .brand > span { font-size: 18px; }
  .topbar { padding: 0 24px; }
  .content { padding: 24px; }
  .homeIntro { grid-template-columns: 1.3fr 1fr; gap: 18px; }
  .introCopy h1 { font-size: 30px; }
  .dailyCopy { display: block; }
  .dailyCopy > span { display: block; margin-top: 5px; }
  .convList { width: 220px; flex-basis: 220px; }
  .story { padding-left: 24px; padding-right: 24px; }
  .composerWrap { padding-left: 18px; padding-right: 18px; }
  .enterHint { display: none; }
}
@media (max-width: 920px) {
  .sidebar { display: none; }
  .app { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
  .topbar { height: 62px; flex-basis: 62px; padding: 0 22px; }
  .topRight { gap: 8px; }
  .pageBreadcrumb { font-size: 12px; }
  .content { padding: 24px 22px 32px; }
  .homeIntro { min-height: 250px; grid-template-columns: 1.25fr 1fr; gap: 20px; }
  .introCopy { padding: 14px 0; }
  .introCopy h1 { font-size: clamp(27px,4.2vw,36px); }
  .featuredStory { min-height: 260px; }
  .dailyBanner { padding: 14px 16px; margin-bottom: 30px; }
  .dailyCopy { display: block; }
  .dailyCopy > span { display: block; margin-top: 4px; }
  .topTabs { display: flex; }
  .characterGrid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
  .characterCard .cardBody { padding: 14px 12px; }
  .characterCard .cardTitle { font-size: 14px; }
  .mobileTabs { min-height: 64px; padding: 7px 10px max(7px,env(safe-area-inset-bottom)); background: rgba(22,20,29,.97); backdrop-filter: blur(18px); }
  .mTab { min-height: 49px; gap: 5px; color: #9e91ae; font-size: 10px; justify-content: center; border-radius: 10px; position: relative; }
  .mTab svg { width: 21px; height: 21px; stroke-width: 1.6; }
  .mTab.active { color: #cfb6ef; }
  .mTab.active::before { content: ''; position: absolute; top: 0; width: 14px; height: 2px; border-radius: 2px; background: #bc9ee3; }
  .convList { position: absolute; inset: 0 auto 0 0; z-index: 4; width: min(320px,85vw); border-right: 1px solid var(--line); box-shadow: 18px 0 60px rgba(0,0,0,.3); }
  .convBackdrop { position: absolute; inset: 0; z-index: 3; background: rgba(0,0,0,.5); border: 0; }
  .conversationsOpen .convBackdrop { display: block; }
  .convClose { display: grid; width: 32px; height: 32px; order: 2; }
  .convHead { padding: 16px; min-height: 64px; }
  .convItem { min-height: 64px; }
  .convMore { min-width: 36px; min-height: 44px; }
  .chatTop, .chatEmptyTop { height: 68px; flex-basis: 68px; padding: 0 18px; }
  .story { padding: 24px 22px; }
  .composerWrap { padding: 12px 20px 10px; }
  .detailView { left: 0; bottom: calc(64px + env(safe-area-inset-bottom)); }
  .detailHero { min-height: 320px; }
  .detailSection { padding: 0 22px; }
  .detailBar { padding: 12px 22px; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 16px; height: 60px; flex-basis: 60px; }
  .pageBreadcrumb > span:last-child { font-size: 15px; font-weight: 600; color: #e4daee; }
  .topRight { gap: 5px; }
  .iconBtn { width: 36px; height: 40px; }
  .balanceChip { min-height: 34px; font-size: 11px; padding: 6px 9px; gap: 4px; }
  .balancePlus { padding-left: 6px; margin-left: 2px; }
  .content { padding: 22px 16px 28px; scrollbar-gutter: auto; }
  .homeIntro { display: block; margin-bottom: 20px; }
  .introCopy { padding: 6px 0 22px; }
  .introCopy h1 { font-size: 33px; line-height: 1.45; margin: 14px 0 12px; }
  .introActions { margin-top: 20px; }
  .introActions .btnPrimary { min-height: 44px; padding: 11px 16px; font-size: 12px; }
  .featuredStory { display: block; width: 100%; min-height: 158px; border-radius: 12px; }
  .featuredStory > img { object-position: 50% 42%; }
  .featureShade { background: linear-gradient(90deg,rgba(20,16,28,.94),rgba(20,16,28,.28)); }
  .featureCopy { left: 18px; right: 18px; bottom: 16px; }
  .featureCopy strong { font-size: 22px; }
  .dailyBanner { gap: 10px; padding: 13px 12px; margin-bottom: 28px; border-radius: 10px; }
  .dailyIcon { width: 32px; height: 34px; border-radius: 8px; }
  .dailyCopy strong { font-size: 12px; }
  .dailyCopy > span { font-size: 10px; }
  .dailyBanner .btnGhost { min-height: 44px; font-size: 10px; padding: 7px 8px; }
  .discoverHead { display: block; margin-bottom: 16px; }
  .discoverHead h2 { font-size: 21px; }
  .topTabs { margin-top: 18px; width: 100%; padding: 4px; gap: 4px; }
  .topTab { flex: 1; padding: 8px 6px; min-height: 38px; font-size: 12px; }
  .searchBox { margin-bottom: 16px; }
  .searchBox input { font-size: 16px; }
  .searchClose { min-height: 44px; min-width: 36px; }
  .characterGrid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .characterCard { border-radius: 11px; }
  .characterCard .cardImgWrap { aspect-ratio: 1/1.1; }
  .characterCard .cardBody { padding: 13px 11px 12px; }
  .characterCard .cardTitle { font-size: 14px; line-height: 1.5; }
  .characterCard .cardDesc { font-size: 11px; line-height: 1.7; min-height: 37px; margin-bottom: 10px; }
  .characterCard .cardTags { gap: 4px; margin-bottom: 12px; }
  .characterCard .cardTag { font-size: 9px; padding: 3px 5px; }
  .characterCard .cardFoot { font-size: 9px; padding-top: 10px; flex-wrap: wrap; row-gap: 6px; }
  .characterCard .cardCreator { max-width: 100%; }
  .cardEnter { display: none; }
  .tier { top: 9px; left: 9px; font-size: 9px; padding: 3px 6px; }
  .badgeNew { top: 9px; right: 9px; font-size: 8px; padding: 3px 5px; }
  .pageTitle { font-size: 24px; }
  .pageSub { margin-bottom: 20px; }
  .panel { padding: 18px 16px; }
  .grid2 { grid-template-columns: 1fr; gap: 0; }
  .grid3 { gap: 8px; }
  .grid3 .panel { padding: 16px 6px; }
  .listItem { padding: 15px 12px; gap: 9px; }
  .listItem .btnGhost { padding: 8px 10px; font-size: 12px; }
  .liSub { font-size: 11px; }
  .sliderRow { flex-wrap: wrap; gap: 10px; }
  .sliderRow label { width: 100%; font-size: 12px; }
  .sliderVal { width: 52px; }
  .formRow input, .formRow textarea, .formRow select { font-size: 16px; }
  .switchRow { min-height: 58px; }
  .sheet { top: auto; bottom: 0; left: 0; transform: none; width: 100%; max-height: 88dvh; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .sheetHead { padding: 16px 18px; }
  .sheetHead button { min-width: 44px; min-height: 44px; }
  .sheetBody { padding: 16px 18px calc(24px + env(safe-area-inset-bottom)); }
  .chatTop, .chatEmptyTop { height: 64px; flex-basis: 64px; padding: 0 12px; gap: 8px; }
  .chatTopAvatar { width: 34px; height: 34px; border-radius: 9px; }
  .chatTopName { font-size: 13px; }
  .chatTopSub { font-size: 10px; }
  .chatTopRight { gap: 0; }
  .chatTopRight .iconBtn { width: 30px; }
  .chatTop > div:not(.chatTopRight) { min-width: 0; }
  .chatTopName { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .story { padding: 18px 16px; }
  .storyInner { gap: 18px; }
  .storyMsg { font-size: 14px; line-height: 2; }
  .storyMsg.user { max-width: 90%; padding: 10px 14px; }
  .chatEmpty { padding-top: 9vh; }
  .chatEmpty h2 { font-size: 21px; }
  .statusPanel { padding: 15px; }
  .statusKey { width: 88px; }
  .composerWrap { padding: 9px 12px 8px; }
  .composerTools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; margin-bottom: 7px; }
  .composerTools::-webkit-scrollbar { display: none; }
  .toolChip { flex-shrink: 0; min-height: 34px; padding: 6px 8px; font-size: 10px; }
  .quickFormat { margin-bottom: 7px; gap: 0; }
  .qfBtn { padding: 5px 8px; min-height: 30px; font-size: 10px; }
  .composer { border-radius: 12px; padding: 6px; }
  .composerInput { font-size: 16px; min-height: 42px; padding: 8px; }
  .sendBtn { min-width: 42px; height: 42px; }
  .composerFoot { gap: 9px; padding-top: 5px; font-size: 9px; }
  .composerFoot button { font-size: 9px; min-height: 27px; }
  .enterHint { display: none; }
  .detailHero { min-height: 300px; padding-top: 28px; }
  .detailPoster { width: 190px; }
  .detailTitle { font-size: 24px; }
  .detailStats { gap: 12px; font-size: 11px; }
  .detailTag { font-size: 11px; padding: 6px 12px; }
  .detailSection { padding: 0 16px; margin-bottom: 12px; }
  .detailCard { padding: 18px; border-radius: 12px; }
  .detailBar { padding: 10px 16px; gap: 10px; }
  .detailBarIcons { gap: 4px; }
  .barIcon { width: 38px; height: 44px; }
  .startChatBtn { height: 44px; border-radius: 10px; font-size: 13px; }
}
@media (max-width: 360px) {
  .introCopy h1 { font-size: 29px; }
  .drawControls { grid-template-columns: minmax(0,1fr) 72px; }
  .drawControls .btnPrimary { grid-column: 1 / -1; }
  .characterGrid { gap: 9px; }
  .dailyIcon { display: none; }
  .chatTopAvatar { display: none; }
  .chatTopName { max-width: 116px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
