/* Photon — black stage, warm light, prism glow. Dense like a studio floor, smooth like glass.
   Type is the nax.works stack: PT Sans Narrow (headlines), PT Sans (reading), PT Mono (labels). */
:root {
  --display: "PT Sans Narrow", "Arial Narrow", "PT Sans", sans-serif;
  --sans: "PT Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --mono: "PT Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --bg: #050505;
  --bg2: #0a0a0b;
  --card: #0f0f11;
  --card2: #16161a;
  --line: rgba(255, 255, 255, 0.07);
  --line2: rgba(255, 255, 255, 0.14);
  --dim: #8e8e8a;
  --dim2: #5c5c59;
  --fg: #ebebe7;
  --white: #fbfbf8;
  --light: #ffe2b8;            /* the photon */
  --gold: #ffcf5a;
  --gold2: #ff9f2e;
  --p1: #ff6ad5;               /* the prism */
  --p2: #ffd36a;
  --p3: #6af0ff;
  --p4: #9b7bff;
  --prism: linear-gradient(100deg, var(--p1), var(--p2) 35%, var(--p3) 70%, var(--p4));
  --bad: #ff7a6b;
  --good: #8ff0a4;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r: 20px;
  --top: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--fg); font: 15.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; color: var(--white); font-family: var(--display); text-transform: uppercase; letter-spacing: -0.005em; font-weight: 700; }
p { margin: 0; }
::selection { background: var(--light); color: var(--bg); }
:focus-visible { outline: 2px solid var(--light); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 400; background: var(--white); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.dim2 { color: var(--dim2); }
.small { font-size: 0.86rem; }
.tiny { font: 0.7rem/1.4 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.wrap { width: min(1440px, 100% - 32px); margin-inline: auto; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.link { color: var(--white); border-bottom: 1px solid var(--line2); }
.link:hover { border-color: var(--white); }
.prism-text { background: var(--prism); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: flow 6s linear infinite; }
@keyframes flow { to { background-position: 200% 0; } }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- promo strip */
.promo { position: relative; z-index: 120; display: flex; align-items: center; justify-content: center; gap: 14px; height: 34px; padding: 0 16px;
  font-size: 0.84rem; color: var(--fg); background: linear-gradient(90deg, rgba(255, 106, 213, 0.14), rgba(255, 211, 106, 0.16), rgba(106, 240, 255, 0.14)); border-bottom: 1px solid var(--line); overflow: hidden; white-space: nowrap; }
.promo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, 0.12) 50%, transparent 60%); background-size: 250% 100%; animation: sheen 3.6s linear infinite; pointer-events: none; }
.promo b { color: var(--white); }
.promo-shine { font: 700 0.72rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; background: var(--gold); color: #1a1100; }
.promo-go { color: var(--light); }
@keyframes sheen { from { background-position: 150% 0; } to { background-position: -100% 0; } }

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 110; height: var(--top); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; padding: 0 18px;
  background: rgba(5, 5, 5, 0.72); backdrop-filter: blur(20px) saturate(1.5); -webkit-backdrop-filter: blur(20px) saturate(1.5); border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 1.3rem/1 var(--display); text-transform: uppercase; letter-spacing: 0.05em; color: var(--white); }
.logo-orb { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle, #fff 0 25%, var(--light) 45%, transparent 72%); box-shadow: 0 0 18px 3px rgba(255, 210, 150, 0.55); animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe { 50% { box-shadow: 0 0 28px 8px rgba(255, 210, 150, 0.32); transform: scale(1.1); } }
.tabs { display: flex; gap: 2px; justify-content: center; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; color: var(--dim); font-size: 0.93rem; font-weight: 700; white-space: nowrap; transition: color .2s, background .2s; }
.tabs a:hover { color: var(--white); background: rgba(255, 255, 255, 0.04); }
.tabs a.on { color: var(--white); background: rgba(255, 255, 255, 0.07); }
.tabs small { font: 0.6rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim2); border: 1px solid var(--line2); padding: 0 5px; border-radius: 6px; }
.dot-new { width: 6px; height: 6px; border-radius: 50%; background: var(--p1); box-shadow: 0 0 8px var(--p1); }
.top-right { display: flex; align-items: center; gap: 8px; }

.coins { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px; font: 700 0.9rem var(--mono); color: #1b1200;
  background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, var(--gold2)); box-shadow: 0 0 0 1px rgba(255, 207, 90, 0.4), 0 6px 24px -8px rgba(255, 170, 40, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.6); overflow: hidden; }
