/* Gryphon Seats — configurator */
:root {
  --bg: #0b0b0d;
  --panel: #121215;
  --card: #1a1a1e;
  --card-2: #222227;
  --line: #2c2c32;
  --text: #f2f2f3;
  --muted: #9a9aa3;
  --gold: #ffc000;
  --gold-2: #ffd24d;
  --gold-ink: #1a1400;
  --danger: #ff5c5c;
  --ok: #3ccf7a;
  --stage-a: #f4f4f5;
  --stage-b: #c9cacd;
  --radius: 12px;
  --head: 'Saira Condensed', 'Arial Narrow', sans-serif;
  --body: 'Saira', system-ui, sans-serif;
  --topbar: 56px;
  --panel-w: 470px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--body); font-size: 15px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* top bar */
.topbar { height: var(--topbar); display: flex; align-items: center; gap: 14px; padding: 0 18px; background: #070708; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: flex; align-items: baseline; gap: 6px; text-decoration: none; color: var(--text); }
.brand-mark { font-family: var(--head); font-weight: 800; font-size: 22px; letter-spacing: .08em; }
.brand-sub { font-family: var(--head); font-weight: 600; font-size: 13px; letter-spacing: .3em; color: var(--gold); }
.topbar-title { font-family: var(--head); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); font-size: 13px; padding-left: 14px; border-left: 1px solid var(--line); }
.topbar-spacer { flex: 1; }
.ghost-btn { display: inline-flex; align-items: center; gap: 8px; background: none; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; }
.ghost-btn:hover { border-color: var(--gold); color: var(--gold); }

