@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #0d0e13;
  --bg-elevated: #111218;
  --sidebar: #101117;
  --surface: #16171f;
  --surface-2: #1b1d27;
  --surface-3: #222430;
  --surface-hover: #252734;
  --text: #f3f4f8;
  --text-soft: #d4d7e0;
  --muted: #9196a8;
  --faint: #686e80;
  --line: rgba(255, 255, 255, .075);
  --line-strong: rgba(255, 255, 255, .13);
  --accent: #8d7cf6;
  --accent-bright: #aa9cfb;
  --accent-deep: #6e58df;
  --accent-soft: rgba(141, 124, 246, .13);
  --blue: #6a9df8;
  --cyan: #5dc9d8;
  --rose: #ed86a9;
  --amber: #e9b66b;
  --green: #68c9a0;
  --danger: #ef7f88;
  --shadow: 0 18px 60px rgba(0, 0, 0, .28);
  --sidebar-width: 244px;
  --topbar-height: 72px;
  --radius: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f6fa;
  --bg-elevated: #fff;
  --sidebar: #fbfbfe;
  --surface: #fff;
  --surface-2: #f5f5fa;
  --surface-3: #ececf4;
  --surface-hover: #f0eefb;
  --text: #20212a;
  --text-soft: #40424f;
  --muted: #777b8d;
  --faint: #a0a3b1;
  --line: rgba(25, 27, 40, .075);
  --line-strong: rgba(25, 27, 40, .14);
  --accent: #725bdf;
  --accent-bright: #846ff0;
  --accent-deep: #624acb;
  --accent-soft: rgba(114, 91, 223, .09);
  --danger: #d95964;
  --shadow: 0 18px 55px rgba(37, 32, 66, .1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button, select { cursor: pointer; }
button { border: 0; background: none; }
input, textarea, select { color: var(--text); }
textarea { resize: vertical; }
::selection { background: rgba(141, 124, 246, .35); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted { color: var(--muted); }

.app-shell { min-height: 100vh; }
.mobile-tabbar { display: none; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar-width); display: flex; flex-direction: column; padding: 22px 16px 16px; background: var(--sidebar); border-right: 1px solid var(--line); overflow-y: auto; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 6px 24px; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #a497ff, #7159dc 60%, #4b3a9e); box-shadow: 0 7px 20px rgba(112, 86, 218, .3); }
.brand-mark svg { width: 27px; height: 27px; stroke: none; }
.brand > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.brand strong { font-size: 21px; letter-spacing: 4px; line-height: 1.15; }
.brand small { font-size: 8px; color: var(--muted); letter-spacing: 1.55px; }
.sidebar-close { display: none !important; }
.new-chat-button { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); font-weight: 600; transition: .2s ease; }
.new-chat-button:hover { background: var(--surface-hover); border-color: rgba(141, 124, 246, .4); }
.new-chat-button svg { width: 17px; height: 17px; }
.navigation { display: flex; flex-direction: column; gap: 4px; margin-top: 22px; }
.navigation a { position: relative; display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 0 13px; border-radius: 11px; color: var(--muted); font-weight: 500; transition: .18s ease; }
.navigation a:hover { color: var(--text); background: var(--surface-2); }
.navigation a.active { color: var(--accent-bright); background: var(--accent-soft); }
.navigation a.active::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 4px 4px 0; background: var(--accent); }
.navigation a svg { width: 19px; height: 19px; }
.nav-label { padding: 22px 13px 8px; color: var(--faint); font-size: 10px; font-weight: 600; letter-spacing: 1.5px; }
.nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.nav-dot.offline { background: var(--faint); }
.recent-chat-wrap { min-height: 0; }
.recent-chats { display: flex; flex-direction: column; gap: 2px; }
.recent-chat { display: block; width: 100%; padding: 8px 13px; overflow: hidden; border-radius: 8px; color: var(--muted); font-size: 12px; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.recent-chat:hover, .recent-chat.active { color: var(--text-soft); background: var(--surface-2); }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.compute-card { display: flex; align-items: center; gap: 9px; padding: 12px 10px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.compute-icon { display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 auto; border-radius: 9px; color: var(--accent-bright); background: var(--accent-soft); }
.compute-icon svg { width: 15px; height: 15px; }
.compute-card > div { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 3px; }
.compute-card strong { font-size: 11px; font-weight: 600; }
.compute-card div span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(104, 201, 160, .1); }
.status-dot.offline { background: var(--danger); box-shadow: 0 0 0 3px rgba(239, 127, 136, .1); }
.status-dot.loading { background: var(--amber); animation: pulse 1.5s infinite; }
.compute-card .status-dot { width: 5px; height: 5px; }
.sidebar-link { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 10px 11px; border-radius: 10px; color: var(--muted); font-size: 12px; }
.sidebar-link:hover { color: var(--text); background: var(--surface-2); }
.sidebar-link svg { width: 16px; height: 16px; }
.sidebar-link .trailing { width: 12px; height: 12px; margin-left: auto; }
.sidebar-footnote { padding: 18px 0 1px; color: var(--faint); font-size: 8px; letter-spacing: 1.7px; text-align: center; }
.sidebar-backdrop { display: none; }

.main-shell { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; height: var(--topbar-height); padding: 0 32px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(18px); }
.topbar-title { display: flex; flex-direction: column; gap: 2px; }
.topbar-title > span { color: var(--faint); font-size: 8px; letter-spacing: 1.7px; }
.topbar-title strong { font-size: 14px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.icon-button { display: inline-grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); transition: .18s ease; }
.icon-button:hover { border-color: var(--line-strong); background: var(--surface-hover); }
.icon-button svg { width: 17px; height: 17px; }
.mobile-menu { display: none; margin-right: 12px; }
.service-pill { display: flex; align-items: center; gap: 8px; height: 34px; margin-right: 4px; padding: 0 13px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--muted); font-size: 11px; }
.service-pill:hover { color: var(--text); border-color: var(--line-strong); }
.view-container { width: 100%; max-width: 1640px; margin: 0 auto; padding: 30px 34px 46px; }
.view { animation: view-in .28s ease both; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 0 18px; border: 1px solid transparent; border-radius: 12px; font-weight: 600; transition: transform .18s ease, background .18s ease, border-color .18s ease, opacity .18s ease; }
.button:hover { transform: translateY(-1px); }
.button svg { width: 17px; height: 17px; }
.button.primary { color: #fff; background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep)); box-shadow: 0 8px 24px rgba(111, 83, 218, .22); }
.button.primary:hover { box-shadow: 0 10px 30px rgba(111, 83, 218, .32); }
.button.ghost, .button.subtle { border-color: var(--line-strong); background: var(--surface); }
.button.ghost:hover, .button.subtle:hover { background: var(--surface-hover); }
.button.small { min-height: 35px; padding: 0 12px; border-radius: 9px; font-size: 12px; }
.button:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 0; color: var(--accent-bright); font-size: 12px; }
.text-button:hover { text-decoration: underline; }
.text-button svg { width: 14px; height: 14px; }
.text-button.danger { color: var(--danger); }
.eyebrow-text { display: block; margin-bottom: 7px; color: var(--accent-bright); font-size: 9px; font-weight: 600; letter-spacing: 2px; }

