/* ==========================================================================
   Marek Kamm · personal site
   Palette (3 colours): Lagoon Blue #7BDFF2 · Cloud White #FCFFFF · Bubblegum Pink #F2B5D4
   --ink is the darkest shade of Lagoon Blue and is used for text and line work only.
   ========================================================================== */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-stretch: 75% 100%; font-display: swap;
  src: url("/assets/fonts/bricolage-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/geist-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("/assets/fonts/geist-mono-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
/* Japanese display face, subset to the handful of characters used on the page */
@font-face { font-family: "Dela Gothic One"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/dela-jp-subset.woff2") format("woff2"); }
/* city names in the scenes (subset to 广州香港 and 서울) */
@font-face { font-family: "City SC"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("/assets/fonts/city-sc.woff2") format("woff2"); }
@font-face { font-family: "City KR"; font-style: normal; font-weight: 900; font-display: swap;
  src: url("/assets/fonts/city-kr.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Kumamoto palette = default (Lagoon Blue · Cloud White · Bubblegum Pink) */
  --main: #7BDFF2;
  --paper: #FCFFFF;
  --accent: #F2B5D4;
  --main-soft: #CBF3FA;
  --main-mist: #E5F9FD;
  --main-deep: #4E99A8;
  --accent-soft: #F8DEEC;
  --accent-mist: #FAEFF6;
  --ink: #0B2F3A;
  --ink-soft: #36545D;

  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --font-jp: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", "Noto Sans CJK JP", Meiryo, sans-serif;
  --font-jp-display: "Dela Gothic One", var(--font-jp);

  --gutter: clamp(16px, 4vw, 48px);
  --maxw: 1180px;
  --ease: cubic-bezier(.2, .8, .2, 1);

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .04  0 0 0 0 .18  0 0 0 0 .23  0 0 0 .5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");

  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
html.still { scroll-behavior: auto; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--main);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { max-width: 100%; }
a { color: inherit; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--accent); }
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--ink); }
.jp { font-family: var(--font-jp); font-weight: 700; }
.jp-d { font-family: var(--font-jp-display); font-weight: 400; }
section[id] { scroll-margin-top: 92px; }

.skip-link {
  position: fixed; left: 16px; top: -80px; z-index: 100;
  padding: .7em 1.1em; font-weight: 700; text-decoration: none;
  background: var(--accent); border: 2px solid var(--ink); border-radius: 12px; box-shadow: 3px 3px 0 var(--ink);
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.st-cloud { stop-color: var(--paper); }
.st-pink { stop-color: var(--accent); }
.st-pink-soft { stop-color: var(--accent-soft); }
.st-lagoon { stop-color: var(--main-soft); }
.st-clear { stop-color: var(--main); stop-opacity: 0; }
.st-shade { stop-color: var(--main); stop-opacity: .5; }

/* ==========================================================================
   Scene (fixed background illustration)
   ========================================================================== */
.scene {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, var(--main) 0%, #95E6F5 34%, #C2F0F9 60%, #E9FBFE 80%, var(--paper) 100%);
}
.scene > svg, .scene > canvas { position: absolute; max-width: none; }
.clouds { inset: 0; width: 100%; height: 100%; transform: translateY(calc(var(--p, 0) * -5vh)); }
.hills { left: 0; bottom: 0; width: 100%; height: 100%; }
.hill-far { fill: #B4ECF7; }
.hill-mid { fill: #D3F5FB; }
.hill-near { fill: #EEFCFE; }
.cloud-ln { fill: var(--ink); stroke: var(--ink); stroke-width: 3.4; stroke-linejoin: round; }
.cloud-fill { fill: var(--paper); }
.drift { animation: drift 46s ease-in-out infinite alternate; }
.drift--b { animation-duration: 58s; animation-direction: alternate-reverse; }
.drift--c { animation-duration: 40s; }
@keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(50px); } }

.castle {
  right: clamp(0px, calc(50vw - 820px), 240px);
  bottom: -1vh;
  width: min(66vw, 112vh, 1240px);
  height: auto;
  overflow: visible;
  transform: translateY(calc(var(--p, 0) * 5vh));
}
.branch {
  top: -18px; right: -36px;
  width: min(42vw, 600px);
  height: auto;
  transform: translateY(calc(var(--p, 0) * -3vh));
  transform-origin: 100% 0;
  animation: sway 9s ease-in-out infinite alternate;
}
@keyframes sway { from { rotate: -1deg; } to { rotate: 1.4deg; } }
.petals { inset: 0; width: 100%; height: 100%; }

/* castle line work */
.castle .sun { fill: var(--accent); }
.castle .k-fill, .castle .k-roof { fill: var(--paper); }
.castle .k-stone { fill: url(#gStone); }
.castle .k-pat-stone { fill: url(#pStone); }
.castle .k-pat-v { fill: url(#pBoard); }
.castle .k-pat-tile { fill: url(#pTile); }
.castle .k-roof-shade { fill: url(#gRoof); }
.castle .k-siding { fill: var(--main-soft); }
.castle .k-shade { fill: var(--main); opacity: .45; }
.castle .k-win, .castle .k-shachi { fill: var(--ink); }
.castle .k-mullion { fill: none; stroke: var(--main-soft); stroke-width: 1.6; }
.castle .k-ln { fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linejoin: round; stroke-linecap: round; }
.castle .k-thin { stroke-width: 1.3; }
.castle .k-board-o { fill: none; stroke: var(--ink); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.castle .k-board-i { fill: none; stroke: var(--paper); stroke-width: 3.6; stroke-linecap: round; stroke-linejoin: round; }
.castle .pat-ln { fill: none; stroke: var(--main-deep); stroke-width: 1; opacity: .5; }
.castle .pat-tile { fill: none; stroke: var(--main-deep); stroke-width: 1.1; opacity: .38; }
.castle .trunk { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.castle .trunk--big { stroke-width: 10; }
.castle .bloom { fill: var(--accent); }
.castle .bloom-hi { fill: var(--accent-soft); }
.castle .bloom-dot { fill: var(--paper); }
.castle .tree-ln { fill: none; stroke: var(--ink); stroke-width: 1.6; opacity: .5; }

/* sakura flower (sprite symbol) */
.flower path { fill: url(#gPetal); stroke: var(--ink); stroke-width: 1.3; stroke-linejoin: round; }
.flower-eye { fill: var(--accent); stroke: var(--ink); stroke-width: 1.2; }
.flower-stamen circle { fill: var(--ink); }
.branch .twig path { fill: none; stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; }
.branch .twig-1 { stroke-width: 10; }
.branch .twig-2 { stroke-width: 5.5; }
.branch .twig-3 { stroke-width: 3.5; }
.branch .bud { fill: var(--accent); stroke: var(--ink); stroke-width: 1.6; }

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed; z-index: 50;
  top: max(12px, env(safe-area-inset-top));
  left: 50%; transform: translateX(-50%);
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 6px 6px 7px;
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px;
  box-shadow: 4px 4px 0 var(--ink);
}
.nav__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font: 800 1.05rem/1 var(--font-display); letter-spacing: -.01em; }
.nav__logo {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--ink);
  font: 800 .95rem/1 var(--font-display); font-stretch: 80%; letter-spacing: 0;
  transition: rotate .4s var(--ease);
}
.nav__brand:hover .nav__logo { rotate: -12deg; }
.nav__links { display: flex; gap: 2px; }
.nav__links a { padding: .6em .95em; border-radius: 999px; text-decoration: none; font-weight: 550; font-size: .95rem; transition: background-color .2s; }
.nav__links a:hover, .nav__links a[aria-current="true"] { background: var(--main-soft); }
.nav__actions { display: flex; align-items: center; gap: 4px; }
.icon-btn {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  color: var(--ink); border: 2px solid transparent; transition: background-color .15s, border-color .15s;
}
.icon-btn:hover { background: var(--main-soft); border-color: var(--ink); }
.icon-btn svg { width: 20px; height: 20px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  --bs: 4px;
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .9em 1.35em;
  font: 650 1rem/1 var(--font-body);
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--bs) var(--bs) 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: calc(var(--bs) + 2px) calc(var(--bs) + 2px) 0 var(--ink); }
.btn:active { transform: translate(var(--bs), var(--bs)); box-shadow: 0 0 0 var(--ink); }
.btn:focus-visible { outline-offset: 5px; border-radius: 999px; }
.btn__icon { width: 1.15em; height: 1.15em; flex: none; }
.btn--pink { background: var(--accent); }
.btn--lagoon { background: var(--main); }
.btn--sm { --bs: 3px; padding: .72em 1.1em; font-size: .92rem; }
.btn--lg { padding: 1em 1.45em; font-size: clamp(1rem, 1.6vw, 1.15rem); }
.btn--icon { padding-inline: 1em; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  max-width: 1720px; margin: 0 auto;
  padding: clamp(100px, 13vh, 140px) var(--gutter) clamp(64px, 9vh, 110px);
}
.hero__inner { position: relative; max-width: 640px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .65em; margin: 0;
  padding: .6em 1em .6em .8em;
  font: 600 .78rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
}
.eyebrow .jp { font-size: .95rem; letter-spacing: .05em; }
.eyebrow__dot {
  flex: none; width: .75em; height: .75em; border-radius: 50%;
  background: var(--accent); border: 1.5px solid var(--ink);
  animation: pulse 2.2s ease-in-out infinite;
}
@keyframes pulse { 50% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 55%, transparent); } }

.hero__name {
  margin: .3em 0 .32em;
  font-family: var(--font-display); font-weight: 800; font-stretch: 75%;
  font-size: clamp(4.4rem, min(13.5vw, 19vh), 11.5rem);
  line-height: .82; letter-spacing: -.035em; text-transform: uppercase;
}
.hero__name span { display: block; }
.hero__last {
  color: var(--paper);
  text-shadow: .012em .012em 0 var(--ink), .024em .024em 0 var(--ink), .036em .036em 0 var(--ink), .048em .048em 0 var(--ink), .06em .06em 0 var(--ink);
}
.hero__role { margin: 0 0 1.2rem; max-width: 34ch; font-size: clamp(1.08rem, 1.55vw, 1.32rem); line-height: 1.5; font-weight: 520; }
mark { color: inherit; background: linear-gradient(transparent 56%, var(--accent) 56%, var(--accent) 92%, transparent 92%); padding: 0 .08em; }
.headline mark { background: linear-gradient(transparent 50%, var(--accent) 50%, var(--accent) 86%, transparent 86%); padding: 0 .04em; }
.hero__quote {
  display: inline-block; margin: 0 0 1.7rem; max-width: 30ch;
  padding: .7em 1.05em;
  font: 600 clamp(.98rem, 1.3vw, 1.1rem)/1.4 var(--font-display);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 18px 18px 18px 4px;
  box-shadow: 4px 4px 0 var(--ink); rotate: -1.5deg;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; }

.hero__says { display: flex; align-items: flex-end; gap: 12px; margin: 0 0 1.7rem; }
.hero__says .hero__quote { margin: 0 0 8px; }
.hero__avatar {
  flex: none; width: clamp(56px, 5vw, 70px); height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ==========================================================================
   Sheets: the content floats on a bank of clouds (no boxes)
   ========================================================================== */
main { position: relative; z-index: 1; }
.sheet { position: relative; }
.edge { display: block; width: 100%; height: 120px; margin-bottom: -1px; }
.edge--bottom { transform: scaleY(-1); margin: -1px 0 0; }
.edge-ln { fill: var(--ink); stroke: var(--ink); stroke-width: 4.4; stroke-linejoin: round; }
.edge-fill { fill: var(--paper); }
.edge-back { fill: var(--main-soft); }
.sheet__inner { background: var(--paper); padding: 0 0 clamp(8px, 2vw, 24px); }

.sec {
  display: grid; grid-template-columns: clamp(104px, 12vw, 180px) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px);
  width: min(var(--maxw), calc(100% - 2 * var(--gutter)));
  margin: 0 auto; padding: clamp(40px, 7vw, 104px) 0;
}
.sec__rail { position: sticky; top: 104px; align-self: start; display: grid; justify-items: start; gap: 12px; }
.sec__num {
  font: 800 clamp(3.4rem, 6.4vw, 5.6rem)/.82 var(--font-display); font-stretch: 75%; letter-spacing: -.04em;
  color: var(--accent);
  text-shadow: .012em .012em 0 var(--ink), .024em .024em 0 var(--ink), .036em .036em 0 var(--ink), .048em .048em 0 var(--ink);
}
.sec__en { font: 600 .78rem/1 var(--font-mono); letter-spacing: .16em; text-transform: uppercase; }
.sec__jp { margin-top: 4px; writing-mode: vertical-rl; font-family: var(--font-jp-display); font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1; letter-spacing: .28em; }
.sec__body { min-width: 0; }

.divider { display: flex; align-items: center; gap: 18px; width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 0 auto; }
.divider::before, .divider::after { content: ""; flex: 1; height: 2px; background: var(--ink); }
.divider svg { width: 42px; height: 42px; overflow: visible; rotate: 12deg; }


.headline {
  margin: 0 0 clamp(18px, 2.6vw, 30px);
  font-family: var(--font-display); font-weight: 800; font-stretch: 82%;
  font-size: clamp(2.5rem, 6vw, 5.2rem); line-height: .96; letter-spacing: -.035em;
  text-wrap: balance;
}
.lede { margin: 0; max-width: 52ch; font-size: clamp(1.05rem, 1.35vw, 1.2rem); color: var(--ink-soft); }
.prose p { margin: 0 0 1.05em; max-width: 62ch; font-size: clamp(1.02rem, 1.2vw, 1.12rem); line-height: 1.72; }
.prose strong { font-weight: 650; }
.kicker { display: flex; align-items: center; gap: .7em; margin: 0; font: 600 .74rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.kicker__num { padding: .35em .55em; background: var(--accent); border: 1.5px solid var(--ink); border-radius: 8px; letter-spacing: .04em; }
.links { display: flex; flex-wrap: wrap; gap: 10px; margin: auto 0 0; padding-top: 6px; }

.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: .55em .95em; font-size: .88rem; line-height: 1.15; font-weight: 520; background: var(--main-mist); border: 1.5px solid var(--ink); border-radius: 999px; }
.chip:nth-child(3n+2) { background: var(--accent-mist); }
.chip:nth-child(3n) { background: var(--paper); }
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: .5em .7em; font: 500 .74rem/1 var(--font-mono); background: var(--paper); border: 1.5px solid var(--ink); border-radius: 8px; }
.link-btn {
  display: inline-flex; align-items: center; gap: .45em; padding: .72em 1.05em;
  font: 650 .9rem/1 var(--font-body); color: var(--ink); text-decoration: none;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.link-btn svg { width: 1em; height: 1em; }
.link-btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.link-btn--pink { background: var(--accent); }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.about__text .chips { margin-top: 26px; }
.about__side { display: grid; justify-items: center; padding-top: 18px; }

.idcard {
  position: relative; margin: 0; width: min(100%, 340px);
  padding: 14px 14px 18px;
  background: var(--main); border: 2px solid var(--ink); border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink);
  rotate: 2.4deg; transition: transform .5s var(--ease); will-change: transform;
}
.idcard__photo {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 18px;
  background: radial-gradient(var(--accent-soft) 22%, transparent 23%) 0 0 / 24px 24px, var(--accent);
}
.idcard__mono {
  font: 800 clamp(5rem, 10vw, 7.4rem)/1 var(--font-display); font-stretch: 75%; letter-spacing: -.04em; color: var(--paper);
  text-shadow: .015em .015em 0 var(--ink), .03em .03em 0 var(--ink), .045em .045em 0 var(--ink), .06em .06em 0 var(--ink);
}
.idcard__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .6s; }
.idcard__photo img.is-loaded { opacity: 1; }
.idcard__caption { display: grid; gap: 4px; margin-top: 14px; padding: 0 4px; }
.idcard__name { font: 800 1.55rem/1 var(--font-display); font-stretch: 85%; letter-spacing: -.02em; }
.idcard__meta { font: 600 .74rem/1.35 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.idcard__jp {
  position: absolute; top: 34px; right: -22px; writing-mode: vertical-rl; padding: 12px 7px;
  font-size: 1rem; letter-spacing: .2em;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 3px 3px 0 var(--ink);
}
.stamp {
  position: absolute; top: -24px; left: -24px; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%;
  font-size: 1.2rem; letter-spacing: .05em;
  background: var(--accent); border: 2px solid var(--ink);
  box-shadow: inset 0 0 0 4px var(--accent), inset 0 0 0 6px var(--ink), 3px 3px 0 var(--ink);
  rotate: -14deg;
}


/* ---------- Path: a train line ---------- */
.route { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; margin-top: clamp(30px, 4vw, 48px); }
.line { list-style: none; margin: 0; padding: 0; }
.stop { position: relative; padding: 0 0 clamp(32px, 4vw, 46px) 64px; }
.stop:last-child { padding-bottom: 0; }
.stop::before {
  content: ""; position: absolute; z-index: 1; left: 4px; top: 0; width: 34px; height: 34px; border-radius: 50%;
  background: var(--paper); border: 4px solid var(--ink);
}
.stop::after {
  content: ""; position: absolute; left: 14px; top: 17px; bottom: -17px; width: 14px;
  background: var(--main); border-inline: 2px solid var(--ink);
}
.stop:last-child::after { display: none; }
.stop--now::before { background: var(--accent); animation: here 2.4s ease-in-out infinite; }
.stop--next::before { border-width: 3px; border-style: dashed; }
.stop--next::after { background: repeating-linear-gradient(var(--main) 0 12px, transparent 12px 20px); border-inline-style: dashed; }
@keyframes here { 50% { box-shadow: 0 0 0 9px color-mix(in srgb, var(--accent) 60%, transparent); } }
.stop__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 4px 0 10px; }
.stop__code {
  display: inline-grid; place-items: center; min-width: 3.2em; padding: .4em .5em;
  font: 700 .78rem/1 var(--font-mono); background: var(--main); border: 2px solid var(--ink); border-radius: 7px;
}
.stop__time { font: 600 .78rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.stop__badge { display: inline-flex; align-items: center; gap: .5em; padding: .42em .75em; font: 650 .78rem/1 var(--font-body); border: 1.5px solid var(--ink); border-radius: 999px; }
.stop__badge .jp { font-size: .95em; }
.stop__badge--here { background: var(--accent); }
.stop__badge--next { background: var(--paper); border-style: dashed; }
.stop__title { margin: 0 0 6px; font: 800 clamp(1.3rem, 2.1vw, 1.75rem)/1.1 var(--font-display); font-stretch: 85%; letter-spacing: -.02em; text-wrap: balance; }
.stop--next .stop__title { color: var(--ink-soft); }
.stop__org { margin: 0 0 8px; font-weight: 620; }
.stop__desc { margin: 0; max-width: 58ch; color: var(--ink-soft); }

.stop--a::after, .stop--transfer::after { background: var(--accent); }
.stop--transfer::before {
  left: 1px; top: -3px; width: 40px; height: 40px;
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 7px var(--ink);
}
.stop__code--k { background: var(--main); }
.stop__code--a { background: var(--accent); }
.stop__badge--transfer { background: var(--paper); border-width: 2px; }
.stop .tags { margin-top: 12px; }

.stamps { padding-top: 18px; border-top: 2px solid var(--ink); }
.stamps__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: .6em; margin: 0 0 6px; font: 800 1.4rem/1.1 var(--font-display); font-stretch: 85%; letter-spacing: -.015em; }
.stamps__title .jp { font-size: .78em; color: var(--ink-soft); }
.stamps__note { margin: 0 0 22px; max-width: 42ch; font-size: .92rem; color: var(--ink-soft); }
.stamps__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
.stampcard { display: grid; justify-items: center; gap: 4px; text-align: center; }
.stampcard strong { margin-top: 8px; font-size: .98rem; line-height: 1.25; }
.stampcard span { font-size: .84rem; line-height: 1.35; color: var(--ink-soft); }
.eki { width: min(128px, 100%); height: auto; overflow: visible; rotate: var(--r, 0deg); filter: url(#stampInk); transition: rotate .4s var(--ease), scale .4s var(--ease); }
.stampcard:hover .eki { rotate: 0deg; scale: 1.06; }
.eki__ring { fill: var(--accent); stroke: var(--ink); stroke-width: 4; }
.eki__ring--in { fill: none; stroke-width: 1.6; }
.eki__arc { font: 700 9.5px var(--font-mono); letter-spacing: 1.4px; fill: var(--ink); }
.eki__icon { fill: none; stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.eki__year { font: 700 9.5px var(--font-mono); letter-spacing: 1.4px; fill: var(--ink); }
.eki__big { font: 800 27px var(--font-display); font-stretch: 78%; letter-spacing: -.5px; fill: var(--ink); }
.eki__kanji { font-size: 25px; fill: var(--ink); }

/* ---------- Work ---------- */
.feature {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 60px); align-items: center;
  padding: clamp(32px, 4vw, 52px) 0; border-top: 2px solid var(--ink);
}
.sec__body > .lede + .feature { margin-top: clamp(30px, 4vw, 48px); }
.feature--stack { grid-template-columns: minmax(0, 1fr); gap: 26px; }
.feature__text { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.feature__title { margin: 0; font: 800 clamp(1.8rem, 3.2vw, 2.8rem)/1.02 var(--font-display); font-stretch: 82%; letter-spacing: -.03em; }
.feature__desc { margin: 0; max-width: 62ch; color: var(--ink-soft); line-height: 1.65; }
.feature__visual { margin: 0; }
.feature__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 6px 0 2px; }
.metrics > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 8px; padding: 2px 16px; border-left: 2px solid var(--ink); }
.metrics > div:first-child { padding-left: 0; border-left: 0; }
.metrics dd { margin: 0; font: 800 clamp(2.3rem, 4vw, 3.4rem)/.9 var(--font-display); font-stretch: 76%; letter-spacing: -.02em; }
.metrics dt { font-size: .8rem; line-height: 1.3; color: var(--ink-soft); }

.hypno { padding: 14px 12px 8px; background: var(--main-mist); border-radius: 22px; }
.hypno svg { display: block; width: 100%; height: auto; }
.hypno__grid path { fill: none; stroke: var(--main-deep); stroke-width: 1.3; stroke-dasharray: 3 6; opacity: .6; }
.hypno__labels text { font: 600 12px var(--font-mono); fill: var(--ink-soft); text-anchor: end; }
.hypno__rem { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; }
.hypno__line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.hypno__cap { font: 500 10.5px var(--font-mono); fill: var(--ink-soft); text-anchor: end; }

.distill { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.distill__item {
  display: grid; grid-template-columns: auto 1fr; grid-template-areas: "x label" "bars bars" "what what" "go go";
  align-items: baseline; gap: 2px 8px; padding: 10px 22px 14px;
  color: var(--ink); text-decoration: none; border-left: 2px solid var(--ink);
  transition: background-color .2s;
}
.distill__item:first-child { padding-left: 0; border-left: 0; }
.distill__item:hover { background: var(--accent-mist); }
.distill__item:hover .distill__go { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.distill__x { grid-area: x; font: 800 clamp(2.4rem, 4vw, 3.3rem)/1 var(--font-display); font-stretch: 76%; letter-spacing: -.03em; }
.distill__label { grid-area: label; font: 600 .74rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.bars { grid-area: bars; display: grid; gap: 5px; margin: 12px 0; }
.bar { display: block; height: 11px; border: 1.5px solid var(--ink); border-radius: 99px; }
.bar--t { width: 100%; background: var(--main); }
.bar--s { width: var(--w); min-width: 16px; background: var(--accent); }
.distill__what { grid-area: what; font-size: .9rem; line-height: 1.5; color: var(--ink-soft); }
.distill__what strong { color: var(--ink); }
.distill__go { grid-area: go; justify-self: start; display: inline-flex; align-items: center; gap: .35em; margin-top: 10px; font: 600 .78rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; }
.distill__go svg { width: 1em; height: 1em; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 0; font: 500 .76rem/1 var(--font-mono); color: var(--ink-soft); }
.legend span { display: inline-flex; align-items: center; gap: .5em; }
.legend i { display: inline-block; width: 22px; height: 10px; border: 1.5px solid var(--ink); border-radius: 99px; }
.legend .k-t { background: var(--main); }
.legend .k-s { background: var(--accent); }

.projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 2px solid var(--ink); }
.project { display: flex; flex-direction: column; gap: 12px; padding: clamp(28px, 3.4vw, 44px) 0; min-width: 0; }
.project:nth-child(odd) { padding-right: clamp(20px, 3vw, 40px); border-right: 2px solid var(--ink); }
.project:nth-child(even) { padding-left: clamp(20px, 3vw, 40px); }
.project:nth-child(n+3) { border-top: 2px solid var(--ink); }
.project__title { margin: 0; font: 800 clamp(1.55rem, 2.5vw, 2.15rem)/1.04 var(--font-display); font-stretch: 84%; letter-spacing: -.025em; }
.project__title .jp-d { margin-left: .12em; font-size: .78em; letter-spacing: .04em; }
.project__desc { margin: 0; color: var(--ink-soft); line-height: 1.62; }

.art { margin: 0 0 6px; overflow: hidden; aspect-ratio: 2 / 1; border: 2px solid var(--ink); border-radius: 18px; transition: transform .35s var(--ease); }
.project:hover .art { transform: translateY(-4px) rotate(-1.2deg); }
.art svg { display: block; width: 100%; height: 100%; }
.art--pink { background: var(--accent-soft); }
.art--lagoon { background: var(--main-soft); }
.art-panel, .art-bubble, .art-card { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.art-card--back { fill: var(--accent); }
.art-tag { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.art-jp { font-family: var(--font-jp-display); font-size: 16px; fill: var(--ink); }
.art-en { font: 650 11px var(--font-body); fill: var(--ink); }
.art-scan { fill: none; stroke: var(--main); stroke-width: 6; stroke-linecap: round; }
.art-kanji { font-family: var(--font-jp-display); font-size: 48px; fill: var(--ink); }
.art-reading { font: 600 11px var(--font-mono); fill: var(--ink-soft); }
.art-dot { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.art-dot--l { fill: var(--paper); }
.art-orbit circle { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 3 6; opacity: .45; }
.art-link { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 2 4; }
.art-guess { fill: var(--accent); stroke: var(--ink); stroke-width: 2; }
.art-guess--far { fill: var(--paper); }
.art-stage { fill: var(--main-soft); stroke: var(--ink); stroke-width: 2; }
.art-curtain, .art-valance { fill: var(--accent); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.art-act { font: 800 36px var(--font-display); font-stretch: 80%; fill: var(--ink); letter-spacing: -.5px; }
.art-floor { stroke: var(--ink); stroke-width: 2; }

.more { display: flex; justify-content: center; margin: clamp(30px, 4vw, 48px) 0 0; }

/* ---------- Toolbox ---------- */
.tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); margin-top: clamp(8px, 2vw, 20px); }
.tool { padding-top: 18px; border-top: 2px solid var(--ink); }
.tool__title { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font: 800 1.25rem/1.1 var(--font-display); font-stretch: 85%; letter-spacing: -.015em; }
.tool__dot { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink); }
.tool__dot--pink { background: var(--accent); }
.tool__dot--lagoon { background: var(--main); }
.tool__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.tool__list li { position: relative; padding-left: 1.25em; line-height: 1.35; }
.tool__list li::before { content: ""; position: absolute; left: 0; top: .42em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); border: 1.5px solid var(--ink); }
.tool__list .jp { font-size: .92em; }

/* ---------- About & Contact ---------- */
.eyebrow__num {
  display: inline-grid; place-items: center; width: 2.3em; height: 2.3em; margin: -.5em .05em -.5em -.4em;
  background: var(--accent); border: 1.5px solid var(--ink); border-radius: 50%; letter-spacing: 0; font-weight: 700;
}
.contact__mail { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 14px; }
.contact__social { display: flex; flex-wrap: wrap; gap: 12px; }
.facts-list { display: grid; gap: 0; max-width: 560px; margin: 30px 0 0; border-top: 2px solid var(--ink); }
.facts-list > div { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent); }
.facts-list dt { font: 700 .72rem/1.6 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.facts-list dd { margin: 0; line-height: 1.5; color: var(--ink-soft); }
.facts-list time { font: 700 1em var(--font-mono); color: var(--ink); }
.footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  font: 500 .78rem/1.3 var(--font-mono);
}
.footer--sheet { width: min(var(--maxw), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: clamp(20px, 4vw, 40px) 0 clamp(28px, 4vw, 44px); border-top: 2px solid var(--ink); }
.footer p { margin: 0; padding: .6em 1em; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 999px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60;
  padding: .8em 1.2em; font: 650 .95rem/1 var(--font-body);
  background: var(--accent); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 4px 4px 0 var(--ink);
  translate: -50% 140%; opacity: 0; pointer-events: none;
  transition: translate .35s var(--ease), opacity .35s;
}
.toast.is-on { translate: -50% 0; opacity: 1; }

/* page-wide paper grain (one fixed layer, so there are no seams) */
.grain { position: fixed; inset: 0; z-index: 40; pointer-events: none; background-image: var(--grain); opacity: .2; }

/* ==========================================================================
   Places: every stop of the journey has its own three colours
   ========================================================================== */
.pal-k {
  --main: #7BDFF2; --paper: #FCFFFF; --accent: #F2B5D4; --ink: #0B2F3A; --ink-soft: #36545D;
  --main-soft: #CBF3FA; --main-mist: #E5F9FD; --main-deep: #4E99A8; --accent-soft: #F8DEEC; --accent-mist: #FAEFF6;
}
/* Herzogenaurach: Graphite · Mist Blue · Coral Pink */
.pal-h {
  --main: #C9D8E6; --paper: #EEF3F8; --accent: #F4846F; --ink: #2B3036; --ink-soft: #4F5861;
  --main-soft: #DCE6EF; --main-mist: #E6EDF4; --main-deep: #7D93A7; --accent-soft: #F9C3B8; --accent-mist: #FCE2DC;
  --sky-1: #B7CBDD; --hill-far: #B3C6D8; --hill-near: #D6E1EB;
  --timber: var(--ink); --roof: var(--accent-soft); --win: var(--main-deep); --fir: var(--main-deep); --stone: var(--main-soft);
}
/* Heilbronn: Lavender · White · Sunglow Gold (vineyards and Riesling) */
.pal-b {
  --main: #C9B6F2; --paper: #FCFBFF; --accent: #EDB158; --ink: #23143F; --ink-soft: #4B3F66;
  --main-soft: #E2D8F8; --main-mist: #F0EBFC; --main-deep: #7A5BC9; --accent-soft: #F6D9AE; --accent-mist: #FBEEDB;
  --sky-1: #B8A2EE; --hill-far: #D3C5F4; --hill-near: #EAE3FA;
  --timber: var(--main-deep); --roof: var(--main-deep); --win: var(--main-deep); --fir: var(--main-deep); --stone: var(--main-soft);
}
/* Wernigerode: Cream · Fir Green · Tangerine (half-timbered houses in the Harz) */
.pal-w {
  --main: #BCD8BF; --paper: #FBF1DE; --accent: #F28A4E; --ink: #1C2A22; --ink-soft: #44534A;
  --main-soft: #D5E6D4; --main-mist: #E8EFE0; --main-deep: #5E8F6B; --accent-soft: #F8C4A2; --accent-mist: #FBDFCB;
  --sky-1: #F5CDAA; --hill-far: #A8C8AE; --hill-near: #CFE2CC;
  --timber: var(--accent); --roof: var(--ink); --win: var(--main-deep); --fir: var(--main-deep); --stone: #E9DCC4;
}

.place { position: relative; isolation: isolate; color: var(--ink); }
.place[id] { scroll-margin-top: 0; }
.place__scene {
  position: sticky; top: 0; z-index: -1;
  height: 100vh; height: 100svh; overflow: hidden;
  background: linear-gradient(180deg, var(--sky-1) 0%, var(--main-mist) 58%, var(--paper) 100%);
}
.place__scene > svg { position: absolute; max-width: none; }
.place__scene .hills { inset: 0; width: 100%; height: 100%; }
.place__scene .subject {
  right: clamp(0px, calc(50vw - 820px), 240px); bottom: -1vh;
  width: min(66vw, 112vh, 1240px); height: auto; overflow: visible;
}
.place__arrival {
  position: relative; display: flex; flex-direction: column;
  margin-top: -100vh; margin-top: -100svh;
  min-height: 100vh; min-height: 100svh;
}
.place__sign { flex: 1; display: flex; align-items: center; width: 100%; max-width: 1720px; margin: 0 auto; padding: 32px var(--gutter) 96px; }

/* station name board (駅名標) */
.ekisign {
  width: min(100%, 560px); overflow: hidden;
  background: var(--paper); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 8px 8px 0 var(--ink);
}
.ekisign__top { display: flex; align-items: center; gap: 14px; margin: 0; padding: 20px 24px 0; }
.ekisign__code {
  display: grid; place-items: center; flex: none; width: 46px; height: 46px;
  font: 800 1.5rem/1 var(--font-display); background: var(--accent); border: 3px solid var(--ink); border-radius: 10px;
}
.ekisign__jp { font-size: clamp(1.3rem, 2.8vw, 2rem); line-height: 1.2; letter-spacing: .12em; }
.ekisign__en { margin: 8px 24px 0; font: 800 clamp(2.2rem, 5.2vw, 3.7rem)/.95 var(--font-display); font-stretch: 78%; letter-spacing: -.03em; text-wrap: balance; }
.ekisign__meta { margin: 10px 24px 18px; font: 600 .8rem/1.35 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.ekisign__bar {
  display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 24px;
  font: 700 .86rem/1 var(--font-mono); background: var(--main); border-top: 3px solid var(--ink);
}

/* bands between places (drawn in the palette of the place you are leaving) */
.band-wrap { display: block; }
.band { display: block; width: 100%; }
.band--track-top { height: 102px; }
.band--track-exit { height: 188px; }
.band--vines { height: 150px; margin-bottom: -1px; }
.band--waves { height: 150px; margin-top: -1px; }
.band--firs { height: 170px; margin-bottom: -1px; }
.band--puffs { height: 120px; }
.b-paper { fill: var(--paper); }
.b-track { fill: var(--accent); }
.b-lane { fill: none; stroke: var(--paper); stroke-width: 2.5; }
.b-lane--bold { stroke-width: 7; }
.b-num { font: 800 19px var(--font-display); fill: var(--paper); }
.b-ln { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.b-stake { stroke-width: 2.6; }
.b-leaf-ln { fill: var(--ink); stroke: var(--ink); stroke-width: 3.6; stroke-linejoin: round; }
.b-leaf { fill: var(--accent-soft); }
.b-grape circle { fill: var(--main-deep); stroke: var(--ink); stroke-width: 1.2; }
.b-water { fill: var(--main-soft); }
.b-ripple { fill: none; stroke: var(--paper); stroke-width: 2.4; stroke-linecap: round; }

/* scene parts (shared by all places, coloured by the place palette) */
.p-sun { fill: var(--accent); }
.p-wall { fill: var(--paper); }
.p-stone { fill: var(--stone); }
.p-timber { fill: none; stroke: var(--timber); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.p-roof { fill: var(--roof); }
.p-win { fill: var(--win); }
.p-glass { fill: var(--main-soft); }
.p-ln { fill: none; stroke: var(--ink); stroke-width: 2.3; stroke-linejoin: round; stroke-linecap: round; }
.p-thin { stroke-width: 1.4; }
.p-faint { opacity: .35; }
.p-dark { fill: var(--ink); }
.p-accent { fill: var(--accent); }
.p-fir { fill: var(--fir); }
.p-ground { fill: var(--main-soft); }
.p-track { fill: var(--accent); }
.p-infield { fill: var(--main-soft); }
.p-lane { fill: none; stroke: var(--paper); stroke-width: 2.2; }
.p-beam { fill: var(--paper); opacity: .36; }
.p-lamp circle { fill: var(--paper); }
.p-hill-back { fill: var(--main-soft); }
.p-hill-front { fill: var(--main); }
.p-hill-far { fill: var(--hill-far); }
.p-hill-near { fill: var(--hill-near); }
.p-vine { fill: none; stroke: var(--main-deep); stroke-width: 7; stroke-linecap: round; stroke-dasharray: .1 13; }
.p-water { fill: var(--main-soft); }
.p-wave { fill: none; stroke: var(--paper); stroke-width: 2.2; stroke-linecap: round; }
.p-glint { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; }
.p-treetop { fill: var(--main); }
.p-cloud .p-cl { fill: var(--ink); stroke: var(--ink); stroke-width: 3.4; stroke-linejoin: round; }
.p-cloud .p-fill { fill: var(--paper); }

/* route map (路線図) on the Kumamoto deck */
.routemap { margin: clamp(32px, 4vw, 52px) 0 clamp(8px, 2vw, 20px); padding-top: 20px; border-top: 2px solid var(--ink); }
.routemap__title { display: flex; align-items: baseline; gap: .7em; margin: 0 0 22px; font: 600 .76rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.routemap__title .jp { font-size: 1rem; letter-spacing: .1em; }
.routemap__list { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.routemap__list::before {
  content: ""; position: absolute; left: 14px; right: 14%; top: 12px; height: 14px;
  background: linear-gradient(90deg, #7BDFF2 0 26%, #F4846F 26% 52%, #C9B6F2 52% 78%, #F28A4E 78%);
  border: 2px solid var(--ink); border-radius: 99px;
}
.routemap__stop a { position: relative; display: grid; gap: 3px; padding-top: 50px; color: var(--ink); text-decoration: none; }
.routemap__dot { position: absolute; top: 0; left: 0; width: 38px; height: 38px; background: var(--paper); border: 4px solid var(--ink); border-radius: 50%; transition: scale .25s var(--ease); }
.routemap__stop--k .routemap__dot { background: #F2B5D4; box-shadow: 0 0 0 5px color-mix(in srgb, #F2B5D4 50%, transparent); }
.routemap__stop--h .routemap__dot { background: #F4846F; }
.routemap__stop--b .routemap__dot { background: #EDB158; }
.routemap__stop--w .routemap__dot { background: #F28A4E; }
.routemap__stop a:hover .routemap__dot { scale: 1.12; }
.routemap__jp { font-size: .8rem; line-height: 1.3; }
.routemap__stop strong { font: 800 1.2rem/1.1 var(--font-display); font-stretch: 85%; letter-spacing: -.01em; }
.routemap__stop a:hover strong { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 3px; }
.routemap__stop a > span:last-child { font: 500 .76rem/1.35 var(--font-mono); color: var(--ink-soft); }

/* lines per place */
.stop--a::after, .stop--w::after { background: var(--accent); }
.stop--d::after { background: var(--main); }
.stop--a .stop__code, .stop--w .stop__code { background: var(--accent); }
.stop--d .stop__code { background: var(--main); }
.stop--origin::before { background: var(--accent); box-shadow: inset 0 0 0 4px var(--paper); }
.stop__badge--origin { background: var(--accent-soft); }
.line--solo { max-width: 780px; margin-top: clamp(30px, 4vw, 48px); }
.metrics--wide { max-width: 760px; margin: clamp(24px, 3vw, 36px) 0 0; }
.kr, .eki__kr { font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", sans-serif; }
.eki__kr { font-size: 25px; font-weight: 800; fill: var(--ink); }
.stamps__grid--one { grid-template-columns: minmax(0, 1fr); max-width: 220px; }
.eki__dot { fill: var(--ink); }
.doc-link {
  display: inline-flex; align-items: center; gap: .4em; margin-top: 8px; padding: .5em .85em;
  font: 650 .82rem/1 var(--font-body); color: var(--ink); text-decoration: none;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 999px; box-shadow: 2px 2px 0 var(--ink);
  transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.doc-link svg { width: 1.1em; height: 1.1em; }
.doc-link:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }

/* big city names in the scenes */
.p-city { fill: var(--main-deep); fill-opacity: .34; font-family: var(--font-display); font-weight: 800; font-stretch: 75%; letter-spacing: 3px; }
.p-city--sc { font-family: "City SC", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; font-weight: 900; font-stretch: normal; letter-spacing: 0; }
.p-city--kr { font-family: "City KR", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; font-weight: 900; font-stretch: normal; letter-spacing: 0; }
.p-city-label { font: 700 12px var(--font-mono); letter-spacing: 3px; fill: var(--ink); fill-opacity: .6; }
.p-city--sun { fill: var(--paper); fill-opacity: .92; letter-spacing: 4px; }

/* research project visual */
.rv { padding: 14px 12px 8px; background: var(--main-mist); border-radius: 22px; }
.rv svg { display: block; width: 100%; height: auto; }
.rv-brain { fill: var(--paper); stroke: var(--ink); stroke-width: 2.4; }
.rv-fold { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; opacity: .45; }
.rv-vox { fill: var(--main-soft); stroke: var(--ink); stroke-width: 1; }
.rv-vox--hot { fill: var(--accent); }
.rv-eeg { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.rv-enc { fill: var(--main); stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; }
.rv-enc-t { font: 700 11px var(--font-mono); fill: var(--ink); }
.rv-arrow, .rv-dash { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.rv-dash { stroke-dasharray: 4 5; }
.rv-head { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rv-pt { stroke: var(--ink); stroke-width: 1.4; }
.rv-pt--a { fill: var(--accent); }
.rv-pt--b { fill: var(--main); }
.rv-pt--c { fill: var(--paper); }
.rv-label { font: 800 15px var(--font-display); fill: var(--ink); }
.rv-sub { font: 500 10.5px var(--font-mono); fill: var(--ink-soft); }
.private-note { display: inline-flex; align-items: center; gap: .5em; margin: 2px 0 0; font: 600 .78rem/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.private-note svg { width: 1.2em; height: 1.2em; }

/* "Also on my GitHub" */
.more-list { margin-top: clamp(30px, 4vw, 48px); padding-top: 22px; border-top: 2px solid var(--ink); }
.more-list__title { margin: 0 0 8px; font: 800 1.4rem/1.1 var(--font-display); font-stretch: 85%; letter-spacing: -.015em; }
.repos { list-style: none; margin: 0; padding: 0; }
.repo {
  display: grid; grid-template-columns: minmax(150px, .9fr) minmax(0, 2.4fr) minmax(130px, 1fr) 96px; gap: 6px 22px; align-items: baseline;
  padding: 16px 0; border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 25%, transparent);
}
.repo__name { font: 800 1.08rem/1.2 var(--font-display); font-stretch: 85%; }
.repo__desc { color: var(--ink-soft); line-height: 1.5; font-size: .95rem; }
.repo__tech { font: 500 .74rem/1.4 var(--font-mono); color: var(--ink-soft); }
.repo__go { display: inline-flex; align-items: center; gap: .35em; justify-self: end; white-space: nowrap; font: 700 .74rem/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); }
.repo__go svg { width: 1.15em; height: 1.15em; }
a.repo__go { padding: .45em .7em; text-decoration: none; background: var(--accent); border: 1.5px solid var(--ink); border-radius: 999px; }
a.repo__go:hover { box-shadow: 2px 2px 0 var(--ink); }
.repo__go--private { color: var(--ink-soft); }
.stamps__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stamps__grid--three .stampcard { display: flex; flex-direction: column; align-items: center; }
.stamps__grid--three .stampcard > span { margin-bottom: 10px; }
.stamps__grid--three .doc-link { margin-top: auto; }
.route--roots { margin-top: clamp(36px, 5vw, 64px); grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }

@media (max-width: 860px) {
  .place__scene .subject { right: auto; left: 50%; margin-left: -66vw; width: 132vw; bottom: -9vh; }
  .place__sign { align-items: flex-start; padding-top: 28px; }
  .routemap__list { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .routemap__list::before { left: 12px; right: auto; top: 14px; bottom: 14px; width: 14px; height: auto;
    background: linear-gradient(180deg, #7BDFF2 0 26%, #F4846F 26% 52%, #C9B6F2 52% 78%, #F28A4E 78%); }
  .routemap__stop a { padding: 0 0 0 54px; min-height: 38px; }
  .stamps__grid--three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .repo { grid-template-columns: minmax(0, 1fr) auto; }
  .repo__desc, .repo__tech { grid-column: 1 / -1; }
  .repo__go { grid-row: 1; grid-column: 2; }
}
@media (max-width: 560px) {
  .facts-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .ekisign__bar { font-size: .74rem; }
  .stamps__grid--three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- scene parts added for the animated places ---------- */
.p-main { fill: var(--main); }
.p-lattice { fill: none; stroke: var(--ink); stroke-width: 1; opacity: .42; }
.p-ring { fill: none; stroke: var(--ink); stroke-width: 1.3; }
.p-run { fill: none; stroke: var(--accent); stroke-width: 3.4; stroke-linecap: round; stroke-dasharray: .08 .92; }
.p-beacon { fill: var(--accent); stroke: var(--ink); stroke-width: 1.4; }
.p-lace-o { fill: none; stroke: var(--ink); stroke-width: 7.5; stroke-linecap: round; }
.p-lace-i { fill: none; stroke: var(--accent); stroke-width: 3.8; stroke-linecap: round; }
.p-eyelet circle { stroke: var(--ink); stroke-width: 1.8; }
.p-band-o { fill: none; stroke: var(--ink); stroke-width: 17; stroke-linecap: round; }
.p-band-i { fill: none; stroke: var(--paper); stroke-width: 11; stroke-linecap: round; }
.p-trail { fill: none; stroke: var(--paper); stroke-width: 3; stroke-dasharray: 12 9; stroke-linecap: round; opacity: .9; }
.p-puff { fill: var(--paper); stroke: var(--ink); stroke-width: 3; vector-effect: non-scaling-stroke; }
.p-label { font: 800 21px var(--font-display); font-stretch: 85%; letter-spacing: .5px; fill: var(--ink); }
.fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- places draw themselves in, like the castle ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.reveal-ready:not(.still) .place .subject path.p-ln { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
  html.reveal-ready:not(.still) .place.is-live .subject path.p-ln { animation: draw 2.2s cubic-bezier(.65, 0, .35, 1) .1s forwards; }
  html.reveal-ready:not(.still) .place .subject :not(g, path.p-ln, .p-sun, .own, defs, defs *, clipPath, clipPath *) { opacity: 0; }
  html.reveal-ready:not(.still) .place.is-live .subject :not(g, path.p-ln, .p-sun, .own, defs, defs *, clipPath, clipPath *) { opacity: 1; animation: fade-in 1s ease 1.3s both; }
  html.reveal-ready:not(.still) .place .subject .p-sun { opacity: 0; }
  html.reveal-ready:not(.still) .place.is-live .subject .p-sun { opacity: 1; transform-box: fill-box; transform-origin: center; animation: sun-rise 2.6s var(--ease) both; }
  html.reveal-ready:not(.still) .place .subject .p-run { opacity: 0; }
  html.reveal-ready:not(.still) .place.is-live .subject .p-run {
    opacity: 1;
    animation: fade-in .8s ease 2.1s both, run 3.4s linear calc(var(--i, 0) * -.24s) infinite;
  }

  /* ambient motion, paused while the place is off screen */
  html:not(.still) .a-beacon { animation: beacon 2s linear calc(var(--i, 0) * -.7s) infinite; }
  html:not(.still) .a-flag { transform-box: fill-box; transform-origin: 0 50%; animation: flag 2.2s ease-in-out calc(var(--i, 0) * -.55s) infinite alternate; }
  html:not(.still) .a-sail { animation: sail 30s ease-in-out infinite alternate; }
  html:not(.still) .a-bob { transform-box: fill-box; transform-origin: 50% 100%; animation: bob 4.2s ease-in-out infinite; }
  html:not(.still) .a-ball { transform-box: fill-box; transform-origin: 50% 100%; animation: ball 1.5s cubic-bezier(.45, 0, .55, 1) infinite; }
  html:not(.still) .a-plane { animation: plane 28s linear -8s infinite; }
  html:not(.still) .a-flow { animation: flow 6s linear infinite; }
  html:not(.still) .a-glint { animation: glint 3.2s ease-in-out calc(var(--i, 0) * -.7s) infinite; }
  html:not(.still) .a-ship { animation: ship 52s linear -8s infinite; }
  html:not(.still) .a-train { animation: train 34s linear -17s infinite; }
  html:not(.still) .a-wheel { transform-box: fill-box; transform-origin: center; animation: spin 1.1s linear infinite reverse; }
  html:not(.still) .a-puff { transform-box: fill-box; transform-origin: center; animation: puff 3s ease-out calc(var(--i, 0) * -.5s) infinite; }
  .place:not(.in-view) .anim, .place:not(.in-view) .p-run { animation-play-state: paused; }
}
@keyframes run { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes beacon { 0%, 55% { opacity: 1; } 60%, 95% { opacity: .2; } 100% { opacity: 1; } }
@keyframes flag { from { transform: skewY(-8deg) scaleX(.88); } to { transform: skewY(6deg) scaleX(1); } }
@keyframes sail { from { translate: 26px 0; } to { translate: -64px 0; } }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.6deg); } 50% { transform: translateY(-4px) rotate(1.6deg); } }
@keyframes ball {
  0%, 100% { transform: translateY(0) scale(1.1, .88); }
  14% { transform: translateY(-10px) scale(.95, 1.05); }
  50% { transform: translateY(-64px) scale(1); }
  86% { transform: translateY(-10px) scale(.95, 1.05); }
}
@keyframes plane { 0% { translate: -340px 0; } 72%, 100% { translate: 1360px 0; } }
@keyframes flow { to { translate: 70px 0; } }
@keyframes glint { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
@keyframes ship { from { translate: 430px 0; } to { translate: -1080px 0; } }
/* the locomotive faces left, so the train runs right → left; steam trails behind it */
@keyframes train { from { translate: 1180px 0; } to { translate: -1180px 0; } }
@keyframes puff {
  0% { transform: translate(0, 0) scale(.35); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: translate(110px, -170px) scale(2.3); opacity: 0; }
}

/* ==========================================================================
   Motion
   ========================================================================== */
html.js-reveal [data-reveal] {
  opacity: 0; translate: 0 28px;
  transition: opacity .8s var(--ease), translate .8s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}
html.js-reveal [data-reveal].is-in { opacity: 1; translate: none; }

@media (prefers-reduced-motion: no-preference) {
  html:not(.still) .keep-draw .k-ln { stroke-dasharray: 1 1; animation: draw 2.4s cubic-bezier(.65, 0, .35, 1) .15s both; }
  html:not(.still) .keep-draw :is(.k-fill, .k-roof, .k-stone, .k-siding, .k-shade, .k-win, .k-mullion, .k-pat-v, .k-pat-tile, .k-pat-stone, .k-roof-shade, .k-board-o, .k-board-i, .k-shachi) {
    animation: fade-in 1.1s ease 1.55s both;
  }
  html:not(.still) .castle .sun { transform-box: fill-box; transform-origin: center; animation: sun-rise 2.6s var(--ease) both; }
  html:not(.still) .castle .tree { transform-box: fill-box; transform-origin: 50% 100%; animation: bloom 1.2s var(--ease) both; animation-delay: calc(1.7s + var(--i, 0) * 80ms); }
  html:not(.still) .castle .mist { animation: fade-in 1.6s ease 1.2s both; }
  html:not(.still) .is-in .hypno__line { stroke-dasharray: 1 1; animation: draw 2.6s cubic-bezier(.65, 0, .35, 1) .3s both; }
  html:not(.still) .is-in .bar--s { animation: grow-x 1.1s var(--ease) .5s both; transform-origin: left; }
  html:not(.still) .stamps.is-in .eki { animation: stamp-in .55s cubic-bezier(.3, 1.6, .5, 1) both; }
  html:not(.still) .stamps.is-in .stampcard:nth-child(2) .eki { animation-delay: .15s; }
  html:not(.still) .stamps.is-in .stampcard:nth-child(3) .eki { animation-delay: .3s; }
  html:not(.still) .stamps.is-in .stampcard:nth-child(4) .eki { animation-delay: .45s; }
}
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes sun-rise { from { transform: translateY(22%) scale(.92); opacity: 0; } }
@keyframes bloom { from { transform: scale(.2); opacity: 0; } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes stamp-in { from { opacity: 0; scale: 1.5; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .drift, .branch, .eyebrow__dot, .stop--now::before { animation: none; }
}
html.still *, html.still *::before, html.still *::after { animation: none !important; transition: none !important; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (min-width: 1101px) {
  .stamps { position: sticky; top: 112px; }
}
@media (max-width: 1100px) {
  .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route { grid-template-columns: minmax(0, 1fr); }
  .stamps__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .about, .feature { grid-template-columns: minmax(0, 1fr); }
  .distill { grid-template-columns: minmax(0, 1fr); }
  .distill__item { grid-template-columns: auto auto 1fr; grid-template-areas: "x label bars" "what what what" "go go go"; align-items: center; padding: 18px 0; border-left: 0; border-top: 2px solid var(--ink); }
  .distill__item:first-child { border-top: 0; padding-top: 0; }
  .bars { margin: 0 0 0 12px; }
}
@media (max-width: 1020px) {
  .nav__links { display: none; }
}
@media (max-width: 860px) {
  .sec { grid-template-columns: minmax(0, 1fr); gap: 22px; }
  .sec__rail { position: static; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
  .sec__num { font-size: 3.3rem; }
  .sec__jp { margin: 0; writing-mode: horizontal-tb; font-size: 1.15rem; letter-spacing: .14em; }
  .projects { grid-template-columns: minmax(0, 1fr); }
  .project:nth-child(odd) { padding-right: 0; border-right: 0; }
  .project:nth-child(even) { padding-left: 0; }
  .project:nth-child(n+2) { border-top: 2px solid var(--ink); }
  .stamps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .castle { right: auto; left: 50%; margin-left: -66vw; width: 132vw; bottom: -9vh; }
  .branch { width: min(62vw, 360px); top: 34px; right: -48px; }
  .drift--a, .drift--c { display: none; }
  .hero { align-items: flex-start; padding-top: clamp(96px, 14vh, 128px); }
}
@media (max-width: 560px) {
  .nav__name { display: none; }
  .hero__name { font-size: clamp(3.9rem, 22vw, 6rem); }
  .metrics { grid-template-columns: 1fr 1fr; row-gap: 18px; }
  .metrics > div:nth-child(3) { grid-column: 1 / -1; padding-left: 0; border-left: 0; }
  .distill__item { grid-template-columns: auto 1fr; grid-template-areas: "x label" "bars bars" "what what" "go go"; }
  .bars { margin: 10px 0; }
  .tools { grid-template-columns: minmax(0, 1fr); }
  .idcard__jp { right: -10px; }
  .stamp { left: -14px; top: -18px; width: 64px; height: 64px; font-size: 1rem; }
  .footer { justify-content: center; }
}

.footer__links { display: inline-flex; align-items: center; gap: 10px; }
.footer__links a { text-decoration: none; }
.footer__links a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

/* ---------- Legal page (Impressum & Privacy) ---------- */
.legal-page { background: var(--paper); }
.legal { width: min(760px, calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: clamp(28px, 6vw, 72px) 0 clamp(40px, 7vw, 88px); }
.legal__back { margin: 0 0 clamp(28px, 5vw, 48px); }
.legal__back--end { margin: clamp(28px, 5vw, 44px) 0 0; }
.legal__sec { padding: clamp(22px, 4vw, 34px) 0 6px; border-top: 2px solid var(--ink); }
.legal__sec h2 { margin: 0 0 6px; font: 800 clamp(1.6rem, 3vw, 2.15rem)/1.05 var(--font-display); font-stretch: 84%; letter-spacing: -.02em; }
.legal__sec h3 { margin: 24px 0 6px; font: 800 1.12rem/1.2 var(--font-display); font-stretch: 88%; }
.legal__sec p { margin: 0 0 12px; max-width: 68ch; line-height: 1.65; color: var(--ink-soft); }
.legal__sec .legal__basis { margin: 0 0 18px; font: 600 .74rem/1.4 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink); }
.legal__de { font-weight: 600; color: var(--ink-soft); }
.legal__address { margin: 0 0 12px; font-style: normal; font-weight: 600; line-height: 1.6; }

/* ---------- 404 ---------- */
.lost__sun {
  position: absolute; right: -10vmin; bottom: -16vmin;
  width: min(72vmin, 640px); aspect-ratio: 1; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--ink);
}
.lost__main { position: relative; z-index: 1; display: grid; align-items: center; min-height: 100vh; min-height: 100svh; padding: 48px var(--gutter); max-width: 1720px; margin: 0 auto; }
.lost__inner { position: relative; max-width: 640px; }
.lost__actions { margin: 30px 0 0; }
.lost__legal { margin: 26px 0 0; font: 500 .8rem/1 var(--font-mono); }
.lost__flower { position: absolute; top: -10px; right: -40px; width: 96px; height: 96px; overflow: visible; rotate: 12deg; }
