/* Tattoo Doctorz — "Flash Book" own page (Tez Labs concept).
   1. Tokens (also shipped in the brand kit as tokens/tokens.css)  2. Base  3. Components  4. Sections  5. Responsive / motion */

/* ---------- 1. Tokens ---------- */
:root {
  /* stencil-paper palette (all text pairs checked AA; see kit tokens.json) */
  --paper: #F8F5FC;        /* stencil sheet */
  --lilac: #EFE8F8;        /* carbon backing */
  --vellum: #E4DAF3;       /* tracing layer */
  --rule: #CDBFE6;         /* hairlines, perforations (decor only) */
  --field-line: #7D6FA0;   /* form borders, 3:1 on paper */
  --violet: #5B34B8;       /* stencil line: art, large accents (7.4:1 on paper) */
  --ink: #43218C;          /* text accent, buttons (10.6:1 on paper) */
  --midnight: #1E1235;     /* footer, display on paper */
  --carbon: #221D2B;       /* body text (15.2:1) */
  --graphite: #575068;     /* secondary text (7.1:1 on paper, 5.7:1 on vellum) */
  --flash: #A8241C;        /* registration red: tags and markers only (6.6:1) */
  --on-dark: #E9E1F7;
  --on-dark-dim: #B9ABD6;
  --plate-paper: #FBF9FE;

  --font-display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Space Grotesk', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1vw, 1.9rem);
  --step-3: clamp(2.1rem, 1.5rem + 2.4vw, 3.3rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.2vw, 5rem);

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px;
  --space-6: 32px; --space-7: 48px; --space-8: 64px; --space-9: 96px; --space-10: 128px;

  --radius-sm: 8px; --radius: 16px; --radius-lg: 22px; --pill: 999px;
  --shadow-soft: 0 1px 2px rgba(30, 18, 53, .06), 0 14px 34px -18px rgba(30, 18, 53, .28);
  --shadow-lift: 0 2px 4px rgba(30, 18, 53, .08), 0 22px 46px -20px rgba(67, 33, 140, .38);
  --focus: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink);

  --ease-out: cubic-bezier(.2, .7, .2, 1);
  --dur-fast: 160ms; --dur: 260ms; --dur-slow: 520ms;
  --wrap: 1200px;
  --head-h: 72px;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--carbon); font: 400 var(--step-0)/1.6 var(--font-body); overflow-x: hidden; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; color: var(--midnight); line-height: 1.04; letter-spacing: -0.01em; margin: 0; text-wrap: balance; }
h1 em, h2 em { font-style: italic; color: var(--violet); }
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
address { font-style: normal; }
.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--midnight); color: var(--paper); padding: 10px 16px; border-radius: var(--pill); transition: top var(--dur-fast); }
.skip:focus { top: 12px; }
.ico { width: 20px; height: 20px; flex: none; }

/* ---------- 3. Components ---------- */
.eyebrow { display: flex; align-items: center; gap: 12px; font: 500 0.8125rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); margin-bottom: var(--space-4); }
.eyebrow::before { content: ''; width: 34px; height: 0; border-top: 2px dashed var(--violet); }
.mono-label { display: block; font: 500 0.75rem/1.3 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--graphite); }
.sec-lead { color: var(--graphite); font-size: 1.125rem; max-width: 60ch; margin-top: var(--space-4); }
.note { font-size: var(--step--1); color: var(--graphite); margin-top: var(--space-4); max-width: 68ch; }
.caption { font-size: var(--step--1); color: var(--graphite); margin-top: var(--space-3); display: flex; gap: 8px; align-items: baseline; line-height: 1.45; }

