/* TENON Nº 1, a made-to-commission headphone atelier.
   The page is the atelier's pearl-grey salon; the headphones sit in their open case, lined in the
   velvet you choose. One accent, amethyst, marks the choice you made and the one action. */
:root {
  --page: #e6e2de;         /* pearl stone */
  --page-2: #eeebe7;       /* a lighter panel */
  --ink: #1f1a22;
  --ink-2: #5a535d;
  --ink-3: #8a838b;
  --hair: rgba(31, 26, 34, .13);
  --hair-2: rgba(31, 26, 34, .26);
  --accent: #6a2fb0;       /* amethyst */
  --accent-2: #57249a;
  --accent-soft: rgba(106, 47, 176, .09);
  --ivory: #f3eee7;        /* lettering on the velvet */
  --lining: #3a2150;       /* set by the chosen case lining */
  --serif: 'Cormorant', 'Cormorant Garamond', Garamond, 'Times New Roman', serif;
  --sans: 'Montserrat', system-ui, sans-serif;
  --engrave: 'Cormorant', Garamond, 'Times New Roman', serif;
  --script: 'Allura', 'Snell Roundhand', cursive;
  --side: 40px;
  --top: 64px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: var(--top); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--page); color: var(--ink); font: 400 14.5px/1.6 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; font-variant-numeric: lining-nums; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; font-weight: 500; }

