@font-face { font-family: 'Unageo'; src: url('fonts/unageo.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('fonts/jetbrains-mono-latin-wght-normal.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'DM Sans'; src: url('fonts/dm-sans-latin-wght-normal.woff2') format('woff2'); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Schibsted Grotesk'; src: url('fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 400 900; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('fonts/space-grotesk-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Cormorant'; src: url('fonts/cormorant-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Manrope'; src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

/* Catppuccin Latte */
:root, [data-theme="light"] {
    --base: #eff1f5; --mantle: #e6e9ef; --crust: #dce0e8;
    --text: #4c4f69; --subtext1: #5c5f77; --subtext0: #6c6f85;
    --overlay1: #8c8fa1; --overlay0: #9ca0b0;
    --surface2: #acb0be; --surface1: #bcc0cc; --surface0: #ccd0da;
    --card: #f6f7fa;
    --mauve: #8839ef; --pink: #ea76cb; --green: #40a02b; --peach: #fe640b;
    --yellow: #df8e1d; --teal: #179299; --blue: #1e66f5; --red: #d20f39; --flamingo: #dd7878;
    --on-accent: #ffffff;
    --shadow: 0 1px 2px rgba(76, 79, 105, .06), 0 8px 24px -12px rgba(76, 79, 105, .18);
}
/* Catppuccin Mocha */
[data-theme="dark"] {
    --base: #1e1e2e; --mantle: #181825; --crust: #11111b;
    --text: #cdd6f4; --subtext1: #bac2de; --subtext0: #a6adc8;
    --overlay1: #7f849c; --overlay0: #6c7086;
    --surface2: #585b70; --surface1: #45475a; --surface0: #313244;
    --card: #232334;
    --mauve: #cba6f7; --pink: #f5c2e7; --green: #a6e3a1; --peach: #fab387;
    --yellow: #f9e2af; --teal: #94e2d5; --blue: #89b4fa; --red: #f38ba8; --flamingo: #f2cdcd;
    --on-accent: #1e1e2e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px -14px rgba(0, 0, 0, .6);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    background: var(--base); color: var(--text);
    line-height: 1.6; -webkit-font-smoothing: antialiased;
    min-height: 100vh; overflow-x: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; }
button:disabled { cursor: default; }
:focus-visible { outline: 2px solid var(--mauve); outline-offset: 2px; border-radius: 6px; }
svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* header */
.top {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; gap: 24px;
    height: 60px; padding: 0 24px;
    background: color-mix(in srgb, var(--base) 88%, transparent);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--surface0);
}
.brand { display: flex; align-items: baseline; gap: 2px; text-decoration: none; }
.wordmark { font-family: 'Unageo', sans-serif; font-weight: 600; font-size: 22px; color: var(--flamingo); letter-spacing: -.01em; }
.slash { font-weight: 600; color: var(--mauve); font-size: 15px; }
.stepper { list-style: none; display: flex; gap: 4px; margin: 0 auto; counter-reset: s; }
.stepper li {
    counter-increment: s; font-size: 12px; color: var(--overlay1);
    padding: 4px 10px; border-radius: 999px; white-space: nowrap;
    transition: background .3s, color .3s;
}
.stepper li::before { content: counter(s) " "; opacity: .6; }
.stepper li.done { color: var(--subtext0); }
.stepper li.done::before { content: "\2713  "; color: var(--green); opacity: 1; }
.stepper li.now { background: var(--surface0); color: var(--text); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.stage-mobile { display: none; font-size: 12px; color: var(--subtext0); }
.icon-btn {
    width: 36px; height: 36px; display: grid; place-items: center;
    border: 1px solid var(--surface0); border-radius: 10px; color: var(--subtext1);
}
.icon-btn:hover { border-color: var(--surface2); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
[data-theme="light"] .i-sun, [data-theme="dark"] .i-moon { display: none; }
.ghost-btn {
    font-size: 12px; padding: 7px 12px; border-radius: 10px;
    border: 1px solid var(--surface0); color: var(--subtext1);
}
.ghost-btn:hover { border-color: var(--surface2); color: var(--text); }
.work-btn {
    display: none; align-items: center; gap: 6px; font-size: 12px;
    height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--surface0);
}
.work-btn svg { width: 16px; height: 16px; }
.work-count {
    min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: var(--surface0); font-size: 11px; display: grid; place-items: center;
}
.work-btn.ping .work-count { background: var(--mauve); color: var(--on-accent); }

/* layout */
.layout {
    display: grid; grid-template-columns: minmax(0, 1fr) 400px;
    max-width: 1320px; margin: 0 auto; gap: 32px; padding: 0 24px;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
}
.chat-col { display: flex; flex-direction: column; min-height: 0; max-width: 780px; width: 100%; justify-self: center; }
.chat { flex: 1; overflow-y: auto; padding: 28px 4px 12px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; scrollbar-width: thin; }

.msg { display: flex; gap: 10px; max-width: 92%; animation: rise .35s ease both; }
.msg.ai { align-self: flex-start; }
.msg.me { align-self: flex-end; }
.avatar {
    flex: none; width: 30px; height: 30px; border-radius: 9px; margin-top: 2px;
    display: grid; place-items: center; background: var(--surface0); color: var(--mauve);
    font-weight: 700; font-size: 13px;
}
.bubble { padding: 11px 15px; border-radius: 14px; font-size: 14px; line-height: 1.65; }
.ai .bubble { background: var(--card); border: 1px solid var(--surface0); border-top-left-radius: 4px; }
.me .bubble { background: var(--mauve); color: var(--on-accent); border-top-right-radius: 4px; }
.bubble .w { animation: fadein .25s ease both; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--overlay0); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
.note {
    align-self: center; font-size: 12px; color: var(--subtext0);
    display: flex; align-items: center; gap: 8px; padding: 4px 12px;
    border: 1px dashed var(--surface1); border-radius: 999px; animation: rise .35s ease both;
}
.note .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mauve); animation: pulse 1.4s infinite; }
.note.done .dot { background: var(--green); animation: none; }

/* cards inside the chat */
.card {
    margin-left: 40px; background: var(--card); border: 1px solid var(--surface0);
    border-radius: 16px; padding: 16px; box-shadow: var(--shadow); animation: rise .4s ease both;
}
.card-title { font-size: 12px; color: var(--subtext0); margin-bottom: 12px; display: flex; justify-content: space-between; gap: 12px; }
.card-title b { color: var(--text); font-weight: 600; }

.finding {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 12px; border: 1px solid var(--surface0); border-radius: 12px; background: var(--base);
}
.finding + .finding { margin-top: 8px; }
.finding p { font-size: 13px; }
.finding small { display: block; font-size: 11px; color: var(--overlay1); }
.yn { display: flex; gap: 6px; flex: none; }
.yn button {
    font-size: 12px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--surface1);
}
.yn button:hover:not(:disabled) { border-color: var(--mauve); }
.yn button[aria-pressed="true"] { background: var(--text); color: var(--base); border-color: var(--text); }
.yn button:disabled:not([aria-pressed="true"]) { opacity: .4; }

/* design catalog */
.catalog { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.style-opt {
    text-align: left; border: 1px solid var(--surface0); border-radius: 14px; padding: 8px;
    background: var(--base); transition: border-color .2s, transform .2s;
}
.style-opt:hover:not(:disabled) { border-color: var(--mauve); transform: translateY(-2px); }
.style-opt[aria-pressed="true"] { border-color: var(--mauve); box-shadow: 0 0 0 2px var(--mauve); }
.style-opt:disabled:not([aria-pressed="true"]) { opacity: .45; }
.style-meta { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 4px 2px; gap: 8px; }
.style-meta b { font-size: 13px; }
.style-meta span { font-size: 11px; color: var(--overlay1); text-align: right; }
.swatches { display: flex; gap: 4px; padding: 0 4px 4px; }
.swatches i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid rgba(0, 0, 0, .08); }

.mini {
    --b: #f7f1e8; --t: #2b211b; --a: #b4532a; --s: #ece2d3; --hf: 'Fraunces'; --bf: 'DM Sans'; --hw: 600;
    background: var(--b); color: var(--t); border-radius: 9px; overflow: hidden;
    aspect-ratio: 16 / 10; padding: 9px 11px; display: flex; flex-direction: column; font-family: var(--bf), sans-serif;
}
.mini-nav { display: flex; justify-content: space-between; font-size: 7px; opacity: .8; }
.mini-nav b { font-family: var(--hf), serif; font-size: 9px; font-weight: var(--hw); opacity: 1; }
.mini-body { flex: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 8px; align-items: center; }
.mini h4 { font-family: var(--hf), serif; font-weight: var(--hw); font-size: 15px; line-height: 1.05; letter-spacing: -.01em; }
.mini p { font-size: 6.5px; line-height: 1.4; opacity: .75; margin-top: 4px; }
.mini .pill { display: inline-block; margin-top: 6px; background: var(--a); color: var(--b); font-size: 6px; padding: 3px 7px; border-radius: 99px; }
.mini svg { width: 100%; height: auto; }

/* styles shared by mini previews and the live site */
[data-style="kiln"]     { --b: #f7f1e8; --t: #2b211b; --a: #b4532a; --s: #ece0cf; --g: #5d7a6e; --hf: 'Fraunces'; --bf: 'DM Sans'; --hw: 560; }
[data-style="glaze"]    { --b: #edf1ec; --t: #1d2a24; --a: #3f6b5a; --s: #dbe5dc; --g: #c48a4a; --hf: 'Instrument Serif'; --bf: 'Schibsted Grotesk'; --hw: 400; }
[data-style="workshop"] { --b: #1d1b1a; --t: #f2ebe3; --a: #e8834f; --s: #2c2927; --g: #9fb7a8; --hf: 'Space Grotesk'; --bf: 'JetBrains Mono'; --hw: 650; }
[data-style="quiet"]    { --b: #f5f0ea; --t: #3b3430; --a: #8a6650; --s: #e9e0d6; --g: #9aa596; --hf: 'Cormorant'; --bf: 'Manrope'; --hw: 600; }

/* estimate and plan */
.estimate { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.est-list { list-style: none; font-size: 13px; }
.est-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed var(--surface0); }
.est-list li span:first-child { color: var(--subtext0); }
.est-list li span:last-child { text-align: right; }
.tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--mauve) 14%, transparent); color: var(--mauve); }
.plan-box {
    border: 1px solid var(--mauve); border-radius: 14px; padding: 14px;
    background: color-mix(in srgb, var(--mauve) 5%, var(--base));
    display: flex; flex-direction: column; gap: 8px;
}
.plan-box h4 { font-family: 'Unageo', sans-serif; font-size: 20px; font-weight: 600; line-height: 1.1; }
.plan-box ul { list-style: none; font-size: 12.5px; color: var(--subtext1); display: grid; gap: 4px; }
.plan-box li::before { content: "+ "; color: var(--mauve); }
.time { font-size: 12px; color: var(--subtext0); }
.time b { font-family: 'Unageo', sans-serif; font-size: 30px; color: var(--text); font-weight: 600; margin-right: 4px; }
.later { margin-top: 10px; font-size: 12px; color: var(--overlay1); }

/* build progress */
.bar { height: 6px; border-radius: 99px; background: var(--surface0); overflow: hidden; margin: 4px 0 10px; }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--mauve), var(--pink)); transition: width .6s ease; }
.build-line { font-size: 12.5px; color: var(--subtext1); min-height: 1.6em; }

