/* pwp-authored-additional-v1-20261028: technical foundation only */
@layer pwp-runtime-foundation {
  :root {
    --bg:#0B0F19; --text:#F8FAFC;
    --surface:#111827; --text-muted:#94A3B8;
    --primary:#0EA5E9; --primary-fg:#0F172A;
    --border:#1F2937;
  }
  *, *::before, *::after { box-sizing:border-box; }
  html { scroll-behavior:smooth; }
  body { margin:0; background:var(--bg); color:var(--text); }
  img, video { max-inline-size:100%; block-size:auto; }
  button, input, select, textarea { font:inherit; }
  button, summary { cursor:pointer; }
  :where(a,button,input,select,textarea,summary):focus-visible { outline:2px solid currentColor; outline-offset:4px; }
  .skip { position:fixed; inset-block-start:-10rem; inset-inline-start:1rem; z-index:10000; padding:.75rem; background:var(--bg); color:var(--text); }
  .skip:focus { inset-block-start:1rem; }
  /* Legal prose is a separate utility; never constrain the author's main site. */
  .legal-container { max-inline-size:76ch; margin-inline:auto; padding:clamp(1rem,4vw,3rem); }
  .legal-body { line-height:1.7; overflow-wrap:anywhere; }
  .legal-body p + p, .legal-body section + section { margin-block-start:1.25em; }
  .legal-body table { display:block; overflow-x:auto; max-inline-size:100%; }
  .legal-body h1, .legal-body h2, .legal-body h3, .legal-title { line-height:1.2; }
  [data-cookie-fallback] { position:fixed; inset-inline:1rem; inset-block-end:1rem; z-index:9999; max-inline-size:34rem; padding:1rem; border:1px solid var(--border); background:var(--bg); color:var(--text); }
  [data-cookie-fallback] .cookie-text { font:14px/1.5 system-ui,sans-serif; }
  [data-cookie-fallback] .cookie-actions { display:flex; flex-wrap:wrap; gap:.75rem; margin-block-start:.75rem; }
  [data-cookie-fallback] button { min-block-size:44px; padding:.6rem 1rem; border:1px solid var(--border); background:var(--surface); color:var(--text); }
  [data-cookie-fallback] [data-action="accept-cookie"] { background:var(--primary); color:var(--primary-fg); }
}
/* Required state, not a visual layout. Expanded pages may be grid/flex/block. */
[hidden], .cookie-banner.hidden { display:none !important; }
@media(prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *, *::before, *::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* === AUTHOR-OWNED SITE STYLES === */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@500;600;700;800&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --bg: #0b0d13;
  --text: #f5f1e8;
  --surface: #141823;
  --surface-2: #1b2030;
  --text-muted: #a9afbe;
  --primary: #91e8d1;
  --primary-fg: #071513;
  --border: #303746;
  --tokyo: #70e6ff;
  --kyoto: #e6a7ff;
  --osaka: #f4bd70;
  --serif: "Manrope", "Noto Sans JP", sans-serif;
  --sans: "DM Sans", "Noto Sans JP", sans-serif;
  --measure: 70rem;
  --shadow: 0 1.5rem 4rem rgba(0,0,0,.26);
}

* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 0%, rgba(50,67,105,.22), transparent 28rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
}
a { color: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, summary:focus-visible, select:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}
button { font: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(48,55,70,.8);
  background: rgba(11,13,19,.96);
  backdrop-filter: blur(16px);
}
.nav-shell {
  width: min(100% - 2rem, var(--measure));
  margin: 0 auto;
  min-height: 5rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  justify-content: space-between;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark-mark {
  width: 2rem;
  height: 2rem;
  border: 1px solid var(--primary);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}
.wordmark-mark:before, .wordmark-mark:after {
  content: "";
  position: absolute;
  border: 1px solid var(--primary);
  border-radius: 50%;
  inset: .28rem -.35rem;
  transform: rotate(25deg);
}
.wordmark-mark:after { inset: -.35rem .28rem; transform: rotate(-25deg); opacity: .55; }
.wordmark-text { font: 800 1rem/1 var(--serif); letter-spacing: -.04em; }
.wordmark-text small {
  display: block;
  color: var(--text-muted);
  font: 500 .6rem/1.2 var(--sans);
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-top: .35rem;
}
.primary-nav { display: flex; align-items: center; gap: .25rem; }
.primary-nav a, .language-switch a {
  text-decoration: none;
  color: var(--text-muted);
  padding: .65rem .7rem;
  border-radius: .35rem;
  font-size: .86rem;
}
.primary-nav a:hover, .language-switch a:hover { color: var(--text); background: var(--surface); }
.nav-group { position: relative; }
.nav-group summary {
  list-style: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: .65rem .7rem;
  font-size: .86rem;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary:after { content: "⌄"; margin-left: .4rem; color: var(--primary); }
.nav-group[open] summary { color: var(--text); }
.nav-panel {
  position: absolute;
  top: calc(100% + .5rem);
  left: 0;
  min-width: 14rem;
  padding: .55rem;
  background: #151a26;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: .6rem;
}
.nav-panel a { display: block; }
.language-switch { display: flex; gap: .1rem; border-left: 1px solid var(--border); padding-left: .75rem; }
.language-switch a[aria-current="page"] { color: var(--primary); }

.page { width: min(100% - 2rem, var(--measure)); margin: 0 auto; padding: 5rem 0 7rem; }
.page[hidden] { display: none; }
.eyebrow {
  color: var(--primary);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
h1, h2, h3 { font-family: var(--serif); letter-spacing: -.055em; line-height: 1.05; margin: 0; }
h1 { font-size: clamp(3rem, 8vw, 7.4rem); max-width: 9ch; }
h2 { font-size: clamp(2.2rem, 5vw, 4.7rem); max-width: 12ch; }
h3 { font-size: 1.35rem; letter-spacing: -.035em; }
p { max-width: 68ch; }
.lede { font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: var(--text-muted); max-width: 55ch; }
.muted { color: var(--text-muted); }
.route-link, .button-link {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.85rem;
  text-decoration: none;
  font-weight: 700;
  font-size: .88rem;
}
.button-link {
  padding: .75rem 1rem;
  background: var(--primary);
  color: var(--primary-fg);
  border-radius: .35rem;
}
.text-link { color: var(--primary); }
.section-head { display: flex; justify-content: space-between; gap: 2rem; align-items: end; margin-bottom: 2rem; }
.section-head p { margin: 0; color: var(--text-muted); max-width: 38ch; }
.hero {
  min-height: min(54rem, calc(100vh - 5rem));
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  align-items: center;
  gap: clamp(2rem, 7vw, 7rem);
  padding: 4rem 0 5rem;
}
.hero-copy h1 { margin-bottom: 1.5rem; }
.hero-copy .lede { margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-art {
  min-height: 31rem;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-left: 1px solid var(--border);
}
.hero-art svg { width: 100%; max-height: 38rem; overflow: visible; }
.story-beam { transform-origin: center; animation: orbit 12s linear infinite; }
.story-pulse { animation: pulse 4s ease-in-out infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .34; transform: scale(1.06); } }
.city-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 1rem 0 6rem;
}
.city-strip a {
  padding: 1.5rem;
  text-decoration: none;
  min-height: 9rem;
  border-right: 1px solid var(--border);
}
.city-strip a:last-child { border-right: 0; }
.city-strip a:hover { background: var(--surface); }
.city-strip strong { display: block; font: 700 1.45rem var(--serif); margin-bottom: .4rem; }
.city-strip span { color: var(--text-muted); font-size: .9rem; }
.city-tokyo strong { color: var(--tokyo); }
.city-kyoto strong { color: var(--kyoto); }
.city-osaka strong { color: var(--osaka); }

.editorial-band {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 4rem;
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
}
.editorial-band p { color: var(--text-muted); }
.index-list { display: grid; gap: 0; }
.index-item {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
}
.index-item:last-child { border-bottom: 1px solid var(--border); }
.index-item:hover h3 { color: var(--primary); }
.index-item b { color: var(--text-muted); font: 600 .8rem var(--sans); }
.index-item small { color: var(--text-muted); }

.visual-frame {
  background: #111622;
  border: 1px solid var(--border);
  min-height: 18rem;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: hidden;
}
.visual-frame svg { width: 100%; height: auto; max-height: 26rem; }
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  gap: clamp(2rem, 7vw, 7rem);
  align-items: start;
}
.article-intro { position: sticky; top: 8rem; }
.article-intro h1 { max-width: 8ch; margin-bottom: 1.5rem; }
.article-body > p:first-of-type { font-size: 1.18rem; color: #d8d7d2; }
.prose-section { padding: 2rem 0; border-top: 1px solid var(--border); }
.prose-section h2 { font-size: 2rem; max-width: 18ch; margin-bottom: 1rem; }
.prose-section h3 { margin-top: 1.5rem; }
.fact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}
.fact {
  padding: 1.2rem;
  background: var(--surface);
  border-left: 2px solid var(--primary);
}
.fact strong { display: block; margin-bottom: .25rem; }
.fact span { color: var(--text-muted); font-size: .9rem; }
.route-line {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  color: var(--text-muted);
  font-size: .92rem;
}
.route-line b { color: var(--text); }
.route-dot { color: var(--primary); }
.compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0 2rem;
  font-size: .92rem;
}
.compare-table th, .compare-table td { padding: 1rem .8rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.compare-table th { color: var(--primary); font-weight: 700; }
.note {
  border: 1px solid var(--border);
  padding: 1.2rem 1.3rem;
  background: linear-gradient(100deg, rgba(145,232,209,.09), rgba(20,24,35,.3));
}
.note strong { color: var(--primary); }
.faq-list { border-top: 1px solid var(--border); }
.faq-list details { border-bottom: 1px solid var(--border); padding: 1.1rem 0; }
.faq-list summary { cursor: pointer; font-weight: 700; padding-right: 2rem; position: relative; }
.faq-list summary::marker { color: var(--primary); }
.faq-answer { color: var(--text-muted); padding: .8rem 2rem 0 0; }
.contact-layout {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 5rem;
  align-items: start;
}
.contact-layout h1 { max-width: 8ch; }
.contact-details { border-top: 1px solid var(--border); }
.contact-detail { padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.contact-detail dt { color: var(--primary); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; }
.contact-detail dd { margin: .25rem 0 0; color: #dddcd5; }
.contact-detail a { color: inherit; }
.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 1rem;
  background: #080a0f;
}
.footer-inner { width: min(100%, var(--measure)); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.footer-brand { font: 700 1.25rem var(--serif); }
.footer-meta { color: var(--text-muted); font-size: .88rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .8rem 1.25rem; justify-content: end; align-content: start; }
.footer-links a, .cookie-open { color: var(--text-muted); font-size: .82rem; }
.cookie-open { background: none; border: 0; padding: 0; cursor: pointer; }
.cookie-banner {
  position: fixed;
  z-index: 30;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 48rem;
  padding: 1rem 1.2rem;
  background: #171d2a;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.cookie-banner[hidden] { display: none; }
.cookie-content { display: flex; align-items: center; gap: 1rem; justify-content: space-between; }
.cookie-content p { margin: 0; font-size: .85rem; color: var(--text-muted); }
.cookie-actions { display: flex; gap: .5rem; flex-shrink: 0; }
.cookie-actions button { border: 1px solid var(--border); background: transparent; color: var(--text); padding: .55rem .75rem; cursor: pointer; }
.cookie-actions button:first-child { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.doc-body { width: min(100% - 2rem, 48rem); margin: 4rem auto; padding-bottom: 5rem; }
.doc-body h1 { max-width: none; font-size: clamp(2.5rem, 6vw, 5rem); margin-bottom: 2rem; }
.doc-body h2 { max-width: none; font-size: 1.8rem; margin-top: 2.5rem; }
.doc-body p, .doc-body li { color: var(--text-muted); }
@media (max-width: 800px) {
  .nav-shell { align-items: flex-start; padding: .8rem 0; flex-wrap: wrap; }
  .primary-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: .2rem; }
  .primary-nav > a, .nav-group summary { white-space: nowrap; }
  .nav-panel { position: static; margin-top: .5rem; }
  .language-switch { margin-left: auto; }
  .hero, .editorial-band, .article-layout, .contact-layout { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .hero-art { border-left: 0; border-top: 1px solid var(--border); padding-top: 2rem; min-height: 22rem; }
  .article-intro { position: static; }
  .article-intro h1 { max-width: 12ch; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-links { justify-content: start; }
}
@media (max-width: 520px) {
  .page { padding-top: 3.5rem; }
  .city-strip { grid-template-columns: 1fr; }
  .city-strip a { border-right: 0; border-bottom: 1px solid var(--border); }
  .city-strip a:last-child { border-bottom: 0; }
  .fact-grid { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .section-head p { margin-top: 1rem; }
  .cookie-content { display: block; }
  .cookie-actions { margin-top: .8rem; }
  .cookie-actions button { flex: 1; }
  .compare-table { display: block; overflow-x: auto; white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* === OPEN NAVIGATION SURFACE SAFETY === */
/* Position, shadows, borders and scroll treatment belong to the author.
   Only an OPEN mobile menu gets a mandatory opaque readable surface. */
header.site-header[data-pwp-nav-open] {
  background-color: var(--bg, #ffffff) !important;
  isolation: isolate;
}
[data-pwp-mobile-menu][data-pwp-menu-open] {
  background-color: var(--bg, #ffffff);
  color: var(--text, #0f172a);
  max-block-size: var(--pwp-nav-available-height, calc(100dvh - 6rem));
  overflow-y: auto;
  overscroll-behavior: contain;
}
.pwp-source-note {
  margin-block-start: 1rem;
  font-size: .875em;
  line-height: 1.5;
}
.pwp-source-note a { text-decoration: underline; text-underline-offset: .2em; }
