:root {
  --ink: #11110f;
  --paper: #efeee8;
  --acid: #d7ff43;
  --orange: #ff5c35;
  --red: #c22a22;
  --line: rgba(17, 17, 15, 0.18);
  --muted: #77766e;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font-family: "Manrope", sans-serif; }
button, input, textarea { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.noise { position: fixed; inset: 0; opacity: .035; pointer-events: none; z-index: 20; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.8'/%3E%3C/svg%3E"); }

.site-header { height: 72px; padding: 0 3.2vw; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.brand { color: inherit; text-decoration: none; font-weight: 700; letter-spacing: -.04em; display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 14px; height: 14px; background: var(--red); border-radius: 50% 0 50% 50%; transform: rotate(-45deg); }
.header-meta, .eyebrow, .panel-label, .rail-head, .spec-row, .privacy-note span, .result-actions > span { font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .08em; }
.header-meta { display: flex; gap: 24px; color: var(--muted); align-items: center; }
.live-dot { width: 6px; height: 6px; background: #78b900; border-radius: 50%; box-shadow: 0 0 0 4px rgba(120,185,0,.12); }

.intro { min-height: calc(100vh - 72px); padding: 9vh 7vw 5vh; position: relative; overflow: hidden; }
.intro::after { content: "WOODS"; position: absolute; right: -1vw; bottom: -9vw; font-size: 18vw; line-height: 1; letter-spacing: -.1em; font-weight: 700; color: rgba(17,17,15,.035); pointer-events: none; }
.eyebrow { margin: 0 0 3vh; color: var(--red); text-transform: uppercase; }
h1 { font-size: clamp(58px, 8vw, 132px); line-height: .89; letter-spacing: -.075em; max-width: 1100px; margin: 0; font-weight: 600; }
h1 em { font-family: Georgia, serif; font-weight: 400; color: var(--red); }
.lede { max-width: 580px; font-size: clamp(16px, 1.45vw, 21px); line-height: 1.6; color: #57564f; margin: 5vh 0 4vh 33%; }
.primary-button { border: 0; background: var(--ink); color: white; padding: 18px 22px; min-width: 190px; cursor: pointer; display: inline-flex; justify-content: space-between; gap: 35px; align-items: center; transition: transform .2s, background .2s; }
.primary-button:hover { transform: translateY(-2px); background: var(--red); }
.primary-button:disabled { cursor: default; }
.intro .primary-button { margin-left: 33%; }
.format-card { position: absolute; right: 7vw; top: 11vh; width: 150px; height: 150px; padding: 16px; background: var(--acid); display: flex; flex-direction: column; transform: rotate(3deg); box-shadow: 9px 9px 0 var(--ink); }
.format-card span, .format-card small { font: 10px "DM Mono", monospace; }
.format-card strong { font-size: 42px; letter-spacing: -.08em; margin: auto 0; }

.studio { min-height: calc(100vh - 72px); display: grid; grid-template-columns: 240px minmax(400px, 1fr); }
.step-rail { padding: 34px 28px; border-right: 1px solid var(--line); }
.rail-head { display: flex; justify-content: space-between; padding-bottom: 25px; border-bottom: 1px solid var(--line); font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .08em; }
.step-rail ol { margin: 25px 0; padding: 0; list-style: none; }
.step-rail li { padding: 13px 0; color: #a09f97; font-size: 13px; display: flex; gap: 12px; }
.step-rail li.active { color: var(--ink); font-weight: 700; }
.step-rail li.done::before { content: "✓"; color: #669700; }
.step-rail li:not(.done)::before { content: attr(data-number); font: 10px "DM Mono", monospace; margin-top: 4px; }
.privacy-note { margin-top: 10vh; border-left: 2px solid var(--red); padding-left: 13px; }
.privacy-note span { font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .08em; }
.privacy-note p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.workspace { padding: 7vh 6vw 5vh; display: flex; flex-direction: column; min-height: calc(100vh - 72px); }
.question-number { font: 12px "DM Mono", monospace; color: var(--red); }
.question-title { font-size: clamp(38px, 4.6vw, 64px); line-height: 1; letter-spacing: -.055em; margin: 18px 0 12px; max-width: 760px; }
.question-help { color: var(--muted); margin: 0 0 35px; max-width: 560px; line-height: 1.6; }

.option-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.option-card { position: relative; border: 2px solid var(--line); background: #e3e2da; padding: 0; cursor: pointer; overflow: hidden; text-align: left; transition: transform .15s, border-color .15s; }
.option-card:hover { transform: translateY(-3px); border-color: var(--ink); }
.option-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.option-card.selected { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.option-label { position: absolute; left: 0; bottom: 0; right: 0; padding: 8px 10px; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: white; font-size: 13px; font-weight: 600; }
.option-check { position: absolute; top: 10px; right: 10px; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: white; display: none; align-items: center; justify-content: center; font-size: 14px; }
.option-card.selected .option-check { display: flex; }

.theme-card { max-width: 520px; border: 2px solid var(--ink); background: #1c2a1e; padding: 0; box-shadow: 10px 10px 0 rgba(0,0,0,.12); }
.theme-example { margin-top: 42px; max-width: 520px; }
.theme-example-label { font: 10px "DM Mono", monospace; letter-spacing: .1em; color: var(--muted); display: block; margin-bottom: 12px; }
.main-input { width: 100%; border: 0; border-bottom: 2px solid var(--ink); background: transparent; padding: 15px 0; outline: none; font-size: clamp(20px, 2.2vw, 30px); resize: none; font-family: "Manrope", sans-serif; }
.main-input:focus { border-color: var(--red); }
.theme-visual { position: relative; aspect-ratio: 16/9; overflow: hidden; background: linear-gradient(#2c3a2e 0%, #223022 60%, #17221a 100%); }
.theme-figure { position: absolute; left: 50%; bottom: 22%; transform: translateX(-50%); z-index: 4; width: 54px; height: 130px; }
.theme-figure .hood { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 52px; height: 60px; background: var(--red); border-radius: 60% 60% 40% 40%; }
.theme-figure .body { position: absolute; top: 52px; left: 50%; transform: translateX(-50%); width: 44px; height: 80px; background: var(--red); border-radius: 20% 20% 10% 10%; opacity: .9; }
.tree { position: absolute; bottom: 12%; background: #0e1a10; z-index: 1; }
.tree-a { left: 8%; width: 26px; height: 120px; }
.tree-b { left: 22%; width: 34px; height: 160px; }
.tree-c { right: 10%; width: 30px; height: 140px; }
.path { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: 130px; height: 40%; background: linear-gradient(#3a4a3a, #2a382a); z-index: 2; clip-path: polygon(42% 0, 58% 0, 78% 100%, 22% 100%); }
.mist { position: absolute; z-index: 3; background: rgba(210,225,215,.18); filter: blur(14px); border-radius: 50%; }
.mist-a { left: -10%; bottom: 28%; width: 120%; height: 60px; }
.mist-b { left: -20%; bottom: 8%; width: 140%; height: 80px; }
.theme-caption { padding: 14px 16px; font: 11px "DM Mono", monospace; letter-spacing: .06em; color: #d8d8cf; background: var(--ink); }

.form-actions { margin-top: auto; padding-top: 42px; display: flex; justify-content: space-between; }
.text-button { border: 0; background: none; cursor: pointer; padding: 14px 0; color: var(--muted); }
.text-button:hover { color: var(--red); }

.results { min-height: calc(100vh - 72px); padding: 6vh 6vw; }
.results-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 5vh; }
.results h2 { font-size: clamp(45px, 6vw, 80px); letter-spacing: -.065em; margin: 0; line-height: .95; }
.generation-status { aspect-ratio: 16/6; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 20px; }
.generation-status p { line-height: 1.6; color: var(--muted); }
.spinner { width: 35px; height: 35px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-single { max-width: 920px; margin: 0 auto; }
.result-single-card { border: 2px solid var(--ink); background: #e3e2da; box-shadow: 12px 12px 0 rgba(0,0,0,.10); }
.image-wrap { position: relative; background: #d6d5ce; overflow: hidden; aspect-ratio: 16/9; }
.image-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-actions { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.result-links { display: flex; gap: 18px; align-items: center; }
.enhance-button { border: 2px solid #e3b800; background: #ffd933; color: #3a2e00; cursor: pointer; padding: 8px 14px; font-weight: 700; border-radius: 4px; transition: transform .15s, background .15s; }
.enhance-button:hover:not(:disabled) { transform: translateY(-1px); background: #ffe066; }
.enhance-button:disabled { opacity: .4; cursor: default; }
.wall-button { border: 1px solid var(--line); background: rgba(255,255,255,.3); color: inherit; cursor: pointer; padding: 8px 14px; font-weight: 600; border-radius: 4px; transition: transform .15s, border-color .15s, background .15s; }
.wall-button:hover { transform: translateY(-1px); border-color: var(--ink); background: rgba(255,255,255,.6); }

/* AR modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(17,17,15,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.modal { position: relative; background: var(--paper); color: var(--ink); max-width: 560px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 40px; box-shadow: 14px 14px 0 rgba(0,0,0,.18); }
.modal-close { position: absolute; top: 16px; right: 16px; border: 0; background: none; font-size: 18px; cursor: pointer; color: var(--muted); }
.modal h3 { font-size: clamp(26px, 4vw, 40px); letter-spacing: -.05em; margin: 12px 0 22px; }
.modal-art { margin: 0 0 26px; }
.modal-art img { width: 100%; max-height: 40vh; object-fit: cover; display: block; border: 1px solid var(--line); }
.ar-config-section { margin-bottom: 24px; }
.ar-config-label { font: 10px "DM Mono", monospace; letter-spacing: .12em; color: var(--muted); display: block; margin-bottom: 12px; }
.size-presets { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.size-preset { border: 1px solid var(--line); background: rgba(255,255,255,.3); padding: 12px 8px; cursor: pointer; font: 13px "DM Mono", monospace; }
.size-preset.on, .size-preset:hover { background: var(--acid); border-color: var(--ink); }
.custom-size { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.custom-size label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.custom-size input { width: 72px; border: 0; border-bottom: 1px solid var(--ink); background: transparent; padding: 8px 4px; font: 14px "DM Mono", monospace; outline: none; }
.ratio-lock { cursor: pointer; font-size: 16px; opacity: .4; }
.ratio-lock.locked { opacity: 1; }
.ar-size-readout { font: 13px "DM Mono", monospace; color: var(--ink); margin: 6px 0 0; }
.frame-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.frame-preset { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.3); padding: 9px 12px; cursor: pointer; font-size: 13px; }
.frame-preset.on, .frame-preset:hover { border-color: var(--ink); background: rgba(255,255,255,.7); }
.frame-swatch { width: 22px; height: 22px; border: 1px solid rgba(0,0,0,.25); display: inline-block; }
.frame-swatch[data-frame="none"] { background: transparent; border-style: dashed; }
.frame-swatch[data-frame="black"] { background: #141414; }
.frame-swatch[data-frame="white"] { background: #f2f1ee; }
.frame-swatch[data-frame="oak"] { background: #a67b45; }
.frame-swatch[data-frame="dark"] { background: #3a2412; }
.frame-swatch[data-frame="gold"] { background: #d3a93c; }
.modal-actions { margin-top: 10px; }
.qr-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; }
.qr-hint { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
#qrCanvas { display: inline-block; background: #fff; padding: 12px; }
#qrCanvas img { display: block; }
.prompt-box { padding: 14px 16px; border-top: 1px solid var(--ink); background: rgba(255,255,255,.25); }
.prompt-box-label { font: 10px "DM Mono", monospace; letter-spacing: .1em; color: var(--muted); display: block; margin-bottom: 8px; }
.prompt-box p { margin: 0; font-size: 13px; line-height: 1.6; color: #4e4d47; }
.result-actions > span { color: var(--muted); font-family: "DM Mono", monospace; font-size: 11px; letter-spacing: .08em; }
.select-button { border: 0; border-bottom: 1px solid var(--ink); background: transparent; color: inherit; cursor: pointer; padding: 6px 0; font-weight: 600; text-decoration: none; }
.select-button:hover { color: var(--red); border-color: var(--red); }
.result-actions-wide { max-width: 920px; margin: 40px auto 0; display: flex; justify-content: space-between; align-items: center; }
.toast { position: fixed; right: 25px; bottom: 25px; background: var(--ink); color: white; padding: 16px 20px; transform: translateY(150%); transition: transform .3s; z-index: 30; }
.toast.visible { transform: translateY(0); }

@media (max-width: 960px) {
  .studio { grid-template-columns: 170px 1fr; }
  .format-card { display: none; }
  .lede, .intro .primary-button { margin-left: 0; }
  .intro { padding-top: 13vh; }
  .option-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .site-header { padding: 0 20px; }
  .header-meta span:last-child { display: none; }
  .intro { padding: 10vh 22px 40px; }
  h1 { font-size: 58px; }
  .lede { margin-top: 7vh; }
  .studio { display: block; }
  .step-rail { border-right: 0; padding: 20px; }
  .step-rail ol, .privacy-note { display: none; }
  .workspace { min-height: calc(100vh - 145px); padding: 7vh 22px 30px; }
  .question-title { font-size: 43px; }
  .results { padding: 5vh 20px; }
  .results-head { align-items: start; gap: 15px; }
  .option-grid { grid-template-columns: 1fr; }
}
