@layer reset, base, layout, components, responsive;

@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 84px; }
  body, h1, h2, h3, p, ul, ol, figure { margin: 0; }
  button, input, select, textarea { font: inherit; }
  button, a, select { -webkit-tap-highlight-color: transparent; }
  button { color: inherit; }
}

@layer base {
  :root {
    color-scheme: dark;
    --bg: #0b0b10;
    --bg-2: #12121b;
    --bg-3: #191925;
    --ink: #f4f3f7;
    --ink-2: #a9a7b8;
    --ink-3: #74728a;
    --accent: #ff5c38;
    --accent-2: #ffb020;
    --accent-3: #7c5cff;
    --good: #34d399;
    --line: rgb(255 255 255 / 10%);
    --line-strong: rgb(255 255 255 / 18%);
    --radius: 16px;
    --radius-lg: 26px;
    --wrap: 1160px;
    --shadow: 0 24px 60px -24px rgb(0 0 0 / 80%);
  }
  body {
    min-width: 320px;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--ink);
    font: 400 16px/1.6 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
  }
  body:has(dialog[open]) { overflow: hidden; }
  h1, h2, h3, .brand, .section-kicker, .eyebrow { font-family: "Space Grotesk", Inter, system-ui, sans-serif; }
  h1, h2, h3 { text-wrap: balance; }
  a { color: inherit; text-decoration: none; }
  button { cursor: pointer; }
  button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .55; }
  :focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
  ::selection { background: rgb(255 92 56 / 36%); color: white; }
  .wrap { width: min(var(--wrap), calc(100% - 44px)); margin-inline: auto; }
  .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; }
  .skip { position: fixed; z-index: 100; top: 10px; left: 10px; transform: translateY(-160%); border-radius: 9px; padding: 10px 14px; background: var(--ink); color: var(--bg); }
  .skip:focus { transform: none; }
  .muted, .hint { color: var(--ink-2); }
  .small { font-size: 13px; line-height: 1.55; }
}

