/* The island is the entrance; the people and the record are the story. */
:root { --story-sage:#dce9d5; --story-blue:#d8edf0; --story-coral:#f8dfcf; --story-gold:#edaa22; }
.app-shell { display:block; }
.map-section { height:100svh; min-height:780px; }
.story-panel { position:absolute; z-index:5; right:24px; bottom:24px; width:286px; height:auto; overflow:visible; max-height:none; background:var(--cream); border:1px solid #f2e9d4; border-radius:22px; box-shadow:0 8px 30px #0c425824; }
.story-preview-inner { padding:22px 20px 10px; }
.preview-kicker { color:#7d6335; font-size:16px; }
.preview-heading { display:flex; gap:12px; align-items:center; margin:12px 0 16px; }
.preview-heading .story-art { width:76px; flex:none; }
.preview-heading span { font-size:16px; color:#53665f; }
.preview-heading h2 { font-size:20px; line-height:1.6; color:var(--navy); margin:5px 0; }
.story-preview-inner .primary-button { width:100%; justify-content:center; font-size:18px; }
.story-panel .panel-footer { padding:0 20px 12px; margin:0; border:0; }
.story-panel .panel-footer button { font-size:16px; }
.map-caption { right:auto; left:24px; top:215px; bottom:auto; text-align:left; max-width:230px; }
@media(min-width:821px) {
  .map-world { height:104%; max-height:none; left:55px; top:16px; }
  .complete-map .view-switch { left:252px; top:24px; right:auto; }
}
.has-3d .village-house { pointer-events:auto; }
.plan-dialog { color:var(--ink); background:var(--cream); border:1px solid #eee2cc; border-radius:28px; padding:0; width:min(1080px,calc(100vw - 44px)); max-width:none; max-height:94svh; overflow:auto; overscroll-behavior:contain; margin:3svh 22px 3svh auto; box-shadow:0 25px 90px #0b344f40; }
.plan-dialog::backdrop { background:#0a4a5b38; backdrop-filter:blur(2px); }
.plan-open { overflow:hidden; }
.plan-close { position:sticky; top:18px; float:right; margin:18px 18px -66px 0; width:48px; height:48px; border-radius:50%; border:1px solid #dcdccf; color:var(--navy); background:#fffaf0f5; font-size:30px; line-height:1; z-index:3; }
.plan-story { padding:30px 36px 20px; }
.plan-header { margin-right:50px; }
.plan-eyebrow { color:#85652d; font-size:18px; letter-spacing:.04em; }
.plan-header h2 { font-size:clamp(30px,3.2vw,44px); line-height:1.4; color:var(--navy); margin:8px 0 12px; overflow-wrap:anywhere; outline-offset:6px; }
.plan-header h2:focus { outline:none; }
.plan-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; color:#4b606b; font-size:18px; }
.plan-meta .badge { background:#eaf0e3; color:#36584c; border:0; font-size:16px; }
.review-tag { font-size:16px; color:#526b56; }
.review-partial,.review-platform-only { color:#805619; font-weight:700; }
.plan-hero { display:grid; grid-template-columns:40% minmax(0,1fr); gap:28px; align-items:center; margin-top:20px; }
.plan-guide { margin:0; min-width:0; position:relative; }
.guide-bubble { position:relative; max-width:94%; width:fit-content; padding:10px 18px; margin:4px auto -6px; background:#fffdf8; border:1px solid #e9dfcb; border-radius:22px 22px 22px 4px; box-shadow:0 4px 10px #8976470c; font-size:18px; line-height:1.6; color:var(--navy); font-weight:700; }
.story-art { position:relative; width:100%; aspect-ratio:1; overflow:hidden; }
.story-art>img { position:absolute; display:block; width:300%; height:300%; max-width:none; left:calc(-2 * var(--art-x)); top:calc(-2 * var(--art-y)); }
.plan-guide>.story-art { max-width:280px; margin:auto; }
.plan-copy h3 { font-size:clamp(24px,2vw,30px); line-height:1.55; margin:0 0 12px; color:var(--navy); }
.plan-copy>p { font-size:20px; line-height:1.9; color:#3b505d; margin:0; overflow-wrap:anywhere; }
.plan-facts { list-style:none; padding:0; margin:24px 0 0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.plan-facts li { text-align:center; min-width:0; }
.plan-facts li>span { display:grid; place-items:center; width:68px; height:68px; margin:0 auto 10px; border-radius:50%; background:#fbe4b1; color:#956723; }
.plan-facts li:nth-child(3n+2)>span { background:var(--story-sage); color:#4b7457; }
.plan-facts li:nth-child(3n)>span { background:var(--story-blue); color:#34768b; }
.plan-facts .icon { width:34px; height:34px; stroke-width:1.6; }
.plan-facts strong { display:block; font-size:18px; line-height:1.6; font-weight:650; color:var(--navy); }
.story-review-alert { padding:16px 20px; border-left:4px solid #c18c36; background:#f7ecd4; margin-top:24px; border-radius:0 12px 12px 0; font-size:18px; color:#6d501f; }
.story-review-alert p { font-size:18px; margin:6px 0 0; line-height:1.85; }
.plan-history { border-top:1px solid #e2decf; margin-top:26px; padding-top:20px; }
.history-heading { display:flex; flex-wrap:wrap; align-items:baseline; justify-content:space-between; gap:6px 14px; }
.history-heading h3 { margin:0; font-size:26px; line-height:1.6; color:var(--navy); }
.history-heading>span { font-size:16px; color:#62735f; white-space:nowrap; }
.plan-history>p { font-size:16px; line-height:1.8; color:#5c6f65; margin:6px 0 18px; }
.history-cards { display:flex; gap:18px; overflow-x:auto; padding:3px 3px 14px; scroll-snap-type:x proximity; }
.history-card { position:relative; flex:0 0 calc((100% - 36px)/3); min-width:0; text-align:center; border:1px solid #e0e5d5; border-radius:18px; background:#f9faf2; color:var(--navy); padding:14px; scroll-snap-align:start; }
.history-card:hover { background:#eef2e4; border-color:#a8bd9b; }
.history-card.is-current { border:2px solid #dfac3d; padding:13px; background:#fff3d4; }
.history-card>time { display:inline-block; border-radius:20px; padding:1px 17px; background:#91aaa0; color:white; font-size:20px; line-height:1.55; font-weight:700; }
.history-card.is-current>time { background:#d99b1c; }
.history-art { width:76px; max-width:100%; margin:6px auto; border-radius:50%; }
.history-card>strong { display:block; font-size:18px; line-height:1.7; }
.history-card>span { display:block; font-size:16px; color:#617064; margin-top:5px; }
.plan-actions { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin-top:22px; }
.story-source-toggle { background:transparent; display:flex; align-items:center; gap:8px; padding:10px 0; min-height:48px; color:var(--navy); font-size:18px; text-decoration:underline; text-underline-offset:5px; }
.plan-actions .primary-button { font-size:18px; padding:12px 22px; }
.plan-actions>span { font-size:16px; color:#5e6c60; }
.plan-evidence { margin-top:24px; border-top:1px solid var(--line); padding-top:22px; }
.plan-evidence>h3 { font-size:24px; color:var(--navy); margin:0 0 10px; }
.plan-evidence>p { font-size:18px; line-height:1.85; color:#495e60; overflow-wrap:anywhere; }
@media(min-width:1180px) {
  .plan-dialog { width:72vw; max-width:1120px; }
  .plan-open .map-viewport { width:28vw; }
  .plan-open .map-world { width:100%; height:auto; left:0; top:20px; }
  .plan-open .geographic-map { max-width:95%; height:auto; width:95%; }
}
@media(max-width:1179px) and (min-width:821px) {
  .plan-dialog { width:calc(100vw - 40px); margin:3svh auto; }
  .story-panel { right:20px; bottom:20px; }
}
@media(max-width:820px) {
  .map-section { height:auto; min-height:0; }
  .story-panel { position:relative; right:auto; bottom:auto; width:calc(100% - 28px); margin:0 14px 24px; border-radius:20px; }
  .story-preview-inner { padding:20px 22px 8px; }
  .preview-heading .story-art { width:96px; }
  .map-caption { position:relative; left:auto; top:auto; margin:20px 18px 0; max-width:none; }
  .plan-dialog { width:calc(100vw - 20px); max-height:96svh; margin:2svh auto; border-radius:22px; }
  .plan-story { padding:22px 22px 18px; }
  .plan-close { top:12px; margin:12px 12px -60px 0; }
  .plan-header { margin-right:40px; }
  .plan-eyebrow { font-size:16px; }
  .plan-header h2 { font-size:30px; margin-top:12px; }
  .plan-meta { font-size:18px; gap:8px; }
  .plan-hero { grid-template-columns:1fr; gap:18px; margin-top:20px; }
  .plan-guide { width:100%; max-width:350px; margin:auto; }
  .plan-guide .story-art { max-width:300px; margin:auto; }
  .guide-bubble { font-size:18px; margin-bottom:0; }
  .plan-copy h3 { font-size:25px; }
  .plan-copy>p { font-size:18px; }
  .plan-facts { gap:10px; margin-top:22px; }
  .plan-facts li>span { width:56px; height:56px; }
  .plan-facts .icon { width:30px; height:30px; }
  .plan-facts strong { font-size:16px; }
  .history-heading h3 { font-size:24px; }
  .history-cards { flex-direction:column; gap:12px; overflow:visible; }
  .history-card { flex:none; display:grid; grid-template-columns:72px minmax(0,1fr); gap:4px 14px; text-align:left; padding:14px; }
  .history-card.is-current { padding:13px; }
  .history-card>time { grid-column:1; font-size:18px; padding:1px 10px; text-align:center; }
  .history-card>.history-art { width:72px; grid-column:1; grid-row:2/4; margin:0; }
  .history-card>strong { grid-column:2; grid-row:1/3; align-self:center; }
  .history-card>span { grid-column:2; grid-row:3; margin:0; }
  .plan-actions { align-items:stretch; flex-direction:column; }
  .plan-actions .primary-button { justify-content:center; width:100%; }
}
@media(prefers-reduced-motion:reduce) { .history-cards { scroll-behavior:auto; } }

.plan-places { margin:16px 0 0; font-size:18px; color:#3b505d; }
.plan-places>div { display:grid; grid-template-columns:80px minmax(0,1fr); gap:8px; margin-top:6px; }
.plan-places dt { color:#6a744f; }
.plan-places dd { margin:0; }
.story-sources h3 { font-size:24px; color:var(--navy); }
.story-sources ul { padding-left:22px; }
.story-sources a { display:inline-block; min-height:44px; padding:6px 0; font-size:18px; text-underline-offset:5px; }
.catalog-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
@media(max-width:820px) { .catalog-filters { grid-template-columns:1fr; } }