.tag { display: inline-block; font: 500 0.6875rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; padding: 5px 8px 4px; border-radius: var(--pill); white-space: nowrap; vertical-align: 1px; }
.tag-sample { color: var(--flash); border: 1px solid currentColor; background: var(--paper); }
.tag-ai { color: var(--ink); background: var(--vellum); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border-radius: var(--pill); font: 600 1rem/1.2 var(--font-body); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast), transform var(--dur-fast) var(--ease-out), box-shadow var(--dur) var(--ease-out); }
.btn-solid { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-soft); }
.btn-solid:hover { background: var(--midnight); transform: translateY(-1px); box-shadow: var(--shadow-lift); }
.btn-outline { color: var(--ink); border-color: var(--ink); background: transparent; }
.btn-outline:hover { background: var(--ink); color: var(--paper); }
.btn-ghost { color: var(--ink); background: transparent; padding-inline: 14px; }
.btn-ghost:hover { background: var(--lilac); }
.btn-sm { min-height: 44px; padding: 10px 18px; font-size: .9375rem; }
.btn-wide { width: 100%; }
.btn:active { transform: translateY(0); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--space-6); }

.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border-radius: var(--pill); border: 1.5px solid var(--field-line); background: var(--paper); color: var(--carbon); font: 500 .9375rem/1 var(--font-body); cursor: pointer; transition: background-color var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast); }
.chip span { font-family: var(--font-mono); font-size: .75rem; color: var(--graphite); }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip[aria-pressed="true"] span { color: var(--on-dark-dim); }

/* perforated sheet edge */
.perf-top { position: relative; }
.perf-top::before { content: ''; position: absolute; left: 14px; right: 14px; top: 10px; height: 6px; background: radial-gradient(circle, var(--rule) 2.2px, transparent 2.6px) 0 0 / 14px 6px repeat-x; }

/* ---------- 4. Sections ---------- */
.concept-strip { background: var(--lilac); color: var(--graphite); font-size: .8125rem; text-align: center; padding: 8px 20px; line-height: 1.4; }

/* header */
.site-head { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: var(--head-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--midnight); min-height: 44px; }
.brand-name { font: 400 1.6rem/1 var(--font-display); }
.brand-name small { display: block; font: 500 .6875rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); margin-top: 4px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 6px; }
.site-nav ul a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; color: var(--carbon); text-decoration: none; font-weight: 500; border-radius: var(--pill); }
.site-nav ul a:hover { background: var(--lilac); color: var(--ink); }
.menu-btn { display: none; }

/* cover */
.cover { position: relative; isolation: isolate; background: var(--paper); }
.cover-pic img { width: 100%; height: clamp(560px, 82vh, 780px); object-fit: cover; object-position: 70% 40%; }
.cover::before { content: ''; position: absolute; inset: 0 0 auto 0; height: clamp(560px, 82vh, 780px); z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(248,245,252,.96) 0%, rgba(248,245,252,.92) 40%, rgba(248,245,252,.62) 52%, rgba(248,245,252,0) 70%),
              linear-gradient(0deg, rgba(248,245,252,.85) 0%, rgba(248,245,252,0) 22%); }
.cover-inner { position: absolute; inset: 0 0 auto 0; height: clamp(560px, 82vh, 780px); z-index: 2; display: flex; align-items: center; }
.cover-copy { max-width: min(600px, calc(50vw - 24px)); }
.cover-copy .lead { font-size: 1.1875rem; color: var(--carbon); margin-top: var(--space-5); max-width: 46ch; }
.cover-facts { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: var(--space-6); font-size: .9375rem; color: var(--graphite); }
.cover-facts li { display: flex; align-items: center; gap: 8px; }
.cover-facts .ico { color: var(--violet); width: 18px; height: 18px; }
.cover-facts a { display: inline-flex; min-height: 44px; align-items: center; }
.cover-caption { position: relative; z-index: 2; margin-top: 0; padding: 12px 0 0; justify-content: flex-end; }