@layer layout {
  .nav { position: sticky; z-index: 20; top: 0; height: 69px; border-bottom: 1px solid rgb(255 255 255 / 5%); background: rgb(11 11 16 / 84%); backdrop-filter: blur(16px); }
  .nav-inner { display: flex; height: 100%; align-items: center; gap: 26px; }
  .brand { display: inline-flex; align-items: center; gap: 9px; flex: 0 0 auto; font-size: 17px; font-weight: 700; letter-spacing: -.04em; }
  .brand-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: var(--accent); color: #160c10; font: 700 20px/1 "Space Grotesk", sans-serif; letter-spacing: -.1em; }
  .brand-mark span { margin-left: -2px; color: #fff2cf; font-size: 9px; letter-spacing: 0; }
  .nav-links { display: flex; align-items: center; justify-content: center; gap: clamp(14px, 2vw, 29px); margin-inline: auto; color: var(--ink-2); font-size: 14px; }
  .nav-links a, footer nav a { transition: color .18s ease; }
  .nav-links a:hover, footer nav a:hover { color: var(--ink); }
  .nav-actions { display: flex; align-items: center; gap: 12px; }
  .section { padding: 96px 0; }
  .section-head { max-width: 770px; margin: 0 auto 36px; text-align: center; }
  .section-head.row { display: flex; max-width: none; align-items: end; justify-content: space-between; gap: 20px; text-align: left; }
  .section-head h2 { margin: 7px 0 12px; font-size: clamp(32px, 3vw, 43px); line-height: 1.08; letter-spacing: -.04em; }
  .section-head > p:last-child { color: var(--ink-2); }
  .section-kicker { color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .16em; line-height: 1.5; }
  .hero { position: relative; isolation: isolate; overflow: hidden; padding: 91px 0 52px; }
  .hero-glow { position: absolute; z-index: -1; top: 14px; left: 50%; width: min(920px, 95vw); aspect-ratio: 1.8; transform: translateX(-50%); background: radial-gradient(ellipse at 49% 35%, rgb(255 92 56 / 13%), rgb(124 92 255 / 5%) 43%, transparent 73%); pointer-events: none; }
  .hero-inner { position: relative; text-align: center; }
  .eyebrow { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgb(255 92 56 / 22%); border-radius: 999px; padding: 6px 12px; background: rgb(255 92 56 / 6%); color: #ff9a7f; font-size: 11px; font-weight: 600; letter-spacing: .13em; }
  .eyebrow span { color: var(--accent-2); }
  h1 { margin: 22px auto 18px; max-width: 900px; font-size: clamp(42px, 5.12vw, 73.6px); font-weight: 700; line-height: 1.08; letter-spacing: -.055em; }
  h1 span { color: var(--accent); }
  .lede { max-width: 760px; margin: 0 auto 29px; color: var(--ink-2); font-size: 16px; line-height: 1.7; }
  .composer { width: min(780px, 100%); margin: 0 auto; text-align: left; }
  .composer-box { border: 1px solid var(--line-strong); border-radius: 20px; padding: 19px 20px 15px; background: linear-gradient(155deg, rgb(25 25 37 / 95%), rgb(18 18 27 / 96%)); box-shadow: 0 28px 70px -50px rgb(255 92 56 / 46%); }
  .composer textarea { display: block; width: 100%; min-height: 96px; resize: vertical; border: 0; padding: 0; background: transparent; color: var(--ink); font-size: 16px; line-height: 1.6; }
  textarea::placeholder, input::placeholder { color: #777586; opacity: 1; }
  .composer textarea:focus { outline: 0; }
  .composer-tools, .generate-row, .selects, .tool-buttons { display: flex; align-items: center; }
  .composer-tools { min-height: 46px; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
  .tool-buttons { flex-wrap: wrap; gap: 8px; }
  .selects { gap: 8px; }
  .generate-row { justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); margin-top: 13px; padding-top: 14px; }
  .generate-row p { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 12px; }
  .style-picker { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 17px auto 10px; }
  .reference-hint { text-align: center; color: var(--ink-3); font-size: 11px; }
  .badges { display: flex; justify-content: center; gap: 26px; margin: 25px 0 0; padding: 0; color: var(--ink-2); list-style: none; font-size: 12px; }
  .badges span { margin-right: 6px; color: var(--good); }
  .gallery-section { padding-top: 72px; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .style-section { padding: 88px 0 96px; border-top: 1px solid rgb(255 255 255 / 4%); border-bottom: 1px solid rgb(255 255 255 / 4%); background: linear-gradient(180deg, #101017, #0d0d13 48%, #101017); }
  .style-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .platforms { overflow: hidden; padding: 28px 0 8px; text-align: center; }
  .platforms .wrap > p { color: var(--ink-3); font-size: 10px; font-weight: 700; letter-spacing: .17em; }
  .platform-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 35px; padding: 24px 0 16px; color: #858393; font: 600 18px/1 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
  .platform-list span:nth-child(3n + 1) { color: #aaa8b5; }
  .platforms small { display: block; color: var(--ink-3); font-size: 11px; }
  .steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 0; list-style: none; counter-reset: step; }
  .steps li { min-height: 210px; border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; background: var(--bg-2); }
  .step-icon { display: grid; width: 38px; height: 38px; place-items: center; margin-bottom: 18px; border-radius: 12px; background: rgb(255 92 56 / 10%); color: var(--accent); font-size: 20px; }
  .steps h3, .feature-grid h3, .print-grid h3 { margin-bottom: 8px; font-size: 17px; line-height: 1.25; letter-spacing: -.025em; }
  .steps p, .feature-grid p, .print-grid p { color: var(--ink-2); font-size: 13px; line-height: 1.6; }
  .tip { display: flex; align-items: baseline; gap: 14px; margin-top: 18px; border: 1px solid rgb(255 176 32 / 15%); border-radius: 12px; padding: 14px 18px; background: rgb(255 176 32 / 4%); }
  .tip b { flex: 0 0 auto; color: #ffc568; font-size: 13px; }
  .tip p { color: var(--ink-2); font-size: 13px; }
  .feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
  .feature-grid article { min-height: 185px; border: 1px solid var(--line); border-radius: var(--radius); padding: 23px; background: var(--bg-2); }
  .feature-grid article > span { display: inline-block; margin-bottom: 22px; color: var(--accent); font-size: 20px; }
  .comparison { display: grid; grid-template-columns: 1.15fr .85fr; gap: 18px; margin-top: 25px; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 27px; background: linear-gradient(120deg, #17151b, #12121b 48%, #19151a); }
  .tag { display: inline-flex; border: 1px solid rgb(255 92 56 / 30%); border-radius: 99px; padding: 5px 10px; color: #ffa28a; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
  .comparison h3 { margin: 13px 0; font: 600 24px/1.2 "Space Grotesk", sans-serif; letter-spacing: -.035em; }
  .comparison ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 0; padding: 0; color: var(--ink-2); list-style: none; font-size: 13px; }
  .comparison li::first-letter { color: var(--good); }
  .comparison-note { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; border-left: 1px solid var(--line); padding-left: 27px; }
  .comparison-note p { color: var(--ink-3); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
  .comparison-note blockquote { margin: 10px 0 17px; font: 600 26px/1.1 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
  .comparison-note a { color: #ff9278; font-size: 13px; font-weight: 600; }
  .printing { padding-top: 20px; }
  .print-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .print-grid article { position: relative; min-height: 138px; border: 1px solid var(--line); border-radius: 14px; padding: 19px 20px; background: #101017; }
  .print-grid article > b { display: block; margin-bottom: 14px; color: var(--accent); font: 600 11px/1 "Space Grotesk", sans-serif; letter-spacing: .1em; }
  .faq-layout { display: grid; grid-template-columns: .72fr 1.28fr; align-items: start; gap: 56px; }
  .faq-layout .section-head { position: sticky; top: 105px; margin: 0; text-align: left; }
  .faq-layout .section-head h2 { font-size: 43px; }
  .faq-items { display: grid; gap: 10px; }
  .faq-items details { border: 1px solid var(--line); border-radius: 12px; padding: 0 17px; background: #111119; }
  .faq-items summary { position: relative; min-height: 55px; display: flex; align-items: center; padding-right: 28px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 600; }
  .faq-items summary::-webkit-details-marker { display: none; }
  .faq-items summary::after { position: absolute; right: 0; color: var(--accent); content: "+"; font-size: 20px; font-weight: 400; }
  .faq-items details[open] summary::after { content: "−"; }
  .faq-items details p { padding: 0 28px 17px 0; color: var(--ink-2); font-size: 13px; line-height: 1.65; }
  .closing { position: relative; overflow: hidden; padding: 74px 0; text-align: center; }
  .closing .wrap { position: relative; overflow: hidden; border: 1px solid rgb(255 255 255 / 12%); border-radius: 34px; padding: 58px 24px 62px; background: radial-gradient(ellipse at 50% 0%, rgb(255 92 56 / 15%), transparent 56%), #12121b; }
  .closing-spark { color: var(--accent-2); font-size: 23px; }
  .closing h2 { margin: 10px 0 12px; font-size: clamp(32px, 4vw, 46px); line-height: 1.1; letter-spacing: -.045em; }
  .closing p { margin-bottom: 22px; color: var(--ink-2); }
  footer { border-top: 1px solid var(--line); padding: 35px 0 18px; }
  .footer-row { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: start; gap: 28px; padding: 0 0 26px; }
  .footer-row > div > p { margin-top: 10px; color: var(--ink-3); font-size: 12px; }
  footer nav { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--ink-2); font-size: 12px; }
  .footer-note { justify-self: end; color: var(--ink-3); font-size: 10px; font-weight: 700; letter-spacing: .12em; text-align: right; }
  .footer-bottom { display: flex; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding-top: 16px; color: var(--ink-3); font-size: 11px; }
}

@layer components {
  .btn, .chip-btn, .mode-pill, .icon-btn, .text-btn { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 999px; font-weight: 600; line-height: 1.2; transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease; }
  .btn:hover, .chip-btn:hover, .mode-pill:hover { transform: translateY(-1px); }
  .btn { padding: 14px 24px; font-size: 14px; }
  .btn.primary { border-color: transparent; background: linear-gradient(108deg, var(--accent), #ff7c37 62%, var(--accent-2)); color: #1a1011; box-shadow: 0 7px 25px -18px var(--accent); }
  .btn.primary:hover { filter: brightness(1.06); }
  .btn.secondary, .mode-pill { border-color: var(--line-strong); background: rgb(255 255 255 / 3%); color: var(--ink); }
  .btn.secondary:hover, .mode-pill:hover { border-color: rgb(255 255 255 / 28%); background: rgb(255 255 255 / 6%); }
  .btn.small { min-height: 38px; padding: 9px 16px; font-size: 12px; }
  .btn.full { width: 100%; }
  .mode-pill { min-height: 38px; padding: 8px 12px; font-size: 11px; font-weight: 500; }
  .chip-btn, .style-chip { min-height: 38px; border: 1px solid var(--line); background: rgb(255 255 255 / 3%); color: var(--ink-2); }
  .chip-btn { padding: 8px 13px; font-size: 12px; }
  .chip-btn:hover { border-color: var(--line-strong); color: var(--ink); }
  .style-chip { border-radius: 999px; padding: 8px 14px; font-size: 12px; font-weight: 400; }
  .style-chip[aria-checked="true"] { border-color: var(--ink); background: var(--ink); color: #101018; font-weight: 600; }
  .text-btn { min-height: 38px; border: 0; padding: 8px 12px; background: transparent; color: var(--ink-2); font-size: 12px; }
  .text-btn:hover { color: var(--ink); }
  .icon-btn { width: 40px; min-height: 40px; border-color: var(--line); background: rgb(255 255 255 / 4%); color: var(--ink-2); font-size: 22px; font-weight: 400; }
  .status-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 10px rgb(255 176 32 / 24%); }
  .mode-pill.connected .status-dot { background: var(--good); box-shadow: 0 0 10px rgb(52 211 153 / 30%); }
  #connection-status { min-height: 1.4em; color: var(--ink); }
  #connection-status[data-state="error"] { color: #ff9278; }
  #connection-status[data-state="connected"] { color: var(--good); }
  #connection-status[data-state="pending"] { color: var(--accent-2); }
  .advanced > div[hidden] { display: none; }
  select, input[type="text"], input[type="password"], input[type="url"], input[type="number"], textarea:not(.composer textarea) { min-height: 40px; width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: 8px 10px; background: var(--bg-3); color: var(--ink); font-size: 13px; }
  select { cursor: pointer; }
  select:focus, input:focus, textarea:focus { border-color: rgb(255 92 56 / 76%); outline: 0; box-shadow: 0 0 0 3px rgb(255 92 56 / 13%); }
  input[readonly] { color: var(--ink-2); }
  input[type="range"] { width: 100%; accent-color: var(--accent); }
  input[type="color"] { width: 42px; height: 34px; border: 1px solid var(--line-strong); border-radius: 8px; padding: 3px; background: var(--bg-3); cursor: pointer; }
  label { display: block; margin: 11px 0 5px; color: #d2d0dc; font-size: 12px; }
  .ai-settings { display: grid; gap: 6px; margin: 9px 0 0; color: var(--ink-3); font-size: 12px; }
  .ai-settings p:empty, .ai-settings #task-status:empty, .ai-settings #reference-status:empty { display: none; }
  .ai-settings > p { line-height: 1.5; }
  .ai-settings > #upload-reference { justify-self: start; }
  .ai-settings > #upload-reference[hidden] { display: none; }
  .task-recovery { margin-top: 1px; color: var(--ink-3); font-size: 11px; }
  .task-recovery > summary { width: fit-content; cursor: pointer; }
  .task-recovery-fields { display: grid; gap: 5px; max-width: 420px; padding: 7px 0 2px; }
  .task-recovery-fields > label { margin: 0; }
  .estimate-box { border: 1px solid rgb(255 176 32 / 20%); border-radius: 10px; padding: 12px; background: rgb(255 176 32 / 5%); }
  .task-actions { display: flex; flex-wrap: wrap; gap: 5px; }
  .form-error { border: 1px solid rgb(255 92 56 / 28%); border-radius: 10px; margin-top: 10px; padding: 10px 13px; background: rgb(255 92 56 / 7%); color: #ffb19e; font-size: 13px; }
  .reference-preview { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: 9px; padding: 6px 10px; color: var(--ink-2); font-size: 12px; }
  .reference-preview button { width: 28px; height: 28px; border: 0; border-radius: 7px; background: rgb(255 255 255 / 5%); font-size: 18px; }
  .design-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .design-card { overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 16px; padding: 0; background: var(--bg-2); text-align: left; transition: transform .18s ease, border-color .18s ease; }
  .design-card:hover { transform: translateY(-3px); border-color: rgb(255 92 56 / 43%); }
  .artwork { aspect-ratio: 5 / 6; overflow: hidden; background: #16161f; }
  .artwork canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
  .card-meta { min-height: 47px; padding: 12px 14px; color: var(--ink-2); font-size: 12px; }
  .card-meta strong { color: var(--ink); font-weight: 500; }
  .history-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .history-item { display: grid; gap: 5px; }
  .history-item > .text-btn { justify-self: start; }
  .gallery-note { flex: 0 0 auto; color: var(--ink-3); font-size: 12px; }
  .style-card { display: flex; min-width: 0; flex-direction: column; gap: 7px; border: 1px solid var(--line); border-radius: 15px; padding: 9px 9px 14px; background: var(--bg-2); color: var(--ink); text-align: left; transition: transform .18s ease, border-color .18s ease; }
  .style-card:hover { transform: translateY(-3px); border-color: rgb(255 92 56 / 48%); }
  .style-card:focus-visible { outline-offset: 2px; }
  .style-card > strong { padding: 3px 7px 0; font-size: 13px; font-weight: 600; }
  .style-card > span:last-child { min-height: 34px; padding: 0 7px; color: var(--ink-2); font-size: 11px; line-height: 1.5; }
  .style-art { position: relative; display: grid; overflow: hidden; width: 100%; aspect-ratio: 1.25; place-content: center; border-radius: 9px; isolation: isolate; text-align: center; }
  .style-art::before, .style-art::after { position: absolute; z-index: -1; content: ""; }
  .style-art b { font: 700 clamp(18px, 2vw, 27px)/.92 "Space Grotesk", sans-serif; letter-spacing: -.07em; }
  .art-vintage { background: radial-gradient(circle at 50% 39%, #f5bd69 0 16%, #cf623e 16% 36%, #563638 36% 37%, #212127 38%); color: #f9e7c7; text-shadow: 2px 3px #512f34; }
  .art-vintage::before { inset: 15% 27%; border: 1px solid rgb(255 225 172 / 60%); border-radius: 50%; }
  .art-vintage i { position: absolute; top: 13%; left: 49%; width: 1px; height: 25%; transform-origin: bottom; background: #f5bd69; box-shadow: -28px 6px #f5bd69, 28px 6px #f5bd69; }
  .art-distressed { background: linear-gradient(145deg, #e9d3a7, #d4b17a); color: #27221e; }
  .art-distressed::before { inset: 8%; border: 2px solid #27221e; transform: rotate(-5deg); }
  .art-distressed b { transform: rotate(-5deg); font-size: clamp(21px, 2.5vw, 33px); line-height: .83; }
  .art-vector { background: #d5e7db; color: #1c3734; }
  .art-vector::before { top: 14%; width: 54%; aspect-ratio: 1; border: 7px solid #df7047; border-radius: 50%; }
  .art-vector i { position: absolute; top: 12%; color: #1e6c62; font-size: 35px; }
  .art-vector b { margin-top: 56px; padding: 3px 8px; background: #1e6c62; color: #f6ecd2; font-size: clamp(16px, 1.8vw, 23px); }
  .art-street { background: repeating-linear-gradient(135deg, #181822 0 10px, #20202a 10px 11px); color: #f5f0e7; }
  .art-street::before { inset: 14% 20%; border: 3px solid var(--accent); transform: rotate(-8deg); }
  .art-street b { transform: rotate(-8deg); font-size: clamp(28px, 3vw, 39px); line-height: .78; text-shadow: 3px 3px var(--accent); }
  .art-street i { position: absolute; right: 17%; bottom: 19%; color: #ffba58; font: 600 9px/1 Inter, sans-serif; letter-spacing: .15em; }
  .art-graffiti { background: radial-gradient(ellipse at 50% 40%, #ed7450, #693a5c 55%, #282536); color: #fff1d8; }
  .art-graffiti b { transform: skew(-11deg) rotate(-7deg); font-size: clamp(25px, 2.8vw, 36px); line-height: .78; text-shadow: 4px 5px #1a1622, 6px 7px #ffbd4f; }
  .art-graffiti i { position: absolute; right: 21%; bottom: 15%; color: #ffbd4f; font-size: 28px; }
  .art-psychedelic { background: repeating-radial-gradient(ellipse at 50% 50%, #df7552 0 8px, #f4d488 9px 15px, #6b536f 16px 22px, #222331 23px 29px); color: white; }
  .art-psychedelic i { position: absolute; color: #20212a; font-size: 88px; opacity: .65; }
  .art-psychedelic b { z-index: 1; padding: 6px 8px; background: #26212b; font-size: clamp(18px, 2vw, 26px); }
  .art-emblem { background: #bdc6ac; color: #28382f; }
  .art-emblem::before { inset: 12% 26%; border: 3px solid #334537; border-radius: 50%; box-shadow: 0 0 0 4px #bdc6ac, 0 0 0 6px #334537; }
  .art-emblem i { position: absolute; top: 17%; color: #bb7041; font-size: 20px; }
  .art-emblem b { margin-top: 12px; font-size: clamp(17px, 1.9vw, 24px); }
  .art-emblem small { margin-top: 7px; font-size: 7px; font-weight: 700; letter-spacing: .2em; }
  .art-vapor { background: linear-gradient(180deg, #332348, #76518c 45%, #ef7967 47%, #281d3c 65%); color: #f6e9d4; }
  .art-vapor::before { right: 0; bottom: -4%; left: 0; height: 40%; background: repeating-linear-gradient(0deg, transparent 0 9px, #f184d2 10px 11px), linear-gradient(90deg, transparent 49%, #f184d2 50%, transparent 51%); transform: perspective(90px) rotateX(20deg); transform-origin: top; }
  .art-vapor i { margin-top: -35px; color: #ffc071; font-size: 54px; text-shadow: 0 0 16px #ff93c2; }
  .art-vapor b { margin-top: -3px; font-size: clamp(18px, 2vw, 26px); text-shadow: 0 2px #5c3b8e; }
  .editor { width: min(1080px, calc(100vw - 36px)); max-width: none; height: min(900px, calc(100dvh - 64px)); max-height: none; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 22px; padding: 0; background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow); }
  .editor::backdrop, #mode-dialog::backdrop, #clear-dialog::backdrop { background: rgb(4 4 8 / 78%); backdrop-filter: blur(4px); }
  .editor-panel { display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden; }
  .editor-head { display: flex; min-height: 71px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 12px 20px; }
  .editor-head .section-kicker { margin-bottom: 1px; font-size: 9px; }
  .editor-head h2 { font-size: 19px; line-height: 1.1; letter-spacing: -.03em; }
  .editor-top-actions { display: flex; align-items: center; gap: 12px; }
  .editor-body { display: grid; min-height: 0; flex: 1; grid-template-columns: minmax(0, 1fr) 330px; }
  .editor-stage { display: flex; min-width: 0; min-height: 0; flex-direction: column; align-items: center; gap: 12px; overflow: auto; padding: 15px 20px 18px; background: var(--bg); }
  .stage-toolbar { display: flex; width: min(100%, 535px); min-height: 40px; align-items: center; justify-content: space-between; gap: 10px; }
  .view-switch { display: flex; gap: 3px; border: 1px solid var(--line); border-radius: 10px; padding: 3px; background: var(--bg-2); }
  .view-switch button, .stage-tools button { min-height: 32px; border: 0; border-radius: 7px; padding: 6px 10px; background: transparent; color: var(--ink-2); font-size: 11px; }
  .view-switch .active { background: var(--accent); color: #160c10; font-weight: 700; }
  .stage-tools { display: flex; align-items: center; gap: 3px; color: var(--ink-2); font-size: 11px; }
  .stage-tools button { border: 1px solid var(--line); }
  .stage-tools output { min-width: 40px; text-align: center; }
  .canvas-wrap { position: relative; display: grid; width: min(100%, 535px); aspect-ratio: 5 / 6; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid rgb(255 255 255 / 8%); border-radius: 12px; background-color: #17171e; }
  .canvas-wrap.checker { background-image: linear-gradient(45deg, #e5e5eb 25%, transparent 25%), linear-gradient(-45deg, #e5e5eb 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #e5e5eb 75%), linear-gradient(-45deg, transparent 75%, #e5e5eb 75%); background-position: 0 0, 0 8px, 8px -8px, -8px 0; background-size: 16px 16px; background-color: #fff; }
  #editor-canvas { z-index: 1; display: block; width: 100%; height: 100%; object-fit: contain; }
  .shirt-shape { position: absolute; width: 76%; height: 76%; opacity: .3; }
  .canvas-wrap.shirt #editor-canvas { width: 58%; height: 76%; }
  .preview-hint { width: min(100%, 535px); color: var(--ink-3); font-size: 11px; line-height: 1.4; }
  .image-view-tools { display: flex; width: min(100%, 535px); align-items: center; gap: 12px; }
  .image-view-tools label { flex: 0 0 auto; margin: 0; }
  .editor-side { display: grid; align-content: start; gap: 14px; min-height: 0; overflow-y: auto; border-left: 1px solid var(--line); padding: 16px 17px 28px; scrollbar-color: #393945 transparent; }
  .editor-card { display: grid; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
  .editor-card:last-child { border-bottom: 0; }
  .editor-card h3 { margin: 0; color: #d7d4e1; font: 600 11px/1.2 "Space Grotesk", sans-serif; letter-spacing: .13em; }
  .editor-card p { margin: 0; }
  .editor-card label { margin: 4px 0 0; }
  .swatches { display: flex; flex-wrap: wrap; gap: 8px; }
  .swatch { width: 26px; height: 26px; border: 1px solid rgb(255 255 255 / 22%); border-radius: 8px; padding: 0; }
  .swatch-white { background: #fff; }
  .swatch-black { background: #111113; }
  .swatch-blue { background: #2653d1; }
  .swatch-red { background: #d1332f; }
  .swatch-orange { background: #ef7f1a; }
  .swatch-sky { background: #57c2e8; }
  .swatch-pink { background: #ef6fa7; }
  .swatch.is-active { outline: 2px solid var(--ink); outline-offset: 2px; }
  .check-row { display: flex; align-items: center; gap: 9px; margin-top: 4px !important; font-size: 12px !important; }
  .check-row input { width: 16px; height: 16px; accent-color: var(--accent); }
  .side-actions, .layer-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
  .side-actions .btn.small { min-height: 36px; padding: 8px 11px; font-size: 11px; }
  .layer-actions button { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; background: #191923; color: var(--ink-2); font-size: 10px; }
  .tool-note { border-left: 2px solid var(--accent); padding-left: 9px; color: var(--ink-3); font-size: 11px; }
  .property-group { display: grid; gap: 7px; }
  .layer-list { display: grid; gap: 5px; }
  .layer-row { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #191923; color: var(--ink-2); text-align: left; font-size: 12px; }
  .layer-row[aria-pressed="true"] { border-color: rgb(255 92 56 / 55%); background: rgb(255 92 56 / 8%); color: var(--ink); }
  .color-fields { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .color-fields.art-colors { grid-template-columns: repeat(2, 1fr); }
  .color-fields label { display: grid; gap: 5px; margin: 0; color: var(--ink-2); font-size: 11px; }
  .crop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .crop-grid label { display: grid; gap: 4px; margin: 0; }
  .editor-card #editor-status { min-height: 18px; color: var(--ink-2); font-size: 11px; }
  .property-group[data-layer-type], .editor-card[data-layer-type] { transition: opacity .15s ease; }
  .download-card { padding-top: 2px; }
  #mode-dialog, #clear-dialog { width: min(520px, calc(100vw - 40px)); max-width: none; max-height: calc(100dvh - 48px); overflow-y: auto; border: 1px solid var(--line-strong); border-radius: 22px; padding: 0; background: var(--bg-2); color: var(--ink); box-shadow: var(--shadow); }
  .key-dialog { padding: 20px 22px 22px; }
  .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
  .dialog-head h2 { font-size: 22px; line-height: 1.14; letter-spacing: -.035em; }
  .dialog-head .section-kicker { margin-bottom: 5px; }
  .dialog-content { display: grid; gap: 10px; padding-top: 14px; color: var(--ink-2); font-size: 13px; line-height: 1.55; }
  .dialog-content > label { margin: 0 0 -5px; color: var(--ink); }
  .dialog-content a { color: #ff9278; text-decoration: underline; text-underline-offset: 3px; }
  .dialog-content .hint { font-size: 11px; }
  .advanced { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
  .advanced summary { cursor: pointer; color: var(--ink); font-weight: 600; }
  .advanced p { margin: 9px 0; font-size: 11px; }
  .advanced label { margin-top: 8px; }
  #connection-status { min-height: 18px; color: var(--good); font-size: 12px; }
  .dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .privacy-note { border-top: 1px solid var(--line); padding-top: 11px; color: var(--ink-3); font-size: 11px; }
  #clear-dialog { width: min(420px, calc(100vw - 40px)); padding: 21px; }
  #clear-dialog .dialog-content { padding-top: 12px; }
  .toast { position: fixed; z-index: 40; right: 20px; bottom: 18px; display: flex; max-width: min(520px, calc(100% - 40px)); align-items: center; gap: 13px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 10px 13px; background: #1a1a24; box-shadow: var(--shadow); color: var(--ink); font-size: 12px; }
  [hidden] { display: none !important; }
}

@layer responsive {
  @media (max-width: 960px) {
    .nav-inner { gap: 15px; }
    .nav-links { gap: 14px; font-size: 12px; }
    .nav-actions { gap: 7px; }
    .mode-pill { padding-inline: 9px; }
    .steps, .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .design-grid, .history-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .faq-layout { gap: 35px; }
  }
  @media (max-width: 700px) {
    html { scroll-padding-top: 66px; }
    .wrap { width: calc(100% - 32px); }
    .nav { height: 62px; }
    .nav-inner { gap: 8px; }
    .brand { gap: 7px; font-size: 15px; }
    .brand-mark { width: 28px; height: 28px; }
    .nav-links { display: none; }
    .nav-actions { margin-left: auto; }
    .mode-pill { width: 40px; min-width: 40px; overflow: hidden; padding: 0; font-size: 0; }
    .mode-pill .status-dot { width: 8px; height: 8px; }
    .nav-actions .btn { min-height: 38px; padding: 8px 12px; font-size: 11px; }
    .hero { padding: 55px 0 37px; }
    .eyebrow { font-size: 9px; letter-spacing: .1em; }
    h1 { margin: 17px auto 13px; font-size: clamp(40px, 10.65vw, 41.6px); line-height: 1.08; }
    .lede { max-width: 440px; margin-bottom: 22px; font-size: 13px; line-height: 1.6; }
    .desktop-break { display: none; }
    .composer-box { border-radius: 15px; padding: 14px 13px 12px; }
    .composer textarea { min-height: 96px; font-size: 14px; }
    .composer-tools { align-items: flex-start; flex-direction: column; gap: 11px; }
    .tool-buttons { width: 100%; }
    .chip-btn { min-height: 40px; padding: 8px 11px; }
    .selects { width: 100%; }
    .selects label { flex: 1; min-width: 0; margin: 0; }
    .selects select { min-height: 42px; font-size: 11px; }
    .generate-row { align-items: stretch; flex-direction: column; gap: 10px; }
    .generate-row p { font-size: 11px; }
    .generate-row .btn { width: 100%; min-height: 48px; }
    .style-picker { gap: 7px; margin-top: 14px; }
    .style-chip { min-height: 38px; padding: 7px 11px; font-size: 11px; }
    .reference-hint { max-width: 330px; margin: 0 auto; font-size: 10px; }
    .badges { flex-wrap: wrap; gap: 8px 13px; margin-top: 20px; font-size: 10px; }
    .section { padding: 68px 0; }
    .section-head { margin-bottom: 26px; }
    .section-head h2 { font-size: 29px; line-height: 1.08; }
    .section-head > p:last-child { font-size: 13px; }
    .section-head.row { align-items: flex-start; flex-direction: column; gap: 12px; }
    .section-head.row .btn { min-height: 40px; }
    .gallery-section { padding-top: 57px; }
    .design-grid, .history-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .card-meta { min-height: 42px; padding: 9px 10px; font-size: 11px; }
    .gallery-note { display: none; }
    .style-section { padding: 65px 0 70px; }
    .style-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .style-card { gap: 6px; padding: 7px 7px 11px; }
    .style-card > strong { font-size: 12px; }
    .style-card > span:last-child { min-height: 31px; font-size: 10px; }
    .style-art b { font-size: clamp(18px, 6vw, 27px); }
    .platforms { padding-top: 20px; }
    .platform-list { gap: 15px 20px; padding: 18px 0 12px; font-size: 15px; }
    .platforms small { max-width: 300px; margin: auto; font-size: 10px; }
    .steps { grid-template-columns: 1fr; gap: 10px; }
    .steps li { min-height: 0; padding: 17px; }
    .step-icon { margin-bottom: 12px; }
    .tip { display: block; }
    .tip p { margin-top: 5px; }
    .feature-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .feature-grid article { min-height: 0; padding: 16px; }
    .feature-grid article > span { margin-bottom: 15px; }
    .feature-grid h3 { font-size: 14px; }
    .feature-grid p { font-size: 11px; }
    .comparison { grid-template-columns: 1fr; gap: 20px; border-radius: 20px; padding: 19px; }
    .comparison h3 { font-size: 20px; }
    .comparison ul { grid-template-columns: 1fr; font-size: 12px; }
    .comparison-note { border-top: 1px solid var(--line); border-left: 0; padding: 17px 0 0; }
    .comparison-note blockquote { font-size: 23px; }
    .printing { padding-top: 0; }
    .print-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
    .print-grid article { min-height: 142px; padding: 14px; }
    .print-grid h3 { font-size: 14px; }
    .print-grid p { font-size: 11px; }
    .faq-layout { grid-template-columns: 1fr; gap: 22px; }
    .faq-layout .section-head { position: static; }
    .faq-layout .section-head h2 { font-size: 29px; }
    .faq-layout .section-head h2 br { display: none; }
    .faq-items { gap: 8px; }
    .faq-items summary { min-height: 53px; font-size: 12px; }
    .faq-items details p { font-size: 12px; }
    .closing { padding: 22px 0 52px; }
    .closing .wrap { border-radius: 23px; padding: 38px 18px 40px; }
    .closing h2 { font-size: 31px; }
    .closing p { font-size: 12px; }
    .footer-row { grid-template-columns: 1fr; gap: 19px; }
    .footer-note { justify-self: start; text-align: left; }
    footer nav { gap: 8px 15px; }
    .footer-bottom { flex-wrap: wrap; font-size: 10px; }
    .footer-bottom span:nth-child(2) { order: 3; flex-basis: 100%; }
    .editor { width: 100vw; height: 100dvh; border: 0; border-radius: 0; }
    .editor-head { min-height: 71px; padding: 12px 16px; }
    .editor-head .section-kicker { display: none; }
    .editor-head h2 { font-size: 18px; }
    .editor-top-actions { gap: 6px; }
    .editor-top-actions .text-btn { padding-inline: 6px; font-size: 10px; }
    .editor-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(320px, 55%) minmax(0, 1fr); }
    .editor-stage { gap: 8px; padding: 10px 16px 10px; }
    .stage-toolbar { min-height: 36px; }
    .view-switch button, .stage-tools button { min-height: 30px; padding: 5px 7px; font-size: 10px; }
    .stage-tools { gap: 2px; }
    .stage-tools output { min-width: 36px; }
    .canvas-wrap { width: auto; max-width: 100%; height: auto; max-height: calc(100% - 86px); aspect-ratio: 5 / 6; }
    .preview-hint { font-size: 10px; }
    .editor-side { gap: 11px; border-top: 1px solid var(--line); border-left: 0; padding: 14px 18px 26px; }
    .editor-card { gap: 7px; padding-bottom: 13px; }
    .editor-card h3 { font-size: 10px; }
    .editor-card label { margin-top: 3px; }
    #mode-dialog, #clear-dialog { width: calc(100vw - 40px); max-height: calc(100dvh - 48px); }
    .key-dialog { padding: 18px; }
    .dialog-head h2 { font-size: 20px; }
    .dialog-content { gap: 9px; font-size: 12px; }
    .dialog-actions > .btn { flex: 1 1 auto; }
    .toast { right: 12px; bottom: 12px; max-width: calc(100% - 24px); }
  }
  @media (max-width: 390px) {
    .wrap { width: calc(100% - 28px); }
    .brand > span:last-child { font-size: 14px; }
    .nav-actions .btn { padding: 8px 10px; }
    .selects { gap: 6px; }
    .selects select { padding-inline: 7px; font-size: 10px; }
    .chip-btn { font-size: 11px; }
    .print-grid article { padding: 12px; }
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  }
}