.hero { position: relative; display: grid; min-height: 420px; grid-template-columns: 1.15fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 27px; background: linear-gradient(120deg, var(--surface) 15%, color-mix(in srgb, var(--accent) 8%, var(--surface)) 70%, var(--surface)); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(141, 124, 246, .13) .7px, transparent .7px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent, #000); }
.hero-copy { position: relative; z-index: 2; align-self: center; padding: 45px 0 45px 52px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--accent-bright); font-size: 9px; letter-spacing: 2.2px; }
.eyebrow span { width: 20px; height: 1px; background: var(--accent); }
.hero h1 { margin: 21px 0 17px; font-size: clamp(38px, 4vw, 58px); font-weight: 650; letter-spacing: -2px; line-height: 1.18; }
.hero h1 span { color: transparent; background: linear-gradient(100deg, #c3baff, #8f7cf3 45%, #b5a8ff); background-clip: text; -webkit-background-clip: text; }
.hero-copy > p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.95; }
.hero-actions { display: flex; gap: 11px; margin-top: 28px; }
.hero-actions .button { min-height: 45px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 19px; margin-top: 27px; color: var(--faint); font-size: 10px; }
.hero-meta span { display: flex; align-items: center; gap: 6px; }
.hero-meta i { width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.hero-art { position: relative; min-height: 400px; }
.aurora { position: absolute; border-radius: 50%; filter: blur(5px); }
.aurora-a { top: 10%; right: 4%; width: 260px; height: 260px; background: radial-gradient(circle, rgba(137, 113, 242, .19), transparent 67%); }
.aurora-b { right: 30%; bottom: 0; width: 220px; height: 220px; background: radial-gradient(circle, rgba(82, 180, 207, .1), transparent 67%); }
.orbit { position: absolute; top: 50%; left: 53%; border: 1px solid rgba(154, 136, 244, .13); border-radius: 50%; transform: translate(-50%, -50%) rotate(-20deg); }
.orbit-one { width: 330px; height: 240px; }
.orbit-two { width: 440px; height: 320px; transform: translate(-50%, -50%) rotate(25deg); }
.hero-core { position: absolute; top: 50%; left: 53%; display: grid; width: 135px; height: 135px; place-items: center; border: 1px solid rgba(177, 163, 251, .25); border-radius: 38px; background: linear-gradient(145deg, rgba(143, 124, 243, .2), rgba(91, 73, 161, .07)); box-shadow: inset 0 0 35px rgba(166, 146, 255, .08), 0 25px 70px rgba(0, 0, 0, .2); transform: translate(-50%, -50%) rotate(8deg); backdrop-filter: blur(12px); }
.hero-core svg { width: 75px; height: 75px; color: var(--accent-bright); stroke: none; filter: drop-shadow(0 8px 18px rgba(136, 111, 237, .3)); }
.hero-core span { margin-top: -23px; color: var(--accent-bright); font-size: 8px; letter-spacing: 3px; }
.float-card { position: absolute; display: grid; grid-template-columns: 30px 1fr; align-items: center; gap: 0 9px; min-width: 133px; padding: 12px 15px; border: 1px solid var(--line-strong); border-radius: 14px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); box-shadow: var(--shadow); backdrop-filter: blur(15px); animation: float 5s ease-in-out infinite; }
.float-card svg { grid-row: span 2; width: 25px; height: 25px; color: var(--accent-bright); }
.float-card span { font-size: 12px; font-weight: 600; }
.float-card small { color: var(--faint); font-size: 7px; letter-spacing: 1.5px; }
.float-image { top: 17%; left: 3%; }
.float-video { top: 26%; right: 0; animation-delay: -1.5s; }
.float-video svg { color: var(--rose); }
.float-music { right: 10%; bottom: 14%; animation-delay: -3s; }
.float-music svg { color: var(--amber); }
.section-heading { display: flex; align-items: end; justify-content: space-between; margin: 38px 2px 18px; }
.section-heading h2 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.5px; }
.section-heading > span { padding-bottom: 2px; font-size: 11px; }
.section-heading.compact { margin-top: 32px; }
.capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.capability-card { display: flex; align-items: center; gap: 14px; min-height: 104px; padding: 20px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); transition: .22s ease; }
.capability-card:hover { border-color: rgba(141, 124, 246, .25); background: var(--surface-2); transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0, 0, 0, .1); }
.capability-icon { display: grid; width: 45px; height: 45px; flex: 0 0 auto; place-items: center; border-radius: 13px; }
.capability-icon svg { width: 21px; height: 21px; }
.violet { color: var(--accent-bright); }
.capability-icon.violet, .model-symbol.violet { background: var(--accent-soft); }
.capability-icon.blue { color: var(--blue); background: rgba(106, 157, 248, .11); }
.capability-icon.cyan { color: var(--cyan); background: rgba(93, 201, 216, .1); }
.capability-icon.rose { color: var(--rose); background: rgba(237, 134, 169, .1); }
.capability-icon.amber { color: var(--amber); background: rgba(233, 182, 107, .1); }
.capability-icon.green { color: var(--green); background: rgba(104, 201, 160, .1); }
.capability-card h3 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.capability-card p { margin: 0; color: var(--muted); font-size: 11px; }
.card-arrow { width: 16px; height: 16px; margin-left: auto; color: var(--faint); transition: .2s; }
.capability-card:hover .card-arrow { color: var(--accent-bright); transform: translateX(3px); }
.recent-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.home-footer { display: flex; justify-content: space-between; margin-top: 40px; padding: 22px 2px 0; border-top: 1px solid var(--line); color: var(--faint); font-size: 10px; }