/* live */
.browser { border: 1px solid var(--surface1); border-radius: 14px; overflow: hidden; background: var(--mantle); }
.browser-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--surface0); }
.dots { display: flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--surface1); }
.dots i:first-child { background: var(--flamingo); }
.url {
    flex: 1; min-width: 0; font-size: 12px; padding: 4px 10px; border-radius: 8px; background: var(--base);
    display: flex; align-items: center; gap: 6px; color: var(--subtext1); white-space: nowrap; overflow: hidden;
}
.url svg { width: 12px; height: 12px; color: var(--green); flex: none; }
.url b { color: var(--text); font-weight: 600; }
.live-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.live-actions .meta { font-size: 11.5px; color: var(--overlay1); margin-left: auto; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--green); }
.live-badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 25%, transparent); }

/* generated site */
.gen {
    background: var(--b); color: var(--t); font-family: var(--bf), sans-serif;
    height: 420px; overflow-y: auto; scrollbar-width: thin; font-size: 13px; line-height: 1.55;
    transition: background .4s, color .4s;
}
.gen.tall { height: 620px; }
.gen-nav { display: flex; justify-content: space-between; align-items: center; padding: 16px 26px; }
.gen-logo { display: flex; align-items: center; gap: 8px; font-family: var(--hf), serif; font-weight: var(--hw); font-size: 19px; }
.gen-logo svg { width: 22px; height: 22px; stroke: var(--a); }
.gen-nav nav { display: flex; gap: 18px; font-size: 12px; opacity: .85; }
.gen-hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; align-items: center; padding: 18px 26px 28px; }
.gen-hero .kicker { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--a); }
.gen-hero h1 { font-family: var(--hf), serif; font-weight: var(--hw); font-size: 40px; line-height: 1.02; letter-spacing: -.015em; margin: 8px 0 10px; transition: font-size .4s; }
.gen.big-head .gen-hero h1 { font-size: 52px; }
.gen-hero p { opacity: .8; max-width: 34ch; }
.gen-btn { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; background: var(--a); color: var(--b); padding: 9px 16px; border-radius: 99px; font-size: 12.5px; font-weight: 600; }
.gen-btn svg { width: 15px; height: 15px; }
.gen-art { background: var(--s); border-radius: 18px; aspect-ratio: 1 / .9; display: grid; place-items: center; }
.gen-art svg { width: 86%; height: auto; stroke: none; }
.gen-sec { padding: 22px 26px; border-top: 1px solid color-mix(in srgb, var(--t) 12%, transparent); }
.gen-sec h2 { font-family: var(--hf), serif; font-weight: var(--hw); font-size: 24px; margin-bottom: 12px; }
.classes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.class { border: 1px solid color-mix(in srgb, var(--t) 15%, transparent); border-radius: 12px; padding: 12px; transition: background .4s, color .4s; }
.class b { display: block; font-family: var(--hf), serif; font-weight: var(--hw); font-size: 18px; }
.class span { font-size: 11.5px; opacity: .75; }
.class em { display: block; margin-top: 6px; font-style: normal; font-size: 11.5px; color: var(--a); font-weight: 600; }
.gen.loud-classes .class { background: var(--a); color: var(--b); border-color: var(--a); }
.gen.loud-classes .class em { color: var(--b); }
.pieces { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.piece { background: var(--s); border-radius: 12px; aspect-ratio: 1; display: grid; place-items: center; }
.piece svg { width: 70%; stroke: none; }
.piece-cap { font-size: 11.5px; margin-top: 4px; display: flex; justify-content: space-between; }
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; font-size: 12.5px; }
.visit dt { font-weight: 600; }
.visit dd { opacity: .8; margin-bottom: 8px; }
.gen-foot { padding: 16px 26px 22px; font-size: 11px; opacity: .6; display: flex; justify-content: space-between; }

