:root {
  --navy: #172b40;
  --navy-light: #29465f;
  --cream: #f4f0e5;
  --paper: #fffdf7;
  --ink: #17232e;
  --muted: #5e6b74;
  --gold: #9a7840;
  --line: #d8d5cc;
  --normal: #176647;
  --delayed: #914226;
}

* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #e7ebeb 0, var(--cream) 440px);
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, sans-serif;
  line-height: 1.7;
}
body.dialog-open { overflow: hidden; }
a { color: var(--navy); text-underline-offset: .22em; }
.shell { width: min(1120px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2000; left: 12px; top: -80px; background: white; padding: 12px; }
.skip-link:focus { top: 12px; }
.site-header {
  padding: calc(32px + env(safe-area-inset-top)) 0 76px;
  color: white;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  border-bottom: 4px solid var(--gold);
}
.section-label { margin: 0; color: #d7c18f; font-size: .75rem; font-weight: 800; letter-spacing: .16em; }
.site-header h1 { margin: 7px 0 0; font-size: clamp(1.75rem, 4.5vw, 2.75rem); line-height: 1.35; }
.header-credit { max-width: 780px; margin: 12px 0 0; color: #e4e9ec; font-size: clamp(.95rem, 2vw, 1.05rem); font-weight: 700; }
.header-intro { max-width: 730px; margin: 15px 0 0; color: #e4e9ec; font-size: 1.05rem; }
.main { margin-top: -40px; padding-bottom: 64px; }
.home-page, .location-page { min-height: 100vh; }
.home-header { padding-bottom: 92px; }
.location-selector { padding: clamp(24px, 5vw, 46px); background: var(--paper); border: 1px solid #fff; border-radius: 18px; box-shadow: 0 18px 50px #172b4015; }
.selector-heading { max-width: 720px; }
.selector-heading .section-label, .map-heading .section-label { color: var(--gold); }
.selector-heading h2 { margin: 5px 0 0; font-size: clamp(1.45rem, 3.5vw, 2.1rem); line-height: 1.45; }
.selector-heading p:last-child { margin: 10px 0 0; color: var(--muted); }
.location-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 18px; margin-top: 28px; }
.location-card { position: relative; display: flex; height: 132px; min-height: 132px; align-items: center; gap: 18px; padding: 14px; color: var(--ink); background: #f3f1e9; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.location-card:hover { border-color: var(--gold); box-shadow: 0 12px 28px #172b4014; transform: translateY(-2px); }
.location-card.is-preparing { cursor: default; }
.location-card.is-preparing:hover { border-color: var(--line); box-shadow: none; transform: none; }
.location-card:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.location-card-main { display: grid; gap: 7px; }
.location-card.is-closed .location-card-main { gap: 4px; }
.location-card-main strong { color: var(--navy); font-size: clamp(1.25rem, 3vw, 1.55rem); line-height: 1.4; }
.location-card-main small { color: var(--muted); font-size: .9rem; font-weight: 750; }
.location-card-action { position: absolute; top: 50%; right: 14px; flex: none; color: var(--navy); font-weight: 850; white-space: nowrap; transform: translateY(-50%); }
.location-card-action::after { content: " ›"; color: var(--gold); font-size: 1.3em; }
.location-card.is-preparing .location-card-action { color: var(--muted); }
.location-card.is-preparing .location-card-action::after { content: ""; }
.location-card-content { display: flex; min-width: 0; height: 100%; flex: 1; align-items: center; padding-right: 92px; }
.location-thumbnail { position: relative; display: grid; flex: 0 0 120px; width: 120px; height: 76px; overflow: hidden; place-items: center; color: #56636b; background: #d8dfdf; border-radius: 9px; font-size: .75rem; font-weight: 800; text-align: center; }
.location-thumbnail-image { width: 100%; height: 100%; object-fit: cover; }
.location-thumbnail-locked { position: absolute; inset: 0; display: grid; place-items: center; padding: 8px; background: linear-gradient(135deg, #dce2e1, #c6d0d1); }
.consent-ok .location-thumbnail-locked { display: none; }
.location-thumbnail-empty { padding: 8px; }
.location-thumbnail-closed { display: grid; width: 100%; height: 100%; place-items: center; padding: 8px; color: #654d20; background: #f2e8cc; font-size: .88rem; }
.location-thumbnail-upcoming { display: grid; width: 100%; height: 100%; place-items: center; padding: 8px; color: #31526c; background: #e1edf5; font-size: .88rem; line-height: 1.5; }
.location-upcoming-label { justify-self: start; color: #31526c; font-size: .9rem; font-weight: 900; line-height: 1.4; }
.location-closed-days { justify-self: start; color: #6c5b36 !important; font-size: .82rem !important; line-height: 1.4; white-space: nowrap; }
.location-header { padding-bottom: 76px; }
.breadcrumb { display: inline-flex; min-height: 44px; align-items: center; color: white; font-weight: 800; }
.location-site-name { margin: 18px 0 0; color: #d7c18f; font-size: .85rem; font-weight: 800; letter-spacing: .05em; }
.location-header h1 { margin-top: 3px; }
.map-section { margin-top: 28px; padding: clamp(22px, 4vw, 34px); background: #eef0ec; border: 1px solid var(--line); border-radius: 16px; }
.map-heading { max-width: 760px; margin-inline: auto; }
.map-heading h2 { margin: 4px 0 0; color: var(--navy); font-size: clamp(1.3rem, 3vw, 1.75rem); }
.map-placeholder { display: flex; max-width: 760px; min-height: 220px; margin: 20px auto 0; align-items: center; justify-content: center; flex-direction: column; gap: 8px; padding: 30px; color: var(--muted); background: repeating-linear-gradient(45deg, #f7f5ee, #f7f5ee 16px, #efede5 16px, #efede5 32px); border: 1px dashed #a9aaa5; border-radius: 14px; text-align: center; }
.map-placeholder strong { color: var(--navy); font-size: 1.25rem; }
.map-placeholder span { font-weight: 700; }
.not-found-card { padding: clamp(25px, 5vw, 48px); background: var(--paper); border-radius: 16px; box-shadow: 0 18px 50px #172b4015; }
.not-found-card h2 { margin-top: 0; }
.primary-link { display: inline-flex; min-height: 48px; margin-top: 12px; align-items: center; padding: 8px 18px; color: white; background: var(--navy); border-radius: 9px; font-weight: 850; text-decoration: none; }
.notice { display: flex; gap: 16px; padding: 17px 20px; background: #fff9e9; border: 1px solid #dfca93; border-radius: 12px; box-shadow: 0 10px 30px #172b4010; }
.notice strong { flex: none; color: #6f5223; }
.special-closure-notice { margin-bottom: 24px; border-width: 2px; }
.special-closure-notice span { font-weight: 800; }
.camera-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr)); gap: 28px; }
.camera-followup-notice { margin-top: 24px; }
.location-guide { max-width: 760px; margin: 24px auto 0; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px #172b4012; }
.location-guide img { display: block; width: 100%; height: auto; }
.location-guide figcaption { padding: 12px 18px; color: var(--navy); font-weight: 850; text-align: center; }
.camera-card { overflow: hidden; background: var(--paper); border: 1px solid #fff; border-radius: 18px; box-shadow: 0 18px 50px #172b4015; }
.camera-media { position: relative; display: grid; aspect-ratio: 16 / 9; overflow: hidden; place-items: center; background: #cad2d3; }
.camera-image { width: 100%; height: 100%; object-fit: cover; }
.camera-refresh { position: absolute; z-index: 3; top: 12px; right: 12px; display: inline-flex; min-width: 48px; min-height: 48px; gap: 6px; align-items: center; justify-content: center; padding: 0 15px; color: var(--navy); background: #fffdf7f2; border: 1px solid #ffffff; border-radius: 999px; box-shadow: 0 6px 20px #0f1d2b59; font-size: .95rem; font-weight: 850; text-decoration: none; -webkit-tap-highlight-color: transparent; backdrop-filter: blur(6px); }
.camera-refresh::before { content: "↻"; font-size: 1.35rem; font-weight: 750; line-height: 1; }
.camera-refresh:hover { color: var(--navy); background: white; }
.camera-refresh:active { background: #f1ead9; box-shadow: 0 3px 10px #0f1d2b4d; transform: translateY(1px); }
.camera-refresh:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.camera-closed { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 28px; color: var(--navy); background: linear-gradient(135deg, #eef0ec, #d8dedc); text-align: center; }
.camera-closed strong { font-size: clamp(1.35rem, 3.6vw, 1.8rem); line-height: 1.55; }
.camera-closed span { color: #53636c; font-size: clamp(1.05rem, 2.4vw, 1.2rem); font-weight: 800; line-height: 1.6; }
.camera-upcoming { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 10px; padding: 28px; color: var(--navy); background: linear-gradient(135deg, #eef4f8, #d5e4ee); text-align: center; }
.camera-upcoming strong { font-size: clamp(1.35rem, 3.6vw, 1.8rem); line-height: 1.55; }
.camera-upcoming span { color: #53636c; font-size: clamp(1rem, 2.4vw, 1.15rem); font-weight: 800; line-height: 1.6; }
.image-locked, .image-empty { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: #465761; background: linear-gradient(135deg, #dce2e1, #c6d0d1); font-weight: 700; text-align: center; }
.consent-ok .image-locked { display: none; }
.camera-body { padding: 25px; }
.camera-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.camera-heading h2 { margin: 0; font-size: clamp(1.2rem, 2.5vw, 1.5rem); line-height: 1.45; overflow-wrap: anywhere; }
.status { flex: none; max-width: none; padding: 6px 10px; border-radius: 7px; font-size: .78rem; font-weight: 800; text-align: center; white-space: nowrap; }
.status-normal { color: var(--normal); background: #e3f1e9; }
.status-delayed { color: var(--delayed); background: #fae9df; }
.status-missing { color: #4c5961; background: #e9ecec; }
.status-scheduled { color: #31526c; background: #e1edf5; }
.status-closed { color: #654d20; background: #f2e8cc; font-size: .9rem; }
.status-upcoming { color: #31526c; background: #e1edf5; font-size: .9rem; }
.updated { margin-top: 23px; padding: 17px 20px; background: #f3f1e9; border-left: 4px solid var(--gold); border-radius: 0 10px 10px 0; }
.updated h3 { margin: 0; color: var(--muted); font-size: .85rem; }
.updated time, .updated p { display: block; margin: 2px 0 0; font-size: clamp(1.25rem, 3vw, 1.7rem); font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: .015em; line-height: 1.5; }
.site-footer { padding: 28px 0 calc(30px + env(safe-area-inset-bottom)); color: #52616a; background: #e7e4da; border-top: 1px solid #d2cfc5; font-size: .85rem; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-row nav { display: flex; gap: 20px; flex-wrap: wrap; }
.noscript-warning { padding: 16px; color: #702f21; background: #fff; border: 2px solid #a94e36; }
.inline-policies { margin-top: 46px; padding: clamp(24px, 5vw, 48px); background: var(--paper); border: 1px solid var(--line); border-radius: 16px; }
.mobile-policy-section > summary { display: none; }
.mobile-policy-section:not([open]) > .policy-copy { display: block; }
.mobile-policy-section + .mobile-policy-section { margin-top: 42px; padding-top: 34px; border-top: 2px solid var(--gold); }
.policy-copy h2 { margin: 0 0 14px; font-size: clamp(1.2rem, 2.5vw, 1.45rem); line-height: 1.5; }
.policy-copy h3 { margin: 28px 0 8px; color: var(--navy); font-size: 1.08rem; line-height: 1.55; }
.policy-copy p { margin: 12px 0 0; }
.policy-copy ul { margin: 12px 0 0; padding-left: 1.5em; }
.policy-copy li + li { margin-top: 7px; }
.policy-copy hr { margin: 32px 0 24px; border: 0; border-top: 1px solid var(--line); }
.consent-overlay { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 20px; background: #0f1d2be8; backdrop-filter: blur(10px); }
.consent-overlay[hidden] { display: none; }
.consent-dialog { width: min(620px, 100%); max-height: calc(100dvh - 40px); overflow: auto; padding: clamp(25px, 5vw, 42px); background: var(--paper); border-radius: 18px; box-shadow: 0 30px 100px #0007; }
.gold-rule { width: 44px; height: 4px; margin-bottom: 20px; background: var(--gold); border-radius: 4px; }
.consent-dialog .section-label { color: var(--gold); }
.consent-dialog h2 { margin: 4px 0 0; font-size: clamp(1.4rem, 4vw, 1.9rem); }
.consent-dialog p { color: #4b5b65; }
.consent-policy-links { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.consent-policy-links a { display: inline-flex; min-height: 44px; align-items: center; padding: 7px 12px; background: #ece8db; border: 1px solid #c9bea5; border-radius: 8px; font-weight: 800; }
.policy-previews { display: flex; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.policy-popover { position: relative; }
.policy-popover summary { display: inline-flex; min-height: 44px; align-items: center; padding: 7px 12px; color: var(--navy); background: #ece8db; border: 1px solid #c9bea5; border-radius: 8px; font-weight: 800; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; list-style: none; }
.policy-popover summary::-webkit-details-marker { display: none; }
.popover-panel { display: none; position: fixed; z-index: 1200; top: 50%; left: 50%; width: min(720px, calc(100% - 40px)); max-height: min(70dvh, 680px); overflow: auto; padding: clamp(22px, 4vw, 36px); color: var(--ink); background: var(--paper); border: 2px solid var(--gold); border-radius: 14px; box-shadow: 0 28px 90px #0008; transform: translate(-50%, -50%); }
.policy-popover[open] .popover-panel { display: block; }
.policy-popover.is-dismissed .popover-panel { display: none !important; }
.policy-close { position: sticky; z-index: 1; top: 0; float: right; width: 44px; height: 44px; margin: 0 0 12px 18px; padding: 0; color: white; background: var(--navy); border: 0; border-radius: 50%; font: inherit; font-size: 1.65rem; font-weight: 500; line-height: 1; cursor: pointer; }
.policy-close:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (hover: hover) {
  .policy-popover:hover .popover-panel, .policy-popover:focus-within .popover-panel { display: block; }
}
.consent-check { display: flex; gap: 12px; min-height: 56px; padding: 14px; align-items: flex-start; background: #eeece4; border-radius: 9px; cursor: pointer; font-weight: 750; }
.consent-check input { flex: 0 0 24px; width: 24px; height: 24px; margin: 1px 0 0; accent-color: var(--navy); }
.consent-button { width: 100%; min-height: 52px; margin-top: 15px; padding: 10px; color: white; background: var(--navy); border: 0; border-radius: 9px; font: inherit; font-weight: 850; cursor: pointer; }
.consent-button:disabled { color: #f4f4f4; background: #9da5a8; cursor: not-allowed; }
.legal-page { background: var(--cream); }
.legal-header { padding: calc(18px + env(safe-area-inset-top)) 0 18px; color: white; background: var(--navy); border-bottom: 3px solid var(--gold); }
.legal-header a { display: inline-flex; min-height: 44px; align-items: center; color: white; font-weight: 800; }
.legal-main { max-width: 860px; padding-block: 45px 70px; }
.legal-main article { padding: clamp(24px, 5vw, 54px); background: var(--paper); border-radius: 16px; box-shadow: 0 14px 45px #172b4011; }
.legal-main .section-label { color: var(--gold); }
.legal-main h1 { margin: 5px 0 25px; font-size: clamp(1.8rem, 5vw, 2.5rem); }
.legal-main h2 { margin: 34px 0 6px; padding-top: 5px; font-size: 1.2rem; border-top: 1px solid var(--line); }
.legal-main .policy-copy h2 { margin-top: 0; border-top: 0; }
.legal-lead { font-weight: 700; }
.back-link { margin: 30px 0 0; }
.back-link a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 800; }

@media (max-width: 640px) {
  .shell { width: min(100% - 24px, 1120px); }
  .site-header { padding-bottom: 62px; }
  .header-intro { font-size: .96rem; }
  .main { margin-top: -30px; padding-bottom: 42px; }
  .home-header { padding-bottom: 72px; }
  .location-selector { padding: 24px 17px; border-radius: 14px; }
  .location-grid { gap: 12px; margin-top: 22px; }
  .location-card { height: 132px; min-height: 132px; padding: 18px 16px; }
  .location-thumbnail { display: none; }
  .location-card-content { width: 100%; }
  .location-card-action { right: 16px; }
  .location-card-action { font-size: .9rem; }
  .map-section { padding: 20px 14px; }
  .notice { display: block; padding: 14px 16px; }
  .notice strong { display: block; }
  .camera-grid { gap: 18px; margin-top: 18px; }
  .camera-card { border-radius: 14px; }
  .camera-refresh { top: 10px; right: 10px; }
  .camera-card[data-camera-id="kita-shinti"] .camera-refresh { top: auto; right: 10px; bottom: 10px; left: auto; }
  .camera-body { padding: 20px 17px; }
  .camera-heading { display: block; }
  .status { display: inline-block; margin-top: 11px; }
  .updated { margin-top: 18px; padding: 15px; }
  .updated time, .updated p { font-size: 1.28rem; }
  .footer-row { display: block; }
  .inline-policies { margin-top: 32px; padding: 22px 17px; }
  .mobile-policy-section + .mobile-policy-section { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
  .mobile-policy-section > summary { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 12px; color: var(--navy); font-weight: 850; cursor: pointer; list-style: none; }
  .mobile-policy-section > summary::-webkit-details-marker { display: none; }
  .mobile-policy-section:not([open]) > .policy-copy { display: none; }
  .mobile-policy-section > summary::after { content: "+"; flex: 0 0 32px; font-size: 1.5rem; font-weight: 500; text-align: center; }
  .mobile-policy-section[open] > summary::after { content: "−"; }
  .mobile-policy-section[open] > .policy-copy { padding: 14px 0 8px; border-top: 1px solid var(--line); }
  .mobile-policy-section > .policy-copy h2 { display: none; }
  .consent-overlay { padding: 12px; }
  .consent-dialog { max-height: calc(100dvh - 24px); border-radius: 14px; }
  .policy-previews { display: block; }
  .consent-policy-links { display: grid; }
  .policy-popover + .policy-popover { margin-top: 9px; }
  .policy-popover summary { width: 100%; }
  .popover-panel { position: static; width: 100%; max-height: 48dvh; margin-top: 8px; padding: 18px 15px; transform: none; box-shadow: none; }
}

@media (max-width: 360px) {
  .location-selector { padding-inline: 10px; }
  .location-card { padding-inline: 12px; }
  .location-card-content { padding-right: 84px; }
  .location-card.is-preparing .location-card-content { padding-right: 60px; }
  .location-card-action { right: 12px; }
}

@media (prefers-contrast: more) {
  .camera-card, .notice, .updated { border: 2px solid currentColor; }
  .status { border: 1px solid currentColor; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