/* plates */
.plates { padding: var(--space-9) 0; }
.sec-head { margin-bottom: var(--space-7); max-width: 780px; }
.sec-head-row { max-width: none; display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-7); align-items: end; }
.plates-layout { display: grid; grid-template-columns: 290px 1fr; gap: var(--space-7); align-items: start; }
.contents { position: sticky; top: calc(var(--head-h) + 24px); background: var(--lilac); border-radius: var(--radius); padding: var(--space-6) var(--space-5) var(--space-5); }
.contents.perf-top::before { top: 12px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--space-4) 0 var(--space-5); }
.filters .chip { min-height: 44px; padding: 6px 13px; font-size: .875rem; }
.toc li a { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding: 10px 6px; color: var(--carbon); text-decoration: none; border-radius: var(--radius-sm); }
.toc li a:hover { background: var(--paper); color: var(--ink); }
.toc .num { font: 500 .75rem/1 var(--font-mono); color: var(--violet); width: 2.4em; flex: none; }
.toc .t { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.1; }
.toc .dots { flex: 1; border-bottom: 1.5px dotted var(--field-line); transform: translateY(-4px); min-width: 12px; }
.toc .s { font-size: .75rem; color: var(--graphite); }
.toc li.is-off { opacity: .38; }
.filter-status { font-size: .8125rem; color: var(--graphite); margin-top: var(--space-3); min-height: 1.3em; }

.plate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-5); }
.plate[hidden] { display: none; }
.plate-open { position: relative; width: 100%; display: grid; grid-template-rows: auto 1fr auto auto; justify-items: center; text-align: center; gap: 4px; padding: 30px 18px 22px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--plate-paper); color: var(--violet); cursor: pointer; font: inherit; box-shadow: 0 1px 0 rgba(30,18,53,.04); transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur-fast); scroll-margin-top: calc(var(--head-h) + 24px); }
.plate-open::before { content: ''; position: absolute; left: 14px; right: 14px; top: 10px; height: 6px; background: radial-gradient(circle, var(--rule) 2.2px, transparent 2.6px) 0 0 / 14px 6px repeat-x; }
.plate-open::after { content: ''; position: absolute; right: 12px; bottom: 12px; width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--flash); opacity: .55; background: linear-gradient(var(--flash), var(--flash)) center / 1.5px 22px no-repeat, linear-gradient(var(--flash), var(--flash)) center / 22px 1.5px no-repeat; }
.plate-open:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--violet); }
.plate-no { justify-self: start; font: 500 .75rem/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--flash); }
.plate-art { width: 100%; max-width: 170px; aspect-ratio: 200 / 240; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; margin: 8px 0 10px; }
.plate-name { font: 400 1.5rem/1.1 var(--font-display); color: var(--midnight); }
.plate-style { font-size: .8125rem; color: var(--graphite); }
.plate.is-picked .plate-open { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }

/* viewer */
.viewer { border: 0; padding: 0; background: transparent; max-width: min(920px, calc(100% - 24px)); width: 100%; max-height: calc(100dvh - 24px); }
.viewer::backdrop { background: rgba(30, 18, 53, .62); backdrop-filter: blur(3px); }
.viewer-sheet { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--paper); border-radius: var(--radius-lg); overflow: auto; max-height: calc(100dvh - 24px); }
.viewer-art { background: var(--plate-paper); display: grid; place-items: center; padding: 40px; color: var(--violet); border-right: 1px dashed var(--rule); }
.viewer-art svg { width: 100%; max-width: 320px; aspect-ratio: 200 / 240; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.viewer-text { padding: 48px 36px 28px; display: flex; flex-direction: column; }
.viewer-text h3 { font-size: var(--step-3); margin: 10px 0 6px; }
.viewer-note { color: var(--graphite); margin-top: var(--space-4); }
.viewer-nav { display: flex; justify-content: space-between; margin-top: auto; padding-top: var(--space-6); }
.viewer-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule); background: var(--paper); color: var(--midnight); display: grid; place-items: center; cursor: pointer; z-index: 2; }
.viewer-close:hover { background: var(--lilac); }
.viewer[open] .viewer-sheet { animation: sheet-in var(--dur-slow) var(--ease-out); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(16px) scale(.985); } }

/* process */
.process { background: var(--lilac); padding: var(--space-9) 0; }
.process-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8); align-items: center; }
.layered { position: relative; padding-bottom: 70px; }
.layer-main img { width: 88%; border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); }
.layer-inset { position: absolute; right: 0; bottom: 36px; width: 42%; }
.layer-inset img { border-radius: var(--radius); border: 6px solid var(--paper); box-shadow: var(--shadow-lift); }
.layered-caption { position: absolute; left: 0; bottom: 0; max-width: 54%; }
.steps { margin-top: var(--space-6); display: grid; gap: var(--space-5); }
.steps li { display: grid; grid-template-columns: 52px 1fr; gap: var(--space-4); align-items: start; }
.step-no { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px dashed var(--violet); font: 500 .8125rem/1 var(--font-mono); color: var(--ink); background: var(--paper); }
.steps h3 { font-size: 1.5rem; }
.steps p { color: var(--graphite); margin-top: 4px; }

