html {
  --top-bar-height: calc(44px + env(safe-area-inset-top, 0px));
  scroll-padding-top: var(--top-bar-height);
}
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0 12px;
  position: sticky;
  top: 0;
  z-index: 1001;
  padding-top: env(safe-area-inset-top, 0px);
  background: var(--paper);
}
.hagi-return {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-decoration: underline;
  text-underline-offset: .25em;
}
.scene-drawer-open .site-header { visibility: hidden; }
.drawer-head .top-link { flex: none; }
.drawer-head .top-link + div { flex: 1; min-width: 0; }

.temporal-entry {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 18px 0 0;
}
.temporal-entry a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c7c0b5;
  border-radius: 999px;
  padding: 12px 22px;
  min-height: 48px;
  font: inherit;
  cursor: pointer;
  color: #212322;
  text-decoration: none;
}
.temporal-entry .chapter-entry-primary,
#chapter-finder button {
  background: #17191c;
  border: 1px solid #17191c;
  color: #fff;
}
#story-filter-title {
  scroll-margin-top: 18px;
}
#chapter-finder { margin: 12px 0 0; }
#chapter-finder select {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #8a8174;
  border-radius: 11px;
  padding: 8px 32px 8px 12px;
  color: #212322;
  background: #fff linear-gradient(45deg, transparent 50%, #625e56 50%) right 14px center / 7px 7px no-repeat;
  font: inherit;
  font-size: 16px;
  margin-bottom: 5px;
}
#chapter-finder button {
  justify-self: start;
  min-height: 46px;
  padding: 0 16px;
  border-radius: 11px;
  font: inherit;
  cursor: pointer;
}
#chapter-finder [hidden], #section-places[hidden], #section-visits[hidden], #section-scenes[hidden] {
  display: none;
}
.selected-option-label {
  margin: -2px 0 5px;
  color: #625e56;
  font-size: .875rem;
  overflow-wrap: anywhere;
}
.time-person-label:has(.selected-option-label:not([hidden])) { flex-wrap: wrap; }
.time-person-label .selected-option-label { flex: 1 0 100%; min-width: 0; }
#chapter-error {
  color: #743723;
}
.pilgrimage-links { display: flex; flex-wrap: wrap; gap: 8px; }
.pilgrimage-filters { margin: 0 0 16px; }
.pilgrimage-filters summary { min-height: 44px; padding: 10px 0; cursor: pointer; }
.pilgrimage-filters .filter-label { margin: 10px 0 4px; font-size: 14px; }
.place-story-bridge { margin: 14px 0; }
.place-story-bridge h4 { margin: 0 0 8px; }
.place-story-bridge .place-switch { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.place-story-bridge .place-switch small { color: #625e56; }
#shibuya-explorer .time-finder-link { margin: 0; }
#section-filters {
  scroll-margin-top: 18px;
}
#section-place-map {
  scroll-margin-top: 18px;
}
#section-place-map[hidden],
.place-switch[hidden],
#place-region-shortcuts[hidden],
.place-search-empty[hidden],
.place-search-empty button[hidden],
.map-wrap[hidden] {
  display: none;
}
.place-search-form {
  display: grid;
  gap: 5px;
  max-width: 33rem;
  margin: 0 0 14px;
}
.place-search-form label {
  color: #2d332d;
  font-size: 14px;
  font-weight: 700;
}
.place-search-form input {
  width: 100%;
  min-height: 46px;
  padding: 9px 12px;
  border: 1px solid #8a8174;
  border-radius: 11px;
  background: #fff;
  color: #212322;
  font: inherit;
  font-size: 16px;
}
.place-filter-context {
  margin: 0;
  color: #625e56;
  font-size: 12px;
}
.place-switch,
.place-search-empty button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 13px;
  border: 1px solid #85745e;
  border-radius: 999px;
  background: #fff;
  color: #3f352b;
  font: inherit;
  font-size: 13px;
  text-decoration: none;
}
.place-switch {
  margin: 0 0 12px;
}
.place-search-empty {
  padding: 14px 16px;
  margin-bottom: 12px;
  border-radius: 13px;
  background: #eee9e0;
}
.place-search-empty p {
  margin: 0;
  font-size: 14px;
}
.place-search-empty button {
  margin-top: 8px;
  cursor: pointer;
}
.map-search-row .map-search-scene-link {
  min-height: 44px;
}
.map-search-row.is-selected {
  background: #f4e5dc;
  box-shadow: inset 0 0 0 2px #864f38;
}
#map .scene-number-marker,
#map .maplibregl-ctrl-group button {
  min-width: 44px;
  min-height: 44px;
}
#map[hidden] { display: none; }
.map-wrap:has(> #map[hidden]) { min-height: 0; }
#map-fallback:not([hidden]) {
  display: block;
  padding: 16px;
  background: #f1eee7;
}
#map-fallback p { margin: 0 0 8px; }
#map-fallback .place-switch { margin-bottom: 0; }
.scene-card .place-evidence-status {
  margin: 12px 0 0;
  color: #704b36;
  font-size: 13px;
  font-weight: 700;
}
.scene-number-marker.is-selected {
  outline: 3px solid #603522;
  outline-offset: 3px;
  z-index: 2;
}
.scene-card .map-access-note {
  margin: 12px 0 6px;
  padding: 10px 12px;
  border-left: 3px solid #8b5a41;
  border-radius: 6px;
  background: #f5ede3;
  color: #553e31;
  font-size: 13px;
  line-height: 1.6;
}
.map-access-note strong {
  display: block;
  margin-bottom: 3px;
}
.scene-card .map-access-note + .actions {
  margin-top: 8px;
}
.scene-card .actions a[data-external-map],
.scene-card .actions a[data-directions-map] {
  min-height: 44px;
}
#section-place-map :focus-visible,
#section-places :focus-visible {
  outline: 2px solid #315e81;
  outline-offset: 2px;
}
#section-filters .filter-label {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: normal;
  color: #2d332d;
}
.filter-hint {
  margin: 5px 0 12px;
  color: #625e56;
  font-size: 13px;
  line-height: 1.6;
}
#shibuya-explorer[hidden],
#shibuya-explorer [hidden] {
  display: none !important;
}
#shibuya-explorer {
  color: #212322;
  scroll-margin-top: 20px;
}
#shibuya-explorer * {
  min-width: 0;
}
#shibuya-explorer button,
#shibuya-explorer select {
  font-family: inherit;
  font-size: 14px;
  color: inherit;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
}
#shibuya-explorer button {
  border: 1px solid #d4cfc7;
  background: #fff;
  border-radius: 999px;
  padding: 10px 16px;
}
#shibuya-explorer button:disabled {
  opacity: 0.42;
  cursor: default;
}
#shibuya-explorer button:focus-visible,
#shibuya-explorer select:focus-visible,
#shibuya-explorer a:focus-visible,
#shibuya-explorer summary:focus-visible {
  outline: 3px solid #315e81;
  outline-offset: 3px;
}
.time-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.time-heading h2 {
  font:
    400 clamp(28px, 3vw, 40px)/1.4 "Yu Mincho",
    serif;
  margin: 6px 0 0;
}
.time-heading h2:focus {
  outline: 0;
}
.time-scope {
  font-size: 12px;
  color: #77716b;
}