.coins::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%); background-size: 250% 100%; animation: sheen 4s linear infinite; }
.coin { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff6cf, #ffc93d 55%, #c77b00); box-shadow: inset 0 0 0 2px rgba(120, 70, 0, 0.35); font: 700 0.75rem var(--display); color: #5a3500; }
.coins.bump { animation: bump .6s var(--spring); }
@keyframes bump { 30% { transform: scale(1.14); } }

.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: 0.93rem; white-space: nowrap;
  border: 1px solid var(--line2); color: var(--white); background: rgba(255, 255, 255, 0.02); transition: transform .25s var(--ease), background .2s, border-color .2s, box-shadow .25s, opacity .2s; }
.btn:hover { border-color: rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.05); }
.btn:active { transform: scale(0.97); }
.btn.light { background: var(--white); color: var(--bg); border-color: var(--white); }
.btn.light:hover { box-shadow: 0 0 34px -6px rgba(255, 226, 184, 0.7); }
.btn.gold { color: #1b1200; border: 0; background: linear-gradient(180deg, #ffe08a, var(--gold) 55%, var(--gold2)); box-shadow: 0 8px 30px -10px rgba(255, 170, 40, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn.gold:hover { box-shadow: 0 10px 40px -8px rgba(255, 170, 40, 1), inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.btn.small { height: 34px; padding: 0 13px; font-size: 0.85rem; border-radius: 10px; }
.btn.big { height: 52px; padding: 0 26px; font-size: 1.02rem; border-radius: 14px; }
.btn.wide { width: 100%; }
.btn.ghost { border-color: transparent; background: none; color: var(--dim); }
.btn.ghost:hover { color: var(--white); background: rgba(255, 255, 255, 0.04); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn .cost { display: inline-flex; align-items: center; gap: 4px; font: 0.78rem var(--mono); opacity: 0.75; }
.btn .cost::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6cf, #ffc93d 55%, #c77b00); }

/* the prism button: rotating rainbow border */
.btn.prism { border: 0; background: #0d0d0f; isolation: isolate; }
.btn.prism::before { content: ""; position: absolute; inset: -1.5px; z-index: -2; border-radius: inherit; background: conic-gradient(from var(--a, 0deg), var(--p1), var(--p2), var(--p3), var(--p4), var(--p1)); animation: spin-a 3s linear infinite; }
.btn.prism::after { content: ""; position: absolute; inset: 1px; z-index: -1; border-radius: inherit; background: #0d0d0f; }
.btn.prism:hover { box-shadow: 0 0 30px -6px rgba(255, 106, 213, 0.55); }
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@keyframes spin-a { to { --a: 360deg; } }
.avatar { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--card2); border: 1px solid var(--line2); font: 700 0.95rem var(--sans); color: var(--white); text-transform: uppercase; }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; font: 700 0.64rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; white-space: nowrap; color: #0a0a0a; background: var(--light); position: relative; overflow: hidden; }
.badge::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 255, 255, 0.7) 50%, transparent 65%); background-size: 250% 100%; animation: sheen 2.8s linear infinite; }
.badge.hot { background: linear-gradient(90deg, #ff5f6d, #ffc371); }
.badge.new { background: linear-gradient(90deg, var(--p3), #a6ffcb); }
.badge.viral { background: linear-gradient(90deg, var(--p1), var(--p4)); color: #fff; }
.badge.agentic { background: var(--prism); }
.badge.soon { background: rgba(255, 255, 255, 0.1); color: var(--dim); }
.badge.soon::after { display: none; }
.badge.pro, .badge.gold { background: linear-gradient(180deg, #ffe08a, var(--gold2)); color: #1b1200; }
.badge.zine { background: var(--white); }

label { display: block; margin: 14px 0 7px; font-size: 0.84rem; color: var(--dim); }
input[type=email], input[type=password], input[type=text], textarea, select {
  width: 100%; padding: 12px 14px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line2); outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, textarea:focus, select:focus { border-color: rgba(255, 226, 184, 0.55); box-shadow: 0 0 0 4px rgba(255, 226, 184, 0.08); }
input[type=range] { width: 100%; accent-color: var(--light); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- pages */
#view { outline: none; min-height: calc(100vh - var(--top)); }
.page { padding: 40px 0 90px; animation: rise .55s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 24px; }
.msg { padding: 11px 14px; border-radius: 12px; font-size: 0.92rem; margin: 14px 0 0; border: 1px solid var(--line2); }
.msg.bad { color: var(--bad); border-color: rgba(255, 122, 107, 0.35); background: rgba(255, 122, 107, 0.06); }
.msg.good { color: var(--good); border-color: rgba(143, 240, 164, 0.3); background: rgba(143, 240, 164, 0.05); }
.section { margin-top: 54px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); line-height: 1; }
.section-head a { color: var(--dim); font-size: 0.9rem; }
.section-head a:hover { color: var(--white); }

/* generated-art placeholder: a gradient seeded by the id, until a real picture exists */
.art { position: absolute; inset: 0; background: var(--card2); overflow: hidden; }
.art > img, .art > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.85)); pointer-events: none; }

/* ---------------------------------------------------------------- explore: hero carousel */
.hero { position: relative; display: grid; grid-template-columns: 2fr 1fr; gap: 12px; margin-top: 18px; }
.slides { position: relative; height: min(56vh, 520px); min-height: 380px; border-radius: 26px; overflow: hidden; border: 1px solid var(--line); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s var(--ease); display: flex; align-items: end; }
.slide.on { opacity: 1; }
.slide.on .art > img { transform: scale(1.04); }
.slide .copy { position: relative; z-index: 2; padding: 34px; max-width: 640px; }
.slide h1 { font-size: clamp(2.6rem, 6vw, 5.2rem); line-height: 0.88; margin: 12px 0 12px; }
.slide p { color: #d6d6d2; font-size: 1.05rem; max-width: 480px; margin-bottom: 20px; }
.dots { position: absolute; z-index: 3; right: 24px; bottom: 24px; display: flex; gap: 6px; }
.dots button { width: 22px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, 0.25); transition: all .4s var(--ease); }
.dots button.on { width: 40px; background: var(--white); }
.hero-side { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; }
.side-card { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line); min-height: 180px; display: flex; align-items: end; transition: transform .5s var(--ease), border-color .3s; }
.side-card:hover { transform: translateY(-3px); border-color: var(--line2); }
.side-card:hover .art > img { transform: scale(1.06); }
.side-card .copy { position: relative; z-index: 2; padding: 20px; }
.side-card h3 { font-size: 1.7rem; line-height: 0.95; margin: 8px 0 4px; }

/* live ticker */
.ticker { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--bg2); }
.ticker-track { display: flex; gap: 40px; width: max-content; padding: 11px 0; animation: marquee 40s linear infinite; font: 0.82rem var(--mono); color: var(--dim); white-space: nowrap; }
.ticker-track b { color: var(--white); font-weight: 400; }
.ticker-track span::before { content: "✦"; margin-right: 10px; color: var(--gold); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* tool cards */
.tools { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.tool { position: relative; aspect-ratio: 4 / 5; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); display: flex; align-items: end; isolation: isolate; transition: transform .5s var(--ease), border-color .3s, box-shadow .4s; }
.tool:hover { transform: translateY(-4px); border-color: rgba(255, 226, 184, 0.35); box-shadow: 0 30px 60px -30px rgba(255, 180, 90, 0.45); }
.tool:hover .art > img { transform: scale(1.07); }
.tool::before { content: ""; position: absolute; inset: 0; z-index: 3; background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.14) 50%, transparent 60%); background-size: 250% 100%; background-position: 150% 0; transition: background-position 0s; pointer-events: none; }
.tool:hover::before { background-position: -100% 0; transition: background-position 1s var(--ease); }
.tool .copy { position: relative; z-index: 2; padding: 16px; }
.tool h3 { font-size: 1.45rem; line-height: 1; margin-top: 8px; }
.tool p { color: #c9c9c5; font-size: 0.86rem; margin-top: 4px; }
.tool .top-badge { position: absolute; z-index: 2; top: 12px; left: 12px; }
.tool.soon { filter: saturate(0.5); }
.tool.soon:hover { filter: none; }

/* effects row */
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(180px, 210px); gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.fx { position: relative; aspect-ratio: 3 / 4; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); display: flex; align-items: end; scroll-snap-align: start; transition: transform .45s var(--ease), border-color .3s; }
.fx:hover { transform: translateY(-4px) rotate(-0.4deg); border-color: var(--line2); }
.fx:hover .art > img { transform: scale(1.08); }
.fx .copy { position: relative; z-index: 2; padding: 14px; width: 100%; }
.fx h4 { font-size: 1.2rem; line-height: 1.05; }
.fx .top-badge { position: absolute; z-index: 2; top: 10px; left: 10px; }
.effects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }

