:root {
  --ink: #3d372e;
  --muted: #8a8172;
  --line: #e7dfd0;
  --bg: #faf6ec;
  --card: #fffdf7;
  --accent: #c9662f;
  --ok: #16a34a;
  --warn: #d97706;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1520px; margin: 0 auto; padding: 0 clamp(20px, 3.5vw, 56px); }
header.site { padding: 26px 0 8px; display: flex; align-items: baseline; gap: 14px; }
.mark { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.mark span { color: var(--accent); }
.tag { color: var(--muted); font-size: 13.5px; }
.hero { padding: 30px 0 8px; }
.hero h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 6px; }
.hero p { color: var(--muted); margin: 0; max-width: 60ch; }
form.new { display: flex; gap: 8px; margin: 22px 0 8px; flex-wrap: wrap; }
form.new input[type=text], form.new input[type=email] {
  flex: 1; min-width: 260px; padding: 11px 13px; font: inherit;
  border: 1px solid var(--line); border-radius: 9px; background: var(--card);
}
form.new select { padding: 11px 10px; font: inherit; border: 1px solid var(--line); border-radius: 9px; background: var(--card); }
form.new button {
  padding: 11px 18px; font: inherit; font-weight: 600; color: #fff;
  background: var(--accent); border: 0; border-radius: 9px; cursor: pointer;
}
form.new button:hover { filter: brightness(1.08); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; padding: 22px 0 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: transform .12s ease; }
.card:hover { transform: translateY(-2px); }
.card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: #eceae6; }
.card .ph { width: 100%; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); background: #eceae6; font-size: 13px; }
.card .meta { padding: 10px 12px 12px; }
.card .t { font-weight: 600; font-size: 14px; }
.card .s { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: flex; gap: 8px; }
.chip { display: inline-block; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.chip.generating { background: #fef3c7; color: var(--warn); }
.chip.queued { background: #e5e7eb; color: #4b5563; }
.chip.review { background: #f8e3d2; color: #b05a20; }
.chip.error { background: #fee2e2; color: #b91c1c; }
.chip.published { background: #dcfce7; color: var(--ok); }
.chip.rejected { background: #f3f4f6; color: #6b7280; }
.chip.refs, .chip.building, .chip.judging { background: #fef3c7; color: var(--warn); }
.asset h1 { font-size: 24px; letter-spacing: -0.02em; margin: 18px 0 2px; }
.asset .sub { color: var(--muted); font-size: 13.5px; margin-bottom: 16px; }
#stage { width: 100%; height: 480px; border: 1px solid var(--line); border-radius: 14px; background: #eceae6; display: block; }
.row { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; align-items: center; }
.btn { padding: 9px 15px; border-radius: 9px; font-weight: 600; font-size: 13.5px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.shots { display: flex; gap: 8px; overflow-x: auto; padding: 6px 0 14px; }
.shots img { height: 110px; border-radius: 9px; border: 1px solid var(--line); background: #eceae6; }
pre.snippet {
  background: #16181d; color: #e5e7eb; border-radius: 10px; padding: 14px 16px;
  font: 12.5px/1.5 ui-monospace, "SF Mono", Menlo, monospace; overflow-x: auto;
}
table.passes { border-collapse: collapse; width: 100%; font-size: 13.5px; margin: 6px 0 50px; }
table.passes td, table.passes th { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
table.passes th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.gen { padding: 40px 0 60px; text-align: center; color: var(--muted); }
.gen .spin { font-size: 26px; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ---- landing ---- */
html { scroll-behavior: smooth; }
header.site { align-items: center; }
.nav-cta { margin-left: auto; }
.heroSplit { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(36px, 5vw, 80px); align-items: center; padding: 52px 0 26px; }
.heroSplit h1 { font-size: clamp(46px, 4.2vw, 62px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 14px;
  background: linear-gradient(120deg, var(--ink) 60%, var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.heroSplit p { color: var(--muted); font-size: 17.5px; max-width: 54ch; }
.btn.big { padding: 13px 22px; font-size: 15px; border-radius: 12px; }
.btn { transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary:hover { box-shadow: 0 8px 24px rgba(201,102,47,.35); }
.heroArt { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(120% 120% at 30% 20%, #ffffff 0%, #eceae6 55%, #e2ded6 100%);
  box-shadow: 0 30px 80px rgba(22,24,29,.12); }
#hero3d { width: 100%; height: clamp(380px, 32vw, 470px); display: block; cursor: grab; touch-action: none; }
#hero3d:active { cursor: grabbing; }
.heroArt .hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  font-size: 12px; color: var(--muted); background: rgba(255,255,255,.75); backdrop-filter: blur(6px);
  padding: 5px 12px; border-radius: 99px; pointer-events: none; white-space: nowrap; }
.badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.badges span { font-size: 12px; font-weight: 600; padding: 5px 12px; border: 1px solid var(--line);
  border-radius: 99px; background: var(--card); color: var(--muted); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; padding: 30px 0 10px; }
.features > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px;
  transition: transform .18s ease, box-shadow .18s ease; }
.features > div:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(22,24,29,.08); }
.features h4 { margin: 0 0 6px; font-size: 15px; }
.features p { margin: 0; color: var(--muted); font-size: 13.5px; }
.card.soon .ph.pal { display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #f3f1eb, #e6e2d9); }
.dots { display: flex; gap: 10px; }
.dots i { width: 26px; height: 26px; border-radius: 8px; display: block; animation: bob 3.2s ease-in-out infinite;
  box-shadow: 0 6px 14px rgba(22,24,29,.18); }
.dots i:nth-child(2) { animation-delay: .18s; } .dots i:nth-child(3) { animation-delay: .36s; }
.dots i:nth-child(4) { animation-delay: .54s; } .dots i:nth-child(5) { animation-delay: .72s; }
@keyframes bob { 50% { transform: translateY(-7px) rotate(4deg); } }
.price { display: flex; justify-content: center; padding: 36px 0; }
.priceCard { background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 32px 36px;
  max-width: 440px; width: 100%; text-align: center; box-shadow: 0 24px 70px rgba(201,102,47,.12); }
.priceTop { font-weight: 700; color: var(--accent); text-transform: uppercase; font-size: 12px; letter-spacing: .1em; }
.priceNum { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.1; }
.priceSub { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.priceCard ul { list-style: none; padding: 0; margin: 0 0 18px; text-align: left; }
.priceCard li { padding: 8px 0 8px 26px; position: relative; border-bottom: 1px dashed var(--line); font-size: 14px; }
.priceCard li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }
.priceCard form.new { margin: 6px 0 4px; }
.faq { max-width: 660px; padding: 6px 0 26px; }
.faq details { border-bottom: 1px solid var(--line); padding: 13px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq p { color: var(--muted); margin: 8px 0 2px; }
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (max-width: 860px) {
  .heroSplit { grid-template-columns: 1fr; padding-top: 26px; }
  .heroSplit h1 { font-size: 34px; }
  #hero3d { height: 320px; }
  .nav-cta { display: none; }
}

/* ---- landing: soft storefront theme (palette from the kit concepts) ---- */
body.landing {
  --ink: #3d372e; --muted: #8a8172; --line: #e7dfd0;
  --bg: #faf6ec; --card: #fffdf7;
  --accent: #d96f2e; --accent2: #5c7a4a; --sand: #d9c9a3;
  background:
    radial-gradient(1000px 600px at 8% -10%, rgba(217,111,46,.12), transparent 60%),
    radial-gradient(800px 500px at 100% 8%, rgba(217,201,163,.35), transparent 55%),
    radial-gradient(900px 700px at 50% 115%, rgba(122,154,92,.08), transparent 60%),
    var(--bg);
}
body.landing .mark span { color: var(--accent); }
body.landing .heroSplit h1 {
  background: linear-gradient(115deg, #3d372e 50%, #d96f2e);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
body.landing .heroArt {
  background: radial-gradient(120% 130% at 32% 18%, #fffdf7 0%, #f3ecdc 55%, #e9dfc8 100%);
  border-color: #e2d8c2;
  box-shadow: 0 1px 0 #fff inset, 0 24px 70px rgba(92,74,40,.16), 0 6px 18px rgba(92,74,40,.08);
}
body.landing .heroArt .hint { background: rgba(255,253,247,.85); color: var(--muted); }
body.landing .badges span { background: var(--card); border-color: var(--line); color: var(--muted); }
body.landing form.new input[type=email] { background: var(--card); border-color: var(--line); color: var(--ink); }
body.landing form.new input[type=email]::placeholder { color: #b3a990; }
body.landing .features > div { background: var(--card); border-color: var(--line); }
body.landing .features > div:hover { border-color: #ecd3b8; box-shadow: 0 16px 44px rgba(92,74,40,.12); }
body.landing h3 { font-size: 24px; letter-spacing: -0.02em; margin: 34px 0 4px; }
body.landing .card { background: var(--card); border-color: var(--line); }
body.landing .card:hover { border-color: #ecd3b8; box-shadow: 0 18px 44px rgba(92,74,40,.13); }
body.landing .card img, body.landing .card .ph { background: #f3ecdc; }
body.landing .card.soon .ph.pal { background: radial-gradient(120% 120% at 30% 20%, #fbf7ee 0%, #f0e8d6 60%, #e7dcc4 100%); }
body.landing .dots i { box-shadow: 0 6px 14px rgba(92,74,40,.22), 0 0 0 1px rgba(255,255,255,.5); }
body.landing .chip.queued { background: #efe9db; color: #8a8172; }
body.landing .priceCard {
  background: linear-gradient(180deg, rgba(217,111,46,.06), transparent 45%), var(--card);
  border-color: #e8d2ba;
  box-shadow: 0 24px 70px rgba(92,74,40,.16), 0 6px 18px rgba(92,74,40,.08);
}
body.landing .priceTop { color: var(--accent); }
body.landing .priceNum { color: var(--ink); }
body.landing .priceCard li { border-bottom-color: var(--line); }
body.landing .btn { background: var(--card); border-color: var(--line); color: var(--ink); }
body.landing .btn.primary { background: linear-gradient(120deg, #e07d3a, #c9662f); border: 0; color: #fffdf7; }
body.landing .btn.primary:hover { box-shadow: 0 10px 30px rgba(217,111,46,.4); }
body.landing form.new button { background: linear-gradient(120deg, #e07d3a, #c9662f); }
body.landing .faq details { border-bottom-color: var(--line); }
body.landing pre.snippet { background: #332f28; }

/* ---- store product pages ---- */
.productGrid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 20px; align-items: start; margin: 6px 0 10px; }
.buyBox { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; }
.buyBox.slim { max-width: 560px; margin: 6px 0 18px; }
.priceOpt { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; }
.priceOpt.best { border-color: rgba(201,102,47,.5); box-shadow: 0 0 0 1px rgba(201,102,47,.15); }
.priceOpt p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.po-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.po-price { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; color: var(--accent); }
body.landing .po-price { color: #c9662f; }
ul.specs { list-style: none; padding: 0; margin: 12px 0; }
ul.specs li { padding: 6px 0 6px 24px; position: relative; font-size: 13.5px; border-bottom: 1px dashed var(--line); }
ul.specs li::before { content: '✓'; position: absolute; left: 2px; color: var(--ok); font-weight: 700; }
body.landing #stage { background: radial-gradient(120% 130% at 32% 18%, #fffdf7 0%, #f3ecdc 55%, #e9dfc8 100%); border-color: #e2d8c2; }
@media (max-width: 860px) { .productGrid { grid-template-columns: 1fr; } }
.chip.free { background: #dcfce7; color: #15803d; } body.landing .chip.free { background: #e4eeda; color: #4a6a4f; }

/* ---- admin mobile ---- */
.tableWrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tableWrap table.passes { min-width: 560px; }
@media (max-width: 700px) {
  .wrap { padding: 0 14px; }
  header.site { flex-wrap: wrap; gap: 8px; padding-top: 16px; }
  .hero h1 { font-size: 24px; }
  form.new { flex-direction: column; }
  form.new input[type=text], form.new input[type=email], form.new select, form.new button { width: 100%; min-width: 0; }
  .kitBoard { padding: 12px; }
  .kitPartRow { row-gap: 2px; }
  .kitPartRow .btn { margin-left: auto; }
  .btn, .btn.small { padding: 8px 14px; } /* comfortable tap targets */
  table.passes { font-size: 12.5px; }
  table.passes td, table.passes th { padding: 6px 8px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}

/* ---- brand ---- */
.brand { display: inline-flex; align-items: center; }
.brandIcon { width: 30px; height: 30px; border-radius: 8px; display: block; margin-right: 9px; }

/* compact kit concept image on small screens */
@media (max-width: 760px) {
  .kitRef img { aspect-ratio: 16 / 7; object-fit: cover; border-radius: 10px; }
}

/* grid blowout guard: never let the concept image's intrinsic size stretch the board */
.kitBoard > * { min-width: 0; }
.kitRef img { max-width: 100%; }
@media (max-width: 760px) { .kitBoard { grid-template-columns: minmax(0, 1fr); } }
/* ---- review tooling ---- */
.hier { margin: 4px 0 16px; }
.hier summary { font-weight: 600; font-size: 13.5px; cursor: pointer; color: var(--muted); }
.tree { border: 1px solid var(--line); border-radius: 10px; margin-top: 8px; padding: 8px 0; background: var(--card); max-height: 300px; overflow-y: auto; }
.treeRow { display: block; padding: 3px 12px; font-size: 13px; }
.treeRow.treeHead { font-weight: 700; border-bottom: 1px solid var(--line); padding-bottom: 7px; margin-bottom: 5px; }
.treeRow input { vertical-align: -1px; }
.reviewBox { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card); margin: 6px 0 20px; }
.reviewBox textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; resize: vertical; background: var(--bg); }
.btn.small { padding: 4px 10px; font-size: 12.5px; }
.chip.planned { background: #e0e7ff; color: #4338ca; }
.chip.needs-work { background: #ffedd5; color: #c2410c; }
.chip.parts, .chip.planning, .chip.composing, .chip.kit-judging, .chip.compose-queued { background: #fef3c7; color: var(--warn); }
.kitBoard { display: grid; grid-template-columns: 240px 1fr; gap: 16px; border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: var(--card); margin: 10px 0 24px; }
.kitRef img { width: 100%; border-radius: 10px; border: 1px solid var(--line); display: block; }
.kitRef .ph { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--muted); background: #eceae6; border-radius: 10px; font-size: 13px; }
.kitParts { margin-top: 10px; display: flex; flex-direction: column; gap: 5px; }
.kitPartRow { display: flex; gap: 8px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
@media (max-width: 760px) { .kitBoard { grid-template-columns: 1fr; } }

/* bigger brand on the landing */
body.landing .brandIcon { width: 58px; height: 58px; border-radius: 14px; margin-right: 14px; }
body.landing .mark.brand { font-size: 24px; }

/* hero brand above the title; feature card corner icons */
body.landing .heroBrand { display: inline-flex; align-items: center; margin-bottom: 30px; font-size: 30px; }
body.landing .heroBrand .brandIcon { width: 84px; height: 84px; border-radius: 20px; margin-right: 17px; }
.features > div { position: relative; padding-right: 140px; min-height: 150px; }
.featIcon { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 120px; height: 120px; }
