/* =============================================================================
   mio tabi 澪旅 — Wake Brand Guidelines
   Edition 01 — Wake · Indigo & Vermilion

   Vanilla stylesheet. No frameworks, no libraries.
   Organisation:
     1. Design tokens (:root)
     2. Base & reset
     3. Book & page shell
     4. Page furniture (masthead, rule, eyebrow, title, colophon)
     5. Type helpers & label atoms
     6. Layout utilities (grids, spacing, max-width)
     7. Components (cards, panels, lists, swatches, specimens, mocks…)
     8. Side navigation & toast (progressive enhancement)
     9. Responsive (fit-to-width via JS-set --zoom + reduced motion)
   ========================================================================== */

/* -----------------------------------------------------------------------------
   1. DESIGN TOKENS
   Palette is sampled directly from the shipped mark.
-------------------------------------------------------------------------------*/
:root {
  /* Core palette */
  --sumi:   #101D26;   /* 墨   — darkest ink / cover ground        */
  --konjo:  #1B2C41;   /* 紺青 — structure / dark panels           */
  --shu:    #EF454A;   /* 朱   — vermilion accent (use sparingly)  */
  --kinari: #FAF8F5;   /* 生成り— paper / light ground             */
  --sand:   #BFB8A6;   /* book background                          */

  /* Konjō tints — 100 / 75 / 50 / 25 / 10 */
  --konjo-75: #535F6E;
  --konjo-50: #8B929B;
  --konjo-25: #C2C5C8;
  --konjo-10: #E4E4E3;

  /* Ink on paper */
  --ink:         #3c4148;   /* body copy               */
  --ink-2:       #3f4a52;   /* body copy, alt          */
  --ink-strong:  #1B2C41;   /* emphasis                */
  --sand-ink:    #9a9382;   /* muted labels            */
  --sand-ink-2:  #8a8475;   /* muted labels, alt       */
  --sand-ink-3:  #6b6357;   /* italic captions         */
  --sand-ink-4:  #6f6a5e;   /* colour metadata         */

  /* Ink on dark */
  --paper:   #FAF8F5;
  --mist:    #c9d2d8;
  --mist-2:  #a9b4bc;
  --mist-3:  #9fb0bd;
  --slate:   #8b98a3;
  --slate-2: #7d8891;

  /* Hairlines */
  --line:         rgba(27,44,65,.12);
  --line-2:       rgba(27,44,65,.14);
  --line-3:       rgba(27,44,65,.16);
  --line-strong:  rgba(27,44,65,.18);
  --line-on-dark: rgba(250,248,245,.20);
  --line-dark:    rgba(159,176,189,.30);

  /* Type families */
  --jp:    'Shippori Mincho', serif;   /* display · Japanese          */
  --serif: 'EB Garamond', serif;       /* editorial · English body    */
  --sans:  'Hanken Grotesk', sans-serif;/* labels · UI · captions     */

  /* Metrics */
  --page: 1080px;
  --zoom: 1;           /* set by js/main.js to fit the viewport width */
}

/* -----------------------------------------------------------------------------
   2. BASE & RESET
-------------------------------------------------------------------------------*/
*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--sand);
  color: var(--ink);
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }

p { margin: 0; }

/* -----------------------------------------------------------------------------
   3. BOOK & PAGE SHELL
-------------------------------------------------------------------------------*/
.book {
  zoom: var(--zoom);                 /* fit-to-width, driven by main.js */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  padding: 48px 24px;
}

.page {
  width: var(--page);
  background: var(--kinari);
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
  padding: 72px;
  position: relative;
}

/* Dark full-bleed pages — cover & closing */
.page--dark {
  background: var(--sumi);
  box-shadow: 0 2px 8px rgba(0,0,0,.22);
  padding: 80px;
  display: flex;
  flex-direction: column;
}
.page--cover   { min-height: 1240px; }
.page--closing { min-height: 760px; align-items: center; justify-content: center; text-align: center; }

/* -----------------------------------------------------------------------------
   4. PAGE FURNITURE
-------------------------------------------------------------------------------*/
.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
}
.masthead__brand {
  font-size: 13px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--ink-strong);
  font-weight: 600;
}
.masthead__brand .jp {
  font-family: var(--jp);
  letter-spacing: .1em;
  text-transform: none;
  font-weight: 400;
  color: var(--sand-ink);
}
.masthead__tag {
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--sand-ink);
}

