:root {
  color-scheme: light;
  --bg: #f7f7f9;
  --surface: #fff;
  --ink: #16161a;
  --muted: #73737b;
  --line: #e8e8ed;
  --soft: #f1f1f4;
  --accent: #6c4cff;
  --accent-2: #d64fd4;
  --success: #29a36a;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #050309; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: clip; color: var(--ink); background: transparent; -webkit-font-smoothing: antialiased; }
button, input, textarea { font: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
[hidden] { display: none !important; }
html[data-mode="h3"] #motionReferenceArea { display: none !important; }
html[data-mode="motion"] #h3ReferenceArea { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.abstract-stage {
  --pointer-x: 0px;
  --pointer-y: 0px;
  --scroll-phase: 0px;
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at calc(16% + var(--pointer-x)) calc(18% + var(--pointer-y)),rgba(85,12,154,.58),transparent 31%),
    radial-gradient(circle at calc(86% - var(--pointer-x)) calc(76% - var(--pointer-y)),rgba(158,0,32,.42),transparent 34%),
    conic-gradient(from 225deg at 56% 46%,#050309 0deg,#140719 63deg,#030510 126deg,#170416 192deg,#120502 272deg,#050309 360deg);
}
.abstract-stage::before { content: ""; position: absolute; inset: -38%; background: repeating-radial-gradient(ellipse at 26% 31%,rgba(96,0,153,.16) 0 2px,transparent 3px 29px),repeating-radial-gradient(ellipse at 74% 69%,rgba(182,0,29,.12) 0 2px,transparent 3px 37px); background-size: 78% 92%,88% 73%; mix-blend-mode: screen; animation: spectralTurn 42s linear infinite; }
.abstract-stage::after { content: ""; position: absolute; inset: -20%; background: radial-gradient(ellipse at center,transparent 12%,rgba(165,0,29,.09) 31%,transparent 42%,rgba(43,4,66,.18) 54%,transparent 67%); filter: blur(7px); animation: fieldBreath 11s ease-in-out infinite alternate; }
.dream-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .92; filter: saturate(175%) contrast(122%) brightness(.72); }
.color-organism { position: absolute; display: block; border-radius: 42% 58% 63% 37% / 59% 38% 62% 41%; filter: blur(28px) saturate(180%); opacity: .58; mix-blend-mode: screen; will-change: transform,border-radius; }
.organism-a { width: 58vmax; height: 44vmax; left: -18vmax; top: -12vmax; background: radial-gradient(circle at 60% 44%,rgba(74,0,134,.78),rgba(20,16,64,.28) 42%,transparent 68%); animation: organismA 18s ease-in-out infinite alternate; }
.organism-b { width: 54vmax; height: 50vmax; right: -18vmax; bottom: -16vmax; background: radial-gradient(circle at 42% 45%,rgba(183,0,34,.7),rgba(77,0,38,.26) 43%,transparent 70%); animation: organismB 23s ease-in-out infinite alternate; }
.organism-c { width: 42vmax; height: 42vmax; left: 34%; top: 24%; background: radial-gradient(circle,rgba(0,106,123,.28),rgba(92,0,126,.24) 46%,transparent 72%); filter: blur(42px) saturate(160%); animation: organismC 15s ease-in-out infinite alternate; }
.interference-ring { position: absolute; display: block; border: 1px solid rgba(85,42,230,.34); border-radius: 50%; box-shadow: inset 0 0 0 14px rgba(255,255,255,.07),inset 0 0 0 15px rgba(255,48,157,.16),0 0 70px rgba(83,44,244,.2); mix-blend-mode: multiply; }
.ring-a { width: 66vmax; height: 31vmax; left: 16%; top: 6%; transform: rotate(-13deg); animation: ringWarpA 19s ease-in-out infinite alternate; }
.ring-b { width: 48vmax; height: 68vmax; right: -9%; bottom: -22%; transform: rotate(27deg); border-color: rgba(255,71,169,.17); animation: ringWarpB 27s ease-in-out infinite alternate; }
.light-ribbon { position: absolute; width: 130vmax; height: 24vmax; left: -16vmax; border-radius: 50%; border-top: 2px solid rgba(188,205,225,.35); border-bottom: 2px solid rgba(126,0,32,.42); box-shadow: 0 -16px 45px rgba(166,190,225,.1),0 18px 62px rgba(150,0,28,.2); filter: blur(.5px); mix-blend-mode: screen; }
.ribbon-a { top: 18%; transform: rotate(-12deg) skewX(18deg); animation: ribbonA 16s ease-in-out infinite alternate; }
.ribbon-b { bottom: 8%; transform: rotate(11deg) skewX(-14deg); border-top-color: rgba(255,142,208,.54); animation: ribbonB 21s ease-in-out infinite alternate; }
.spatial-mesh { position: absolute; left: -25%; right: -25%; bottom: -38%; height: 78%; background-image: linear-gradient(rgba(116,0,28,.21) 1px,transparent 1px),linear-gradient(90deg,rgba(69,12,99,.2) 1px,transparent 1px); background-size: 54px 54px; transform-origin: 50% 100%; transform: perspective(540px) rotateX(64deg) translateY(var(--scroll-phase)); mask-image: linear-gradient(to bottom,transparent,rgba(0,0,0,.68) 26%,#000 75%); animation: meshCurrent 13s linear infinite; }
.living-grain { position: absolute; inset: -40px; opacity: .28; background-image: repeating-radial-gradient(circle at 0 0,rgba(225,213,230,.24) 0 .5px,transparent .75px 3px); background-size: 6px 6px; mix-blend-mode: screen; animation: grainWalk .8s steps(8) infinite; }
.night-fog { position: absolute; width: 120vw; height: 32vh; left: -10vw; border-radius: 50%; background: radial-gradient(ellipse,rgba(181,190,212,.13),rgba(68,41,82,.08) 38%,transparent 72%); filter: blur(28px); mix-blend-mode: screen; }
.fog-a { top: 19%; animation: fogDriftA 18s ease-in-out infinite alternate; }
.fog-b { bottom: 5%; opacity: .68; animation: fogDriftB 27s ease-in-out infinite alternate; }
.watcher { --eye-rotate: 0deg; position: absolute; width: clamp(92px,14vw,210px); height: clamp(38px,5.8vw,88px); overflow: hidden; border: 1px solid rgba(205,191,219,.14); border-radius: 92% 8% 86% 14% / 88% 18% 82% 12%; background: radial-gradient(ellipse at 50% 53%,rgba(224,218,232,.3),rgba(80,38,83,.16) 48%,rgba(8,3,11,.88) 72%); box-shadow: inset 0 0 24px rgba(0,0,0,.9),0 0 34px rgba(113,0,36,.17); opacity: .18; transform: rotate(var(--eye-rotate)) scaleY(.08); transform-origin: 50% 50%; animation: watcherBlink var(--blink-speed,9.7s) cubic-bezier(.16,.74,.25,1) infinite; }
.watcher::before { content: ""; position: absolute; width: 34%; aspect-ratio: 1; left: 33%; top: 50%; border-radius: 50%; background: radial-gradient(circle,#050006 0 20%,#c0002c 23% 28%,#2a061d 31% 58%,#030104 61%); box-shadow: 0 0 18px rgba(213,0,45,.55); transform: translateY(-50%); animation: irisSearch 7s ease-in-out infinite alternate; }
.watcher::after { content: ""; position: absolute; inset: 7% 9%; border-radius: inherit; border-top: 1px solid rgba(238,224,238,.25); box-shadow: inset 0 8px 18px rgba(0,0,0,.72); }
.watcher i { position: absolute; z-index: 2; width: 5px; height: 70%; left: 50%; top: 15%; border-radius: 50%; background: #020103; box-shadow: 0 0 7px #000; transform: translateX(-50%); }
.watcher-a { --eye-rotate: -11deg; --blink-speed: 9.7s; left: 5%; top: 18%; animation-delay: -1.2s; }
.watcher-b { --eye-rotate: 17deg; --blink-speed: 13.3s; right: 7%; top: 58%; width: clamp(74px,11vw,170px); animation-delay: -4.2s; }
.watcher-c { --eye-rotate: -4deg; --blink-speed: 16.1s; left: 42%; bottom: 3%; width: clamp(58px,8vw,125px); opacity: .11; animation-delay: -8.6s; }
.vein-scratch { position: absolute; width: 38vw; height: 52vh; opacity: .25; filter: drop-shadow(0 0 7px rgba(166,0,33,.45)); background: linear-gradient(63deg,transparent 47%,rgba(174,0,34,.55) 48% 48.5%,transparent 49%),linear-gradient(118deg,transparent 56%,rgba(126,0,28,.42) 57% 57.4%,transparent 58%),linear-gradient(24deg,transparent 63%,rgba(148,0,27,.35) 64% 64.4%,transparent 65%); clip-path: polygon(47% 0,53% 0,58% 34%,91% 42%,61% 49%,76% 100%,67% 100%,52% 57%,18% 74%,45% 49%,7% 34%,48% 39%); animation: scratchCreep 15s ease-in-out infinite alternate; }
.scratch-a { left: -5%; bottom: -8%; transform: rotate(-8deg); }
.scratch-b { right: -9%; top: 0; transform: rotate(171deg) scale(.8); animation-delay: -7s; }
.dread-pulse { position: absolute; inset: 0; background: radial-gradient(circle at 50% 46%,transparent 0 18%,rgba(197,0,36,.13) 42%,rgba(93,0,19,.24) 74%,transparent 100%); opacity: 0; mix-blend-mode: screen; animation: dreadPulse 12.7s linear infinite; }
.nightmare-vignette { position: absolute; inset: 0; box-shadow: inset 0 0 17vmax rgba(0,0,0,.88),inset 0 0 5vmax rgba(0,0,0,.55); background: linear-gradient(180deg,rgba(0,0,0,.28),transparent 25%,transparent 72%,rgba(0,0,0,.5)); }

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 28px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(7,4,11,.62);
  backdrop-filter: blur(18px);
}
.mobile-brand { display: none; color: transparent; background: linear-gradient(110deg,#bd153a,#7f249b 58%,#d5bfd8); background-clip: text; -webkit-background-clip: text; text-decoration: none; font-family: "STXingkai", "华文行楷", "Kaiti SC", "STKaiti", cursive; font-size: 19px; font-weight: 900; letter-spacing: .08em; filter: drop-shadow(0 3px 9px rgba(182,0,43,.42)); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.node-status, .engine-chip {
  height: 30px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #6d6d74;
  background: rgba(255,255,255,.78);
  font-size: 10px;
  font-weight: 650;
}
.node-status i { width: 6px; height: 6px; border-radius: 50%; background: #aaaab0; box-shadow: 0 0 0 3px rgba(170,170,176,.11); }
.node-status.online i { background: var(--success); box-shadow: 0 0 0 3px rgba(41,163,106,.1); }
.node-status.offline i { background: #de5656; }
.engine-chip { color: #4937a8; background: #f0edff; border-color: #e4defe; }
.avatar-button { width: 32px; height: 32px; border: 0; border-radius: 50%; color: white; background: #232329; font-size: 10px; font-weight: 780; }

.workspace { position: relative; z-index: 1; margin-left: 0; padding: 64px 28px 0; }
.creation-stage { width: min(1000px, 100%); min-height: calc(100svh - 64px); margin: 0 auto; padding: 72px 0 28px; }
.intro { text-align: center; animation: rise .55s ease both; }
.dream-brand { position: relative; isolation: isolate; width: min(430px,90vw); height: 104px; display: inline-grid; place-items: center; margin: -18px auto 2px; }
.dream-brand::before { content: ""; position: absolute; z-index: -2; inset: 5% 12%; border-radius: 50%; background: radial-gradient(ellipse,rgba(146,0,32,.38),rgba(73,0,104,.2) 42%,transparent 72%); filter: blur(18px); animation: dreamPulse 3.2s ease-in-out infinite; }
.dream-brand::after { content: ""; position: absolute; z-index: -1; width: 62%; height: 3px; bottom: 12px; border-radius: 50%; background: linear-gradient(90deg,transparent,rgba(106,0,129,.52),rgba(185,0,36,.68),transparent); filter: blur(3px); animation: dreamPulse 3.2s ease-in-out infinite reverse; }
.dream-wordmark { position: relative; z-index: 2; margin: 0; display: flex; align-items: center; justify-content: center; color: transparent; font-family: "STXingkai", "华文行楷", "FZKai-Z03", "Kaiti SC", cursive; font-size: clamp(68px,7.4vw,98px); font-weight: 900; line-height: 1; letter-spacing: 0; filter: drop-shadow(0 8px 10px rgba(94,0,126,.5)) drop-shadow(0 22px 38px rgba(180,0,36,.38)); animation: dreamFloat 4.6s ease-in-out infinite; }
.dream-wordmark span { --tilt: 0deg; --lift: 0px; --stretch-x: 1; --stretch-y: 1; position: relative; display: inline-block; margin-left: -.06em; padding: 0 .055em .08em; color: transparent; background: linear-gradient(125deg,#4e0a72 0%,#a20c3d 28%,#eb2343 53%,#6e1b82 76%,#d8c8d8 94%); background-size: 260% 260%; background-position: calc(18% + var(--glyph-shift,0%)) 50%; background-clip: text; -webkit-background-clip: text; -webkit-text-stroke: .5px rgba(255,226,231,.36); transform: translateY(var(--lift)) rotate(var(--tilt)) scale(var(--stretch-x),var(--stretch-y)) skewX(var(--skew,0deg)); transform-origin: 50% 62%; animation: glyphColor 6s ease-in-out infinite,glyphBreathe var(--glyph-speed,5s) ease-in-out infinite alternate; }
.dream-wordmark span::before { content: attr(data-glyph); position: absolute; z-index: -1; inset: 0; color: rgba(116,48,255,.36); -webkit-text-stroke: 2px rgba(255,62,166,.12); transform: translate(.035em,.07em) scale(1.06); filter: blur(7px); }
.dream-wordmark span::after { content: attr(data-glyph); position: absolute; z-index: 2; inset: 0; color: transparent; background: linear-gradient(105deg,transparent 18%,rgba(255,255,255,.92) 39%,transparent 58%); background-size: 260% 100%; background-position: 170% 0; background-clip: text; -webkit-background-clip: text; animation: dreamShine var(--shine-speed,3.8s) ease-in-out infinite; }
.dream-wordmark span:nth-child(1) { --tilt: -8deg; --lift: -3px; --stretch-x: 1.08; --stretch-y: .98; --skew: -4deg; --glyph-speed: 4.7s; --shine-speed: 3.2s; }
.dream-wordmark span:nth-child(2) { --tilt: -4deg; --lift: 3px; --stretch-x: 1.17; --stretch-y: 1.04; --skew: -7deg; --glyph-speed: 6.1s; --shine-speed: 3.7s; --glyph-shift: 44%; }
.dream-orbit { position: absolute; z-index: -1; width: 92%; height: 74%; border: 1px solid rgba(111,13,139,.35); border-right-color: rgba(206,17,54,.64); border-radius: 50%; transform: rotate(-7deg); box-shadow: inset 0 0 26px rgba(72,0,96,.19),0 0 28px rgba(176,0,38,.18); animation: dreamOrbit 12s linear infinite; }
.dream-orbit::before, .dream-orbit::after { content: ""; position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 7px 3px rgba(126,86,255,.45), 0 0 16px rgba(236,75,191,.35); }
.dream-orbit::before { width: 6px; height: 6px; top: 14%; left: 8%; }
.dream-orbit::after { width: 4px; height: 4px; right: 11%; bottom: 12%; }
.dream-spark { position: absolute; z-index: 4; color: #9b58ff; line-height: 1; text-shadow: 0 0 10px currentColor; pointer-events: none; animation: dreamTwinkle 2.4s ease-in-out infinite; }
.spark-1 { top: 4px; left: 18%; font-size: 19px; animation-delay: -.2s; }
.spark-2 { top: 15px; right: 18%; color: #ff6c9d; font-size: 24px; animation-delay: -.9s; }
.spark-3 { bottom: 12px; left: 11%; color: #6f66ff; font-size: 15px; animation-delay: -1.5s; }
.spark-4 { right: 8%; bottom: 20px; color: #ff9d63; font-size: 13px; animation-delay: -.5s; }
.spark-5 { top: 36%; left: 3%; color: #e555c1; font-size: 32px; animation-delay: -1.8s; }
.spark-6 { top: 47%; right: 1%; color: #7b5fff; font-size: 17px; animation-delay: -1.1s; }
.welcome, .intro-note { margin: 0; color: #8f7d91; font-size: 12px; }
.intro-title { margin: 12px 0 10px; font-size: clamp(27px,2.8vw,36px); line-height: 1.2; letter-spacing: -.04em; font-weight: 730; }
.intro-title span { color: transparent; background: linear-gradient(110deg,#6950ff 10%,#b24fdd 55%,#ef6e9f 95%); background-clip: text; -webkit-background-clip: text; }
.intro-note { font-size: 13px; }

.composer {
  margin-top: 38px;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 24px;
  background: rgba(247,242,248,.9);
  box-shadow: 0 24px 78px rgba(0,0,0,.48),0 0 0 1px rgba(151,0,35,.06),inset 0 1px 0 rgba(255,255,255,.88);
  backdrop-filter: blur(34px) saturate(145%);
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.composer:focus-within { border-color: #cfc9f2; box-shadow: 0 23px 64px rgba(55,40,120,.12), 0 0 0 3px rgba(108,76,255,.055); transform: translateY(-1px); }
.mode-switch { display: flex; align-items: center; gap: 4px; margin: -4px 0 12px; padding-bottom: 11px; border-bottom: 1px solid #eeeeF2; }
.mode-button { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 9px; color: #77777f; background: transparent; font-size: 10px; font-weight: 680; cursor: pointer; }
.mode-button svg { width: 14px; height: 14px; }
.mode-button:hover { color: #393940; background: #f4f4f6; }
.mode-button.active { color: #352b75; background: #efedff; }
.prompt-field { position: relative; display: block; }
.prompt-field textarea { display: block; width: 100%; min-height: 118px; padding: 4px 5px 24px; resize: vertical; border: 0; outline: 0; color: #222228; background: transparent; font-size: 15px; line-height: 1.65; }
.prompt-field textarea::placeholder { color: #9c9ca4; }
.prompt-count { position: absolute; right: 5px; bottom: 4px; color: #aaaab1; font-size: 9px; }

.h3-reference-area { display: flex; align-items: stretch; gap: 9px; margin-top: 7px; min-width: 0; }
.reference-drop { flex: none; width: 210px; height: 64px; display: flex; align-items: center; gap: 10px; padding: 9px 11px; border: 1px dashed #d9d7e8; border-radius: 15px; color: #4f4f57; background: #faf9ff; cursor: pointer; transition: border-color .2s ease, background .2s ease; }
.reference-drop:hover, .reference-drop.dragging { border-color: #afa5eb; background: #f4f1ff; }
.reference-add { flex: none; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: #5f4bc3; background: #ebe7ff; }
.reference-add svg { width: 16px; height: 16px; }
.reference-drop > span:last-child { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.reference-drop strong { font-size: 11px; }
.reference-drop small { color: #8b8b93; font-size: 9px; }
.reference-assets { min-width: 0; flex: 1; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.reference-card { position: relative; flex: 0 0 116px; height: 64px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #ececf0; }
.reference-card img, .reference-card video { display: block; width: 100%; height: 100%; object-fit: cover; }
.reference-card::after { content: ""; position: absolute; inset: 36% 0 0; background: linear-gradient(transparent, rgba(14,14,18,.7)); pointer-events: none; }
.reference-card-copy { position: absolute; z-index: 1; inset: auto 7px 6px; min-width: 0; color: white; }
.reference-card-copy strong, .reference-card-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reference-card-copy strong { font-size: 8px; }
.reference-card-copy span { margin-top: 2px; color: rgba(255,255,255,.72); font-size: 7px; }
.reference-remove { position: absolute; z-index: 2; top: 5px; right: 5px; width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: white; background: rgba(17,17,21,.58); cursor: pointer; }
.reference-remove svg { width: 11px; height: 11px; }

.motion-reference-area { margin-top: 7px; }
.paste-guide { min-height: 30px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid #e7e2ff; border-radius: 10px; color: #655d83; background: #f8f6ff; font-size: 9px; }
.paste-guide svg { flex: none; width: 13px; height: 13px; color: #745de8; }
.paste-guide.success { color: #287b57; border-color: #d8eee4; background: #f2faf6; }
.paste-guide.error { color: #b44747; border-color: #f1d9d9; background: #fff6f6; }
.upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 7px; }
.upload-tile {
  position: relative;
  min-width: 0;
  height: 76px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 28px;
  grid-template-rows: minmax(0,1fr) 19px;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #f8f8fa;
  cursor: pointer;
  transition: border-color .2s ease, background .2s ease;
}
.upload-tile:hover, .upload-tile.dragging { border-color: #cfcbe6; background: #f5f3ff; }
.upload-icon { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #5f4bc3; background: #eeebff; }
.upload-icon svg { width: 17px; height: 17px; stroke-width: 1.8; }
.upload-copy { min-width: 0; align-self: end; display: flex; flex-direction: column; gap: 2px; }
.upload-copy strong, .upload-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-copy strong { color: #36363c; font-size: 11px; }
.upload-copy small { color: #8b8b93; font-size: 9px; }
.paste-target { align-self: start; color: #796da4; font-size: 8px; white-space: nowrap; }
.upload-action { grid-column: 3; grid-row: 1 / 3; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #6d6d74; background: #ececef; }
.upload-action svg { width: 14px; height: 14px; }
.upload-tile > img, .upload-tile > video, .remove-file { display: none; }
.upload-tile.has-file { grid-template-columns: 48px minmax(0,1fr) 28px; }
.upload-tile.has-file .upload-icon, .upload-tile.has-file .upload-action { display: none; }
.upload-tile.has-file .paste-target { display: none; }
.upload-tile.has-file > img, .upload-tile.has-file > video { grid-row: 1 / 3; display: block; width: 48px; height: 52px; border-radius: 9px; object-fit: cover; background: #202025; }
.upload-tile.has-file .upload-copy { grid-row: 1 / 3; align-self: center; }
.upload-tile.has-file .remove-file { grid-column: 3; grid-row: 1 / 3; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; color: #707077; background: #eaeaed; cursor: pointer; }
.remove-file svg { width: 13px; height: 13px; }

.composer-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 13px; }
.tool-group { min-width: 0; display: flex; align-items: center; gap: 8px; }
.mode-chip { height: 34px; display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; border-radius: 10px; color: #303037; background: #f1f1f4; font-size: 10px; font-weight: 680; }
.mode-chip svg { width: 14px; height: 14px; }
.duration-control { height: 34px; display: flex; align-items: center; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: 10px; }
.duration-control legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.duration-control input { position: absolute; opacity: 0; pointer-events: none; }
.duration-control label { cursor: pointer; }
.duration-control span { display: block; min-width: 33px; padding: 6px 7px; border-radius: 7px; color: #77777e; font-size: 9px; font-weight: 680; text-align: center; }
.duration-control input:checked + span { color: #2b2b30; background: #ededf0; }
.duration-control label.unsupported { display: none; }
.resolution-control { height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 0 8px 0 10px; border: 1px solid var(--line); border-radius: 10px; color: #8b8b93; background: white; font-size: 8px; font-weight: 680; white-space: nowrap; }
.resolution-control select { max-width: 100px; padding: 0 17px 0 0; border: 0; outline: 0; color: #36363c; background: transparent; font: inherit; font-size: 9px; cursor: pointer; }
.resolution-control select:disabled { color: #74747b; cursor: default; opacity: 1; }
.submit-area { min-width: 0; display: flex; align-items: center; gap: 11px; }
.form-message { max-width: 140px; overflow: hidden; color: #929299; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.form-message.error { color: #c84a4a; }
.generate-button { height: 38px; min-width: 88px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 0; border-radius: 12px; color: white; background: #19191d; font-size: 11px; font-weight: 740; cursor: pointer; transition: opacity .2s ease, transform .2s ease; }
.generate-button svg { width: 15px; height: 15px; }
.generate-button:hover:not(:disabled) { transform: translateY(-1px); }
.generate-button:disabled { opacity: .24; cursor: not-allowed; }
.privacy-note { margin: 10px 0 0; color: #a3a3aa; font-size: 9px; text-align: center; }

.conversation-stream { width: min(760px,100%); margin: 0 auto 30px; animation: rise .4s ease both; }
.message { margin-bottom: 32px; }
.message-user { display: flex; flex-direction: column; align-items: flex-end; }
.message-label { margin-bottom: 8px; color: #919198; font-size: 9px; font-weight: 670; }
.submitted-prompt { max-width: 620px; margin: 0 0 9px; padding: 12px 15px; border-radius: 17px 17px 5px 17px; color: #34343a; background: #ececef; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
.message-attachments { display: flex; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 20px 20px 5px 20px; background: white; }
.submitted-file { position: relative; width: 152px; aspect-ratio: 16/10; overflow: hidden; border-radius: 12px; background: #202025; }
.submitted-file video, .submitted-file img { width: 100%; height: 100%; object-fit: cover; }
.submitted-file span { position: absolute; inset: auto 7px 6px; color: white; font-size: 9px; font-weight: 700; text-shadow: 0 1px 4px #000; }
.message-system { display: grid; grid-template-columns: 36px minmax(0,1fr); gap: 13px; }
.assistant-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 12px; color: white; background: #1d1d21; font-size: 12px; font-weight: 820; }
.assistant-content { min-width: 0; padding-top: 2px; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.result-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.status-badge { flex: none; padding: 6px 10px; border-radius: 999px; color: #66666d; background: #eaeaed; font-size: 9px; font-weight: 700; }
.status-badge.succeeded { color: #187149; background: #e3f4eb; }
.status-badge.failed { color: #aa3737; background: #fce9e9; }
.progress-line { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; margin-top: 15px; }
.progress-track { height: 4px; overflow: hidden; border-radius: 999px; background: #e7e7eb; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--accent),var(--accent-2)); transition: width .5s ease; }
.progress-line strong { min-width: 31px; color: #4f4f56; font-size: 9px; font-variant-numeric: tabular-nums; text-align: right; }
.progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: #8e8e96; font-size: 9px; font-variant-numeric: tabular-nums; }
.progress-meta span:first-child { color: #595960; font-weight: 680; }
.job-message { margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.progress-meta + .job-message { margin-top: 7px; }
.result-player { width: min(390px,100%); overflow: hidden; border-radius: 17px; background: #17171b; box-shadow: 0 16px 46px rgba(20,20,25,.12); }
.result-player video { display: block; width: 100%; max-height: 68vh; object-fit: contain; }
.download-link { display: inline-block; margin-top: 12px; color: #25252a; font-size: 10px; font-weight: 700; text-underline-offset: 4px; }

.recent-section { width: 100%; min-height: calc(100svh - 64px); display: flex; flex-direction: column; margin: 0 auto; padding: 56px 0 28px; border-top: 1px solid rgba(255,255,255,.1); background: linear-gradient(180deg,rgba(31,4,31,.3),transparent 32%); scroll-margin-top: 64px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 18px; }
.section-heading p { margin: 0 0 5px; color: #9a9aa1; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.section-heading h2 { margin: 0; color: #f0e7f0; font-size: 28px; letter-spacing: -.035em; }
.section-heading > span { color: #a18fa2; font-size: 10px; font-variant-numeric: tabular-nums; }
.recent-grid { flex: 1; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; align-content: center; }
.recent-card { position: relative; min-width: 0; aspect-ratio: 9/13; overflow: hidden; border-radius: 15px; background: #e9e9ed; box-shadow: inset 0 0 0 1px rgba(0,0,0,.04); }
.recent-card.active { box-shadow: inset 0 0 0 2px rgba(108,76,255,.5); }
.recent-card-open { position: absolute; inset: 0; width: 100%; height: 100%; display: block; overflow: hidden; padding: 0; border: 0; color: inherit; background: transparent; cursor: pointer; text-align: left; }
.recent-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.recent-card:hover img { transform: scale(1.025); }
.recent-card-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: #5e52a5; background: #e9e5f6; font-size: 20px; font-weight: 760; text-align: center; }
.recent-card-open::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent,rgba(15,15,18,.7)); pointer-events: none; }
.recent-card-copy { position: absolute; z-index: 1; inset: auto 11px 10px; display: flex; flex-direction: column; gap: 3px; color: white; text-align: left; }
.recent-card-copy strong { font-size: 10px; }
.recent-card-copy span { color: rgba(255,255,255,.72); font-size: 8px; }
.recent-card-delete { position: absolute; z-index: 3; top: 9px; right: 9px; width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; color: white; background: rgba(19,19,23,.62); backdrop-filter: blur(10px); cursor: pointer; transition: background .18s ease, transform .18s ease; }
.recent-card-delete:hover, .recent-card-delete:focus-visible { transform: scale(1.05); }
.recent-card-delete:hover { background: #b43e48; }
.recent-card-delete svg { width: 14px; height: 14px; }
.recent-empty { grid-column: 1/-1; display: grid; place-items: center; min-height: 42svh; border: 1px dashed #d9d9df; border-radius: 18px; color: #9999a0; font-size: 11px; }
.works-footer { display: flex; justify-content: flex-end; padding-top: 22px; }
.works-pagination { height: 38px; display: inline-grid; grid-template-columns: 38px auto 38px; align-items: center; overflow: hidden; border: 1px solid #dedee5; border-radius: 12px; background: rgba(255,255,255,.8); }
.works-pagination button { width: 38px; height: 38px; display: grid; place-items: center; padding: 0; border: 0; color: #4f4f56; background: transparent; cursor: pointer; }
.works-pagination button:hover:not(:disabled) { background: #efeff3; }
.works-pagination button:disabled { color: #c2c2c8; cursor: default; }
.works-pagination button svg { width: 15px; height: 15px; }
.works-pagination span { min-width: 58px; padding: 0 10px; color: #55555c; font-size: 9px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: center; }

body.preview-open { overflow: hidden; }
.preview-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(14,14,18,.62); backdrop-filter: blur(16px); opacity: 0; transition: opacity .22s ease; }
.preview-backdrop.open { opacity: 1; }
.preview-dialog { width: min(1160px,calc(100vw - 48px)); max-height: calc(100svh - 48px); overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 22px; background: #fff; box-shadow: 0 36px 110px rgba(0,0,0,.3); transform: translateY(12px) scale(.985); transition: transform .22s ease; }
.preview-backdrop.open .preview-dialog { transform: none; }
.preview-header { height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 20px 0 24px; border-bottom: 1px solid #e8e8ed; background: #fff; }
.preview-eyebrow { display: block; margin-bottom: 3px; color: #96969d; font-size: 8px; font-weight: 750; letter-spacing: .1em; }
.preview-header h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.preview-close { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #55555c; background: #f0f0f3; cursor: pointer; }
.preview-close:hover { background: #e7e7eb; }
.preview-close svg { width: 16px; height: 16px; }
.preview-layout { display: grid; grid-template-columns: minmax(0,1fr) 340px; min-height: min(650px,calc(100svh - 116px)); }
.preview-media { min-width: 0; min-height: 0; display: grid; place-items: center; padding: 24px; overflow: hidden; background: #101013; }
.preview-media video { display: block; width: 100%; height: 100%; max-height: calc(100svh - 164px); object-fit: contain; background: #101013; }
.preview-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #9c9ca5; text-align: center; }
.preview-empty svg { width: 30px; height: 30px; margin-bottom: 5px; }
.preview-empty strong { color: #f3f3f5; font-size: 14px; }
.preview-empty span { max-width: 300px; font-size: 10px; line-height: 1.55; }
.preview-inspector { min-height: 0; display: flex; flex-direction: column; padding: 24px; overflow-y: auto; border-left: 1px solid #e8e8ed; background: #fff; }
.preview-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 20px; border-bottom: 1px solid #ececf0; }
.preview-status-row > span:last-child { color: #8c8c93; font-size: 9px; }
.preview-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 16px; margin: 22px 0 0; }
.preview-meta div { min-width: 0; }
.preview-meta dt { margin-bottom: 5px; color: #96969d; font-size: 8px; }
.preview-meta dd { margin: 0; overflow: hidden; color: #303036; font-size: 11px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
.preview-prompt { margin-top: 24px; }
.preview-prompt > span { color: #96969d; font-size: 8px; }
.preview-prompt p { margin: 8px 0 0; color: #505057; font-size: 10px; line-height: 1.7; white-space: pre-wrap; }
.preview-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: auto; padding-top: 24px; }
.preview-open-video, .preview-delete { height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border-radius: 11px; font-size: 10px; font-weight: 700; text-decoration: none; cursor: pointer; }
.preview-open-video { color: white; background: #1d1d21; }
.preview-delete { border: 1px solid #ead8da; color: #a64049; background: #fff; }
.preview-delete:hover:not(:disabled) { background: #fbedee; }
.preview-delete:disabled { opacity: .35; cursor: not-allowed; }
.preview-open-video svg, .preview-delete svg { width: 14px; height: 14px; }
.delete-confirm { margin-top: 12px; padding: 14px; border: 1px solid #f0cfd2; border-radius: 13px; background: #fff6f6; }
.delete-confirm > div:first-child { display: flex; flex-direction: column; gap: 5px; }
.delete-confirm strong { color: #8d3039; font-size: 10px; }
.delete-confirm span { color: #9b666b; font-size: 8px; line-height: 1.5; }
.delete-confirm-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.delete-confirm-actions button { height: 30px; padding: 0 11px; border: 0; border-radius: 8px; font-size: 9px; font-weight: 700; cursor: pointer; }
#deleteCancel { color: #696970; background: #ececef; }
#deleteConfirmButton { color: white; background: #b43e48; }
#deleteConfirmButton:disabled { opacity: .5; }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dreamGradient { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes dreamFloat { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-6px) rotate(1deg); } }
@keyframes dreamPulse { 0%,100% { opacity: .58; transform: scale(.92); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes dreamOrbit { from { transform: rotate(-7deg); } to { transform: rotate(353deg); } }
@keyframes dreamTwinkle { 0%,100% { opacity: .28; transform: scale(.72) rotate(-8deg); } 50% { opacity: 1; transform: scale(1.18) rotate(8deg); } }
@keyframes dreamShine { 0%,35% { background-position: 180% 0; opacity: 0; } 52% { opacity: .9; } 72%,100% { background-position: -80% 0; opacity: 0; } }
@keyframes glyphColor { 0%,100% { background-position: 0% 50%; filter: hue-rotate(0deg); } 50% { background-position: 100% 50%; filter: hue-rotate(18deg); } }
@keyframes glyphBreathe { 0% { translate: 0 -2px; } 46% { translate: 3px 3px; } 100% { translate: -2px 6px; } }
@keyframes spectralTurn { to { transform: rotate(360deg) scale(1.05); } }
@keyframes fieldBreath { 0% { transform: scale(.82) rotate(-4deg); opacity: .48; } 100% { transform: scale(1.16) rotate(8deg); opacity: .92; } }
@keyframes organismA { 0% { transform: translate3d(-4vw,-3vh,0) rotate(-8deg) scale(.9); border-radius: 42% 58% 63% 37% / 59% 38% 62% 41%; } 50% { transform: translate3d(22vw,16vh,0) rotate(19deg) scale(1.16); border-radius: 64% 36% 31% 69% / 43% 67% 33% 57%; } 100% { transform: translate3d(11vw,43vh,0) rotate(-21deg) scale(.96); border-radius: 31% 69% 58% 42% / 65% 32% 68% 35%; } }
@keyframes organismB { 0% { transform: translate3d(7vw,8vh,0) rotate(12deg) scale(.92); } 55% { transform: translate3d(-28vw,-31vh,0) rotate(-26deg) scale(1.2); border-radius: 67% 33% 46% 54% / 34% 61% 39% 66%; } 100% { transform: translate3d(-8vw,-54vh,0) rotate(17deg) scale(.88); } }
@keyframes organismC { 0% { transform: translate3d(-10vw,25vh,0) scale(.72) rotate(0); } 50% { transform: translate3d(27vw,-18vh,0) scale(1.28) rotate(120deg); } 100% { transform: translate3d(-24vw,-29vh,0) scale(.94) rotate(250deg); } }
@keyframes ringWarpA { 0% { transform: rotate(-13deg) scale(.84,.68) translate3d(-7vw,-2vh,0); border-radius: 50%; } 48% { transform: rotate(18deg) scale(1.1,1.34) translate3d(12vw,18vh,0); border-radius: 38% 62% 51% 49%; } 100% { transform: rotate(-28deg) scale(.92,1.08) translate3d(-2vw,36vh,0); border-radius: 63% 37% 58% 42%; } }
@keyframes ringWarpB { 0% { transform: rotate(27deg) scale(.76,1.08); } 52% { transform: rotate(-19deg) scale(1.24,.72) translate3d(-22vw,-15vh,0); } 100% { transform: rotate(38deg) scale(.9,1.22) translate3d(-11vw,-42vh,0); } }
@keyframes ribbonA { 0% { transform: translate3d(-8vw,-8vh,0) rotate(-12deg) skewX(18deg) scaleY(.65); } 50% { transform: translate3d(7vw,34vh,0) rotate(7deg) skewX(-9deg) scaleY(1.4); } 100% { transform: translate3d(-3vw,68vh,0) rotate(-5deg) skewX(22deg) scaleY(.82); } }
@keyframes ribbonB { 0% { transform: translate3d(-4vw,20vh,0) rotate(11deg) skewX(-14deg) scaleY(.7); } 100% { transform: translate3d(11vw,-66vh,0) rotate(-17deg) skewX(16deg) scaleY(1.38); } }
@keyframes meshCurrent { from { background-position: 0 0,0 0; } to { background-position: 0 54px,54px 0; } }
@keyframes grainWalk { 0% { transform: translate(0,0); } 25% { transform: translate(11px,-7px); } 50% { transform: translate(-8px,13px); } 75% { transform: translate(16px,6px); } 100% { transform: translate(-4px,-11px); } }
@keyframes fogDriftA { 0% { transform: translate3d(-24vw,-6vh,0) scale(.8,.6); opacity: .18; } 47% { transform: translate3d(12vw,19vh,0) scale(1.2,1.1); opacity: .62; } 100% { transform: translate3d(27vw,-3vh,0) scale(.92,.72); opacity: .26; } }
@keyframes fogDriftB { 0% { transform: translate3d(21vw,8vh,0) scale(1.1,.7); } 100% { transform: translate3d(-26vw,-24vh,0) scale(.78,1.24); } }
@keyframes watcherBlink { 0%,7%,25%,42%,58%,75%,86%,100% { transform: rotate(var(--eye-rotate)) scaleY(.06); opacity: .07; } 9%,22%,44%,55%,77%,83% { transform: rotate(var(--eye-rotate)) scaleY(1); opacity: .44; } 23%,56%,84% { transform: rotate(var(--eye-rotate)) scaleY(.48); opacity: .24; } }
@keyframes irisSearch { 0%,18% { translate: -18% -50%; scale: .86; } 42%,58% { translate: 13% -50%; scale: 1.08; } 81%,100% { translate: -4% -50%; scale: .94; } }
@keyframes scratchCreep { 0% { opacity: .06; translate: -3vw 4vh; scale: .82; } 51% { opacity: .31; translate: 7vw -6vh; scale: 1.1; } 100% { opacity: .12; translate: -1vw -12vh; scale: .94; } }
@keyframes dreadPulse { 0%,24%,27%,61%,64%,91%,100% { opacity: 0; } 25% { opacity: .26; } 26% { opacity: .05; } 62% { opacity: .38; } 63% { opacity: .08; } 92% { opacity: .18; } }

@media (max-width: 900px) {
  .recent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 680px) {
  .color-organism { filter: blur(22px) saturate(140%); }
  .organism-a,.organism-b { width: 72vmax; height: 62vmax; opacity: .47; }
  .interference-ring { opacity: .72; }
  .spatial-mesh { bottom: -28%; height: 62%; background-size: 38px 38px; }
  .living-grain { opacity: .14; }
  .watcher-a { left: -8%; top: 15%; }
  .watcher-b { right: -7%; top: 68%; }
  .watcher-c { display: none; }
  .vein-scratch { width: 66vw; opacity: .2; }
  .topbar { inset-left: 0; left: 0; height: 56px; justify-content: space-between; padding: 0 15px; }
  .mobile-brand { display: block; font-size: 20px; }
  .engine-chip { display: none; }
  .topbar-actions { gap: 7px; }
  .node-status { width: 28px; height: 28px; justify-content: center; padding: 0; }
  .node-status span { display: none; }
  .avatar-button { width: 30px; height: 30px; }
  .workspace { margin-left: 0; padding: 56px 12px 0; }
  .creation-stage { min-height: calc(100svh - 56px); padding: 30px 0 24px; }
  .dream-brand { width: min(330px,92vw); height: 80px; margin: -8px auto 0; }
  .dream-wordmark { font-size: 56px; }
  .dream-orbit { width: 94%; height: 70%; }
  .spark-1 { left: 13%; }
  .spark-2 { right: 14%; }
  .welcome { font-size: 9px; letter-spacing: .12em; }
  .intro-title { max-width: 340px; margin: 9px auto 8px; font-size: 25px; line-height: 1.18; letter-spacing: -.045em; }
  .intro-note { font-size: 11px; }
  .composer { margin-top: 22px; padding: 12px; border-radius: 18px; box-shadow: 0 12px 36px rgba(32,28,50,.08); }
  .mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 0 12px; padding: 4px; border: 0; border-radius: 12px; background: #f1f1f4; }
  .mode-button { width: 100%; height: 36px; justify-content: center; border-radius: 9px; font-size: 11px; }
  .mode-button.active { color: #fff; background: #1c1c20; box-shadow: 0 2px 7px rgba(0,0,0,.14); }
  .prompt-field { border: 1px solid #e8e8ed; border-radius: 14px; background: #fafafa; }
  .prompt-field textarea { min-height: 132px; padding: 13px 13px 28px; resize: none; font-size: 14px; line-height: 1.55; }
  .prompt-count { right: 12px; bottom: 9px; }
  .h3-reference-area { flex-direction: column; }
  .reference-drop { width: 100%; height: 64px; margin-top: 3px; border-style: solid; background: #f7f6fc; }
  .reference-add { width: 38px; height: 38px; }
  .reference-drop strong { font-size: 12px; }
  .reference-drop small { font-size: 9px; }
  .reference-assets { width: 100%; }
  .reference-card { flex-basis: 108px; height: 60px; }
  .motion-reference-area { margin-top: 5px; }
  .paste-guide { min-height: 34px; font-size: 9px; line-height: 1.35; }
  .upload-row { grid-template-columns: 1fr; gap: 7px; margin-top: 7px; }
  .upload-tile { height: 74px; }
  .composer-toolbar { align-items: stretch; flex-direction: column; gap: 11px; margin-top: 12px; }
  .tool-group { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .mode-chip { min-width: 0; padding: 0 10px; }
  .mode-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .duration-control span { min-width: 31px; }
  .resolution-control { grid-column: 1/-1; justify-content: space-between; }
  .resolution-control select { max-width: none; }
  .submit-area { display: grid; grid-template-columns: minmax(0,1fr) 112px; gap: 10px; }
  .generate-button { width: 112px; min-width: 0; height: 42px; }
  .form-message { max-width: none; align-self: center; }
  .privacy-note { margin-top: 9px; }
  .conversation-stream { margin-bottom: 20px; }
  .message-user { align-items: stretch; }
  .submitted-file { flex: 1; width: auto; }
  .message-system { grid-template-columns: 32px minmax(0,1fr); gap: 10px; }
  .assistant-avatar { width: 32px; height: 32px; border-radius: 10px; }
  .recent-section { min-height: calc(100svh - 56px); padding: 38px 0 max(20px,env(safe-area-inset-bottom)); scroll-margin-top: 56px; }
  .section-heading { margin-bottom: 14px; }
  .section-heading h2 { font-size: 24px; }
  .recent-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .recent-card { border-radius: 13px; }
  .recent-card-delete { width: 28px; height: 28px; opacity: 1; transform: none; }
  .works-footer { padding-top: 16px; }
  .preview-backdrop { align-items: end; padding: 0; background: rgba(14,14,18,.48); }
  .preview-dialog { width: 100%; max-height: 94svh; border: 0; border-radius: 22px 22px 0 0; transform: translateY(28px); }
  .preview-header { height: 60px; padding: 0 15px 0 18px; }
  .preview-header h2 { font-size: 16px; }
  .preview-layout { display: block; min-height: 0; max-height: calc(94svh - 60px); overflow-y: auto; }
  .preview-media { height: min(52svh,460px); padding: 12px; }
  .preview-media video { max-height: 100%; }
  .preview-inspector { min-height: 300px; padding: 20px 18px max(24px,env(safe-area-inset-bottom)); overflow: visible; border: 0; }
  .preview-actions { margin-top: 24px; }
}

html[data-dream-period="day"] { background: #d9e8ff; }
html[data-dream-period="day"] .abstract-stage {
  background:
    radial-gradient(circle at calc(15% + var(--pointer-x)) calc(17% + var(--pointer-y)),rgba(105,87,255,.42),transparent 28%),
    radial-gradient(circle at calc(87% - var(--pointer-x)) calc(74% - var(--pointer-y)),rgba(255,81,178,.36),transparent 32%),
    conic-gradient(from 208deg at 54% 48%,#d7e9ff 0deg,#ffe0f0 62deg,#f3efab 121deg,#c8f0ed 179deg,#e5d6ff 247deg,#ffd8e7 304deg,#d7e9ff 360deg);
}
html[data-dream-period="day"] .abstract-stage::before { background: repeating-radial-gradient(ellipse at 22% 28%,rgba(72,74,218,.14) 0 2px,transparent 3px 28px),repeating-radial-gradient(ellipse at 79% 71%,rgba(255,54,160,.11) 0 2px,transparent 3px 36px); background-size: 76% 94%,91% 74%; mix-blend-mode: multiply; }
html[data-dream-period="day"] .abstract-stage::after { background: radial-gradient(ellipse at center,rgba(255,255,255,.5) 0 12%,transparent 23%,rgba(255,246,147,.18) 35%,transparent 43%,rgba(104,80,255,.09) 54%,transparent 67%); filter: blur(4px); }
html[data-dream-period="day"] .dream-canvas { opacity: 1; filter: saturate(158%) contrast(108%) brightness(1.1); }
html[data-dream-period="day"] .color-organism { opacity: .68; filter: blur(24px) saturate(175%); }
html[data-dream-period="day"] .organism-a { background: radial-gradient(circle at 60% 44%,rgba(101,75,255,.72),rgba(83,148,255,.25) 42%,transparent 68%); }
html[data-dream-period="day"] .organism-b { background: radial-gradient(circle at 42% 45%,rgba(255,72,175,.64),rgba(255,174,78,.29) 43%,transparent 70%); }
html[data-dream-period="day"] .organism-c { background: radial-gradient(circle,rgba(53,221,233,.34),rgba(181,86,255,.2) 46%,transparent 72%); }
html[data-dream-period="day"] .interference-ring { border-color: rgba(72,71,210,.31); box-shadow: inset 0 0 0 14px rgba(255,255,255,.09),inset 0 0 0 15px rgba(255,75,168,.13),0 0 70px rgba(91,79,238,.17); mix-blend-mode: multiply; }
html[data-dream-period="day"] .light-ribbon { border-top-color: rgba(255,255,255,.9); border-bottom-color: rgba(107,72,255,.31); box-shadow: 0 -16px 45px rgba(255,255,255,.38),0 18px 62px rgba(232,64,196,.17); }
html[data-dream-period="day"] .spatial-mesh { background-image: linear-gradient(rgba(75,61,185,.18) 1px,transparent 1px),linear-gradient(90deg,rgba(75,61,185,.17) 1px,transparent 1px); }
html[data-dream-period="day"] .living-grain { opacity: .2; background-image: repeating-radial-gradient(circle at 0 0,rgba(45,24,111,.22) 0 .5px,transparent .75px 3px); mix-blend-mode: multiply; }
html[data-dream-period="day"] .night-fog { background: radial-gradient(ellipse,rgba(255,255,255,.5),rgba(151,190,237,.17) 38%,transparent 72%); filter: blur(22px); }
html[data-dream-period="day"] .watcher { border-color: rgba(255,255,255,.5); background: radial-gradient(ellipse at 50% 53%,rgba(255,255,255,.72),rgba(255,221,240,.42) 48%,rgba(118,105,207,.18) 72%); box-shadow: inset 0 0 24px rgba(88,70,154,.18),0 0 34px rgba(255,255,255,.45); opacity: .16; mix-blend-mode: multiply; }
html[data-dream-period="day"] .watcher::before { background: radial-gradient(circle,#161126 0 18%,#5ad9e7 21% 29%,#a867e2 32% 56%,rgba(255,255,255,.9) 60%); box-shadow: 0 0 18px rgba(75,205,225,.62); }
html[data-dream-period="day"] .watcher::after { border-top-color: rgba(255,255,255,.78); box-shadow: inset 0 8px 18px rgba(103,68,145,.16); }
html[data-dream-period="day"] .watcher-a { left: -3%; top: 13%; }
html[data-dream-period="day"] .watcher-b { right: 5%; top: 81%; }
html[data-dream-period="day"] .vein-scratch { opacity: .14; filter: drop-shadow(0 0 7px rgba(89,68,205,.27)); }
html[data-dream-period="day"] .dread-pulse { background: radial-gradient(circle at 50% 46%,transparent 0 18%,rgba(255,255,255,.28) 42%,rgba(255,237,114,.25) 74%,transparent 100%); mix-blend-mode: screen; }
html[data-dream-period="day"] .nightmare-vignette { box-shadow: inset 0 0 12vmax rgba(94,72,181,.16),inset 0 0 4vmax rgba(255,101,182,.1); background: linear-gradient(180deg,rgba(134,169,233,.16),transparent 25%,transparent 72%,rgba(255,176,213,.18)); }
html[data-dream-period="day"] .topbar { border-bottom-color: rgba(255,255,255,.38); background: rgba(224,235,255,.56); }
html[data-dream-period="day"] .mobile-brand { background: linear-gradient(110deg,#4f45ef,#c33fd0 58%,#ff765e); background-clip: text; -webkit-background-clip: text; filter: drop-shadow(0 3px 8px rgba(104,74,255,.24)); }
html[data-dream-period="day"] .dream-brand::before { background: radial-gradient(ellipse,rgba(116,80,255,.26),rgba(233,77,202,.16) 42%,transparent 72%); }
html[data-dream-period="day"] .dream-brand::after { background: linear-gradient(90deg,transparent,rgba(104,76,255,.48),rgba(245,88,179,.56),transparent); }
html[data-dream-period="day"] .dream-wordmark { filter: drop-shadow(0 8px 10px rgba(74,55,203,.24)) drop-shadow(0 22px 34px rgba(235,65,177,.2)); }
html[data-dream-period="day"] .dream-wordmark span { background: linear-gradient(125deg,#4735ef 0%,#893cf4 25%,#f2399d 50%,#ff8053 73%,#e7d447 94%); background-size: 260% 260%; background-clip: text; -webkit-background-clip: text; -webkit-text-stroke-color: rgba(255,255,255,.42); }
html[data-dream-period="day"] .welcome { color: #776c87; }
html[data-dream-period="day"] .recent-section { border-top-color: rgba(255,255,255,.55); background: linear-gradient(180deg,rgba(255,255,255,.14),transparent 32%); }
html[data-dream-period="day"] .section-heading h2 { color: #17141d; }
html[data-dream-period="day"] .section-heading > span { color: #716b7b; }

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