.models-row { display: flex; flex-wrap: wrap; gap: 8px; }
.model-chip { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); transition: border-color .2s, transform .3s var(--ease); }
.model-chip:hover { border-color: var(--line2); transform: translateY(-2px); }
.model-chip b { color: var(--white); }
.model-chip .c { font: 0.76rem var(--mono); color: var(--gold); }

/* community masonry */
.masonry { columns: 5 220px; column-gap: 12px; }
.shot { position: relative; break-inside: avoid; margin: 0 0 12px; border-radius: 16px; overflow: hidden; background: var(--card); border: 1px solid var(--line); cursor: zoom-in; animation: rise .6s var(--ease); }
.shot img, .shot video { width: 100%; height: auto; transition: transform .7s var(--ease); }
.shot:hover img, .shot:hover video { transform: scale(1.03); }
.shot .cap { position: absolute; inset: auto 0 0 0; padding: 28px 12px 10px; font-size: 0.8rem; color: #ddd; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); opacity: 0; transition: opacity .25s; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.shot:hover .cap { opacity: 1; }
.shot .play { position: absolute; top: 10px; right: 10px; z-index: 2; }
.shot.pending { display: grid; place-items: center; cursor: default; background: radial-gradient(circle at 50% 50%, rgba(255, 226, 184, 0.12), var(--card) 70%); }
.shot.pending::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.07) 50%, transparent 70%); background-size: 220% 100%; animation: sheen 1.4s linear infinite; }
.shot.pending .orb { width: 38px; height: 38px; border-radius: 50%; background: radial-gradient(circle, #fff 0 20%, var(--light) 45%, transparent 72%); animation: breathe 1.6s ease-in-out infinite; }
.shot.pending .state { position: absolute; bottom: 10px; left: 12px; font: 0.72rem var(--mono); color: var(--dim); letter-spacing: 0.06em; }
.empty { display: grid; place-items: center; text-align: center; min-height: 40vh; color: var(--dim); border: 1px dashed var(--line2); border-radius: 22px; padding: 30px; }
.empty h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 8px; }
.footer { border-top: 1px solid var(--line); margin-top: 80px; padding: 28px 0 40px; color: var(--dim2); font-size: 0.86rem; }

/* ---------------------------------------------------------------- create workspace (image / video / edit) */
.ws { display: grid; grid-template-columns: 320px 1fr; min-height: calc(100vh - var(--top)); }
.panel { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 18px 16px 30px; border-right: 1px solid var(--line); background: var(--bg2); scrollbar-width: thin; }
.panel h4 { margin: 20px 4px 10px; font: 0.7rem var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); font-weight: 400; }
.panel h4:first-child { margin-top: 2px; }
.models { display: grid; gap: 6px; }
.model { position: relative; text-align: left; padding: 11px 12px; border-radius: 14px; border: 1px solid transparent; transition: background .2s, border-color .2s; }
.model:hover { background: rgba(255, 255, 255, 0.03); }
.model.on { background: var(--card2); border-color: var(--line2); box-shadow: inset 3px 0 0 var(--light); }
.model .name { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--white); font-weight: 700; font-size: 0.95rem; }
.model .sub { display: block; color: var(--dim); font-size: 0.8rem; margin-top: 2px; }
.model .c { font: 0.74rem var(--mono); color: var(--gold); font-weight: 400; white-space: nowrap; }
.model.locked { opacity: 0.6; }
.model .lock { font: 0.66rem var(--mono); color: var(--gold); letter-spacing: .06em; text-transform: uppercase; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border-radius: 10px; border: 1px solid var(--line); font: 0.8rem var(--mono); color: var(--dim); transition: all .2s; }
.chip:hover { color: var(--white); border-color: var(--line2); }
.chip.on { color: var(--bg); background: var(--white); border-color: var(--white); }
.chip .shape { border: 1.5px solid currentColor; border-radius: 2px; }
.chip.disabled { opacity: .35; pointer-events: none; }
.panel .note { margin: 18px 4px 0; font-size: 0.78rem; color: var(--dim2); line-height: 1.5; }
.drop { position: relative; display: grid; place-items: center; min-height: 170px; border: 1.5px dashed var(--line2); border-radius: 16px; text-align: center; color: var(--dim); cursor: pointer; overflow: hidden; transition: border-color .2s, background .2s; }
.drop:hover, .drop.over { border-color: var(--light); background: rgba(255, 226, 184, 0.04); }
.drop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.drop input { display: none; }

