/* Custom 300B — Gallery gold · iPhone mobile-first */
:root {
  --bg: #0d0d0d;
  --bg-deep: #121212;
  --ink: #f3ece0;
  --ink-soft: #d4cbb8;
  --muted: #9a8f7a;
  --paper: #161616;
  --paper-edge: rgba(201, 162, 39, 0.28);
  --copper: #c9a227;
  --copper-deep: #e0c56a;
  --gold: #c9a227;
  --gold-soft: #d4b45a;
  --accent: #c9a227;
  --accent-soft: rgba(201, 162, 39, 0.12);
  --danger: #c46a5a;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, sans-serif;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --phone-max: 430px;
  --header-h: 3rem;
  --order-h: 5.75rem;
  --tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  color-scheme: dark;
  height: 100%;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  font-family: var(--font-body);
  color: var(--ink);
  background: #080808;
  line-height: 1.35;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { color: var(--gold-soft); }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.2em;
  color: var(--ink);
}
h1 { font-size: 1.15rem; color: var(--gold-soft); }
h2 { font-size: 1.1rem; }
h3 { font-size: 1rem; }
em { font-style: italic; color: var(--gold); }

.eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 0.2rem;
}
.muted { color: var(--muted); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  min-height: 2.5rem;
  font: 600 0.88rem var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, background 0.15s, box-shadow 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #12100a;
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.32);
}
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--gold);
}
.btn-ghost {
  background: transparent;
  border-color: var(--paper-edge);
  color: var(--ink-soft);
  min-height: 2.4rem;
  padding: 0.4rem 0.75rem;
}
.btn-tiny {
  padding: 0.35rem 0.65rem;
  min-height: 2rem;
  font-size: 0.72rem;
  background: transparent;
  border: 1px solid var(--paper-edge);
  color: var(--ink-soft);
  border-radius: 8px;
}
.btn-tiny:active { border-color: var(--gold); color: var(--ink); }
.btn-link {
  background: none;
  border: none;
  color: var(--gold-soft);
  padding: 0.25rem;
  min-height: auto;
  font: 500 0.8rem var(--font-body);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.gate[hidden] { display: none !important; }
.gate {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  padding-top: calc(1.5rem + var(--safe-t));
  background: linear-gradient(160deg, #0a0a0a 0%, #16140f 50%, #0d0d0d 100%);
}
.gate-card {
  width: min(400px, 100%);
  background: rgba(22, 22, 22, 0.94);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.gate-card h1 { color: var(--gold-soft); font-size: 1.6rem; }
.gate-copy { color: var(--ink-soft); margin: 0; }
.gate-card form { display: flex; gap: 0.5rem; margin-top: 1rem; }
.gate-card input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(0,0,0,0.35);
  color: var(--ink);
  font: 400 1rem var(--font-body);
}
.gate-err { color: #f0a090; font-size: 0.88rem; }

/* ===== Phone shell (mobile-first) ===== */
.app {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: var(--phone-max);
  margin: 0 auto;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background:
    radial-gradient(600px 280px at 20% -5%, rgba(201, 162, 39, 0.08) 0%, transparent 55%),
    radial-gradient(400px 240px at 100% 0%, rgba(201, 162, 39, 0.04) 0%, transparent 50%),
    var(--bg);
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.12), 0 24px 80px rgba(0,0,0,0.55);
}
.app[hidden] { display: none !important; }

.site-header {
  flex: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  min-height: calc(var(--header-h) + var(--safe-t));
  padding: var(--safe-t) max(0.75rem, var(--safe-r)) 0 max(0.75rem, var(--safe-l));
  background: rgba(13, 13, 13, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--paper-edge);
}
.brand-block {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.brand-mark {
  width: 1.5rem; height: 1.5rem;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-size: 0.75rem;
  flex-shrink: 0;
}
.brand strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-soft);
  outline: none;
  white-space: nowrap;
}
.brand strong:focus { box-shadow: 0 0 0 2px var(--gold); border-radius: 3px; }

.btn-support {
  margin-left: auto;
  appearance: none;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #12100a;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  border: 1px solid rgba(201, 162, 39, 0.55);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  min-height: 2.25rem;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(201, 162, 39, 0.22);
}
.btn-support:active { transform: scale(0.98); }

.page {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.4rem max(0.65rem, var(--safe-l)) 0.35rem max(0.65rem, var(--safe-r));
  overflow: hidden;
}

.schematic-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.panel-toolbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--paper-edge);
}
.live-badge {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: #12100a;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  padding: 0.2rem 0.45rem;
  border-radius: 5px;
  flex-shrink: 0;
}
.toolbar-label {
  flex: 1;
  min-width: 0;
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toolbar-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }

