:root {
    --ink: #17213f;
    --ink-soft: #5d6680;
    --paper: #f4f7fb;
    --surface: #ffffff;
    --line: #dfe5ef;
    --line-strong: #cbd4e3;
    --blue: #5268d8;
    --blue-dark: #3447aa;
    --cyan: #3faebe;
    --violet: #8a70cf;
    --coral: #d97868;
    --green: #5b9b7d;
    --amber: #ba8b45;
    --danger: #bd4e5a;
    --shadow: 0 22px 60px rgba(34, 48, 88, .10);
    --font-body: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    --font-display: "Aptos Display", "Segoe UI Variable Display", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--font-body); line-height: 1.6; }
body.modal-open { overflow: hidden; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
img { max-width: 100%; }

:focus-visible { outline: 3px solid rgba(82, 104, 216, .28); outline-offset: 3px; }
[hidden] { display: none !important; }

.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--font-display); font-weight: 750; letter-spacing: -.02em; }
.brand-mark { position: relative; display: inline-block; width: 32px; height: 32px; border: 1px solid rgba(82,104,216,.22); border-radius: 50%; background: rgba(255,255,255,.7); }
.brand-mark i { position: absolute; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--blue); }
.brand-mark i:nth-child(1) { left: 7px; top: 15px; }
.brand-mark i:nth-child(2) { right: 7px; top: 7px; background: var(--cyan); }
.brand-mark i:nth-child(3) { right: 8px; bottom: 6px; background: var(--violet); }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; height: 1px; transform-origin: left center; background: rgba(82,104,216,.35); }
.brand-mark::before { width: 15px; left: 9px; top: 16px; transform: rotate(-34deg); }
.brand-mark::after { width: 14px; left: 10px; top: 17px; transform: rotate(28deg); }

