:root{color-scheme:light;--ink:#29473f;--green:#3c6c5a;--cream:#f8f6eb;--line:#d9e2cd;--yellow:#ffe5a0;--coral:#de775a;--font:"BIZ UDGothic","Hiragino Maru Gothic ProN","Yu Gothic",sans-serif}
*{box-sizing:border-box}body{margin:0;background:var(--cream);color:var(--ink);font-family:var(--font);line-height:1.5}button{font:inherit;color:inherit;border:1.5px solid var(--line);cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}button:focus-visible,a:focus-visible{outline:4px solid #e08a34;outline-offset:3px}button:active{transform:translateY(1px)}button:disabled{cursor:default}button[hidden],[hidden]{display:none!important}img{max-width:100%}h1,h2,p{margin:0}button,h1,h2,.country-line,.map-top,.trial,#passport,.listen-cue{white-space:nowrap}a{color:#2f6a64}.app{max-width:1160px;margin:auto;padding:18px 22px 12px;padding-left:max(22px,env(safe-area-inset-left));padding-right:max(22px,env(safe-area-inset-right));padding-bottom:max(12px,env(safe-area-inset-bottom))}.topbar{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:12px}.topbar h1{display:flex;align-items:center;gap:7px;min-width:0;font-size:clamp(23px,3vw,34px);font-weight:750;letter-spacing:.04em}.topbar h1 [data-fit]{display:block;min-width:0}.trial{font-size:12px;padding:3px 9px;border:1px dashed #98ac87;border-radius:20px;color:#677f5d}.modes{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:16px}.mode{min-height:56px;background:#fffdf7;border-radius:18px;font-size:24px;font-weight:700;box-shadow:0 3px 0 #e8eadb}.mode.selected{background:var(--green);color:#fff;border-color:var(--green);box-shadow:0 3px 0 #2b5145}.stage{display:grid;grid-template-columns:minmax(0,1.65fr) minmax(0,1fr);gap:16px;scroll-margin-top:12px}.map-panel{display:flex;flex-direction:column;border:1.5px solid #bdd8d5;border-radius:26px;background:#e1f1ed;overflow:hidden;min-width:0}.map-top{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:13px 16px;color:#436659;font-size:18px;font-weight:700}.map-top>span{min-width:0;display:block;flex:1}.small-button{border-radius:24px;padding:6px 12px;background:#fffdf8;font-size:14px;min-height:36px}.map-wrap{position:relative;flex:1;min-height:230px;display:flex;align-items:center;background:#d6eef0;overflow:hidden}#worldMap{display:block;width:100%;height:100%;min-height:240px;max-height:380px;aspect-ratio:1000/465}#land path{fill:#9cbb97;stroke:#f0f6df;stroke-width:1;stroke-linejoin:round;vector-effect:non-scaling-stroke;transition:fill .2s}#land path.selected-country{fill:#eeab5e;stroke:#bd6c37;stroke-width:1.6}#land path.quiz-country{fill:#e79766;stroke:#ae5339;stroke-width:2;animation:countryGlow 2s ease-in-out infinite}#land path[data-playable="true"]{cursor:pointer}#land path[data-playable="true"]:hover{fill:#86ab7c}#markerLayer{pointer-events:none}.location-star{fill:#fff000;stroke:#211c23;stroke-width:1.2;stroke-linejoin:round}.map-note{position:absolute;bottom:8px;left:12px;border-radius:20px;background:#ffffffc9;padding:3px 10px;font-size:12px;color:#527369;white-space:nowrap}.place-panel{min-width:0;background:#fffdf7;border:1.5px solid var(--line);border-radius:26px;padding:10px;display:flex;flex-direction:column}.place-picture{display:block;width:100%;position:relative;border:0;border-radius:20px;background:#f8efd9;overflow:hidden;padding:0;min-height:190px}.place-picture img{width:100%;height:200px;display:block;object-fit:contain}.listen-cue{position:absolute;right:9px;bottom:7px;background:#fffcf1e8;border-radius:18px;padding:4px 9px;font-size:12px;color:#537262}.place-info{text-align:center;padding:10px 4px 6px;min-width:0}.country-line{display:flex;justify-content:center;align-items:center;gap:9px;font-size:19px;color:#557163}.country-line img{width:32px;height:24px;object-fit:contain;border:1px solid #d6d6c5;border-radius:3px}.country-line span{display:block;min-width:0;max-width:calc(100% - 48px)}#placeName{font-size:clamp(20px,2.5vw,31px);font-weight:750;letter-spacing:.015em;margin:3px 0;line-height:1.35}#placeHint{font-size:14px;color:#647665;line-height:1.5;min-height:21px}.alternatives{display:flex;gap:7px;justify-content:center;margin-top:auto;padding-top:5px}.alternative{display:flex;align-items:center;justify-content:center;min-width:0;flex:1;gap:6px;background:#edf3e5;border-radius:12px;padding:5px;font-size:13px;min-height:42px}.alternative img{width:36px;height:30px;object-fit:contain}.alternative span{display:block;min-width:0}.alternative.selected{background:var(--yellow);border-color:#e4b96a}.play-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:17px 2px 11px}.play-heading h2{font-size:22px;min-width:0}.play-heading #passport{color:#a8762d;font-size:14px;font-weight:700}.flag-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px}.flag-choice{position:relative;border-radius:20px;background:#fffdf7;min-height:112px;padding:13px 8px 10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;min-width:0;box-shadow:0 3px 0 #e8eadb}.flag-choice img{display:block;width:76px;height:55px;object-fit:contain;border-radius:3px;filter:drop-shadow(0 2px 2px #2645381c)}.flag-choice span{font-size:18px;display:block;width:100%;text-align:center;font-weight:700;white-space:nowrap}.flag-choice[aria-pressed="true"]{background:#fff0c6;border:2px solid #d2a145}.flag-choice.visited::after{content:'✦';position:absolute;top:6px;right:8px;font-size:13px;color:#d2a145}.quiz .flag-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.quiz .flag-choice{min-height:104px}.flag-choice.wrong{background:#fbefdf;animation:nudge .3s}.flag-choice.correct{background:#dcefcf;border-color:#6c994f;box-shadow:0 0 0 3px #c4dda9}.flag-choice.hinted{border-color:#d89835;box-shadow:0 0 0 4px #f8d976;animation:hintGlow 1.2s ease-in-out infinite}.quiz-feedback{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 0 2px;min-height:58px}.quiz-feedback p{font-size:18px;font-weight:700}.quiz-actions{display:flex;gap:8px}.soft-button,.next-button{border-radius:15px;min-height:44px;padding:6px 18px;font-size:18px;background:#fff4cc}.next-button{background:var(--green);color:#fff;border-color:var(--green)}.voice-message{font-size:13px;text-align:center;color:#85602d;min-height:0;margin-top:5px}.voice-message:empty{display:none}footer{text-align:center;margin-top:17px}.help-button{background:transparent;border:0;color:#627c65;font-size:14px;padding:9px 12px;min-height:40px}dialog{border:1.5px solid var(--line);border-radius:24px;padding:22px;max-width:640px;width:calc(100% - 28px);max-height:85dvh;color:var(--ink);background:#fffdf7;font-size:16px}dialog::backdrop{background:#23423d70}.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;position:sticky;top:-22px;padding:7px 0;background:#fffdf7}.dialog-heading h2{font-size:21px}dialog p{margin:12px 0;white-space:normal}dialog h3{font-size:18px;margin:20px 0 6px}dialog ul{padding-left:22px;line-height:1.7}dialog li{margin-bottom:8px}dialog .credit{text-align:center;font-size:14px}.source-formal{font-size:13px;color:#667569;display:block;white-space:normal}.source-link{overflow-wrap:anywhere}body:has(dialog[open]){overflow:hidden}@keyframes countryGlow{50%{fill:#ffd56b}}@keyframes hintGlow{50%{box-shadow:0 0 0 4px #fff3c4}}@keyframes nudge{25%{transform:translateX(-3px)}75%{transform:translateX(3px)}}
@media(max-width:700px){.app{padding:12px 13px}.topbar{gap:8px;margin-bottom:10px}.topbar h1{font-size:25px}.trial{font-size:10px}.modes{gap:9px;margin-bottom:11px}.mode{min-height:48px;font-size:20px;border-radius:15px}.stage{grid-template-columns:minmax(0,1fr);gap:10px}.map-top{padding:8px 11px;font-size:16px}.map-wrap{min-height:155px}#worldMap{min-height:145px;max-height:200px}.map-note{font-size:10px;bottom:4px;left:7px}.place-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:7px;padding:8px;border-radius:21px;align-items:center}.place-picture{min-height:140px;border-radius:15px}.place-picture img{height:140px}.listen-cue{font-size:9px;padding:3px 5px;bottom:4px;right:4px}.place-info{padding:4px 0}.country-line{font-size:16px;gap:6px}.country-line img{width:26px;height:20px}#placeName{font-size:24px;line-height:1.35}#placeHint{font-size:12px}.alternatives{grid-column:1/-1;padding-top:0}.alternative{min-height:35px;font-size:13px}.alternative img{width:28px;height:25px}.play-heading{padding:13px 2px 9px}.play-heading h2{font-size:19px}.play-heading #passport{font-size:12px}.flag-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.flag-choice{min-height:98px;border-radius:16px;padding:10px 6px 8px;gap:7px}.flag-choice img{width:65px;height:45px}.flag-choice span{font-size:16px}.quiz .flag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quiz .flag-choice{min-height:79px;padding:8px}.quiz .flag-choice img{width:76px;height:52px}.quiz-feedback{flex-direction:column;align-items:stretch;gap:8px;padding-top:10px}.quiz-feedback p{text-align:center;font-size:16px;min-height:24px}.quiz-actions{justify-content:center}.soft-button,.next-button{flex:1;font-size:17px}.help-button{font-size:12px}footer{margin-top:10px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){.app{padding-top:7px;padding-bottom:8px}.topbar{margin-bottom:6px}.topbar h1{font-size:22px}.modes{margin-bottom:9px}.mode{min-height:39px;font-size:18px}.stage{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr);gap:10px}.map-top{padding:6px 9px;font-size:14px}.small-button{min-height:30px;font-size:12px;padding:3px 9px}.map-wrap{min-height:145px}#worldMap{min-height:145px;max-height:185px}.place-panel{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:5px;padding:7px}.place-picture{min-height:115px}.place-picture img{height:115px}.place-info{padding:0}#placeName{font-size:22px}.country-line{font-size:13px}.country-line img{width:24px;height:18px}#placeHint{font-size:11px}.alternatives{grid-column:1/-1;padding-top:0}.alternative{min-height:32px;font-size:11px}.alternative img{height:23px;width:25px}.play-heading{padding:9px 1px 7px}.play-heading h2{font-size:17px}.flag-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:7px}.flag-choice{min-height:76px;padding:6px;gap:5px;border-radius:14px}.flag-choice img{width:58px;height:39px}.flag-choice span{font-size:13px}.quiz .flag-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.quiz .flag-choice{min-height:65px;padding:5px}.quiz .flag-choice img{height:43px;width:62px}.quiz-feedback{flex-direction:row;padding-top:9px;min-height:43px}.quiz-feedback p{font-size:14px;text-align:left}.soft-button,.next-button{font-size:14px;min-height:35px;padding:4px 12px}.map-note{font-size:9px}.listen-cue{font-size:9px}.help-button{font-size:12px}footer{margin-top:6px}}
.modes{position:sticky;top:0;z-index:5;background:var(--cream);padding:5px 0}.stage{scroll-margin-top:78px}.place-picture.speaking .listen-cue{background:#ffe5a0;color:#29473f}
.place-kind{position:absolute;top:7px;left:7px;max-width:calc(100% - 14px);border-radius:16px;background:#fffdf1e8;color:#557163;padding:3px 8px;font-size:11px;white-space:nowrap}
dialog .credit span{display:block;white-space:nowrap}
@media(max-width:700px){.stage{scroll-margin-top:67px}.place-info{display:contents}.place-picture{grid-row:1;grid-column:1}.country-line{grid-row:1;grid-column:2;align-self:center;margin-bottom:44px}#placeHint{grid-row:1;grid-column:2;align-self:center;margin-top:36px;text-align:center}#placeName{grid-row:2;grid-column:1/-1;text-align:center;font-size:26px;margin:0}.alternatives{grid-row:3}.alternatives:empty{display:none}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){.stage{scroll-margin-top:58px}.place-info{display:contents}.place-picture{grid-row:1;grid-column:1}.country-line{grid-row:1;grid-column:2;align-self:center;margin-bottom:38px}#placeHint{grid-row:1;grid-column:2;align-self:center;margin-top:28px;text-align:center}#placeName{grid-row:2;grid-column:1/-1;text-align:center;font-size:22px;margin:0}.alternatives{grid-row:3}.alternatives:empty{display:none}}
@media(max-width:420px){.alternatives{flex-direction:column}.alternative{font-size:14px}.alternative span{flex:1;text-align:center}.alternative img{width:38px;height:28px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px) and (max-width:700px){.country-line{grid-column:1/-1;grid-row:2;margin:0}#placeHint{margin:0}#placeName{grid-row:3}.alternatives{grid-row:4;flex-direction:column}.alternative span{flex:1;text-align:center}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
.region-picker h2{text-align:center;font-size:28px;margin:16px 0 22px}.region-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.region-card{display:flex;flex-direction:column;align-items:center;min-width:0;background:#fffdf7;border-radius:24px;padding:12px;gap:6px;box-shadow:0 4px 0 #e8eadb}.region-card.world-card{grid-column:1/-1;background:#e3f2ed;flex-direction:row;justify-content:center;gap:25px}.region-card svg{display:block;width:100%;height:110px;background:#e5f4f7;border-radius:16px}.region-card.world-card svg{width:210px;height:100px}.region-card svg path{fill:#ccd9c9;stroke:#fff;stroke-width:1}.region-card svg path.region-highlight{fill:#e4ab65}.region-card.world-card svg path{fill:#87b09d}.region-card .region-label{font-size:21px;font-weight:700;display:block;max-width:100%}.region-card .region-count{font-size:13px;color:#677b67;display:block}.region-card .region-caption{min-width:0;max-width:100%;text-align:center}.region-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:2px 0 8px}.region-bar>span{display:block;min-width:0;font-size:18px;font-weight:700}.flag-grid[data-options="2"]{grid-template-columns:repeat(2,minmax(0,1fr))}.flag-grid[data-options="3"]{grid-template-columns:repeat(3,minmax(0,1fr))}#land path.outside-region{fill:#d2decd;opacity:.6}#land path.region-country{fill:#88af94}#land path.selected-country{fill:#eeab5e;opacity:1}#land path.quiz-country{fill:#e79766;opacity:1}
@media(max-width:700px){.region-picker h2{font-size:25px;margin:10px 0 16px}.region-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}.region-card{border-radius:20px;padding:9px;gap:4px}.region-card svg{height:84px}.region-card .region-label{font-size:18px}.region-card.world-card{gap:13px}.region-card.world-card svg{width:44%;height:86px}.region-count{font-size:12px}.region-bar>span{font-size:16px}.region-bar .small-button{font-size:12px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){.region-cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}.region-picker h2{font-size:22px;margin:7px 0 12px}.region-card svg{height:72px}.region-card.world-card svg{width:150px;height:68px}.region-card .region-label{font-size:18px}.region-bar>span{font-size:16px}}
.media-tools{display:flex;justify-content:center;align-items:center;gap:7px;padding-top:6px}.media-tools .small-button{font-size:12px;min-height:36px}.photo-credit-button{border:0;background:transparent;font-size:11px;padding:6px 3px;min-height:36px;color:#627c65}.place-picture.photo{background:#d9e5dc}.place-picture.photo img{object-fit:contain}.place-picture.photo .place-kind,.place-picture.photo .listen-cue{background:#fffdf3f2}
@media(max-width:700px){.media-tools{grid-column:1/-1;grid-row:4;padding:0}.media-tools .small-button{font-size:12px}.photo-credit-button{font-size:11px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){.media-tools{grid-column:1/-1;grid-row:4;padding:0}.media-tools .small-button{min-height:32px}.photo-credit-button{min-height:32px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px) and (max-width:700px){.media-tools{grid-row:5}}
#placeHint{white-space:nowrap;min-width:0}
@media(max-width:700px){#placeHint{grid-row:3;grid-column:1/-1;align-self:auto;margin:0;font-size:13px}.country-line{margin:0}.alternatives{grid-row:4}.media-tools{grid-row:5}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){#placeHint{grid-row:3;grid-column:1/-1;align-self:auto;margin:0}.country-line{margin:0}.alternatives{grid-row:4}.media-tools{grid-row:5}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px) and (max-width:700px){#placeHint{grid-row:4}.alternatives{grid-row:5}.media-tools{grid-row:6}}
@media(max-width:420px){.flag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
#land path.country-point{stroke-dasharray:2 1;stroke-width:1.5}
/* Give photographs enough space to show the real subject, without cropping it. */
.place-panel:has(.place-picture.photo){display:flex;flex-direction:column;gap:0}
.place-picture.photo{min-height:0;background:#e6eddf}
.place-picture.photo img{height:auto;aspect-ratio:3/2;max-height:300px;object-fit:contain}
.place-panel:has(.photo) .place-info{display:block;width:100%;padding:10px 4px 6px;order:1}
.place-panel:has(.photo) .country-line{margin:0}
.place-panel:has(.photo) #placeHint{margin:0;font-size:14px;text-align:center}
.place-panel:has(.photo) #placeName{margin:4px 0;font-size:28px;text-align:center}
.place-panel:has(.photo) .media-tools{order:2;width:100%;padding:2px 0 4px}
.place-panel:has(.photo) .alternatives{order:3;width:100%;margin-top:auto}
#photoTitle,#photoSource,#photoAuthor,#photoDetails{overflow-wrap:anywhere}
#photoTitle{font-size:14px;color:#627c65}
.photo-inline{width:100%;padding:5px 0 2px;color:#627c65;text-align:center;font-size:11px;line-height:1.45}
.photo-inline>span{display:block;width:100%;white-space:nowrap;min-width:0}
.photo-inline a{font:inherit}
@media(min-width:701px) and (max-width:950px) and (max-height:520px){.alternatives .alternative{flex-direction:column;gap:3px}.alternatives .alternative img{width:30px;height:24px}}
.place-picture.photo.portrait img{aspect-ratio:4/5;max-height:360px}
@media(max-width:700px){.place-picture.photo img{max-height:290px}.place-panel:has(.photo) #placeName{font-size:28px}.place-panel:has(.photo) #placeHint{font-size:13px}.place-panel:has(.photo) .place-info{padding-top:8px}.place-picture.photo .listen-cue{font-size:11px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){.place-picture.photo img{max-height:220px}.place-panel:has(.photo) #placeName{font-size:23px}.place-panel:has(.photo) #placeHint{font-size:12px}.place-panel:has(.photo) .country-line{font-size:14px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px) and (max-width:700px){.flag-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Quiet flag accents frame the worldwide button; decoration is never an input. */
.region-picker{padding-top:14px}
.region-hero{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);gap:12px;align-items:center;margin-bottom:6px}
.region-hero .world-card{grid-column:auto;width:100%;gap:16px;min-height:132px;border-color:#9dc3b5;background:#e4f2ed}
.region-hero .world-card svg{width:44%;height:100px;flex-shrink:0}
.flag-decoration{position:relative;height:132px;pointer-events:none;user-select:none}
.flag-decoration::before{content:'';position:absolute;left:10%;right:9%;top:62px;border-top:1.5px dashed #d5b581;opacity:.5;transform:rotate(-13deg)}
.flag-decoration img{position:absolute;width:56px;height:40px;object-fit:contain;opacity:.86;filter:drop-shadow(0 3px 2px #26453812)}
.flag-decoration img:nth-child(1){left:12%;top:10px;transform:rotate(-10deg)}
.flag-decoration img:nth-child(2){left:42%;top:78px;transform:rotate(8deg)}
.flag-decoration img:nth-child(3){right:7%;top:22px;transform:rotate(-5deg)}
.flag-decoration.right img:nth-child(1){left:6%;top:23px;transform:rotate(8deg)}
.flag-decoration.right img:nth-child(2){left:24%;top:82px;transform:rotate(-8deg)}
.flag-decoration.right img:nth-child(3){right:6%;top:7px;transform:rotate(11deg)}
@media(max-width:700px){
 .region-picker{padding-top:7px}
 .region-hero{grid-template-columns:minmax(0,1fr) minmax(0,3fr) minmax(0,1fr);gap:8px;margin-bottom:3px}
 .region-hero .world-card{flex-direction:column;gap:4px;padding:10px 8px;min-height:150px}
 .region-hero .world-card svg{width:100%;height:80px}
 .flag-decoration{height:150px}
 .flag-decoration img{width:30px;height:24px}
 .flag-decoration::before{left:45%;right:auto;top:24px;height:95px;border-top:0;border-left:1.5px dashed #d5b581;transform:rotate(-12deg)}
 .flag-decoration img:nth-child(1){left:0;top:11px;transform:rotate(-12deg)}
 .flag-decoration img:nth-child(2){left:auto;right:0;top:63px;transform:rotate(8deg)}
 .flag-decoration img:nth-child(3){right:auto;left:4px;top:115px;transform:rotate(-5deg)}
 .flag-decoration.right img:nth-child(1){left:auto;right:0;top:11px;transform:rotate(10deg)}
 .flag-decoration.right img:nth-child(2){left:0;top:63px;transform:rotate(-8deg)}
 .flag-decoration.right img:nth-child(3){right:3px;top:115px;transform:rotate(7deg)}
}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){
 .region-picker{padding-top:4px}
 .region-hero{grid-template-columns:minmax(0,1fr) minmax(0,2fr) minmax(0,1fr);gap:9px}
 .region-hero .world-card{flex-direction:row;min-height:99px;gap:9px}
 .region-hero .world-card svg{width:40%;height:72px}
 .flag-decoration{height:97px}
 .flag-decoration img{width:34px;height:25px}
 .flag-decoration img:nth-child(2){top:64px}
 .flag-decoration img:nth-child(3){top:8px;left:auto;right:3px}
 .flag-decoration.right img:nth-child(2){top:64px}
 .flag-decoration.right img:nth-child(3){top:8px}
}

/* Soft region colours; subject illustrations stay outside the controls. */
.region-card[data-region="asia"]{--card:#fff0e4;--map-tone:#ffead9;--card-line:#e8bb96;--accent:#dc9361}
.region-card[data-region="europe"]{--card:#eef0ff;--map-tone:#e2e7ff;--card-line:#bec6e9;--accent:#8e93ce}
.region-card[data-region="africa"]{--card:#fff6d7;--map-tone:#ffedb5;--card-line:#e7cc7e;--accent:#d8a640}
.region-card[data-region="north"]{--card:#e6f5ff;--map-tone:#d9edfa;--card-line:#a7cde4;--accent:#75abc6}
.region-card[data-region="south"]{--card:#ffeaf0;--map-tone:#fbdbe6;--card-line:#e7b3c4;--accent:#ce829f}
.region-card[data-region="oceania"]{--card:#e8f7ec;--map-tone:#d8efdf;--card-line:#abd4b7;--accent:#79b791}
.region-card:not(.world-card){background:var(--card);border-color:var(--card-line);box-shadow:0 4px 0 var(--map-tone)}
.region-map-art{display:flex;align-items:center;width:100%;min-width:0;background:var(--map-tone,#e5f4f7);border-radius:16px;padding:7px 8px;gap:4px}
.region-card .region-map-art svg{width:100%;min-width:0;flex:1 1 0;height:96px;background:transparent}
.region-card svg path.region-highlight{fill:var(--accent,#e4ab65)}
.region-hero{margin-top:1px}
.region-hero .world-card{background:#dcf0e9;border-color:#8fbcac}
.region-hero .world-card .region-map-art{width:44%;flex:0 0 44%;padding:0;background:#d7ebe5}
.region-hero .world-card .region-map-art svg{width:100%;height:100px}
.flag-decoration{height:180px;background:radial-gradient(circle at 69% 63%,#ffebbc7a 0 32px,transparent 33px),radial-gradient(circle at 44% 33%,#e4e9f88c 0 33px,transparent 34px)}
.flag-decoration.right{background:radial-gradient(circle at 25% 64%,#f6dfe880 0 34px,transparent 35px),radial-gradient(circle at 70% 35%,#d7eff080 0 37px,transparent 38px)}
.flag-decoration img{opacity:1}
.flag-decoration img:nth-child(1){left:6%;top:10px}
.flag-decoration img:nth-child(2){left:11%;top:112px}
.flag-decoration img:nth-child(3){right:2%;top:10px}
.flag-decoration .hero-motif{width:77px;height:77px;transform:none;object-fit:contain;filter:drop-shadow(0 3px 1px #3457440c)}
.flag-decoration .motif-1{left:32%;top:35px;transform:rotate(-5deg)}
.flag-decoration .motif-2{left:auto;right:8%;top:87px;width:68px;height:91px;transform:rotate(5deg)}
.flag-decoration.right img:nth-child(1){left:1%;top:9px}
.flag-decoration.right img:nth-child(2){left:64%;top:108px}
.flag-decoration.right img:nth-child(3){right:2%;top:11px}
.flag-decoration.right .motif-1{left:11%;top:63px;width:56px;height:103px;transform:rotate(-6deg)}
.flag-decoration.right .motif-2{right:7%;top:38px;width:75px;height:70px;transform:rotate(6deg)}
@media(max-width:700px){
 .region-map-art{padding:4px;gap:2px}
 .region-card .region-map-art svg{height:81px;width:100%}
 .region-hero .world-card .region-map-art{width:100%;flex:auto}
 .region-hero .world-card .region-map-art svg{height:80px;width:100%}
 .flag-decoration{height:174px;background:none!important}
 .flag-decoration img:nth-child(1){left:0;top:5px}
 .flag-decoration img:nth-child(2){left:auto;right:0;top:140px}
 .flag-decoration img:nth-child(3){display:none}
 .flag-decoration .motif-1{left:1px;top:37px;width:48px;height:44px}
 .flag-decoration .motif-2{left:1px;right:auto;top:84px;width:45px;height:55px}
 .flag-decoration.right img:nth-child(1){left:auto;right:0;top:5px}
 .flag-decoration.right img:nth-child(2){left:0;top:140px}
 .flag-decoration.right .motif-1{left:0;top:38px;width:44px;height:65px}
 .flag-decoration.right .motif-2{right:0;left:auto;top:105px;width:46px;height:35px}
}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){
 .flag-decoration{height:127px;background:none!important}
 .flag-decoration img:nth-child(1){left:0;top:1px}
 .flag-decoration img:nth-child(2){left:13%;top:94px}
 .flag-decoration img:nth-child(3){display:block;right:0;left:auto;top:6px}
 .flag-decoration .motif-1{left:30%;top:25px;width:53px;height:45px}
 .flag-decoration .motif-2{left:auto;right:4%;top:64px;width:43px;height:58px}
 .flag-decoration.right img:nth-child(1){left:0;right:auto;top:1px}
 .flag-decoration.right img:nth-child(2){left:65%;top:94px}
 .flag-decoration.right .motif-1{left:7%;top:45px;width:38px;height:67px}
 .flag-decoration.right .motif-2{left:auto;right:2%;top:35px;width:47px;height:43px}
 .region-hero .world-card .region-map-art{width:40%;flex:0 0 40%}
 .region-hero .world-card .region-map-art svg{height:72px}
 .region-card .region-map-art svg{height:69px}
}

/* Country videos and official introductions: ordinary external links, no embeds. */
.country-explore-links{display:grid;grid-column:1/-1;order:4;flex:none;gap:5px;min-width:0;width:100%;padding:11px 0 2px;border-top:1px solid var(--line);margin-top:11px;text-align:center}
.country-explore-link{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;min-width:0;min-height:46px;border:1.5px solid #bad5cb;border-radius:13px;background:#e5f1eb;color:#294e41;text-decoration:none;font-size:17px;font-weight:700;touch-action:manipulation;padding:8px 12px}
.country-explore-link:hover{background:#d7eade}.country-explore-link [data-fit]{display:block;min-width:0;white-space:nowrap}.country-explore-provider{display:block;min-width:0;max-width:100%;font-size:11px;white-space:nowrap;color:#587466}.country-explore-note{font-size:11px;color:#6b7c68}

/* Keep the full quiz name on one line, including narrow phones. */
.mode{display:flex;align-items:center;justify-content:center;gap:6px;min-width:0;padding-inline:8px}.mode>[data-fit]{display:block;min-width:0}.mode>[aria-hidden]{flex-shrink:0}

/* Sound is an explicit, persistent choice, available before choosing a region. */
.sound-controls{display:flex;justify-content:space-between;gap:12px;margin:-4px 0 8px;min-width:0}
.sound-controls .small-button{display:flex;align-items:center;justify-content:center;gap:6px;width:min(180px,calc((100% - 12px)/2));min-height:44px;min-width:0;max-width:100%;font-size:16px;padding:7px 10px}
.sound-controls .small-button [data-fit]{display:block;min-width:0;white-space:nowrap}
.sound-controls #changeRegion{margin-left:auto;background:#cdeaff;border-color:#87badd;color:#224e73}
#soundToggle[aria-pressed="true"]{background:#ffd3e1;border-color:#dc96ad;color:#6c2843}
#soundToggle[aria-pressed="false"]{background:#e7dfff;border-color:#b6a1d3;color:#5c487d}
#soundLabel{display:block;min-width:0;white-space:nowrap}
@media(max-width:700px){.sound-controls .small-button{font-size:14px}}
@media(orientation:landscape) and (max-height:500px){.sound-controls{margin:0 0 6px}.sound-controls .small-button{font-size:14px}}
#photoDialog p:empty,#photoDialog p:has(>a[hidden]){display:none}
#offlineStatus{max-width:100%;white-space:nowrap}
.language-controls{display:flex;justify-content:center;margin:-3px 0 9px}.language-controls button{min-height:40px;padding:6px 20px;background:#f0eafa;border-color:#cfbde6;color:#584774;font-size:14px;white-space:nowrap}
.dialog-heading h2{min-width:0;flex:1}.dialog-heading button{flex:none}.credit span[data-fit]{display:block;max-width:100%;white-space:nowrap}
html[lang="en"] body{font-family:Arial,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif}
html[lang="en"] .topbar h1{letter-spacing:0;font-size:30px}html[lang="en"] #placeName{letter-spacing:0}
html[lang="en"] .region-label{letter-spacing:0}html[lang="en"] .region-count{white-space:nowrap}
html[lang="en"] .alternative{flex-direction:column;gap:3px}html[lang="en"] .alternative span{width:100%}
@media(max-width:700px){html[lang="en"] .flag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html[lang="en"] .quiz .flag-grid,html[lang="en"] body.quiz .flag-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html[lang="en"] .topbar h1{font-size:25px}html[lang="en"] .region-label{font-size:17px}html[lang="en"] .help-button{font-size:12px}}
@media(orientation:landscape) and (max-height:500px) and (min-width:560px){.language-controls{margin:0 0 5px}.language-controls button{min-height:36px;font-size:13px}html[lang="en"] .flag-grid{grid-template-columns:repeat(5,minmax(0,1fr))}html[lang="en"] body.quiz .flag-grid{grid-template-columns:repeat(4,minmax(0,1fr))}html[lang="en"] .topbar h1{font-size:22px}}
@media(max-width:700px){#offlineStatus{width:100vw;max-width:none;margin-left:50%;transform:translateX(-50%);padding-inline:1px;font-size:clamp(10px,3vw,12px);letter-spacing:-.01em}}
/* Keep the full topic name beside its thumbnail without crowding desktop cards. */
@media(min-width:701px) and (min-height:521px){.alternatives .alternative{flex-direction:column;gap:3px}.alternatives .alternative span{width:100%}}

/* Keep the longest Japanese country name readable in landscape flag cards. */
@media(orientation:landscape) and (max-height:500px) and (min-width:701px) and (max-width:950px){html[lang="ja"] body:not(.quiz) .flag-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}

/* Keep the full St Vincent/Grenadines name readable without shortening it. */
.flag-choice[data-country="vc"]{grid-column:span 2}
@media(max-width:360px){html[lang="ja"] body.quiz .flag-choice[data-country="kn"],html[lang="ja"] body.quiz .flag-choice[data-country="ag"]{grid-column:span 2}}
.country-explore-link{padding-inline:8px;gap:4px}

/* Adult settings stay inside the guide, away from the play controls. */
.youtube-settings{border:1.5px solid var(--line);border-radius:16px;padding:14px;margin:12px 0 18px;background:#f0f4e9}
.youtube-settings h3{margin:0 0 10px;white-space:nowrap}
.youtube-setting-control{display:flex;align-items:center;gap:9px;min-height:48px;cursor:pointer;font-weight:700;min-width:0}
.youtube-setting-control input{flex:none;width:23px;height:23px;margin:0;accent-color:var(--green)}
.youtube-setting-control span{flex:1;min-width:0;white-space:nowrap;font-size:16px}
.youtube-setting-control strong{flex:none;border-radius:12px;padding:3px 8px;font-size:13px;background:#e0e6d8}
.youtube-setting-control:has(input:checked) strong{background:#d3e9c6;color:#29473f}
.youtube-setting-control:focus-within{outline:2px solid var(--green);outline-offset:4px;border-radius:8px}
.youtube-settings p{font-size:14px;line-height:1.7;margin:8px 0 0}
#youtubeLinksSaveNotice{color:#805225}
.language-controls{gap:8px;flex-wrap:wrap}
.language-controls #countryScriptToggle[aria-pressed="true"]{background:#e3eed8;border-color:#a7be92;color:#29473f}
#mapLabels{pointer-events:none}
.city-name{font-family:var(--font);font-size:14px;font-weight:700;fill:#213f39;stroke:#fffdf7;stroke-width:3px;stroke-linejoin:round;paint-order:stroke}
.city-dot{fill:#284a43;stroke:#fffdf7;stroke-width:1.2px}
.map-label-credits p{font-size:14px;overflow-wrap:anywhere}
/* City labels belong to round dots; the yellow star identifies the featured topic. */
.city-label{fill:#fffdf7;stroke:#57776f;stroke-width:1px}
.city-leader{stroke:#284a43;stroke-width:1.2px}
.map-legend{display:flex;justify-content:center;gap:24px;align-items:center;padding:6px 10px 8px;font-size:13px;font-weight:700;color:#284a43}
.map-legend[hidden]{display:none}
.map-legend>span{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.map-legend svg{width:14px;height:14px;overflow:visible;flex:none}

@media(max-width:420px){.topbar .trial{display:none}.topbar h1{width:100%;justify-content:center}.topbar h1 [data-fit]{flex:0 1 auto}}

.source-link{display:block;white-space:nowrap;min-width:0;max-width:100%}.source-country{display:block;font-size:13px;color:#627c65;margin:3px 0}.install-area{text-align:center;margin:18px 0 8px}.install-area button{max-width:100%;min-height:44px;font-size:16px;padding:8px 20px}.install-area p{font-size:12px;line-height:1.6;margin:8px auto 0;color:#627c65;max-width:500px}
