/* The atlas has its own styles. Home and reading retain their approved design. */
#mapView { padding:0; background:#fff; }
#mapRoute { padding:18px 18px 30px; margin:0; }
#mapRoute::before { display:none; }
#mapRoute * { box-sizing:border-box; }
#mapRoute button { font-family:inherit; cursor:pointer; -webkit-tap-highlight-color:transparent; }
#mapRoute button:disabled { cursor:default; }
#mapRoute button:focus-visible,#mapRoute summary:focus-visible { outline:3px solid #587f89; outline-offset:3px; }
#mapRoute svg { width:24px; height:24px; flex-shrink:0; }
.atlas-intro { margin:0 0 18px; }
.atlas-intro>p { margin:0 0 8px; color:#70857b; font-size:12px; letter-spacing:.1em; }
.atlas-intro>div { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.atlas-intro h2 { margin:0; font-family:"Songti SC","Noto Serif SC",serif; font-size:29px; font-weight:650; letter-spacing:.05em; color:#294d42; }
.atlas-footprints { display:flex; align-items:center; gap:4px; padding:8px 10px; font-size:11px; white-space:nowrap; color:#587467; border:1px solid #dfebe3; border-radius:24px; }
.atlas-footprints svg { width:16px !important; height:16px !important; }
.atlas-footprints strong { font-size:18px; font-weight:600; margin-right:1px; }
.atlas-mode { display:grid; grid-template-columns:1fr 1fr; gap:4px; background:#f1f5f3; padding:5px; border-radius:17px; margin-bottom:18px; }
.atlas-mode button { display:flex; align-items:center; justify-content:center; gap:8px; min-height:44px; border:0; border-radius:12px; color:#637a70; background:transparent; font-size:14px; font-weight:600; transition:background .16s,color .16s; }
.atlas-mode button[aria-pressed=true] { background:#fff; color:#315d4c; box-shadow:0 2px 8px #325c4212; }
.atlas-mode svg { width:21px !important; height:21px !important; }
.atlas-grade-picker { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; margin:0 -3px 17px; }
.atlas-grade-picker button { display:flex; flex-direction:column; align-items:center; gap:6px; background:transparent; border:0; color:#668073; padding:3px 0 7px; min-height:70px; }
.atlas-grade-picker button>span { display:grid; place-items:center; width:35px; height:35px; font-family:"Songti SC",serif; font-size:19px; background:#fff; border:1px solid #e2ebe5; border-radius:50%; }
.atlas-grade-picker small { font-size:11px; line-height:1.5; white-space:nowrap; }
.atlas-grade-picker button[aria-pressed=true]>span { color:#fff; border-color:#3e715b; background:#3e715b; box-shadow:0 4px 9px #315a4b20; }
.atlas-grade-picker button[aria-pressed=true] { color:#315a49; }
.atlas-grade-intro { padding:0 2px; margin-bottom:16px; }
.atlas-grade-intro>span { display:flex; align-items:center; gap:5px; color:#698e78; font-size:12px; }
.atlas-grade-intro svg { width:16px !important; height:16px !important; }
.atlas-grade-intro p { margin:6px 0 0; color:#76867e; font-size:12px; line-height:1.7; }
.atlas-book { overflow:hidden; border:1px solid #e5eee8; border-radius:23px; background:#fff; margin:0 0 20px; box-shadow:0 5px 20px #496b4906; }
.atlas-book-head { position:relative; min-height:122px; padding:22px 20px 18px; overflow:hidden; background:#f5f9f6; }
.atlas-book-head>img { position:absolute; width:57%; height:100%; right:0; top:0; object-fit:cover; object-position:50% 65%; opacity:.78; mask-image:linear-gradient(to left,#000 45%,transparent); -webkit-mask-image:linear-gradient(to left,#000 45%,transparent); }
.atlas-book-head>div { position:relative; z-index:1; }
.atlas-book-head p { margin:0 0 7px; color:#64806e; font-size:11px; letter-spacing:.1em; }
.atlas-book-head h3 { margin:0 0 9px; color:#31584a; font-family:"Songti SC","Noto Serif SC",serif; font-size:20px; font-weight:600; }
.atlas-book-head span { font-size:11px; background:#ffffffeb; color:#5f7d68; border:1px solid #ffffff; border-radius:20px; padding:4px 8px; }
.atlas-book-mark { position:absolute; z-index:1; right:18px; bottom:18px; color:#396f535c; transform:rotate(-20deg); }
.atlas-stations { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:0 6px; padding:23px 13px 8px; }
.atlas-station { position:relative; display:flex; flex-direction:column; align-items:center; min-width:0; min-height:114px; padding:0 4px 17px; border:0; background:transparent; text-align:center; color:#38574b; }
.atlas-station:not(:nth-child(3n+1))::before { content:''; position:absolute; top:23px; width:calc(100% + 6px); right:50%; border-top:1.5px dashed #d5e4d9; pointer-events:none; }
.atlas-node { position:relative; z-index:1; display:grid; place-items:center; width:47px; height:47px; flex-shrink:0; margin:0 0 10px; border:1px solid #cdddce; border-radius:50%; color:#7c9d88; font-size:15px; background:#fff; box-shadow:0 0 0 5px #fff; }
.atlas-station-title { width:100%; font-size:13px; font-weight:550; line-height:1.55; overflow-wrap:anywhere; }
.atlas-station small { margin-top:5px; color:#6b8476; font-size:11px; }
.atlas-station.is-done .atlas-node { background:#e8f4e9; border-color:#93b49b; color:#3e7856; box-shadow:0 0 0 5px #fff,0 3px 8px #366b4912; }
.atlas-station.is-done small { color:#4a7b59; }
.atlas-station.is-pending { color:#88968d; }
.atlas-station.is-pending .atlas-node { background:#f7f9f7; border-color:#e8eeea; color:#a0afa4; }
.atlas-extra { padding:0 18px 16px; }
.atlas-extra summary { padding:8px 0; font-size:11px; color:#708479; cursor:pointer; }
.atlas-extra summary>span { float:right; font-size:10px; }
.atlas-extra-list { border-top:1px solid #edf2ed; }
.atlas-footnote { color:#7d8b83; font-size:10px; line-height:1.8; padding:0 4px; }
.atlas-region-picker { display:flex; gap:7px; overflow:auto; padding:2px 2px 10px; margin:0 -2px 7px; scrollbar-width:none; }
.atlas-region-picker::-webkit-scrollbar { display:none; }
.atlas-region-picker button { flex-shrink:0; min-height:38px; border:1px solid #e1eae4; border-radius:25px; padding:8px 13px; background:#fff; color:#6c8175; font-size:12px; }
.atlas-region-picker button small { margin-left:5px; color:#91a798; font-size:9px; }
.atlas-region-picker button[aria-pressed=true] { color:#fff; border-color:#416e58; background:#416e58; }
.atlas-region-picker button[aria-pressed=true] small { color:#d5e6d9; }
.atlas-city-picker { position:relative; display:flex; gap:7px; overflow-x:auto; padding:3px 1px 8px; margin:17px 0 12px; scrollbar-width:thin; scrollbar-color:#cedcd2 transparent; scroll-snap-type:x proximity; }
.atlas-city-picker button { flex-shrink:0; min-height:42px; border:1px solid #e6ece7; border-radius:12px; padding:8px 11px; font-size:12px; color:#75877a; background:#fff; scroll-snap-align:start; }
.atlas-city-picker button small { margin-left:5px; color:#9aaba0; font-size:9px; }
.atlas-city-picker button[aria-pressed=true] { color:#9b604b; border-color:#d5aa97; background:#fff; }
.atlas-city-picker button.is-done { box-shadow:inset 0 -2px 0 #a8c4af; }
.atlas-city-detail { overflow:hidden; border:1px solid #e2ebe5; border-radius:23px; background:#fff; }
.atlas-city-head { position:relative; min-height:125px; display:flex; align-items:center; gap:16px; padding:21px 20px; background:#f7faf8; overflow:hidden; }
.atlas-city-head>img { position:absolute; inset:0 0 0 auto; height:100%; width:68%; object-fit:cover; mask-image:linear-gradient(to left,#000 20%,transparent 96%); -webkit-mask-image:linear-gradient(to left,#000 20%,transparent 96%); }
.atlas-city-head>div { position:relative; z-index:1; }
.atlas-city-head span { font-size:10px; color:#688f76; }
.atlas-city-head h3 { margin:8px 0; font-family:"Songti SC",serif; font-size:25px; letter-spacing:.08em; font-weight:500; color:#315b47; }
.atlas-city-head p { margin:0; font-size:10px; color:#617e69; }
.atlas-city-symbol { color:#83a48e; padding:10px; background:#fff; border:1px solid #e1ece4; border-radius:50%; }
.atlas-city-symbol svg { width:38px !important; height:38px !important; }
.atlas-city-poems { padding:5px 17px; }
.atlas-poem-row { display:flex; align-items:center; gap:10px; width:100%; min-height:76px; border:0; border-bottom:1px solid #edf1ed; padding:15px 0; text-align:left; background:#fff; color:#365745; }
.atlas-poem-row:last-child { border-bottom:0; }
.atlas-poem-row>span:nth-child(2) { flex:1; min-width:0; }
.atlas-poem-row strong { display:block; font-size:13px; font-weight:550; line-height:1.55; overflow-wrap:anywhere; }
.atlas-poem-row small { display:block; margin-top:5px; font-size:9px; line-height:1.6; color:#819487; }
.atlas-row-mark { display:grid; place-items:center; flex-shrink:0; width:29px; height:29px; border:1px solid #e4ece4; border-radius:10px; color:#8ba491; font-size:14px; }
.atlas-row-mark svg { width:17px !important; height:17px !important; }
.atlas-poem-row.is-done .atlas-row-mark { background:#eaf4e9; color:#5a8460; border-color:#dbe9d9; }
.atlas-row-action { flex-shrink:0; color:#9b6851; font-size:10px; white-space:nowrap; }
.atlas-poem-row:disabled .atlas-row-action { color:#9daa9f; }
.atlas-place-note { padding:20px 3px 0; color:#7c8d80; font-size:10px; }
.atlas-place-note summary { cursor:pointer; min-height:30px; }
.atlas-place-note p { margin:0; line-height:1.8; }
.atlas-empty { font-size:13px; color:#819286; padding:15px; line-height:1.8; }
@media(max-width:340px) {
  #mapRoute { padding-left:14px; padding-right:14px; }
  .atlas-grade-picker button>span { width:31px; height:31px; }
.atlas-grade-picker small { font-size:10px; }
  .atlas-intro h2 { font-size:26px; }
  .atlas-stations { padding-left:9px; padding-right:9px; }
  .atlas-station-title { font-size:12px; }
}
@media(prefers-reduced-motion:reduce) { .atlas-mode button { transition:none; } }

.atlas-geo-board { position:relative; height:390px; border:1px solid #d8e6e8; border-radius:24px; overflow:hidden; background:#edf4f7; }
#mapRoute .atlas-geographic { display:block; width:100%; height:100%; touch-action:none; user-select:none; cursor:grab; }
#mapRoute .atlas-geographic:active { cursor:grabbing; }
#mapRoute .atlas-geographic:focus-visible { outline:3px solid #587f89; outline-offset:-4px; }
.geo-province { fill:#dceadf; stroke:#a8c4b3; stroke-width:.8; vector-effect:non-scaling-stroke; }
.geo-province-name { fill:#6b8976; font-size:22px; text-anchor:middle; pointer-events:none; }
.geo-pin { cursor:pointer; }
.geo-hit { fill:transparent; }
.geo-dot { fill:#758e82; stroke:#fff; stroke-width:1.5; vector-effect:non-scaling-stroke; }
.geo-pin.in-region .geo-dot { fill:#477462; }
.geo-pin.is-done .geo-dot { fill:#2d8669; }
.geo-pin.is-selected .geo-dot { fill:#cc7852; stroke-width:2; }
.geo-pin text { display:none; fill:#315b47; font-size:26px; paint-order:stroke; stroke:#fff; stroke-width:6px; stroke-linejoin:round; pointer-events:none; }
.geo-pin.is-selected text { display:block; fill:#9c5332; }
.is-zoomed .geo-pin.in-region text { display:block; font-size:32px; stroke-width:5px; }
.is-zoomed .geo-province-name { display:none; }
.geo-pin:focus-visible .geo-dot { fill:#cc7852; stroke:#315d4c; }
.atlas-geo-title { position:absolute; top:15px; left:17px; font-size:13px; letter-spacing:.1em; color:#4b7061; padding:7px 10px; border-radius:10px; background:#ffffffdf; pointer-events:none; }
.atlas-map-controls { position:absolute; bottom:14px; right:14px; display:flex; align-items:center; gap:5px; }
#mapRoute .atlas-map-controls button { background:#fff; border:1px solid #d1e0da; border-radius:12px; min-height:44px; min-width:44px; padding:7px 12px; color:#365e4c; font-size:21px; box-shadow:0 2px 8px #305f4b12; }
#mapRoute .atlas-map-controls button:last-child { font-size:12px; }
.atlas-map-help { margin:10px 4px; font-size:11px; color:#6c8276; line-height:1.8; }
.atlas-map-help span { display:block; font-size:9px; color:#88998f; }
.atlas-area-note { color:#7a8d82; font-size:10px; line-height:1.7; margin:10px 4px; }
.atlas-place-note a { color:#547867; margin-left:5px; }
/* Scholar badges are derived from successful persisted lesson completions. */
.scholar-section { padding:12px 20px 24px; color:#325c48; }
.scholar-hero { text-align:center; padding:8px 0 16px; background:radial-gradient(ellipse at 50% 30%,#eaf4ed,transparent 67%); }
.scholar-hero>svg { display:block; width:152px; height:172px; margin:0 auto 8px; filter:drop-shadow(0 8px 8px #36534414); }
.scholar-hero>span { font-size:11px; letter-spacing:.2em; color:#789281; }
.scholar-hero h3 { font-family:"Songti SC",serif; font-weight:600; font-size:31px; letter-spacing:.16em; margin:7px 0; }
.scholar-hero p { font-size:12px; color:#71917e; margin:10px 0; }
.scholar-next { max-width:290px; margin:0 auto 26px; text-align:center; font-size:12px; color:#738b7c; }
.scholar-next [role=progressbar] { height:5px; background:#eaf0eb; overflow:hidden; border-radius:4px; margin-top:13px; }
.scholar-next i { display:block; height:100%; background:#719a7f; border-radius:4px; }
.scholar-heading { font-size:16px; font-weight:550; letter-spacing:.07em; margin:0 0 17px; }
.scholar-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 8px; }
.scholar-medal { text-align:center; position:relative; padding:11px 4px 13px; border:1px solid #edf0ed; border-radius:18px; background:#fff; }
.scholar-medal>svg { display:block; max-width:94px; width:100%; height:auto; aspect-ratio:144/164; margin:auto; filter:drop-shadow(0 3px 3px #36534410); }
.scholar-medal h4 { margin:6px 0; font-family:"Songti SC",serif; font-size:17px; letter-spacing:.1em; }
.scholar-medal p { font-size:10px; color:#7d9485; margin:5px 0; }
.scholar-medal small { display:inline-block; font-size:9px; color:#6f8e7a; padding:3px 7px; border-radius:6px; background:#eff6f0; }
.scholar-medal.is-locked svg { opacity:.7; filter:saturate(.45); }
.scholar-medal.is-locked { color:#94a398; }
.scholar-medal.is-locked small { color:#93a198; background:#f4f6f4; }
.scholar-medal.is-current { border-color:#b4cbbb; background:linear-gradient(#fff,#f6faf7); }
.scholar-medal.is-current small { background:#e5f1e8; color:#3f7352; }
.scholar-note { font-size:10px; color:#889a8e; line-height:1.8; margin:22px 0 0; }

.geo-pin-art { display:none; pointer-events:none; }
.geo-picture-ring { fill:#fff; stroke:#96b4a2; stroke-width:4px; }
.geo-pin.is-selected .geo-picture-ring { stroke:#c17c56; stroke-width:6px; }
.is-detailed .geo-pin-art { display:block; }
.is-detailed .geo-pin .geo-dot { display:none; }
.is-detailed .geo-pin .geo-hit { r:68px; }
.is-detailed .geo-pin .geo-city-name { transform:translateY(-59px); display:block; font-size:30px; }
.is-detailed .geo-pin .geo-poem-caption { display:block; font-size:30px; stroke-width:5px; }
