/* Rust Belt Tattoo Co. — a parlor ledger. Tokens are set per shop style by app.js. */
@font-face { font-family: 'Pirata One'; src: url(../fonts/pirata-one.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Italiana'; src: url(../fonts/italiana.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Rubik Mono One'; src: url(../fonts/rubik-mono-one.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: 'Red Hat Text'; src: url(../fonts/redhat-text-400.woff2) format('woff2'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'Red Hat Mono'; src: url(../fonts/redhat-mono-500.woff2) format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --bg: #15110F; --surface: #201A17; --ink: #EFE5D2; --ink2: #C2B59F; --line: #3C322C;
  --accent: #D0302A; --accent-text: #EE6A5E; --on-accent: #FFF3E6; --paper: #E9D9A6; --paper-ink: #1E1814; --skin: #C99A78;
  --f-display: 'Pirata One', 'Old English Text MT', serif; --f-body: 'Red Hat Text', system-ui, sans-serif; --f-mono: 'Red Hat Mono', ui-monospace, monospace;
  --d-case: none; --d-lh: 0.86; --d-track: 0.01em; --d-scale: 1.1;
  --rail: 104px; --gutter: clamp(18px, 4vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 12px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--f-body); overflow-x: hidden; }
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; z-index: 300; background: var(--ink); color: var(--bg); padding: 8px 12px; }
.skip:focus { left: 8px; top: 8px; }
.display { font-family: var(--f-display); font-weight: 400; text-transform: var(--d-case); line-height: var(--d-lh); letter-spacing: var(--d-track); }
.linkish { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-weight: 700; font-size: 15px; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 12px 22px; border: 2px solid var(--ink); background: none; font-weight: 700; font-size: 16px; letter-spacing: .01em; cursor: pointer; text-decoration: none; transition: background-color .15s, color .15s, border-color .15s; }
.btn-fire { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-fire:hover { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-line:hover { background: var(--ink); color: var(--bg); }
.btn-line-light { border-color: #F3EBDD; color: #F3EBDD; }
.btn-line-light:hover { background: #F3EBDD; color: #15110F; }
.btn-quiet { background: none; border: 0; color: #F3EBDD; font: 500 14px/1 var(--f-mono); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; min-height: 44px; padding: 0 6px; }
.x { width: 44px; height: 44px; border: 2px solid currentColor; background: none; font-size: 24px; line-height: 1; cursor: pointer; flex: none; }

/* ============ Rail ============ */
.rail { position: fixed; z-index: 60; left: 0; top: 0; bottom: 0; width: var(--rail); background: var(--bg); border-right: 2px solid var(--ink); display: flex; flex-direction: column; align-items: center; padding: 22px 0 18px; gap: 22px; }
.rail-mark { writing-mode: vertical-rl; transform: rotate(180deg); font-family: var(--f-display); text-transform: var(--d-case); letter-spacing: var(--d-track); font-size: calc(30px * var(--d-scale)); line-height: 1; text-decoration: none; white-space: nowrap; max-height: 44vh; overflow: hidden; }
.rail-nav { flex: 1; display: flex; align-items: center; }
.rail-nav ol { display: grid; gap: 6px; }
.rail-nav a { display: grid; justify-items: center; gap: 2px; padding: 8px 6px; text-decoration: none; color: var(--ink2); min-width: 80px; border-left: 3px solid transparent; }
.rail-nav .num { font-family: var(--f-display); font-size: calc(26px * var(--d-scale)); line-height: 1; }
.rail-nav .lbl { font: 500 14px/1.1 var(--f-mono); text-align: center; }
.rail-nav a:hover, .rail-nav a[aria-current="true"] { color: var(--ink); border-left-color: var(--accent); }
.rail-menu { display: none; }
.rail-style { background: none; border: 2px solid var(--line); color: var(--ink); font: 500 14px/1.2 var(--f-mono); padding: 10px 6px; width: 86px; cursor: pointer; min-height: 44px; }
.rail-style:hover { border-color: var(--ink); }
.ledger, .foot { margin-left: var(--rail); }

/* Top-bar navigation option */
[data-nav="top"] .rail { right: 0; bottom: auto; width: auto; height: 72px; flex-direction: row; padding: 0 var(--gutter); border-right: 0; border-bottom: 2px solid var(--ink); gap: 24px; }
[data-nav="top"] .rail-mark { writing-mode: horizontal-tb; transform: none; max-height: none; font-size: calc(28px * var(--d-scale)); }
[data-nav="top"] .rail-nav { justify-content: center; }
[data-nav="top"] .rail-nav ol { grid-auto-flow: column; }
[data-nav="top"] .rail-nav a { grid-auto-flow: column; gap: 8px; align-items: baseline; border-left: 0; border-bottom: 3px solid transparent; min-width: 0; }
[data-nav="top"] .rail-nav a:hover, [data-nav="top"] .rail-nav a[aria-current="true"] { border-bottom-color: var(--accent); }
[data-nav="top"] .rail-nav .num { font-size: calc(20px * var(--d-scale)); }
[data-nav="top"] .rail-style { width: auto; padding: 10px 14px; }
[data-nav="top"] .ledger, [data-nav="top"] .foot { margin-left: 0; }
[data-nav="top"] .ledger { padding-top: 72px; }
[data-nav="top"] .style-panel { left: 0; top: 72px; }

/* Phone index overlay */
.index { position: fixed; z-index: 80; inset: 0; background: var(--bg); padding: 90px var(--gutter) 30px; display: grid; align-content: start; gap: 24px; overflow-y: auto; }
.index ol { display: grid; gap: 4px; }
.index a { display: flex; gap: 18px; align-items: baseline; font-family: var(--f-display); text-transform: var(--d-case); font-size: calc(40px * var(--d-scale)); line-height: 1.1; text-decoration: none; padding: 6px 0; border-bottom: 1px solid var(--line); }
.index a span { font-size: .55em; color: var(--accent-text); min-width: 2.2em; }

/* ============ Plates: they stack like pages ============ */
.plate { position: sticky; top: var(--stick, 0px); min-height: 100vh; background: var(--bg); border-top: 2px solid var(--ink); padding: clamp(40px, 6vw, 88px) var(--gutter) clamp(56px, 7vw, 100px); }
.ledger > .plate:nth-child(1) { z-index: 1; } .ledger > .plate:nth-child(2) { z-index: 2; } .ledger > .plate:nth-child(3) { z-index: 3; }
.ledger > .plate:nth-child(4) { z-index: 4; } .ledger > .plate:nth-child(5) { z-index: 5; } .ledger > .plate:nth-child(6) { z-index: 6; } .ledger > .plate:nth-child(7) { z-index: 7; }
.plate:nth-child(even) { background: var(--surface); }
.plate-head { display: grid; gap: 12px; max-width: 900px; margin-bottom: clamp(28px, 4vw, 48px); }
.plate-no { font: 500 14px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .14em; color: var(--accent-text); }
.plate-head h2 { font-size: calc(clamp(48px, 7vw, 116px) * var(--d-scale)); }
.plate-lede { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink2); max-width: 56ch; }

/* ============ Cover ============ */
.cover { padding: 0; border-top: 0; display: grid; overflow: hidden; background: #0E0B0A; color: #F3EBDD; }
.cover-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover-shade { position: absolute; inset: 0; background: rgba(12, 9, 8, .55); }
.cover-in { position: relative; z-index: 1; display: grid; align-content: space-between; min-height: 100vh; padding: 22px var(--gutter) 34px; gap: 28px; }
.cover-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 500 14px/1.3 var(--f-mono); }
.cover-name { font-size: calc(clamp(64px, 12vw, 200px) * var(--d-scale)); max-width: 11ch; align-self: end; }
.cover-line { font-size: clamp(20px, 2.2vw, 30px); max-width: 30ch; line-height: 1.3; }
.cover-where { font: 500 14px/1.3 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; }
.cover-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cover-books { display: flex; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid rgba(243, 235, 221, .35); padding-top: 14px; font: 500 14px/1.3 var(--f-mono); }
.cover-books li { display: flex; gap: 8px; align-items: center; }
.cover-books i { width: 10px; height: 10px; display: inline-block; border: 2px solid #F3EBDD; }
.cover-books .open i { background: #9BE39F; border-color: #9BE39F; }
.cover-books .waitlist i { background: #F4C95D; border-color: #F4C95D; }

/* ============ Flash wall ============ */
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: clamp(22px, 3vw, 44px); padding: 10px 0 20px; }
.pin { position: relative; transform: rotate(var(--r, 0deg)); transition: transform .25s; }
.pin:nth-child(3n+1) { --r: -2.2deg; } .pin:nth-child(3n+2) { --r: 1.6deg; } .pin:nth-child(3n) { --r: -0.8deg; }
.pin:hover, .pin:focus-within { transform: rotate(0deg) translateY(-6px); }
.pin button { display: grid; width: 100%; background: var(--paper); color: var(--paper-ink); border: 0; padding: 18px 16px 14px; cursor: pointer; text-align: left; gap: 10px; }
.pin button::before { content: ""; position: absolute; top: -12px; left: 50%; width: 76px; height: 24px; transform: translateX(-50%) rotate(-3deg); background: rgba(236, 226, 196, .7); border: 1px solid rgba(0, 0, 0, .08); }
.pin img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.pin .tag { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 500 14px/1.2 var(--f-mono); border-top: 1px dashed currentColor; padding-top: 8px; }
.pin .tag b { font-size: 17px; }
.pin .nm { font-weight: 700; font-size: 17px; }
.pin.taken button { cursor: not-allowed; }
.pin.taken img { opacity: .45; }
.stamp { position: absolute; top: 38%; left: 50%; transform: translate(-50%, -50%) rotate(-14deg); border: 4px solid #B3261E; color: #B3261E; font: 700 26px/1 var(--f-mono); padding: 8px 14px; letter-spacing: .12em; background: rgba(233, 217, 166, .8); pointer-events: none; }

/* ============ Body chart ============ */
.chart-grid { display: grid; grid-template-columns: minmax(280px, 5fr) minmax(0, 7fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.figure-wrap { position: sticky; top: 24px; display: grid; gap: 14px; justify-items: center; background: var(--paper); color: var(--paper-ink); padding: 18px; border: 2px solid var(--ink); }
.figure { width: min(100%, 360px); height: auto; }
.figure .body { fill: var(--skin); stroke: var(--paper-ink); stroke-width: 2; }
.figure .zone { fill: var(--skin); stroke: var(--paper-ink); stroke-width: 2; cursor: pointer; transition: fill .15s; }
.figure .zone:hover, .figure .zone:focus { fill: color-mix(in srgb, var(--skin) 70%, #1A1412 30%); outline: none; }
.figure .zone.on { stroke: #B3261E; stroke-width: 4; }
.figure .zone:focus-visible { stroke: #B3261E; stroke-width: 5; }
.figure .hair { fill: var(--paper-ink); }
.figure .lbl { font: 500 14px var(--f-mono); fill: var(--paper-ink); }
.figure .guide { stroke: var(--paper-ink); stroke-width: 1; stroke-dasharray: 3 4; }
.figure .ink { mix-blend-mode: multiply; pointer-events: none; }
.seg { display: inline-grid; grid-auto-flow: column; border: 2px solid currentColor; }
.seg button { min-height: 44px; padding: 6px 16px; border: 0; background: none; cursor: pointer; font-weight: 700; border-right: 2px solid currentColor; }
.seg button:last-child { border-right: 0; }
.seg button[aria-pressed="true"] { background: var(--paper-ink); color: var(--paper); }
.tones { display: flex; gap: 8px; }
.tones button { width: 36px; height: 36px; border: 2px solid var(--paper-ink); cursor: pointer; padding: 0; }
.tones button[aria-pressed="true"] { outline: 3px solid var(--paper-ink); outline-offset: 2px; }
.chart-ctl { display: grid; gap: 26px; }
.ctl { display: grid; gap: 10px; }
.ctl-lbl { font: 500 14px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink2); display: flex; justify-content: space-between; }
.ctl-lbl output { color: var(--ink); font-size: 16px; }
.zone-now { font-family: var(--f-display); text-transform: var(--d-case); font-size: calc(clamp(34px, 3.4vw, 52px) * var(--d-scale)); line-height: 1; }
.zone-note { color: var(--ink2); }
input[type="range"] { width: 100%; accent-color: var(--accent); height: 32px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { min-height: 44px; padding: 8px 14px; border: 2px solid var(--line); background: none; cursor: pointer; font-weight: 700; font-size: 15px; }
.chips button:hover { border-color: var(--ink); }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips button:disabled { opacity: .4; cursor: not-allowed; }
.designs { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.designs button { aspect-ratio: 1; background: var(--paper); border: 2px solid transparent; padding: 6px; cursor: pointer; }
.designs button img { width: 100%; height: 100%; object-fit: contain; }
.designs button[aria-pressed="true"] { border-color: var(--accent); outline: 2px solid var(--accent); }
.designs .none { font: 500 14px/1.1 var(--f-mono); color: var(--paper-ink); }
.quote { background: var(--paper); color: var(--paper-ink); padding: 22px; display: grid; gap: 14px; border: 2px solid var(--ink); }
.q-range { font-family: var(--f-display); text-transform: var(--d-case); font-size: calc(clamp(40px, 4.4vw, 68px) * var(--d-scale)); line-height: 1; }
.q-rows { display: grid; gap: 6px; font: 500 15px/1.3 var(--f-mono); }
.q-rows p { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dashed rgba(30, 24, 20, .35); padding-bottom: 6px; }
.pain { display: inline-flex; gap: 3px; vertical-align: -2px; }
.pain i { width: 8px; height: 18px; border: 2px solid var(--paper-ink); }
.pain i.on { background: #B3261E; border-color: #B3261E; }
.q-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.quote .btn { border-color: var(--paper-ink); color: var(--paper-ink); }
.quote .btn-fire { background: #B3261E; border-color: #B3261E; color: #FFF3E6; }
.quote .btn:hover { background: var(--paper-ink); color: var(--paper); }

/* ============ Healed work ============ */
.filter { margin-bottom: 24px; }
.gallery { columns: 4 220px; column-gap: 16px; }
.gallery li { break-inside: avoid; margin-bottom: 16px; }
.gallery button { display: block; width: 100%; border: 0; padding: 0; background: none; cursor: zoom-in; text-align: left; }
.gallery img { width: 100%; height: auto; transition: filter .3s; }
.gallery button:hover img { filter: contrast(1.08) saturate(1.1); }
.gallery .cap { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0 2px; font: 500 14px/1.3 var(--f-mono); color: var(--ink2); border-bottom: 1px solid var(--line); }
.gallery .cap b { color: var(--ink); font-family: var(--f-body); font-size: 15px; }
.sitting { margin-top: clamp(40px, 6vw, 80px); display: grid; gap: 16px; }
.clips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.clips video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #0E0B0A; }
.clips figcaption { padding-top: 10px; font-size: 15px; color: var(--ink2); }
.clips figcaption b { font-family: var(--f-display); font-size: 28px; color: var(--accent-text); margin-right: 8px; vertical-align: -3px; }

/* ============ Artists ============ */
.roster { border-top: 2px solid var(--ink); }
.artist { display: grid; grid-template-columns: 56px 180px minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.artist .no { font-family: var(--f-display); font-size: 44px; line-height: 1; color: var(--accent-text); }
.artist figure { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg); }
.artist figure img { width: 100%; height: 100%; object-fit: cover; }
.artist h3 { font-family: var(--f-display); font-weight: 400; text-transform: var(--d-case); font-size: calc(40px * var(--d-scale)); line-height: 1; }
.artist .meta { font: 500 14px/1.4 var(--f-mono); color: var(--ink2); margin: 6px 0; }
.artist .bio { max-width: 58ch; }
.status { display: inline-block; font: 500 14px/1 var(--f-mono); padding: 5px 8px; border: 2px solid currentColor; margin-left: 8px; vertical-align: 4px; }
.status.open { color: var(--ink); background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.artist-act { display: grid; gap: 8px; justify-items: stretch; min-width: 180px; }

/* ============ Book ============ */
.bookform { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.bf-col { display: grid; gap: 22px; }
.bf-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fld { display: grid; gap: 8px; border: 0; padding: 0; margin: 0; min-width: 0; }
.fld > span, .fld legend { font: 500 14px/1.2 var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink2); padding: 0; margin-bottom: 4px; }
.fld input[type="text"], .fld input[type="tel"], .fld input[type="number"], .fld select, .fld textarea { width: 100%; min-height: 48px; padding: 10px 2px; background: transparent; border: 0; border-bottom: 2px solid var(--ink); font-size: 17px; border-radius: 0; }
.fld select option { background: var(--bg); color: var(--ink); }
.fld textarea { resize: vertical; min-height: 110px; border: 2px solid var(--ink); padding: 10px 12px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-color: var(--accent); }
.drop { display: grid; place-items: center; min-height: 92px; border: 2px dashed var(--line); cursor: pointer; font: 500 15px/1.3 var(--f-mono); color: var(--ink2); position: relative; text-align: center; padding: 10px; }
.drop:hover, .drop.over { border-color: var(--ink); color: var(--ink); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; }
.refs { display: flex; flex-wrap: wrap; gap: 8px; }
.refs li { position: relative; width: 84px; height: 84px; }
.refs img { width: 100%; height: 100%; object-fit: cover; }
.refs button { position: absolute; right: 2px; top: 2px; width: 28px; height: 28px; border: 0; background: var(--bg); color: var(--ink); cursor: pointer; font-weight: 700; }
.days { display: flex; flex-wrap: wrap; gap: 8px; }
.days label { display: grid; place-items: center; min-width: 58px; min-height: 58px; border: 2px solid var(--line); cursor: pointer; font: 500 14px/1.2 var(--f-mono); text-align: center; padding: 4px; }
.days label:has(input:checked) { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.days label:has(input:disabled) { opacity: .4; cursor: not-allowed; }
.days label:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }
.days input { position: absolute; opacity: 0; pointer-events: none; }
.check { display: flex; gap: 12px; align-items: flex-start; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.bf-summary { background: var(--paper); color: var(--paper-ink); padding: 16px; font: 500 15px/1.5 var(--f-mono); }
.err { font-weight: 700; font-size: 15px; }
.err::before { content: "✕ "; color: var(--accent); }
.done-card { background: var(--paper); color: var(--paper-ink); padding: 22px; border: 2px solid var(--ink); display: grid; gap: 8px; }
.done-card h3 { font-family: var(--f-display); font-weight: 400; text-transform: var(--d-case); font-size: calc(40px * var(--d-scale)); line-height: 1; }
.demo-note { font-size: 15px; border-left: 4px solid var(--accent); padding-left: 10px; }

/* ============ Heal ============ */
.heal-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(24px, 4vw, 64px); align-items: center; }
.heal-day { font-family: var(--f-display); font-size: calc(clamp(120px, 18vw, 280px) * var(--d-scale)); line-height: .8; display: flex; align-items: baseline; gap: 16px; }
.heal-day small { font: 500 18px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--ink2); }
.heal-ticks { display: flex; justify-content: space-between; font: 500 14px/1 var(--f-mono); color: var(--ink2); margin-top: 6px; }
.heal-card { background: var(--paper); color: var(--paper-ink); padding: clamp(22px, 3vw, 36px); border: 2px solid var(--ink); display: grid; gap: 12px; }
.heal-card h3 { font-family: var(--f-display); font-weight: 400; text-transform: var(--d-case); font-size: calc(clamp(40px, 4vw, 60px) * var(--d-scale)); line-height: 1; }
.heal-card p { font-size: 18px; }

/* ============ Footer ============ */
.foot { position: relative; z-index: 10; background: var(--bg); border-top: 2px solid var(--ink); display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 5fr) minmax(0, 4fr); gap: clamp(24px, 4vw, 56px); padding: clamp(48px, 6vw, 90px) var(--gutter); align-items: center; }
.foot-neon video { width: 100%; aspect-ratio: 9 / 16; max-height: 70vh; object-fit: cover; background: #0E0B0A; }
.foot-hint { font: 500 14px/1 var(--f-mono); color: var(--ink2); margin-bottom: 12px; text-align: center; }
.card { display: block; width: 100%; max-width: 520px; margin: 0 auto; aspect-ratio: 3.5 / 2; perspective: 1400px; background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.card-face { position: absolute; inset: 0; background: var(--paper); color: var(--paper-ink); border: 2px solid var(--paper-ink); display: grid; align-content: center; justify-items: center; gap: 8px; padding: 20px; backface-visibility: hidden; transition: transform .7s cubic-bezier(.3, .7, .3, 1); text-align: center; }
.card-back { transform: rotateY(180deg); }
.card[aria-pressed="true"] .card-front { transform: rotateY(-180deg); }
.card[aria-pressed="true"] .card-back { transform: rotateY(0deg); }
.card-name { font-size: calc(clamp(30px, 3vw, 44px) * var(--d-scale)); }
.card-addr, .card-tel, .card-line, .card-hours { font: 500 14px/1.5 var(--f-mono); }
.card-h { font-family: var(--f-display); font-size: calc(32px * var(--d-scale)); text-transform: var(--d-case); }
.card-hours { display: grid; grid-template-columns: auto auto; gap: 0 18px; text-align: left; }
.card-line { border-top: 1px solid var(--paper-ink); padding-top: 6px; margin-top: 6px; }
.foot-meta { display: grid; gap: 10px; font-size: 16px; }
.foot-small { font-size: 15px; color: var(--ink2); }

/* ============ Dialogs ============ */
.dlg { padding: 0; border: 2px solid var(--ink); background: var(--bg); color: var(--ink); max-width: min(960px, 96vw); max-height: 94vh; }
.dlg::backdrop { background: rgba(10, 8, 7, .78); }
.dlg-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.fd-art { background: var(--paper); display: grid; place-items: center; padding: 28px; min-height: 320px; }
.fd-art img { max-height: 60vh; object-fit: contain; }
.fd-body { position: relative; padding: 28px; display: grid; gap: 14px; align-content: start; }
.fd-body .x { position: absolute; right: 16px; top: 16px; }
.fd-body h2 { font-size: calc(clamp(40px, 4vw, 60px) * var(--d-scale)); padding-right: 50px; }
.fd-price { font: 500 22px/1 var(--f-mono); }
.fd-note { font-size: 15px; color: var(--ink2); }
.lb figure { display: grid; }
.lb img { max-height: 76vh; width: auto; margin: 0 auto; }
.lb figcaption { padding: 12px 18px; font: 500 15px/1.4 var(--f-mono); }
.lb-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 18px; }

/* ============ Style panel ============ */
.style-panel { position: fixed; z-index: 70; left: var(--rail); top: 0; bottom: 0; width: min(400px, 100vw); background: var(--bg); border-right: 2px solid var(--ink); padding: 22px; display: grid; gap: 20px; align-content: start; overflow-y: auto; animation: slide .3s ease both; }
@keyframes slide { from { transform: translateX(-24px); opacity: 0; } }
.style-panel header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.style-panel h2 { font-size: 22px; }
.sp-shops { display: grid; gap: 8px; }
.sp-shops button { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 2px solid var(--line); background: none; cursor: pointer; }
.sp-shops button b { font-size: 24px; line-height: 1.1; font-weight: 400; }
.sp-shops button small { font-size: 14px; color: var(--ink2); }
.sp-shops button[aria-pressed="true"] { border-color: var(--accent); background: var(--surface); }
.style-panel .seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.inline { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.inline input[type="color"] { width: 52px; height: 44px; border: 2px solid var(--ink); background: none; padding: 2px; cursor: pointer; }
.sp-foot { display: grid; gap: 10px; }
#sp-note { font-size: 15px; color: var(--ink2); }

.toast { position: fixed; z-index: 90; left: 50%; bottom: 24px; transform: translate(-50%, 12px); background: var(--ink); color: var(--bg); padding: 12px 18px; font-weight: 700; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  .pin, .card-face, .style-panel { transition: none; animation: none; }
}

/* ============ Tablet ============ */
@media (max-width: 1100px) {
  .chart-grid, .bookform, .heal-grid { grid-template-columns: 1fr; }
  .figure-wrap { position: static; }
  .artist { grid-template-columns: 44px 140px minmax(0, 1fr); }
  .artist-act { grid-column: 2 / -1; grid-auto-flow: column; justify-content: start; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-neon { grid-row: span 2; }
  [data-nav="top"] .rail-nav .lbl { display: none; }
}

/* ============ Phone: the rail turns into a top strip ============ */
@media (max-width: 760px) {
  :root { --rail: 0px; }
  body { font-size: 16px; }
  .rail, [data-nav="top"] .rail { right: 0; bottom: auto; width: auto; height: 60px; flex-direction: row; padding: 0 12px 0 16px; border-right: 0; border-bottom: 2px solid var(--ink); gap: 10px; justify-content: space-between; }
  .rail-mark { writing-mode: horizontal-tb; transform: none; font-size: calc(24px * var(--d-scale)); max-height: none; overflow: hidden; text-overflow: ellipsis; max-width: 55vw; }
  .rail-nav { display: none; }
  .rail-menu { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--ink); background: none; font: 500 14px/1 var(--f-mono); cursor: pointer; margin-left: auto; }
  .rail-style { width: auto; padding: 8px 10px; }
  .ledger { padding-top: 60px; }
  .plate { position: relative; top: 0 !important; min-height: 0; }
  .cover-in { min-height: calc(100svh - 60px); }
  .cover-name { font-size: calc(clamp(52px, 15vw, 88px) * var(--d-scale)); }
  .plate-head h2 { font-size: calc(clamp(40px, 12vw, 64px) * var(--d-scale)); }
  .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 16px; }
  .pin button { padding: 12px 10px 10px; }
  .pin .tag { flex-direction: column; gap: 2px; }
  .stamp { font-size: 18px; }
  .figure-wrap { padding: 12px; }
  .gallery { columns: 2 140px; column-gap: 10px; }
  .gallery .cap { flex-direction: column; gap: 0; }
  .clips { grid-template-columns: 1fr; }
  .artist { grid-template-columns: 1fr; gap: 12px; }
  .artist .no { display: none; }
  .artist figure { aspect-ratio: 16 / 9; }
  .artist-act { grid-column: auto; grid-auto-flow: row; }
  .bf-two { grid-template-columns: 1fr; }
  .dlg-in { grid-template-columns: 1fr; }
  .fd-art { min-height: 220px; padding: 16px; }
  .fd-art img { max-height: 36vh; }
  .foot { grid-template-columns: 1fr; margin-left: 0; }
  .foot-neon { grid-row: auto; width: min(260px, 70%); margin: 0 auto; }
  .style-panel, [data-nav="top"] .style-panel { left: 0; top: 60px; width: 100vw; border-right: 0; }
  .index { padding-top: 84px; }
}

.shop-strip { display: grid; grid-template-columns: 1fr 2fr 2fr; gap: 14px; margin-bottom: 32px; }
.shop-strip img { width: 100%; height: 220px; object-fit: cover; }
@media (max-width: 760px) { .shop-strip { grid-template-columns: 1fr 1fr; } .shop-strip li:first-child { grid-row: span 2; } .shop-strip img { height: 150px; } .shop-strip li:first-child img { height: 314px; } }