/* ---------- buttons ---------- */
/* the fitting buttons are cut from the case velvet, so they follow the chosen lining */
.primary { min-height: 50px; padding: 0 26px; border: 0; border-radius: 2px; background: radial-gradient(120% 160% at 50% 0%, color-mix(in srgb, var(--lining) 80%, #fff 20%) 0%, var(--lining) 70%); color: var(--ivory); font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.primary:hover { background: radial-gradient(120% 160% at 50% 0%, color-mix(in srgb, var(--lining) 68%, #fff 32%) 0%, color-mix(in srgb, var(--lining) 88%, #fff 12%) 70%); }
.quiet { min-height: 44px; padding: 0 2px; border: 0; background: none; font: 600 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 6px; }
.quiet:hover { text-decoration-color: currentColor; }
.quiet:disabled { cursor: default; color: var(--accent); text-decoration: none; }
.link { border: 0; background: none; padding: 0; min-height: 44px; font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--hair-2); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; height: var(--top); display: flex; align-items: center; gap: 40px; padding: 0 var(--side); background: var(--page); border-bottom: 1px solid var(--hair); }
.mark { display: flex; align-items: baseline; text-decoration: none; font: 600 24px/1 var(--engrave); letter-spacing: .34em; margin-right: auto; }
.links { display: flex; gap: 30px; }
.links a { text-decoration: none; font: 500 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2); padding: 16px 0; }
.links a:hover { color: var(--ink); }
.book { min-height: 44px; padding: 0 20px; border: 1px solid var(--ink); border-radius: 2px; background: transparent; font: 600 11.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.book:hover { background: var(--ink); color: var(--page); }

/* ---------- the commission: the open case and the order ---------- */
.commission { display: grid; grid-template-columns: minmax(0, 1fr) 452px; height: clamp(600px, calc(100vh - var(--top)), 900px); }
.case { position: relative; overflow: hidden; color: var(--ivory);
  background:
    radial-gradient(110% 80% at 50% 38%, color-mix(in srgb, var(--lining) 82%, #fff 18%) 0%, var(--lining) 46%, color-mix(in srgb, var(--lining) 55%, #000) 100%);
  transition: background-color .4s; }
.case::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.case::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255,255,255,.05), inset 0 40px 90px rgba(0,0,0,.28), inset 0 -60px 120px rgba(0,0,0,.3); }
.viewer { position: absolute; inset: 0; z-index: 1; }
.viewer canvas { display: block; width: 100% !important; height: 100% !important; touch-action: pan-y; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.no3d { position: absolute; left: 40px; right: 40px; top: 50%; color: var(--ivory); opacity: .8; }
.intro { position: absolute; z-index: 2; left: 44px; top: 40px; max-width: 580px; pointer-events: none; transition: opacity .4s; }
.intro h1 { font: 500 clamp(52px, 5.6vw, 80px)/1 var(--serif); letter-spacing: -.005em; }
.intro p { margin-top: 16px; max-width: 300px; font-size: 16.5px; line-height: 1.6; color: rgba(243, 238, 231, .78); }
.is-apart .intro, .has-part .drag-hint { opacity: 0; }
.drag-hint { transition: opacity .3s; }
.drag-hint { position: absolute; z-index: 2; right: 30px; top: 30px; font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(243, 238, 231, .55); pointer-events: none; }
.case-bar { position: absolute; z-index: 3; left: 44px; right: 30px; bottom: 26px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.presets > span { display: block; margin-bottom: 12px; font: 500 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: rgba(243, 238, 231, .6); }
#presets { display: flex; flex-wrap: wrap; gap: 8px; }
#presets button, .inside { min-height: 46px; padding: 0 18px; border: 1px solid rgba(243, 238, 231, .34); border-radius: 2px; background: rgba(0, 0, 0, .12); color: var(--ivory); font: 500 21px/1 var(--serif); }
#presets button:hover, .inside:hover { border-color: rgba(243, 238, 231, .8); }
#presets button[aria-pressed="true"] { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }
.inside { font: 600 12.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; min-height: 50px; }
.inside[aria-pressed="true"] { background: var(--ivory); color: var(--ink); }

/* callouts when the pair is taken apart: thin ivory leaders on the velvet */
.callouts { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.callouts .hits button { position: absolute; padding: 0; border: 0; border-radius: 2px; background: transparent; pointer-events: auto; cursor: pointer; }
.callouts .hits button:focus-visible { outline: 1px solid var(--ivory); outline-offset: 2px; }
.callouts .ball { transition: opacity .3s; }
.callouts .hov circle:not(.dot) { stroke: var(--ivory); fill: rgba(243, 238, 231, .16); }
.callouts .hov .t { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.callouts svg { width: 100%; height: 100%; overflow: visible; }
.callouts path { fill: none; stroke: rgba(243, 238, 231, .5); stroke-width: 1; }
.callouts .dot { fill: var(--ivory); stroke: none; }
.callouts circle:not(.dot) { fill: rgba(0, 0, 0, .2); stroke: rgba(243, 238, 231, .7); stroke-width: 1; }
.callouts .n { fill: var(--ivory); font: 500 11px var(--sans); }
.callouts .t { fill: var(--ivory); font: 500 17px var(--serif); }
.callouts .sel circle:not(.dot) { fill: var(--ivory); stroke: var(--ivory); }
.callouts .sel .n { fill: var(--ink); }
.callouts .dim { opacity: .28 !important; }

/* zoom, beside See inside */
.stage-tools { display: flex; align-items: center; gap: 8px; flex: none; }
.zoom { display: flex; }
.zoom button { width: 46px; height: 46px; display: grid; place-items: center; padding: 0; border: 1px solid rgba(243, 238, 231, .34); border-radius: 2px; background: rgba(0, 0, 0, .12); color: var(--ivory); font: 300 24px/1 var(--sans); }
.zoom button + button { margin-left: -1px; }
.zoom button:hover { border-color: rgba(243, 238, 231, .8); position: relative; }
.zoom button:disabled { opacity: .35; pointer-events: none; }

/* a part, picked inside the exploded pair */
.part-card { position: absolute; z-index: 4; top: 30px; right: 30px; width: 340px; padding: 22px 24px 20px; background: rgba(20, 14, 24, .62); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border: 1px solid rgba(243, 238, 231, .16); border-radius: 2px; color: var(--ivory); }
.part-card[hidden] { display: none; }
.pc-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pc-kicker { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(243, 238, 231, .66); }
.pc-nav { display: flex; gap: 2px; margin-right: -8px; }
.pc-nav button { width: 34px; height: 34px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 2px; background: none; color: var(--ivory); font: 400 17px/1 var(--sans); }
.pc-nav button:hover { background: rgba(243, 238, 231, .12); }
.part-card h3 { margin: 12px 0 0; font: 500 31px/1.1 var(--serif); }
.pc-line { margin: 10px 0 0; font-size: 14px; line-height: 1.55; color: rgba(243, 238, 231, .82); }
.pc-facts { display: grid; gap: 6px; margin: 16px 0 0; padding: 14px 0 0; border-top: 1px solid rgba(243, 238, 231, .16); }
.pc-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 10px; }
.pc-facts dt { font: 600 11px/1.75 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: rgba(243, 238, 231, .55); }
.pc-facts dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; }
.pc-change { margin-top: 18px; min-height: 44px; padding: 0 18px; border: 1px solid var(--ivory); border-radius: 2px; background: var(--ivory); color: var(--ink); font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.pc-change:hover { background: #fff; }

/* the order */
.order { display: flex; flex-direction: column; min-height: 0; background: var(--page-2); border-left: 1px solid var(--hair); }
.slots { list-style: none; margin: 0; padding: 6px 0 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.slot { border-bottom: 1px solid var(--hair); }
.slot-head { width: 100%; display: grid; grid-template-columns: 126px minmax(0, 1fr) auto; align-items: baseline; gap: 12px; min-height: 56px; padding: 16px 28px 14px; border: 0; background: none; text-align: left; }
.slot-name { font: 600 12px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.slot-choice { font: 500 21px/1.25 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slot-add { font: 500 12.5px/1 var(--sans); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.slot-head:hover .slot-choice { text-decoration: underline; text-decoration-color: var(--hair-2); text-underline-offset: 5px; }
.slot.open .slot-name { color: var(--accent); }
.opts { display: none; padding: 0 22px 18px; }
.slot.open .opts { display: block; }
.next-row { display: none; }
.slot.open .next-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 28px; padding: 14px 0 18px; border-top: 1px solid var(--hair); }
.step { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.next { display: inline-flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 18px; border: 1px solid var(--ink); border-radius: 2px; background: transparent; color: var(--ink); font: 600 12.5px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; }
.next span { font-size: 15px; letter-spacing: 0; transition: transform .2s; }
.next:hover { background: var(--ink); color: var(--page); }
.next:hover span { transform: translateX(3px); }
.slot-head { position: relative; }
.slot.done .slot-head::before { content: ''; position: absolute; left: 9px; top: 24px; width: 8px; height: 4px; border: solid var(--accent); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.total.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { background: color-mix(in srgb, var(--lining) 16%, transparent); } 100% { background: var(--page-2); } }
.opt { width: 100%; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; margin: 0 0 6px; border: 1px solid var(--hair); border-radius: 2px; background: var(--page-2); text-align: left; }
.opt:hover { border-color: var(--hair-2); background: #f4f2ef; }
.opt[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: #f6f3f8; }
.opt-body { flex: 1; min-width: 0; }
.opt-name { display: block; font: 600 20px/1.25 var(--serif); }
.opt-line { display: block; margin-top: 3px; font-size: 12.8px; line-height: 1.5; color: var(--ink-2); }
.opt-delta { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; padding-top: 2px; font: 500 12px/1.2 var(--sans); color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.opt-delta .now { color: var(--accent); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 10.5px; }
.opt-dot { flex: none; width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.opt-dot.metal { background: radial-gradient(circle at 34% 28%, #fff 0, var(--c) 42%, color-mix(in srgb, var(--c) 62%, #000) 100%); }
.swatches { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 6px 2px 0; }
.swatches:empty { display: none; }
.sw-label { font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.sw { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 0 0 3px var(--page-2); position: relative; }
.sw[aria-pressed="true"] { box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 0 0 3px var(--page-2), 0 0 0 4.5px var(--accent); }
.sw-name { font-size: 12.8px; color: var(--ink-2); }
.engrave { padding: 2px 6px 4px; }
.ini { display: flex; align-items: baseline; gap: 16px; font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.ini input { width: 150px; padding: 6px 2px 8px; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; font: 600 34px/1 var(--engrave); letter-spacing: .24em; color: var(--ink); text-transform: uppercase; }
.ini input:focus-visible { outline: none; border-bottom: 2px solid var(--accent); }
.styles { display: flex; gap: 10px; margin: 16px 0 10px; }
.style { flex: 1; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--hair); border-radius: 2px; background: var(--page-2); text-align: left; font-size: 12.8px; color: var(--ink-2); }
.style b { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 34% 28%, #fdfdfd 0, #d3d4d6 48%, #9fa1a5 100%); box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); color: #4a4b4f; font-weight: 500; }
.style.roman b { font: 600 17px/1 var(--engrave); letter-spacing: .06em; }
.style.script b { font: 400 25px/1 var(--script); }
.style[aria-checked="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--ink); }
.fix-note { display: none; margin: 0; padding: 12px 28px; font-size: 13px; background: var(--accent-soft); color: var(--accent-2); }
.fix-note.on { display: block; }

.total { padding: 20px 28px 22px; border-top: 1px solid var(--ink); background: var(--page-2); }
.total-price { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.lbl { font: 600 12px/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.total-price b { font: 500 44px/1 var(--serif); font-variant-numeric: lining-nums tabular-nums; }
.total-facts { margin: 14px 0 0; display: grid; gap: 5px; }
.total-facts div { display: grid; grid-template-columns: 126px 1fr; gap: 12px; }
.total-facts dt { font: 600 12px/1.75 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.total-facts dd { margin: 0; font-size: 14.5px; }
.muted { color: var(--ink-3); }
.limited { margin-top: 10px; font: 500 17px/1.3 var(--serif); color: var(--accent); }
.limited:empty { display: none; }
.total-actions { display: flex; align-items: center; gap: 22px; margin-top: 16px; }
.total-actions .primary { flex: 1; }

/* ---------- sections ---------- */
.sound, .materials, .atelier, .saved { max-width: 1320px; margin: 0 auto; padding: 96px var(--side) 0; }
.sec-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: end; margin-bottom: 40px; }
.sec-head h2, .sound h2 { font: 500 40px/1.1 var(--serif); letter-spacing: -.005em; }
.sec-head p { max-width: 46ch; color: var(--ink-2); }

.sound { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 72px; }
.fr { margin: 0; }
.fr figcaption { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.fr figcaption b { font: 500 22px var(--serif); }
.fr figcaption .to, .wear .to { color: var(--accent); }
.fr figcaption .to::before, .wear .to::before { content: '→ '; }
#frSvg { width: 100%; height: 220px; display: block; overflow: visible; }
#frSvg .g { stroke: var(--hair); stroke-width: 1; vector-effect: non-scaling-stroke; }
#frSvg .area { fill: var(--accent-soft); }
#frSvg .line { fill: none; stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
#frSvg .line.next { stroke: var(--accent); stroke-dasharray: 5 4; }
.fr-x { display: flex; justify-content: space-between; margin-top: 8px; font: 500 11px/1 var(--sans); color: var(--ink-3); letter-spacing: .06em; }
.best { margin-top: 22px; font: 500 21px/1.4 var(--serif); }
.wear h2 { margin-bottom: 18px; }
.wear dl { margin: 0; }
.wear dl > div { display: grid; grid-template-columns: 124px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--hair); }
.wear dt { font: 600 10.5px/2 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.wear dd { margin: 0; }
.wear .v { font: 500 21px/1.3 var(--serif); }
.wear .to { margin-left: 12px; font: 500 21px/1.3 var(--serif); }
.wear small { display: block; margin-top: 2px; font-size: 12.5px; color: var(--ink-3); }

.mat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 32px; }
.mat-img { aspect-ratio: 4 / 3; border-radius: 2px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.mat h3 { margin-top: 18px; font: 600 27px/1.2 var(--serif); }
.mat p { margin-top: 6px; color: var(--ink-2); font-size: 14px; }
.mat .mat-facts { margin-top: 10px; font: 500 12px/1.5 var(--sans); color: var(--ink); letter-spacing: .02em; }
.mat .quiet { margin-top: 6px; }
.mat.current .mat-img { outline: 2px solid var(--accent); outline-offset: 5px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 28px; border-top: 1px solid var(--ink); }
.steps li { position: relative; padding-top: 26px; }
.steps li::before { content: ''; position: absolute; top: -5px; left: 0; width: 9px; height: 9px; border-radius: 50%; background: var(--ink); }
.steps li:last-child::before { background: var(--accent); }
.when { display: block; font: 600 10.5px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.steps li:last-child .when { color: var(--accent); }
.steps h3 { margin-top: 8px; font: 600 24px/1.2 var(--serif); }
.steps p { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); }

.saved { padding-bottom: 40px; }
.saved-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.saved-empty { display: flex; align-items: center; gap: 24px; padding: 22px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); color: var(--ink-2); grid-column: 1 / -1; }
.sv { border: 1px solid var(--hair); border-radius: 2px; background: var(--page-2); }
.sv.current { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.sv img, .sv-noimg { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: radial-gradient(100% 90% at 50% 40%, color-mix(in srgb, var(--lining, #3a2150) 80%, #fff 16%), var(--lining, #3a2150) 60%); border-radius: 2px 2px 0 0; }
.sv-body { padding: 16px 18px 8px; }
.sv h3 { font: 600 21px/1.25 var(--serif); }
.sv dl { margin: 10px 0 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.sv dt { font: 600 10px/1.4 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); }
.sv dd { margin: 0; font-size: 13.5px; }
.sv-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.sv-actions > * { white-space: nowrap; }
.sv-cur { font: 600 10.5px/44px var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.foot { max-width: 1320px; margin: 96px auto 0; padding: 32px var(--side) 120px; border-top: 1px solid var(--hair); display: flex; gap: 32px; align-items: baseline; color: var(--ink-3); font-size: 13px; }
.mark-sm { font: 600 17px/1 var(--engrave); letter-spacing: .34em; color: var(--ink); }

/* ---------- fitting request ---------- */
.fitting { --accent: var(--lining); width: min(600px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 2px; background: var(--page); color: var(--ink); box-shadow: 0 30px 80px rgba(20, 10, 30, .35); }
.fitting::backdrop { background: color-mix(in srgb, var(--lining, #3a2150) 62%, transparent); }
.fit-form { position: relative; padding: 36px 36px 30px; }
.close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: none; font: 300 28px/1 var(--sans); color: var(--ink-2); }
.fitting h2 { font: 500 36px/1.1 var(--serif); }
.fitting h2:focus { outline: none; }
.fit-sub { margin-top: 8px; color: var(--ink-2); font-size: 14px; padding-right: 30px; }
.fitting fieldset { border: 0; margin: 22px 0 0; padding: 0; min-width: 0; }
.fitting legend { padding: 0; margin-bottom: 10px; font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.choice-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choice-row label { position: relative; cursor: pointer; }
.choice-row input { position: absolute; opacity: 0; }
.choice-row span { display: block; height: 100%; padding: 11px 12px; border: 1px solid var(--hair-2); border-radius: 2px; font-size: 12.5px; color: var(--ink-2); line-height: 1.4; }
.choice-row b { display: block; font: 600 19px/1.2 var(--serif); color: var(--ink); margin-bottom: 2px; }
.choice-row input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice-row input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.days button { flex: none; width: 56px; padding: 8px 0; border: 1px solid var(--hair-2); border-radius: 2px; background: none; font: 600 22px/1.15 var(--serif); display: flex; flex-direction: column; align-items: center; }
.days small, .times small { font: 500 10px/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.times { display: flex; flex-wrap: wrap; gap: 6px; }
.times button { min-width: 80px; min-height: 44px; padding: 4px 10px; border: 1px solid var(--hair-2); border-radius: 2px; background: none; font: 500 13px/1.2 var(--sans); display: flex; flex-direction: column; align-items: center; justify-content: center; }
.times button:disabled { color: var(--ink-3); border-style: dashed; cursor: default; }
.days button[aria-pressed="true"], .times button[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent); }
.days button[aria-pressed="true"] small { color: var(--accent); }
.fit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 22px; }
.fit-fields label { font: 600 10.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); }
.fit-fields input { display: block; width: 100%; margin-top: 8px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; background: transparent; font: 500 19px var(--serif); color: var(--ink); }
.fit-fields input:focus-visible { outline: none; border-bottom: 2px solid var(--accent); }
.fit-note { margin: 18px 0; font-size: 12.8px; color: var(--ink-2); }
.fitting .primary { width: 100%; }
.fit-done p { margin: 14px 0 24px; font: 500 20px/1.5 var(--serif); }

/* ---------- toast and phone bar ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100vw - 32px); padding: 14px 20px; border-radius: 2px; background: var(--ink); color: var(--ivory); font-size: 13.5px; transition: opacity .25s, transform .25s; }
.toast.on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #fff; }
.sticky-sum { display: none; }

@media (max-width: 1180px) {
  .commission { grid-template-columns: minmax(0, 1fr) 410px; }
  .slot-head { grid-template-columns: 116px minmax(0, 1fr) auto; padding-left: 22px; padding-right: 22px; }
  .next-row { margin: 0 22px; }
  .sound { grid-template-columns: 1fr; gap: 56px; }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; border-top: 0; }
  .steps li { border-top: 1px solid var(--ink); }
  .links { display: none; }
}

@media (max-width: 900px) {
  :root { --side: 20px; --top: 56px; }
  .top { gap: 16px; }
  .mark { font-size: 18px; }
  .book { min-height: 40px; padding: 0 14px; font-size: 10.5px; }
  .commission { display: block; height: auto; }
  .case { position: sticky; top: var(--top); z-index: 10; height: min(56vh, 112vw); }
  .intro { left: 20px; top: 18px; right: 20px; }
  .intro h1 { font-size: 38px; }
  .intro p { display: none; }
  body.scrolled .intro { opacity: 0; }
  .drag-hint { display: none; }
  /* on a phone the card is a sheet under the case, over the order */
  .part-card { position: fixed; z-index: 50; left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: calc(100vh - var(--top) - min(56vh, 112vw) - 8px); overflow-y: auto; padding: 10px 20px calc(14px + env(safe-area-inset-bottom)); background: #1d1622; -webkit-backdrop-filter: none; backdrop-filter: none; border: 0; border-top: 1px solid rgba(243, 238, 231, .16); }
  body.part-open .sticky-sum, body.part-open.sum-out .sticky-sum { transform: translateY(110%); }
  .zoom { display: none; }
  .is-apart .zoom { display: flex; }
  .is-apart .presets { visibility: hidden; }
  .pc-kicker { font-size: 10.5px; }
  .pc-more { display: none; }
  .part-card h3 { margin-top: 0; font-size: 24px; }
  .pc-line { margin-top: 4px; font-size: 13px; line-height: 1.45; }
  .pc-facts { display: flex; flex-wrap: wrap; gap: 3px 16px; margin-top: 8px; padding-top: 0; border-top: 0; }
  .pc-facts div { display: flex; gap: 6px; align-items: baseline; }
  .pc-facts dt { font-size: 10px; }
  .pc-facts dd { font-size: 13px; }
  .pc-change { margin-top: 10px; min-height: 40px; font-size: 11px; }
  .case-bar { left: 0; right: 0; bottom: 12px; padding: 0 20px; gap: 10px; }
  .presets { min-width: 0; flex: 1; }
  .presets > span { display: none; }
  #presets { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 22px 0 4px; -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
  #presets button { flex: none; min-height: 42px; font-size: 18.5px; padding: 0 13px; }
  .inside { flex: none; min-height: 42px; padding: 0 12px; font-size: 11px; }
  .zoom button { width: 42px; height: 42px; }
  .stage-tools { gap: 6px; }
  .order { border-left: 0; }
  .slots { overflow: visible; padding-top: 0; }
  .slot-head { grid-template-columns: 110px minmax(0, 1fr) auto; padding: 14px 20px 12px; gap: 10px; }
  .slot-choice { font-size: 19.5px; }
  .opts { padding: 0 14px 16px; }
  .next-row { margin: 0 20px; }
  .opt-delta { font-size: 11.5px; }
  .total { padding: 20px; }
  .sec-head { grid-template-columns: 1fr; gap: 12px; margin-bottom: 28px; }
  .sec-head h2, .sound h2 { font-size: 29px; }
  .sound, .materials, .atelier, .saved { padding-top: 72px; }
  .wear dl > div { grid-template-columns: 104px 1fr; }
  #frSvg { height: 170px; }
  .mat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 18px; }
  .steps { grid-template-columns: 1fr; row-gap: 0; }
  .steps li { border-top: 0; border-left: 1px solid var(--ink); padding: 0 0 26px 22px; }
  .steps li::before { top: 4px; left: -5px; }
  .foot { flex-direction: column; gap: 12px; padding-bottom: 110px; }
  .choice-row { grid-template-columns: 1fr; }
  .fit-fields { grid-template-columns: 1fr; }
  .fit-form { padding: 30px 20px 22px; }
  .sticky-sum { display: flex; position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--page-2); border-top: 1px solid var(--hair-2); transform: translateY(110%); transition: transform .3s; }
  body.sum-out .sticky-sum { transform: none; }
  .sticky-sum > div { display: flex; flex-direction: column; }
  .sticky-sum b { font: 600 27px/1.1 var(--serif); }
  .sticky-sum span { font-size: 11.5px; color: var(--ink-2); }
  .sticky-sum .primary { min-height: 46px; padding: 0 18px; font-size: 11px; }
}
@media (max-width: 520px) {
  .mat-grid { grid-template-columns: 1fr; }
  .styles { flex-direction: column; }
}

/* shells, metal and case lining are picked from tiles, like samples on the atelier table */
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.slot[data-slot="metal"] .tiles, .slot[data-slot="lining"] .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt.tile { flex-direction: column; align-items: flex-start; gap: 0; margin: 0; padding: 8px 8px 10px; }
.tile-img { display: block; width: 100%; aspect-ratio: 5 / 3; border-radius: 1px; background-size: cover; background-position: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
.tile-img.metal { aspect-ratio: 1; width: 40px; border-radius: 50%; background: radial-gradient(circle at 34% 28%, #fff 0, var(--c) 42%, color-mix(in srgb, var(--c) 62%, #000) 100%); }
.tile-img.lining { aspect-ratio: 1; width: 40px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--c) 75%, #fff 25%), var(--c) 70%); }
.opt.tile .opt-name { margin-top: 8px; font-size: 15.5px; line-height: 1.2; }
.opt.tile .opt-delta { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 0 8px; margin-top: 4px; padding: 0; font-size: 11px; white-space: normal; }
.tile-line { margin: 10px 2px 0; font-size: 12.8px; line-height: 1.5; color: var(--ink-2); }