.time-toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 22px 0;
}
.time-person-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #69665f;
}
.time-person-label select {
  -webkit-appearance: none;
  appearance: none;
  max-width: 230px;
  background-color: #fff;
  background-image: linear-gradient(45deg, transparent 50%, #69665f 50%),
    linear-gradient(135deg, #69665f 50%, transparent 50%);
  background-position: right 16px center, right 11px center;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  border: 1px solid #ccc6bc;
  border-radius: 12px;
  padding: 10px 32px 10px 12px;
}
#shibuya-explorer .time-primary {
  background: #1d2522;
  color: #fff;
  border-color: #1d2522;
}
.time-clock {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 20px 0 22px;
  padding: 20px 0;
  border-top: 1px solid #dcd7cf;
  border-bottom: 1px solid #dcd7cf;
}
.time-clock > div > span {
  display: block;
  font-size: 12px;
  color: #737068;
}
.time-clock strong {
  display: block;
  font:
    400 42px/1.25 "Yu Mincho",
    serif;
  letter-spacing: -0.02em;
}
.time-clock p {
  margin: 5px 0 0;
  font-size: 13px;
  color: #68655d;
}
.time-clock nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.time-timeline .time-clock {
  display: block;
  margin: 0 0 10px;
  padding: 10px 0;
}
.time-timeline .time-clock strong {
  font-size: 22px;
}
.time-timeline .time-clock nav {
  flex-direction: row;
  justify-content: flex-start;
  margin-top: 8px;
}
#shibuya-explorer .time-timeline .time-clock button {
  padding: 8px 12px;
  font-size: 12px;
}
.time-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 28px;
  align-items: start;
}
#shibuya-explorer[data-view="scenes"] .time-layout {
  grid-template-columns: minmax(0, 1fr);
}
.time-main {
  min-width: 0;
}
.time-views {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  scroll-margin-top: 16px;
}
#shibuya-explorer .time-views button[aria-selected="true"] {
  background: #222824;
  color: #fff;
  border-color: #222824;
}
.time-views button {
  min-width: 100px !important;
}
.time-main .map-wrap {
  min-height: 330px;
  border-radius: 20px;
}
.time-main #map {
  height: 330px;
}
.time-main .map-note {
  display: none;
}
.time-place-map.has-reference #time-locations {
  margin-bottom: 14px;
}
@media (min-width: 1100px) {
  .time-place-map.has-reference {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    align-items: start;
    gap: 16px;
  }
  .time-place-map.has-reference #time-locations h3 {
    margin-top: 0;
  }
  .time-place-map.has-reference .time-location-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