.canvas { position: relative; min-width: 0; padding: 18px 22px 240px; }
.canvas-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.canvas-head h1 { font-size: 1.9rem; line-height: 1; }
.gallery { columns: 4 240px; column-gap: 12px; }

.composer { position: fixed; z-index: 60; left: calc(320px + 22px); right: 22px; bottom: 18px; margin-inline: auto; max-width: 900px;
  padding: 12px; border-radius: 24px; background: rgba(16, 16, 18, 0.82); border: 1px solid var(--line2); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.95), 0 0 70px -30px rgba(255, 200, 140, 0.3); transition: box-shadow .4s; }
.composer:focus-within { box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.95), 0 0 90px -20px rgba(255, 200, 140, 0.45); }
.composer textarea { min-height: 56px; max-height: 220px; resize: none; border: 0; background: transparent; padding: 8px 10px; box-shadow: none; line-height: 1.5; }
.composer textarea:focus { box-shadow: none; }
.composer .bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
.composer .meta { display: flex; gap: 6px; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.composer .meta .chip { white-space: nowrap; }
.fx-bar { display: flex; gap: 6px; overflow-x: auto; padding: 0 2px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.fx-pill { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px 0 4px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.82rem; color: var(--dim); transition: all .2s; }
.fx-pill i { width: 24px; height: 24px; border-radius: 50%; background-size: cover; background-position: center; }
.fx-pill:hover { color: var(--white); border-color: var(--line2); }
.fx-pill.on { color: var(--bg); background: var(--white); border-color: var(--white); }
.go { min-width: 150px; overflow: hidden; }
.go::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255, 226, 184, 0.45) 50%, transparent 65%); background-size: 250% 100%; animation: sheen 3s linear infinite; pointer-events: none; mix-blend-mode: multiply; }