/* studio pages */
.pages { padding: var(--space-9) 0; }
.spread { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--space-5); }
.sp img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-soft); object-fit: cover; }
.sp-wall { grid-column: 1 / span 8; }
.sp-shoulder { grid-column: 9 / span 4; grid-row: span 2; }
.sp-shoulder img { aspect-ratio: 4 / 5.6; }
.sp-station { grid-column: 1 / span 4; }
.sp-station img { aspect-ratio: 4 / 4.4; }
.sp-ink { grid-column: 5 / span 4; }
.sp-ink img { aspect-ratio: 4 / 4.4; }

/* brief */
.brief { background: var(--vellum); padding: var(--space-9) 0; position: relative; }
.brief::before { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(91,52,184,.08) 31px 32px); }
.brief-grid { position: relative; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--space-8); align-items: start; }
.brief-intro { position: sticky; top: calc(var(--head-h) + 32px); }
.checks { margin-top: var(--space-6); display: grid; gap: 12px; }
.checks li { position: relative; padding-left: 34px; }
.checks li::before { content: ''; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 12.5 3.2 3.2L17 9' fill='none' stroke='%23F8F5FC' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat; }
.picked { margin-top: var(--space-6); display: flex; align-items: center; gap: 16px; padding: 14px 18px; background: var(--paper); border-radius: var(--radius); border: 1.5px dashed var(--violet); max-width: 360px; }
.picked[hidden] { display: none; }
.picked svg { width: 56px; height: 68px; color: var(--violet); fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.picked strong { display: block; font: 400 1.375rem/1.15 var(--font-display); color: var(--midnight); margin-top: 4px; }

.sheet { background: var(--paper); border-radius: var(--radius-lg); padding: 44px 36px 32px; box-shadow: var(--shadow-lift); position: relative; }
.sheet::before { content: ''; position: absolute; left: 18px; right: 18px; top: 14px; height: 6px; background: radial-gradient(circle, var(--rule) 2.2px, transparent 2.6px) 0 0 / 14px 6px repeat-x; }
.sheet-head { display: flex; justify-content: space-between; gap: 12px; padding-bottom: var(--space-4); margin-bottom: var(--space-5); border-bottom: 1.5px dashed var(--rule); }
.field { margin-bottom: var(--space-5); border: 0; padding: 0; min-width: 0; }
.field > label, .field legend { display: block; font-weight: 600; color: var(--midnight); margin-bottom: 8px; padding: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); }
.opt { font-weight: 400; color: var(--graphite); }
input:not([type=radio]):not([type=checkbox]), select, textarea { width: 100%; min-height: 48px; padding: 11px 14px; font: 400 1rem/1.4 var(--font-body); color: var(--carbon); background: var(--plate-paper); border: 1.5px solid var(--field-line); border-radius: 12px; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
select { appearance: none; padding-right: 42px; background: var(--plate-paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m7 10 5 5 5-5' fill='none' stroke='%2343218C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 20px no-repeat; }
textarea { resize: vertical; min-height: 96px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(67, 33, 140, .25); border-radius: 12px; }
input::placeholder, textarea::placeholder { color: #7A7290; }
[aria-invalid="true"] { border-color: var(--flash) !important; }
.err { color: var(--flash); font-size: .875rem; margin-top: 6px; min-height: 0; }
.err:empty { display: none; }
.hint { color: var(--graphite); font-size: .8125rem; margin-top: 6px; }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px 8px 12px; border: 1.5px solid var(--field-line); border-radius: var(--pill); cursor: pointer; font-size: .9375rem; background: var(--plate-paper); transition: background-color var(--dur-fast), border-color var(--dur-fast); }
.seg input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }
.seg label:has(input:checked) { border-color: var(--ink); background: var(--lilac); color: var(--midnight); font-weight: 600; }
.seg label:has(input:focus-visible) { box-shadow: var(--focus); }
.seg input:focus-visible { box-shadow: none; }
.field-check label { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; color: var(--carbon); cursor: pointer; }
.field-check input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--ink); }
.status { margin-top: var(--space-4); font-size: .9375rem; }
.status:empty { display: none; }
.status.is-ok { background: var(--lilac); border-left: 4px solid var(--ink); padding: 14px 16px; border-radius: 0 12px 12px 0; }
.status.is-bad { background: #FBEDEC; border-left: 4px solid var(--flash); padding: 14px 16px; }
.status pre { white-space: pre-wrap; font: 500 .8125rem/1.5 var(--font-mono); margin: 10px 0 0; color: var(--graphite); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* piercing */
.piercing { padding: var(--space-9) 0; }
.piercing-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: var(--space-8); align-items: start; }
.pierce-pic img { border-radius: 50% 50% var(--radius-lg) var(--radius-lg) / 38% 38% var(--radius-lg) var(--radius-lg); box-shadow: var(--shadow-soft); }
.pierce-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: var(--space-6); }
.pierce-form { margin-top: var(--space-6); display: grid; grid-template-columns: 1fr 1fr; gap: 0 var(--space-5); padding: var(--space-6); background: var(--lilac); border-radius: var(--radius-lg); }
.pierce-form .btn, .pierce-form .status { grid-column: 1 / -1; }
.pierce-form .btn { justify-self: start; }

