:root {
  /* Paper and ink (approved website tokens) */
  --ink: #0f1630;
  --ink-2: #4a5168;
  --ink-3: #5a6178;
  --line: #e3e6ee;
  --line-2: #eceff5;
  --bg: #f1f3f7;            /* concrete grey */
  --surface: #ffffff;
  --blue: #2a46c4;          /* cobalt: selected states */
  --blue-600: #2239a6;
  --blue-700: #1b2f8a;
  --blue-50: #ebeefa;
  --blue-100: #d6ddf6;
  --gold: #e1c635;          /* primary buttons only, with ink text */
  --gold-600: #d1b625;
  --gold-50: #fbf6dc;
  --gold-ink: #0f1630;
  --ok: #1f7a4d;
  --radius: 16px;
  --radius-s: 12px;
  --shadow-1: 0 1px 2px rgba(15, 22, 48, 0.06), 0 1px 1px rgba(15, 22, 48, 0.03);
  --shadow-2: 0 10px 28px -14px rgba(15, 22, 48, 0.22), 0 2px 6px rgba(15, 22, 48, 0.05);
  --header-h: 64px;
  --dock-h: 88px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }
a { color: var(--blue); }
[hidden] { display: none !important; }
.noscript { padding: 24px; }

/* ---------------------------------------------------------------- header */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-in {
  max-width: 1200px; margin: 0 auto; height: var(--header-h);
  padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px; position: relative; flex: none;
  background: linear-gradient(135deg, #2b62c6, var(--blue) 55%, var(--blue-700));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
}
.brand-mark::after {
  content: ""; position: absolute; left: 6px; right: 6px; top: 11px; height: 4px; border-radius: 2px; background: var(--gold);
}
.brand-name { font-weight: 800; letter-spacing: -0.02em; font-size: 17px; }
.brand-tag {
  font-size: 12px; font-weight: 600; color: var(--blue); background: var(--blue-50);
  padding: 3px 8px; border-radius: 999px; letter-spacing: 0.01em;
}
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; align-items: center; }
.steps li {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-3);
  padding: 6px 10px 6px 6px; border-radius: 999px;
}
.steps .n {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px;
  background: var(--line-2); color: var(--ink-3);
}
.steps li.done .n { background: var(--blue-100); color: var(--blue); }
.steps li.on { color: var(--ink); background: var(--blue-50); }
.steps li.on .n { background: var(--blue); color: #fff; }
.steps em { font-style: normal; font-weight: 500; font-size: 11px; color: var(--ink-3); margin-left: 2px; }
.steps li.opt:not(.on) .n { background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
@media (max-width: 760px) {
  .brand-tag { display: none; }
  .brand-name { font-size: 16px; }
  .steps { gap: 4px; }
  .steps .n { width: 20px; height: 20px; font-size: 11px; }
  .steps li.on .l { white-space: nowrap; font-size: 12px; }
  .steps em { display: none; }
  .steps .l { display: none; }
  .steps li { padding: 0; }
  .steps li.on .l { display: inline; padding-right: 8px; }
  .steps li.on { padding: 3px 3px 3px 3px; }
}

/* ---------------------------------------------------------------- layout */
.wrap { max-width: 1200px; margin: 0 auto; padding: 32px 20px calc(var(--dock-h) + 48px); }
.wrap.narrow { max-width: 760px; padding-bottom: 64px; }
.intro { max-width: 680px; }
.eyebrow {
  margin: 0 0 10px; font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue);
}
h1 { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.08; letter-spacing: -0.03em; margin: 0 0 12px; font-weight: 800; }
h2 { font-size: 20px; letter-spacing: -0.015em; margin: 0; font-weight: 700; }
.lead { margin: 0; color: var(--ink-2); font-size: 17px; max-width: 560px; }

/* ---------------------------------------------------------------- presets */
.presets { margin: 28px 0 8px; display: flex; flex-direction: column; gap: 10px; }
.presets-label { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 9px 14px 9px 12px;
  font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  box-shadow: var(--shadow-1); transition: border-color 0.15s, background 0.15s, transform 0.15s var(--ease);
  white-space: nowrap;
}
.chip:hover { border-color: #c9d3e3; }
.chip:active { transform: scale(0.98); }
.chip .chip-ico { width: 18px; height: 18px; color: var(--blue); flex: none; }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip[aria-pressed="true"] .chip-ico { color: #fff; }
@media (max-width: 640px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 2px 20px 6px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
}

/* ---------------------------------------------------------------- catalog */
.cat { margin-top: 36px; }
.cat-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cat-count { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.tile {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-1);
  transition: border-color 0.15s, box-shadow 0.2s var(--ease);
}
.tile.has { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow-2); }
.tile-img {
  border: 0; padding: 0; cursor: pointer; border-radius: 12px; background: linear-gradient(180deg, #f7f9fc, #eef2f7);
  aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden;
}
.tile-img img { width: 78%; height: 100%; object-fit: contain; transition: transform 0.25s var(--ease); }
.tile-img:hover img { transform: scale(1.04); }
.tile-name { font-size: 14px; font-weight: 600; line-height: 1.3; margin: 4px 2px 0; min-height: 2.6em; }
.tile-dims { font-size: 12px; color: var(--ink-3); margin: -4px 2px 0; font-variant-numeric: tabular-nums; }
.badge {
  position: absolute; top: 14px; right: 14px; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center;
  transform: scale(0); transition: transform 0.2s var(--ease);
}
.tile.has .badge { transform: scale(1); }
.counter {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between;
  background: var(--bg); border-radius: 999px; padding: 4px;
}
.counter button {
  width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface); cursor: pointer;
  display: grid; place-items: center; box-shadow: var(--shadow-1); color: var(--ink);
  transition: background 0.15s, transform 0.12s;
}
.counter button:active { transform: scale(0.92); }
.counter button.inc { background: var(--blue); color: #fff; }
.counter button.inc:hover { background: var(--blue-600); }
.counter button:disabled { opacity: 0.35; cursor: default; }
.counter output { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 15px; min-width: 2ch; text-align: center; }
.catalog-foot { margin-top: 24px; display: flex; justify-content: flex-end; }
.link-btn {
  border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; padding: 8px 4px;
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line);
}
.link-btn:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------------------------------------------------------------- dock */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line); box-shadow: 0 -10px 30px -18px rgba(14, 23, 38, 0.25);
  padding-bottom: env(safe-area-inset-bottom);
}
.dock-in {
  max-width: 1200px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; gap: 16px;
  justify-content: space-between; min-height: var(--dock-h);
}
.dock-info { min-width: 0; flex: 1; }
.dock-line { display: flex; align-items: center; gap: 8px; font-size: 15px; font-variant-numeric: tabular-nums; }
.dock-line strong { font-size: 18px; letter-spacing: -0.01em; }
.dot { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-3); }
.dock-fit { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.dock-fit span#dock-fit { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.meter { width: 120px; height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; flex: none; }
.meter span { display: block; height: 100%; width: 0; background: var(--blue); border-radius: 99px; transition: width 0.4s var(--ease); }
.meter.warn span { background: var(--gold); }
@media (max-width: 480px) {
  .dock-fit .meter { position: absolute; left: 0; right: 0; top: -1px; width: auto; height: 3px; border-radius: 0; background: var(--line-2); }
  .dock-fit .meter span { border-radius: 0 3px 3px 0; }
  .dock-fit { margin-top: 3px; }
  .dock-in { gap: 12px; padding: 12px 16px; }
  .dock .btn.primary { padding: 13px 16px; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 650; font-size: 15px; padding: 13px 22px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, transform 0.12s var(--ease), box-shadow 0.2s; line-height: 1.2;
}
.btn:active { transform: scale(0.98); }
.btn.primary { background: var(--blue); color: #fff; box-shadow: 0 8px 20px -10px rgba(31, 79, 168, 0.8); }
.btn.primary:hover { background: var(--blue-600); }
.btn.primary:disabled { background: #b8c4d8; box-shadow: none; cursor: default; }
.btn.secondary { background: var(--surface); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-1); }
.btn.secondary:hover { border-color: #c4cedd; }
.btn.ghost { background: rgba(255, 255, 255, 0.9); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-1); }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; }
.btn svg { flex: none; }
:focus-visible { outline: 3px solid rgba(31, 79, 168, 0.35); outline-offset: 2px; }

/* ---------------------------------------------------------------- result */
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 18px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow-2); overflow: hidden;
}
.rec { padding: 28px; position: relative; }
.rec-top { display: flex; align-items: center; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 999px; background: var(--gold-50); color: var(--gold-ink);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.size-big { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 6px; }
.size-big .num { font-size: clamp(72px, 16vw, 112px); line-height: 0.9; font-weight: 800; letter-spacing: -0.05em; }
.size-big .unit { font-size: 28px; font-weight: 700; color: var(--ink-2); letter-spacing: -0.02em; }
.rec-sub { color: var(--ink-2); margin: 8px 0 0; font-size: 16px; max-width: 520px; }
.gauge { margin: 22px 0 6px; }
.gauge-bar { position: relative; height: 12px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.gauge-bar span { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 99px; background: linear-gradient(90deg, #2b62c6, var(--blue)); transition: width 0.9s var(--ease); }
.gauge-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); opacity: 0.5; }
.gauge-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 8px; font-weight: 500; }
.rec-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }
.rec-actions .btn { flex: 1 1 200px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.fact { padding: 16px 20px; border-right: 1px solid var(--line); }
.fact:last-child { border-right: 0; }
.fact dt { font-size: 12px; color: var(--ink-3); font-weight: 600; }
.fact dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
@media (max-width: 480px) {
  .rec { padding: 22px; }
  .fact { padding: 14px 14px; }
  .fact dd { font-size: 15px; }
}
.upsell {
  margin-top: 14px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1);
}
.upsell h3 { margin: 0; font-size: 15px; }
.upsell p { margin: 2px 0 0; font-size: 14px; color: var(--ink-2); }
.footnote { font-size: 13px; color: var(--ink-3); margin: 18px 4px 0; }
.talk { padding: 28px; }
.talk h2 { font-size: 28px; letter-spacing: -0.02em; }
.talk p { color: var(--ink-2); }
.contact-list { display: grid; gap: 10px; margin-top: 18px; }