/* ---------------------------------------------------------------- agent */
.agent { display: grid; grid-template-rows: 1fr auto; height: calc(100vh - var(--top)); max-width: 980px; margin: 0 auto; padding: 0 16px; }
.agent.with-promo { height: calc(100vh - var(--top) - 34px); }
.thread { overflow-y: auto; padding: 30px 0 20px; display: flex; flex-direction: column; gap: 18px; scrollbar-width: thin; }
.bubble { max-width: 80%; padding: 13px 16px; border-radius: 18px; line-height: 1.55; animation: rise .45s var(--ease); white-space: pre-wrap; word-break: break-word; }
.bubble.me { align-self: flex-end; background: var(--white); color: var(--bg); border-bottom-right-radius: 6px; }
.bubble.ai { align-self: flex-start; background: var(--card2); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.ai-block { align-self: stretch; display: grid; gap: 10px; animation: rise .45s var(--ease); }
.plan { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.plan-card { position: relative; border: 1px solid var(--line); border-radius: 16px; background: var(--card); overflow: hidden; }
.plan-card .media { position: relative; aspect-ratio: 1; background: var(--card2); }
.plan-card .media img, .plan-card .media video { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.plan-card .info { padding: 10px 12px; font-size: 0.8rem; color: var(--dim); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.agent-hero { text-align: center; margin: auto 0; padding: 40px 0; }
.agent-hero h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: .9; margin: 14px 0; }
.suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.suggest button { padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line2); color: var(--fg); font-size: 0.88rem; transition: all .2s; }
.suggest button:hover { border-color: var(--light); background: rgba(255, 226, 184, 0.05); }
.agent-input { position: relative; margin-bottom: 16px; }
.agent-input .composer { position: static; max-width: none; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--dim); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 50% { opacity: .2; } }

/* ---------------------------------------------------------------- pricing */
.price-hero { text-align: center; padding: 30px 0 10px; }
.price-hero h1 { font-size: clamp(3rem, 8vw, 6.6rem); line-height: 0.86; margin: 14px 0; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; align-items: stretch; }
.plan-tier { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 26px 22px; border-radius: 24px; background: var(--card); border: 1px solid var(--line); isolation: isolate; transition: transform .5s var(--ease); }
.plan-tier:hover { transform: translateY(-4px); }
.plan-tier h3 { font-size: 2rem; line-height: 1; }
.plan-tier .price { font: 700 3.2rem/0.9 var(--display); color: var(--white); }
.plan-tier .price small { font: 0.9rem var(--sans); color: var(--dim); font-weight: 400; margin-left: 4px; }
.plan-tier .credits { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255, 207, 90, 0.07); border: 1px solid rgba(255, 207, 90, 0.18); }
.plan-tier .credits b { font: 700 1.6rem/1 var(--display); color: var(--gold); }
.plan-tier ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 0.9rem; color: #cfcfcb; }
.plan-tier li::before { content: "✦"; color: var(--light); margin-right: 8px; }
.plan-tier .grow { flex: 1; }
.plan-tier .ribbon { position: absolute; top: -11px; left: 22px; }
.plan-tier.plus { border-color: transparent; }
.plan-tier.plus::before { content: ""; position: absolute; inset: -1.5px; z-index: -2; border-radius: 25px; background: conic-gradient(from var(--a, 0deg), var(--p1), var(--p2), var(--p3), var(--p4), var(--p1)); animation: spin-a 5s linear infinite; }
.plan-tier.plus::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 24px; background: linear-gradient(180deg, #17141c, var(--card) 60%); }
.plan-tier.ultra { background: radial-gradient(120% 80% at 50% 0%, rgba(255, 207, 90, 0.16), var(--card) 60%); border-color: rgba(255, 207, 90, 0.35); box-shadow: 0 30px 80px -40px rgba(255, 170, 40, 0.6); }
.plan-tier.ultra h3 { background: linear-gradient(180deg, #fff3c8, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.plan-tier.current { outline: 2px solid var(--good); outline-offset: 3px; }
.worth { font: 0.78rem var(--mono); color: var(--dim); }
.compare { margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* ---------------------------------------------------------------- account */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 26px; }
.stat { font: 700 3.2rem/1 var(--display); color: var(--gold); }
.list { margin: 12px 0 0; padding: 0; list-style: none; }
.list li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.list li:last-child { border-bottom: 0; }
.plus-n { color: var(--good); font-family: var(--mono); }
.minus-n { color: var(--dim); font-family: var(--mono); }

/* ---------------------------------------------------------------- teaser (ZINE, soon) */
.teaser { position: relative; min-height: calc(100vh - var(--top) - 34px); display: grid; place-items: center; text-align: center; overflow: hidden; padding: 40px 16px; }
.teaser h1 { font-size: clamp(4.5rem, 17vw, 13rem); line-height: 0.8; letter-spacing: -0.03em; }
.teaser .lead { color: var(--dim); max-width: 560px; margin: 18px auto 26px; font-size: 1.1rem; }
.pages-fan { position: absolute; inset: 0; pointer-events: none; opacity: .5; }
.pages-fan i { position: absolute; left: 50%; top: 50%; width: 240px; height: 320px; margin: -160px 0 0 -120px; border-radius: 10px; border: 1px solid var(--line2); background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), transparent); transform-origin: 50% 120%; animation: fan 8s var(--ease) infinite alternate; }
.pages-fan i:nth-child(1) { --r: -22deg; } .pages-fan i:nth-child(2) { --r: -8deg; } .pages-fan i:nth-child(3) { --r: 8deg; } .pages-fan i:nth-child(4) { --r: 22deg; }
@keyframes fan { from { transform: rotate(0); } to { transform: rotate(var(--r)) translateY(-10px); } }

/* ---------------------------------------------------------------- modal (sign up / in) */
.modal { position: fixed; z-index: 250; inset: 0; display: flex; overflow-y: auto; overscroll-behavior: contain; padding: 16px; background: rgba(0, 0, 0, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; } }
.modal-box { position: relative; display: grid; grid-template-columns: 1fr 1fr; width: min(860px, 100%); margin: auto; border-radius: 26px; overflow: hidden; background: var(--card); border: 1px solid var(--line2); box-shadow: 0 50px 120px -30px #000; animation: pop .5s var(--spring); }
@keyframes pop { from { opacity: 0; transform: scale(0.94) translateY(10px); } }
.modal-art { position: relative; min-height: 460px; display: flex; align-items: end; }
.modal-art .copy { position: relative; z-index: 2; padding: 26px; }
.modal-art h2 { font-size: 2.6rem; line-height: 0.9; margin-bottom: 10px; }
.modal-form { padding: 30px 28px; }
.modal-form h2 { font-size: 2rem; margin-bottom: 4px; }
.modal-close { position: absolute; z-index: 3; top: 12px; right: 12px; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 0, 0, 0.5); color: var(--white); }
.switch { margin-top: 18px; font-size: 0.88rem; color: var(--dim); }

/* ---------------------------------------------------------------- lightbox */
.lightbox { position: fixed; z-index: 240; inset: 0; display: grid; grid-template-columns: 1fr 360px; background: rgba(3, 3, 3, 0.94); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade .25s ease; }
.lightbox .stage { display: grid; place-items: center; padding: 28px; min-height: 0; min-width: 0; }
.lightbox .stage img, .lightbox .stage video { max-height: calc(100vh - 56px); max-width: 100%; width: auto; border-radius: 14px; box-shadow: 0 40px 120px -40px #000; }
.lightbox aside { border-left: 1px solid var(--line); padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; background: var(--bg2); }
.lightbox .prompt { color: var(--fg); font-size: 0.95rem; white-space: pre-wrap; word-break: break-word; }
.lightbox dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 0.86rem; }
.lightbox dt { color: var(--dim); }
.lightbox dd { margin: 0; color: var(--fg); font-family: var(--mono); font-size: 0.8rem; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); font-size: 0.88rem; cursor: pointer; }
.toggle input { width: 38px; height: 22px; appearance: none; border-radius: 999px; background: var(--line2); position: relative; cursor: pointer; transition: background .2s; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); transition: transform .3s var(--spring); }
.toggle input:checked { background: var(--good); }
.toggle input:checked::after { transform: translateX(16px); }