/* visit */
.visit { background: var(--lilac); padding: var(--space-9) 0; }
.visit-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-8); align-items: center; }
.addr { margin-top: var(--space-5); font-size: 1.1875rem; line-height: 1.5; }
.addr strong { display: block; font: 400 1.75rem/1.2 var(--font-display); color: var(--midnight); }
.route { margin-top: var(--space-6); display: grid; gap: 12px; }
.route li { display: flex; align-items: center; gap: 14px; }
.route .step-no { width: 36px; height: 36px; flex: none; }
.contact-list { margin: var(--space-6) 0 0; display: grid; gap: 0; border-top: 1px solid var(--rule); }
.contact-list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: center; }
.contact-list dt { font: 500 .75rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--graphite); }
.contact-list dd { margin: 0; overflow-wrap: anywhere; }
.contact-list dd a { display: inline-flex; min-height: 44px; align-items: center; }
.levels { background: var(--paper); border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-soft); }
.levels svg { width: 100%; height: auto; }
.lv path { stroke-width: 1.6; stroke-linejoin: round; }
.lv-mute path { fill: var(--plate-paper); stroke: var(--rule); }
.lv-mute text { fill: var(--graphite); }
.lv-on path { fill: var(--vellum); stroke: var(--violet); stroke-dasharray: 5 4; }
.lv-on text { fill: var(--midnight); font-weight: 600; }
.lv text { font: 500 13px var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.lv-on circle { fill: var(--ink); }
.lv-on .lv-unit { fill: var(--paper); font: 600 11px var(--font-mono); text-transform: none; letter-spacing: 0; }
.lv-mute .lv-arrow { fill: none; stroke: var(--violet); stroke-dasharray: 4 4; stroke-linecap: round; }
.lv-guide { stroke: var(--flash); stroke-width: 1.5; stroke-dasharray: 3 4; fill: none; }

/* footer */
.site-foot { background: var(--midnight); color: var(--on-dark); padding: var(--space-8) 0 var(--space-7); }
.foot-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.3fr; gap: var(--space-7); align-items: start; }
.foot-name { font: 400 2rem/1 var(--font-display); color: var(--paper); margin: 14px 0 8px; }
.foot-brand p:last-child { color: var(--on-dark-dim); font-size: .9375rem; }
.foot-links { display: grid; gap: 4px; }
.foot-links a { color: var(--paper); display: inline-flex; min-height: 44px; align-items: center; overflow-wrap: anywhere; }
.foot-note { color: var(--on-dark-dim); font-size: .875rem; line-height: 1.6; }
.site-foot :focus-visible { box-shadow: 0 0 0 3px var(--midnight), 0 0 0 6px var(--on-dark); }
.dock { display: none; }