/* ---------------------------------------------------------------- viewer */
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 380px; height: calc(100vh - var(--header-h)); height: calc(100dvh - var(--header-h)); }
.stage { position: relative; background: #f1f3f7; overflow: hidden; min-height: 320px; }
.canvas-host { position: absolute; inset: 0; touch-action: none; }
.canvas-host canvas { display: block; width: 100% !important; height: 100% !important; outline: none; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ulabel {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%); font-size: 12px; font-weight: 700; color: #fff;
  background: var(--blue); padding: 3px 7px; border-radius: 7px; box-shadow: 0 4px 10px -4px rgba(19, 51, 111, 0.6);
  font-variant-numeric: tabular-nums; white-space: nowrap; will-change: transform; transition: opacity 0.3s;
}
.ulabel::after {
  content: ""; position: absolute; left: 50%; bottom: -4px; width: 8px; height: 8px; background: var(--blue);
  transform: translateX(-50%) rotate(45deg); border-radius: 1px;
}
.ulabel.ex { background: var(--gold); color: #2a1d00; }
.ulabel.small { font-size: 9px; padding: 2px 5px; border-radius: 5px; transform: translate(-50%, -50%); }
.ulabel.small::after { display: none; }
.ulabel.ex::after { background: var(--gold); }
.stage-top { position: absolute; left: 14px; right: 14px; top: 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; pointer-events: none; }
.stage-top > * { pointer-events: auto; }
.stage-chip {
  background: rgba(255, 255, 255, 0.92); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; font-size: 13px;
  font-weight: 600; box-shadow: var(--shadow-1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); max-width: 70%;
}
.stage-chip:empty { display: none; }
.stage-chip .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--blue); margin-right: 6px; vertical-align: -1px; }
.stage-hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); background: rgba(14, 23, 38, 0.72); color: #fff;
  font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 999px; pointer-events: none; white-space: nowrap;
  animation: hint 4.5s ease forwards;
}
@keyframes hint { 0%, 75% { opacity: 1; } 100% { opacity: 0; } }
.fade { position: absolute; inset: 0; background: #f1f3f7; opacity: 0; pointer-events: none; transition: opacity 0.22s ease; }
.fade.on { opacity: 1; }
.loader {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; background: #f1f3f7;
  color: var(--ink-2); font-size: 14px; font-weight: 600; text-align: center; padding: 20px;
}
.loader p { margin: 0; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--blue-100); border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader-bar { width: 160px; height: 4px; border-radius: 99px; background: var(--blue-100); overflow: hidden; }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--blue); transition: width 0.2s; }

