.country-detail-dialog { width: min(1180px, calc(100vw - 48px)); max-width: none; max-height: calc(100dvh - 48px); padding: 0; border: 1px solid #60717a; border-radius: 24px; color: #eef1ed; background: #18222e; box-shadow: 0 30px 100px #0009; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.country-detail-dialog::backdrop { background: #06111bd9; backdrop-filter: blur(7px); }
.country-detail-header { position: sticky; top: 0; z-index: 3; display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; padding: 28px 32px 22px; border-bottom: 1px solid #3d515c; background: linear-gradient(115deg,#26434a,#1a2836); }
.country-detail-identity { display: flex; align-items: center; gap: 20px; min-width: 0; }
.country-detail-identity img { width: 84px; height: 58px; flex: 0 0 auto; object-fit: cover; border: 1px solid #819091; border-radius: 7px; }
.country-detail-identity .eyebrow { color: #b4ec76; margin: 0 0 5px; }
.country-detail-identity h2 { font-size: clamp(28px, 4vw, 42px); margin: 0; overflow-wrap: anywhere; }
.country-detail-identity p:last-child { color: #bacbd0; margin: 7px 0 0; font-size: 14px; }
.country-detail-close { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; min-height: 40px; border: 1px solid #73868d; border-radius: 50%; background: #142331; color: #f5f2e7; padding: 0; font-size: 28px; cursor: pointer; }
.country-detail-close:hover { background: #3e5961; }
.country-detail-body { padding: 24px 30px 30px; }
.country-detail-loading { min-height: 300px; display: grid; place-items: center; color: #c1d0d1; }
.country-detail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.country-stat { padding: 18px 22px; border: 1px solid #425a64; border-radius: 15px; background: #1d303b; }
.country-stat .eyebrow { margin: 0 0 8px; color: #b5c8ca; }
.country-stat strong { display: block; color: #e9d7af; font-size: clamp(26px,4vw,37px); letter-spacing: -.03em; overflow-wrap: anywhere; }
.country-stat p:not(.eyebrow) { margin: 4px 0 7px; color: #c5ced0; font-size: 13px; }
.country-stat a, .country-map-credit a, .country-history-credit a { color: #a9d4de; font-size: 12px; }
.country-stat-definition { color: #a2b3bd; font-size: 12px; margin: 12px 0 28px; line-height: 1.6; }
.country-detail-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr); gap: 30px; align-items: start; }
.country-detail-geography, .country-detail-history { min-width: 0; }
.country-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.country-detail-layout .eyebrow { color: #92c8c6; margin: 0 0 8px; font-size: 10px; }
.country-detail-layout h3 { font-size: 23px; line-height: 1.25; margin: 0 0 14px; }
.country-section-heading h3 { margin-bottom: 0; }
.country-map-legend { display: flex; align-items: center; gap: 6px; color: #bdcccf; font-size: 11px; }
.country-map-legend i { width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: #e8bd73; }
.country-map-legend i.capital { background: #ff8b7e; }
.country-map-view { position: relative; overflow: hidden; border: 1px solid #40616f; border-radius: 16px; background: radial-gradient(ellipse at 40% 30%,#1c4051,#102635); }
.country-map-view svg { display: block; width: 100%; height: auto; touch-action: none; cursor: grab; }
.country-map-view svg:active { cursor: grabbing; }
.country-detail-outline { fill: #37676c; stroke: #9accc1; stroke-width: .75; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.country-map-tools { position: absolute; top: 12px; right: 12px; z-index: 1; display: flex; gap: 4px; }
.country-map-view:has(> oddwise-terrain[ready]) > .country-map-tools { display: none; }
.country-map-tools button { display: grid; place-items: center; width: 32px; height: 32px; min-height: 32px; padding: 0; border: 1px solid #769299; border-radius: 7px; background: #102633eb; color: #e8f2ec; font-size: 20px; cursor: pointer; }
.country-map-tools button:disabled { opacity: .35; cursor: default; }
.country-map-city { pointer-events: none; }
.country-map-city circle { fill: #e8bd73; stroke: #15212b; stroke-width: 1.1; }
.country-map-city.capital circle { fill: #ff8b7e; stroke: #fff0ce; stroke-width: 1.4; }
.country-map-city.selected circle { fill: #fff7ce; stroke: #b4ec76; stroke-width: 2.8; }
.country-map-city text { fill: #fff1d9; font-size: 20px; font-weight: 650; paint-order: stroke; stroke: #142a37; stroke-width: 4px; stroke-linejoin: round; }
.country-map-city.capital text { font-weight: 800; }
.country-city-leader { fill: none; stroke: #d7e2d5; stroke-opacity: .75; stroke-width: 1; }
.country-map-hint, .country-map-credit { color: #a1b8c2; font-size: 11px; line-height: 1.6; }
.country-city-buttons { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.country-city-button { display: flex; align-items: center; gap: 7px; padding: 8px 10px; min-height: 34px; border: 1px solid #4d646d; border-radius: 9px; color: #e1e9e6; background: #213541; font-size: 12px; cursor: pointer; }
.country-city-button:hover { background: #35505a; }
.country-city-button.capital .city-dot { background: #ff8b7e; }
.country-city-button small { font-size: 9px; color: #c1d0d1; }
.country-outlying { margin: 15px 0; font-size: 12px; color: #bacbd0; }
.country-outlying summary, .country-history-background summary { cursor: pointer; padding: 7px 0; }
.country-insets { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 10px; margin-top: 10px; }
.country-insets .country-map-tools { top: 5px; right: 5px; }
.country-insets .country-map-tools button { width: 24px; height: 24px; min-height: 24px; font-size: 16px; }
.country-history-facts { padding: 0; list-style: none; margin: 0; }
.country-history-facts li { position: relative; padding: 0 0 16px 18px; border-left: 1px solid #4a7376; }
.country-history-facts li::before { content: ''; position: absolute; width: 7px; height: 7px; top: 7px; left: -4px; border-radius: 50%; background: #e9be78; }
.country-history-facts p { margin: 0; color: #d7e0e0; font-size: 14px; line-height: 1.65; }
.country-fact-source { color: #a6d9d9; font-size: 11px; text-decoration: none; }
.country-history-note { padding: 12px; border-radius: 10px; background: #243c46; color: #c7d6d7; font-size: 12px; line-height: 1.5; }
.country-history-credit { color: #95aab4; font-size: 11px; line-height: 1.65; margin-top: 0; }
.country-history-background { border-top: 1px solid #3d525b; color: #b8c9cd; font-size: 12px; line-height: 1.7; }
.country-history-background p { white-space: normal; }
.country-detail-dialog button:focus-visible, .country-detail-dialog a:focus-visible { outline: 3px solid #e9be78; outline-offset: 3px; }
@media (max-width: 850px) { .country-detail-layout { grid-template-columns: minmax(0,1fr); gap: 24px; } .country-detail-dialog { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); } .country-detail-body { padding: 20px; } .country-detail-header { padding: 20px; } }
@media (max-width: 500px) { .country-detail-dialog { width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; border: none; } .country-detail-header { padding: 18px 16px; gap: 8px; } .country-detail-identity { gap: 12px; } .country-detail-identity img { width: 52px; height: 36px; } .country-detail-identity .eyebrow { font-size: 9px; } .country-detail-identity h2 { font-size: 27px; } .country-detail-body { padding: 18px 14px; } .country-stat { padding: 14px; } .country-detail-stats { gap: 10px; } .country-stat strong { font-size: 25px; } .country-stat a { font-size: 10px; } .country-map-legend { font-size: 10px; } .country-detail-close { width: 34px; height: 34px; min-height: 34px; flex-basis: 34px; } }