/* reveal (JS adds .reveal; reduced motion skips it) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- 5. Responsive ---------- */
@media (max-width: 1080px) {
  .plates-layout { grid-template-columns: 1fr; }
  .contents { position: static; }
  .toc { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
}
@media (max-width: 959px) {
  :root { --head-h: 64px; }
  .menu-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--field-line); border-radius: var(--pill); background: var(--paper); color: var(--midnight); font: 600 .9375rem var(--font-body); cursor: pointer; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 16px; height: 2px; background: currentColor; border-radius: 2px; position: relative; transition: transform var(--dur-fast), background-color var(--dur-fast); }
  .menu-icon::before, .menu-icon::after { content: ''; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; } .menu-icon::after { top: 5px; }
  .menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
  .menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(5px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }
  .js .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 12px; padding: 12px 20px 22px; background: var(--paper); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-soft); }
  .js .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { min-height: 48px; font-size: 1.0625rem; }
  html:not(.js) .site-nav { flex-wrap: wrap; gap: 8px; }
  html:not(.js) .head-row { flex-wrap: wrap; padding-block: 8px; }

  .process-grid, .brief-grid, .piercing-grid, .visit-grid, .sec-head-row { grid-template-columns: 1fr; gap: var(--space-7); }
  .brief-intro { position: static; }
  .foot-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .plate-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pierce-pic { max-width: 460px; }
}
@media (max-width: 859px) {
  .cover::before { display: none; }
  .cover-pic img { height: auto; aspect-ratio: 800 / 893; max-height: 44vh; object-position: 50% 42%; }
  .cover-inner { position: static; height: auto; padding: var(--space-6) 0 var(--space-4); }
  .cover-caption { justify-content: flex-start; padding-top: 0; }
  .cover { display: flex; flex-direction: column; }
  .cover-caption { order: 1; margin-top: 10px; }
  .cover-inner { order: 2; }
}
@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .plates, .process, .pages, .brief, .piercing, .visit { padding: var(--space-8) 0; }
  .toc { grid-template-columns: 1fr; }
  .spread { grid-template-columns: 1fr 1fr; }
  .sp-wall, .sp-ink { grid-column: 1 / -1; }
  .sp-shoulder, .sp-station { grid-column: auto; grid-row: auto; }
  .sp-shoulder img, .sp-station img { aspect-ratio: 4 / 5; }
  .sp-ink img { aspect-ratio: 16 / 9; }
  .field-row, .pierce-form { grid-template-columns: 1fr; }
  .sheet { padding: 40px 20px 24px; }
  .pierce-form { padding: var(--space-5); }
  .viewer-sheet { grid-template-columns: 1fr; }
  .viewer-art { padding: 28px; border-right: 0; border-bottom: 1px dashed var(--rule); }
  .viewer-art svg { max-width: 190px; }
  .viewer-text { padding: 24px 20px 16px; }
  .layered { padding-bottom: 96px; }
  .layer-inset { width: 46%; bottom: 62px; }
  .layered-caption { max-width: 100%; }
  .contact-list div { grid-template-columns: 96px 1fr; }
  .dock { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--paper) 94%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid var(--rule); }
  .dock a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: var(--pill); font-weight: 600; text-decoration: none; border: 1.5px solid var(--ink); color: var(--ink); background: var(--paper); }
  .dock .dock-main { background: var(--ink); color: var(--paper); }
}
@media (max-width: 420px) {
  .wrap { width: calc(100% - 32px); }
  .brand-name { font-size: 1.35rem; }
  .brand img { width: 38px; height: 38px; }
  .plate-grid { gap: 12px; }
  .plate-open { padding: 26px 10px 16px; }
  .plate-name { font-size: 1.25rem; }
  .btn-row .btn { width: 100%; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .menu-btn { padding: 0 14px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
@media (forced-colors: active) {
  .btn, .chip, .plate-open { border: 1px solid ButtonText; }
}
