.world-page-host { margin-bottom: 30px; }
.world-invitation {
  display: block; position: relative; width: 100%; padding: 0; overflow: hidden;
  cursor: pointer; border: 1px solid #849a82; background: #dbe9e3; color: #203e34;
  border-radius: 3px; box-shadow: 9px 9px 0 #7e937523; text-align: center;
}
.world-map-preview { display: block; aspect-ratio: 2.4; overflow: hidden; }
.world-map-preview .world-map-svg { width: 100%; height: 100%; object-fit: cover; }
.world-invitation-label {
  position: absolute; left: 50%; bottom: 10%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 12px; padding: 15px 23px;
  background: #fff9e9; border: 2px solid #314b40; box-shadow: 5px 5px 0 #314b40;
  font-size: clamp(1rem, 2vw, 1.3rem); white-space: nowrap;
}
.world-pixel-plus { font: bold 26px Georgia, serif; color: #a46d35; }
.world-invitation:hover .world-invitation-label { box-shadow: 7px 7px 0 #314b40; }
.world-page-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 0; color: #5d6859; font-size: .9rem; }
.world-page-caption b { font-family: Georgia, serif; font-size: 1.35rem; color: #314b40; font-weight: 400; }
.world-shortcuts { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 25px; }
.world-map-dialog {
  width: min(1420px, calc(100vw - 40px)); max-width: none; max-height: 92dvh;
  padding: 0; border: 1px solid #506956; border-radius: 4px; background: #f5f1e5;
  color: #243b31; box-shadow: 14px 14px 0 #131f2244; overflow: auto;
  font-family: 'Noto Serif', Georgia, 'Songti SC', serif;
}
.world-map-dialog::backdrop { background: #10251fd9; backdrop-filter: blur(7px); }
.world-map-dialog[open] { animation: world-unfold .35s ease-out both; }
.world-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 26px; border-bottom: 1px solid #acb8a2; background: #f5f1e5; position: sticky; top: 0; z-index: 4; }
.world-dialog-head small { font-size: .65rem; letter-spacing: .2em; }
.world-dialog-head h2 { font-weight: 400; margin: 4px 0 0; font-size: clamp(1.4rem, 3vw, 2.1rem); }
.world-dialog-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.world-map-main { min-width: 0; background: #e9eee3; }
.world-map-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 12px 18px; border-bottom: 1px solid #acb8a2; font-size: .8rem; }
.world-map-tools > div { display: flex; align-items: center; gap: 6px; }
.world-map-dialog button { color: #243b31; background: #faf7ef; border: 1px solid #9aa78d; border-radius: 3px; padding: 10px 14px; cursor: pointer; font: inherit; min-height: 42px; }
.world-map-dialog button:hover { background: #e2e8ce; }
.world-map-dialog button:disabled { opacity: .4; cursor: default; }
.world-map-dialog button:focus-visible, .world-invitation:focus-visible, .world-marker:focus-visible { outline: 3px solid #a66f24; outline-offset: 3px; }
.world-map-tools button { padding: 6px 11px; }
.world-map-tools output[data-world-zoom-value] { min-width: 45px; text-align: center; font-variant-numeric: tabular-nums; }
.world-map-viewport { height: min(54vh, 540px); overflow: auto; overscroll-behavior: contain; background: #dbe9e3; scrollbar-color: #748e78 #dbe9e3; }
.world-map-svg { display: block; width: 100%; min-width: 650px; height: auto; user-select: none; }
.world-land { shape-rendering: crispEdges; }
.world-country { cursor: pointer; }
.world-country:hover path, .world-country.is-selected path { fill: #e6c582; stroke: #93723f; stroke-width: 1.3; }
.world-marker { cursor: pointer; }
.world-marker .world-pin { transition: filter .2s; }
.world-marker:hover .world-pin, .world-marker:focus .world-pin, .world-marker.is-selected .world-pin { fill: #f0bc57; stroke: #59471d; stroke-width: 2; }
.world-marker-label { font-family: Georgia, 'Songti SC', serif; font-size: 11px; paint-order: stroke; fill: #18382d; stroke: #fffcec; stroke-width: 4px; stroke-linejoin: round; opacity: 0; pointer-events: none; }
.world-marker:hover .world-marker-label, .world-marker:focus .world-marker-label, .world-marker.is-selected .world-marker-label { opacity: 1; }
.world-map-hint, .world-map-credit { margin: 15px 20px; font-size: .8rem; line-height: 1.8; }
.world-map-credit summary { cursor: pointer; }
.world-map-credit a { color: #3f654d; }
.world-map-side { border-left: 1px solid #acb8a2; padding: 19px; max-height: 72dvh; overflow: auto; scrollbar-color: #9ca889 #f5f1e5; }
.world-map-side label { display: block; font-size: .85rem; margin-bottom: 8px; }
.world-map-side input, .world-map-side select { width: 100%; border: 1px solid #acb8a2; border-radius: 2px; background: #fffcf4; color: #243b31; padding: 10px; font: inherit; font-size: .9rem; box-sizing: border-box; }
.world-map-side select { margin-top: 8px; padding: 4px; }
.world-map-side option { padding: 4px 7px; }
.world-map-side h3 { font-size: 1.4rem; font-weight: 400; padding-top: 10px; }
.world-map-side p { line-height: 1.8; font-size: .9rem; }
.world-map-dialog .world-civ-choice { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; text-align: start; width: 100%; margin-bottom: 8px; }
.world-civ-choice strong { font-weight: 400; font-size: 1rem; }
.world-civ-choice small { font-size: .72rem; opacity: .8; line-height: 1.5; }
.world-map-dialog .world-civ-choice[aria-pressed=true] { background: #e2e8ce; border-color: #6f7f50; box-shadow: inset 3px 0 #6f7f50; }
.world-civ-story { padding-top: 13px; border-top: 1px solid #b3baa3; margin-top: 20px; }
.world-civ-story h4 { font-size: 1.65rem; font-weight: 400; margin: 10px 0; }
.world-story-eyebrow { letter-spacing: .08em; color: #72795e; }
.world-civ-story details { padding: 10px 0; border-bottom: 1px solid #aab49555; }
.world-civ-story summary { cursor: pointer; font-size: .9rem; line-height: 1.6; }
.world-story-sources { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; font-size: .8rem; }
.world-story-sources a, .world-civ-story > a { color: #315c44; overflow-wrap: anywhere; }
.world-civ-story > a { display: inline-flex; margin-top: 15px; }
.world-sr { position: absolute !important; width: 1px !important; height: 1px !important; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
.pantheon {
  position: relative; isolation: isolate; padding: clamp(24px, 4vw, 58px); margin: 12px 0 36px;
  color: #f0e5cb; background: radial-gradient(ellipse at 48% -10%, #94754535, transparent 58%), radial-gradient(ellipse at 10% 80%, #2c665438, transparent 60%), #101d22;
  border: 1px solid #877450; overflow: hidden; border-radius: 2px;
}
.pantheon::before { content: ''; position: absolute; z-index: -1; inset: 12px; border: 1px solid #b9a67527; pointer-events: none; }
.pantheon-intro { text-align: center; max-width: 700px; margin: 10px auto 38px; }
.pantheon-overline { color: #b8a678; font-size: .64rem; letter-spacing: .32em; }
.pantheon-intro h2 { color: #f0e5cb; font-size: clamp(1.65rem, 4vw, 3.7rem); font-weight: 400; letter-spacing: .1em; margin: 20px 0 12px; }
.pantheon-intro p { color: #c4baa4; font-size: .95rem; line-height: 1.8; }
.pantheon-gates { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 2vw, 26px); }
.pantheon .pantheon-gate {
  position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center;
  padding: 18px 12px 25px; background: linear-gradient(180deg, #ffffff03, #ffffff00);
  color: var(--gate-tone); border: 1px solid #b1a16c42; border-radius: 48% 48% 4px 4px / 32% 32% 4px 4px;
  cursor: pointer; font: inherit; transition: border-color .25s, background .25s, transform .25s;
}
.pantheon .pantheon-gate:hover, .pantheon .pantheon-gate[aria-pressed=true] { border-color: var(--gate-tone); background: linear-gradient(180deg, #ffffff0b, #ffffff01); transform: translateY(-4px); }
.pantheon button:focus-visible { outline: 2px solid #ecd6a0; outline-offset: 5px; }
.pantheon-art { width: 100%; max-width: 280px; overflow: visible; display: block; }
.pantheon-index { color: #b6ab8a; opacity: .7; font-size: .7rem; font-family: Georgia, serif; letter-spacing: .15em; }
.pantheon-name { font-size: clamp(1rem, 1.6vw, 1.5rem); color: #efe4cc; line-height: 1.5; }
.pantheon-gate small { font-size: .75rem; color: #c0b59d; margin-top: 9px; line-height: 1.6; }
.pantheon-orbit { transform-origin: 140px 105px; animation: pantheon-breathe 9s ease-in-out infinite alternate; }
.pantheon-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding-top: 30px; }
.pantheon-foot > button { color: #ecd6a0; border: 1px solid #a59262; border-radius: 2px; background: transparent; padding: 13px 22px; font: inherit; cursor: pointer; }
.pantheon-foot details { max-width: 550px; font-size: .8rem; color: #c4baa4; line-height: 1.9; }
.pantheon-foot summary { cursor: pointer; }
@keyframes world-unfold { from { opacity: 0; transform: translateY(20px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pantheon-breathe { from { opacity: .15; transform: scale(.96); } to { opacity: .35; transform: scale(1.04); } }
@media (max-width: 850px) {
  .pantheon-gates { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-dialog-grid { grid-template-columns: 1fr; }
  .world-map-side { border-left: 0; border-top: 1px solid #acb8a2; max-height: none; overflow: visible; }
  .world-map-viewport { height: 280px; }
  .world-map-dialog { width: calc(100vw - 18px); max-height: 94dvh; box-shadow: none; }
  .world-dialog-head { padding: 15px; }
  .world-map-preview { aspect-ratio: 1.65; }
  .world-map-preview .world-map-svg { min-width: 0; }
  .world-page-caption { justify-content: flex-start; }
  .pantheon-foot { flex-direction: column; }
  .world-map-tools { padding: 10px; }
  .world-map-tools > output { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .world-map-dialog[open], .pantheon-orbit { animation: none; }
  .pantheon .pantheon-gate, .world-marker .world-pin { transition: none; }
  .pantheon .pantheon-gate:hover { transform: none; }
}