.panel { background: var(--surface); border-left: 1px solid var(--line); padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.panel h2 { font-size: 26px; letter-spacing: -0.025em; }
.panel .size-big { margin: 12px 0 2px; }
.panel .size-big .num { font-size: clamp(56px, 9vw, 76px); }
.panel .size-big .num.word { font-size: clamp(44px, 7vw, 56px); letter-spacing: -0.04em; }
.panel .size-big .unit { font-size: 22px; }
.size-big .tag {
  align-self: center; margin-left: 8px; font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--blue); background: var(--blue-50); padding: 4px 9px; border-radius: 999px;
}
.panel .fillbox .gauge-bar { position: relative; overflow: visible; }
.panel .fillbox .gauge-bar span { position: absolute; left: 0; top: 0; bottom: 0; }
.panel .fillbox .gauge-bar i { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-3); opacity: 0.5; }
.panel .fillbox .gauge-legend { margin-top: 8px; gap: 10px; }
.panel .upsell { margin-top: 0; box-shadow: none; padding: 14px 16px; }
.panel .footnote { margin: 0; }
.note.slim { background: var(--blue-50); color: var(--blue-700); }
.note.slim svg { color: var(--blue); }
.panel .kicker { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue); margin: 0 0 6px; }
.panel p { margin: 0; color: var(--ink-2); font-size: 15px; }
.panel .muted { font-size: 13px; color: var(--ink-3); }
.panel .actions { display: grid; gap: 10px; padding-top: 4px; }
.panel .row { display: flex; gap: 10px; }
.panel .row .btn { flex: 1; }
.fillbox { background: var(--bg); border-radius: 14px; padding: 14px 16px; }
.fillbox .top { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.fillbox .top span:last-child { font-size: 22px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.fillbox .gauge-bar { height: 8px; margin-top: 10px; background: #e2e7ef; }
.note {
  display: flex; gap: 10px; font-size: 13px; color: var(--ink-2); background: var(--gold-50); border-radius: 12px; padding: 12px 14px;
}
.note svg { flex: none; color: var(--gold-ink); margin-top: 1px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 4px; border-radius: 2px; background: var(--blue); display: inline-block; }
.legend i.line { background: #9aa3ae; }
.legend i.fig { width: 8px; height: 14px; border-radius: 4px; background: #8a929c; }
.warn-box { background: #fff4f2; color: #8a2a17; border-radius: 12px; padding: 12px 14px; font-size: 13px; }

@media (max-width: 900px) {
  .viewer { display: block; height: auto; }
  .stage { height: 52vh; height: 52svh; min-height: 300px; }
  .panel { border-left: 0; border-top: 1px solid var(--line); padding: 20px 20px calc(28px + env(safe-area-inset-bottom)); }
  .panel .actions { margin-top: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- round 3: view toggle, size switch */
.viewseg {
  display: inline-flex; gap: 2px; padding: 3px; border-radius: 14px; background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line); box-shadow: var(--shadow-1); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.viewseg button {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer; min-height: 40px;
  padding: 0 12px; border-radius: 11px; font-size: 13px; font-weight: 650; color: var(--ink-2); transition: background 0.15s, color 0.15s;
}
.viewseg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.viewseg button:not([aria-pressed="true"]):hover { background: var(--blue-50); color: var(--ink); }
@media (max-width: 420px) { .viewseg button { padding: 0 9px; font-size: 12px; gap: 5px; } }
.seg {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 16px; background: var(--bg);
  border: 1px solid var(--line);
}
.seg button {
  border: 0; background: none; cursor: pointer; border-radius: 12px; padding: 8px 10px; text-align: left; line-height: 1.25;
  font-size: 12px; font-weight: 600; color: var(--ink-3); min-height: 48px;
}
.seg button b { display: block; font-size: 16px; color: var(--ink-2); letter-spacing: -0.01em; }
.seg button[aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow-1); color: var(--blue); }
.seg button[aria-pressed="true"] b { color: var(--ink); }
.example-note { font-size: 13px; color: var(--ink-2); background: var(--bg); border-radius: 10px; padding: 9px 12px; margin-top: 10px; }
.upsell .up-actions { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }

/* ================================================================ round 5: Paper and ink */
h1, h2, .panel h2 { font-weight: 900; }
h1 { text-transform: uppercase; line-height: 0.95; letter-spacing: -0.01em; font-size: clamp(32px, 5vw, 52px); }
.topbar { background: rgba(255, 255, 255, 0.96); border-bottom: 1px solid #e6e9f0; }
.brand { gap: 12px; }
.logo { height: 34px; width: auto; display: block; }
.brand-tag { color: var(--blue); background: var(--blue-50); font-weight: 800; letter-spacing: 0.02em; }
.steps li { font-weight: 800; }
.steps li.on { background: var(--blue-50); color: var(--ink); }
.steps li.on .n { background: var(--blue); }
.steps li.done .n { background: var(--blue-100); color: var(--blue); }

/* items screen hero with the astronaut */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hero .intro { flex: 1; min-width: 0; }
.lead { color: var(--ink-2); margin-top: 12px; }
.astro { position: relative; display: flex; align-items: flex-start; gap: 6px; flex: none; }
.astro img { width: 120px; height: auto; display: block; }
.bubble {
  position: relative; margin: 6px 0 0; max-width: 168px; padding: 9px 11px; border-radius: 14px 14px 2px 14px;
  background: #fff; color: var(--ink); border: 1.5px solid var(--ink); box-shadow: 0 6px 16px -10px rgba(15, 22, 48, 0.5);
  font: 600 11px/1.4 Orbitron, var(--font); letter-spacing: 0.01em;
}
.astro.small img { width: 74px; }
.astro.small .bubble { max-width: 150px; font-size: 10px; padding: 7px 9px; margin-top: 2px; }
@media (max-width: 600px) {
  .hero { align-items: flex-start; }
  .hero .astro { flex-direction: column; align-items: flex-end; margin-right: -6px; }
  .hero .astro img { width: 88px; margin-top: -4px; }
  .hero .bubble { max-width: 132px; font-size: 10px; padding: 7px 9px; }
  h1 { font-size: 30px; }
}

/* chips, tiles */
.chip { font-weight: 800; border-color: #d5d9e3; box-shadow: none; }
.chip .chip-ico { color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); }
.cat-head h2 { font-size: 15px; text-transform: uppercase; letter-spacing: 0.06em; }
.tile { background: var(--bg); border: 2px solid transparent; box-shadow: none; border-radius: 16px; }
.tile.has { background: #fff; border-color: var(--blue); box-shadow: 0 6px 16px rgba(15, 22, 48, 0.08); }
.tile-img { background: #fff; }
.tile-name { font-weight: 800; }
.tile-dims { color: var(--ink-3); }
.badge { background: var(--blue); }
.counter { background: transparent; padding: 0; gap: 6px; }
.counter button { width: 44px; height: 44px; border-radius: 12px; background: #fff; box-shadow: none; border: 1px solid #d5d9e3; color: var(--ink); }
.counter button.inc { background: #fff; color: var(--ink); }
.tile.has .counter button { background: var(--blue); border-color: var(--blue); color: #fff; }
.counter output { font-weight: 900; }
.link-btn { color: var(--ink-2); font-weight: 700; }

/* buttons: gold only for the primary action, ink text */
.btn { font-weight: 900; border-radius: 14px; }
.btn.primary { background: var(--gold); color: var(--ink); box-shadow: 0 8px 18px -12px rgba(15, 22, 48, 0.6); }
.btn.primary:hover { background: var(--gold-600); }
.btn.primary:disabled { background: #e8e4c6; color: #6f7487; }
.btn.secondary { background: #fff; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; font-weight: 800; }
.btn.secondary:hover { background: var(--bg); border-color: var(--ink); }
.btn.ghost { border-radius: 999px; font-weight: 800; }
.btn { min-height: 44px; }
.btn.small { min-height: 40px; }
:focus-visible { outline: 3px solid rgba(42, 70, 196, 0.45); }

/* sticky bar: ink */
.dock { background: var(--ink); border-top: 0; box-shadow: 0 -10px 30px -18px rgba(15, 22, 48, 0.6); }
.dock-line { color: #fff; }
.dock-line span { color: #c3c9e2; }
.dot { background: #aab3d4; }
.dock-fit { color: #fff; font-weight: 800; font-size: 14px; }
.meter { background: #2b3354; }
.meter span { background: var(--gold); }
.meter.warn span { background: #ff8a65; }
.dock .btn.primary:disabled { background: #3a4366; color: #aab3d4; box-shadow: none; }
@media (max-width: 480px) { .dock-fit .meter { background: #2b3354; } }

/* size screen */
.pill { background: var(--blue-50); color: var(--blue); font-weight: 900; }
.pill::before { background: var(--blue); }
.rec-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.size-big .num { font-weight: 900; letter-spacing: -0.04em; }
.size-big .unit { font-weight: 900; color: var(--ink); }
.size-big .tag { color: var(--blue); background: var(--blue-50); font-weight: 900; }
.seg { background: var(--bg); border: 0; border-radius: 14px; }
.seg button { font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; font-size: 11px; color: var(--ink-3); }
.seg button b { font-size: 17px; font-weight: 900; text-transform: none; letter-spacing: 0; color: var(--ink-3); }
.seg button[aria-pressed="true"] { color: var(--blue); box-shadow: 0 2px 8px rgba(15, 22, 48, 0.1); }
.seg button[aria-pressed="true"] b { color: var(--ink); }
.fillbox { background: var(--bg); }
.fillbox .top span:last-child { color: var(--blue); font-weight: 900; }
.gauge-bar span, .fillbox .gauge-bar span { background: var(--blue); }
.note { background: var(--bg); color: var(--ink-2); }
.note svg { color: var(--ink-2); }
.note.slim { background: var(--blue-50); color: var(--blue-700); }
.example-note { background: var(--bg); color: var(--ink-2); }
.upsell { border-radius: 16px; }
.talk h2 { text-transform: uppercase; }
.card { border-radius: 20px; }
.panel .kicker { color: var(--blue); font-weight: 900; }
.ulabel { background: var(--blue); font-family: var(--font); font-weight: 900; }
.ulabel.ex { background: var(--ink); color: #fff; }
.ulabel.ex::after { background: var(--ink); }
.stage-chip { font-weight: 800; }
.stage-chip .sw { background: var(--blue); }
.spinner { border-color: var(--blue-100); border-top-color: var(--blue); }
.loader-bar span { background: var(--blue); }

/* view toggle: over the canvas on desktop, in its own bar under the 3D view on phones */
.viewer { position: relative; }
.viewbar { position: absolute; left: 14px; top: 14px; z-index: 6; }
.viewseg { border-radius: 999px; padding: 3px; }
.viewseg button { border-radius: 999px; min-height: 40px; font-weight: 800; color: var(--ink); }
.viewseg button[aria-pressed="true"] { background: var(--blue); color: #fff; }
@media (max-width: 900px) {
  .viewbar { position: static; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
  .viewseg { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; background: var(--bg); border: 0; box-shadow: none; }
  .viewseg button { justify-content: center; min-height: 44px; }
  .stage { height: 46vh; height: 46svh; min-height: 280px; }
}
/* size panel astronaut: bubble above the picture so it never pushes past the panel */
.rec-head .pill { white-space: nowrap; }
.astro.small { flex-direction: column; align-items: flex-end; gap: 2px; max-width: 46%; }
.astro.small img { width: 62px; margin-right: 4px; }
.astro.small .bubble { max-width: 100%; border-radius: 14px 14px 2px 14px; }
.astro.small { flex: 0 1 auto; min-width: 0; }
.rec-head > div:first-child { flex: none; }

/* chip and Skip: over the canvas on desktop, in a bar under the 3D view on phones (never over the unit) */
.stage-top { position: absolute; left: 14px; top: 14px; right: calc(380px + 14px); z-index: 6; }
@media (max-width: 900px) {
  .stage-top { position: static; padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); align-items: center; }
  .stage-chip { box-shadow: none; border: 0; background: var(--bg); max-width: none; flex: 1; }
}

/* long FR/DE labels: let the replay / change items row wrap instead of overflowing */
.panel .row { flex-wrap: wrap; }
.panel .row > .btn { flex: 1 1 auto; min-width: 0; }

/* language switch in the header */
.langsel { flex: none; margin-left: 8px; }
.langsel select { appearance: none; -webkit-appearance: none; height: 36px; min-width: 52px; padding: 0 22px 0 12px; border: 1px solid #d5d9e3; border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%230f1630' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center;
  font: 800 13px/1 'Nunito Sans', system-ui, sans-serif; color: var(--ink, #0f1630); cursor: pointer; }
.langsel select:focus-visible { outline: 3px solid #2a46c4; outline-offset: 2px; }
.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; }
/* German: CSS capitals turn ß into SS, so small labels keep their written case (headlines stay in capitals) */
html[lang="de"] *:not(h1):not(.cat-head h2):not(.talk h2) { text-transform: none !important; }

.topbar-in .steps { margin-left: auto; }
@media (max-width: 420px) { .topbar-in { gap: 8px; padding: 0 14px; } .langsel { margin-left: 2px; } .langsel select { min-width: 48px; padding: 0 18px 0 10px; background-position: right 7px center; } }

.dock-line strong, .dock-line span { white-space: nowrap; }
.dock-line { min-width: 0; overflow: hidden; }
@media (max-width: 420px) { .dock .btn.primary { padding-left: 14px; padding-right: 12px; } }
