@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display";
  src: url("../fonts/PlayfairDisplay.ttf") format("truetype-variations");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  /* ArtGallery identity — matches artgallery.mongelab.com */
  --bg: #0a0a0a;
  --surface: #0d0d0c;
  --surface-2: #1c1915;
  --stage: #111010;
  --border: #262218;
  --text: #f4efe4;
  --text-2: #b5b0a6;
  --text-3: #8f8a80;
  --accent: #c9a84c;
  --accent-hover: #f2d487;
  --accent-ink: #0a0a0a;
  --danger: #e0715c;
  --good: #7cc08b;
  --warn: #e1b25a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  --radius: 10px;
  --serif: "Playfair Display", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
.hidden { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 12.5px; }

/* ── Buttons & controls ─────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 36px; padding: 0 14px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
  cursor: pointer; font-weight: 500;
  transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn.wide { width: 100%; }
.btn:focus-visible, .icon-btn:focus-visible, .chip:focus-visible, .scene:focus-visible, .tab:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.link-btn {
  background: none; border: 0; padding: 0; color: var(--accent);
  cursor: pointer; font-size: 12.5px; font-weight: 500;
}
.link-btn:hover { text-decoration: underline; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 42px; height: 38px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn.small { width: 34px; height: 34px; }
.icon-btn.small svg { width: 16px; height: 16px; }
.icon-btn.active { color: var(--accent); border-color: var(--accent); }

.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-2); }
.field.inline { flex-direction: row; align-items: center; gap: 6px; }
.field em { font-style: normal; color: var(--text-3); }
select, input[type=number], input:not([type]) {
  min-height: 34px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text);
}
input[type=number] { width: 84px; }
select:focus, input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }

.slider { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 13px; color: var(--text-2); margin-top: 10px; }
.slider output { font-variant-numeric: tabular-nums; color: var(--text); font-size: 12.5px; }
.slider input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); margin: 2px 0 0; }

.check { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.icon-row { display: flex; gap: 8px; }

/* ── Brand ──────────────────────────────────────────────── */

.brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-size: 19px; letter-spacing: .01em; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 3px;
  border: 2.5px solid var(--accent);
  background: linear-gradient(135deg, var(--accent) 0 38%, transparent 38%);
  box-shadow: inset 0 0 0 2px var(--surface);
}

/* ── Gate page ──────────────────────────────────────────── */

body.gate { display: grid; place-items: center; min-height: 100%; padding: 24px 16px; overflow-x: hidden; }
.gate-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: #d9cfc0; }
.gate-bg canvas {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s; filter: saturate(.95);
}
.gate-bg canvas.ready { opacity: 1; }
.gate-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,16,12,.35), rgba(20,16,12,.05)); }
.gate-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  padding: 26px 28px 28px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}
.gate-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.gate-card h1 { font-family: var(--serif); font-weight: 500; font-size: 27px; line-height: 1.2; margin: 0 0 10px; text-wrap: balance; }
.gate-card .lead { color: var(--text-2); margin: 0 0 14px; }
.gate-points { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 6px; }
.gate-points li { position: relative; padding-left: 22px; font-size: 13.5px; }
.gate-points li::before {
  content: ""; position: absolute; left: 2px; top: 5px; width: 10px; height: 6px;
  border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg);
}
.gate-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; border-top: 1px solid var(--border); padding-top: 18px; min-width: 0; }
.gate-form label { font-size: 13px; color: var(--text-2); }
.captcha-row { display: flex; align-items: center; gap: 10px;  flex-wrap: wrap; }
.captcha-row img { border-radius: 8px; border: 1px solid var(--border); max-width: 100%; min-width: 0; height: auto; background: #f4f1ea; }
.gate-form input { letter-spacing: .3em; text-transform: uppercase; font-size: 18px; min-height: 42px; }
.gate-error { margin: 0; color: var(--danger); font-size: 13px; font-weight: 500; }
.cf-turnstile { min-height: 65px; }

/* ── Tool layout ────────────────────────────────────────── */

body.tool { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; }
/* The landing styles centre every `main` — the tool's main must span the
   whole viewport instead (sidebar left, stage right). */
body.tool main.layout { max-width: none; margin: 0; padding: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  height: 56px; padding: 0 16px; flex: none;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.tabs { display: flex; gap: 4px; margin: 0 auto; padding: 3px; background: var(--surface-2); border-radius: 10px; }
.tab {
  border: 0; background: transparent; padding: 6px 16px; border-radius: 8px;
  color: var(--text-2); font-weight: 500; cursor: pointer;
}
.tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .1); }
body:not(.has-image) .tabs { visibility: hidden; }
.top-actions { display: flex; gap: 6px; }