#time-map-context {
  font-size: 12px;
  color: #716c65;
  line-height: 1.8;
  margin: 10px 0 20px;
}
.time-area-map-caption {
  margin: 0 0 8px;
  color: #625e56;
  font-size: 13px;
  font-weight: 700;
}
#time-location-diagram {
  margin: 0;
  padding: 12px;
  border: 1px solid #d5cfc3;
  border-radius: 16px;
  background: #f7f4ee;
}
#time-location-diagram figcaption {
  margin-bottom: 8px;
  color: #625e56;
  font-size: 13px;
  font-weight: 700;
}
#time-location-diagram ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
#time-location-diagram li {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 76px;
  padding: 8px 10px;
  border: 2px solid transparent;
  border-radius: 9px;
  background: #ebe5d9;
  font-size: 13px;
  line-height: 1.5;
}
#time-location-diagram [data-diagram-place="sea"] {
  background: #e4eceb;
}
#time-location-diagram li:first-child:nth-last-child(3) {
  grid-column: 1 / -1;
  min-height: 56px;
}
#time-location-diagram [aria-current="location"] {
  border-color: #51644c;
}
#time-location-diagram li span {
  margin-top: 3px;
  color: #43533e;
  font-size: 12px;
}
#time-relation-detail {
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 18px;
  background: #f1eee7;
}
.time-relation-kicker {
  margin: 0 0 4px;
  color: #84513c;
  font-size: 13px;
}
#time-relation-title {
  margin: 0;
  font:
    400 23px/1.5 "Yu Mincho",
    serif;
  scroll-margin-top: 46px;
}
.time-relation-scene {
  margin: 14px 0;
  font-size: 14px;
  line-height: 1.7;
}
.time-relation-scene strong {
  display: block;
  color: #6c665e;
  font-size: 12px;
}
#time-relation-detail dl {
  display: grid;
  gap: 4px;
  margin: 12px 0;
  font-size: 14px;
}
#time-relation-detail dl div {
  display: grid;
  grid-template-columns: 3em minmax(0, 1fr);
}
#time-relation-detail dt {
  color: #6c665e;
}
#time-relation-detail dd {
  min-width: 0;
  margin: 0;
  padding-inline-end: .6em;
  line-break: anywhere;
  overflow-wrap: anywhere;
}
.time-relation-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.time-relation-navigation { margin-bottom: 12px; }
#time-relation-detail .time-place-details {
  margin-top: 0;
}
.time-timeline {
  border-left: 1px solid #dcd7cf;
  padding-left: 22px;
  position: sticky;
  top: calc(var(--top-bar-height) + 20px);
}
#time-scenes-panel .time-timeline {
  position: static;
  max-width: 44rem;
  border: 0;
  margin: 0;
  padding: 0;
}
#time-scenes-panel .time-timeline-heading .kicker {
  display: none;
}
#time-scenes-panel #time-list {
  max-height: none;
  overflow: visible;
}
.time-scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-left: 3px solid #9b5c45;
  background: #eee7de;
  padding: 0 12px 12px;
}
#shibuya-explorer #time-scene-return {
  margin: 0 0 10px;
}
.time-timeline-heading h3 {
  font:
    400 26px/1.3 "Yu Mincho",
    serif;
  margin: 6px 0;
}
.time-timeline-heading p {
  font-size: 12px;
  color: #77716a;
  line-height: 1.7;
  margin: 8px 0 14px;
}
#time-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 650px;
  overflow: auto;
  scrollbar-width: thin;
  scroll-padding: 6px;
}
#time-list li {
  border-top: 1px solid #e2ddd5;
}
#shibuya-explorer #time-list li > button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 13px 12px;
  line-height: 1.7;
}
#shibuya-explorer #time-list button[aria-current] {
  border-left-color: #9b5c45;
  background: #eee7de;
}
#time-list time {
  display: block;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  color: #8a4b36;
}
#time-list span {
  display: block;
  font-size: 14px;
}
#time-list small {
  font-size: 11px;
  color: #6f6c66;
}
#time-locations h3,
#time-candidates h3 {
  font-size: 16px;
  line-height: 1.8;
  margin: 18px 0 12px;
}
#time-candidates > p {
  margin: 0 0 10px;
  color: #625e56;
  font-size: 12px;
}
.time-outcome strong {
  margin-right: 8px;
  color: #704b36;
}
.scene-number-marker.is-background-candidate {
  border-style: dashed;
}
.time-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.time-location-grid article {
  border-radius: 16px;
  padding: 16px 18px;
  background: #f0eeea;
}
.time-location-grid h4 {
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 10px;
  font-weight: 600;
}
.time-location-grid h4:focus {
  outline: 2px solid #86553e;
  outline-offset: 4px;
}
.time-location-pin {
  display: inline-block;
  margin-bottom: 5px;
  color: #704b36;
  font-size: 12px;
  font-weight: 600;
}
.time-location-grid p {
  font-size: 13px;
  line-height: 1.9;
  margin: 6px 0;
}
.time-located-people strong {
  font-weight: 500;
}
.is-person {
  background: #e6d5b8;
  box-decoration-break: clone;
}
.time-location-grid small {
  font-size: 12px;
}
.time-place-details {
  font-size: 12px !important;
  margin-top: 10px;
  padding: 8px 12px !important;
}
.time-source-brief,
.time-previous-note,
.time-local-note {
  font-size: 12px;
  line-height: 1.9;
  color: #6c665e;
  margin: 14px 0;
}
.time-source-brief a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #704b36;
}
.time-previous-note {
  background: #f1e9dd;
  border-radius: 12px;
  padding: 12px 16px;
}
.time-error {
  padding: 20px;
  background: #f1e9dd;
  border-radius: 12px;
}
.time-sources {
  margin: 30px 0 24px;
  border-top: 1px solid #dcd7cf;
}
.time-sources summary {
  font-size: 14px;
  padding: 16px 0;
  min-height: 48px;
  cursor: pointer;
}
.time-sources p {
  max-width: 850px;
  font-size: 13px;
  line-height: 1.9;
  color: #67615a;
}
.time-sources a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 13px;
  color: #704b36;
}
.time-graph-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 15px 0 2px;
}
.time-graph-heading h3 {
  font:
    400 24px/1.6 "Yu Mincho",
    serif;
  margin: 0;
}
.time-graph-heading > span {
  font-size: 12px;
  color: #716b62;
}
#time-graph-title {
  scroll-margin-top: 16px;
}
.time-network {
  max-width: 46rem;
  margin: 10px auto 6px;
  padding: 12px;
  border-radius: 20px;
  text-align: center;
}
.time-network-plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  grid-template-rows: repeat(var(--plot-rows), minmax(3.5rem, 1fr));
  align-items: center;
  isolation: isolate;
}
.time-network svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.time-network line,
.time-network polyline {
  fill: none;
  stroke: var(--graph-green);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.time-network .is-current { stroke: var(--graph-gold); stroke-width: 3; }
#time-direction-arrow path { fill: var(--graph-green); }
#time-current-arrow path { fill: var(--graph-gold); }
.time-person-node, .time-edge-label {
  position: relative;
  grid-column: var(--slot-column) / span 2;
  grid-row: var(--slot-row);
  min-width: 0;
  padding: 4px;
}
.time-person-node.central { grid-column: 2 / span 4; }
.time-person-focus {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid #7b9b8a;
  border-radius: 12px;
  background: #223f33;
  color: var(--graph-ink);
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.time-person-focus strong {
  padding-inline: .5em;
  line-break: anywhere;
}
.time-person-focus small { color: var(--graph-muted); }
#shibuya-explorer .time-node-person {
  max-width: 100%;
  padding: 6px 9px;
  border-color: #969c90;
  background: #fdfcf9;
  color: #202c24;
  font-size: .8125rem;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
  line-break: anywhere;
}
.time-node-person span { color: #53614f; }
#shibuya-explorer .time-relation-button {
  max-width: 100%;
  padding: 4px 9px;
  color: #704b36;
  border-color: #c0a48e;
  border-radius: 10px;
  background: #fffaf5;
  font-size: .75rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  line-break: anywhere;
  text-align: center;
}
#shibuya-explorer .time-relation-button.is-current {
  background: #ead7ca;
  border: 2px solid #834c36;
  color: #683521;
  font-weight: 700;
}
.time-graph-note,
.time-graph-key {
  margin: 8px 0 12px;
  color: #625e56;
  font-size: 12px;
  line-height: 1.6;
}
.time-graph-key span {
  display: inline-block;
  margin-left: 8px;
  color: #763f2c;
  font-weight: 700;
}
.time-graph-key .time-graph-other { color: #625e56; }
.time-person-scenes {
  margin: 22px 0 0;
}
.time-person-scenes h3 {
  margin: 0 0 12px;
  font-size: 19px;
  font-weight: 600;
}
.time-scene-relations h4 {
  margin: 12px 0 0;
  font-size: 14px;
}
.time-event-groups .time-scene-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 8px;
  color: #704b36;
}
.time-scene-meta span {
  padding: 2px 7px;
  border: 1px solid #c0a48e;
  border-radius: 6px;
  font-size: 11px;
}
.time-more-scenes {
  margin: 14px 0;
}
.time-more-scenes summary {
  padding: 12px 0;
  cursor: pointer;
  min-height: 44px;
}
.time-battle-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.time-battle-comparison article {
  border-top: 2px solid #b7b9ab;
  padding: 14px 16px;
  background: #f0eeea;
  border-radius: 0 0 14px 14px;
}
.time-battle-comparison article.is-current {
  border-top-color: #86553e;
}
.time-battle-comparison article > p:first-child {
  font-size: 12px;
  color: #7e553e;
  margin: 0 0 10px;
}
.time-battle-comparison h4 {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
  margin: 0 0 10px;
}
.time-battle-comparison p {
  font-size: 14px;
  line-height: 1.8;
  margin: 6px 0;
}
.time-battle-result span {
  display: block;
  color: #72685a;
  font-size: 11px;
  margin: 10px 0 3px;
}
.time-battle-result strong {
  font-weight: 600;
}
.time-event-groups {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.time-event-groups article {
  background: #f1eee7;
  border-radius: 18px;
  padding: 18px 20px;
}
.time-event-groups h4 {
  font-size: 17px;
  line-height: 1.8;
  margin: 0 0 8px;
}
.time-event-groups p {
  font-size: 13px;
  line-height: 1.9;
  margin: 6px 0;
}
.time-actor-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.time-actor-chips span {
  font-size: 14px;
  border: 1px solid #ccc8bf;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fbfaf7;
}
#shibuya-explorer .time-actor-chips button {
  padding: 8px 12px;
  background: #fbfaf7;
}
.time-relation {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.time-relation-list .time-relation {
  margin: 0;
  padding: 8px 0;
  border-bottom: 1px solid #d4cfc7;
}
.time-relation-arrow {
  font-weight: 700;
  color: #51594d;
}
.time-body-note {
  color: #80523c;
}
@media (max-width: 900px) {
  .time-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 20px;
  }
  .time-location-grid {
    grid-template-columns: 1fr;
  }
  .time-timeline {
    padding-left: 14px;
  }
}
@media (max-width: 760px) {
  nav.field-bottom-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .time-heading {
    display: block;
  }
  .time-heading h2 {
    font-size: 27px;
  }
  .time-scope {
    display: block;
    margin-top: 5px;
  }
  .time-toolbar {
    gap: 8px;
    margin: 16px 0;
  }
  .time-person-label {
    width: 100%;
    justify-content: space-between;
  }
  .time-person-label select {
    flex: 1;
    max-width: none;
  }
  .time-clock {
    padding: 14px 0;
    margin: 16px 0;
    gap: 12px;
  }
  .time-clock strong {
    font-size: 34px;
  }
  .time-clock p {
    font-size: 12px;
  }
  .time-clock nav {
    gap: 5px;
    flex-direction: column;
  }
  #shibuya-explorer .time-clock button {
    font-size: 12px;
    padding: 8px 12px;
  }
  .time-layout {
    display: block;
  }
  .time-main .map-wrap,
  .time-main #map {
    height: 300px;
    min-height: 300px;
  }
  .time-location-grid {
    grid-template-columns: 1fr;
  }
  .time-timeline {
    position: static;
    padding: 26px 0 0;
    margin-top: 26px;
    border-left: 0;
    border-top: 1px solid #dcd7cf;
  }
  #time-list {
    max-height: none;
  }
  .time-timeline-heading h3 {
    font-size: 26px;
  }
  .time-graph-heading {
    display: block;
    padding-top: 6px;
  }
  .time-graph-heading h3 {
    font-size: 22px;
  }
  .time-battle-comparison {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .time-battle-comparison article {
    padding: 12px 10px;
  }
  .time-battle-comparison h4 {
    font-size: 14px;
    line-height: 1.7;
  }
  .time-battle-comparison p {
    font-size: 13px;
    line-height: 1.8;
  }
  .time-source-brief {
    margin: 8px 0;
  }
  .time-event-groups article {
    padding: 16px;
  }
  .time-actor-chips span {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #shibuya-explorer {
    scroll-behavior: auto;
  }
}