.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 25px; }
.workspace-heading h1 { margin: 0 0 7px; font-size: 27px; font-weight: 650; letter-spacing: -.7px; }
.workspace-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.model-picker { display: grid; min-width: 310px; grid-template-columns: auto 1fr; align-items: center; gap: 3px 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.model-picker label { color: var(--muted); font-size: 11px; }
.model-picker select { min-width: 0; padding: 3px 23px 3px 3px; border: 0; background-color: transparent; font-size: 12px; font-weight: 600; }
.model-picker small { grid-column: 1 / -1; overflow: hidden; color: var(--faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.workbench { display: grid; grid-template-columns: minmax(350px, 405px) minmax(0, 1fr); align-items: start; gap: 20px; }
.control-panel, .stage-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.control-panel { display: flex; flex-direction: column; gap: 20px; padding: 22px; }
.stage-panel { min-width: 0; overflow: hidden; }
.field { min-width: 0; }
.field > label, .field-label { color: var(--text-soft); font-size: 12px; font-weight: 550; }
.field > label { display: block; margin-bottom: 9px; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.field-label .muted { font-size: 9px; font-weight: 400; }
.field-hint { margin-top: 7px; color: var(--faint); font-size: 10px; line-height: 1.6; }
input:not([type="radio"]):not([type="range"]), textarea, select { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; outline: none; background: var(--surface-2); transition: border-color .18s, box-shadow .18s, background .18s; }
input:not([type="radio"]):not([type="range"]), select { height: 41px; padding: 0 12px; }
textarea { min-height: 70px; padding: 12px 13px; line-height: 1.7; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { border-color: rgba(141, 124, 246, .65) !important; box-shadow: 0 0 0 3px var(--accent-soft); }
select { appearance: none; padding-right: 30px !important; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 17px, calc(100% - 12px) 17px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; }
select option { background: var(--surface-2); color: var(--text); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.segmented { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.segmented button { flex: 1; min-height: 33px; padding: 0 8px; border-radius: 8px; color: var(--muted); font-size: 11px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { color: var(--text); background: var(--surface-3); box-shadow: 0 2px 8px rgba(0, 0, 0, .1); }
.input-action { position: relative; }
.input-action input { padding-right: 45px !important; }
.input-action .icon-button { position: absolute; top: 3px; right: 3px; width: 35px; height: 35px; border: 0; background: transparent; }
.advanced { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.advanced summary { display: flex; align-items: center; justify-content: space-between; padding: 13px 1px; cursor: pointer; color: var(--muted); font-size: 11px; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary svg { width: 14px; height: 14px; transition: transform .2s; }
.advanced[open] summary svg { transform: rotate(90deg); }
.advanced-body { display: flex; flex-direction: column; gap: 16px; padding: 4px 0 16px; }
.generate-button { width: 100%; min-height: 47px; }
.generate-button kbd { margin-left: auto; padding: 2px 6px; border: 1px solid rgba(255, 255, 255, .18); border-radius: 5px; color: rgba(255, 255, 255, .6); background: rgba(0, 0, 0, .08); font-family: inherit; font-size: 9px; font-weight: 400; }
.generate-button > span { margin-left: auto; }
.generate-button > span + kbd { margin-left: auto; }
.generate-button svg { margin-left: auto; }
.generate-button.is-loading svg { animation: spin 1.4s linear infinite; }
.generation-tip { display: flex; align-items: flex-start; justify-content: center; gap: 6px; margin-top: -9px; color: var(--faint); font-size: 9px; line-height: 1.5; text-align: center; }
.generation-tip svg { width: 12px; height: 12px; flex: 0 0 auto; margin-top: 1px; }
.stage-header { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 20px; border-bottom: 1px solid var(--line); color: var(--text-soft); font-size: 12px; font-weight: 600; }
.stage-status { color: var(--faint); font-size: 10px; font-weight: 400; }
.stage-status.success { color: var(--green); }
.stage-status.error { color: var(--danger); }
.mobile-back-controls { display: none; align-items: center; gap: 3px; min-height: 34px; margin-left: -6px; padding: 0 7px; border-radius: 8px; color: var(--accent-bright); font-size: 11px; }
.mobile-back-controls svg { width: 13px; height: 13px; transform: rotate(180deg); }
.stage-header .stage-status { margin-left: auto; }
.stage-content { position: relative; display: grid; min-height: 520px; place-items: center; padding: 22px; background: color-mix(in srgb, var(--bg) 35%, var(--surface)); }
.empty-state { max-width: 340px; padding: 40px 15px; text-align: center; }
.empty-state > span { display: grid; width: 70px; height: 70px; margin: 0 auto 20px; place-items: center; border: 1px solid var(--line); border-radius: 22px; color: var(--faint); background: var(--surface-2); }
.empty-state svg { width: 29px; height: 29px; }
.empty-state h3 { margin: 0 0 9px; font-size: 15px; font-weight: 550; }
.empty-state p { margin: 0; color: var(--faint); font-size: 11px; line-height: 1.8; }
.loading-state { width: 100%; max-width: 390px; padding: 35px 20px; text-align: center; }
.loading-visual { position: relative; display: grid; width: 90px; height: 90px; margin: 0 auto 25px; place-items: center; }
.loading-visual::before, .loading-visual::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--line-strong); border-radius: 27px; animation: loading-breathe 2.2s ease-in-out infinite; }
.loading-visual::after { inset: 10px; border-color: rgba(141, 124, 246, .35); animation-delay: -.7s; }
.loading-visual svg { width: 32px; height: 32px; color: var(--accent-bright); }
.loading-state h3 { margin: 0 0 8px; font-size: 16px; font-weight: 550; }
.loading-state p { min-height: 20px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.loading-track { height: 3px; margin: 24px auto 12px; overflow: hidden; border-radius: 3px; background: var(--surface-3); }
.loading-track span { display: block; width: 40%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: loading-track 1.8s ease-in-out infinite; }
.loading-elapsed { color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.error-state { max-width: 400px; padding: 30px; text-align: center; }
.error-state > span { display: grid; width: 55px; height: 55px; margin: 0 auto 18px; place-items: center; border-radius: 18px; color: var(--danger); background: rgba(239, 127, 136, .09); }
.error-state h3 { margin: 0 0 9px; font-size: 15px; }
.error-state p { margin: 0 0 20px; color: var(--muted); font-size: 11px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.result-card { width: 100%; min-width: 0; }
.result-card.centered { max-width: 850px; margin: auto; }
.media-frame { position: relative; display: grid; overflow: hidden; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-elevated); }
.media-frame.image-frame { min-height: 200px; cursor: zoom-in; }
.media-frame img { width: 100%; max-height: 65vh; object-fit: contain; }
.media-frame video { width: 100%; max-height: 65vh; background: #000; }
.result-info { display: flex; align-items: center; gap: 9px; margin: 13px 0; color: var(--muted); font-size: 10px; }
.result-info .badge { padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: var(--text-soft); background: var(--surface-2); }
.result-info time { margin-left: auto; color: var(--faint); }
.result-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 13px; }
.result-actions .button { min-height: 36px; padding: 0 12px; border-radius: 9px; font-size: 11px; }
.result-prompt { margin: 13px 0 0; padding: 12px; border-radius: 10px; color: var(--muted); background: var(--surface-2); font-size: 11px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.comparison figure { min-width: 0; margin: 0; }
.comparison figcaption { margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.comparison img { width: 100%; border: 1px solid var(--line); border-radius: 12px; }
.result-history { display: flex; gap: 10px; padding: 0 16px 16px; overflow-x: auto; }
.result-history:empty { display: none; }
.history-thumb { position: relative; width: 72px; height: 72px; flex: 0 0 auto; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.history-thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-thumb > span { display: grid; width: 100%; height: 100%; place-items: center; color: var(--muted); }
.history-thumb:hover { border-color: var(--accent); }
.history-thumb.active { border: 2px solid var(--accent); }
.upload-zone { display: flex; min-height: 145px; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 20px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--surface-2); cursor: pointer; text-align: center; transition: .18s; }
.upload-zone:hover, .upload-zone.dragging { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone.compact { min-height: 100px; }
.upload-zone input { display: none; }
.upload-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; color: var(--accent-bright); background: var(--accent-soft); }
.upload-icon svg { width: 19px; height: 19px; }
.upload-zone strong { font-size: 11px; font-weight: 550; }
.upload-zone > span:last-child { color: var(--faint); font-size: 9px; }
.file-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.file-grid:empty { display: none; }
.file-preview { position: relative; min-width: 0; }
.file-preview img { width: 100%; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 9px; object-fit: cover; }
.file-preview button { position: absolute; top: 4px; right: 4px; display: grid; width: 20px; height: 20px; place-items: center; border-radius: 6px; color: #fff; background: rgba(0, 0, 0, .65); }
.file-preview button svg { width: 11px; height: 11px; }
.file-preview > span { position: absolute; right: 4px; bottom: 4px; left: 4px; overflow: hidden; padding: 2px 4px; border-radius: 4px; color: #fff; background: rgba(0, 0, 0, .55); font-size: 8px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.file-picker-button { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 1px dashed var(--line-strong); border-radius: 10px; color: var(--muted); background: var(--surface-2); cursor: pointer; font-size: 11px; }
.file-picker-button:hover { color: var(--text); border-color: var(--accent); }
.file-picker-button svg { width: 16px; height: 16px; }
.file-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.file-list:empty { display: none; }
.file-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 10px; }
.file-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row button { display: grid; place-items: center; }
.file-row svg { width: 13px; height: 13px; }
.mode-tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.mode-tabs button { display: flex; align-items: center; gap: 7px; min-height: 35px; padding: 0 16px; border-radius: 9px; color: var(--muted); font-size: 11px; }
.mode-tabs button svg { width: 15px; height: 15px; }
.mode-tabs button.active { color: var(--accent-bright); background: var(--accent-soft); }
.preset-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.preset-chips button { padding: 5px 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: var(--surface-2); font-size: 9px; }
.preset-chips button:hover { color: var(--accent-bright); border-color: rgba(141, 124, 246, .35); }
.lyrics-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; }
.audio-result { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface-2); }
.audio-cover { position: relative; display: grid; min-height: 205px; place-items: center; overflow: hidden; background: radial-gradient(circle at 25% 20%, rgba(173, 145, 255, .35), transparent 45%), radial-gradient(circle at 80% 85%, rgba(72, 179, 197, .22), transparent 45%), linear-gradient(140deg, #27213d, #151a29); }
.audio-cover::before, .audio-cover::after { content: ""; position: absolute; width: 190px; height: 190px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 50%; }
.audio-cover::after { width: 140px; height: 140px; }
.audio-cover > svg { width: 54px; height: 54px; color: rgba(255, 255, 255, .8); }
.audio-cover .cover-label { position: absolute; bottom: 18px; color: rgba(255, 255, 255, .45); font-size: 8px; letter-spacing: 3px; }
.audio-body { padding: 18px; }
.audio-title { margin: 0 0 5px; font-size: 17px; font-weight: 600; }
.audio-subtitle { margin: 0 0 14px; color: var(--muted); font-size: 10px; }
audio { display: block; width: 100%; height: 42px; color-scheme: dark; }
html[data-theme="light"] audio { color-scheme: light; }
.lyrics-preview { max-height: 260px; margin-top: 15px; padding: 14px; overflow: auto; border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 11px; line-height: 1.9; white-space: pre-wrap; }
.voice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.voice-grid label { position: relative; cursor: pointer; }
.voice-grid input { position: absolute; opacity: 0; }
.voice-grid label > span { display: flex; min-height: 62px; align-items: center; justify-content: center; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.voice-grid strong { font-size: 11px; font-weight: 550; }
.voice-grid small { color: var(--faint); font-size: 8px; }
.voice-grid input:checked + span { border-color: var(--accent); color: var(--accent-bright); background: var(--accent-soft); }
.voice-grid input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }
output { color: var(--accent-bright); font-size: 11px; }

.chat-view { display: flex; width: 100%; max-width: 1050px; height: calc(100dvh - var(--topbar-height) - 76px); min-height: 550px; margin: 0 auto; flex-direction: column; }
.chat-toolbar { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; }
.model-inline { display: flex; align-items: center; gap: 10px; }
.model-symbol { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 10px; }
.model-symbol svg { width: 17px; height: 17px; }
.model-inline label { display: flex; flex-direction: column; gap: 0; }
.model-inline label > span { color: var(--faint); font-size: 8px; }
.model-inline select { width: auto; height: 22px; padding: 0 23px 0 0 !important; border: 0; background-color: transparent; background-position: calc(100% - 12px) 9px, calc(100% - 8px) 9px; font-size: 12px; font-weight: 600; }
.offline-banner { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 10px 13px; border: 1px solid rgba(233, 182, 107, .18); border-radius: 10px; color: var(--amber); background: rgba(233, 182, 107, .06); font-size: 11px; }
.offline-banner svg { width: 16px; height: 16px; flex: 0 0 auto; }
.chat-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.chat-welcome { display: flex; min-height: 100%; align-items: center; justify-content: center; flex-direction: column; padding: 25px 0 45px; text-align: center; }
.welcome-mark { display: grid; width: 64px; height: 64px; margin-bottom: 21px; place-items: center; border: 1px solid rgba(141, 124, 246, .2); border-radius: 20px; color: var(--accent-bright); background: var(--accent-soft); }
.welcome-mark svg { width: 42px; height: 42px; stroke: none; }
.chat-welcome h1 { margin: 0 0 11px; font-size: 27px; font-weight: 600; letter-spacing: -.7px; }
.chat-welcome > p { max-width: 520px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.suggestion-grid { display: grid; width: 100%; max-width: 780px; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 30px; }
.suggestion-grid button { display: flex; min-height: 100px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 8px; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; transition: .18s; }
.suggestion-grid button:hover { border-color: rgba(141, 124, 246, .35); background: var(--surface-2); transform: translateY(-2px); }
.suggestion-grid strong { font-size: 12px; font-weight: 550; }
.suggestion-grid span { color: var(--faint); font-size: 10px; line-height: 1.6; }
.message-list { display: flex; flex-direction: column; gap: 23px; padding: 15px 4px 28px; }
.message { display: flex; align-items: flex-start; gap: 12px; }
.message.user { justify-content: flex-end; }
.message-avatar { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--accent-bright); background: var(--accent-soft); }
.message-avatar svg { width: 19px; height: 19px; stroke: none; }
.message-body { min-width: 0; max-width: 82%; }
.message.user .message-body { max-width: 75%; padding: 11px 15px; border: 1px solid rgba(141, 124, 246, .16); border-radius: 15px 4px 15px 15px; background: var(--accent-soft); }
.message-role { margin-bottom: 5px; color: var(--faint); font-size: 9px; }
.message-content { color: var(--text-soft); font-size: 13px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; }
.message.user .message-content { white-space: pre-wrap; }
.message-content p { margin: 0 0 10px; }
.message-content p:last-child { margin-bottom: 0; }
.message-content pre { max-width: 100%; padding: 13px; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); white-space: pre; }
.message-content code { padding: 2px 4px; border-radius: 4px; color: var(--accent-bright); background: var(--surface-2); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
.message-content pre code { padding: 0; color: var(--text-soft); background: none; }
.message-tools { display: flex; gap: 5px; margin-top: 7px; opacity: 0; transition: opacity .18s; }
.message:hover .message-tools { opacity: 1; }
.message-tools button { display: flex; align-items: center; gap: 4px; padding: 4px 6px; color: var(--faint); font-size: 9px; }
.message-tools svg { width: 12px; height: 12px; }
.typing { display: inline-flex; gap: 4px; padding: 5px 0; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); animation: typing 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }.typing i:nth-child(3) { animation-delay: .3s; }
.chat-composer-wrap { padding-top: 12px; }
.chat-composer { padding: 12px 13px 9px; border: 1px solid var(--line-strong); border-radius: 17px; background: var(--surface); box-shadow: 0 8px 30px rgba(0, 0, 0, .08); }
.chat-composer:focus-within { border-color: rgba(141, 124, 246, .5); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat-composer textarea { min-height: 48px; max-height: 180px; padding: 2px 3px; border: 0; background: transparent; box-shadow: none !important; resize: none; }
.composer-bottom { display: flex; align-items: center; justify-content: space-between; }
.composer-bottom > span { color: var(--faint); font-size: 9px; }
.send-button { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: #fff; background: var(--accent-deep); }
.send-button:hover { background: var(--accent); }
.send-button:disabled { cursor: not-allowed; opacity: .4; }
.send-button.stop { color: var(--danger); background: rgba(239, 127, 136, .1); }
.send-button svg { width: 16px; height: 16px; }
.composer-disclaimer { margin: 8px 0 0; color: var(--faint); font-size: 8px; text-align: center; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 25px; background: rgba(5, 6, 10, .7); backdrop-filter: blur(8px); }
.modal { display: flex; width: min(880px, 100%); max-height: min(780px, 90dvh); flex-direction: column; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 21px; background: var(--bg-elevated); box-shadow: 0 30px 100px rgba(0, 0, 0, .4); }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); }
.modal h2 { margin: 0; font-size: 21px; }
.modal .eyebrow-text { margin-bottom: 5px; font-size: 8px; }
.history-filters { display: flex; gap: 5px; padding: 14px 24px 5px; overflow-x: auto; }
.history-filters button { padding: 7px 13px; border-radius: 8px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.history-filters button.active { color: var(--accent-bright); background: var(--accent-soft); }
.history-content { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; padding: 16px 24px 24px; overflow-y: auto; }
.history-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); cursor: pointer; }
.history-item:hover { border-color: rgba(141, 124, 246, .35); }
.history-preview { display: grid; height: 145px; place-items: center; overflow: hidden; background: var(--surface-2); }
.history-preview img { width: 100%; height: 100%; object-fit: cover; }
.history-preview > svg { width: 35px; height: 35px; color: var(--muted); }
.history-preview.audio { background: radial-gradient(circle at 30% 20%, rgba(141, 124, 246, .2), transparent 55%), var(--surface-2); }
.history-item-body { padding: 12px; }
.history-item-body h3 { overflow: hidden; margin: 0 0 5px; font-size: 12px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.history-item-body p { overflow: hidden; margin: 0 0 9px; color: var(--faint); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.history-item-meta { display: flex; justify-content: space-between; color: var(--faint); font-size: 8px; }
.modal > footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 24px; border-top: 1px solid var(--line); color: var(--faint); font-size: 9px; }
.empty-history { grid-column: 1 / -1; padding: 70px 20px; color: var(--muted); text-align: center; }
.empty-history svg { width: 38px; height: 38px; margin-bottom: 13px; color: var(--faint); }
.empty-history h3 { margin: 0 0 8px; color: var(--text-soft); font-size: 14px; }
.empty-history p { margin: 0; font-size: 11px; }
.status-modal { width: min(500px, 100%); }
.status-content { display: flex; flex-direction: column; gap: 10px; padding: 22px; }
.status-row { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.status-row > div { flex: 1; }
.status-row strong { display: block; margin-bottom: 4px; font-size: 12px; }
.status-row p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.lightbox { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 15px; padding: 45px 25px 25px; background: rgba(5, 6, 10, .92); }
.lightbox img { max-width: 95vw; max-height: 82vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 18px; right: 18px; }
.lightbox .button { min-height: 37px; font-size: 11px; }
.toast-region { position: fixed; right: 22px; bottom: 22px; z-index: 200; display: flex; width: min(360px, calc(100vw - 32px)); flex-direction: column; gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--text-soft); background: var(--surface-3); box-shadow: var(--shadow); font-size: 11px; line-height: 1.6; animation: toast-in .25s ease; }
.toast svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; color: var(--green); }
.toast.error svg { color: var(--danger); }
.toast.leaving { opacity: 0; transform: translateY(8px); transition: .25s; }

.auth-screen { position: relative; display: grid; min-height: 100dvh; grid-template-columns: minmax(440px, .9fr) 1.1fr; overflow: hidden; background: var(--bg); }
.auth-decoration { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-decoration span { position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(141, 124, 246, .12), transparent 68%); }
.auth-decoration span:nth-child(1) { top: -180px; left: -130px; }
.auth-decoration span:nth-child(2) { right: 8%; bottom: -220px; width: 600px; height: 600px; }
.auth-decoration span:nth-child(3) { top: 30%; left: 42%; width: 260px; height: 260px; }
.auth-panel { position: relative; z-index: 2; display: flex; width: min(420px, calc(100% - 60px)); min-height: 100dvh; justify-content: center; flex-direction: column; margin: 0 auto; padding: 45px 0; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 70px; }
.auth-brand > span:last-child { display: flex; flex-direction: column; }
.auth-brand strong { font-size: 23px; letter-spacing: 5px; }
.auth-brand small { color: var(--muted); font-size: 8px; letter-spacing: 1.7px; }
.auth-copy h1 { margin: 0 0 12px; font-size: 34px; font-weight: 650; letter-spacing: -1px; }
.auth-copy p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.login-form { display: flex; flex-direction: column; gap: 20px; margin-top: 35px; }
.login-form input { height: 49px !important; font-size: 15px; }
.password-input { position: relative; }
.password-input input { padding-right: 58px !important; }
.password-input button { position: absolute; top: 0; right: 4px; height: 100%; padding: 0 10px; color: var(--muted); font-size: 11px; }
.password-input button:hover { color: var(--text); }
.login-submit { min-height: 49px; margin-top: 3px; }
.login-submit svg { margin-left: auto; }
.login-submit span { margin-left: auto; }
.login-submit.is-loading { opacity: .65; pointer-events: none; }
.login-error { padding: 10px 12px; border: 1px solid rgba(239, 127, 136, .2); border-radius: 9px; color: var(--danger); background: rgba(239, 127, 136, .07); font-size: 11px; line-height: 1.6; }
.auth-notice { display: flex; align-items: flex-start; gap: 9px; margin-top: 26px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: var(--surface); }
.auth-notice svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 2px; }
.auth-notice p { margin: 0; font-size: 10px; line-height: 1.8; }
.auth-panel > footer { margin-top: auto; padding-top: 45px; color: var(--faint); font-size: 8px; letter-spacing: 2px; }
.auth-aside { position: relative; display: flex; align-items: center; justify-content: center; flex-direction: column; margin: 22px 22px 22px 0; overflow: hidden; border: 1px solid rgba(141, 124, 246, .13); border-radius: 27px; background: radial-gradient(circle at 50% 30%, rgba(141, 124, 246, .18), transparent 42%), linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--accent) 7%, var(--surface))); text-align: center; }
.auth-aside::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(141, 124, 246, .16) .8px, transparent .8px); background-size: 21px 21px; mask-image: radial-gradient(circle, #000, transparent 75%); }
.auth-orbit { position: relative; display: grid; width: 145px; height: 145px; margin-bottom: 50px; place-items: center; border: 1px solid rgba(164, 146, 249, .25); border-radius: 42px; color: var(--accent-bright); background: var(--accent-soft); box-shadow: 0 25px 80px rgba(91, 63, 182, .2); transform: rotate(8deg); }
.auth-orbit::before, .auth-orbit::after { content: ""; position: absolute; inset: -65px; border: 1px solid rgba(141, 124, 246, .1); border-radius: 50%; }
.auth-orbit::after { inset: -120px; }
.auth-orbit svg { width: 85px; height: 85px; stroke: none; }
.auth-aside > *:not(.auth-orbit) { position: relative; }
.auth-aside h2 { margin: 16px 0; font-size: clamp(28px, 3vw, 44px); font-weight: 600; line-height: 1.45; letter-spacing: -1px; }
.auth-aside p { color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.user-menu-wrap { position: relative; }
.user-avatar { display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid rgba(141, 124, 246, .25); border-radius: 11px; color: var(--accent-bright); background: var(--accent-soft); font-size: 13px; font-weight: 650; text-transform: uppercase; }
.user-menu { position: absolute; top: 45px; right: 0; z-index: 60; width: 190px; padding: 7px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--bg-elevated); box-shadow: var(--shadow); }
.user-menu-profile { display: flex; flex-direction: column; gap: 3px; padding: 10px 11px 12px; border-bottom: 1px solid var(--line); }
.user-menu-profile strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.user-menu-profile span { color: var(--muted); font-size: 9px; }
.user-menu button { display: flex; width: 100%; align-items: center; gap: 9px; min-height: 38px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 11px; text-align: left; }
.user-menu button:hover { color: var(--text); background: var(--surface-2); }
.user-menu button svg { width: 15px; height: 15px; }
.admin-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.admin-stat { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface); }
.admin-stat span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; }
.admin-stat strong { font-size: 25px; font-weight: 600; }
.admin-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); }
.admin-panel-header { padding: 19px 21px; border-bottom: 1px solid var(--line); }
.admin-panel-header h2 { margin: 0 0 6px; font-size: 15px; }
.admin-panel-header p { margin: 0; color: var(--muted); font-size: 10px; }
.admin-users { display: flex; flex-direction: column; }
.admin-user-row { display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(200px, 1.5fr) minmax(110px, .8fr) auto; align-items: center; gap: 18px; padding: 17px 21px; border-bottom: 1px solid var(--line); }
.admin-user-row:last-child { border-bottom: 0; }
.admin-user-identity { display: flex; align-items: center; gap: 11px; min-width: 0; }
.admin-user-avatar { display: grid; width: 37px; height: 37px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--accent-bright); background: var(--accent-soft); font-weight: 600; text-transform: uppercase; }
.admin-user-identity > div { min-width: 0; }
.admin-user-identity strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; }
.admin-user-identity span { color: var(--muted); font-size: 9px; }
.admin-user-keys { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 9px; }
.admin-user-keys span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-meta { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: 9px; }
.account-status { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 6px; color: var(--green); background: rgba(104, 201, 160, .08); }
.account-status.disabled { color: var(--danger); background: rgba(239, 127, 136, .08); }
.admin-user-actions { display: flex; gap: 7px; }
.admin-user-actions .button { min-height: 34px; padding: 0 10px; font-size: 10px; white-space: nowrap; }
.admin-security-note { display: flex; gap: 12px; margin-top: 17px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.admin-security-note > svg { flex: 0 0 auto; color: var(--accent-bright); }
.admin-security-note strong { font-size: 11px; }
.admin-security-note p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.account-modal { width: min(480px, 100%); }
.account-form { padding: 20px 24px 24px; overflow-y: auto; }
.account-form-fields { display: flex; flex-direction: column; gap: 19px; }
.reset-user-note { margin: 0 0 18px; color: var(--muted); font-size: 11px; }
.create-user-success { text-align: center; }
.credential-success-icon { display: grid; width: 52px; height: 52px; margin: 5px auto 16px; place-items: center; border-radius: 16px; color: var(--green); background: rgba(104, 201, 160, .1); }
.create-user-success h3 { margin: 0 0 9px; font-size: 17px; }
.create-user-success p { color: var(--muted); font-size: 11px; line-height: 1.7; }
.created-credentials { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); text-align: left; }
.created-credentials span { color: var(--muted); font-size: 10px; }
.created-credentials strong { margin-left: 8px; color: var(--text); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.admin-loading { padding: 55px; color: var(--muted); text-align: center; }

@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes loading-breathe { 50% { transform: rotate(45deg) scale(1.05); border-color: rgba(141, 124, 246, .45); } }
@keyframes loading-track { from { transform: translateX(-100%); } to { transform: translateX(350%); } }
@keyframes typing { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

@media (min-width: 1450px) {
  :root { --sidebar-width: 256px; }
  .view-container { padding-right: 42px; padding-left: 42px; }
  .workbench { grid-template-columns: 425px minmax(0, 1fr); gap: 24px; }
  .hero-copy { padding-left: 65px; }
}

@media (max-width: 1180px) {
  .view-container { padding: 25px 25px 40px; }
  .workbench { grid-template-columns: 350px minmax(0, 1fr); }
  .control-panel { padding: 18px; }
  .hero { min-height: 400px; grid-template-columns: 1.25fr 1fr; }
  .hero-copy { padding-left: 38px; }
  .hero h1 { font-size: 43px; }
  .float-image { left: -5%; }.float-video { right: -6%; }.float-music { right: 0; }
  .orbit-two { width: 360px; }
  .recent-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stage-content { min-height: 480px; }
}

@media (max-width: 960px) {
  :root { --sidebar-width: 244px; }
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0, 0, 0, .25); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-close { display: grid !important; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(0, 0, 0, .55); backdrop-filter: blur(3px); }
  body.sidebar-open .sidebar-backdrop { display: block; }
  .main-shell { margin-left: 0; }
  .mobile-menu { display: grid; }
  .topbar { padding: 0 25px; }
  .workbench { grid-template-columns: 370px minmax(0, 1fr); }
  .hero-art { opacity: .8; }
  .hero { grid-template-columns: 1.4fr .8fr; }
  .float-card { min-width: 115px; padding: 10px; }
  .float-image { left: -20%; }.float-video { right: -30%; }.float-music { right: -20%; }
}

@media (max-width: 800px) {
  .workbench { grid-template-columns: 1fr; }
  .stage-content { min-height: 420px; }
  .workspace-heading { align-items: flex-start; }
  .model-picker { min-width: 280px; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 45px; }
  .hero-art { position: absolute; inset: 0 0 0 50%; opacity: .45; pointer-events: none; }
  .hero-copy { max-width: 590px; }
  .history-content { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  :root { --topbar-height: 62px; }
  .topbar { padding: 0 14px; }
  .topbar-title > span { display: none; }
  .topbar-title strong { font-size: 13px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .icon-button { width: 34px; height: 34px; }
  .service-pill { width: 30px; height: 30px; margin: 0; padding: 0; justify-content: center; border-radius: 10px; }
  .service-pill > span:last-child { display: none; }
  .view-container { padding: 20px 14px 32px; }
  .hero { min-height: 480px; border-radius: 21px; }
  .hero-copy { align-self: start; padding: 37px 25px; }
  .hero h1 { margin-top: 18px; font-size: 40px; letter-spacing: -1.5px; }
  .hero-copy > p { font-size: 12px; }
  .hero-copy > p br { display: none; }
  .hero-art { inset: 42% -20% -10% 10%; opacity: .55; }
  .hero-core { width: 110px; height: 110px; }
  .float-image { top: 15%; left: 0; }.float-video { top: 30%; right: 0; }.float-music { right: 12%; bottom: 5%; }
  .hero-meta { gap: 12px; margin-top: 23px; }
  .hero-actions .button { padding: 0 14px; font-size: 12px; }
  .section-heading { align-items: flex-start; margin-top: 29px; }
  .section-heading > span { display: none; }
  .section-heading h2 { font-size: 20px; }
  .capability-grid { gap: 10px; }
  .capability-card { min-height: 128px; align-items: flex-start; flex-direction: column; gap: 12px; padding: 16px; }
  .capability-icon { width: 38px; height: 38px; border-radius: 11px; }
  .capability-card h3 { font-size: 14px; }
  .capability-card p { font-size: 10px; line-height: 1.5; }
  .card-arrow { display: none; }
  .home-footer { align-items: center; flex-direction: column; gap: 7px; text-align: center; }
  .recent-grid { gap: 10px; }
  .workspace-heading { flex-direction: column; gap: 17px; margin-bottom: 18px; }
  .workspace-heading h1 { font-size: 25px; }
  .workspace-heading p { font-size: 11px; line-height: 1.7; }
  .model-picker { width: 100%; min-width: 0; }
  .control-panel { gap: 19px; padding: 17px; border-radius: 15px; }
  .stage-panel { border-radius: 15px; }
  .stage-content { min-height: 360px; padding: 14px; }
  .stage-header { min-height: 48px; padding: 0 16px; }
  input:not([type="radio"]):not([type="range"]), textarea, select { font-size: 16px; }
  .model-picker select, .model-inline select { font-size: 13px; }
  .form-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .form-row.three input, .form-row.three select { padding-right: 8px !important; padding-left: 8px; font-size: 12px; }
  .generate-button kbd { display: none; }
  .generate-button > span, .generate-button svg { margin-left: 0; }
  .mode-tabs { display: flex; width: 100%; }
  .mode-tabs button { flex: 1; justify-content: center; padding: 0 8px; }
  .mode-tabs button svg { display: none; }
  .file-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .comparison { grid-template-columns: 1fr; }
  .result-info { flex-wrap: wrap; }
  .result-info time { margin-left: 0; }
  .audio-cover { min-height: 175px; }
  .voice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .voice-grid label > span { min-height: 54px; }
  .chat-view { height: calc(100dvh - var(--topbar-height) - 52px); min-height: 430px; }
  .chat-welcome { justify-content: flex-start; padding-top: 35px; }
  .chat-welcome h1 { font-size: 24px; }
  .suggestion-grid { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; }
  .suggestion-grid button { min-height: 72px; padding: 13px 15px; }
  .message-body, .message.user .message-body { max-width: 88%; }
  .message-content { font-size: 13px; }
  .message-tools { opacity: 1; }
  .chat-composer textarea { font-size: 16px; }
  .modal-backdrop { align-items: end; padding: 0; }
  .modal { width: 100%; max-height: 90dvh; border-radius: 21px 21px 0 0; }
  .modal > header { padding: 19px 17px 14px; }
  .history-filters { padding-right: 17px; padding-left: 17px; }
  .history-content { gap: 10px; padding: 15px 17px 20px; }
  .history-preview { height: 115px; }
  .modal > footer { padding: 12px 17px calc(12px + env(safe-area-inset-bottom)); }
  .modal > footer > span { max-width: 65%; line-height: 1.5; }
  .status-content { padding: 17px; }
  .toast-region { right: 16px; bottom: 16px; }
}

@media (max-width: 600px) {
  :root { --mobile-tab-height: 64px; }
  body.sidebar-open { overflow: hidden; }
  .view-container { padding-bottom: calc(var(--mobile-tab-height) + 24px + env(safe-area-inset-bottom)); }
  .topbar { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); }
  .topbar-actions .icon-button { width: 40px; height: 40px; }
  .service-pill { width: 40px; height: 40px; }
  .mobile-menu { margin-right: 10px; }
  .sidebar { width: min(84vw, 300px); padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  .navigation a { min-height: 46px; font-size: 14px; }
  .new-chat-button { min-height: 46px; }
  .mobile-tabbar { position: fixed; right: 0; bottom: 0; left: 0; z-index: 40; display: flex; align-items: center; height: calc(var(--mobile-tab-height) + env(safe-area-inset-bottom)); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-strong); background: color-mix(in srgb, var(--bg-elevated) 92%, transparent); box-shadow: 0 -10px 35px rgba(0, 0, 0, .12); backdrop-filter: blur(20px); }
  .mobile-tabbar a, .mobile-tabbar button { display: flex; min-width: 0; height: 52px; flex: 1; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border-radius: 12px; color: var(--muted); font-size: 10px; }
  .mobile-tabbar svg { width: 21px; height: 21px; }
  .mobile-tabbar a.active, .mobile-tabbar button.active { color: var(--accent-bright); background: var(--accent-soft); }
  .model-picker { padding: 12px 13px; }
  .model-picker select, .model-inline select { font-size: 16px; }
  .field > label, .field-label { font-size: 13px; }
  .field-label .muted { font-size: 10px; }
  .form-row.three { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .form-row.three > :last-child { grid-column: 1 / -1; }
  .form-row.three input, .form-row.three select { padding-right: 12px !important; padding-left: 12px; font-size: 16px; }
  .segmented button { min-height: 40px; font-size: 12px; }
  .mode-tabs button { min-height: 42px; font-size: 12px; }
  .preset-chips button { min-height: 34px; padding: 6px 11px; font-size: 10px; }
  .text-button { min-height: 30px; }
  .button { min-height: 44px; }
  .generate-button { min-height: 50px; }
  .file-picker-button { min-height: 44px; }
  .file-preview button { width: 28px; height: 28px; }
  .voice-grid label > span { min-height: 60px; }
  .result-actions .button { min-height: 42px; font-size: 12px; }
  .history-filters button { min-height: 38px; }
  .send-button { width: 40px; height: 40px; }
  .stage-panel { scroll-margin-top: calc(var(--topbar-height) + 12px); scroll-margin-bottom: calc(var(--mobile-tab-height) + 16px); }
  .workbench.show-results .control-panel { display: none; }
  .workbench.show-results .mobile-back-controls { display: inline-flex; }
  .workbench.show-results .stage-content { min-height: calc(100dvh - 320px); }
  .stage-content { padding: 13px; }
  .result-history { padding-bottom: 18px; }
  .history-thumb { width: 78px; height: 78px; }
  audio { height: 44px; }
  .chat-view { height: calc(100dvh - var(--topbar-height) - 20px - var(--mobile-tab-height) - 24px - env(safe-area-inset-bottom)); min-height: 360px; }
  .chat-toolbar { padding-bottom: 10px; }
  .chat-composer-wrap { padding-top: 9px; }
  .composer-disclaimer { margin-bottom: 0; }
  .toast-region { bottom: calc(var(--mobile-tab-height) + 16px + env(safe-area-inset-bottom)); }
  .auth-screen { display: block; }
  .auth-aside { display: none; }
  .auth-panel { width: calc(100% - 40px); min-height: 100dvh; padding: 30px 0 calc(24px + env(safe-area-inset-bottom)); }
  .auth-brand { margin-bottom: 52px; }
  .auth-copy h1 { font-size: 31px; }
  .login-form { margin-top: 30px; }
  .login-form input { font-size: 16px; }
  .user-avatar { width: 40px; height: 40px; }
  .admin-summary { gap: 8px; }
  .admin-stat { padding: 14px 12px; }
  .admin-stat strong { font-size: 21px; }
  .admin-user-row { grid-template-columns: 1fr auto; gap: 14px 10px; padding: 16px; }
  .admin-user-keys { grid-column: 1 / -1; padding: 10px; border-radius: 8px; background: var(--surface-2); }
  .admin-user-meta { grid-column: 1; }
  .admin-user-actions { grid-column: 2; grid-row: 2 / span 2; align-self: end; flex-direction: column; }
  .admin-user-actions .button { min-height: 38px; }
  .account-form { padding: 18px; }
}

@media (max-width: 360px) {
  .topbar-title { display: none; }
}

@media (max-width: 600px) and (max-height: 500px) {
  .mobile-tabbar { display: none; }
  .view-container { padding-bottom: 20px; }
  .chat-view { height: calc(100dvh - var(--topbar-height) - 40px); min-height: 280px; }
  .toast-region { bottom: 16px; }
}

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