.layout { flex: 1; min-height: 0; display: grid; grid-template-columns: 330px 1fr; }
.panel {
  overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px;
  background: var(--bg); border-right: 1px solid var(--border);
}
.tab-panel { display: flex; flex-direction: column; gap: 12px; }
body:not(.has-image) .needs-image { display: none !important; }
body.has-image .no-image { display: none; }
.panel-intro h2 { font-family: var(--serif); font-weight: 500; font-size: 21px; margin: 6px 0 6px; }
.panel-intro p { color: var(--text-2); margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 14px 14px; }
.card h3 { margin: 0 0 10px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; }
.card-head h3 { margin-bottom: 0; }
.card .field + .btn-row { margin-top: 10px; }

.info { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 13px; }
.info dt { color: var(--text-3); }
.info dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
#info-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-good { color: var(--good); font-weight: 600; }
.q-ok { color: var(--warn); font-weight: 600; }
.q-low { color: var(--danger); font-weight: 600; }

.scene-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.scene {
  position: relative; padding: 0; border: 2px solid transparent; border-radius: 8px;
  overflow: hidden; cursor: pointer; background: var(--surface-2); aspect-ratio: 16 / 10;
  transition: border-color .18s, box-shadow .18s, transform .18s;
}
.scene:hover { border-color: rgba(201, 168, 76, .45); transform: translateY(-1px); }
.scene canvas { display: block; width: 100%; height: 100%; }
.scene.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.scene-name {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px;
  font-family: var(--serif); font-size: 12px; font-weight: 500; letter-spacing: .02em;
  color: #fff; text-align: left;
  background: linear-gradient(transparent, rgba(0, 0, 0, .62));
}
.scene.custom:not(.has-photo)::before {
  content: "+"; position: absolute; inset: 0 0 18px; display: grid; place-items: center;
  font-size: 28px; font-weight: 300; color: var(--text-3);
}
.scene.custom:not(.has-photo) .scene-name { color: var(--text-2); background: none; }

.calib { margin-top: 10px; padding: 10px; border-radius: 8px; background: var(--surface-2); font-size: 13px; }
.calib p { margin: 0 0 8px; }
.calib-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }

.size-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.size-row .field input { width: 100%; min-width: 0; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.size-error { margin: 8px 2px 0; font-size: 13px; font-weight: 500; color: var(--danger, #b3372f); }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 30px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface); cursor: pointer; font-size: 12.5px;
}
.chip.active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.sw { width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--text) 22%, transparent); }
.sw-black { background: #1c1c1c; }
.sw-white { background: #f4f2ec; }
.sw-oak { background: linear-gradient(135deg, #c9a06b, #a77a45); }
.sw-walnut { background: linear-gradient(135deg, #6e4c36, #4a3123); }
.sw-gold { background: linear-gradient(135deg, #f3dc9c, #b48a35); }

.export { margin-top: auto; }
.export-row { display: flex; gap: 12px; align-items: flex-end; margin-bottom: 12px; }
.export-row .slider { margin-top: 0; }
.grow { flex: 1; }
#export-note { margin: 8px 0 0; text-align: center; }

/* ── Stage ──────────────────────────────────────────────── */

.stage { position: relative; min-width: 0; min-height: 0; background: var(--stage); overflow: hidden; }
.view { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; gap: 10px; }
.canvas-wrap { position: relative; line-height: 0; max-width: 100%; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); }
#edit-canvas {
  display: block; max-width: 100%; max-height: calc(100dvh - 56px - 40px);
  width: auto; height: auto;
  background: repeating-conic-gradient(#d6d1c8 0 25%, #ece8e1 0 50%) 0 0 / 16px 16px;
}
#room-canvas { display: block; max-width: 100%; height: auto; touch-action: none; }
#room-canvas.over-art { cursor: grab; }
#room-canvas.dragging { cursor: grabbing; }
#room-canvas.calibrating { cursor: crosshair; }
.stage-scale {
  margin: 6px 0 0; font-size: 12px; letter-spacing: .02em; color: var(--text-2);
  font-variant-numeric: tabular-nums;
}
.stage-hint { margin: 0; font-size: 12.5px; color: var(--text-2); }

.dropzone { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; }
.drop-inner {
  width: 100%; max-width: 480px; padding: 40px 28px;
  border: 2px dashed var(--border); border-radius: 16px;
  background: var(--surface); text-align: center;
}
.drop-icon { width: 52px; height: 52px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; }
.drop-title { font-family: var(--serif); font-size: 21px; margin: 10px 0 4px; }
.drop-inner .muted { margin: 4px 0 10px; }
.drop-inner .small { margin: 14px 0 0; }
.drop-overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  border: 3px dashed var(--accent); pointer-events: none;
  font-family: var(--serif); font-size: 24px; color: var(--text);
}

/* Crop box */
.crop-box {
  position: absolute; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .55);
  outline: 1px solid rgba(255, 255, 255, .9); cursor: move; touch-action: none;
}
.canvas-wrap:has(.crop-box:not(.hidden)) { overflow: hidden; }
.crop-grid {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .15s;
  background:
    linear-gradient(90deg, transparent calc(33.33% - .5px), rgba(255,255,255,.55) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.55) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px)),
    linear-gradient(transparent calc(33.33% - .5px), rgba(255,255,255,.55) calc(33.33% - .5px) calc(33.33% + .5px), transparent calc(33.33% + .5px) calc(66.66% - .5px), rgba(255,255,255,.55) calc(66.66% - .5px) calc(66.66% + .5px), transparent calc(66.66% + .5px));
}
.crop-box.dragging .crop-grid { opacity: 1; }
.crop-size {
  position: absolute; left: 50%; top: 8px; transform: translateX(-50%);
  padding: 3px 7px; border-radius: 5px; background: rgba(0, 0, 0, .6); color: #fff;
  font: 500 11.5px/1.4 var(--sans); white-space: nowrap; pointer-events: none;
}
.crop-box i { position: absolute; width: 18px; height: 18px; touch-action: none; }
.crop-box i::after { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.crop-box i[data-handle=nw] { left: -9px; top: -9px; cursor: nwse-resize; }
.crop-box i[data-handle=ne] { right: -9px; top: -9px; cursor: nesw-resize; }
.crop-box i[data-handle=se] { right: -9px; bottom: -9px; cursor: nwse-resize; }
.crop-box i[data-handle=sw] { left: -9px; bottom: -9px; cursor: nesw-resize; }
.crop-box i[data-handle=n] { left: calc(50% - 9px); top: -9px; cursor: ns-resize; }
.crop-box i[data-handle=s] { left: calc(50% - 9px); bottom: -9px; cursor: ns-resize; }
.crop-box i[data-handle=e] { right: -9px; top: calc(50% - 9px); cursor: ew-resize; }
.crop-box i[data-handle=w] { left: -9px; top: calc(50% - 9px); cursor: ew-resize; }

.busy {
  position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: color-mix(in srgb, var(--stage) 75%, transparent); font-weight: 500;
}
.spinner { width: 22px; height: 22px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); font-weight: 500; box-shadow: var(--shadow);
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { background: var(--danger); color: #fff; }

/* ── Mobile ─────────────────────────────────────────────── */

@media (max-width: 820px) {
  body.tool { height: auto; min-height: 100dvh; overflow: visible; }
  .topbar { position: sticky; top: 0; z-index: 10; flex-wrap: wrap; height: auto; gap: 8px; padding: 8px 16px; }
  .top-actions { margin-left: auto; }
  .tabs { order: 3; width: 100%; margin: 0; }
  .tab { flex: 1; padding: 6px 8px; font-size: 13px; white-space: nowrap; }
  .layout { display: flex; flex-direction: column; }
  .stage { order: -1; min-height: 58vh; }
  body:not(.has-image) .stage { min-height: 70vh; }
  .view { position: relative; inset: auto; min-height: 58vh; padding: 12px; }
  #edit-canvas { max-height: 62vh; }
  .panel { border-right: 0; overflow: visible; padding: 12px 16px 24px; }
  .export { margin-top: 0; }
}

/* ── Landing page ───────────────────────────────────────── */

body.landing { display: block; min-height: 100%; padding: 0; overflow-x: hidden; }
.landing-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { color: inherit; text-decoration: none; }
.landing-nav { display: flex; align-items: center; gap: 14px; }
.landing-nav a { color: var(--text-2); text-decoration: none; font-size: 13px; }
.landing-nav a:hover { color: var(--text); text-decoration: underline; }
main { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(20px, 4vw, 56px); align-items: center;
  padding: clamp(28px, 6vh, 72px) 0 24px;
}
.hero h1 { font-family: var(--serif); font-weight: 500; font-size: clamp(28px, 4.2vw, 44px); line-height: 1.15; margin: 0 0 14px; text-wrap: balance; }
.hero .lead { color: var(--text-2); font-size: 16px; margin: 0 0 16px; max-width: 46ch; }
.hero-cta { display: flex; align-items: center; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.hero-cta .btn { min-height: 44px; font-size: 15px; text-decoration: none; }

.hero-demo { margin: 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.hero-demo canvas { display: block; width: 100%; height: auto; opacity: 0; transition: opacity .6s; }
.hero-demo canvas.ready { opacity: 1; }
.ba-labels { display: flex; }
.ba-labels span { flex: 1; padding: 8px 12px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border-top: 1px solid var(--border); }
.ba-labels span + span { border-left: 1px solid var(--border); }

.steps { padding: 28px 0 8px; }
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.steps-grid li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.steps-grid b { display: block; font-family: var(--serif); font-weight: 500; font-size: 16px; margin-bottom: 4px; }
.steps-grid span { color: var(--text-2); font-size: 13.5px; }

.faq { padding: 24px 0; max-width: 760px; }
.faq h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0 0 12px; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 12px 16px; font-weight: 500; border-radius: var(--radius); }
.faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.faq details[open] summary { border-bottom: 1px solid var(--border); }
.faq details p { margin: 0; padding: 12px 16px; color: var(--text-2); }

body.landing .gate-card { margin: 24px auto 40px; max-width: 460px; }
.gate-title { font-family: var(--serif); font-weight: 500; font-size: 24px; margin: 0 0 6px; }

.landing-footer {
  position: relative; z-index: 1;
  display: flex; justify-content: center; gap: 20px; flex-wrap: wrap;
  padding: 18px 16px 26px; border-top: 1px solid var(--border);
  background: var(--surface);
}
.landing-footer a { color: var(--text-2); font-size: 13px; text-decoration: none; }
.landing-footer a:hover { color: var(--text); text-decoration: underline; }

/* ── Legal pages ────────────────────────────────────────── */

body.legal { min-height: 100%; display: flex; flex-direction: column; }
.legal-main { flex: 1; width: 100%; max-width: 780px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 48px; }
.legal-main h1 { font-family: var(--serif); font-weight: 500; font-size: 30px; margin: 0 0 18px; }
.legal-body { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; }
.legal-body h2 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 22px 0 6px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 10px; color: var(--text); }
.legal-body a { color: var(--accent); }
.legal-back { margin-top: 18px; }
.legal-back a { text-decoration: none; }

/* ── Reduced motion ─────────────────────────────────────── */

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

/* ── Small screens ──────────────────────────────────────── */

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; padding-top: 18px; }
  .landing-nav a { display: none; }
  body.landing .gate-card { margin-bottom: 28px; }
}

/* ── Perspective tool ───────────────────────────────────── */

.persp-box { position: absolute; inset: 0; touch-action: none; }
.persp-pt {
  position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border-radius: 50%; border: 2px solid #fff; background: rgba(212, 164, 106, .9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .5); cursor: grab; padding: 0;
}
.persp-pt:active { cursor: grabbing; }
.persp-pt:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── Compare tag ────────────────────────────────────────── */

.compare-tag {
  position: absolute; left: 10px; top: 10px; z-index: 3;
  padding: 4px 10px; border-radius: 6px;
  background: rgba(0, 0, 0, .65); color: #fff; font-weight: 600; font-size: 12px;
  pointer-events: none;
}

/* ── Frame swatch: floating ─────────────────────────────── */

.sw-float { background: linear-gradient(135deg, #4a453e, #17140f); }

/* ── Tool footer ────────────────────────────────────────── */

.tool-footer {
  flex: none; padding: 6px 16px 8px; text-align: center;
  font-size: 12px; color: var(--text-3);
  border-top: 1px solid var(--border); background: var(--surface);
}
.tool-footer a { color: var(--text-2); text-decoration: none; }
.tool-footer a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 820px) {
  body.tool { height: auto; min-height: 100dvh; }
  .tool-footer { position: static; }
}