.place-timeline-source { color: #625e56; font-size: .85rem; margin: 0 0 8px; }
.place-timeline { list-style: none; padding: 0; margin: 0 0 12px; }
.place-timeline li { padding: 10px 0; border-top: 1px solid var(--line, #d7d1c7); }
.place-timeline li p { margin: 4px 0; }
.place-timeline-time { font-weight: 650; font-variant-numeric: tabular-nums; }
.place-timeline .place-switch { display: inline-flex; min-height: 44px; }
#time-place-origin { margin: 10px 0 14px; }
#time-place-origin p { margin: 0 0 4px; }
#time-place-return { min-height: 44px; }

/* The scene graph has its own surface within the light field guide. */
.graph-surface {
  --graph-ink: #f9f7eb;
  --graph-muted: #c6cec2;
  --graph-rule: #4a5f53;
  --graph-gold: #ffd28d;
  --graph-green: #9edac3;
  --graph-opposition: #ffab9c;
  color: var(--graph-ink);
  background: radial-gradient(ellipse at 26% 42%, #29493c, #182d27 63%, #13261f);
}
.scene-graph-stack {
  display: grid;
  gap: 14px;
  margin: 12px 0 0;
}
.scene-graph-title { margin: 0; }
.scene-graph-card {
  border: 1px solid #344f43;
  border-radius: 20px;
  padding: clamp(14px, 2.3vw, 26px);
}
.scene-graph-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 12px;
  margin: 0 0 6px;
  font-size: 13px;
  color: var(--graph-muted);
  font-variant-numeric: tabular-nums;
}
.scene-graph-meta span:first-child { color: var(--graph-gold); font-weight: 700; }
.scene-graph-header h3, .scene-graph-header h4 {
  margin: 0;
  font: 600 clamp(1.15rem, 2.5vw, 1.7rem)/1.4 "Yu Mincho", "Hiragino Mincho ProN", serif;
  overflow-wrap: anywhere;
}
.scene-graph-body { display: grid; gap: 12px; margin-top: 12px; }
.scene-graph-figure { margin: 0; min-width: 0; }
.scene-graph-figure > .scene-graph-caption { margin: 0 0 6px; }
.scene-graph-person-arrow { color: var(--graph-green); white-space: nowrap; }
.scene-graph-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: repeat(var(--scene-rows), minmax(3.5rem, 1fr));
  align-items: center;
  min-width: 0;
  min-height: clamp(155px, 36vw, 222px);
  border: 1px solid var(--graph-rule);
  border-radius: 13px;
  background: linear-gradient(135deg, #14282080, #1b372761);
}
.scene-graph-map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.scene-graph-map marker path { fill: var(--graph-gold); }
.scene-graph-map [data-graph-line] {
  fill: none;
  stroke: var(--edge-ink, #aab8ad);
  stroke-width: 1.6;
  vector-effect: non-scaling-stroke;
}
[data-graph-tone="team"] { --edge-ink: var(--graph-green); }
[data-graph-tone="opposition"] { --edge-ink: var(--graph-opposition); }
[data-graph-tone="directed"] { --edge-ink: var(--graph-gold); }
.scene-graph-map [data-graph-tone="opposition"] { stroke-dasharray: 4 3; }
.scene-graph-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 5px; font-size: 12px; }
.scene-graph-legend span { color: var(--edge-ink); }
.scene-graph-legend span::before { content: "━"; margin-inline-end: 4px; }
.scene-graph-legend [data-graph-tone="opposition"]::before { content: "┄"; }
.scene-graph-legend [data-graph-tone="directed"]::before { content: "→"; }
.scene-graph-map:has(.is-highlighted) [data-graph-line]:not(.is-highlighted) { opacity: .32; }
.scene-graph-map [data-graph-line].is-highlighted { stroke-width: 3.4; }
#shibuya-explorer .scene-graph-node,
#shibuya-explorer .scene-graph-person {
  min-height: 44px;
  padding: 6px 10px;
  color: var(--graph-ink);
  background: #223f33;
  border: 1px solid #7b9b8a;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
  line-break: anywhere;
}
#shibuya-explorer .scene-graph-node {
  position: relative;
  grid-column: 1;
  grid-row: var(--scene-row);
  justify-self: start;
  left: var(--scene-x);
  width: max-content;
  max-width: calc(var(--scene-width) - 8px);
  margin-block: 4px;
  transform: translateX(-50%);
}
.scene-graph-caption, .scene-graph-participants > span, .scene-graph-outcome strong {
  display: block;
  margin-bottom: 5px;
  font-size: 12px;
  font-weight: 700;
  color: var(--graph-muted);
}
.scene-graph-actions ol { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
#shibuya-explorer .scene-graph-actions button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) fit-content(45%);
  align-items: center;
  width: 100%;
  gap: 6px;
  padding: 5px 8px;
  min-height: 44px;
  border: 1px solid var(--graph-rule);
  border-radius: 8px;
  background: #1d352b;
  color: var(--graph-ink);
  text-align: start;
  font-size: 13px;
  line-height: 1.35;
}
#shibuya-explorer .scene-graph-actions button:is(:hover, :focus-visible) {
  border-color: var(--graph-gold);
  background: #314839;
}
.scene-graph-pair { overflow-wrap: anywhere; }
.scene-graph-symbol { margin-inline: .32em; color: var(--graph-green); }
.scene-graph-symbol.is-directed { color: var(--graph-gold); }
.scene-graph-action { color: var(--edge-ink, var(--graph-ink)); font-weight: 700; overflow-wrap: anywhere; }
.scene-graph-participants { margin-top: 12px; }
.scene-graph-participants > div { display: flex; flex-wrap: wrap; gap: 5px; }
.scene-graph-outcome { border-top: 1px solid var(--graph-rule); margin-top: 12px; padding-top: 9px; }
.scene-graph-outcome p, .scene-graph-note, .scene-graph-empty { margin: 0; }
.scene-graph-note, .scene-graph-empty { margin-top: 10px; color: var(--graph-muted); font-size: 14px; }
#shibuya-explorer .graph-surface :focus-visible { outline: 2px solid var(--graph-gold); outline-offset: 2px; }
.time-network.graph-surface .time-graph-note { color: var(--graph-muted); }
.time-graph-heading [data-graph-scene] { margin: 0; }
.place-evidence { margin-inline-start: 8px; color: #625e56; font-size: .8rem; }

@media (min-width: 1120px) {
  .scene-graph-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .scene-graph-map { min-height: 210px; }
}
