/* Nagoya Castle Now — shared styles
   Copied from Osaka Castle Today (same layout, type and components) with the
   phone menu from Nijo Castle Today. Palette from Nagoya Castle: plaster walls,
   copper-green roofs, granite stone walls, the gold shachihoko. */

/* Fonts: Latin subsets of the same Google Fonts as Osaka Castle Today, hosted on this site
   (assets/fonts, SIL Open Font License). Japanese text falls back to system fonts. */
@font-face { font-family: "Shippori Mincho B1"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/shippori-mincho-b1-700-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: "Shippori Mincho B1"; font-style: normal; font-weight: 800; font-display: swap; src: url("/assets/fonts/shippori-mincho-b1-800-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: "Zen Kaku Gothic New"; font-style: normal; font-weight: 400; font-display: swap; src: url("/assets/fonts/zen-kaku-gothic-new-400-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: "Zen Kaku Gothic New"; font-style: normal; font-weight: 700; font-display: swap; src: url("/assets/fonts/zen-kaku-gothic-new-700-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; }

:root {
  --plaster: #f6f7f5;
  --paper: #ffffff;
  --ink: #1d2a2e;
  --granite: #5f686b;
  --rule: #d9ddda;
  --verdigris: #2e5d4b;
  --verdigris-soft: #e4ede8;
  --gold: #a7822f;
  --quiet: #2e5d4b;
  --moderate: #7a8a3a;
  --busy: #a7822f;
  --very-busy: #9b3a2c;

  --serif: "Shippori Mincho B1", "Hiragino Mincho ProN", Georgia, serif;
  --sans: "Zen Kaku Gothic New", "Hiragino Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 40rem;
  --wide: 60rem;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

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

a { color: var(--verdigris); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.prose { max-width: var(--measure); }

/* Header */
.site-header {
  background: var(--ink);
  color: var(--plaster);
  padding-top: env(safe-area-inset-top, 0px);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}
.brand {
  display: flex; align-items: center; gap: 0.65rem;
  color: var(--plaster);
  text-decoration: none;
}
.brand img { width: 38px; height: 38px; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; }
.brand:hover { color: #fff; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.1rem; font-size: 0.95rem; }
.site-nav a { color: #c9d6d3; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; text-decoration: underline; }

/* Typography */
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-family: var(--serif); font-weight: 700; font-size: clamp(1.9rem, 5vw, 2.8rem); }
h2 { font-family: var(--serif); font-weight: 700; font-size: 1.55rem; margin-top: 3rem; margin-bottom: 0.75rem; }
h3 { font-size: 1.1rem; font-weight: 700; margin-top: 1.75rem; margin-bottom: 0.4rem; }
p { margin: 0 0 1rem; }
.lede { font-size: 1.2rem; color: var(--ink); }
.muted { color: var(--granite); font-size: 0.95rem; }

main { padding-bottom: 4rem; }
.page-head { padding: 2.5rem 0 1rem; }

/* Live board (the hero) */
.board {
  padding: 2.25rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}
.board h1 { max-width: 18ch; }
.level {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--serif);
  font-weight: 800;
  font-size: clamp(2.6rem, 9vw, 4.2rem);
  line-height: 1;
  color: var(--level-color, var(--ink));
}
.level-note { margin-top: 0.6rem; color: var(--granite); }
.level-row { display: flex; align-items: center; gap: 1.1rem; margin-top: 1.25rem; }
.level-row .level { margin-top: 0; }
.ring { position: relative; flex: none; width: clamp(4.6rem, 16vw, 6.2rem); aspect-ratio: 1; color: var(--level-color, var(--ink)); }
.ring[hidden] { display: none; }
.ring svg { display: block; width: 100%; height: 100%; }
.ring circle { fill: none; stroke-width: 8; }
.ring-track { stroke: var(--rule); }
.ring-value { stroke: currentColor; stroke-linecap: round; stroke-dasharray: 270.2; stroke-dashoffset: 270.2; transition: stroke-dashoffset 0.6s ease; }
.ring b { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-weight: 800; font-size: clamp(1.6rem, 5.5vw, 2.2rem); line-height: 1; }
@media (prefers-reduced-motion: reduce) { .ring-value { transition: none; } }

.waits {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 34rem;
}
.waits li {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 0;
  border-top: 1px solid var(--rule);
}
.waits li:last-child { border-bottom: 1px solid var(--rule); }
.waits .what { font-weight: 700; }
.waits .what small { display: block; font-weight: 400; color: var(--granite); font-size: 0.9rem; }
.waits .mins {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2rem;
  line-height: 1;
  white-space: nowrap;
}
.waits .mins span { font-family: var(--sans); font-size: 1rem; font-weight: 400; margin-left: 0.2rem; }
.waits li.stairs { background: var(--verdigris-soft); padding-left: 0.75rem; padding-right: 0.75rem; }
.waits li.stairs .mins { color: var(--verdigris); }

.stamp { margin-top: 1rem; font-size: 0.9rem; color: var(--granite); }

/* Factors */
.factors { margin: 0; padding: 0; list-style: none; max-width: var(--measure); }
.factors li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.factors b { display: inline-block; min-width: 7.5rem; }

/* Hourly bars */
.hours-strip {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  max-width: var(--wide);
}
.hour {
  flex: 0 0 3.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.85rem;
}
.hour .bar-box { height: 6rem; width: 100%; display: flex; align-items: flex-end; }
.hour .bar { width: 100%; background: var(--level-color, var(--granite)); border-radius: 2px 2px 0 0; }
.hour .t { margin-top: 0.3rem; color: var(--granite); }
.hour .m { font-weight: 700; }

/* 7-day list */
.days { margin: 0; padding: 0; list-style: none; max-width: 34rem; }
.days li {
  display: grid;
  grid-template-columns: 7rem 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.days .d { font-weight: 700; }
.days .lv { color: var(--level-color, var(--ink)); font-weight: 700; }
.days .why { color: var(--granite); font-size: 0.9rem; text-align: right; }

/* Tables */
.table-scroll { overflow-x: auto; max-width: var(--wide); }
table { border-collapse: collapse; width: 100%; min-width: 32rem; font-size: 0.98rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem 0.7rem 0; border-bottom: 1px solid var(--rule); }
th { font-weight: 700; border-bottom: 2px solid var(--ink); }

/* Callout for the stairs tip and verdicts */
.note {
  max-width: var(--measure);
  border-left: 4px solid var(--verdigris);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--verdigris);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  padding: 0.75rem 1.1rem;
  border-radius: 4px;
}
.btn:hover { background: var(--ink); color: #fff; }
.btn-line { background: transparent; color: var(--verdigris); border: 2px solid var(--verdigris); }
.btn-line:hover { background: var(--verdigris); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1rem 0 1.5rem; }
.aff { font-size: 0.85rem; color: var(--granite); }

/* Figure placeholder for on-site photos */
.photo {
  max-width: var(--measure);
  aspect-ratio: 4 / 3;
  background: repeating-linear-gradient(135deg, #e7eae8 0 12px, #eef1ef 12px 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--granite);
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
  margin: 1.5rem 0;
}

/* FAQ */
.faq h3 { margin-top: 1.5rem; }

/* Forms */
label { display: block; font-weight: 700; margin: 1rem 0 0.3rem; }
input, textarea {
  width: 100%;
  max-width: var(--measure);
  font: inherit;
  padding: 0.6rem 0.7rem;
  border: 1px solid #b9c0bd;
  border-radius: 4px;
  background: var(--paper);
}
button { font: inherit; cursor: pointer; border: 0; margin-top: 1.25rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 3rem;
  font-size: 0.92rem;
  color: var(--granite);
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-bottom: 1rem; }
.site-footer a { color: var(--granite); }

@media (prefers-reduced-motion: no-preference) {
  .hour .bar { transition: height 0.4s ease-out; }
}

/* Map (full page at /map/ and the embed on the home page) */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap-map { max-width: 78rem; }
.map-panel {
  background: var(--paper);
  border-radius: 28px;
  padding: 1rem;
  margin: 1rem 0 2rem;
  box-shadow: 0 0 0 1px rgba(29, 42, 46, 0.05), 0 24px 48px -28px rgba(29, 42, 46, 0.35);
}
.mapwrap { display: grid; gap: 1rem; }
.map-main { order: -1; min-width: 0; }
#map {
  height: 30rem;
  max-height: 68vh;
  min-height: 21rem;
  background: #f0f1f1;
  border-radius: 22px;
  z-index: 0;
  overflow: hidden;
}
#map[data-mode="embed"] { height: 28rem; }
#map[data-mode="route"] { height: 26rem; margin: 0.4rem 0 0.6rem; }
#map.map-failed { display: flex; align-items: center; justify-content: center; color: var(--granite); padding: 1rem; text-align: center; }
/* English place names drawn over the label-free basemap */
.map-name span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-size: 0.8rem; color: #6b7577; text-shadow: 0 0 3px #fff, 0 0 3px #fff; pointer-events: none; }
.map-name-water span { font-style: italic; color: #6f8791; }
.map-name-area span { font-weight: 700; }
.map-far .map-name { display: none; }
.map-far .map-station { display: none; }
.leaflet-tooltip.map-station { background: none; border: 0; box-shadow: none; padding: 0; font-weight: 700; font-size: 0.82rem; color: var(--ink); text-shadow: 0 0 3px #fff, 0 0 3px #fff, 0 0 3px #fff; }
.leaflet-tooltip.map-station::before { display: none; }
.leaflet-container { font-family: var(--sans); font-size: 0.9rem; background: #f0f1f1; }
.leaflet-container a { color: var(--verdigris); }
.leaflet-touch .leaflet-bar, .leaflet-bar { border: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 6px 18px -6px rgba(29, 42, 46, 0.35); }
.leaflet-touch .leaflet-bar a, .leaflet-bar a { width: 44px; height: 44px; line-height: 44px; font-size: 1.5rem; color: var(--ink); border: 0; background: #fff; }
.leaflet-top.leaflet-left { margin: 0.6rem 0 0 0.6rem; }
.leaflet-popup-content-wrapper { border-radius: 16px; }
.leaflet-control-attribution { border-radius: 999px 0 0 0; padding: 0.1rem 0.6rem; font-size: 0.72rem; }
.pin { display: block; filter: drop-shadow(0 2px 2px rgba(29, 42, 46, 0.3)); }

.castle-pin { position: relative; display: block; width: 64px; height: 64px; filter: drop-shadow(0 6px 6px rgba(29, 42, 46, 0.35)); }
.castle-pin svg { position: relative; display: block; margin: 0 auto; }
.castle-pin::before {
  content: ""; position: absolute; left: 50%; top: 62%; width: 84px; height: 84px; transform: translate(-50%, -50%);
  border-radius: 50%; border: 1.5px solid rgba(29, 42, 46, 0.28); background: rgba(255, 255, 255, 0.35);
}
.castle-pin.is-on::before { border-color: var(--gold); border-width: 2.5px; }
.castle-label {
  position: absolute; left: 50%; top: 66px; transform: translateX(-50%);
  background: #1b2440; color: #fff; font-weight: 700; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.3rem 0.85rem; border-radius: 999px; white-space: nowrap; box-shadow: 0 4px 10px -4px rgba(29, 42, 46, 0.5);
}
.pop strong { display: block; font-size: 1rem; margin-bottom: 0.25rem; }
.pop p { margin: 0 0 0.5rem; line-height: 1.5; }
.pop a { display: block; margin-top: 0.25rem; }
.leaflet-bottom.leaflet-left { margin: 0 0 1.5rem 0.4rem; }
.map-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; max-width: min(30rem, calc(100vw - 4.5rem)); }
.legend-chip {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: rgba(255, 255, 255, 0.96); color: var(--ink); font-weight: 700;
  border-radius: 999px; padding: 0.3rem 0.8rem; font-size: 0.82rem;
  box-shadow: 0 4px 12px -6px rgba(29, 42, 46, 0.4);
}

#map-search {
  max-width: none; border-radius: 18px; border: 1px solid var(--rule); padding: 0.95rem 1rem 0.95rem 3rem; font-size: 1rem;
  background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f686b' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.800-3.800'/%3E%3C/svg%3E") no-repeat 1rem center / 1.3rem;
  box-shadow: 0 6px 16px -12px rgba(29, 42, 46, 0.4);
}
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.filter {
  margin: 0; padding: 0.5rem 1rem; background: #eef0f0; color: var(--ink); border: 0; border-radius: 999px;
  font-size: 0.95rem; font-weight: 700; display: inline-flex; align-items: center; gap: 0.45rem;
}
.filter[aria-pressed="true"] { background: #1b2440; color: #fff; }
.dot { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; flex: none; }
.dot-tower { background: var(--very-busy); }
.dot-gates { background: var(--gold); }
.dot-park { background: var(--verdigris); }
.dot-access { background: #1b2440; }
.filter[aria-pressed="true"] .dot-access { box-shadow: 0 0 0 1.5px #fff; }
.map-count {
  margin: 1.1rem 0.3rem 0.6rem; font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--granite);
  display: flex; justify-content: space-between; align-items: baseline;
}
.linklike { margin: 0; padding: 0; background: none; color: var(--verdigris); text-decoration: none; font-size: 0.92rem; letter-spacing: 0; text-transform: none; }
.linklike:hover { text-decoration: underline; }

.spots { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.spot {
  background: var(--paper); border-radius: 18px; padding: 0.85rem 1rem;
  box-shadow: 0 0 0 1px rgba(29, 42, 46, 0.06), 0 10px 20px -18px rgba(29, 42, 46, 0.5);
}
.spot.is-on { box-shadow: 0 0 0 2px var(--verdigris), 0 10px 20px -18px rgba(29, 42, 46, 0.5); }
.spot-btn {
  margin: 0; padding: 0; background: none; color: var(--ink); font-weight: 700; font-size: 1.02rem; text-align: left;
  display: flex; align-items: center; gap: 0.6rem; width: 100%;
}
.spot-btn .dot { width: 0.85rem; height: 0.85rem; }
.spot-group { margin: 0.1rem 0 0 1.45rem; font-size: 0.86rem; color: var(--verdigris); }
.spot-text { margin: 0.45rem 0 0 1.45rem; font-size: 0.95rem; color: var(--granite); }
.spot-tags { margin: 0.3rem 0 0 1.45rem; display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; font-size: 0.82rem; color: var(--granite); }
.spot-tags:empty { display: none; }
#map-edit { max-width: none; font-family: ui-monospace, monospace; font-size: 0.85rem; margin-top: 0.5rem; }

.map-home-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.9rem 1.5rem; margin-top: 1.1rem; padding: 0 0.4rem 0.3rem; }
.map-home-foot strong { font-family: var(--serif); font-size: 1.25rem; }
.map-home-foot p { margin: 0.15rem 0 0; color: var(--granite); max-width: 34rem; }
.map-home-foot .btn { border-radius: 999px; padding: 0.9rem 1.6rem; background: #1b2440; }
.map-home-foot .btn:hover { background: var(--verdigris); }

@media (min-width: 56rem) {
  .map-panel { padding: 1.25rem; }
  .mapwrap { grid-template-columns: 23rem 1fr; align-items: start; gap: 1.25rem; }
  .map-main { order: 0; position: sticky; top: 1rem; }
  #map { height: 80vh; max-height: none; }
  #map[data-mode="embed"] { height: 34rem; }
  #map[data-mode="route"] { height: 32rem; }
  .spots { max-height: calc(80vh - 12.5rem); overflow-y: auto; padding: 2px; }
}

/* The short list under the home page map */
.map-panel > .map-count { margin-top: 1.1rem; }
.spots-home { margin-top: 0; }
/* Scrolls inside its own box; the cut-off last row shows there is more below */
.spots-home.is-scroll {
  max-height: 16.5rem; overflow-y: auto; padding: 2px 2px 0.6rem; position: relative;
  overscroll-behavior: contain; -webkit-overflow-scrolling: touch; align-content: start;
}
.spots-home.is-scroll .spot-text { display: none; }
@media (min-width: 56rem) {
  .spots-home { grid-template-columns: repeat(3, 1fr); max-height: none; overflow: visible; }
  .spots-home.is-scroll { max-height: 14rem; overflow-y: auto; }
}

/* Ticket buttons under the live board on the home page */
.board-tickets { margin: 1.5rem 0 0; }
.board-tickets-more { margin: 0.75rem 0 0.25rem; font-weight: 700; }

/* Floor guide: photo yes/no */
.floors td.ok { color: var(--verdigris); font-weight: 700; }
.floors td.no { color: var(--very-busy); font-weight: 700; }
.floors td:first-child { white-space: nowrap; }
.floors { min-width: 0; }

.route{list-style:none;padding:0;margin:0;counter-reset:r}
.route li{counter-increment:r;position:relative;padding:0 0 1.1rem 2.6rem;border-left:2px solid var(--rule);margin-left:.9rem}
.route li:last-child{border-left-color:transparent}
.route li::before{content:counter(r);position:absolute;left:-.95rem;top:0;width:1.8rem;height:1.8rem;border-radius:50%;background:var(--verdigris);color:#fff;font-weight:700;font-size:.85rem;display:flex;align-items:center;justify-content:center}
.route h3{margin:.1rem 0 .3rem;font-size:1.05rem}
.route p{margin:0}
.route-abc li::before{content:attr(data-n)}
.route-pin{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border-radius:50%;color:#fff;font-weight:700;font-size:.85rem;border:2px solid #fff;box-shadow:0 1px 4px rgba(29,42,46,.35);font-family:var(--sans)}
.route-pin.is-on{font-size:1rem}
@media (max-width:37.5rem){.route-pin{font-size:.72rem;border-width:1.5px}}
.dot-history{background:#6e6255}
.filter[aria-pressed="true"] .dot-history { box-shadow: 0 0 0 1.5px #fff; }
.route-cards{display:grid;gap:.8rem;margin:.6rem 0 1rem}
@media (min-width:40rem){.route-cards{grid-template-columns:1fr 1fr}}
.route-card{display:flex;flex-direction:column;gap:.3rem;padding:1rem 1.1rem;border:1px solid var(--rule);border-radius:14px;background:#fff;color:var(--ink);text-decoration:none}
.route-card strong{font-family:var(--serif);font-size:1.15rem;color:var(--verdigris)}
.route-card span:last-child{font-size:.95rem}
.route-card:hover{border-color:var(--verdigris)}
.route-card-tag{font-size:.75rem;letter-spacing:.12em;text-transform:uppercase;color:var(--granite)}
.note-now{border-left:3px solid var(--gold);padding:.4rem 0 .4rem .8rem;margin:0 0 1.5rem}
.floors-wrap td:first-child{white-space:normal;width:45%}

/* ---------- Header actions and the phone menu ----------
   768px and wider: the header above is unchanged; the Tickets button and menu are hidden.
   Under 768px: one-line rounded bar that stays at the top, with Tickets and a menu button. */
.hdr-actions { display: none; }
.menu[hidden] { display: none; }

@media (max-width: 767.98px) {
  .site-header {
    position: sticky; top: 0; z-index: 50; background: transparent;
    padding: calc(env(safe-area-inset-top, 0px) + 8px) 12px 0;
  }
  .site-header .wrap {
    flex-wrap: nowrap; gap: 0.5rem; min-height: 56px; padding: 0.4rem 0.45rem 0.4rem 0.7rem;
    background: var(--ink); border-radius: 999px; box-shadow: 0 8px 20px -12px rgba(29, 42, 46, 0.6);
  }
  .site-header .brand { min-width: 0; gap: 0.5rem; }
  .site-header .brand img { width: 32px; height: 32px; }
  .site-header .brand-name { font-size: 1.05rem; white-space: nowrap; }
  .site-header .site-nav { display: none; }
  .hdr-actions { display: flex; align-items: center; gap: 0.4rem; flex: none; }
  .hdr-cta {
    display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.45rem 0.85rem; border-radius: 999px;
    background: #fff; color: var(--ink); font-weight: 700; font-size: 0.92rem; text-decoration: none; white-space: nowrap;
  }
  .hdr-cta:hover { background: var(--plaster); color: var(--ink); }
  .menu-btn, .menu-close {
    display: inline-grid; place-items: center; width: 42px; height: 42px; margin: 0; padding: 0;
    border: 0; border-radius: 50%; cursor: pointer;
  }
  .menu-btn { background: rgba(255, 255, 255, 0.12); color: #fff; }
  .menu-close { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
}
@media (max-width: 374.98px) { .site-header .brand-name { font-size: 0.95rem; } }
@media (max-width: 339.98px) { .site-header .brand-name { display: none; } }

.menu-open, .menu-open body { overflow: hidden; }
.menu {
  position: fixed; inset: 0; z-index: 100; overflow-y: auto; overscroll-behavior: contain;
  background: var(--plaster); color: var(--ink);
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 16px calc(env(safe-area-inset-bottom, 0px) + 32px);
}
.menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.menu-top .brand { color: var(--ink); }
.menu-top .brand img { width: 34px; height: 34px; }
.menu-top .brand-name { font-size: 1.15rem; }
.menu-card {
  position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.15rem;
  min-height: 11rem; padding: 1.1rem 1.2rem; border-radius: 22px; overflow: hidden; color: #fff; text-decoration: none;
  background: linear-gradient(180deg, rgba(29, 42, 46, 0) 25%, rgba(29, 42, 46, 0.85) 100%), url("/images/keep-and-palace-800.webp") center 30% / cover, #5f686b;
}
.menu-card:hover { color: #fff; }
.menu-card-tag { font-size: 0.75rem; letter-spacing: 0.14em; font-weight: 700; opacity: 0.9; }
.menu-card-title { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; line-height: 1.2; }
.menu-card-open { font-weight: 700; font-size: 0.95rem; }
.menu-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; margin: 0.75rem 0 0.5rem; }
.menu-btns a { display: block; text-align: center; padding: 0.85rem 0.5rem; border-radius: 999px; font-weight: 700; text-decoration: none; }
.menu-btn-dark { background: var(--ink); color: #fff; }
.menu-btn-dark:hover { background: var(--verdigris); color: #fff; }
.menu-btn-light { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px var(--rule); }
.menu-btn-light:hover { color: var(--verdigris); }
.menu-head { margin: 1.4rem 0 0.4rem; font-size: 0.75rem; letter-spacing: 0.14em; font-weight: 700; color: var(--granite); }
.menu-links { list-style: none; margin: 0; padding: 0; background: var(--paper); border-radius: 18px; box-shadow: 0 0 0 1px var(--rule); }
.menu-links li + li { border-top: 1px solid var(--rule); }
.menu-links a { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 0.75rem; padding: 0.7rem 0.9rem; color: var(--ink); text-decoration: none; }
.menu-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--verdigris-soft); color: var(--verdigris); }
.menu-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.menu-name { font-weight: 400; }
.menu-desc { font-size: 0.88rem; color: var(--granite); }
.menu-links a[aria-current="page"] .menu-name { font-weight: 700; }
.menu-arrow { color: var(--granite); }
.menu-links a:hover .menu-name { color: var(--verdigris); }

/* ---------- Nagoya Castle Now additions ---------- */

/* Today block (top of the home page) */
.today-date { margin: 0.4rem 0 0; color: var(--granite); }
.status-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.9rem; margin-top: 1.1rem; }
.status-word {
  font-family: var(--serif); font-weight: 800; font-size: clamp(2.4rem, 9vw, 3.6rem); line-height: 1;
  color: var(--status-color, var(--ink));
}
.status-hours { font-weight: 700; font-size: 1.1rem; }
.today-grid { list-style: none; margin: 1.4rem 0 0; padding: 0; max-width: 40rem; }
.today-grid li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.75rem; align-items: center;
  padding: 0.8rem 0; border-top: 1px solid var(--rule);
}
.today-grid li:last-child { border-bottom: 1px solid var(--rule); }
.today-grid .k { font-weight: 700; }
.today-grid .v small { display: block; color: var(--granite); font-size: 0.9rem; }
.today-grid .level-row { margin-top: 0; gap: 0.8rem; }
.today-grid .ring { width: 4.4rem; }
.today-grid .ring b { font-size: 1.45rem; }
.today-grid .level { font-size: 1.6rem; }
@media (max-width: 22rem) { .today-grid li { grid-template-columns: 1fr; gap: 0.3rem; } }

/* The answer box: can you go inside? */
.answer {
  max-width: 40rem; margin: 1.2rem 0 0; background: var(--paper);
  border: 1px solid var(--rule); border-left: 5px solid var(--very-busy); border-radius: 6px;
  padding: 1rem 1.15rem 1.1rem;
}
.answer h2 { margin: 0 0 0.6rem; font-size: 1.3rem; }
.answer ul { list-style: none; margin: 0; padding: 0; }
.answer li { padding: 0.5rem 0 0.5rem 1.9rem; position: relative; border-top: 1px solid var(--rule); }
.answer li:first-child { border-top: 0; }
.answer li::before { position: absolute; left: 0; top: 0.5rem; font-weight: 800; width: 1.4rem; text-align: center; }
.answer li.no::before { content: "\2715"; color: var(--very-busy); }
.answer li.yes::before { content: "\2713"; color: var(--verdigris); }
.answer li b { display: block; }
.answer li span { color: var(--granite); font-size: 0.95rem; }
.answer .more { margin: 0.7rem 0 0; font-weight: 700; }

/* Photos with credits */
.photo-fig { margin: 1.5rem 0; max-width: var(--wide); }
.photo-fig img { width: 100%; border-radius: 6px; background: var(--rule); }
.photo-fig figcaption, .credit { font-size: 0.82rem; color: var(--granite); margin-top: 0.4rem; }
.photo-fig figcaption a, .credit a { color: var(--granite); }

/* Key places under the home map */
.key-places { list-style: none; margin: 0.4rem 0 0; padding: 0; display: grid; gap: 0; max-width: 40rem; }
.key-places li { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.key-places li:last-child { border-bottom: 1px solid var(--rule); }
.key-places b { display: block; }
.key-places span { color: var(--granite); font-size: 0.95rem; }

/* Price list */
.prices { list-style: none; margin: 0.5rem 0 1rem; padding: 0; max-width: 34rem; }
.prices li { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: baseline; padding: 0.7rem 0; border-top: 1px solid var(--rule); }
.prices li:last-child { border-bottom: 1px solid var(--rule); }
.prices .who small { display: block; color: var(--granite); font-size: 0.9rem; }
.prices .yen { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; white-space: nowrap; }
.prices .was { font-family: var(--sans); font-weight: 400; font-size: 0.9rem; color: var(--granite); margin-left: 0.4rem; text-decoration: line-through; }

/* Visit plans (three, different lengths) */
.plans { display: grid; gap: 0.8rem; margin: 0.6rem 0 1rem; }
@media (min-width: 48rem) { .plans { grid-template-columns: repeat(3, 1fr); } }
.plan { border: 1px solid var(--rule); border-radius: 14px; background: var(--paper); padding: 1rem 1.1rem; }
.plan h3 { margin: 0 0 0.15rem; font-family: var(--serif); font-size: 1.2rem; color: var(--verdigris); }
.plan .plan-for { margin: 0 0 0.6rem; color: var(--granite); font-size: 0.92rem; }
.plan ol { margin: 0; padding-left: 1.2rem; }
.plan li { margin: 0.2rem 0; }

/* Two-way comparison (subway vs Me-guru) */
.compare { display: grid; gap: 0.8rem; max-width: var(--wide); margin: 0.6rem 0 1rem; }
@media (min-width: 44rem) { .compare { grid-template-columns: 1fr 1fr; } }
.compare > div { border-top: 3px solid var(--verdigris); padding-top: 0.6rem; }
.compare > div + div { border-top-color: var(--gold); }
.compare h3 { margin: 0 0 0.4rem; }
.compare ul { margin: 0; padding-left: 1.1rem; }
.compare li { margin: 0.25rem 0; }

/* Event notice */
.event-now { max-width: 40rem; border-left: 4px solid var(--gold); background: #fbf7ec; padding: 0.8rem 1rem; margin: 0.8rem 0 1rem; border-radius: 0 6px 6px 0; }
.event-now p { margin: 0 0 0.4rem; }
.event-now p:last-child { margin: 0; }
.event-now[hidden] { display: none; }

/* FAQ */
.faq-list { max-width: var(--measure); }
.faq-list details { border-top: 1px solid var(--rule); padding: 0.2rem 0; }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary { cursor: pointer; font-weight: 700; padding: 0.7rem 0; list-style-position: outside; }
.faq-list details p { margin: 0 0 0.9rem; }

/* Can / can't table */
.seeit td.ok { color: var(--verdigris); font-weight: 700; white-space: nowrap; }
.seeit td.no { color: var(--very-busy); font-weight: 700; white-space: nowrap; }
.seeit { min-width: 0; }

/* Floor plan of Honmaru Palace */
.plan-figure { margin: 1rem 0 0.5rem; padding: 0.8rem; border-radius: 14px; background: #efe9db; max-width: var(--wide); }
.plan-figure img { width: 100%; height: auto; }
.plan-figure figcaption { font-size: 0.85rem; color: var(--granite); margin-top: 0.4rem; }
.rooms { list-style: none; margin: 0.5rem 0 0; padding: 0; max-width: var(--measure); counter-reset: room; }
.rooms > li { counter-increment: room; position: relative; padding: 0.9rem 0 0.9rem 2.6rem; border-top: 1px solid var(--rule); }
.rooms > li::before {
  content: counter(room); position: absolute; left: 0; top: 0.95rem; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--verdigris); color: #fff; font-weight: 700; font-size: 0.85rem; display: grid; place-items: center;
}
.rooms h3 { margin: 0 0 0.2rem; }
.rooms .used { margin: 0 0 0.3rem; font-weight: 700; color: var(--verdigris); font-size: 0.95rem; }
.rooms p { margin: 0 0 0.4rem; }
.rooms p:last-child { margin-bottom: 0; }

/* Sources and the check date at the end of every page */
.checked { margin: 3rem 0 0; padding-top: 1rem; border-top: 1px solid var(--rule); font-size: 0.9rem; color: var(--granite); max-width: var(--measure); }
.checked ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.checked a { color: var(--granite); }
.site-footer .sisters { margin: 0 0 1rem; }
.site-footer .sisters b { display: block; color: var(--ink); margin-bottom: 0.3rem; }
.site-footer .sisters nav { margin-bottom: 0; }
.site-footer p { max-width: var(--measure); }
.breadcrumb { font-size: 0.88rem; color: var(--granite); margin: 1.2rem 0 0; }
.breadcrumb a { color: var(--granite); }

@media (max-width: 767.98px) {
  .board { padding-top: 1.25rem; }
  .board h1 { font-size: 1.75rem; }
  .status-line { margin-top: 0.6rem; }
  .status-word { font-size: 2.3rem; }
  .board .level-note { margin: 0.4rem 0 0; }
  .today-grid li { grid-template-columns: 6rem 1fr; }
}
@media (max-width: 413.98px) { .site-header .brand-name { font-size: 0.95rem; } .hdr-cta { padding: 0.45rem 0.7rem; } }
@media (max-width: 359.98px) { .hdr-cta { display: none; } }

/* Label / value tables (Me-guru, Be GOLD): no minimum width, labels in a narrow column */
table.kv { min-width: 0; }
table.kv th { width: 7.5rem; border-bottom: 1px solid var(--rule); padding-right: 0.9rem; }
@media (max-width: 30rem) { table.kv th { width: 5.6rem; } }