/* composer */
.composer { padding: 10px 0 18px; border-top: 1px solid var(--surface0); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chips:empty { display: none; }
.chips .label { width: 100%; font-size: 11px; color: var(--overlay1); }
.chip {
    font-size: 13px; text-align: left; padding: 9px 13px; border-radius: 12px;
    border: 1px solid var(--surface1); background: var(--card); line-height: 1.45;
    transition: border-color .2s, background .2s, transform .2s; animation: rise .3s ease both;
}
.chip:hover { border-color: var(--mauve); transform: translateY(-1px); }
.chip.toggle[aria-pressed="true"] { border-color: var(--mauve); background: color-mix(in srgb, var(--mauve) 12%, var(--card)); }
.chip.toggle::before { content: "\25A1  "; color: var(--overlay1); }
.chip.toggle[aria-pressed="true"]::before { content: "\25A0  "; color: var(--mauve); }
.chip.primary { background: var(--mauve); color: var(--on-accent); border-color: var(--mauve); font-weight: 600; }
.chip.primary:hover { filter: brightness(1.06); }
.input-row { display: flex; gap: 8px; }
.fake-input {
    flex: 1; min-height: 46px; padding: 12px 14px; font-size: 13px; border-radius: 12px;
    background: var(--mantle); border: 1px solid var(--surface0); color: var(--text);
}
.fake-input:empty::before, #fakeText:empty + .caret::after { content: ""; }
.fake-input .caret { display: inline-block; width: 7px; height: 15px; background: var(--mauve); vertical-align: -2px; margin-left: 1px; animation: blink 1s steps(1) infinite; }
.send { width: 46px; border-radius: 12px; background: var(--surface0); color: var(--overlay1); display: grid; place-items: center; }
.send.go { background: var(--mauve); color: var(--on-accent); }
.send svg { width: 18px; height: 18px; }
.hint { font-size: 11px; color: var(--overlay1); margin-top: 8px; }

/* work panel */
.work { overflow-y: auto; padding: 28px 0 24px; scrollbar-width: thin; }
.work-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.work-head h2 { font-family: 'Unageo', sans-serif; font-weight: 600; font-size: 24px; line-height: 1.1; }
.work-head p { font-size: 12px; color: var(--subtext0); margin-top: 4px; }
.work-close { display: none; }
.panel { background: var(--card); border: 1px solid var(--surface0); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; }
.panel h3 { display: flex; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--subtext1); text-transform: lowercase; margin-bottom: 10px; }
.ver { font-weight: 400; color: var(--overlay1); }
.brief div { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 5px 6px; border-radius: 8px; font-size: 12.5px; transition: background .8s; }
.brief dt { color: var(--overlay1); }
.brief dd { color: var(--text); word-break: break-word; }
.brief div.flash { background: color-mix(in srgb, var(--yellow) 22%, transparent); transition: none; }
.brief dd:not(.set) { color: var(--surface2); }
.steps { list-style: none; display: grid; gap: 2px; }
.steps .empty { font-size: 12px; color: var(--overlay1); }
.step { display: grid; grid-template-columns: 20px 1fr; gap: 8px; padding: 6px 0; font-size: 12.5px; animation: rise .3s ease both; }
.step .ic { width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; border: 1.5px solid var(--surface1); position: relative; }
.step.run .ic { border-color: var(--mauve); border-right-color: transparent; animation: spin .8s linear infinite; }
.step.ok .ic { border-color: var(--green); background: var(--green); }
.step.ok .ic::after { content: ""; position: absolute; left: 4.5px; top: 1.5px; width: 4px; height: 8px; border: solid var(--base); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.step .lbl { color: var(--text); }
.step.wait .lbl { color: var(--overlay1); }
.step small { display: block; font-size: 11.5px; color: var(--subtext0); }
.step small code { color: var(--mauve); font-family: inherit; }

.scrim { position: fixed; inset: 0; background: rgba(17, 17, 27, .45); z-index: 40; }

.ribbon {
    position: fixed; right: 14px; bottom: 12px; z-index: 60;
    font-size: 11px; text-decoration: none; color: var(--subtext1);
    background: var(--card); border: 1px solid var(--surface0); border-radius: 999px; padding: 4px 10px;
    box-shadow: var(--shadow);
}
.ribbon:hover { color: var(--mauve); }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes pulse { 50% { transform: scale(.6); opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
    .stepper li { padding: 4px 7px; font-size: 11px; }
    .layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; }
}
@media (max-width: 980px) {
    .stepper { display: none; }
    .stage-mobile { display: inline; margin-right: auto; }
    .top { gap: 12px; padding: 0 14px; }
    .top-actions { flex: 1; }
    .work-btn { display: inline-flex; }
    .layout { grid-template-columns: minmax(0, 1fr); padding: 0 14px; }
    .work {
        position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 82vh;
        background: var(--base); border-radius: 20px 20px 0 0; padding: 18px 16px 24px;
        box-shadow: 0 -10px 40px rgba(17, 17, 27, .25);
        transform: translateY(105%); transition: transform .3s ease; visibility: hidden;
    }
    .work.open { transform: none; visibility: visible; }
    .work-close { display: grid; }
}
@media (max-width: 640px) {
    html { font-size: 14px; }
    .ghost-btn { padding: 7px 9px; }
    .wordmark { font-size: 19px; }
    .slash { display: none; }
    .msg { max-width: 100%; }
    .avatar { display: none; }
    .card { margin-left: 0; padding: 12px; }
    .bubble { font-size: 13.5px; }
    .catalog { gap: 8px; }
    .style-meta { flex-direction: column; gap: 0; }
    .style-meta span { text-align: left; }
    .mini h4 { font-size: 12px; }
    .estimate { grid-template-columns: 1fr; }
    .finding { flex-direction: column; align-items: flex-start; }
    .gen { height: 460px; }
    .gen-nav { padding: 12px 14px; }
    .gen-nav nav { display: none; }
    .gen-hero { grid-template-columns: 1fr; padding: 8px 14px 20px; }
    .gen-hero h1 { font-size: 32px; }
    .gen.big-head .gen-hero h1 { font-size: 40px; }
    .gen-art { aspect-ratio: 16 / 9; }
    .gen-sec { padding: 18px 14px; }
    .classes { grid-template-columns: 1fr; }
    .pieces { grid-template-columns: repeat(2, 1fr); }
    .visit { grid-template-columns: 1fr; }
    .gen-foot { padding: 14px; flex-direction: column; gap: 4px; }
    .live-actions .meta { margin-left: 0; width: 100%; }
    .ribbon { bottom: auto; top: 66px; right: 10px; }
    .chat { padding-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .chat { scroll-behavior: auto; }
}

/* intro and fixes */
.intro { padding: 8px 4px 18px; margin-bottom: 4px; border-bottom: 1px dashed var(--surface0); }
.intro-tag { font-size: 11px; color: var(--overlay1); }
.intro h1 { font-family: 'Unageo', sans-serif; font-weight: 600; font-size: 34px; line-height: 1.08; letter-spacing: -.01em; margin: 6px 0 8px; }
.intro p { font-size: 13px; color: var(--subtext0); max-width: 60ch; }
.intro b { color: var(--mauve); font-weight: 600; }
.ghost-btn { display: inline-flex; align-items: center; gap: 6px; }
.ghost-btn svg { width: 14px; height: 14px; }
.url > span { overflow: hidden; text-overflow: ellipsis; }
.stage-mobile { white-space: nowrap; }
@media (max-width: 640px) {
    .intro h1 { font-size: 26px; }
    #restartBtn { width: 36px; height: 36px; padding: 0; justify-content: center; }
    #restartBtn span { display: none; }
    #restartBtn svg { width: 17px; height: 17px; }
    .ribbon { top: auto; bottom: 10px; right: 10px; }
    .hint { padding-right: 128px; }
}
.style-opt { container-type: inline-size; }
.style-opt .mini { padding: 3cqw 3.6cqw; }
.style-opt .mini-nav { font-size: 2.3cqw; }
.style-opt .mini-nav b { font-size: 2.9cqw; }
.style-opt .mini h4 { font-size: 5.8cqw; }
.style-opt .mini p { font-size: 2.1cqw; margin-top: 1.2cqw; }
.style-opt .mini .pill { font-size: 2cqw; padding: 1cqw 2.3cqw; margin-top: 2cqw; }
.style-opt .mini-body { gap: 2.5cqw; }
@media (max-width: 640px) {
    .hint-more { display: none; }
    .style-meta b { font-size: 12px; }
    .style-meta span { font-size: 10px; }
}
.work { padding-bottom: 56px; }
.gen { position: relative; }