/* Hairline with vermilion tick */
.rule {
  position: relative;
  height: 1px;
  margin-top: 14px;
  background: var(--line-strong);
}
.rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 34px;
  height: 3px;
  background: var(--shu);
}

/* Section header block (eyebrow + title) */
.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--shu);
  font-weight: 600;
}
.title {
  margin-top: 12px;
  font-family: var(--jp);
  font-weight: 600;
  font-size: 38px;
  color: var(--sumi);
}
.title--md { font-size: 36px; }

.lede {
  margin-top: 12px;
  max-width: 780px;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.62;
  color: var(--ink);
}
.subtitle {
  margin-top: 8px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--sand-ink-3);
}

/* Footer */
.colophon {
  margin-top: 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line-2);
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--sand-ink);
}

/* -----------------------------------------------------------------------------
   5. TYPE HELPERS & LABEL ATOMS
-------------------------------------------------------------------------------*/
.jp        { font-family: var(--jp); }
.en-i      { font-family: var(--serif); font-style: italic; }
.strong    { color: var(--ink-strong); }
b.strong, .strong b { font-weight: 700; }

/* Muted, tracked, all-caps label — the workhorse label atom */
.kicker {
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .20em;
  text-transform: uppercase;
  color: var(--sand-ink);
}
.kicker--b     { font-weight: 600; }
.kicker--wide  { letter-spacing: .22em; }
.kicker--xs    { font-size: 10px; letter-spacing: .16em; }
.kicker--sm    { font-size: 11px; letter-spacing: .16em; }
.kicker--konjo { color: var(--ink-strong); }
.kicker--shu   { color: var(--shu); }

/* -----------------------------------------------------------------------------
   6. LAYOUT UTILITIES
-------------------------------------------------------------------------------*/
.grid { display: grid; }
.grid-2   { grid-template-columns: 1fr 1fr; }
.grid-3   { grid-template-columns: 1fr 1fr 1fr; }
.grid-4   { grid-template-columns: repeat(4, 1fr); }
.grid-2a  { grid-template-columns: 1.1fr .9fr; }  /* story        */
.grid-2b  { grid-template-columns: 1.1fr 1fr; }   /* clear space  */
.grid-2c  { grid-template-columns: 1.3fr 1fr; }   /* usage ratio  */

.stack { display: flex; flex-direction: column; }
.row   { display: flex; }
.items-start   { align-items: flex-start; }
.items-center  { align-items: center; }

/* Column gaps */
.gap-8  { gap: 8px; }  .gap-10 { gap: 10px; } .gap-14 { gap: 14px; }
.gap-16 { gap: 16px; } .gap-18 { gap: 18px; } .gap-20 { gap: 20px; }
.gap-36 { gap: 36px; } .gap-44 { gap: 44px; }

/* Top margins — preserve the source's vertical rhythm */
.mt-8  { margin-top: 8px; }  .mt-10 { margin-top: 10px; } .mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; } .mt-16 { margin-top: 16px; } .mt-18 { margin-top: 18px; }
.mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; } .mt-26 { margin-top: 26px; }
.mt-28 { margin-top: 28px; } .mt-30 { margin-top: 30px; } .mt-32 { margin-top: 32px; }
.mt-34 { margin-top: 34px; } .mt-36 { margin-top: 36px; } .mt-40 { margin-top: 40px; }
.mt-44 { margin-top: 44px; }

.mw-760 { max-width: 760px; }
.mw-820 { max-width: 820px; }
.mw-840 { max-width: 840px; }

.mt-6 { margin-top: 6px; }
.tac  { text-align: center; }

/* Text-colour helpers (palette tokens only) */
.t-konjo { color: var(--konjo); }
.t-shu   { color: var(--shu); }
.t-sumi  { color: var(--sumi); }
.t-sand2 { color: var(--sand-ink-2); }
.t-mist3 { color: var(--mist-3); }
.em-konjo { color: var(--ink-strong); font-weight: 600; }

/* Background helpers (palette tokens only) */
.bg-konjo    { background: var(--konjo); }
.bg-shu      { background: var(--shu); }
.bg-sumi     { background: var(--sumi); }
.bg-kinari   { background: var(--kinari); }
.bg-konjo-75 { background: var(--konjo-75); }
.bg-konjo-50 { background: var(--konjo-50); }
.bg-konjo-25 { background: var(--konjo-25); }
.bg-konjo-10 { background: var(--konjo-10); }

/* -----------------------------------------------------------------------------
   7. COMPONENTS
-------------------------------------------------------------------------------*/