/* layout */
.layout { display: grid; grid-template-columns: 1fr var(--panel-w); height: calc(100dvh - var(--topbar)); }
.stage { position: relative; background: radial-gradient(120% 90% at 50% 35%, var(--stage-a), var(--stage-b)); overflow: hidden; }
.viewer { position: absolute; inset: 0; touch-action: none; }
.viewer canvas { display: block; }
.stage-top { position: absolute; top: 18px; left: 22px; pointer-events: none; }
.stage-model { display: flex; flex-direction: column; color: #121214; }
#stageModel { font-family: var(--head); font-weight: 800; font-size: 44px; line-height: 1; letter-spacing: .03em; text-transform: uppercase; }
#stageTag { font-size: 13px; color: #4b4b52; margin-top: 4px; }
.stage-tools { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; background: rgba(14,14,16,.88); border-radius: 999px; backdrop-filter: blur(8px); }
.stage-tools button { background: none; border: 0; color: #d8d8dc; padding: 8px 14px; border-radius: 999px; font-family: var(--head); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; display: inline-flex; align-items: center; }
.stage-tools button.on, .stage-tools button[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); }
.stage-hint { position: absolute; right: 18px; top: 18px; margin: 0; font-size: 12px; color: #55555c; max-width: 220px; text-align: right; }
.loader { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: #333; font-family: var(--head); letter-spacing: .1em; text-transform: uppercase; background: radial-gradient(120% 90% at 50% 35%, var(--stage-a), var(--stage-b)); transition: opacity .4s; }
.loader span { width: 34px; height: 34px; border: 3px solid rgba(0,0,0,.15); border-top-color: var(--gold); border-radius: 50%; animation: spin 1s linear infinite; }
.loader.done { opacity: 0; pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* panel */
.panel { display: flex; flex-direction: column; background: var(--panel); border-left: 1px solid var(--line); min-height: 0; }
.steps { display: flex; gap: 2px; padding: 10px 12px 0; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); }
.steps::-webkit-scrollbar { display: none; }
.steps button { flex: 1 0 auto; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 5px 9px; color: var(--muted); font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; font-size: 12.5px; white-space: nowrap; }
.steps button b { display: inline-grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; border: 1px solid currentColor; font-size: 11px; margin-right: 5px; }
.steps button.on { color: var(--text); border-bottom-color: var(--gold); }
.steps button.on b { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.step-body { flex: 1; overflow-y: auto; padding: 18px 18px 28px; min-height: 0; }
.step-body h2 { font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; font-size: 22px; margin: 0 0 4px; }
.step-body .lead { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.step-body h3 { font-family: var(--head); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 14px; color: var(--muted); margin: 22px 0 10px; }

/* model cards */
.models { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.model-card { text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; transition: border-color .15s, transform .15s; }
.model-card:hover { border-color: #4a4a52; transform: translateY(-1px); }
.model-card.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.model-card strong { font-family: var(--head); font-size: 24px; letter-spacing: .04em; text-transform: uppercase; }
.model-card span { color: var(--muted); font-size: 13px; line-height: 1.35; }
.model-card em { font-style: normal; color: var(--gold); font-weight: 600; margin-top: 6px; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; }
.chip small { color: var(--muted); font-size: 12px; }
.chip:hover { border-color: #4a4a52; }
.chip.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.chip.on small { color: var(--gold-2); }
.chip:disabled { opacity: .4; cursor: not-allowed; }

/* swatches */
.swatches { display: flex; flex-wrap: wrap; gap: 9px; }
.swatch { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px #3a3a40; position: relative; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--gold); }
.swatch.on::after { content: ''; position: absolute; left: 13px; top: 7px; width: 8px; height: 15px; border: solid currentColor; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.swatch-name { font-size: 13px; color: var(--muted); margin-top: 8px; min-height: 18px; }
.swatch-name b { color: var(--text); font-weight: 500; }

/* zones */
.quick { background: var(--card); border: 1px dashed #3a3a42; border-radius: var(--radius); padding: 14px; margin-bottom: 18px; }
.quick p { margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.zone { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; background: var(--card); overflow: hidden; }
.zone.flash { animation: flash 1.2s; }
@keyframes flash { 0%,40% { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255,192,0,.25); } }
.zone-head { width: 100%; display: flex; align-items: center; gap: 12px; background: none; border: 0; padding: 12px 14px; text-align: left; }
.zone-head .dot { width: 26px; height: 26px; border-radius: 50%; box-shadow: 0 0 0 1px #45454c; flex: none; }
.zone-head .t { flex: 1; display: flex; flex-direction: column; }
.zone-head .t b { font-weight: 600; }
.zone-head .t small { color: var(--muted); font-size: 12px; }
.zone-head svg { color: var(--muted); transition: transform .2s; }
.zone.open .zone-head svg { transform: rotate(180deg); }
.zone-body { padding: 4px 14px 16px; display: none; }
.zone.open .zone-body { display: block; }
.zone-body .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 10px 0 8px; }

/* pattern cards */
.patterns { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.pattern { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; text-align: left; display: flex; flex-direction: column; gap: 6px; }
.pattern svg { width: 100%; height: 54px; stroke: var(--gold); stroke-width: 1.4; stroke-dasharray: 3 2; background: #2a2a30; border-radius: 6px; }
.pattern.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.pattern small { color: var(--muted); }

/* logo */
.logo-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.logo-block h4 { margin: 0 0 2px; font-family: var(--head); font-size: 18px; letter-spacing: .04em; text-transform: uppercase; }
.logo-block > p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.logo-extra { margin-top: 14px; display: grid; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea { background: #0f0f12; border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--gold); outline: none; }
.field.err input, .field.err select { border-color: var(--danger); }
.field .msg { color: var(--danger); font-size: 12px; min-height: 0; }
.upload { display: flex; align-items: center; gap: 12px; }
.upload img { width: 72px; height: 48px; object-fit: contain; background: #2a2a30; border-radius: 6px; }
.upload label.btn-sec { display: inline-flex; }

/* summary / form */
.summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; margin-bottom: 16px; }
.summary .row { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary .row:last-child { border-bottom: 0; }
.summary .row span { color: var(--muted); flex: 0 0 42%; }
.summary .row b { font-weight: 500; display: flex; align-items: center; gap: 7px; }
.summary .row i { width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 1px #555; flex: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form { display: grid; gap: 10px; }
.check { display: flex; gap: 10px; font-size: 13px; color: var(--muted); align-items: flex-start; }
.check input { margin-top: 3px; accent-color: var(--gold); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.success { text-align: center; padding: 18px 6px; }
.success .big { width: 64px; height: 64px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); display: grid; place-items: center; margin: 0 auto 14px; }
.success .big svg { width: 30px; height: 30px; stroke-width: 3; }
.success .ref { font-family: var(--head); font-size: 26px; letter-spacing: .06em; color: var(--gold); }
.success .actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* footer */
.panel-foot { border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; background: #0e0e11; position: relative; }
.price { background: none; border: 0; text-align: left; display: flex; flex-direction: column; padding: 0; }
.price-label { white-space: nowrap; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.price-label em { font-style: normal; background: #3a2f00; color: var(--gold); border-radius: 4px; padding: 0 5px; font-size: 10px; }
.price strong { white-space: nowrap; font-family: var(--head); font-size: 28px; font-weight: 700; letter-spacing: .02em; line-height: 1.05; }
.price small { color: var(--muted); font-size: 11px; text-decoration: underline dotted; }
.foot-actions { display: flex; gap: 8px; }
.btn-pri, .btn-sec { border-radius: 10px; padding: 12px 18px; font-family: var(--head); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: 15px; border: 1px solid transparent; text-decoration: none; text-align: center; }
.btn-pri { background: var(--gold); color: var(--gold-ink); }
.btn-pri:hover { background: var(--gold-2); }
.btn-pri:disabled { opacity: .6; cursor: progress; }
.btn-sec { background: transparent; border-color: var(--line); color: var(--text); }
.btn-sec:hover { border-color: #55555d; }
.breakdown { grid-column: 1 / -1; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; max-height: 40vh; overflow: auto; }
.breakdown div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.breakdown div:last-child { border-bottom: 0; font-weight: 600; }
.breakdown span:last-child { white-space: nowrap; }

.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 30px); background: #1d1d22; border: 1px solid var(--line); color: var(--text); padding: 10px 16px; border-radius: 10px; opacity: 0; transition: .25s; z-index: 30; pointer-events: none; font-size: 14px; max-width: 90vw; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: var(--danger); }
.appver { position: fixed; left: 10px; bottom: 6px; font-size: 10px; color: #77777e; pointer-events: none; z-index: 2; }
.noscript { padding: 20px; }

/* mobile */
@media (max-width: 900px) {
  :root { --topbar: 50px; }
  .topbar { padding: 0 12px; gap: 10px; }
  .topbar-title { display: none; }
  .ghost-btn span { display: none; }
  .layout { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar)); }
  .stage { flex: 0 0 46dvh; }
  #stageModel { font-size: 24px; }
  #stageTag { display: none; }
  .stage-top { top: 12px; left: 14px; }
  .stage-hint { display: none; }
  .stage-tools { bottom: 10px; }
  .stage-tools button { padding: 7px 10px; font-size: 12px; }
  .panel { flex: 1; border-left: 0; border-top: 1px solid var(--line); }
  .step-body { padding: 14px 14px 22px; }
  .models { grid-template-columns: 1fr 1fr; }
  .price strong { font-size: 24px; }
  .btn-pri, .btn-sec { padding: 11px 14px; font-size: 14px; }
  .appver { display: none; }
}
@media (max-width: 380px) { .grid2 { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