.topo-strip {
  flex: 0 0 auto;
  padding: 0.3rem 0.55rem 0.35rem;
  border-bottom: 1px solid var(--paper-edge);
  background: linear-gradient(180deg, #181818, #141414);
}
.topo-strip-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.topo-label {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--copper);
  flex: 1;
}
.topo-strip.is-collapsed .schematic-strip { display: none; }
.schematic-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  margin-top: 0.35rem;
  padding-bottom: 0.15rem;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.schematic-strip::-webkit-scrollbar { display: none; }
.schematic-card {
  appearance: none;
  text-align: left;
  border: 1.5px solid var(--paper-edge);
  background: #1a1a1a;
  border-radius: 10px;
  padding: 0.45rem 0.65rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
  flex: 0 0 auto;
  min-width: 132px;
  max-width: 180px;
  scroll-snap-align: start;
  min-height: var(--tap);
}
.schematic-card.is-selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.18);
}
.schematic-card h4 { margin: 0 0 0.1rem; font-size: 0.85rem; }
.schematic-card p {
  margin: 0;
  font-size: 0.65rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.schematic-card .tag {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}

.chassis-banner {
  cursor: pointer;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 0.4rem 0.5rem 0;
  padding: 0.45rem 0.65rem;
  min-height: var(--tap);
  border: 1px solid var(--paper-edge);
  border-radius: 10px;
  background: #141414;
  transition: border-color 0.25s, background 0.25s;
}
.chassis-banner[data-chassis="ch-aluminum"] { border-color: rgba(192, 198, 210, 0.45); background: linear-gradient(90deg, #1a1c20, #141414); }
.chassis-banner[data-chassis="ch-steel"] { border-color: rgba(160, 155, 145, 0.4); background: linear-gradient(90deg, #161614, #121212); }
.chassis-banner[data-chassis="ch-wood"] { border-color: rgba(168, 120, 60, 0.55); background: linear-gradient(90deg, #1c1610, #141210); }
.chassis-banner[data-chassis="ch-copper"] { border-color: rgba(201, 140, 70, 0.65); background: linear-gradient(90deg, #1c1610, #16120e); }
.chassis-banner-label {
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.chassis-banner-name {
  font-family: var(--font-display);
  font-size: 0.95rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.15;
}
.chassis-banner-sound {
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.chassis-chevron {
  color: var(--gold);
  font-size: 1.35rem;
  font-weight: 300;
  flex-shrink: 0;
}

.svg-schematic-wrap {
  flex: 1 1 auto;
  min-height: 0;
  margin: 0.35rem 0.5rem 0.45rem;
  border: 1px solid var(--paper-edge);
  border-radius: 10px;
  background: linear-gradient(180deg, #121212, #0e0e0e);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  position: relative;
  transition: box-shadow 0.25s, border-color 0.25s;
}
.svg-schematic-wrap[data-chassis="ch-aluminum"] {
  border-color: rgba(192, 198, 210, 0.45);
  box-shadow: inset 0 0 28px rgba(180, 190, 210, 0.05);
}
.svg-schematic-wrap[data-chassis="ch-steel"] {
  border-color: rgba(160, 155, 145, 0.4);
  box-shadow: inset 0 0 32px rgba(0, 0, 0, 0.3);
}
.svg-schematic-wrap[data-chassis="ch-wood"] {
  border-color: rgba(168, 120, 60, 0.55);
  box-shadow: inset 0 0 28px rgba(140, 90, 40, 0.1);
}
.svg-schematic-wrap[data-chassis="ch-copper"] {
  border-color: rgba(201, 140, 70, 0.65);
  box-shadow: inset 0 0 24px rgba(201, 140, 70, 0.12);
}
.svg-schematic {
  min-width: 0;
  height: 100%;
  min-height: 160px;
  padding: 0.15rem;
  display: flex;
  align-items: center;
}
.svg-schematic svg {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  min-width: 640px;
}

.sch-node { cursor: pointer; }
.sch-node:focus { outline: none; }
.sch-node:focus-visible .sch-box,
.sch-node:focus-visible .sch-tube,
.sch-node:focus-visible .sch-banner {
  stroke: var(--gold);
  filter: drop-shadow(0 0 5px rgba(201, 162, 39, 0.45));
}
.sch-box, .sch-tube, .sch-banner {
  fill: #1a1a1a;
  stroke: rgba(201, 162, 39, 0.55);
  stroke-width: 1.8;
  transition: fill 0.2s, stroke 0.2s, filter 0.2s;
}
.sch-box--iron { fill: #1c1a16; }
.sch-tube--power { stroke-width: 2.2; }
.sch-banner { fill: #181612; stroke: rgba(201, 162, 39, 0.45); }
.sch-node.is-active .sch-box,
.sch-node.is-active .sch-tube,
.sch-node.is-active .sch-banner {
  stroke: var(--gold);
  filter: drop-shadow(0 0 5px rgba(201, 162, 39, 0.4));
}
.sch-node.is-custom .sch-box,
.sch-node.is-custom .sch-tube { fill: #1e1a10; stroke: var(--gold-soft); }
.sch-node.is-custom .sch-banner { fill: #1e1a10; stroke: var(--gold-soft); }
.sch-node.is-flash .sch-box,
.sch-node.is-flash .sch-tube,
.sch-node.is-flash .sch-banner { animation: sch-flash 0.95s ease; }
.sch-node.is-flash .sch-label-main { fill: var(--gold-soft); }
@keyframes sch-flash {
  0% { filter: drop-shadow(0 0 8px rgba(201, 162, 39, 0.7)); }
  100% { filter: drop-shadow(0 0 0 rgba(201, 162, 39, 0)); }
}
.sch-wire { stroke: var(--gold); stroke-width: 1.8; fill: none; }
.sch-wire--bplus { stroke: #a88b45; stroke-width: 1.5; stroke-dasharray: 4 3; }
.sch-wire--feedback { stroke: var(--gold-soft); stroke-width: 1.4; stroke-dasharray: 5 4; opacity: 0.85; }
.sch-label-main { font-family: var(--font-display), Georgia, serif; font-size: 14px; font-weight: 700; fill: var(--ink); }
.sch-label-main--sm { font-size: 11px; }
.sch-label-sub { font-family: var(--font-body), system-ui, sans-serif; font-size: 9px; fill: var(--ink-soft); }
.sch-label-hint { font-family: var(--font-body), system-ui, sans-serif; font-size: 8px; letter-spacing: 0.04em; fill: var(--muted); }
.sch-label-delta { font-family: var(--font-body), system-ui, sans-serif; font-size: 9px; font-weight: 600; fill: var(--copper-deep); }
.sch-caption { font-family: var(--font-body), system-ui, sans-serif; font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; fill: var(--muted); font-weight: 600; }
.sch-section { font-family: var(--font-body), system-ui, sans-serif; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; fill: var(--muted); font-weight: 600; }
.sch-banner-label { font-family: var(--font-body), system-ui, sans-serif; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; fill: var(--muted); font-weight: 600; }
.sch-banner-main { font-family: var(--font-display), Georgia, serif; font-size: 16px; font-weight: 700; fill: var(--ink); }
.sch-banner-sub { font-family: var(--font-body), system-ui, sans-serif; font-size: 10px; fill: var(--muted); }
.sch-anno { font-family: var(--font-body), system-ui, sans-serif; font-size: 10px; fill: var(--muted); font-style: italic; }
.sch-anno--bplus { font-style: normal; font-size: 9px; letter-spacing: 0.1em; font-weight: 600; }
.sch-footnote { font-family: var(--font-body), system-ui, sans-serif; font-size: 9px; fill: var(--muted); }

/* Horizontal swipe part chips */
.stage-rail {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  padding: 0.15rem 0.1rem 0.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.stage-rail::-webkit-scrollbar { display: none; }
.rail-chip {
  appearance: none;
  border: 1px solid var(--paper-edge);
  background: #1a1a1a;
  border-radius: 12px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.05rem;
  min-width: 88px;
  min-height: var(--tap);
  flex: 0 0 auto;
  scroll-snap-align: start;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.rail-chip:active { border-color: var(--gold); }
.rail-chip.is-active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.22);
  background: rgba(201, 162, 39, 0.1);
}
.rail-chip.is-custom {
  background: rgba(201, 162, 39, 0.1);
  border-color: var(--gold);
}
.rail-chip.is-flash { animation: stage-flash 0.85s ease; }
.rail-stage {
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.rail-pick {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@keyframes stage-flash {
  0% { box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.55); background: rgba(201, 162, 39, 0.18); }
  100% { box-shadow: 0 0 0 3px rgba(201, 162, 39, 0); }
}

/* Options sheet under chips */
.options-panel {
  flex: 0 0 auto;
  max-height: 32%;
  min-height: 0;
  padding: 0.55rem 0.65rem 0.55rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius);
}
.slot-empty h3 { margin-top: 0.1rem; font-size: 0.95rem; }
.slot-empty p { font-size: 0.75rem; color: var(--ink-soft); margin: 0.2rem 0 0; }
.slot-desc { color: var(--ink-soft); font-size: 0.78rem; margin: 0 0 0.4rem; }
#slot-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
#slot-detail[hidden] { display: none !important; }
.option-list {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.option-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.1rem 0.5rem;
  padding: 0.55rem 0.65rem;
  min-height: var(--tap);
  border: 1px solid var(--paper-edge);
  border-radius: 10px;
  background: #1a1a1a;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
}
.option-item:active, .option-item.is-selected {
  border-color: var(--gold);
  background: rgba(201, 162, 39, 0.1);
}
.option-item .opt-name { font-weight: 600; grid-column: 1; font-size: 0.82rem; }
.option-item .opt-cost {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--copper-deep);
  white-space: nowrap;
}
.option-item .opt-sound {
  grid-column: 1;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.25;
}
.option-item .opt-badge {
  display: inline-block;
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--bg-deep);
  color: var(--ink-soft);
  padding: 0.05rem 0.3rem;
  border-radius: 3px;
  margin-left: 0.3rem;
  vertical-align: middle;
}
.edu-card {
  flex: 0 0 auto;
  margin-top: 0.4rem;
  padding: 0.45rem 0.55rem;
  background: #121212;
  border: 1px solid var(--paper-edge);
  border-radius: 8px;
  max-height: 40%;
  overflow-y: auto;
}
.edu-card h4 { font-size: 0.88rem; }
.edu-card p { font-size: 0.72rem; color: var(--ink-soft); margin: 0.2rem 0 0.35rem; }
.edu-deeper {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--paper-edge);
  font-size: 0.7rem;
  color: var(--ink-soft);
}
.edu-deeper ul { margin: 0.25rem 0 0.4rem; padding-left: 1rem; }
.every-components { display: none; }

/* Gold Order CTA — bottom safe-area */
.order-dock {
  flex: 0 0 auto;
  padding: 0.5rem max(0.75rem, var(--safe-l)) calc(0.55rem + var(--safe-b)) max(0.75rem, var(--safe-r));
  background: linear-gradient(180deg, rgba(13,13,13,0) 0%, #12100c 18%, #141210 100%);
  border-top: 1px solid var(--paper-edge);
}
.order-costs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
  align-items: baseline;
}
.order-cost {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}
.order-cost-label {
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.order-cost strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--gold-soft);
  font-weight: 600;
}
.order-delta strong { color: var(--gold); font-size: 0.92rem; }
.config-summary { display: none; }
.order-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0.4rem;
  align-items: stretch;
}
.btn-order {
  min-height: 2.85rem;
  font-size: 0.95rem;
  border-radius: 14px;
}
.btn-order-alt {
  min-height: 2.85rem;
  border-radius: 14px;
}
.btn-save {
  min-width: 3.4rem;
  border-radius: 14px;
}
.share-line { font-size: 0.68rem; color: #c9bba5; margin: 0.35rem 0 0; text-align: center; }
.toast {
  margin: 0.35rem 0 0;
  padding: 0.4rem 0.55rem;
  background: rgba(201, 162, 39, 0.18);
  border: 1px solid rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--ink);
  text-align: center;
}

.modal {
  border: none;
  border-radius: var(--radius);
  padding: 0;
  background: transparent;
  max-width: min(400px, calc(100vw - 2rem));
  margin: auto;
}
.modal::backdrop { background: rgba(0, 0, 0, 0.72); }
.modal-card {
  background: var(--paper);
  padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--paper-edge);
  box-shadow: var(--shadow);
}
.modal-card h3 { margin-bottom: 0.4rem; font-size: 1.15rem; }
.modal-card p { color: var(--ink-soft); margin: 0 0 1rem; font-size: 0.9rem; }

/* Support drawer */
.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;
}
.support-drawer[hidden] { display: none !important; }
.support-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: center;
}
.support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  border: none;
  cursor: pointer;
}
.support-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(var(--phone-max), 100%);
  height: 100%;
  max-height: 100dvh;
  background: #141210;
  border-left: 1px solid rgba(201, 162, 39, 0.35);
  border-right: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.45);
  overflow: hidden;
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
}
.support-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--paper-edge);
  background: rgba(18, 16, 12, 0.95);
}
.support-head h2 { margin: 0; font-size: 1.15rem; color: var(--gold-soft); }
.support-head .eyebrow { margin: 0 0 0.1rem; }
.support-gate {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1.5rem 1.15rem;
  gap: 0.65rem;
}
.support-gate-copy { margin: 0; color: var(--ink-soft); font-size: 0.9rem; }
.support-gate form { display: flex; gap: 0.45rem; }
.support-gate input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.95rem;
  min-height: var(--tap);
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font: 400 0.95rem var(--font-body);
}
.support-gate input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(201, 162, 39, 0.2);
}
.support-gate-note {
  margin: 0.35rem 0 0;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.35;
}
.support-chat {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.support-chat[hidden] { display: none !important; }
.support-messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  -webkit-overflow-scrolling: touch;
}
.support-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.support-empty[hidden] { display: none !important; }
.support-msg {
  align-self: flex-end;
  max-width: 92%;
  background: rgba(201, 162, 39, 0.1);
  border: 1px solid rgba(201, 162, 39, 0.28);
  border-radius: 12px 12px 4px 12px;
  padding: 0.55rem 0.7rem 0.45rem;
}
.support-msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.support-msg-time {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.support-msg-del {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--danger);
  font: 500 0.72rem var(--font-body);
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  min-height: 2rem;
  border-radius: 4px;
}
.support-msg-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.35;
}
.support-msg-img {
  display: block;
  max-width: 100%;
  max-height: 180px;
  border-radius: 8px;
  margin-top: 0.35rem;
  object-fit: contain;
  background: #0a0a0a;
}
.support-compose {
  flex: 0 0 auto;
  border-top: 1px solid var(--paper-edge);
  padding: 0.65rem 0.85rem 0.75rem;
  background: #12100c;
}
.support-preview {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.45rem;
  padding: 0.35rem;
  border: 1px dashed rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.25);
}
.support-preview[hidden] { display: none !important; }
.support-preview img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}
.support-compose-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.support-attach { flex-shrink: 0; cursor: pointer; min-height: var(--tap); }
.support-compose-row input[type="text"] {
  flex: 1;
  min-width: 0;
  padding: 0.65rem 0.75rem;
  min-height: var(--tap);
  border-radius: 999px;
  border: 1px solid rgba(201, 162, 39, 0.35);
  background: rgba(0, 0, 0, 0.35);
  color: var(--ink);
  font: 400 0.85rem var(--font-body);
}
.support-compose-row input[type="text"]:focus {
  outline: none;
  border-color: var(--gold);
}
.support-compose-hint {
  margin: 0.35rem 0 0;
  font-size: 0.62rem;
  color: var(--muted);
}

/* Tall phone / room for schematic */
@media (min-height: 740px) {
  .options-panel { max-height: 28%; }
}
@media (max-height: 680px) {
  .options-panel { max-height: 26%; }
  .chassis-banner-sound { display: none; }
  .edu-card { display: none; }
}

/* Desktop: centered phone frame */
@media (min-width: 480px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background:
      radial-gradient(900px 500px at 50% -10%, rgba(201, 162, 39, 0.07) 0%, transparent 55%),
      #050505;
  }
  .app {
    height: min(900px, calc(100dvh - 2.5rem));
    max-height: min(900px, calc(100dvh - 2.5rem));
    border-radius: 28px;
    overflow: hidden;
  }
  .site-header { padding-top: 0.35rem; min-height: var(--header-h); }
  .support-panel { border-radius: 0; }
}