/* Card — white panel on paper */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 30px;
}
.card--pad-20 { padding: 20px; }
.card--pad-24 { padding: 24px; }
.card--pad-26 { padding: 26px; }
.card--pad-28 { padding: 28px; }
.card--pad-32 { padding: 32px; }
.card--pad-34 { padding: 34px; }
.card--pad-36 { padding: 36px; }
.card--center { display: flex; flex-direction: column; align-items: center; }

/* Body copy inside cards / columns */
.prose {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
}
.prose--15 { font-size: 15px; }
.prose--17 { font-size: 17px; line-height: 1.68; }
.prose--sm { font-size: 14px; line-height: 1.45; }
.prose p + p { margin-top: 18px; }

.note {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--sand-ink-3);
}
.note--sm { font-size: 13px; }
.note--13 { font-size: 13px; }

/* Dark panel / pull-quote block */
.panel {
  border-radius: 4px;
  padding: 36px;
}
.panel--konjo { background: var(--konjo); }
.panel--sumi  { background: var(--sumi); }
.panel__quote {
  font-family: var(--jp);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.5;
  color: var(--paper);
}
.panel__hr { height: 1px; background: var(--line-on-dark); }
.panel__cite {
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.6;
  color: var(--mist);
}

/* "One wall" callout (P3) */
.callout {
  background: var(--sumi);
  border-radius: 4px;
  padding: 32px 36px;
  display: flex;
  align-items: center;
  gap: 26px;
}
.callout__lead {
  font-family: var(--jp);
  font-weight: 700;
  font-size: 26px;
  color: var(--paper);
  white-space: nowrap;
}
.callout__sep { width: 1px; height: 44px; background: var(--line-on-dark); flex: none; }
.callout__body {
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.6;
  color: var(--mist);
}

/* Deny / do-not list (✕) */
.deny { display: flex; flex-direction: column; gap: 8px; font-family: var(--serif); font-size: 15px; color: var(--ink); }
.deny__item { display: flex; gap: 12px; align-items: baseline; }
.deny__x { color: var(--shu); font-family: var(--sans); font-size: 13px; }

/* Pillars (top-ruled columns) */
.pillar { padding-top: 20px; border-top: 2px solid var(--shu); }
.pillar__name { font-family: var(--jp); font-weight: 600; font-size: 18px; color: var(--sumi); }
.pillar__body { margin-top: 8px; font-family: var(--serif); font-size: 15px; line-height: 1.55; color: var(--ink); }

/* Logo showcases */
.logo-stage {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.logo-stage__caption { margin-top: 18px; }
.logo-stage__mark { width: 280px; }
.chip-dark img { width: 100%; }
.chip-dark {
  flex: 1;
  background: var(--sumi);
  border-radius: 3px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The wake, isolated (P7) */
.wake-stage {
  margin-top: 30px;
  background: var(--sumi);
  border-radius: 4px;
  padding: 44px;
  display: flex;
  justify-content: center;
}
.wake-stage img { width: 640px; }

/* Colour swatches (P8) */
.swatch { position: relative; }
.swatch__chip { height: 150px; border-radius: 3px; transition: transform .18s ease; }
.swatch.copyable:hover .swatch__chip,
.swatch.copyable:focus-visible .swatch__chip { transform: translateY(-3px); }
.swatch__chip--ring { box-shadow: inset 0 0 0 1px var(--line-3); }
.swatch__name { margin-top: 14px; font-family: var(--jp); font-size: 21px; color: var(--sumi); }
.swatch__name .romaji {
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--sand-ink-2);
}
.swatch__meta { margin-top: 8px; font-family: var(--sans); font-size: 12px; line-height: 1.7; color: var(--sand-ink-4); }
.swatch__role { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 14px; }

/* Copyable swatch (progressive enhancement) */
.copyable { cursor: copy; }
.copyable:focus-visible { outline: 2px solid var(--shu); outline-offset: 3px; }

/* Usage ratio bar */
.ratio {
  display: flex;
  height: 48px;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line);
}
.ratio > span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 12px;
}

/* Tint ramp */
.tints { display: flex; gap: 8px; }
.tints > span { flex: 1; height: 48px; border-radius: 3px; }
.tint-scale {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--sand-ink);
}

