:root {
  --paper: #eee8dc;
  --ink: #272820;
  --green: #304e3e;
  --gold: #9b7c45;
  --muted: #797a6b;
  --line: #cec7b7;
  --serif: "Yu Mincho", "游明朝", YuMincho, serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.8 "Yu Gothic", Meiryo, sans-serif; letter-spacing: .035em; }
html[lang="en"] body { font-family: Arial, sans-serif; letter-spacing: 0; }
html[lang="en"] { --serif: Georgia, serif; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; border-radius: 0; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
button:disabled { cursor: default; opacity: .35; }
img { display: block; max-width: 100%; }
p, h1, h2, h3 { margin-top: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1440px; margin: auto; padding: 25px 40px; border-bottom: 1px solid var(--line); }
.wordmark { display: flex; gap: 20px; align-items: baseline; font-family: var(--serif); font-size: 22px; }
.wordmark small { color: var(--muted); font-size: 10px; }
.head-right { display: flex; align-items: center; gap: 35px; font-size: 11px; }
.head-right > a:hover { text-decoration: underline; }
.language-switch { display: flex; align-items: center; gap: 6px; }
.language-switch button { border: 0; background: none; min-height: 44px; padding: 5px 8px; font-size: 11px; color: var(--muted); }
.language-switch button[aria-pressed="true"] { color: var(--green); text-decoration: underline; text-underline-offset: 6px; }
main { width: min(1320px, calc(100% - 80px)); margin: auto; }
.intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding: 55px 0 30px; }
.eyebrow { font-size: 10px; letter-spacing: .14em; color: var(--gold); margin-bottom: 18px; }
h1 { font-size: clamp(34px, 3.9vw, 57px); line-height: 1.5; letter-spacing: .06em; margin-bottom: 18px; }
.intro-text { font-size: 14px; color: #666b5d; max-width: 680px; margin-bottom: 0; }
.progress-summary { width: 280px; min-width: 0; max-width: 100%; border-left: 1px solid var(--line); padding-left: 25px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; flex-shrink: 0; }
.progress-summary p { font-size: 10px; display: flex; justify-content: space-between; gap: 20px; margin: 4px 0; }
.progress-summary strong { font: 16px Georgia, serif; color: var(--green); white-space: nowrap; }
.review-note { background: #e1dfce; border-left: 2px solid var(--gold); padding: 14px 20px; font-size: 11px; color: #686b5d; margin-bottom: 25px; }
.explore-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 25px; }
.mode-switch { display: flex; border: 1px solid var(--green); }
.mode-switch button { min-height: 46px; border: 0; background: none; padding: 10px 25px; color: var(--green); font-size: 12px; }
.mode-switch button[aria-pressed="true"] { background: var(--green); color: #f7f1e5; }
.toolbar-hint { margin: 0; font-size: 10px; color: var(--muted); }
.explore-stage { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(270px, 1fr); gap: 35px; }
.photo-column { min-width: 0; }
.room-overline { display: flex; align-items: center; gap: 18px; font-size: 11px; margin-bottom: 12px; }
#room-position { font: 17px Georgia, serif; color: var(--green); }
#room-floor { font: 12px Georgia, serif; border-left: 1px solid var(--line); padding-left: 18px; }
.estimate { margin-left: auto; font-size: 10px; color: var(--muted); }
.photo-frame { height: clamp(360px, 36vw, 590px); background: #ddd8cb; position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.photo-surface { position: relative; max-width: 100%; max-height: 100%; }
#main-photo { width: auto; max-width: 100%; height: auto; max-height: clamp(360px, 36vw, 590px); object-fit: contain; }
.photo-surface.is-changing { animation: photo-in .35s ease both; }
@keyframes photo-in { from { opacity: .4; transform: scale(.995); } to { opacity: 1; transform: scale(1); } }
.photo-points { position: absolute; inset: 0; }
.hotspot { position: absolute; transform: translate(-50%, -50%); min-width: 48px; min-height: 48px; background: #f3ecdbed; border: 1px solid var(--gold); color: var(--green); padding: 8px; box-shadow: 0 2px 8px #0002; display: flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; }
.hotspot.discovery { border-radius: 3px; }
.hotspot.found:after { content: "✓"; position: absolute; right: -4px; top: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--green); color: white; font-size: 10px; display: grid; place-items: center; }
.image-loading { position: absolute; left: 16px; bottom: 12px; background: var(--paper); font-size: 11px; padding: 5px 10px; }
.photo-caption { display: flex; justify-content: space-between; align-items: baseline; gap: 15px; font-size: 10px; color: var(--muted); margin-top: 12px; }
.photo-caption p { margin: 0; }
.photo-caption span { font-size: 9px; }
.walk-nav { display: flex; justify-content: space-between; align-items: center; margin: 20px 0 0; border-top: 1px solid var(--line); padding-top: 15px; }
.walk-nav button { min-height: 48px; min-width: 130px; display: flex; align-items: center; justify-content: space-between; gap: 18px; color: var(--green); background: none; border: 1px solid var(--line); padding: 9px 14px; font-size: 12px; }
.walk-nav p { margin: 0; font: 13px Georgia, serif; color: var(--muted); }
.room-panel { border-left: 1px solid var(--line); padding-left: 30px; padding-top: 32px; min-width: 0; }
.room-label { font-size: 10px; color: var(--gold); margin-bottom: 10px; }
.room-panel h2 { font-size: 28px; line-height: 1.5; margin-bottom: 15px; }
#room-description { font-size: 12px; line-height: 1.9; color: #666b5e; }
.visited-label { font-size: 10px; color: var(--green); margin: 18px 0 25px; }
.map-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.map-heading h3 { font: 11px "Yu Gothic", Arial, sans-serif; margin: 0 0 12px; }
.map-heading > span { font-size: 8px; color: var(--muted); }
.floor-tabs { display: flex; border-bottom: 1px solid var(--green); }
.floor-tabs button { min-height: 44px; flex: 1; border: 0; background: none; color: var(--muted); font: 12px Georgia, serif; }
.floor-tabs button[aria-selected="true"] { background: var(--green); color: white; font-weight: 700; border-bottom: 3px solid var(--gold); }
.floor-map { background: #f9f6ef; padding: 18px 30px 18px; min-height: 160px; display: flex; align-items: center; justify-content: center; }
.floor-map-inner { position: relative; width: 160px; max-width: 100%; }
#floor-map-image { width: 100%; height: auto; }
#map-points { position: absolute; inset: 0; }
.map-point { position: absolute; transform: translate(-50%, -50%); width: 48px; height: 48px; padding: 0; background: none; border: 0; display: grid; place-items: center; z-index: 1; }
.map-point > span { position: relative; display: flex; align-items: center; justify-content: center; gap: 1px; width: 32px; height: 27px; border-radius: 14px; background: #f5eddb; border: 1px solid var(--green); color: var(--green); font: 8px Arial, sans-serif; box-shadow: 0 1px 3px #0002; }
.map-point svg { width: 15px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.map-point b { font-weight: 400; }
.map-point-status { position: absolute; right: -3px; top: -8px; font: 9px/13px Arial, sans-serif; background: var(--paper); color: var(--green); min-width: 12px; border-radius: 50%; }
.map-point-status:empty { display: none; }
.map-point[aria-pressed="true"] { z-index: 2; }
.map-point[aria-pressed="true"] > span { background: var(--green); color: #fff8e6; outline: 2px solid var(--gold); outline-offset: 2px; }
.map-point.is-visited:not([aria-pressed="true"]) > span { border-width: 2px; }
.map-note { color: var(--muted); font-size: 9px; line-height: 1.7; margin: 10px 0 18px; }
.primary-button { width: 100%; min-height: 48px; border: 1px solid var(--green); background: var(--green); color: white; font-size: 12px; padding: 10px 18px; margin-bottom: 15px; }
.room-uses { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 18px; }
.room-uses p { font-size: 10px; margin-bottom: 8px; color: var(--muted); }
.room-uses a { display: block; color: var(--green); font-size: 12px; text-decoration: underline; text-underline-offset: 5px; line-height: 1.9; padding-bottom: 10px; }
.room-uses p.small { font-size: 9px; }
.explore-stage.map-view { grid-template-columns: minmax(0, 1fr) minmax(400px, 1.2fr); }
.map-view .photo-frame { height: 330px; }
.map-view #main-photo { max-height: 330px; }
.map-view .room-panel { display: grid; grid-template-columns: 1fr; padding-top: 0; }
.map-view .map-heading { margin-top: 18px; }
.map-view .floor-map { padding-inline: 48px; }
.map-view .floor-map-inner { width: 210px; }
.map-view .room-panel h2 { font-size: 25px; }
.map-view .room-uses { display: none; }
.details-section, .route-section { margin-top: 70px; padding-top: 45px; border-top: 1px solid var(--line); }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 28px; }
.section-title h2 { font-size: 31px; margin-bottom: 0; }
.section-title .eyebrow { margin-bottom: 12px; }
.section-title > p { font-size: 11px; color: var(--muted); margin-bottom: 0; }
.discovery-list { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.discovery-item { background: none; border: 1px solid var(--line); color: var(--muted); min-height: 88px; padding: 14px 10px; display: flex; gap: 9px; align-items: center; text-align: left; }
.discovery-item > span { color: var(--gold); font-size: 23px; }
.discovery-item strong { display: block; font-size: 11px; font-weight: 400; }
.discovery-item small { display: block; font-size: 8px; margin-top: 4px; }
.discovery-item.is-found { background: #dce2d6; border-color: #8d9c86; color: var(--green); }
.discovery-item:disabled { opacity: .7; }
.route-list { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.route-list li { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.route-list button { width: 100%; min-height: 84px; display: grid; grid-template-columns: 25px 1fr; align-items: center; gap: 2px 12px; text-align: left; padding: 15px; background: none; border: 0; color: var(--ink); }
.route-list button[aria-current="location"] { background: var(--green); color: #fff8e6; }
.route-number { font: 15px Georgia, serif; color: var(--gold); grid-row: 1 / 3; }
.route-room { font-family: var(--serif); font-size: 15px; }
.route-state { font-size: 8px; opacity: .75; }
.bottom-note { font-size: 10px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 25px; margin: 40px 0; }
footer { border-top: 1px solid var(--line); padding: 25px 0 35px; display: flex; align-items: center; justify-content: space-between; gap: 25px; font-size: 11px; }
footer > span { font-size: 9px; color: var(--muted); }
dialog { width: min(850px, calc(100% - 40px)); max-height: calc(100svh - 40px); padding: 28px; color: var(--ink); background: var(--paper); border: 1px solid var(--gold); overflow-y: auto; }
dialog::backdrop { background: #18251fd9; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 25px; }
.dialog-head .eyebrow { margin-bottom: 6px; }
.dialog-head h2 { font-size: 27px; margin-bottom: 20px; }
#close-dialog { min-width: 48px; min-height: 48px; background: none; color: var(--green); font-size: 29px; border: 1px solid var(--line); }
#detail-photo { width: 100%; max-height: 58svh; object-fit: contain; background: #ddd8cb; }
#dialog-description { font-size: 14px; margin: 22px 0 10px; }
dialog .small { color: var(--muted); font-size: 10px; }
.dialog-found { color: var(--green); font-size: 11px; border-top: 1px solid var(--line); margin-bottom: 0; padding-top: 12px; }
[hidden] { display: none !important; }
#main-photo { width: 100%; height: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }
.skip { position: fixed; left: 20px; top: -100px; z-index: 30; background: var(--paper); padding: 10px 20px; }
.skip:focus { top: 10px; }
@media(max-width:1100px) { .site-head { padding-inline: 25px; } main { width: calc(100% - 50px); } .explore-stage { grid-template-columns: minmax(0, 1.7fr) minmax(250px, 1fr); gap: 25px; } .room-panel { padding-left: 22px; } .discovery-list { grid-template-columns: repeat(3, 1fr); } .explore-stage.map-view { grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); } .head-right { gap: 20px; } }
@media(max-width:800px) { .wordmark { display: block; font-size: 20px; } .wordmark small { display: block; margin-top: 4px; } .intro { padding-top: 35px; display: block; } .progress-summary { margin-top: 25px; border-left: 0; padding: 0; display: flex; gap: 25px; min-width: 0; } .progress-summary p { gap: 12px; align-items: center; } .progress-icon { display: none; } .explore-toolbar { display: block; } .toolbar-hint { margin-top: 12px; } .explore-stage, .explore-stage.map-view { display: flex; flex-direction: column; gap: 25px; } .room-panel { border: 0; padding: 0; } .photo-frame { height: 440px; } #main-photo { max-height: 440px; } .room-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 0 25px; } .room-panel > .room-label, .room-panel > h2, #room-description, #room-visited { grid-column: 1; } .map-heading, .floor-tabs, .floor-map, .map-note { grid-column: 2; } .map-heading { grid-row: 1; } .floor-tabs { grid-row: 2; } .floor-map { grid-row: 3 / 6; } .map-note { grid-row: 6; } .room-uses { grid-column: 1; grid-row: 5 / 8; } .map-view .room-panel { display: flex; flex-direction: column; } .map-view .floor-map { max-width: 520px; width: 100%; margin: auto; } .map-view .photo-column { order: 2; } .map-view .room-panel { order: 1; } .map-view #room-visited { display: none; } .map-view .room-panel h2 { margin-bottom: 6px; } .map-view .photo-frame, .map-view #main-photo { max-height: 380px; } .route-list { grid-template-columns: repeat(3, 1fr); } }
@media(max-width:550px) { .site-head { padding: 18px 20px; align-items: start; gap: 12px; } .wordmark { font-size: 18px; line-height: 1.6; } .wordmark small { font-size: 9px; } .head-right { display: block; text-align: right; } .head-right > a { font-size: 9px; } .language-switch { gap: 0; justify-content: flex-end; } .language-switch button { font-size: 10px; padding: 4px 5px; } main { width: calc(100% - 40px); } .intro { padding-top: 32px; } h1 { font-size: clamp(27px, 7.5vw, 38px); letter-spacing: .025em; line-height: 1.6; } .intro-text { font-size: 12px; line-height: 1.9; } .eyebrow { font-size: 9px; margin-bottom: 16px; } .progress-summary { gap: 22px; margin-top: 22px; } .progress-summary p { font-size: 9px; } .progress-summary strong { font-size: 16px; } .review-note { font-size: 10px; line-height: 1.8; padding: 13px 15px; } .mode-switch { width: 100%; } .mode-switch button { flex: 1; padding: 10px 12px; font-size: 12px; } .toolbar-hint { font-size: 9px; } .photo-frame { height: 330px; } #main-photo { max-height: 330px; } .room-overline { gap: 12px; } #room-position { font-size: 16px; } #room-floor { padding-left: 12px; } .estimate { font-size: 8px; } .photo-caption { display: block; font-size: 10px; } .photo-caption span { display: block; font-size: 8px; margin-top: 3px; } .walk-nav { margin-top: 15px; } .walk-nav button { min-width: 110px; padding-inline: 11px; font-size: 11px; gap: 10px; } .walk-nav p { font-size: 11px; } .room-panel { display: block; } .room-panel h2 { font-size: 30px; } #room-description { font-size: 13px; } .visited-label { margin-bottom: 24px; } .map-heading h3 { font-size: 12px; } .map-heading > span { font-size: 9px; } .floor-map { min-height: 190px; padding-inline: 44px; } .map-note { font-size: 10px; } .room-uses { margin-top: 25px; } .room-uses p { font-size: 11px; } .room-uses a { font-size: 13px; } .room-uses p.small { font-size: 10px; } .map-view .floor-map { padding-inline: 36px; } .map-view .photo-frame { height: 300px; } .map-view #main-photo { max-height: 300px; } .section-title { display: block; } .section-title h2 { font-size: 28px; } .section-title > p { margin-top: 17px; font-size: 11px; } .details-section, .route-section { margin-top: 45px; padding-top: 30px; } .discovery-list { grid-template-columns: repeat(2, 1fr); gap: 10px; } .discovery-item { min-height: 80px; padding: 12px; } .discovery-item strong { font-size: 11px; } .discovery-item small { font-size: 9px; } .route-list { grid-template-columns: repeat(2, 1fr); } .route-list button { min-height: 85px; padding: 12px; gap: 4px 9px; grid-template-columns: 20px 1fr; } .route-room { font-size: 15px; } .route-state { font-size: 9px; } .bottom-note { font-size: 10px; } footer { align-items: start; display: block; } footer > span { display: block; margin-top: 10px; } dialog { width: calc(100% - 24px); max-height: calc(100svh - 24px); padding: 20px; } .dialog-head h2 { font-size: 25px; } .dialog-head .eyebrow { font-size: 9px; } #detail-photo { max-height: 50svh; } #dialog-description { font-size: 13px; } }
@media(max-width:350px) { main { width: calc(100% - 30px); } .site-head { padding-inline: 15px; } .wordmark { font-size: 16px; } .progress-summary { gap: 15px; } .progress-summary p { gap: 8px; } .walk-nav button { min-width: 102px; padding-inline: 8px; } .photo-frame { height: 290px; } #main-photo { max-height: 290px; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior: auto; } *, *:before, *:after { animation: none !important; transition: none !important; } }

/* Tour v2: semantic progress and labels sized by content, not narrow icon columns. */
.intro .progress-summary { display: grid; grid-template-columns: minmax(0, 1fr); writing-mode: horizontal-tb; gap: 14px; }
.progress-item { min-width: 0; }
.progress-line { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; min-width: 0; }
.progress-line > span { font-size: 13px; line-height: 1.6; white-space: normal; overflow-wrap: normal; }
.progress-line > strong { font-size: 18px; flex-shrink: 0; }
.progress-item progress { display: block; width: 100%; height: 6px; margin-top: 8px; border: 0; border-radius: 0; accent-color: var(--green); background: #c7c4b5; }
.progress-item progress::-webkit-progress-bar { background: #c7c4b5; }
.progress-item progress::-webkit-progress-value { background: var(--green); }
.progress-item progress::-moz-progress-bar { background: var(--green); }
.photo-points { pointer-events: none; }
.hotspot.discovery { pointer-events: auto; transform: none; width: max-content; max-width: min(220px, calc(100% - 16px)); min-width: 0; min-height: 48px; padding: 10px 13px; gap: 8px; border: 1px solid var(--gold); border-radius: 3px; font: 14px/1.5 "Yu Gothic", Arial, sans-serif; white-space: normal; text-align: left; }
.hotspot.discovery > span:first-child { font: 23px/1 Arial, sans-serif; flex-shrink: 0; }
.hotspot.discovery > span:last-child { min-width: 0; overflow-wrap: normal; }
.discovery-item { min-width: 0; }
.discovery-item strong { font-size: 13px; line-height: 1.7; }
.discovery-item small { font-size: 11px; line-height: 1.6; }
.discovery-item > div { min-width: 0; }
@media(max-width: 800px) {
  .intro .progress-summary { width: min(100%, 380px); max-width: 100%; padding: 0; border-left: 0; margin-top: 25px; }
}
@media(max-width: 550px) {
  .progress-line > span { font-size: 14px; }
  .progress-line > strong { font-size: 18px; }
  .walk-nav { gap: 10px; }
  .walk-nav button { min-width: 0; flex: 1; font-size: 12px; }
  .walk-nav p { flex-shrink: 0; }
  .hotspot.discovery { max-width: min(210px, calc(100% - 16px)); font-size: 14px; }
}

/* v3: links only; existing tour state remains untouched. */
.explore-exit-links{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 25px}.explore-exit-links a{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:10px 16px;border:1px solid var(--green);border-radius:3px;color:var(--ink);text-decoration:none;font:14px/1.7 var(--sans,Arial,sans-serif)}.explore-exit-links a:hover{background:var(--green);color:var(--paper)}#route-list{scroll-margin-top:30px}

/* v4: clearer heading hierarchy on this page only — titles read as titles, supporting text recedes. */
.explore-page .eyebrow { font-weight: 700; }
.explore-page .room-panel h2 { font-weight: 600; position: relative; padding-bottom: 14px; margin-bottom: 20px; }
.explore-page .room-panel h2::after { content: ''; position: absolute; left: 0; bottom: 0; width: 34px; height: 2px; background: var(--gold); }
.explore-page .section-title h2, .explore-page .route-heading h2 { font-weight: 600; }
.explore-page #room-description { font-size: 13px; }