.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .18em; line-height: 1.2; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid var(--blue); border-radius: 7px; background: var(--blue); color: #fff; font-weight: 700; cursor: pointer; box-shadow: 0 10px 24px rgba(82,104,216,.18); transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.button:hover { transform: translateY(-2px); background: var(--blue-dark); box-shadow: 0 14px 30px rgba(82,104,216,.23); }
.button:disabled { cursor: not-allowed; opacity: .48; transform: none; box-shadow: none; }
.button-small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.button-wide { width: 100%; }
.button-light { border-color: #fff; background: #fff; color: var(--blue-dark); box-shadow: none; }
.button-light:hover { background: #edf0ff; }
.text-link { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; }
.text-link span, .card-link b { transition: transform .18s ease; }
.text-link:hover span, .workbench-card:hover .card-link b { transform: translateX(4px); }

.site-header { position: relative; z-index: 10; display: flex; width: min(1180px, calc(100% - 48px)); height: 82px; margin: 0 auto; align-items: center; justify-content: space-between; }
.top-nav { display: flex; align-items: center; gap: 28px; color: var(--ink-soft); font-size: 14px; }
.top-nav a:hover { color: var(--ink); }
.site-footer { display: flex; width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 34px 0 42px; justify-content: space-between; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 13px; }
.flash-wrap { position: relative; z-index: 20; width: min(720px, calc(100% - 40px)); margin: 0 auto; }
.flash { margin: 10px 0; padding: 12px 15px; border: 1px solid; border-radius: 6px; font-size: 14px; }
.flash-success { border-color: #b9dccb; background: #eef9f3; color: #2e7254; }
.flash-error { border-color: #ecc3c8; background: #fff2f3; color: #99404a; }
.flash-info { border-color: #cbd6f0; background: #f1f5ff; color: #405694; }

.home-hero { position: relative; display: grid; width: min(1180px, calc(100% - 48px)); min-height: 650px; margin: 0 auto; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 60px; }
.home-hero::before { content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; left: -210px; top: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(63,174,190,.12), rgba(63,174,190,0) 70%); }
.hero-copy { padding: 52px 0 80px; }
.hero-copy h1 { max-width: 650px; margin: 15px 0 26px; font-family: var(--font-display); font-size: clamp(46px, 6vw, 78px); font-weight: 720; letter-spacing: -.055em; line-height: 1.08; }
.hero-copy h1 span { color: var(--blue); }
.hero-lead { max-width: 560px; margin: 0; color: var(--ink-soft); font-size: 18px; line-height: 1.85; }
.hero-actions { display: flex; margin-top: 38px; align-items: center; gap: 28px; }
.platform-token-meter { display: grid; width: fit-content; margin-top: 43px; grid-template-columns: auto auto; align-items: end; column-gap: 13px; }
.platform-token-meter::before { content: ""; width: 34px; height: 1px; align-self: center; background: var(--cyan); grid-row: 1 / 3; }
.platform-token-meter span { color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.platform-token-meter strong { font-family: var(--font-display); font-size: 29px; line-height: 1; }
.platform-token-meter small { grid-column: 2; color: var(--ink-soft); font-size: 10px; }

.atlas { position: relative; width: min(500px, 42vw); aspect-ratio: 1; margin: 0 auto; }
.atlas::before { content: ""; position: absolute; inset: 7%; border-radius: 50%; background: radial-gradient(circle at 48% 43%, rgba(255,255,255,.98) 0 13%, rgba(222,231,255,.6) 30%, rgba(222,231,255,0) 68%); filter: drop-shadow(0 30px 55px rgba(64,78,130,.1)); }
.atlas-ring { position: absolute; border: 1px solid rgba(82,104,216,.20); border-radius: 50%; }
.ring-one { inset: 12%; }
.ring-two { inset: 25%; border-style: dashed; animation: orbit-spin 30s linear infinite; }
.ring-three { inset: 38%; border-color: rgba(63,174,190,.28); }
.atlas-core { position: absolute; z-index: 2; display: flex; width: 116px; height: 116px; left: 50%; top: 50%; align-items: center; justify-content: center; flex-direction: column; transform: translate(-50%, -50%); border: 1px solid rgba(82,104,216,.24); border-radius: 50%; background: rgba(255,255,255,.87); box-shadow: 0 18px 55px rgba(65,79,130,.13); backdrop-filter: blur(10px); }
.atlas-core span { color: var(--blue); font-family: var(--font-display); font-size: 32px; font-weight: 800; letter-spacing: -.06em; }
.atlas-core small { color: var(--ink-soft); font-size: 11px; }
.atlas-node { position: absolute; z-index: 3; display: grid; width: 70px; height: 70px; place-items: center; border: 1px solid rgba(23,33,63,.10); border-radius: 50%; background: rgba(255,255,255,.88); box-shadow: 0 12px 28px rgba(33,49,91,.10); color: var(--ink); font-size: 13px; }
.node-one { left: 5%; top: 32%; }
.node-two { right: 5%; top: 20%; }
.node-three { right: 10%; bottom: 13%; }
.node-four { left: 20%; bottom: 4%; }
.atlas-star { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 7px rgba(63,174,190,.10); }
.star-one { top: 8%; left: 38%; }
.star-two { top: 50%; right: 1%; background: var(--violet); box-shadow: 0 0 0 7px rgba(138,112,207,.1); }
.star-three { bottom: 24%; left: 3%; background: var(--coral); box-shadow: 0 0 0 7px rgba(217,120,104,.1); }
@keyframes orbit-spin { to { transform: rotate(360deg); } }

.catalog-section { width: min(1180px, calc(100% - 48px)); margin: 40px auto 110px; }
.catalog-header { display: flex; margin-bottom: 32px; align-items: flex-end; justify-content: space-between; gap: 30px; }
.catalog-header h2, .home-band h2 { margin: 0; font-family: var(--font-display); font-size: 38px; letter-spacing: -.035em; }
.catalog-header p:not(.eyebrow) { margin: 4px 0 0; color: var(--ink-soft); }
.catalog-tools { display: flex; flex-direction: column; align-items: flex-end; gap: 13px; }
.search-box { display: flex; width: 290px; height: 44px; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink-soft); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.filter-tabs { display: flex; gap: 7px; }
.filter-tabs button { padding: 6px 11px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 13px; }
.filter-tabs button.active { border-bottom-color: var(--blue); color: var(--blue); font-weight: 700; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.app-card { min-height: 305px; padding: 25px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.8); box-shadow: 0 8px 25px rgba(41,55,94,.04); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.app-card:hover { transform: translateY(-5px); border-color: var(--line-strong); box-shadow: 0 18px 42px rgba(41,55,94,.09); }
.app-card-top { display: flex; margin-bottom: 34px; align-items: flex-start; justify-content: space-between; }
.app-glyph { display: grid; width: 49px; height: 49px; place-items: center; border: 1px solid currentColor; border-radius: 7px; font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.tone-cyan { color: #248b9b; background: #eaf8fa; }.tone-violet { color: #7458b7; background: #f2eefb; }.tone-coral { color: #bc5f52; background: #fff0ed; }.tone-green { color: #3d8060; background: #edf8f2; }.tone-blue { color: #4864b8; background: #eef2ff; }.tone-amber { color: #9a6a28; background: #fff6e6; }
.app-status { padding: 3px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); background: #fff; font-size: 11px; }
.app-card > small { color: var(--blue); font-weight: 700; }
.app-card h3 { margin: 5px 0 7px; font-family: var(--font-display); font-size: 23px; letter-spacing: -.02em; }
.app-card p { min-height: 52px; margin: 0 0 28px; color: var(--ink-soft); font-size: 14px; }
.card-command { display: flex; width: 100%; padding: 14px 0 0; justify-content: space-between; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink-soft); font-size: 13px; text-align: left; }
.card-command.active { color: var(--blue); font-weight: 700; }
.card-command.active span { transition: transform .18s ease; }
.card-command.active:hover span { transform: translateX(4px); }
.catalog-empty { padding: 50px; border: 1px dashed var(--line-strong); color: var(--ink-soft); text-align: center; }
.home-band { display: grid; width: min(1180px, calc(100% - 48px)); margin: 0 auto 110px; padding: 45px 50px; grid-template-columns: 1.2fr 1fr auto; align-items: center; gap: 45px; border-radius: 8px; background: var(--ink); color: #fff; }
.home-band .eyebrow { color: #93d7e0; }
.home-band p:not(.eyebrow) { color: #c2c9dc; }

.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); background: #f7f9fc; }
.auth-scene { position: relative; display: flex; min-height: 100vh; padding: 46px clamp(42px, 6vw, 88px); flex-direction: column; justify-content: space-between; overflow: hidden; background: #1d294c; color: #fff; }
.auth-scene::before { content: ""; position: absolute; width: 440px; height: 440px; left: -220px; bottom: -190px; border-radius: 50%; background: radial-gradient(circle, rgba(63,174,190,.25), transparent 65%); }
.brand-light .brand-mark { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.brand-light .brand-mark i { background: #fff; }
.auth-scene-copy { position: relative; z-index: 2; max-width: 580px; padding-bottom: 38px; }
.auth-scene-copy .eyebrow { color: #87d0dc; }
.auth-scene-copy h1 { margin: 15px 0 22px; font-family: var(--font-display); font-size: clamp(38px, 4.2vw, 62px); line-height: 1.12; letter-spacing: -.045em; }
.auth-scene-copy > p:last-child { max-width: 430px; color: #b8c2df; font-size: 16px; }
.auth-orbit { position: absolute; width: min(36vw, 500px); height: min(36vw, 500px); right: -9vw; top: 8vh; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; }
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; }
.auth-orbit::before { inset: 18%; }.auth-orbit::after { inset: 36%; border-style: dashed; }
.auth-orbit span { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #76c9d5; box-shadow: 0 0 0 9px rgba(118,201,213,.10); }
.auth-orbit span:nth-child(1) { left: 14%; top: 23%; }.auth-orbit span:nth-child(2) { right: 13%; top: 45%; background: #a98ddd; }.auth-orbit span:nth-child(3) { left: 32%; bottom: 5%; background: #e38d7f; }
.auth-orbit b { position: absolute; width: 58px; height: 58px; left: 50%; top: 50%; border-radius: 50%; background: rgba(255,255,255,.11); transform: translate(-50%, -50%); box-shadow: 0 0 45px rgba(255,255,255,.09); }
.auth-panel { display: flex; padding: 60px 35px; align-items: center; justify-content: center; }
.auth-card { width: min(480px, 100%); }
.mobile-brand { display: none; }
.auth-heading { margin-bottom: 28px; }
.auth-heading h2 { margin: 8px 0 8px; font-family: var(--font-display); font-size: 34px; letter-spacing: -.035em; }
.auth-heading > p:last-child { margin: 0; color: var(--ink-soft); }
.form-errors { margin: 18px 0; padding: 14px 17px; border: 1px solid #efc6cb; border-left: 4px solid var(--danger); border-radius: 5px; background: #fff5f6; color: #8f3f49; font-size: 13px; }
.form-errors ul { margin: 7px 0 0; padding-left: 19px; }
.auth-form { display: grid; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { color: var(--ink); font-size: 13px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; outline: 0; background: #fff; color: var(--ink); transition: border .18s ease, box-shadow .18s ease; }
.field input, .field select { height: 46px; padding: 0 13px; }
.field textarea { min-height: 110px; padding: 12px 13px; resize: vertical; line-height: 1.75; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(82,104,216,.10); }
.field small { color: var(--ink-soft); font-size: 11px; }
.remember-option { display: flex; align-items: center; gap: 11px; color: var(--ink); cursor: pointer; }
.remember-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); }
.remember-option span { display: flex; flex-direction: column; }
.remember-option b { font-size: 13px; }
.remember-option small { color: var(--ink-soft); font-size: 11px; }
.auth-switch { margin: 23px 0 0; color: var(--ink-soft); font-size: 13px; text-align: center; }
.auth-switch a { color: var(--blue); font-weight: 700; }

.captcha { min-width: 0; margin: 2px 0 0; padding: 0; border: 0; }
.captcha legend { margin-bottom: 9px; color: var(--ink); font-size: 13px; font-weight: 700; }
.captcha-image-wrap { position: relative; display: grid; min-height: 116px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: #edf1f8; }
.captcha-image-wrap img { display: block; width: 100%; height: 116px; object-fit: cover; }
.captcha-loading { padding: 24px; color: var(--ink-soft); font-size: 13px; text-align: center; }
.icon-button { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.55); border-radius: 6px; background: rgba(22,31,58,.65); color: #fff; cursor: pointer; backdrop-filter: blur(8px); }
.captcha-refresh { position: absolute; right: 9px; top: 9px; font-size: 18px; }
.captcha-refresh.loading { animation: refresh-spin .8s linear infinite; }
@keyframes refresh-spin { to { transform: rotate(360deg); } }
.captcha-help { margin: 8px 0 10px; color: var(--ink-soft); font-size: 12px; }
.captcha-digits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; }
.captcha-digits input { width: 100%; height: 52px; padding: 0; border: 1px solid var(--line-strong); border-radius: 6px; outline: 0; background: #fff; color: var(--ink); font-family: var(--font-display); font-size: 23px; font-weight: 750; text-align: center; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.captcha-digits input:focus { transform: translateY(-2px) scale(1.025); border-color: var(--blue); box-shadow: 0 8px 20px rgba(82,104,216,.13), 0 0 0 4px rgba(82,104,216,.09); }
.captcha-digits input.filled { border-color: var(--cyan); animation: digit-pop .2s ease; }
@keyframes digit-pop { 50% { transform: scale(1.08); } }
.captcha-status { min-height: 18px; margin: 5px 0 0; color: var(--danger); font-size: 12px; }

.dashboard-layout { display: grid; min-height: 100vh; grid-template-columns: 246px 1fr; }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; padding: 28px 20px 22px; flex-direction: column; border-right: 1px solid var(--line); background: rgba(250,252,255,.94); backdrop-filter: blur(14px); }
.sidebar .brand { padding: 0 8px; }
.role-chip { margin: 28px 8px 18px; color: var(--ink-soft); font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a { display: flex; min-height: 43px; padding: 0 11px; align-items: center; gap: 12px; border-left: 2px solid transparent; color: var(--ink-soft); font-size: 13px; transition: background .16s ease, color .16s ease; }
.side-nav a span { width: 21px; color: #7b86a3; font-size: 16px; text-align: center; }
.side-nav a:hover { background: #f0f3fa; color: var(--ink); }
.side-nav a.active { border-left-color: var(--blue); background: #edf1ff; color: var(--blue-dark); font-weight: 700; }
.side-nav a.active span { color: var(--blue); }
.sidebar-footer { margin-top: auto; padding-top: 19px; border-top: 1px solid var(--line); }
.user-mini { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: #e6eaff; color: var(--blue-dark); font-size: 13px; font-weight: 800; }
.user-mini div { display: flex; min-width: 0; flex-direction: column; }
.user-mini strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.user-mini small { color: var(--ink-soft); font-size: 11px; }
.text-button { margin-top: 13px; padding: 0; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 12px; }
.text-button:hover { color: var(--danger); }
.dashboard-main { min-width: 0; }
.dashboard-topbar { display: flex; min-height: 108px; padding: 25px clamp(25px, 4vw, 56px); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.56); }
.dashboard-topbar h1 { margin: 2px 0 0; font-family: var(--font-display); font-size: 25px; letter-spacing: -.025em; }
.topbar-home { color: var(--ink-soft); font-size: 13px; }
.topbar-home:hover { color: var(--blue); }
.menu-button { display: none; border: 0; background: transparent; font-size: 23px; cursor: pointer; }
.dashboard-content { width: min(1160px, 100%); margin: 0 auto; padding: 36px clamp(25px, 4vw, 56px) 70px; }
.dashboard-flashes { width: 100%; }
.welcome-strip, .admin-welcome { position: relative; display: flex; min-height: 220px; padding: 38px 42px; align-items: center; justify-content: space-between; overflow: hidden; border: 1px solid #d8def0; border-radius: 8px; background: linear-gradient(125deg, #f8faff 0%, #eef2ff 100%); }
.welcome-strip h2, .admin-welcome h2 { margin: 4px 0 9px; font-family: var(--font-display); font-size: 35px; letter-spacing: -.035em; }
.welcome-strip p:last-child, .admin-welcome p:last-child { margin: 0; color: var(--ink-soft); }
.orbit-badge { position: relative; width: 150px; height: 150px; flex: 0 0 150px; border: 1px solid rgba(82,104,216,.22); border-radius: 50%; }
.orbit-badge::before { content: ""; position: absolute; inset: 25px; border: 1px dashed rgba(82,104,216,.25); border-radius: 50%; }
.orbit-badge i { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); }
.orbit-badge i:first-child { left: 8px; top: 54px; }.orbit-badge i:nth-child(2) { right: 19px; bottom: 23px; background: var(--violet); }
.orbit-badge b { position: absolute; width: 39px; height: 39px; left: 50%; top: 50%; border-radius: 50%; background: var(--blue); transform: translate(-50%,-50%); box-shadow: 0 0 0 12px rgba(82,104,216,.10); }
.section-block { margin-top: 36px; }
.section-heading { display: flex; margin-bottom: 18px; align-items: flex-end; justify-content: space-between; }
.section-heading h2, .panel-heading h2, .invite-create h2, .settings-panel h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 25px; letter-spacing: -.025em; }
.workbench-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.workbench-card { padding: 25px; border: 1px solid var(--line); border-radius: 8px; background: #fff; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.workbench-card:hover { transform: translateY(-4px); border-color: #cbd4e9; box-shadow: var(--shadow); }
.workbench-icon { display: grid; width: 43px; height: 43px; margin-bottom: 25px; place-items: center; border: 1px solid #cbd4ef; border-radius: 7px; color: var(--blue); background: #f1f4ff; font-size: 19px; }
.workbench-card small { color: var(--ink-soft); }
.workbench-card h3 { margin: 4px 0 8px; font-family: var(--font-display); font-size: 21px; }
.workbench-card p { min-height: 50px; margin: 0 0 26px; color: var(--ink-soft); font-size: 13px; }
.card-link { display: flex; padding-top: 14px; justify-content: space-between; border-top: 1px solid var(--line); color: var(--blue); font-size: 13px; font-weight: 700; }
.workbench-placeholder { position: relative; display: grid; min-height: 580px; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.workbench-grid { position: absolute; inset: 0; opacity: .55; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 52px 52px; mask-image: radial-gradient(circle at center, #000, transparent 72%); }
.workbench-grid span { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 8px rgba(82,104,216,.09); }
.workbench-grid span:nth-child(1) { left: 18%; top: 22%; }.workbench-grid span:nth-child(2) { right: 21%; top: 18%; background: var(--cyan); }.workbench-grid span:nth-child(3) { left: 27%; bottom: 20%; background: var(--coral); }.workbench-grid span:nth-child(4) { right: 15%; bottom: 27%; background: var(--violet); }.workbench-grid span:nth-child(5) { left: 8%; top: 55%; background: var(--green); }.workbench-grid span:nth-child(6) { right: 8%; top: 49%; background: var(--amber); }
.placeholder-copy { position: relative; z-index: 2; width: min(520px, calc(100% - 40px)); padding: 45px; border: 1px solid rgba(203,212,227,.8); border-radius: 8px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); text-align: center; backdrop-filter: blur(10px); animation: content-in .35s ease both; }
@keyframes content-in { from { opacity: 0; transform: translateY(8px); } }
.status-pill { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: #edf1ff; color: var(--blue); font-size: 11px; font-weight: 800; }
.placeholder-copy h2 { margin: 16px 0 8px; font-family: var(--font-display); font-size: 30px; }
.placeholder-copy p { color: var(--ink-soft); }
.placeholder-line { display: flex; margin-top: 30px; justify-content: center; gap: 8px; }
.placeholder-line i { display: block; width: 55px; height: 4px; border-radius: 2px; background: #dbe1ef; }.placeholder-line i:nth-child(2) { width: 28px; background: #bfc9e1; }

.admin-welcome { min-height: 170px; margin-bottom: 20px; background: linear-gradient(125deg, #f8faff, #f1f7f6); }
.live-status { display: inline-flex; align-items: center; gap: 9px; color: #397257; font-size: 12px; font-weight: 700; }
.live-status i { width: 8px; height: 8px; border-radius: 50%; background: #4e9e75; box-shadow: 0 0 0 6px rgba(78,158,117,.10); }
.stat-grid { display: grid; margin-bottom: 20px; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 14px; }
.stat-card { display: flex; min-height: 118px; padding: 20px; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.stat-card span { color: var(--ink-soft); font-size: 12px; }
.stat-card strong { font-family: var(--font-display); font-size: 31px; letter-spacing: -.03em; }
.data-panel, .invite-create, .settings-panel { border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.panel-heading { display: flex; min-height: 90px; padding: 20px 24px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 15px 20px; border-bottom: 1px solid #edf0f5; text-align: left; white-space: nowrap; }
th { color: var(--ink-soft); background: #fbfcfe; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfe; }
code { font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; }
.invite-code { color: var(--blue-dark); font-weight: 700; letter-spacing: .06em; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; }
.status-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #9aa3b6; }
.status-dot.success::before { background: #4b9a72; }.status-dot.danger::before { background: var(--danger); }.status-dot.muted::before { background: #9aa3b6; }
.table-action { padding: 5px 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; cursor: pointer; color: var(--ink-soft); font-size: 12px; }
.table-action:hover { border-color: var(--blue); color: var(--blue); }
.empty-cell { padding: 35px; color: var(--ink-soft); text-align: center; }
.search-form { display: flex; gap: 8px; }
.search-form input { width: 210px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; outline: 0; }
.invite-create { display: grid; margin-bottom: 20px; padding: 27px; grid-template-columns: .8fr 1.2fr; align-items: end; gap: 40px; }
.invite-create p:not(.eyebrow), .settings-panel > div > p:not(.eyebrow) { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }
.inline-form { display: grid; grid-template-columns: 1fr 1.2fr auto; align-items: end; gap: 12px; }
.settings-panel { display: grid; padding: 32px; grid-template-columns: .7fr 1.3fr; gap: 60px; }
.settings-form { display: grid; gap: 18px; }
.settings-form .button { justify-self: start; }

body.modal-open { overflow: hidden; }
.novel-studio { position: relative; }
.novel-toolbar { display: flex; min-height: 78px; margin-bottom: 22px; padding: 15px 18px; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.82); }
.novel-model-state { display: flex; min-width: 0; align-items: center; gap: 12px; }
.model-pulse { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 7px rgba(63,174,190,.1); }
.novel-model-state > div { display: flex; min-width: 0; flex-direction: column; }
.novel-model-state small, .mode-switch > span { color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.novel-model-state strong { overflow: hidden; max-width: min(35vw, 440px); font-family: "Cascadia Code", Consolas, monospace; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.model-settings-button { padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #fff; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 700; }
.workbench-help-button { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: #f8faff; color: var(--ink-soft); cursor: pointer; font-family: var(--font-display); font-size: 13px; font-weight: 800; }
.workbench-help-button:hover { border-color: var(--blue); color: var(--blue); }
.mode-switch { display: flex; align-items: center; gap: 10px; }
.mode-switch select { width: 148px; height: 42px; padding: 0 34px 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; outline: 0; background: #fff; color: var(--ink); font-weight: 700; }
.story-track { position: relative; display: grid; margin: 0 0 22px; padding: 0 5%; grid-template-columns: repeat(4, 1fr); }
.story-track::before { content: ""; position: absolute; height: 1px; left: 15%; right: 15%; top: 16px; background: var(--line-strong); }
.story-track span { position: relative; z-index: 1; display: flex; align-items: center; flex-direction: column; gap: 7px; color: var(--ink-soft); font-size: 11px; }
.story-track i { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper); font-style: normal; font-weight: 800; }
.story-track span.active { color: var(--blue); }
.story-track span.active i { border-color: var(--blue); background: var(--blue); color: #fff; box-shadow: 0 0 0 6px rgba(82,104,216,.08); }
.story-track span.complete i { border-color: var(--cyan); background: #eaf8fa; color: #248b9b; }
.novel-compose { display: grid; min-height: 680px; grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.novel-input-panel, .novel-output-panel { min-width: 0; padding: clamp(24px, 3vw, 37px); }
.novel-input-panel { border-right: 1px solid var(--line); background: #fbfcff; }
.novel-output-panel { display: flex; min-height: 680px; flex-direction: column; background: linear-gradient(90deg, rgba(82,104,216,.025) 1px, transparent 1px), #fff; background-size: 28px 100%; }
.novel-panel-heading { display: flex; min-height: 62px; margin-bottom: 27px; align-items: flex-start; justify-content: space-between; gap: 20px; }
.novel-panel-heading h2 { margin: 3px 0 0; font-family: var(--font-display); font-size: 25px; }
.novel-panel-heading > span { max-width: 150px; color: var(--ink-soft); font-size: 11px; text-align: right; }
.novel-fields { display: grid; gap: 17px; animation: content-in .25s ease both; }
.novel-field-row { display: grid; grid-template-columns: 1fr .75fr; gap: 14px; }
.novel-submit-row { display: flex; margin-top: 22px; align-items: center; justify-content: space-between; gap: 18px; }
.compact-field { width: 170px; flex: 0 0 170px; }
.novel-generate-button { min-width: 160px; gap: 18px; }
.novel-generate-button i { font-style: normal; transition: transform .18s ease; }
.novel-generate-button:hover i { transform: translateX(3px); }
.is-loading { position: relative; cursor: progress !important; }
.is-loading::after { content: ""; width: 14px; height: 14px; margin-left: 10px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: refresh-spin .8s linear infinite; }
.novel-form-status { min-height: 22px; margin: 16px 0 0; color: var(--ink-soft); font-size: 12px; }
.novel-form-status.error, [data-model-status].error { color: var(--danger); }
[data-model-status].success { color: var(--green); }
.field-action-head { display: flex; min-height: 28px; align-items: center; justify-content: space-between; gap: 14px; }
.field-action-head > span { color: var(--ink); font-size: 13px; font-weight: 700; }
.inline-ai-button, .txt-import-button { display: inline-flex; min-height: 30px; padding: 0 9px; flex: 0 0 auto; align-items: center; justify-content: center; gap: 6px; border: 1px solid #b8c7ef; border-radius: 5px; background: #f4f7ff; color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 800; }
.inline-ai-button i { color: #258f9f; font-size: 13px; font-style: normal; }.txt-import-button i { font-size: 14px; font-style: normal; }
.inline-ai-button:hover, .txt-import-button:hover { border-color: var(--blue); background: #edf1ff; }
.inline-ai-button:focus-visible, .txt-import-button:focus-visible { outline: 3px solid rgba(82,104,216,.15); outline-offset: 2px; }
.premise-assistant { position: relative; padding: 15px; border: 1px solid #cbd5ef; border-left: 3px solid var(--blue); border-radius: 6px; background: #f8faff; animation: content-in .2s ease both; }
.premise-assistant-head { display: flex; margin-bottom: 11px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.premise-assistant-head > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }.premise-assistant-head b { font-size: 11px; }.premise-assistant-head span { color: var(--ink-soft); font-size: 9px; }
.premise-assistant-head > button { width: 25px; height: 25px; flex: 0 0 25px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 18px; }
.premise-candidate-list { display: grid; gap: 8px; }
.premise-candidate { padding: 11px 12px; border: 1px solid var(--line); border-radius: 5px; background: #fff; transition: border-color .18s ease, transform .18s ease; }
.premise-candidate:hover { border-color: #b9c6e8; transform: translateY(-1px); }
.premise-candidate > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.premise-candidate b { color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; }
.premise-candidate button { padding: 4px 7px; border: 0; border-radius: 4px; background: #edf1ff; color: var(--blue); cursor: pointer; font-size: 9px; font-weight: 800; }
.premise-candidate p { overflow: auto; max-height: 150px; margin: 7px 0 0; padding-right: 4px; color: #3d475f; font-size: 11px; line-height: 1.65; }
.source-import-field textarea { min-height: 280px; }
.source-file-state { display: grid; min-height: 58px; padding: 9px 11px; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 10px; border: 1px solid #cbd5e8; border-radius: 6px; background: #fff; }
.source-file-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 5px; background: #eaf8f6; color: #15806f; font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; font-weight: 900; }
.source-file-state > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }.source-file-state b, .source-file-state small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.source-file-state b { font-size: 11px; }.source-file-state small { color: var(--ink-soft); font-size: 9px; }
.source-file-state > button { padding: 5px 7px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 9px; }.source-file-state > button:hover { color: var(--danger); }
.source-analysis-state { display: flex; min-height: 56px; padding: 10px 12px; align-items: center; gap: 11px; border-top: 1px solid #dfe4ef; border-bottom: 1px solid #dfe4ef; background: rgba(244,247,255,.72); }
.source-analysis-state > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }.source-analysis-state b { font-size: 10px; }.source-analysis-state small { color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.analysis-pulse { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 0 rgba(82,104,216,.25); animation: analysis-pulse 1.6s ease-out infinite; }
.source-analysis-state.ready { border-color: #cce2dc; background: #f3faf8; }.source-analysis-state.ready .analysis-pulse { background: #27977f; animation: none; box-shadow: 0 0 0 5px rgba(39,151,127,.1); }
@keyframes analysis-pulse { 70% { box-shadow: 0 0 0 8px rgba(82,104,216,0); } 100% { box-shadow: 0 0 0 0 rgba(82,104,216,0); } }
.character-section { padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.character-section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.character-section-head > div { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.character-section-head span { font-size: 12px; font-weight: 800; }
.character-section-head small, .character-empty span { color: var(--ink-soft); font-size: 10px; }
.add-character-button { display: inline-flex; min-height: 34px; padding: 0 10px; flex: 0 0 auto; align-items: center; gap: 5px; border: 1px solid #b8c7ef; border-radius: 6px; background: #f4f7ff; color: var(--blue); cursor: pointer; font-size: 11px; font-weight: 800; }
.add-character-button i { font-size: 16px; font-style: normal; line-height: 1; }
.character-empty { display: flex; min-height: 62px; margin-top: 13px; padding: 12px 14px; align-items: center; justify-content: center; flex-direction: column; gap: 2px; border: 1px dashed #ccd5e7; border-radius: 6px; color: var(--ink-soft); text-align: center; }
.character-empty b { color: #65718a; font-size: 11px; }
.character-card-list { display: grid; margin-top: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.character-card-list:empty { margin-top: 0; }
.character-card { display: grid; min-width: 0; min-height: 62px; padding: 10px; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fbfcff; }
.character-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: #eaf8f6; color: #188b78; font-family: var(--font-display); font-size: 14px; font-weight: 800; }
.character-card > div:nth-child(2) { display: flex; min-width: 0; flex-direction: column; }
.character-card b, .character-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.character-card b { font-size: 12px; }.character-card small { color: var(--ink-soft); font-size: 9px; }
.character-card-actions { display: flex; align-items: center; gap: 3px; }
.character-card-actions button { padding: 3px 5px; border: 0; background: transparent; color: var(--ink-soft); cursor: pointer; font-size: 10px; }
.character-card-actions button:last-child { font-size: 16px; }.character-card-actions button:hover { color: var(--blue); }
.creative-console, .story-contract-input { border: 1px solid #d9dfef; border-radius: 7px; background: #f8f9fd; }
.story-contract-input { border-left: 3px solid var(--cyan); background: #f7fbfc; }
.creative-console summary, .story-contract-input summary { display: flex; min-height: 55px; padding: 11px 14px; align-items: center; justify-content: space-between; gap: 15px; cursor: pointer; list-style: none; }
.creative-console summary::-webkit-details-marker, .story-contract-input summary::-webkit-details-marker { display: none; }
.creative-console summary > span, .story-contract-input summary > span { display: flex; flex-direction: column; gap: 2px; }
.creative-console summary b, .story-contract-input summary b { font-size: 12px; }.creative-console summary small, .story-contract-input summary small { color: var(--ink-soft); font-size: 10px; }
.creative-console summary > i, .story-contract-input summary > i { color: var(--blue); font-size: 17px; font-style: normal; transition: transform .2s ease; }
.creative-console[open] summary > i, .story-contract-input[open] summary > i { transform: rotate(180deg); }
.story-contract-fields { display: grid; padding: 3px 14px 15px; gap: 14px; }
.creative-control-grid { display: grid; padding: 3px 14px 15px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 18px; }
.creative-control { display: flex; min-width: 0; flex-direction: column; gap: 7px; }
.creative-control > span { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.creative-control b { font-size: 10px; }.creative-control output { color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; font-weight: 800; }
.creative-control small { min-height: 30px; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.creative-control input[type="range"] { width: 100%; height: 4px; border: 0; border-radius: 4px; appearance: none; background: #d9e0ef; accent-color: var(--blue); cursor: pointer; }
.creative-control input[type="range"]::-webkit-slider-thumb { width: 15px; height: 15px; border: 3px solid #fff; border-radius: 50%; appearance: none; background: var(--blue); box-shadow: 0 0 0 1px #aebce1; }
.chapter-plan { display: grid; margin-top: 18px; padding: 14px 15px; grid-template-columns: minmax(145px, 1fr) repeat(3, minmax(94px, 112px)); align-items: end; gap: 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fff; }
.chapter-plan-copy { display: flex; flex-direction: column; gap: 3px; align-self: center; }
.chapter-plan-copy span, .chapter-plan label > span { font-size: 10px; font-weight: 800; }
.chapter-plan-copy small, .chapter-plan label > small { color: var(--ink-soft); font-size: 9px; line-height: 1.45; }
.chapter-plan label { display: flex; flex-direction: column; gap: 4px; }
.chapter-plan input { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 5px; outline: 0; background: #fbfcff; color: var(--ink); font-weight: 800; }
.chapter-plan input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(82,104,216,.08); }
.humanize-toggle { display: flex; min-width: 0; align-items: center; gap: 9px; cursor: pointer; }
.humanize-toggle > input { position: absolute; opacity: 0; pointer-events: none; }
.toggle-track { position: relative; width: 38px; height: 22px; flex: 0 0 38px; border: 1px solid #bdc7da; border-radius: 999px; background: #e7eaf1; transition: background .18s ease, border-color .18s ease; }
.toggle-track i { position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(29,40,70,.2); transition: transform .18s ease; }
.humanize-toggle input:checked + .toggle-track { border-color: #15917c; background: #29aa91; }
.humanize-toggle input:checked + .toggle-track i { transform: translateX(16px); }
.humanize-toggle input:focus-visible + .toggle-track { box-shadow: 0 0 0 3px rgba(82,104,216,.16); }
.humanize-toggle > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.humanize-toggle b { font-size: 11px; }.humanize-toggle small { color: var(--ink-soft); font-size: 9px; }
.generate-actions { display: flex; align-items: center; gap: 8px; }
.stop-generate-button { height: 43px; padding: 0 13px; border: 1px solid #e5b9b9; border-radius: 6px; background: #fff7f7; color: var(--danger); cursor: pointer; font-size: 11px; font-weight: 800; }
.output-actions { display: flex; gap: 7px; }
.output-actions button { padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 5px; background: rgba(255,255,255,.82); color: var(--ink-soft); cursor: pointer; font-size: 11px; }
.output-actions button:disabled { cursor: default; opacity: .45; }
.director-console { margin: -8px 0 22px; border: 1px solid #ccd6ea; border-left: 3px solid var(--blue); border-radius: 7px; background: rgba(248,250,255,.94); box-shadow: 0 12px 32px rgba(49,65,112,.06); animation: content-in .22s ease both; }
.director-console > header { display: flex; min-height: 61px; padding: 12px 14px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #e2e7f1; }
.director-console > header > div { display: flex; min-width: 0; align-items: center; gap: 10px; }.director-console > header > div > div { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.director-status-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(63,174,190,.1); animation: analysis-pulse 1.6s ease-out infinite; }
.director-console header b { font-size: 11px; }.director-console header small { color: var(--ink-soft); font-size: 9px; line-height: 1.45; }.director-console header > span { flex: 0 0 auto; color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; font-weight: 800; }
.director-contract { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid #e2e7f1; }
.director-contract > div { min-width: 0; padding: 11px 12px; }.director-contract > div + div { border-left: 1px solid #e2e7f1; }
.director-contract small, .chapter-brief small { color: var(--ink-soft); font-size: 8px; font-weight: 800; letter-spacing: .08em; }
.director-contract p, .chapter-brief p { margin: 4px 0 0; color: #3f4962; font-size: 9px; line-height: 1.55; }
.chapter-brief { display: grid; padding: 12px; grid-template-columns: 1.25fr 1fr 1fr; gap: 13px; background: #fff; }
.chapter-brief > div { min-width: 0; }.chapter-brief b { display: block; margin-top: 4px; color: #26324e; font-size: 10px; line-height: 1.55; }
.prose-audit { display: grid; margin: 16px 0 0; padding: 12px 14px; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; border-top: 1px solid #cde3dc; border-bottom: 1px solid #cde3dc; background: rgba(242,250,247,.9); }
.prose-audit > span { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid #abd2c5; border-radius: 50%; color: #19806d; font-family: "Cascadia Code", Consolas, monospace; font-size: 12px; font-weight: 900; }
.prose-audit > div { min-width: 0; }.prose-audit b { font-size: 10px; }.prose-audit p { margin: 2px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.prose-audit.has-issues { border-color: #ead6ac; background: #fffaf0; }.prose-audit.has-issues > span { border-color: #d9b96e; color: #9b6d1e; }
.manuscript-empty { display: grid; min-height: 450px; place-items: center; align-content: center; text-align: center; }
.manuscript-empty span { display: grid; width: 62px; height: 62px; margin-bottom: 18px; place-items: center; border: 1px solid #cbd4ef; border-radius: 50%; background: #f4f6ff; color: var(--blue); font-family: var(--font-display); font-size: 22px; font-weight: 800; }
.manuscript-empty h3 { margin: 0 0 7px; font-family: var(--font-display); font-size: 21px; }
.manuscript-empty p { max-width: 310px; margin: 0; color: var(--ink-soft); font-size: 12px; }
.manuscript-editor { width: 100%; min-height: 500px; flex: 1; padding: 2px 13px 28px; border: 0; outline: 0; resize: vertical; background: transparent; color: #222a3c; font-family: "STSong", "SimSun", serif; font-size: 16px; line-height: 2; }
.manuscript-editor.is-streaming { caret-color: var(--blue); background-image: linear-gradient(90deg, transparent, rgba(63,174,190,.035), transparent); background-size: 220px 100%; animation: manuscript-stream 2.2s linear infinite; }
@keyframes manuscript-stream { from { background-position: -220px 0; } to { background-position: calc(100% + 220px) 0; } }
.output-heading-tools { display: flex; align-items: center; gap: 9px; }
.stream-progress { display: inline-flex; min-height: 27px; padding: 0 9px; align-items: center; border: 1px solid #bde0da; border-radius: 999px; background: #effaf8; color: #17806e; font-size: 9px; font-weight: 800; white-space: nowrap; }
.stream-progress:not([hidden])::before { content: ""; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #25a98f; box-shadow: 0 0 0 4px rgba(37,169,143,.1); }
.manuscript-meta { display: flex; padding-top: 15px; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; }
.manuscript-meta b { color: var(--blue); }
.model-modal-backdrop { position: fixed; z-index: 100; display: grid; inset: 0; padding: 24px; place-items: center; overflow-y: auto; background: rgba(20,29,54,.62); backdrop-filter: blur(9px); }
.model-modal { width: min(660px, 100%); padding: clamp(25px, 4vw, 40px); border: 1px solid rgba(255,255,255,.4); border-radius: 8px; background: #fff; box-shadow: 0 30px 90px rgba(15,24,48,.25); animation: modal-in .24s ease both; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.model-modal-head { display: flex; margin-bottom: 27px; align-items: flex-start; justify-content: space-between; gap: 24px; }
.model-modal-head h2 { margin: 5px 0 7px; font-family: var(--font-display); font-size: 29px; }
.model-modal-head p:last-child { margin: 0; color: var(--ink-soft); font-size: 12px; }
.modal-close { display: grid; width: 34px; height: 34px; flex: 0 0 34px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink-soft); cursor: pointer; font-size: 20px; }
.model-config-fields { display: grid; gap: 16px; }
.model-fetch-row { display: flex; margin: 19px 0; align-items: center; gap: 15px; }
.button-secondary { border-color: var(--line-strong); background: #f6f8fd; color: var(--blue); box-shadow: none; }
.button-secondary:hover { border-color: var(--blue); background: #edf1ff; }
[data-model-status] { color: var(--ink-soft); font-size: 11px; }
.model-select-field { margin-bottom: 18px; animation: content-in .2s ease both; }
.character-modal { width: min(760px, 100%); }
.character-form { display: grid; gap: 14px; }
.character-modal-actions { display: flex; margin-top: 5px; justify-content: flex-end; gap: 9px; }
.onboarding-backdrop { position: fixed; z-index: 130; display: grid; inset: 0; padding: 22px; place-items: center; overflow-y: auto; background: rgba(19,27,50,.68); backdrop-filter: blur(10px); }
.onboarding-dialog { width: min(780px, 100%); padding: clamp(24px, 4vw, 42px); border: 1px solid rgba(255,255,255,.5); border-radius: 8px; background: #fff; box-shadow: 0 32px 100px rgba(12,20,44,.3); animation: modal-in .26s ease both; }
.onboarding-dialog > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 32px; }
.onboarding-dialog h2 { margin: 5px 0 9px; font-family: var(--font-display); font-size: clamp(28px, 4vw, 38px); line-height: 1.2; }
.onboarding-dialog header p:last-child { max-width: 590px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.75; }
.guide-edition { flex: 0 0 auto; padding-top: 7px; color: var(--blue); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; font-weight: 800; }
.guide-route { position: relative; display: grid; margin: 30px 0 27px; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.guide-route article { position: relative; min-width: 0; padding: 22px 16px 20px 0; }.guide-route article + article { padding-left: 16px; border-left: 1px solid var(--line); }
.guide-route i { display: block; margin-bottom: 20px; color: var(--cyan); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; font-style: normal; font-weight: 900; }
.guide-route b { font-size: 12px; }.guide-route p { margin: 7px 0 0; color: var(--ink-soft); font-size: 10px; line-height: 1.65; }
.onboarding-dialog > footer { display: flex; justify-content: flex-end; gap: 9px; }
.guide-footnote { display: block; margin-top: 10px; color: var(--ink-soft); font-size: 9px; text-align: right; }

/* Image workbench: a compact digital contact sheet with a visible framing tool. */
.image-studio { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 18px 55px rgba(34,48,88,.08); }
.image-studio-toolbar { display: flex; min-height: 118px; padding: 24px 28px; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); background: #f9fbfd; }
.image-studio-toolbar h2 { margin: 3px 0 4px; font-family: var(--font-display); font-size: 27px; line-height: 1.25; }
.image-studio-toolbar > div:first-child > p:last-child { margin: 0; color: var(--ink-soft); font-size: 11px; }
.image-model-state { display: grid; min-width: 310px; padding: 12px 14px; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 11px; border: 1px solid #d9dfeb; border-radius: 7px; background: #fff; }
.image-model-lens { position: relative; display: block; width: 30px; height: 30px; border: 2px solid #d97868; border-radius: 50%; box-shadow: inset 0 0 0 5px #fff0ed; }
.image-model-lens::after { content: ""; position: absolute; width: 6px; height: 6px; right: 1px; top: 2px; border-radius: 50%; background: #3faebe; }
.image-model-state > div { display: flex; min-width: 0; flex-direction: column; }
.image-model-state small { color: var(--ink-soft); font-size: 9px; }
.image-model-state strong { overflow: hidden; max-width: 190px; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.image-model-state button { padding: 5px 0 5px 9px; border: 0; border-left: 1px solid var(--line); background: transparent; color: var(--blue); cursor: pointer; font-size: 10px; font-weight: 800; white-space: nowrap; }
.image-studio-layout { display: grid; min-height: 680px; grid-template-columns: minmax(360px, 430px) minmax(0, 1fr); }
.image-compose-panel { display: flex; min-width: 0; padding: 27px; flex-direction: column; border-right: 1px solid var(--line); background: #fbfcfe; }
.image-compose-heading { display: flex; margin-bottom: 10px; align-items: baseline; justify-content: space-between; gap: 18px; }
.image-compose-heading span { font-size: 13px; font-weight: 800; }
.image-compose-heading small { color: var(--ink-soft); font-size: 9px; text-align: right; }
.image-prompt-field { position: relative; display: block; }
.image-prompt-field textarea { width: 100%; min-height: 238px; padding: 16px 16px 36px; border: 1px solid #cbd4e3; border-radius: 7px; outline: 0; resize: vertical; background: #fff; color: var(--ink); font: inherit; font-size: 13px; line-height: 1.8; transition: border-color .18s ease, box-shadow .18s ease; }
.image-prompt-field textarea:focus { border-color: var(--coral); box-shadow: 0 0 0 4px rgba(217,120,104,.10); }
.image-prompt-field > span { position: absolute; right: 12px; bottom: 10px; color: var(--ink-soft); font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; }
.image-prompt-notes { display: flex; margin: 10px 0 22px; flex-wrap: wrap; gap: 7px; }
.image-prompt-notes button { min-height: 28px; padding: 0 9px; border: 1px solid #dce2ed; border-radius: 5px; background: #fff; color: #59647a; cursor: pointer; font-size: 9px; }
.image-prompt-notes button:hover { border-color: #e2a69d; color: #a64f43; }
.image-output-settings { display: grid; padding: 16px 0; grid-template-columns: 118px minmax(0, 1fr); gap: 15px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.image-ratio-preview { display: grid; width: 112px; height: 112px; grid-row: 1 / 3; place-items: center; align-self: center; border: 1px solid #d9dfeb; border-radius: 6px; background: #f2f5f9; }
.image-ratio-preview::before { content: ""; width: var(--preview-width, 104px); height: var(--preview-height, 58px); grid-area: 1 / 1; border: 2px solid #d97868; background: #fff; box-shadow: 8px 8px 0 rgba(63,174,190,.13); transition: width .22s ease, height .22s ease; }
.image-ratio-preview span { z-index: 1; grid-area: 1 / 1; padding: 2px 5px; background: rgba(255,255,255,.88); color: #9b5147; font-family: "Cascadia Code", Consolas, monospace; font-size: 9px; font-weight: 900; }
.image-output-settings .field { gap: 4px; }
.image-output-settings .field select { height: 39px; font-size: 11px; }
.image-generate-row { display: grid; margin-top: 20px; grid-template-columns: 150px minmax(0, 1fr); align-items: center; gap: 14px; }
.image-generate-button { position: relative; overflow: hidden; border-color: #c55f50; background: #d97868; box-shadow: 0 10px 24px rgba(197,95,80,.19); }
.image-generate-button:hover { background: #bd5b4d; box-shadow: 0 14px 30px rgba(197,95,80,.24); }
.image-generate-button i { width: 7px; height: 7px; margin-left: 10px; border: 2px solid currentColor; border-radius: 50%; }
.image-compose-panel.is-generating .image-generate-button i { border-right-color: transparent; animation: refresh-spin .75s linear infinite; }
[data-image-status] { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
[data-image-status].success, [data-image-model-status].success { color: #28785b; }
[data-image-status].warning { color: #916420; }
[data-image-status].error, [data-image-model-status].error { color: var(--danger); }
[data-image-model-status] { color: var(--ink-soft); font-size: 11px; }
.image-storage-note { display: grid; margin-top: auto; padding-top: 23px; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 11px; }
.image-storage-note > span { display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid #d4dce9; border-radius: 50%; color: var(--coral); font-family: "Cascadia Code", Consolas, monospace; font-size: 10px; font-weight: 900; }
.image-storage-note p { margin: 0; color: var(--ink-soft); font-size: 9px; line-height: 1.55; }
.image-storage-note b { display: block; color: var(--ink); font-size: 10px; }
.image-gallery-panel { display: flex; min-width: 0; padding: 27px; flex-direction: column; background: #fff; }
.image-gallery-panel > header { display: flex; margin-bottom: 22px; align-items: flex-end; justify-content: space-between; gap: 20px; }
.image-gallery-panel > header h2 { margin: 2px 0 0; font-family: var(--font-display); font-size: 24px; }
.image-gallery-panel > header > span { color: var(--ink-soft); font-size: 10px; }
.image-gallery-panel > header > span b { color: var(--coral); font-family: "Cascadia Code", Consolas, monospace; }
.image-result-grid, .image-generating-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.image-result-card { min-width: 0; overflow: hidden; border: 1px solid #dfe4ec; border-radius: 7px; background: #fff; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, opacity .35s ease; }
.image-result-card:hover { transform: translateY(-3px); border-color: #c9d1df; box-shadow: 0 15px 32px rgba(35,48,82,.10); }
.image-result-arriving { opacity: 0; transform: translateY(10px); }
.image-result-frame { position: relative; display: grid; aspect-ratio: 16 / 10; place-items: center; overflow: hidden; background: #edf1f5; }
.image-result-frame img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-expiry-badge { position: absolute; right: 8px; top: 8px; padding: 3px 7px; border: 1px solid rgba(255,255,255,.48); border-radius: 4px; background: rgba(26,34,55,.74); color: #fff; font-family: "Cascadia Code", Consolas, monospace; font-size: 8px; backdrop-filter: blur(8px); }
.image-result-card > footer { display: flex; min-height: 56px; padding: 9px 11px; align-items: center; justify-content: space-between; gap: 12px; }
.image-result-card > footer > div:first-child { display: flex; min-width: 0; flex-direction: column; }
.image-result-card footer strong { font-size: 10px; }
.image-result-card footer small { overflow: hidden; max-width: 170px; color: var(--ink-soft); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.image-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 5px; }
.image-card-actions a, .image-card-actions button { min-height: 29px; padding: 0 8px; border: 1px solid #d8deea; border-radius: 5px; background: #fff; color: var(--blue); cursor: pointer; font-size: 9px; font-weight: 800; }
.image-card-actions a { display: inline-flex; align-items: center; }
.image-card-actions button { color: var(--danger); }
.image-card-actions a:hover { border-color: #aebbe1; background: #f2f5ff; }
.image-card-actions button:hover { border-color: #e5b6bc; background: #fff5f6; }
.image-load-error .image-result-frame::after { content: "图片已过期或加载失败"; position: absolute; color: var(--ink-soft); font-size: 10px; }
.image-render-placeholder { position: relative; display: grid; min-height: 220px; place-items: center; align-content: center; gap: 12px; overflow: hidden; border: 1px solid #dfe4ec; border-radius: 7px; background: #f2f4f7; color: var(--ink-soft); font-size: 9px; }
.image-render-placeholder::before { content: ""; position: absolute; width: 38%; height: 170%; left: -55%; top: -35%; background: rgba(255,255,255,.78); transform: rotate(12deg); animation: image-develop 1.5s ease-in-out infinite; }
.image-render-placeholder i { width: 24px; height: 24px; border: 2px solid #d97868; border-right-color: transparent; border-radius: 50%; animation: refresh-spin .8s linear infinite; }
@keyframes image-develop { 55%, 100% { left: 120%; } }
.image-gallery-empty { display: grid; min-height: 470px; place-items: center; align-content: center; text-align: center; }
.empty-aperture { position: relative; display: grid; width: 72px; height: 72px; margin-bottom: 18px; place-items: center; border: 1px solid #d3dbe8; border-radius: 50%; background: #f5f7fa; }
.empty-aperture::before, .empty-aperture::after, .empty-aperture i { content: ""; position: absolute; width: 27px; height: 1px; background: #d97868; transform-origin: right center; }
.empty-aperture::before { transform: rotate(0deg); }.empty-aperture::after { transform: rotate(120deg); }.empty-aperture i { transform: rotate(240deg); }
.image-gallery-empty h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 20px; }
.image-gallery-empty p { max-width: 330px; margin: 0; color: var(--ink-soft); font-size: 11px; }
.image-gallery-meta { display: flex; margin-top: auto; padding-top: 18px; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 9px; }
.image-gallery-meta b { color: var(--coral); }
.image-model-modal { border-top: 4px solid var(--coral); }

.install-shell { min-height: 100vh; padding: 35px 20px 70px; background: radial-gradient(circle at 90% 5%, rgba(82,104,216,.10), transparent 33%), var(--paper); }
.installer { width: min(900px, 100%); margin: 0 auto; }
.installer-header { display: flex; margin-bottom: 70px; align-items: center; justify-content: space-between; }
.install-badge { color: var(--ink-soft); font-family: "Cascadia Code", Consolas, monospace; font-size: 11px; }
.installer-intro { margin-bottom: 28px; }
.installer-intro h1, .install-complete h1 { margin: 8px 0 10px; font-family: var(--font-display); font-size: clamp(38px, 6vw, 56px); letter-spacing: -.05em; }
.installer-intro > p:last-child, .install-complete > p { color: var(--ink-soft); }
.install-checks { display: grid; margin-bottom: 24px; padding: 18px 22px; grid-template-columns: repeat(3, 1fr); gap: 13px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.72); }
.install-checks > div { display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-size: 12px; }
.check-dot { display: grid; width: 20px; height: 20px; flex: 0 0 20px; place-items: center; border-radius: 50%; color: #fff; font-size: 11px; }
.check-dot.passed { background: var(--green); }.check-dot.failed { background: var(--danger); }
.install-form { display: grid; gap: 20px; }
.install-form fieldset { margin: 0; padding: 25px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 8px 30px rgba(31,44,80,.04); }
.install-form legend { padding: 0 10px 0 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.install-form legend span { display: inline-grid; width: 29px; height: 29px; margin-right: 9px; place-items: center; border-radius: 50%; background: #edf1ff; color: var(--blue); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.field-wide { grid-column: 1 / -1; }
.install-complete { padding: 70px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.complete-mark { display: grid; width: 64px; height: 64px; margin: 0 auto 22px; place-items: center; border-radius: 50%; background: #e8f7ef; color: var(--green); font-size: 29px; }
.first-invite { display: flex; max-width: 420px; margin: 28px auto; padding: 20px; flex-direction: column; border: 1px solid var(--line); border-radius: 7px; background: #f8faff; }
.first-invite span, .first-invite small { color: var(--ink-soft); font-size: 11px; }.first-invite code { margin: 8px 0; color: var(--blue); font-size: 22px; font-weight: 800; letter-spacing: .08em; }
.error-page { display: grid; min-height: 70vh; place-items: center; }
.empty-state { max-width: 520px; padding: 50px; text-align: center; }
.empty-symbol { display: grid; width: 55px; height: 55px; margin: 0 auto; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; color: var(--blue); font-size: 24px; }
.empty-state h1 { font-family: var(--font-display); font-size: 34px; }.empty-state p { color: var(--ink-soft); }

@media (max-width: 1180px) {
    .novel-compose { grid-template-columns: 1fr; }
    .novel-input-panel { border-right: 0; border-bottom: 1px solid var(--line); }
    .novel-output-panel { min-height: 610px; }
    .image-studio-layout { grid-template-columns: 390px minmax(0, 1fr); }
    .image-result-grid, .image-generating-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .home-hero { min-height: 600px; grid-template-columns: 1fr .8fr; gap: 20px; }
    .atlas-node { width: 60px; height: 60px; }
    .app-grid { grid-template-columns: repeat(2, 1fr); }
    .home-band { grid-template-columns: 1fr auto; }.home-band > p { grid-row: 2; }
    .auth-layout { grid-template-columns: 1fr; }.auth-scene { display: none; }.auth-panel { min-height: 100vh; }.mobile-brand { display: inline-flex; margin-bottom: 54px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .workbench-cards { grid-template-columns: 1fr; }
    .invite-create, .settings-panel { grid-template-columns: 1fr; gap: 25px; }
    .image-studio-toolbar { align-items: stretch; flex-direction: column; }.image-model-state { width: 100%; min-width: 0; }
    .image-studio-layout { grid-template-columns: 1fr; }.image-compose-panel { border-right: 0; border-bottom: 1px solid var(--line); }.image-result-grid, .image-generating-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .site-header { width: min(100% - 30px, 1180px); height: 70px; }.top-nav > a:not(.button) { display: none; }
    .home-hero { width: min(100% - 30px, 1180px); min-height: auto; padding: 55px 0 75px; grid-template-columns: 1fr; }
    .hero-copy { padding: 0; }.hero-copy h1 { font-size: clamp(40px, 13vw, 58px); }.hero-lead { font-size: 16px; }
    .atlas { width: min(390px, 90vw); }.atlas-node { width: 58px; height: 58px; }
    .catalog-section { width: min(100% - 30px, 1180px); margin-bottom: 70px; }
    .catalog-header { align-items: stretch; flex-direction: column; }.catalog-tools { align-items: stretch; }.search-box { width: 100%; }.filter-tabs { overflow-x: auto; padding-bottom: 5px; }
    .app-grid { grid-template-columns: 1fr; }.app-card { min-height: auto; }
    .home-band { width: min(100% - 30px, 1180px); margin-bottom: 70px; padding: 32px 25px; grid-template-columns: 1fr; gap: 18px; }.home-band > p { grid-row: auto; }.home-band .button { justify-self: start; }
    .site-footer { width: min(100% - 30px, 1180px); flex-direction: column; gap: 4px; }
    .auth-panel { padding: 35px 20px; align-items: flex-start; }.mobile-brand { margin-bottom: 45px; }.auth-heading h2 { font-size: 30px; }
    .dashboard-layout { display: block; }.sidebar { position: fixed; z-index: 50; width: 260px; left: 0; top: 0; transform: translateX(-105%); box-shadow: 20px 0 50px rgba(23,33,63,.16); transition: transform .22s ease; }.sidebar.open { transform: translateX(0); }
    .dashboard-topbar { min-height: 92px; padding: 18px 20px; justify-content: flex-start; gap: 14px; }.menu-button { display: block; }.topbar-home { margin-left: auto; font-size: 0; }.topbar-home::after { content: "首页"; font-size: 12px; }
    .dashboard-content { padding: 24px 15px 50px; }.welcome-strip, .admin-welcome { min-height: 190px; padding: 28px 24px; }.orbit-badge { position: absolute; right: -45px; opacity: .55; }.welcome-strip h2, .admin-welcome h2 { font-size: 29px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }.stat-card { min-height: 100px; }.panel-heading { align-items: stretch; flex-direction: column; }.search-form input { width: 100%; }
    .inline-form { grid-template-columns: 1fr; }.workbench-placeholder { min-height: 520px; }.placeholder-copy { padding: 30px 22px; }
    .novel-toolbar { align-items: stretch; flex-direction: column; }.mode-switch { justify-content: space-between; }.mode-switch select { flex: 1; }
    .story-track { padding: 0; }.story-track b { max-width: 70px; text-align: center; line-height: 1.35; }
    .novel-compose { min-height: auto; }.novel-input-panel, .novel-output-panel { padding: 24px 20px; }.novel-output-panel { min-height: 560px; }
    .chapter-plan { grid-template-columns: 1fr 1fr; }.chapter-plan-copy { grid-column: 1 / -1; }
    .director-contract { grid-template-columns: 1fr; }.director-contract > div + div { border-left: 0; border-top: 1px solid #e2e7f1; }.chapter-brief { grid-template-columns: 1fr; }
    .guide-route { grid-template-columns: 1fr 1fr; }.guide-route article:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }.guide-route article:nth-child(4) { border-top: 1px solid var(--line); }
    .output-heading-tools { align-items: flex-end; flex-direction: column-reverse; }
    .model-modal-backdrop { padding: 14px; }.model-modal { padding: 25px 20px; }
    .image-studio-toolbar, .image-compose-panel, .image-gallery-panel { padding: 22px 18px; }.image-studio-toolbar h2 { font-size: 24px; }.image-result-grid, .image-generating-grid { grid-template-columns: 1fr; }.image-gallery-empty { min-height: 360px; }
    .installer-header { margin-bottom: 45px; }.install-checks { grid-template-columns: 1fr 1fr; }.form-grid { grid-template-columns: 1fr; }.field-wide { grid-column: auto; }.install-form fieldset { padding: 20px 16px; }.install-complete { padding: 45px 20px; }
}

@media (max-width: 430px) {
    .hero-actions { align-items: stretch; flex-direction: column; }.text-link { justify-content: center; }
    .atlas { margin-top: -20px; }.filter-tabs button { white-space: nowrap; }
    .captcha-digits { gap: 8px; }.captcha-digits input { height: 49px; }
    .stat-grid, .install-checks { grid-template-columns: 1fr; }
    .search-form { flex-direction: column; }.settings-panel { padding: 24px 18px; }
    .novel-field-row { grid-template-columns: 1fr; }.novel-submit-row { align-items: stretch; flex-direction: column; }.compact-field, .novel-generate-button { width: 100%; }.manuscript-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
    .character-section-head { align-items: stretch; flex-direction: column; }.add-character-button { justify-content: center; }.character-card-list, .creative-control-grid, .chapter-plan { grid-template-columns: 1fr; }.chapter-plan-copy { grid-column: auto; }
    .story-track b { display: none; }.story-track::before { left: 12%; right: 12%; }
    .generate-actions { width: 100%; }.generate-actions .novel-generate-button { flex: 1; }.humanize-toggle small { white-space: normal; }
    .novel-panel-heading { align-items: stretch; flex-direction: column; }.output-heading-tools { align-items: stretch; flex-direction: row; justify-content: space-between; }
    .model-fetch-row { align-items: stretch; flex-direction: column; }.model-fetch-row .button { width: 100%; }.novel-model-state strong { max-width: 48vw; }
    .field-action-head { align-items: flex-start; }.premise-candidate > div { align-items: flex-start; }.premise-candidate button { flex: 0 0 auto; }.source-file-state { grid-template-columns: 38px minmax(0, 1fr); }.source-file-state > button { grid-column: 2; justify-self: start; padding-left: 0; }
    .onboarding-backdrop { padding: 10px; place-items: start center; }.onboarding-dialog { padding: 24px 18px; }.onboarding-dialog > header { gap: 12px; }.guide-edition { display: none; }.guide-route { grid-template-columns: 1fr; }.guide-route article, .guide-route article + article { padding: 15px 0; border-left: 0; border-top: 1px solid var(--line); }.guide-route article:first-child { border-top: 0; }.guide-route i { margin-bottom: 6px; }.onboarding-dialog > footer { flex-direction: column-reverse; }.guide-footnote { text-align: left; }
    .image-studio-toolbar { padding: 20px 16px; }.image-model-state { grid-template-columns: 30px minmax(0, 1fr); }.image-model-state button { grid-column: 2; padding: 6px 0 0; border-left: 0; border-top: 1px solid var(--line); text-align: left; }
    .image-output-settings { grid-template-columns: 1fr; }.image-ratio-preview { width: 100%; height: 125px; grid-row: auto; }.image-generate-row { grid-template-columns: 1fr; }.image-generate-button { width: 100%; }.image-gallery-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