/* Type specimens (P9) */
.specimen {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 40px;
}
.specimen__glyphs { flex: none; width: 240px; line-height: 1; color: var(--ink-strong); }
.specimen__glyphs--jp    { font-family: var(--jp); font-weight: 700; font-size: 72px; }
.specimen__glyphs--serif { font-family: var(--serif); font-size: 60px; }
.specimen__glyphs--sans  { font-family: var(--sans); font-weight: 600; font-size: 46px; letter-spacing: .14em; }
.specimen__name { font-family: var(--jp); font-weight: 600; font-size: 24px; color: var(--sumi); }
.specimen__desc { margin-top: 10px; font-family: var(--serif); font-size: 17px; line-height: 1.5; color: var(--ink); }

/* Voice cards (P10) */
.voice__title { font-family: var(--jp); font-size: 20px; color: var(--ink-strong); }
.voice__body { margin-top: 10px; font-family: var(--serif); font-size: 15px; line-height: 1.5; color: var(--ink); }

.tagline-box__jp { font-family: var(--jp); font-weight: 600; font-size: 30px; color: var(--paper); }
.tagline-box__en { margin-top: 8px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--mist-3); }
.headlines { display: flex; flex-direction: column; gap: 10px; font-family: var(--jp); font-size: 19px; color: var(--sumi); }

/* Art direction — duotone photo placeholders (P11) */
.photo-frame {
  position: relative;
  height: 230px;
  border-radius: 4px;
  overflow: hidden;
}
.photo-frame__label {
  position: absolute;
  left: 18px;
  bottom: 16px;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper);
}
.duo-land  { background: linear-gradient(155deg,#101D26 0%,#2b3d52 34%,#7a8188 64%,#FAF8F5 100%); }
.duo-hands { background: linear-gradient(120deg,#101D26 0%,#33455c 40%,#94979e 72%,#FAF8F5 100%); }
.duo-table { background: linear-gradient(200deg,#101D26 0%,#2c3e52 36%,#868c92 66%,#FAF8F5 100%); }
.duo-hero  { background: linear-gradient(150deg,#101D26 0%,#2c3e52 42%,#8b9096 72%,#FAF8F5 100%); }

/* Applications — physical & digital mocks (P12) */
.mock { height: 230px; position: relative; }
.mock--card {
  background: #fff; border: 1px solid rgba(27,44,65,.10); border-radius: 5px; padding: 26px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.mock--card img { width: 130px; }
.mock--booklet { background: var(--kinari); border: 1px solid var(--line-3); border-radius: 5px; }
.mock--tag {
  background: #fff; border: 1px solid var(--line); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
}
.booklet__spine {
  position: absolute; left: 22px; top: 24px;
  font-family: var(--jp); font-weight: 800; font-size: 34px; color: var(--sumi);
  writing-mode: vertical-rl; letter-spacing: .06em;
}
.booklet__no { position: absolute; right: 20px; top: 22px; font-family: var(--serif); font-style: italic; font-size: 12px; color: #7a766c; }
.booklet__seal {
  position: absolute; right: 18px; bottom: 18px; width: 48px; height: 48px;
  background: var(--shu); border-radius: 2px; display: flex; align-items: center; justify-content: center;
  transform: rotate(-4deg);
}
.booklet__seal span { font-family: var(--jp); font-weight: 700; font-size: 25px; color: var(--paper); }
.booklet__kicker {
  position: absolute; left: 22px; bottom: 20px;
  font-family: var(--sans); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--sand-ink);
}
.tag-body { width: 96px; height: 170px; background: var(--konjo); border-radius: 4px; position: relative; padding: 14px; }
.tag-body__hole { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); width: 12px; height: 12px; border-radius: 50%; background: var(--paper); }
.tag-body__jp { margin-top: 26px; font-family: var(--jp); font-weight: 700; font-size: 24px; color: var(--paper); writing-mode: vertical-rl; }
.tag-body__wake { position: absolute; left: 14px; bottom: 16px; }

.browser { background: #fff; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.browser__bar {
  background: var(--kinari); border-bottom: 1px solid var(--line);
  padding: 18px 26px; display: flex; align-items: center; justify-content: space-between;
}
.browser__brand { display: flex; align-items: center; gap: 10px; }
.browser__brand .jp { font-family: var(--jp); font-weight: 700; font-size: 24px; color: var(--konjo); }
.browser__nav { display: flex; gap: 26px; font-family: var(--sans); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink); }
.browser__hero { height: 120px; display: flex; align-items: center; padding: 0 26px; }
.browser__hero .jp { font-family: var(--jp); font-weight: 600; font-size: 26px; color: var(--paper); }

/* -----------------------------------------------------------------------------
   COVER (P0) & CLOSING (P13)
-------------------------------------------------------------------------------*/
.cover__top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-family: var(--sans);
}
.cover__eyebrow { font-size: 13px; letter-spacing: .34em; text-transform: uppercase; color: var(--paper); font-weight: 600; }
.cover__eyebrow--jp { letter-spacing: .24em; color: var(--slate); font-weight: 400; }
.cover__center {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.cover__mark { width: 360px; }
.cover__tagline-en { margin-top: 30px; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--mist-2); }
.cover__tagline-jp { margin-top: 8px; font-family: var(--jp); font-weight: 500; font-size: 19px; color: var(--slate-2); }
.cover__foot { display: flex; justify-content: space-between; align-items: flex-end; }
.cover__tick { width: 54px; height: 3px; background: var(--shu); margin-bottom: 18px; }
.cover__edition { font-family: var(--jp); font-size: 24px; color: var(--paper); }
.cover__sub { margin-top: 4px; font-family: var(--sans); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--slate); }
.cover__revised { font-family: var(--sans); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--slate); }

.closing__mark { width: 220px; }
.closing__line { margin-top: 22px; font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--mist-2); }
.closing__handle { margin-top: 36px; font-family: var(--sans); font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--paper); }
.closing__foot {
  position: absolute; left: 80px; right: 80px; bottom: 54px;
  padding-top: 16px; border-top: 1px solid var(--line-dark);
  display: flex; justify-content: space-between;
  font-family: var(--sans); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--slate);
}

/* Content-specific modifiers (kept here so the markup stays style-free) */
.statement {
  margin-top: 14px;
  max-width: 820px;
  font-family: var(--jp);
  font-weight: 600;
  font-size: 33px;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--sumi);
}
.dek { font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--ink-2); }