/* ---------------------------------------------------------------- toasts and sparkles */
.toasts { position: fixed; z-index: 300; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; width: min(440px, 100% - 32px); pointer-events: none; }
.toast { padding: 12px 16px; border-radius: 14px; background: #1a1a1c; border: 1px solid var(--line2); color: var(--fg); font-size: 0.92rem; box-shadow: 0 20px 50px -20px #000; animation: rise .4s var(--ease); pointer-events: auto; }
.toast.bad { border-color: rgba(255, 122, 107, 0.4); }
.toast.good { border-color: rgba(143, 240, 164, 0.35); }
.toast .btn { margin-left: 10px; }
.fx-layer { position: fixed; inset: 0; z-index: 350; pointer-events: none; overflow: hidden; }
.spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; animation: spark .9s var(--ease) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)) scale(0.2); opacity: 0; } }
.float-n { position: absolute; font: 700 1rem var(--mono); color: var(--gold); text-shadow: 0 0 12px rgba(255, 170, 40, 0.8); animation: floatup 1.2s var(--ease) forwards; }
@keyframes floatup { to { transform: translateY(-40px); opacity: 0; } }

/* ---------------------------------------------------------------- smaller screens */
@media (max-width: 1200px) {
  .tools { grid-template-columns: repeat(3, 1fr); }
  .plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 980px) {
  .top { grid-template-columns: auto auto; grid-template-rows: var(--top) 44px; height: auto; row-gap: 0; }
  .tabs { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; margin: 0 -18px; padding: 0 12px 6px; }
  .top-right { justify-self: end; }
  .hero { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .ws { grid-template-columns: 1fr; }
  .panel { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .models { grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); overflow-x: auto; padding-bottom: 4px; }
  .composer { left: 10px; right: 10px; bottom: 10px; }
  .canvas { padding: 14px 12px 250px; }
  .gallery, .masonry { columns: 2 150px; column-gap: 8px; }
  .shot { margin-bottom: 8px; }
  .lightbox { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .lightbox aside { border-left: 0; border-top: 1px solid var(--line); max-height: 48vh; }
  .modal-box { grid-template-columns: 1fr; }
  .modal-art { min-height: 160px; }
  .grid2, .compare { grid-template-columns: 1fr; }
  .agent { height: calc(100vh - var(--top) - 44px); }
}
@media (max-width: 600px) {
  .promo-text { display: none; }
  .tools { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .hero-side { grid-template-columns: 1fr; }
  .slide .copy { padding: 22px; }
  .composer .meta { display: none; }
  .composer .bar { justify-content: flex-end; }
  .top-right .upgrade-label { display: none; }
  .bubble { max-width: 92%; }
}
@media (max-height: 720px) and (max-width: 980px) { .modal-art { display: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