.prose--14 { font-size: 14px; }
.prose--18 { font-size: 18px; line-height: 1.62; }
.prose--wide { line-height: 1.7; }

.note--12 { font-size: 12px; }
.note--14 { font-size: 14px; }
.note--15 { font-size: 15px; }

.subtitle--15   { font-size: 15px; }
.subtitle__note { font-style: normal; color: var(--sand-ink-2); }

.panel--pad-34 { padding: 34px; }

/* Misuse grid inherits the deny list's type */
.deny-grid { font-family: var(--serif); font-size: 15px; color: var(--ink); }

/* Usage-ratio segments (P8) — weights are the recommended proportions */
.ratio__k { flex: 56; background: var(--kinari); color: var(--sand-ink); }
.ratio__j { flex: 30; background: var(--konjo);  color: var(--paper); }
.ratio__s { flex: 10; background: var(--sumi);   color: var(--mist-3); font-size: 11px; }
.ratio__a { flex: 4;  background: var(--shu); }

/* -----------------------------------------------------------------------------
   8. SIDE NAVIGATION & TOAST  (progressive enhancement)
-------------------------------------------------------------------------------*/
.sidenav {
  position: fixed;
  top: 50%;
  right: 22px;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 8px;
  border-radius: 999px;
  background: rgba(16,29,38,.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.sidenav__link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  text-decoration: none;
  border: 0;
  background: none;
  cursor: pointer;
}
.sidenav__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(250,248,245,.42);
  transition: transform .18s ease, background-color .18s ease;
}
.sidenav__link:hover .sidenav__dot { background: var(--mist-2); transform: scale(1.25); }
.sidenav__link[aria-current="true"] .sidenav__dot { background: var(--shu); transform: scale(1.5); }
.sidenav__label {
  position: absolute;
  right: 28px;
  white-space: nowrap;
  font-family: var(--sans);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--paper);
  background: rgba(16,29,38,.92);
  padding: 5px 10px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateX(6px);
  transition: opacity .16s ease, transform .16s ease;
}
.sidenav__link:hover .sidenav__label,
.sidenav__link:focus-visible .sidenav__label { opacity: 1; transform: translateX(0); }
.sidenav__link:focus-visible { outline: 2px solid var(--shu); outline-offset: 2px; border-radius: 50%; }

.toast {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 12px);
  z-index: 60;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--konjo);
  padding: 10px 18px;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(16,29,38,.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* No-JS: the enhancements simply never appear (no .is-* / injected nav). */

/* -----------------------------------------------------------------------------
   9. RESPONSIVE & MOTION
-------------------------------------------------------------------------------*/
/* Hide the side-nav where the zoomed book leaves little room. */
@media (max-width: 640px) {
  .sidenav { right: 10px; padding: 8px 6px; }
  .sidenav__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .sidenav__dot, .sidenav__label, .toast, .swatch__chip { transition: none; }
}
