/* Sword Atlas — on the Kenjō look: dark sea, raking light, red seals, gold. Quiet, museum-grade. */
:root { --atl-gold: #d9bf7d; --atl-gold-d: #8f7a4c; --atl-ink: rgba(18,25,24,.86); --atl-glass: rgba(22,30,29,.78); --atl-line: rgba(196,203,200,.22); --tl-h: 104px; }
body.atlas #dock, body.atlas #legendchip, body.atlas #realms .x { display: none !important; }
body.atlas #compass { bottom: calc(var(--tl-h) + 70px); }
body.atlas #corner { bottom: calc(var(--tl-h) + 18px); }
body.atlas.hideui #atl-time, body.atlas.hideui #atl-layers, body.atlas.hideui #atl-search, body.atlas.hideui #atl-legend, body.atlas.hideui #atl-card { display: none; }
#mark b { letter-spacing: .32em; }
#mark span { font-family: Shippori, serif; letter-spacing: .18em; }

/* ---- layer seals (top-left, under the title) */
#atl-layers { position: fixed; left: 26px; top: 70px; width: 40px; display: flex; flex-direction: column; gap: 6px; z-index: 4; }
#atl-layers [data-l] { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; color: rgba(214,221,218,.55); cursor: pointer; font: 11px/1 var(--f-latin); letter-spacing: .2em; text-transform: uppercase; }
#atl-layers [data-l] i { width: 30px; height: 30px; display: grid; place-items: center; font: 700 16px/1 var(--f-ja); font-style: normal; color: rgba(214,221,218,.6);
  border: 1px solid var(--atl-line); background: rgba(22,30,29,.45); transition: background .25s, color .25s, border-color .25s; }
#atl-layers [data-l].on { color: #e3e8e5; }
#atl-layers [data-l].on i { background: var(--red); color: #f0e6dc; border-color: var(--red-hi); box-shadow: inset 0 0 6px rgba(0,0,0,.35); }
#atl-layers [data-l] span { opacity: 0; transform: translateX(-4px); transition: opacity .25s, transform .25s; }
#atl-layers:hover [data-l] span, #atl-layers [data-l]:focus-visible span { opacity: 1; transform: none; }
#atl-layers .wt { display: flex; margin-top: 10px; border: 1px solid var(--atl-line); width: max-content; }
#atl-layers .wt button { background: rgba(22,30,29,.5); border: 0; color: rgba(214,221,218,.55); font: 10px/1 var(--f-latin); letter-spacing: .14em; padding: 6px 8px; cursor: pointer; }
#atl-layers .wt button.on { color: #1a2120; background: var(--atl-gold); }

/* ---- search (top centre) */
#atl-search { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); width: min(380px, 60vw); z-index: 5; }
#atl-q { width: 100%; background: rgba(22,30,29,.62); border: 1px solid var(--atl-line); color: #e1e6e3; padding: 8px 12px; font: 15px var(--f-ital); letter-spacing: .03em; outline: none;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#atl-q:focus { border-color: var(--atl-gold-d); background: rgba(22,30,29,.85); }
#atl-q::placeholder { color: rgba(196,203,200,.45); }
#atl-res { list-style: none; margin: 4px 0 0; padding: 4px 0; max-height: 52vh; overflow: auto; background: var(--atl-ink); border: 1px solid var(--atl-line); }
#atl-res li { padding: 6px 12px; cursor: pointer; font: 14px var(--f-latin); color: #d9dfdc; }
#atl-res li span { font-family: var(--f-ja); color: #c9b98e; margin-left: 6px; }
#atl-res li small { display: block; font: italic 13px var(--f-ital); color: #94a19c; letter-spacing: .02em; }
#atl-res li.on, #atl-res li:hover { background: rgba(161,135,90,.18); }

/* ---- map labels */
.atl-lbl { pointer-events: auto; cursor: pointer; }
.atl-c { display: flex; flex-direction: column; align-items: center; padding-top: 30px; text-shadow: 0 0 3px rgba(12,18,17,.95), 0 0 12px rgba(12,18,17,.7); }
.atl-c i { font: 700 15px/1.1 var(--f-ja); font-style: normal; color: #f1ead9; letter-spacing: .12em; }
.atl-c b { font: 500 10px/1.3 var(--f-latin); letter-spacing: .24em; text-transform: uppercase; color: rgba(222,214,190,.86); }
.atl-c.tosogu i { color: #f3dcc0; } .atl-c.tosogu b { color: rgba(236,196,160,.85); }
.atl-m { display: flex; flex-direction: column; align-items: center; text-shadow: 0 0 3px rgba(12,18,17,.95), 0 0 10px rgba(12,18,17,.7); }
.atl-m b { font: italic 600 15px/1.1 var(--f-ital); color: #f4e4bc; letter-spacing: .02em; }
.atl-m small { font: 9.5px/1.4 var(--f-latin); letter-spacing: .16em; color: rgba(222,214,190,.75); text-transform: uppercase; }
.atl-e { display: flex; align-items: center; gap: 7px; text-shadow: 0 0 3px rgba(12,18,17,.95), 0 0 10px rgba(12,18,17,.7); }
.atl-e i { font: 700 13px/1 var(--f-ja); font-style: normal; color: #f0e6dc; background: var(--red); padding: 5px 4px; box-shadow: inset 0 0 5px rgba(0,0,0,.35), 0 0 0 1px rgba(155,42,31,.6); }
.atl-e b { font: 500 12px/1.2 var(--f-latin); letter-spacing: .12em; color: #ecdcc8; }
.atl-e small { display: block; font: 12px var(--f-ja); color: rgba(226,214,200,.72); letter-spacing: .06em; }
.atl-e > b, .atl-e > small { grid-column: 2; } .atl-e { display: grid; grid-template-columns: auto auto; column-gap: 7px; } .atl-e i { grid-row: 1 / span 2; }

/* ---- legend (power) */
#atl-legend { position: fixed; left: 76px; top: 70px; width: 236px; max-height: calc(100vh - var(--tl-h) - 140px); overflow: auto; background: var(--atl-glass); border: 1px solid var(--atl-line); padding: 10px 14px; z-index: 4; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
#atl-legend h4 { cursor: pointer; margin: 0 0 8px; white-space: nowrap; letter-spacing: .14em !important; } #atl-legend h4::after { content: ' ▾'; color: #8c9893; } #atl-legend.min h4::after { content: ' ▸'; } #atl-legend.min > :not(h4) { display: none; } #atl-legend.min h4 { margin: 0; }
#atl-legend h4 { font: 10.5px var(--f-latin); letter-spacing: .2em; color: var(--atl-gold); text-transform: uppercase; }
#atl-legend .hl { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; font: 12px var(--f-latin); color: #d6dcd9; margin: 2px 0; letter-spacing: .04em; white-space: nowrap; } #atl-legend .hl span { overflow: hidden; text-overflow: ellipsis; }
#atl-legend .hl i, .hold i { width: 14px; height: 10px; display: block; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
#atl-legend .hl small { display: block; font: italic 12.5px var(--f-ital); color: #94a19c; line-height: 1.25; letter-spacing: .01em; }
#atl-legend .hl em { font: italic 12px var(--f-ital); color: #94a19c; }
#atl-legend p { font: italic 12px/1.3 var(--f-ital); color: #a9b4b0; margin: 6px 0 0; }
.hatch { background: repeating-linear-gradient(45deg, #7d817b 0 3px, #5c342e 3px 6px) !important; }

/* ---- the side card */
#atl-card { position: fixed; right: 26px; top: 70px; width: min(380px, 92vw); max-height: calc(100vh - var(--tl-h) - 120px); overflow: auto; z-index: 6;
  background: linear-gradient(rgba(28,37,36,.95), rgba(22,30,29,.95)); border: 1px solid var(--atl-line); padding: 18px 20px 16px; color: #d3d9d6;
  font: 15px/1.5 var(--f-ital); box-shadow: 0 18px 50px rgba(0,0,0,.35); animation: atlRise .42s var(--ease); }
@keyframes atlRise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#atl-card .x { position: absolute; right: 10px; top: 8px; background: none; border: 0; color: #9aa7a2; font-size: 22px; cursor: pointer; }
#atl-card .hd { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
#atl-card .seal { width: 40px; height: 40px; flex: none; display: grid; place-items: center; font: 700 20px var(--f-ja); color: #f0e6dc; background: var(--red);
  box-shadow: inset 0 0 7px rgba(0,0,0,.4); }
#atl-card .seal.red { background: var(--red-hi); }
#atl-card h2 { margin: 0; font: 700 25px/1.15 var(--f-ja); letter-spacing: .08em; color: #f1ead9; }
#atl-card .en { font: 11px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #aeb8b4; margin-top: 3px; }
#atl-card h3 { font: 10.5px var(--f-latin); letter-spacing: .22em; text-transform: uppercase; color: var(--atl-gold); margin: 16px 0 6px; font-weight: 500; }
#atl-card h3 .k { text-transform: none; letter-spacing: .02em; font: italic 13px var(--f-ital); color: #94a19c; margin-left: 6px; }
#atl-card p { margin: 4px 0; }
#atl-card .k, #tip .k { color: #94a19c; }
#atl-card dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 14px; margin: 8px 0 0; }
#atl-card dt { font: 10px var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: #8c9893; padding-top: 3px; } #atl-card dd { margin: 0; }
#atl-card a { color: #e2cf9d; text-decoration: none; } #atl-card a:hover { color: #f4e2b2; }
#atl-card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
#atl-card .chips span { font: 10px/1 var(--f-latin); letter-spacing: .14em; text-transform: uppercase; color: #c3cbc8; border: 1px solid var(--atl-line); padding: 5px 8px; }
#atl-card .chips .trad { border-color: var(--c); color: var(--c); } #atl-card .chips .trad i { font: 12px var(--f-ja); font-style: normal; margin-left: 4px; }
.conf { font: 10px/1 var(--f-latin) !important; letter-spacing: .14em; text-transform: uppercase; padding: 4px 7px !important; border: 1px solid currentColor !important; display: inline-block; }
.conf.certain { color: #9fc7a8 !important; } .conf.probable { color: #c9c18f !important; } .conf.tradition { color: #c9a0d6 !important; } .conf.disputed { color: #d79a8a !important; } .conf.seed, .seed { color: #e0a060 !important; border-color: #e0a060 !important; }
#atl-card .mks { display: flex; flex-direction: column; }
#atl-card a.amk { display: block; padding: 5px 0; border-bottom: 1px solid rgba(196,203,200,.08); color: #e6e0cf; }
#atl-card a.amk b { font: 500 13.5px var(--f-latin); letter-spacing: .06em; } #atl-card a.amk span { font: 14px var(--f-ja); color: #d3c08e; }
#atl-card a.amk small { display: block; font: italic 13px var(--f-ital); color: #94a19c; }
#atl-card a.amk:hover b { color: #f4e2b2; }
#atl-card .lnk { cursor: pointer; } #atl-card .lnk:hover { color: #f4e2b2; }
#atl-card .schools a { font: 12px var(--f-latin); letter-spacing: .08em; }
#atl-card .out { font: 11px var(--f-latin); letter-spacing: .16em; text-transform: uppercase; }
#atl-card .src { margin-top: 14px; font: 13px/1.4 var(--f-ital); color: #94a19c; }
#atl-card .src summary { cursor: pointer; font: 10px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #8c9893; }
#atl-card .src ol { padding-left: 18px; margin: 6px 0 0; }
#atl-card .spark { width: 100%; height: 46px; display: block; margin-top: 6px; }
#atl-card .spark .e0 { fill: rgba(196,203,200,.035); } #atl-card .spark .e1 { fill: rgba(196,203,200,.075); }
#atl-card .spark .l { fill: none; stroke: var(--atl-gold); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
#atl-card .spark .now { stroke: #c9796d; stroke-width: 1; vector-effect: non-scaling-stroke; }
#atl-card .sparkax { display: flex; justify-content: space-between; font: italic 11.5px var(--f-ital); color: #7f8c87; }
.ahold { list-style: none; padding: 0; margin: 0; }
.ahold li { display: grid; grid-template-columns: 14px 40px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid rgba(196,203,200,.08); cursor: pointer; }
.ahold li i { width: 14px; height: 10px; display: block; margin-top: 5px; } .ahold li em { font: 12px var(--f-latin); color: #c9796d; font-style: normal; padding-top: 2px; }
.ahold li b { font: 500 14px/1.3 var(--f-ital); color: #e6e0cf; } .ahold li small { display: block; font: italic 12.5px/1.35 var(--f-ital); color: #94a19c; } .ahold li small.ja { font: 12.5px var(--f-ja); color: #c9b98e; font-style: normal; }
.ahold li .conf { margin-left: 4px; } .ahold details { font: 13px/1.4 var(--f-ital); color: #a9b4b0; } .ahold summary { font: 9.5px var(--f-latin); letter-spacing: .18em; text-transform: uppercase; color: #7f8c87; cursor: pointer; }
.ahold li.on, .ahold li:hover { background: rgba(161,135,90,.1); }

#tip b { font-family: var(--f-latin); }

/* ---- timeline (bottom) */
#atl-time .keyw { position: relative; grid-column: 3; grid-row: 1; height: 0; }
#atl-time { position: fixed; left: 1.6vh; right: 1.6vh; bottom: 1.6vh; height: var(--tl-h); display: grid; grid-template-columns: auto 205px 1fr; align-items: stretch; z-index: 5;
  background: linear-gradient(rgba(18,25,24,.0), rgba(18,25,24,.62) 30%, rgba(14,20,19,.82)); border-top: 1px solid var(--atl-line); }
#atl-time .ctl { display: flex; flex-direction: column; justify-content: center; gap: 6px; padding: 0 10px 0 18px; }
#atl-play { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--atl-gold-d); background: rgba(22,30,29,.6); color: var(--atl-gold); font-size: 13px; cursor: pointer; letter-spacing: -.1em; }
#atl-play.on { background: var(--red); border-color: var(--red-hi); color: #f0e6dc; }
#atl-speed { background: none; border: 0; color: #8c9893; font: 10px var(--f-latin); letter-spacing: .1em; cursor: pointer; padding: 0; }
#atl-time .read { display: flex; flex-direction: column; justify-content: center; padding: 0 8px; }
#atl-year { font: 500 34px/1 var(--f-latin); color: #f1ead9; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
#atl-nengo { font: 14px/1.4 var(--f-ja); color: #d3c08e; letter-spacing: .08em; white-space: nowrap; }
#atl-nengo span { font: italic 13px var(--f-ital); color: #a9b4b0; letter-spacing: .02em; margin-left: 4px; }
#atl-nengo em { font: 11.5px var(--f-ja); color: #9aa7a2; font-style: normal; margin-left: 6px; }
#atl-era { font: 10px var(--f-latin); letter-spacing: .22em; text-transform: uppercase; color: #9aa7a2; }
#atl-track { position: relative; margin: 26px 26px 12px 8px; cursor: ew-resize; touch-action: none; }
#atl-track .bands { position: absolute; left: 0; right: 0; top: 0; height: 36px; }
#atl-track .band { position: absolute; top: 0; height: 100%; border-left: 1px solid rgba(196,203,200,.16); overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding-left: 6px; }
#atl-track .band.b0 { background: rgba(196,203,200,.035); } #atl-track .band.b1 { background: rgba(196,203,200,.075); }
#atl-track .band i { font: 13px/1.1 var(--f-ja); font-style: normal; color: rgba(225,214,180,.82); letter-spacing: .1em; white-space: nowrap; }
#atl-track .band span { font: 8.5px/1.4 var(--f-latin); letter-spacing: .14em; text-transform: uppercase; color: rgba(196,203,200,.55); white-space: nowrap; }
#atl-track .evs { position: absolute; left: 0; right: 0; top: 38px; height: 8px; }
#atl-track .evs i { position: absolute; width: 5px; height: 5px; margin-left: -2.5px; top: 1px; background: #b8463a; transform: rotate(45deg); }
#atl-track .evs b { position: absolute; width: 1px; height: 7px; margin-left: -.5px; top: 0; background: rgba(240,220,170,.6); }
#atl-track .ticks { position: absolute; left: 0; right: 0; top: 48px; height: 12px; }
#atl-track .ticks span { position: absolute; transform: translateX(-50%); font: 9px var(--f-latin); color: rgba(196,203,200,.5); letter-spacing: .08em; }
#atl-span { position: absolute; top: 34px; height: 4px; background: var(--atl-gold); box-shadow: 0 0 8px rgba(217,191,125,.8); min-width: 3px; }
#atl-head { position: absolute; top: -6px; bottom: 6px; width: 0; }
#atl-head::before { content: ''; position: absolute; left: -.5px; top: 0; bottom: 0; width: 1px; background: var(--atl-gold); box-shadow: 0 0 6px rgba(217,191,125,.7); }
#atl-head i { position: absolute; left: -5px; top: -2px; width: 10px; height: 10px; background: var(--atl-gold); transform: rotate(45deg); }
#atl-seed { position: fixed; right: 110px; bottom: calc(var(--tl-h) + 26px); font: 10px var(--f-latin); letter-spacing: .14em; color: #e0a060; text-transform: uppercase; z-index: 4; max-width: 34vw; text-align: right; line-height: 1.5; }
#atl-seed span { text-transform: none; font: italic 12px var(--f-ital); color: #b59a7a; letter-spacing: .02em; }
#help .about { font: 15px/1.5 var(--f-ital); color: #c4cbc8; margin: 0 0 12px; }

@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  :root { --tl-h: 104px; }
  #atl-time { grid-template-columns: auto 1fr; grid-template-rows: auto 1fr; }
  #atl-time .read { flex-direction: row; gap: 10px; align-items: baseline; } #atl-year { font-size: 24px; } #atl-era { display: none; }
  #atl-track { grid-column: 1 / -1; margin: 4px 16px 10px; }
  #atl-track .band span { display: none; }
  #atl-search { top: 60px; width: calc(100vw - 32px); }
  #atl-card { left: 0; right: 0; top: auto; bottom: calc(var(--tl-h) + 2vh); width: auto; max-height: 52vh; }
  #atl-layers { top: 110px; left: 16px; }
}
#atl-card .crow { border-left: 2px solid rgba(196,203,200,.14); padding: 2px 0 6px 10px; margin: 8px 0; opacity: .72; }
#atl-card .crow.live { border-left-color: var(--atl-gold); opacity: 1; }
#atl-card .crow .rh { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
#atl-card .crow .rh b { font: 500 12.5px var(--f-latin); letter-spacing: .08em; color: #e9e1cc; }
#atl-card .crow .yr { font: 12px var(--f-latin); color: #c9796d; cursor: pointer; }
#atl-card .crow .src { margin-top: 4px; }
#atl-card i.lab { font: 9.5px var(--f-latin); letter-spacing: .18em; text-transform: uppercase; color: #8c9893; font-style: normal; margin-right: 4px; }
.atl-s { display: flex; align-items: center; gap: 6px; text-shadow: 0 0 3px rgba(12,18,17,.95), 0 0 9px rgba(12,18,17,.7); }
.atl-s i { width: 7px; height: 7px; background: var(--atl-gold); transform: rotate(45deg); box-shadow: 0 0 0 1px rgba(20,26,25,.8), 0 0 6px rgba(217,191,125,.6); }
.atl-s b { font: italic 600 13px var(--f-ital); color: #eadfc0; letter-spacing: .02em; }
.atl-s.cap i { width: 10px; height: 10px; background: #f1e3b5; box-shadow: 0 0 0 2px var(--red), 0 0 8px rgba(241,227,181,.7); }
.atl-s.cap b { font: 500 11px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #f4ead0; }
/* ---- colour key (one line above the timeline) */
#atl-key { position: absolute; left: 0; right: 0; top: -21px; display: flex; flex-wrap: nowrap; overflow: hidden; gap: 4px 12px; align-items: center; z-index: 4; font: 9px var(--f-latin); letter-spacing: .1em; text-transform: uppercase; color: rgba(214,221,218,.72); pointer-events: none; white-space: nowrap; }
#atl-key b { font: 700 12px var(--f-ja); color: #e8dccb; margin-left: 6px; }
#atl-key span { display: inline-flex; align-items: center; gap: 5px; transition: opacity .4s; } #atl-key span.dim { opacity: .32; }
#atl-key small { font: 11px var(--f-ja); letter-spacing: .04em; text-transform: none; color: rgba(214,221,218,.5); }
#atl-key i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 6px currentColor; }
#atl-key i.tosogu { background: transparent !important; border: 1.6px solid; width: 9px; height: 9px; }
#atl-key i.arc { width: 16px; height: 2px; border-radius: 0; background: #f4e1a8; box-shadow: none; }
#atl-key i.arc.dash { background: repeating-linear-gradient(90deg, #f4e1a8 0 4px, transparent 4px 7px); }
#atl-key i.arc.sig { background: #9edbeb; }
body.atlas.hideui #atl-key { display: none; }
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) { #atl-key { display: none; } #atl-layers .wt button { padding: 5px 6px; font-size: 9px; } }
.atl-m.sig b { color: #c9ecf3; } .atl-m em { font: 10px/1 var(--f-latin); font-style: normal; letter-spacing: .14em; color: #9edbeb; border: 1px solid rgba(158,219,235,.6); padding: 2px 4px; margin-right: 6px; vertical-align: 2px; }
#atl-card .chips .sigb { color: #9edbeb; border-color: rgba(158,219,235,.7); }
/* ---- tour 旅 */
#atl-tourb { position: fixed; left: 26px; top: 360px; display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; z-index: 4;
  font: 700 16px var(--f-ja); color: #f0e6dc; }
#atl-tourb::before { content: ''; } #atl-tourb { width: 30px; height: 30px; justify-content: center; background: var(--atl-gold-d); box-shadow: inset 0 0 6px rgba(0,0,0,.35); }
#atl-tourb span { position: absolute; left: 40px; font: 11px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #e3e8e5; opacity: .75; }
body.touring #atl-tourb { background: var(--atl-gold); color: #1a2120; }
#atl-tour { position: fixed; left: 76px; top: 70px; width: min(380px, 40vw); max-height: calc(100vh - var(--tl-h) - 130px); overflow: auto; z-index: 6; padding: 16px 18px 12px;
  background: linear-gradient(rgba(28,37,36,.95), rgba(22,30,29,.95)); border: 1px solid var(--atl-line); color: #d3d9d6; font: 15.5px/1.55 var(--f-ital); animation: atlRise .42s var(--ease); }
#atl-tour header { display: flex; gap: 12px; align-items: flex-start; } #atl-tour .seal { flex: none; width: 36px; height: 36px; display: grid; place-items: center; background: var(--red); color: #f0e6dc; font: 700 18px var(--f-ja); }
#atl-tour small { font: 10px var(--f-latin); letter-spacing: .16em; text-transform: uppercase; color: var(--atl-gold); }
#atl-tour h2 { margin: 2px 0 0; font: 600 20px/1.25 var(--f-latin); letter-spacing: .04em; color: #f1ead9; } #atl-tour h2[lang=ja] { font: 700 21px var(--f-ja); }
#atl-tour .x { margin-left: auto; background: none; border: 0; color: #9aa7a2; font-size: 22px; cursor: pointer; }
#atl-tour .lang { display: flex; gap: 0; margin: 10px 0 4px; } #atl-tour .lang button { background: rgba(22,30,29,.5); border: 1px solid var(--atl-line); color: #9aa7a2; font: 10px var(--f-latin); letter-spacing: .14em; padding: 4px 9px; cursor: pointer; }
#atl-tour .lang button.on { background: var(--atl-gold); color: #1a2120; } #atl-tour .lang button[data-t] { margin-left: auto; border: 0; background: none; font-size: 15px; }
#atl-tour .body[lang=ja] { font: 15px/1.9 var(--f-ja); }
#atl-tour nav { display: flex; gap: 8px; margin-top: 12px; align-items: center; } #atl-tour nav button { background: none; border: 1px solid var(--atl-gold-d); color: var(--atl-gold); font: 11px var(--f-latin); letter-spacing: .14em; padding: 6px 10px; cursor: pointer; }
#atl-tour select { flex: 1; min-width: 0; background: rgba(22,30,29,.8); color: #d3d9d6; border: 1px solid var(--atl-line); font: 13px var(--f-ital); padding: 5px; }
#atl-tour .src { margin-top: 12px; font: 13px/1.4 var(--f-ital); color: #94a19c; } #atl-tour .src summary { cursor: pointer; font: 10px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; color: #8c9893; }
body.touring #atl-legend { left: auto; right: 26px; top: 70px; }
.atl-lbl.hl .atl-c i { color: #ffe7a8; } .atl-lbl.hl .atl-c b { color: #f4d98e; }
body.atlas.hideui #atl-tour, body.atlas.hideui #atl-tourb { display: none; }
/* ---- corner: language + about */
#atl-langb, #atl-aboutb { width: auto !important; padding: 0 10px; border-radius: 15px !important; font: 11px var(--f-latin) !important; letter-spacing: .1em; }
#atl-langb { font-family: var(--f-ja) !important; }
/* ---- About sheet */
#atl-about { position: fixed; right: 26px; bottom: calc(var(--tl-h) + 70px); width: min(460px, 92vw); max-height: calc(100vh - var(--tl-h) - 140px); overflow: auto; z-index: 8;
  background: linear-gradient(rgba(28,37,36,.97), rgba(22,30,29,.97)); border: 1px solid var(--atl-line); padding: 16px 20px; color: #d3d9d6; font: 14.5px/1.55 var(--f-ital); }
#atl-about header { display: flex; align-items: center; } #atl-about h2 { margin: 0; font: 600 16px var(--f-latin); letter-spacing: .14em; text-transform: uppercase; color: #f1ead9; }
#atl-about .x { margin-left: auto; background: none; border: 0; color: #9aa7a2; font-size: 22px; cursor: pointer; }
#atl-about h3 { font: 10.5px var(--f-latin); letter-spacing: .22em; text-transform: uppercase; color: var(--atl-gold); margin: 14px 0 6px; }
#atl-about ul { padding-left: 18px; margin: 4px 0; } #atl-about .conf { margin: 0 2px; }
body.ja #atl-about { font: 14px/1.85 var(--f-ja); } body.ja #atl-about h2 { font: 700 17px var(--f-ja); letter-spacing: .1em; }
/* ---- landing */
#atl-landing { position: fixed; inset: 0; z-index: 20; -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); display: grid; place-items: center; background: radial-gradient(ellipse at 50% 45%, rgba(20,28,27,.35), rgba(12,18,17,.82)); transition: opacity .7s; }
#atl-landing.out { opacity: 0; pointer-events: none; }
#atl-landing .lc { text-align: center; max-width: 560px; padding: 0 24px; animation: atlRise 1.1s var(--ease); }
#atl-landing .seal { display: inline-grid; place-items: center; width: 54px; height: 54px; background: var(--red); color: #f0e6dc; font: 700 28px var(--f-ja); box-shadow: inset 0 0 8px rgba(0,0,0,.4); margin-bottom: 18px; }
#atl-landing h1 { margin: 0; font: 500 40px/1.1 var(--f-latin); letter-spacing: .28em; color: #f1ead9; text-transform: uppercase; }
#atl-landing h1 small { display: block; font: 18px var(--f-ja); letter-spacing: .5em; color: var(--atl-gold); margin-top: 10px; text-transform: none; }
body.ja #atl-landing h1 { font: 700 44px var(--f-ja); letter-spacing: .3em; } body.ja #atl-landing h1 small { font: 13px var(--f-latin); letter-spacing: .4em; text-transform: uppercase; }
#atl-landing p { font: 18px/1.55 var(--f-ital); color: #cdd4d1; margin: 22px 0 26px; } body.ja #atl-landing p { font: 16px/1.9 var(--f-ja); }
#atl-landing .lgo { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
#atl-landing .lgo button { background: none; border: 1px solid var(--atl-gold-d); color: var(--atl-gold); font: 12px var(--f-latin); letter-spacing: .2em; text-transform: uppercase; padding: 11px 20px; cursor: pointer; }
#atl-landing .lgo button:first-child { background: var(--red); border-color: var(--red-hi); color: #f0e6dc; } #atl-landing .lgo button i { font: 13px var(--f-ja); font-style: normal; margin-left: 8px; opacity: .8; }
body.ja #atl-landing .lgo button { font: 14px var(--f-ja); letter-spacing: .14em; } body.ja #atl-landing .lgo button i { display: none; }
#atl-landing .lang { margin-top: 22px; background: none; border: 0; color: #8c9893; font: 12px var(--f-ja); cursor: pointer; }
/* ---- Japanese mode: kanji first, romaji where it is clutter goes */
body.ja .atl-c b, body.ja #atl-card .hd .en, body.ja #atl-res li small, body.ja #atl-layers [data-l] span { font-family: var(--f-ja); letter-spacing: .1em; text-transform: none; }
body.ja .atl-c b { display: none; } body.ja .atl-c { padding-top: 26px; }
body.ja .atl-e.ja b { font: 700 13px var(--f-ja); letter-spacing: .08em; } body.ja .atl-m small.ja { font: 11px var(--f-ja); letter-spacing: .06em; text-transform: none; }
body.ja #atl-card { font: 14px/1.75 var(--f-ja); } body.ja #atl-card h3 { font: 700 12px var(--f-ja); letter-spacing: .2em; }
body.ja #atl-card a.amk b { font-family: var(--f-ja); } body.ja .ahold li b { font: 14px var(--f-ja); }
body.ja #atl-legend h4, body.ja #atl-legend .hl { font-family: var(--f-ja); letter-spacing: .06em; text-transform: none; } body.ja #atl-legend p { font: 12px/1.6 var(--f-ja); }
body.ja #atl-era, body.ja #atl-key { font-family: var(--f-ja); letter-spacing: .1em; } body.ja #atl-tour .lang button[data-l] { display: none; }
body.ja #mark b { font-family: var(--f-ja); letter-spacing: .4em; }
/* ---- narrow screens: the reading panel and the card become bottom sheets above the timeline */
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  #atl-tour, #atl-card { left: 8px !important; right: 8px !important; top: auto !important; bottom: calc(var(--tl-h) + 10px) !important; width: auto !important; max-height: 42vh !important; padding: 12px 14px; }
  #atl-tour .body { font-size: 14px; } #atl-tour h2 { font-size: 16px; }
  #atl-legend { left: 64px; top: 112px; width: 200px; }
  #atl-about { left: 8px; right: 8px; width: auto; bottom: calc(var(--tl-h) + 10px); max-height: 60vh; }
  #atl-tourb { top: 330px; } #atl-tourb span { display: none; }
  #corner { gap: 4px; } #atl-aboutb, #atl-langb { padding: 0 7px; }
  #atl-landing h1 { font-size: 28px; } #atl-landing p { font-size: 16px; }
}
body.ja #atl-nengo span { display: none; } body.ja #atl-layers .wt button { font-family: var(--f-ja); letter-spacing: .04em; }
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  #atl-tourb { top: 392px !important; } #mark span { display: none; }
  #atl-tour nav { position: sticky; bottom: -12px; background: rgba(22,30,29,.98); padding: 8px 0; margin-bottom: -12px; }
  #atl-tour .src { display: none; }
}
/* round 4: nengō block (fixed width, the southern court on its own line, both courts tagged) */
#atl-nengo { white-space: normal; line-height: 1.35; } #atl-nengo em.ct { font: 10px var(--f-ja); font-style: normal; color: #9aa7a2; border: 1px solid rgba(154,167,162,.4); padding: 0 3px; margin-right: 4px; }
#atl-time { grid-template-columns: auto 230px 1fr; }
#atl-card .pin { font: 15px var(--f-latin); color: #9aa7a2; vertical-align: 3px; cursor: help; }
#atl-card details.enonly summary { font: 11px var(--f-ja); color: #8c9893; cursor: pointer; letter-spacing: .06em; } #atl-card details.enonly p { font: italic 13.5px/1.45 var(--f-ital); color: #a9b4b0; }
#atl-card .town b { font-family: var(--f-latin); } body.ja #atl-card .town b, body.ja .ahold li b.ja { font: 700 14px var(--f-ja); }
body.ja .sea .en { display: none; }
/* ---- round 4: tour beats */
#atl-tour { display: flex; flex-direction: column; }
#atl-tour .beat { font: 17px/1.6 var(--f-ital); color: #dfe4e1; margin: 12px 0 4px; min-height: 5em; } #atl-tour .beat[lang=ja] { font: 16px/1.95 var(--f-ja); }
#atl-tour .beat b.hn { font-weight: 600; color: #f4e2b2; border-bottom: 1px dotted rgba(244,226,178,.5); cursor: pointer; }
#atl-tour .dots { display: flex; gap: 4px; margin: 6px 0 2px; flex-wrap: wrap; } #atl-tour .dots button { background: none; border: 1px solid var(--atl-line); color: #8c9893; font: 10px var(--f-latin); padding: 2px 6px; cursor: pointer; }
#atl-tour .dots button.on { border-color: var(--atl-gold); color: var(--atl-gold); }
#atl-tour .houses { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 0; font: 12px var(--f-latin); color: #c4cbc8; } #atl-tour .houses i { display: inline-block; width: 12px; height: 9px; margin-right: 5px; }
body.ja #atl-tour .houses { font-family: var(--f-ja); }
#atl-tour nav { position: sticky; bottom: -16px; background: linear-gradient(rgba(22,30,29,.0), rgba(22,30,29,.98) 30%); padding: 10px 0 6px; margin-top: auto; }
#atl-tour nav button.gonext { background: var(--red); border-color: var(--red-hi); color: #f0e6dc; }
body.ja #atl-tour nav button { font: 12px var(--f-ja); letter-spacing: .06em; }
#atl-tourback, #atl-toast { position: fixed; left: 50%; top: 74px; transform: translateX(-50%); z-index: 12; background: rgba(22,30,29,.95); border: 1px solid var(--atl-line); padding: 10px 14px; display: flex; gap: 10px; align-items: center; font: 14px var(--f-ital); color: #d3d9d6; }
#atl-toast[hidden], #atl-tourback[hidden] { display: none; }
#atl-tourback button { background: none; border: 1px solid var(--atl-gold-d); color: var(--atl-gold); font: 11px var(--f-latin); letter-spacing: .12em; padding: 5px 10px; cursor: pointer; } #atl-tourback button[data-k=back] { background: var(--red); color: #f0e6dc; border-color: var(--red-hi); }
body.ja #atl-tourback, body.ja #atl-toast, body.ja #atl-tourback button { font-family: var(--f-ja); }
/* round 4: seals always labelled, active = filled + gold underline */
#atl-layers { width: auto; } #atl-layers [data-l] span { opacity: .78; transform: none; font-size: 10.5px; }
#atl-layers [data-l].on span { opacity: 1; border-bottom: 1px solid var(--atl-gold); padding-bottom: 2px; }
body.ja #atl-layers [data-l] span { font: 12px var(--f-ja); letter-spacing: .14em; }
/* key wraps (never clipped), sits just above the bands */
#atl-key { top: auto; bottom: calc(100% + 2px); flex-wrap: wrap; overflow: visible; white-space: normal; row-gap: 2px; }
#atl-key .note { color: #c9b98e; font-style: italic; text-transform: none; letter-spacing: .04em; font-family: var(--f-ital); font-size: 12px; margin-right: 10px; }
/* quieter event ticks */
#atl-track .evs i { width: 1px; height: 7px; margin-left: -.5px; top: 0; transform: none; background: rgba(184,70,58,.45); }
#atl-track .evs i:hover { background: #d0574a; width: 3px; margin-left: -1.5px; }
#atl-track .band.narrow { padding-left: 2px; } #atl-track .band.narrow i { font-size: 11px; letter-spacing: 0; }
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  #atl-track .evs, #atl-track .ticks { display: none; }
  #atl-layers { display: none; } body.layers-open #atl-layers { display: flex; top: 150px; background: rgba(22,30,29,.9); padding: 10px; border: 1px solid var(--atl-line); }
  #atl-layersb { display: block !important; }
}
#atl-layersb { display: none; position: fixed; left: 16px; top: 112px; z-index: 5; background: rgba(22,30,29,.75); border: 1px solid var(--atl-line); color: #e3e8e5; font: 11px var(--f-latin); letter-spacing: .14em; padding: 7px 10px; }

/* ================================================================ round 5: restraint
   one serif (Cormorant italic for EN prose/labels), one mincho for JA, two label sizes; no all-caps tracking except the title;
   one accent (house gold) for data; red only for the active view; chrome small at rest and quieter while time plays */
body.atlas #frame { display: none; }
body.atlas #grain { opacity: .28; }
body.atlas #compass { transform-origin: center; width: 46px; height: 46px; font-size: 10px; opacity: .7; }
#mark b { font: 600 13px var(--f-latin); letter-spacing: .3em; } #mark span { font: italic 14px var(--f-ital); letter-spacing: .02em; opacity: .8; }
/* map labels: two sizes */
.atl-c { padding-top: 24px; } .atl-c i { font: 600 14px/1.15 var(--f-ja); letter-spacing: .06em; }
.atl-c b { font: italic 500 12px/1.2 var(--f-ital); letter-spacing: .02em; text-transform: none; color: rgba(226,218,196,.85); }
.atl-m b { font: italic 600 14px/1.2 var(--f-ital); } .atl-m small { font: italic 12px/1.3 var(--f-ital); letter-spacing: .01em; text-transform: none; color: rgba(222,214,190,.78); }
.atl-m em { font: italic 12px var(--f-ital); letter-spacing: 0; border: 0; padding: 0 4px 0 0; color: #9edbeb; }
.atl-e i { background: none; color: var(--atl-gold); box-shadow: inset 0 0 0 1px rgba(217,191,125,.7); }
.atl-e b { font: italic 600 14px var(--f-ital); letter-spacing: .01em; } .atl-e small { font: 12px var(--f-ja); }
.atl-s b { font: italic 13px var(--f-ital); } .atl-s.cap b { font: italic 600 13px var(--f-ital); letter-spacing: .02em; text-transform: none; }
body.atlas .sea .en { letter-spacing: .06em; text-transform: none; font: italic 12px var(--f-ital); }
/* the view column: three quiet buttons, red only for the active one */
#atl-layers { top: 64px; left: 22px; gap: 4px; }
#atl-layers [data-v] { display: flex; align-items: center; gap: 9px; background: none; border: 0; padding: 0; cursor: pointer; color: rgba(214,221,218,.6); font: italic 15px var(--f-ital); letter-spacing: .01em; text-transform: none; }
#atl-layers [data-v] i { width: 26px; height: 26px; display: grid; place-items: center; font: 600 14px var(--f-ja); font-style: normal; color: rgba(214,221,218,.7); border: 1px solid var(--atl-line); background: rgba(22,30,29,.35); }
#atl-layers [data-v].on { color: #ece6d6; } #atl-layers [data-v].on i { background: var(--red); border-color: var(--red-hi); color: #f0e6dc; }
#atl-layers .dsw { display: flex; gap: 0; margin: 0 0 6px 35px; } #atl-layers .dsw button { background: none; border: 0; border-bottom: 1px solid transparent; color: rgba(214,221,218,.5); font: italic 13px var(--f-ital); padding: 1px 6px 2px; cursor: pointer; }
#atl-layers .dsw button.on { color: var(--atl-gold); border-bottom-color: var(--atl-gold); }
#atl-keyb { width: 20px; height: 20px; margin: 4px 0 0 3px; border-radius: 50%; border: 1px solid var(--atl-line); background: none; color: #9aa7a2; font: italic 12px var(--f-ital); cursor: help; }
body.ja #atl-layers [data-v], body.ja #atl-layers .dsw button { font-family: var(--f-ja); font-style: normal; font-size: 13px; letter-spacing: .08em; }
#atl-tourb { top: 168px !important; left: 22px; width: 26px !important; height: 26px !important; background: rgba(22,30,29,.35) !important; border: 1px solid var(--atl-line) !important; color: rgba(214,221,218,.75) !important; font-size: 14px !important; }
#atl-tourb span { left: 35px !important; font: italic 15px var(--f-ital) !important; letter-spacing: .01em !important; text-transform: none !important; opacity: .6 !important; }
body.touring #atl-tourb { background: var(--red) !important; color: #f0e6dc !important; border-color: var(--red-hi) !important; } body.ja #atl-tourb span { font: 13px var(--f-ja) !important; letter-spacing: .08em !important; }
/* the key: a small popover on the "?" */
#atl-key { position: fixed !important; left: 22px; top: 200px; bottom: auto !important; right: auto; width: 300px; display: none !important; flex-direction: column; gap: 6px; padding: 12px 14px; z-index: 9;
  background: rgba(22,30,29,.94); border: 1px solid var(--atl-line); font: italic 13px/1.4 var(--f-ital) !important; letter-spacing: 0 !important; text-transform: none !important; color: #c9d0cd; pointer-events: none; white-space: normal; }
body.keyopen #atl-key { display: flex !important; }
#atl-key div { display: flex; flex-wrap: wrap; gap: 3px 10px; } #atl-key span { display: inline-flex; align-items: center; gap: 5px; } #atl-key p { margin: 0; } #atl-key .note { color: #c9b98e; }
#atl-key i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; } #atl-key .tiers i { border-radius: 0; width: 10px; } #atl-key small { font: 11px var(--f-ja); color: #8c9893; }
body.ja #atl-key { font: 12.5px/1.6 var(--f-ja) !important; }
/* most designated: the influence readout, bottom-left, small */
#atl-most { position: fixed; left: 22px; bottom: calc(var(--tl-h) + 26px); width: 268px; z-index: 4; padding: 10px 12px 8px; background: rgba(18,25,24,.55); border: 1px solid rgba(196,203,200,.12); transition: opacity .6s; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
#atl-most h4 { margin: 0 0 6px; font: italic 13px var(--f-ital); color: #c9d0cd; letter-spacing: 0; }
#atl-most .mr { display: grid; grid-template-columns: 92px 1fr 40px; gap: 8px; align-items: center; margin: 3px 0; cursor: pointer; }
#atl-most .nm { font: 13px var(--f-ital); color: #dfe4e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } #atl-most .mr:hover .nm { color: var(--atl-gold); }
#atl-most .bar { display: flex; height: 7px; } #atl-most .bar i { display: block; height: 100%; }
#atl-most .n { font: 12px var(--f-latin); color: #a9b4b0; text-align: right; font-variant-numeric: tabular-nums; }
body.ja #atl-most h4, body.ja #atl-most .nm { font-family: var(--f-ja); font-style: normal; }
/* while time plays: panels step back */
body.playing #atl-most, body.playing #atl-legend, body.playing #atl-search, body.playing #corner { opacity: .25; } #atl-legend, #atl-search, #corner { transition: opacity .6s; }
/* timeline: bands quiet, the histogram is the curve, event marks only on hover */
#atl-time { background: linear-gradient(rgba(18,25,24,0), rgba(18,25,24,.5) 35%, rgba(14,20,19,.72)); border-top: 0; }
#atl-track { margin-top: 18px; } #atl-track .bands { height: 30px; } #atl-track .band { background: none !important; border-left: 1px solid rgba(196,203,200,.12); }
#atl-track .band i { font: 12px var(--f-ja); color: rgba(225,214,180,.7); } #atl-track .band span { font: italic 11px var(--f-ital); letter-spacing: 0; text-transform: none; color: rgba(196,203,200,.45); }
#atl-track .hist { position: absolute; left: 0; right: 0; top: 4px; height: 24px; pointer-events: auto; opacity: .9; } #atl-track .hist svg { width: 100%; height: 100%; display: block; }
#atl-track .bands { z-index: 1; } #atl-track .evs { top: 30px; opacity: 0; transition: opacity .3s; } #atl-track:hover .evs { opacity: 1; }
#atl-track .ticks { top: 40px; } #atl-track .ticks span { font: 10px var(--f-latin); letter-spacing: .02em; color: rgba(196,203,200,.4); }
#atl-year { font: 400 30px/1 var(--f-latin); letter-spacing: .02em; } #atl-era { font: italic 12px var(--f-ital); letter-spacing: 0; text-transform: none; color: #9aa7a2; }
#atl-speed { font: italic 11px var(--f-ital); letter-spacing: 0; } #atl-play { width: 32px; height: 32px; }
/* cards: no tracking caps */
#atl-card .en, #atl-card h3, #atl-card .chips span, #atl-card dt, #atl-card .crow .rh b, #atl-card .out, #atl-card .src summary, .conf, #atl-legend h4, #atl-tour small, #atl-tour nav button, #atl-tour .dots button, #corner button, #atl-landing .lgo button, #atl-search input, #atl-res li, #atl-about h2, #atl-about h3, #atl-card i.lab, #atl-card .sparkax {
  text-transform: none !important; letter-spacing: .01em !important; }
#atl-card .en { font: italic 14px var(--f-ital); color: #aeb8b4; } #atl-card h3 { font: italic 600 14px var(--f-ital); color: var(--atl-gold); }
#atl-card .chips span { font: italic 12.5px var(--f-ital); } .conf { font: italic 12px var(--f-ital) !important; padding: 1px 6px !important; }
#atl-card dt { font: italic 13px var(--f-ital); } #atl-card a.amk b { font: 600 14px var(--f-ital); } #atl-card .crow .rh b { font: 600 14px var(--f-ital); }
#atl-card i.lab { font: italic 600 12.5px var(--f-ital); } #atl-card .src summary, #atl-card .out { font: italic 13px var(--f-ital); }
#atl-card .tally { margin: 6px 0 2px; } #atl-card .tally > div { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; font: italic 13px var(--f-ital); color: #c9d0cd; margin: 2px 0; }
#atl-card .tally em { font-style: normal; font: 11px var(--f-latin); color: #8c9893; width: 74px; } #atl-card .tally i { display: inline-block; width: 8px; height: 8px; margin-right: 4px; } #atl-card .tally b { font: 600 13px var(--f-latin); color: #ece6d6; }
#atl-card .tally p { font-size: 12px; margin: 4px 0 0; } body.ja #atl-card .tally > div { font-family: var(--f-ja); font-style: normal; }
#atl-legend h4 { font: italic 13px var(--f-ital) !important; color: #c9d0cd; } #atl-legend .hl { font: 13px var(--f-ital); letter-spacing: 0; }
#atl-tour small { font: italic 12px var(--f-ital); } #atl-tour h2 { font: 600 19px/1.25 var(--f-ital); letter-spacing: 0; } #atl-tour nav button, #atl-tour .dots button { font: italic 12px var(--f-ital); }
#corner button { font: italic 12px var(--f-ital) !important; } #atl-landing .lgo button { font: italic 15px var(--f-ital); }
#settings .mksel { display: flex; align-items: center; gap: 12px; margin-top: 16px; font: italic 13px var(--f-ital); color: #a9b4b0; }
body.ja #settings .mksel { font: 13px var(--f-ja); }
#settings .mksel span { display: inline-flex; border: 1px solid var(--hair, rgba(214,221,218,.13)); border-radius: 2px; overflow: hidden; }
#settings .mksel button { background: none; border: 0; padding: 4px 10px; font: 500 10.5px/1.2 var(--f-up, var(--f-latin)); letter-spacing: .1em; text-transform: uppercase; color: rgba(214,221,218,.6); cursor: pointer; }
body.ja #settings .mksel button { font: 12px var(--f-ja); letter-spacing: .04em; text-transform: none; }
#settings .mksel button.on { color: #f2ecdd; background: rgba(217,191,125,.16); }
#settings .mksel button:hover { color: #f2ecdd; }
#atl-about label.allm, #settings label.allm { display: block; margin-top: 14px; font: italic 13px var(--f-ital); color: #a9b4b0; } body.ja #atl-about label.allm, body.ja #settings label.allm { font: 13px var(--f-ja); }
#tip { font-family: var(--f-ital) !important; letter-spacing: 0 !important; }
#atl-keyb { width: 17px; height: 17px; margin: 0 0 0 8px; font-size: 11px; line-height: 1; padding: 0; border-bottom: 1px solid var(--atl-line) !important; }
#atl-tourb { top: 150px !important; } #atl-key { top: 186px; }
#atl-track .band { justify-content: flex-start; padding-top: 1px; } #atl-track .hist { top: 12px; height: 18px; opacity: .8; }
/* timeline rows: the national curve on top, era names on one line beneath it, years last; event marks only on hover */
#atl-track .hist { top: 0; height: 22px; opacity: .85; }
#atl-track .bands { top: 24px; height: 20px; }
#atl-track .band { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 5px; padding: 3px 0 0 5px; }
#atl-track .evs { top: 20px; } #atl-track .ticks { top: 48px; }
#atl-era { display: none; }   /* the era is in the title and on the band: once is enough */
/* one serif: Cormorant (italic is the cut we ship) for every English word; Cinzel's capitals only in the title */
body.atlas { --f-latin: CormorantI, serif; }
body.atlas #mark b, body.atlas #atl-landing h1 { font-family: Cinzel, serif; }
#atl-card .town b { font: 600 14px var(--f-ital); letter-spacing: 0; }
#atl-year { font: 400 30px/1 var(--f-ital); font-style: normal; }
/* the tally table + the chart caption; card seals neutral (red is for the active view only) */
#atl-card table.tally { width: 100%; border-collapse: collapse; margin: 8px 0 2px; font: 13px var(--f-ital); color: #dfe4e1; font-variant-numeric: lining-nums tabular-nums; }
#atl-card table.tally th { font: 13px var(--f-ja); color: #aeb8b4; text-align: right; padding: 2px 0 3px 8px; white-space: nowrap; font-weight: 400; }
#atl-card table.tally th i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; vertical-align: 2px; }
#atl-card table.tally tbody th { text-align: left; font: italic 12px var(--f-ital); color: #8c9893; padding-left: 0; }
#atl-card table.tally td { text-align: right; padding: 2px 0 2px 8px; } #atl-card table.tally tbody tr:first-child td { color: #ece6d6; font-weight: 600; }
#atl-card .tnote, #atl-card .scap { font-size: 11.5px; line-height: 1.45; margin: 4px 0 0; color: #7f8c87; }
#atl-card .seal { background: none !important; border: 1px solid var(--atl-line); color: #d8d0bd; }
body.atlas #atl-time, body.atlas #atl-most .n, body.atlas #atl-track .ticks { font-variant-numeric: lining-nums tabular-nums; }
#atl-year { font-variant-numeric: lining-nums; }
/* the readout sits over the open Pacific (bottom-left covered Kyūshū); it steps aside while a card is open */
#atl-most { left: auto; right: 22px; bottom: calc(var(--tl-h) + 62px); width: 260px; }
body.atlas.cardopen #atl-most { opacity: 0; pointer-events: none; }
body.atlas #compass { display: none; }   /* north is always up here; R returns home */
body.atlas .sea .en { display: none; }   /* the source names are capitals; the kanji alone are enough */
/* kanji inside English italic runs fall back to the mincho, never a faked oblique */
body.atlas { --f-ital: CormorantI, Shippori, serif; font-synthesis: none; }
#atl-tourb span { white-space: nowrap; }
/* the power legend sits under the view column, never over it */
@media (min-width: 761px) and (min-height: 521px), (min-width: 1101px) { body.atlas:not(.touring) #atl-legend { left: 22px; top: 196px; width: 250px; } }
.atl-h { font: italic 13px var(--f-ital); color: rgba(240,232,212,.82); text-shadow: 0 0 3px rgba(12,18,17,.95), 0 0 9px rgba(12,18,17,.7); white-space: nowrap; }
body.ja .atl-h { font: 13px var(--f-ja); }
/* the tour panel sits under the view column so the three views stay in reach */
@media (min-width: 761px) and (min-height: 521px), (min-width: 1101px) { #atl-tour { left: 22px; top: 196px; max-height: calc(100vh - var(--tl-h) - 240px); } }
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) { #atl-most { display: none !important; } }   /* phones: the map and one sheet at a time */
#atl-layersb { font: italic 13px var(--f-ital); letter-spacing: 0; text-transform: none; }
#atl-most .mnote { margin: -4px 0 5px; font: italic 11px var(--f-ital); color: #7f8c87; } body.ja #atl-most .mnote { font: 11px var(--f-ja); }

/* =====================================================================================================================
   Round 6 — design pass (founder 2026-11-09: "far too many Japanese characters in English"; "beautify the interface").
   One upright serif for English (Cormorant Garamond; CormorantI italic only for captions and notes), lining tabular
   figures for years and counts, an 8-px rhythm, one panel shape (3-px radius, hairline, blurred glass, soft shadow),
   gold used for the active thing only. Every rule is scoped to the atlas page.
   ===================================================================================================================== */
@font-face { font-family: CormorantG; src: url(/h/CormorantGaramond.425ed749a7.woff2) format("woff2"); font-weight: 300 700; font-style: normal; }
body.atlas { --f-up: CormorantG, Shippori, serif; --r: 3px; --g1: 8px; --g2: 16px; --g3: 24px;
  --glass-bg: rgba(15,21,20,.74); --glass-blur: blur(10px) saturate(1.08); --hair: rgba(214,221,218,.13); --hair-hi: rgba(214,221,218,.26);
  --shadow: 0 10px 36px rgba(0,0,0,.34), 0 1px 0 rgba(255,255,255,.03) inset; --txt: #d9dfdc; --txt-2: #9ba8a3; --gold-1: #d9bf7d; --t: .24s cubic-bezier(.2,.7,.2,1); }

/* ---- English: kanji sparingly (the JA chrome and data prose are untouched) */
body.atlas:not(.ja) #atl-layers [data-v] i, body.atlas:not(.ja) #atl-tourb i, body.atlas:not(.ja) #atl-card .hd .seal,
body.atlas:not(.ja) #atl-tour header .seal, body.atlas:not(.ja) .atl-e i { display: none !important; }
body.atlas:not(.ja) #atl-tourb { width: auto !important; height: auto !important; background: none !important; border: 0 !important; }
body.atlas:not(.ja) #atl-tourb span { position: static !important; opacity: 1 !important; }
body.atlas:not(.ja) #atl-card .en .kj { font: 12.5px var(--f-ja); letter-spacing: .08em; text-transform: none; color: #b9a978; }
body.atlas:not(.ja) .atl-c.en { padding-top: 22px; } body.atlas:not(.ja) .atl-c.en b { font: 600 14px/1.1 var(--f-up); letter-spacing: .06em; text-transform: none; color: #efe7d2; }
body.atlas:not(.ja) .sea .en { display: block !important; }

/* ---- type: one upright serif, figures lining */
body.atlas:not(.ja) #atl-card, body.atlas:not(.ja) #atl-tour .beat, body.atlas:not(.ja) #atl-about .ab, body.atlas:not(.ja) #atl-landing p { font-family: var(--f-up); font-style: normal; }
body.atlas:not(.ja) #atl-card { font-size: 15px; line-height: 1.55; }
body.atlas:not(.ja) #atl-card h2.lat { font: 600 26px/1.1 var(--f-up); letter-spacing: .01em; color: #f2ecdd; }
body.atlas:not(.ja) #atl-tour .beat { font-size: 17.5px; line-height: 1.6; font-variant-numeric: oldstyle-nums; }
body.atlas:not(.ja) #atl-tour h2 { font: 600 21px/1.2 var(--f-up) !important; }
body.atlas:not(.ja) #atl-layers [data-v], body.atlas:not(.ja) #atl-tourb span { font: 500 15px var(--f-up) !important; font-style: normal !important; letter-spacing: .04em !important; }
body.atlas:not(.ja) #atl-most h4, body.atlas:not(.ja) #atl-most .nm, body.atlas:not(.ja) #atl-legend .hl { font-family: var(--f-up); font-style: normal; }
#atl-year, #atl-most .n, #atl-card .tally, #atl-track .ticks span, #atl-tour .dots button, #atl-card .sparkax, #atl-legend .hl em { font-variant-numeric: lining-nums tabular-nums; }
#atl-year { font: 500 34px/1 var(--f-up) !important; letter-spacing: .02em !important; color: #f2ecdd; }
body.atlas:not(.ja) #atl-nengo { font: italic 14px/1.35 var(--f-ital); color: #c9b98e; letter-spacing: .01em; }
body.atlas:not(.ja) #atl-nengo em.ct { font: 600 9.5px var(--f-up); font-style: normal; letter-spacing: .16em; color: var(--txt-2); margin-right: 5px; }
body.atlas:not(.ja) #atl-era { font: 600 10px var(--f-up); letter-spacing: .24em; text-transform: uppercase; color: var(--txt-2); }

/* ---- one panel shape */
#atl-card, #atl-legend, #atl-most, #atl-tour, #atl-key, #atl-res, #atl-about, #atl-toast, #atl-tourback, #atl-landing > div {
  border-radius: var(--r); border: 1px solid var(--hair) !important; box-shadow: var(--shadow); }
#atl-card, #atl-legend, #atl-tour, #atl-key, #atl-res, #atl-toast, #atl-tourback, #atl-most {
  background: var(--glass-bg) !important; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
#atl-q { border-radius: var(--r); border-color: var(--hair) !important; background: rgba(15,21,20,.6) !important; -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  transition: border-color var(--t), background var(--t); }
#atl-q:focus { border-color: rgba(217,191,125,.55) !important; background: rgba(15,21,20,.86) !important; }
body.atlas:not(.ja) #atl-q { font: 15px var(--f-up); }
#corner button { border-radius: var(--r) !important; border: 1px solid var(--hair) !important; background: rgba(15,21,20,.55) !important; transition: border-color var(--t), color var(--t), background var(--t); }
#corner button:hover, #corner button:focus-visible { border-color: var(--hair-hi) !important; color: #f2ecdd !important; background: rgba(15,21,20,.8) !important; }
button:focus-visible, #atl-q:focus-visible, a:focus-visible { outline: 1px solid rgba(217,191,125,.7); outline-offset: 2px; }

/* ---- the card: title → tally → chart → workshops → makers */
#atl-card { padding: var(--g3) var(--g3) var(--g2) !important; animation: atlRise6 .28s var(--ease) both; }
@keyframes atlRise6 { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#atl-card .hd { gap: 12px; margin-bottom: var(--g2); padding-right: 24px; }
#atl-card .en { font: 600 10.5px var(--f-up) !important; letter-spacing: .14em !important; color: var(--txt-2) !important; margin-top: 6px !important; }
#atl-card h3 { font: 600 10.5px var(--f-up) !important; letter-spacing: .2em !important; color: var(--gold-1) !important; margin: var(--g3) 0 var(--g1) !important;
  padding-top: var(--g2); border-top: 1px solid var(--hair); }
#atl-card .chips span { border-radius: 2px; font: 600 10px/1 var(--f-up) !important; letter-spacing: .14em !important; }
#atl-card .tally { width: 100%; border-collapse: collapse; margin: 4px 0 var(--g1); }
#atl-card .tally th, #atl-card .tally td { padding: 3px 4px; text-align: right; }
#atl-card .tally thead th { font: 600 10px var(--f-up); letter-spacing: .06em; color: var(--txt-2); white-space: nowrap; border-bottom: 1px solid var(--hair); }
#atl-card .tally tbody th { text-align: left; font: italic 13px var(--f-ital); color: var(--txt-2); font-weight: 400; }
#atl-card .tally td { font: 500 14px var(--f-up); color: #e9e2cf; }
#atl-card a.amk { padding: 7px 0; border-bottom-color: var(--hair) !important; transition: background var(--t); }
#atl-card a.amk b { font: 600 14.5px var(--f-up) !important; letter-spacing: .02em !important; }
#atl-card a.amk small { font: italic 12.5px var(--f-ital) !important; }
#atl-card a.amk:hover { background: rgba(217,191,125,.05); }
#atl-card .x { right: 12px !important; top: 10px !important; width: 28px; height: 28px; border-radius: var(--r); transition: background var(--t), color var(--t); }
#atl-card .x:hover { background: rgba(255,255,255,.06); color: #f2ecdd; }
#atl-card .enonly summary { cursor: pointer; font: 12.5px var(--f-ja); color: var(--txt-2); margin-top: var(--g2); }

/* ---- Most designated */
#atl-most { padding: var(--g2) !important; width: 272px !important; }
#atl-most h4 { font-weight: 600 !important; font-size: 13.5px !important; color: #e4e9e6 !important; }
#atl-most .mnote { font: italic 12px var(--f-ital); color: var(--txt-2); margin: 0 0 var(--g1); }
#atl-most .mr { padding: 2px 4px; margin: 2px -4px; border-radius: 2px; transition: background var(--t); } #atl-most .mr:hover { background: rgba(255,255,255,.04); }
#atl-most .bar { height: 5px !important; border-radius: 1px; overflow: hidden; background: rgba(255,255,255,.04); }

/* ---- tour panel */
#atl-tour { padding: var(--g3) !important; }
#atl-tour .dots button { border-radius: 2px; transition: border-color var(--t), color var(--t); }
#atl-tour nav button { border-radius: var(--r); }

/* ---- legend */
#atl-legend { padding: var(--g2) !important; }
#atl-legend .hl i { border-radius: 1px; }

/* ---- timeline: an instrument */
#atl-time { background: linear-gradient(rgba(12,17,16,0), rgba(12,17,16,.66) 34%, rgba(10,15,14,.86)) !important; border-top: 1px solid var(--hair) !important;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border-radius: var(--r) var(--r) 0 0; }
#atl-play { transition: background var(--t), border-color var(--t), transform var(--t); } #atl-play:hover { border-color: var(--gold-1); transform: scale(1.04); }
#atl-track .band { border-left-color: rgba(214,221,218,.10) !important; }
#atl-track .band.b0 { background: transparent !important; } #atl-track .band.b1 { background: rgba(214,221,218,.035) !important; }
body.atlas:not(.ja) #atl-track .band i { display: none; }
body.atlas:not(.ja) #atl-track .band span { display: block !important; font: 600 9.5px/1.3 var(--f-up); letter-spacing: .14em; color: rgba(214,221,218,.62); text-transform: uppercase; }
#atl-track .ticks span { font: 500 9.5px var(--f-up) !important; color: rgba(214,221,218,.42) !important; }
#atl-head::before { box-shadow: 0 0 10px rgba(217,191,125,.55) !important; }
#atl-head i { border-radius: 1px; }
#atl-speed { font: 600 10px var(--f-up) !important; letter-spacing: .1em !important; transition: color var(--t); } #atl-speed:hover { color: var(--gold-1) !important; }

/* ---- the landing card */
body.atlas:not(.ja) #atl-landing p { font-size: 19px; line-height: 1.6; color: #d3d9d6; }
#atl-landing .lgo button { border-radius: var(--r); transition: background var(--t), border-color var(--t), color var(--t); }

/* ---- transitions for panels that come and go */
#atl-legend, #atl-most, #atl-key, #atl-search, #corner, #atl-layers { transition: opacity .3s var(--ease), transform .3s var(--ease); }
/* English: province names in romaji (the engine label carries the kanji as its text and the romaji in .en) */
body.atlas:not(.ja) .lbl.province { font-size: 0 !important; letter-spacing: 0 !important; }
body.atlas:not(.ja) .lbl.province .en { display: block !important; font: 600 9.5px/1 var(--f-up) !important; letter-spacing: .26em !important; text-transform: uppercase; color: rgba(214,222,219,.62); }
#atl-track .band span { letter-spacing: .07em !important; }
/* phones: one sheet at a time, clear of the timeline; nothing else under it */
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  #atl-card, #atl-tour { bottom: calc(var(--tl-h) + 1.6vh + 10px) !important; max-height: calc(100vh - var(--tl-h) - 1.6vh - 120px) !important; border-radius: var(--r) var(--r) 0 0; }
  #atl-card { max-height: min(calc(100vh - var(--tl-h) - 1.6vh - 120px), 52vh) !important; }   /* round 11: the sheet leaves the place in view above it (the map pans it there) */
  body.cardopen #corner, body.touring #corner, body.touring #atl-legend, body.touring #atl-search, body.touring #atl-layersb,
  body.cardopen #atl-legend, body.layers-open #atl-legend { display: none !important; }
  body.atlas #atl-legend { top: 152px !important; left: 16px !important; right: auto; max-width: calc(100vw - 32px); }
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  body.atlas #atl-legend { top: 190px !important; }
  #atl-tourback { top: auto !important; bottom: calc(var(--tl-h) + 1.6vh + 10px) !important; left: 8px !important; right: 8px !important; transform: none !important; flex-wrap: wrap; justify-content: center; }
  body:has(#atl-tourback:not([hidden])) #corner { display: none !important; }
}
/* mid widths: the search moves to the right so the title keeps its line */
@media (min-width: 761px) and (max-width: 1100px) and (min-height: 521px) { #atl-search { left: auto !important; right: 24px; transform: none !important; width: min(320px, 40vw) !important; } }
/* one thing at a time: open search results hide the Most panel */
body:has(#atl-res:not([hidden])) #atl-most { display: none !important; }
.lbl.province.atl-dupe { visibility: hidden !important; }
/* phones: the era bands are too narrow to name — the readout names the era instead */
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  #atl-track .band span, #atl-track .band i { display: none !important; }
  #atl-era { display: inline-block !important; margin-left: 2px; font-size: 9.5px !important; }
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  body.atlas #atl-track .band span, body.atlas #atl-track .band i { display: none !important; }
  body.atlas:not(.ja) #atl-nengo { display: none !important; }          /* English phones: year + era (nengō in the desktop readout) */
  body.atlas.ja #atl-era { display: none !important; }                   /* Japanese phones: year + nengō */
  body.atlas.ja #atl-nengo { font-size: 13px !important; line-height: 1.3; }
}
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  body.atlas:not(.ja) #atl-track .band span { display: none !important; }
  body.atlas.ja #atl-nengo { font-size: 12px !important; white-space: nowrap; }
}

/* ===================================================================== Round 7: column labels with counts */
/* the label stands ABOVE its column's top: atlas.js lifts the anchor ~13 px above the top; the box is the text only */
.atl-lbl .atl-c, body.atlas:not(.ja) .atl-lbl .atl-c.en, body.ja .atl-lbl .atl-c { flex-direction: row; align-items: baseline; gap: 5px; padding: 0 !important; }
.atl-c small.n { font: 500 11px/1 var(--f-up, var(--f-latin)); letter-spacing: .02em; color: rgba(222,200,140,.92); font-variant-numeric: lining-nums tabular-nums; }
.atl-c small.n:empty { display: none; }
body.ja .atl-c small.n { font-size: 11px; }

/* ===================================================================== Round 7: timeline — one typographic rhythm */
#atl-track .band { overflow: hidden; padding: 3px 0 0 5px !important; align-items: baseline; }
#atl-track .band .bl { display: block; font: 600 9.5px/1.3 var(--f-up, var(--f-latin)); letter-spacing: .1em; text-transform: uppercase; color: rgba(214,221,218,.62); white-space: nowrap; font-style: normal; }
body.ja #atl-track .band .bl { font: 500 11px/1.2 var(--f-ja); letter-spacing: .08em; text-transform: none; color: rgba(225,214,180,.72); }
#atl-track .band.nolab { cursor: ew-resize; }
#atl-track .band .bl > nw-m { display: inline-block; }   /* (perf2) fitBands: the candidate names measured side by side, then replaced by the one kept */
#atl-track .ticks span { font: 500 9.5px var(--f-up, var(--f-latin)) !important; letter-spacing: .04em; }
#atl-track .bandtip { position: absolute; bottom: calc(100% + 4px); z-index: 4; padding: 3px 8px; white-space: nowrap; pointer-events: none;
  font: 600 10px/1.3 var(--f-up, var(--f-latin)); letter-spacing: .08em; color: #efe7d2; background: rgba(16,23,22,.94); border: 1px solid var(--hair, rgba(214,221,218,.12)); border-radius: 3px; }
body.ja #atl-track .bandtip { font: 12px/1.3 var(--f-ja); letter-spacing: .06em; }

/* ===================================================================== Round 7: Most designated, card-consistent */
#atl-most h4 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 0 2px !important; font: 600 10.5px/1.3 var(--f-up, var(--f-latin)) !important; letter-spacing: .2em !important; text-transform: uppercase; color: var(--gold-1, #d9bf7d) !important; }
#atl-most h4 .w { font: 500 11px var(--f-up, var(--f-latin)); letter-spacing: .04em; text-transform: none; color: var(--txt-2, #a9b4b0); font-variant-numeric: lining-nums tabular-nums; }
#atl-most .mnote { margin: 0 0 var(--g1, 8px) !important; font: italic 12px/1.35 var(--f-ital) !important; color: var(--txt-2, #94a19c); white-space: nowrap; }
#atl-most .n { font: 500 12.5px var(--f-up, var(--f-latin)) !important; font-style: normal !important; color: #d7dcd9 !important; font-variant-numeric: lining-nums tabular-nums; }
body.ja #atl-most h4 { font: 700 12px var(--f-ja) !important; letter-spacing: .14em !important; }
body.ja #atl-most .mnote { font: 11.5px var(--f-ja) !important; letter-spacing: .02em; }
/* lining figures that survive a `font:` shorthand (the shorthand resets font-variant-numeric, even when !important) */
#atl-most .n, #atl-most h4 .w, .atl-c small.n, #atl-track .ticks span, #atl-year, #atl-card .tally td, #atl-card .sparkax { font-feature-settings: "lnum" 1, "tnum" 1 !important; }

/* ===== Round 8: the tier selector (Makers section of the left column) — a museum-label row of tonal marks ===== */
#atl-layers .tsel { margin: 2px 0 8px 35px; padding-top: 7px; border-top: 1px solid var(--atl-line); width: max-content; }
body.view-power #atl-layers .tsel { display: none; }
#atl-layers .tsel .tsh { display: flex; align-items: baseline; justify-content: space-between; margin: 0 0 5px 6px; }
#atl-layers .tsel .tsh span { font: 600 9.5px/1.2 var(--f-up, var(--f-latin)); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-1, #d9bf7d); opacity: .8; }
#atl-layers .tsel .tall { background: none; border: 0; padding: 0 2px 1px; font: 500 11px var(--f-up, var(--f-latin)); letter-spacing: .04em; color: rgba(214,221,218,.42); cursor: pointer; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s; }
#atl-layers .tsel .tall.on { color: var(--atl-gold); border-bottom-color: rgba(217,191,125,.55); }
#atl-layers .tsel .tall:hover { color: #e6e1d2; }
/* round 13: five marks, 3 + 2 — the state's (Kokuhō Jūbun Jūbi) above the NBTHK's (Tokujū Jūyō) */
#atl-layers .tsel .tsg { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 3px 4px; }
#atl-layers .tsel .tsg button { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 2px 6px 2px 6px; border-radius: 2px; cursor: pointer;
  font: 500 12.5px/1.25 var(--f-up, var(--f-latin)); letter-spacing: .01em; color: rgba(214,221,218,.78); white-space: nowrap; transition: color .2s, background .2s, opacity .2s; }
#atl-layers .tsel .tsg button i { width: 9px; height: 9px; flex: none; background: var(--c); box-shadow: 0 0 0 1px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.08); transition: background .2s, box-shadow .2s, transform .2s; }
#atl-layers .tsel .tsg button:hover { color: #f0ece0; background: rgba(255,255,255,.04); }
/* a subset selected: the chosen marks stay full, the rest go hollow and quiet */
#atl-layers .tsel.sub .tsg button:not(.on) { color: rgba(214,221,218,.38); }
#atl-layers .tsel.sub .tsg button:not(.on) i { background: transparent; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 55%, #b9c2be); opacity: .7; }
#atl-layers .tsel.sub .tsg button.on { color: #f3eedf; }
#atl-layers .tsel.sub .tsg button.on i { transform: scale(1.08); }
#atl-layers .tsel button:focus-visible { outline: 1px solid var(--atl-gold); outline-offset: 1px; }
body.ja #atl-layers .tsel .tsh span { font: 700 11px var(--f-ja); letter-spacing: .16em; }
body.ja #atl-layers .tsel .tall, body.ja #atl-layers .tsel .tsg button { font-family: var(--f-ja); font-size: 12.5px; letter-spacing: .06em; }

@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) { #atl-layers .tsel { margin-left: 0; } }

/* round 8: makers without designated works — greyed, folded by default */
#atl-card .mks a.amk.undoc b, #atl-card .mks a.amk.undoc small { color: #7d8783 !important; }
#atl-card .mks a.amk.undoc { opacity: .78; }
#atl-card .fold { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 0 2px; margin: 2px 0 0; cursor: pointer;
  font: italic 13px var(--f-ital); color: #8f9b97; border-top: 1px dotted rgba(214,221,218,.14); }
#atl-card .fold b { font-style: normal; font-weight: 500; color: var(--atl-gold); }
#atl-card .fold:hover { color: #c9d0cd; }
body.ja #atl-card .fold { font: 12.5px var(--f-ja); }
#atl-res li.undoc b, #atl-res li.undoc small { color: #7d8783 !important; }
#atl-res li.rfold { font: italic 13px var(--f-ital); color: #8f9b97; cursor: pointer; }
body.ja #atl-res li.rfold { font: 12.5px var(--f-ja); }
/* round 10: a province row (makers whose village is not recorded): muted italic, the qualifier on a second line */
#atl-most .mr.pv .nm { color: #aab3af; font-style: italic; white-space: normal; line-height: 1.15; }
#atl-most .mr.pv .nm small { display: block; font: italic 10.5px var(--f-ital); color: #8a948f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#atl-most .mr.pv .bar { opacity: .55; }
body.ja #atl-most .mr.pv .nm small { font-family: var(--f-ja); font-style: normal; }
/* round 10 (phones): the tier chip by the year when a subset of designations is selected */
#atl-tchip { display: none; }
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  #atl-tchip:not([hidden]) { display: inline-flex; align-items: center; gap: 6px; margin-left: 2px; padding: 2px 3px 2px 8px; border: 1px solid rgba(214,184,120,.45); border-radius: 10px;
    font: italic 11.5px var(--f-ital); color: #e3c98f; white-space: nowrap; align-self: center; }
  #atl-tchip button { font: 10px var(--f-latin); letter-spacing: .12em; text-transform: uppercase; color: #c9d0cd; background: rgba(255,255,255,.06); border: 0; border-radius: 8px; padding: 3px 7px; cursor: pointer; }
  body.ja #atl-tchip { font: 11.5px var(--f-ja); } body.ja #atl-tchip button { font-family: var(--f-ja); letter-spacing: .05em; text-transform: none; }
}
body.aboutopen #atl-most { visibility: hidden; }
/* round 11: the left column gets the panels' quiet backing — arcs and bright terrain never run through its text */
@media (min-width: 761px) and (min-height: 521px), (min-width: 1101px) { body.atlas #atl-layers { left: 12px; top: 56px; padding: 8px 12px 10px 9px; background: rgba(18,25,24,.6); border: 1px solid rgba(196,203,200,.12); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); } }
/* round 11: leader lines from a displaced label to its mark */
#labels > .lblg { position: absolute; inset: 0; }   /* (perf2) labels in runs of 32 (atlas.js groupLabels): a changed label re-places its run, not all ~970 */
#atl-leaders { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 2; overflow: hidden; contain: strict; }   /* (perf2) its lines move every frame: their layout stays inside it */
#atl-leaders path { stroke: rgba(226,214,180,.55); stroke-width: .8; fill: none; }
#atl-leaders circle { fill: rgba(226,214,180,.7); }
body.view-power #atl-leaders, body.hideui #atl-leaders { display: none; }
/* round 11: the label of a shaded province that leads "Most designated" (Ko-Bizen) */
.atl-pv { display: inline-flex; align-items: baseline; gap: 5px; font: italic 13px var(--f-ital); color: rgba(232,222,196,.86); text-shadow: 0 1px 3px rgba(0,0,0,.85); white-space: nowrap; }
.atl-pv b { font-weight: 500; } .atl-pv small { font-size: 10.5px; color: rgba(214,205,180,.7); } .atl-pv small.n { font-style: normal; color: var(--atl-gold); }
body.ja .atl-pv { font: 12.5px var(--f-ja); }
/* round 11: the Power legend (longer 1598 note) stops above the timeline on short laptop screens (it scrolls) */
@media (min-width: 761px) and (min-height: 521px), (min-width: 1101px) { body.atlas:not(.touring) #atl-legend { max-height: calc(100vh - var(--tl-h) - 236px); } }

/* ===================================================================== Round 12: every text fits its box
   (web/tools/atlas_textfit.mjs must print 0 defects). Fix by design — shorter copy, wrapping where it reads well, fixed
   tabular number columns, panels that grow to their content — never by shrinking type. */
/* Most designated: the tier selection rides in the heading ("Most designated · Tokujū"); fitMost() puts it on its own
   line when the heading has no room. The method note wraps. Names may wrap (a province row's qualifier on its own line). */
#atl-most h4 .ht { min-width: 0; white-space: nowrap; }
#atl-most h4 .msel { font-weight: inherit; color: var(--atl-gold, #e0c37e); }
#atl-most h4 .msel i { font-style: normal; color: rgba(217,191,125,.55); }
#atl-most h4 .w { white-space: nowrap; flex: none; }
#atl-most h4.split { flex-wrap: wrap; row-gap: 0; }
#atl-most h4.split .ht { display: contents; }
#atl-most h4.split .msel { order: 3; flex-basis: 100%; }
#atl-most h4.split .msel i { display: none; }
#atl-most .mnote { white-space: normal !important; text-wrap: pretty; }
#atl-most .mr { grid-template-columns: minmax(0, 1fr) minmax(48px, .78fr) 4ch !important; align-items: center; }
#atl-most .nm { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; overflow-wrap: normal; word-break: keep-all; line-height: 1.2; }
#atl-most .mr.pv .nm small { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; line-height: 1.2; }
#atl-most .n { text-align: right; min-width: 4ch; }
body.ja #atl-most .nm, body.ja #atl-most .mnote { line-break: strict; word-break: keep-all; }
/* the panel grows to its heading (a tier in the heading) between its usual 272 px and 340 px */
#atl-most { width: auto !important; min-width: 272px; max-width: min(340px, calc(100vw - 44px)); box-sizing: border-box; }
#atl-most .mnote { max-width: 300px; }
/* headings wrap evenly (never one word left alone); JA never breaks a line before 。、・ー or a small kana, and headings
   and names break only between words (keep-all) */
body.atlas h2, body.atlas h3, body.atlas h4 { text-wrap: balance; }
body.atlas.ja { line-break: strict; }
body.atlas.ja h2, body.atlas.ja h3, body.atlas.ja h4, body.atlas.ja #atl-res b, body.atlas.ja #atl-card .mks b { word-break: keep-all; }
/* the hover note wraps its long source lines and never grows wider than the screen (the engine places it; atlas.js keeps
   it inside the screen) */
body.atlas #tip { white-space: normal; max-width: min(380px, calc(100vw - 16px)); overflow-wrap: break-word; }
body.atlas #tip b { white-space: nowrap; }
/* a maker card's homonym qualifier: the title's second line */
#atl-card h2 small.q { display: block; margin-top: 3px; font: 500 13px/1.3 var(--f-up, var(--f-latin)); letter-spacing: .02em; color: var(--txt-2, #a9b4b0); text-wrap: balance; }
body.ja #atl-card h2 small.q { font: 500 13px/1.35 var(--f-ja); letter-spacing: .06em; }
/* the card's tally on a phone: the tier's swatch stands above its name, so six names and the window fit the sheet */
@media (max-width: 480px) {
  #atl-card table.tally thead th { vertical-align: bottom; }
  #atl-card table.tally thead th i { display: block; margin: 0 0 3px auto; }
}
/* phones: the readout never spills over the play button — it centres only while it fits (safe), the nengō gives way
   (wraps at its own breaks) before the year or the tier chip do */
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  #atl-time { grid-template-columns: auto minmax(0, 1fr); }   /* (the desktop 230 px readout column squeezed the phone readout) */
  #atl-time .read { justify-content: safe center; min-width: 0; flex-wrap: wrap; row-gap: 4px; align-content: center; }
  #atl-year, #atl-nengo, #atl-tchip:not([hidden]) { flex: none; }
  /* a tier selection: the chip takes its own line under the year, and the timeline grows by that line */
  body.atlas.tchip-on { --tl-h: 128px; }
  body.atlas.tchip-on #atl-time .read::after { content: ''; order: 2; flex-basis: 100%; height: 0; }
  body.atlas.tchip-on #atl-tchip { order: 3; margin-left: 0; }
}

/* =====================================================================================================================
   The loading screen (2026-11-10, founder: "the same aesthetics as our Meihin Museum loading screen … NihontoWatch, logo,
   and what it is"). The museum's welcome (KATANA BAKO bako.css 1.30) measure for measure: pure black, the NihontoWatch
   lockup as drawn (one SVG — the mon and WATCH in the house gold #f1c730, never retyped) at 372 px (phones 298, short
   windows 238), one muted-gold hairline the wordmark's width that fills as the map loads (1 px; ½ px on 2× screens), the
   card fading in in 350 ms and the whole screen fading out in 900 ms into the map. Added for the atlas: its title, the one
   line saying what it is, a quiet status ("Loading" / 読み込み中) under the hairline, and the retry when the start fails.
   ===================================================================================================================== */
#loading.atl-loader { --ld-bone: #ece9e3; --ld-muted: #8b8d8f; --ld-gold: #f1c730; --ld-pad-x: max(24px, env(safe-area-inset-left), env(safe-area-inset-right));
  position: fixed; inset: 0; z-index: 200; box-sizing: border-box; width: 100%; height: 100%; margin: 0; overflow: auto;
  display: flex; flex-direction: column; align-items: center; justify-content: safe center; place-items: initial;
  padding: max(24px, env(safe-area-inset-top)) var(--ld-pad-x) max(24px, env(safe-area-inset-bottom));
  background: #000; color: var(--ld-bone); font: 400 16px/1.5 CormorantG, serif; letter-spacing: normal; text-transform: none;
  -webkit-user-select: none; user-select: none; transition: opacity .9s cubic-bezier(.4,0,.2,1); }
#loading.atl-loader.done { opacity: 1; pointer-events: auto; }   /* the engine's own "warm-up done": a step of the progress here, not the end */
#loading.atl-loader.out { opacity: 0; pointer-events: none; }
#loading.atl-loader[hidden] { display: none; }
#loading .ld-card { box-sizing: border-box; width: min(480px, 100%); margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; animation: ld-in .35s ease-out both; }
@keyframes ld-in { from { opacity: 0; } to { opacity: 1; } }
html:lang(ja) #loading .ld-en, html:not(:lang(ja)) #loading .ld-ja { display: none; }
#loading .ld-lockup { display: block; width: 372px; height: auto; max-width: 100%; }
/* the title and the line arrive with their faces (≤ 0.9 s) */
#loading .ld-text { margin-top: clamp(30px, 5.5vh, 46px); opacity: 0; transition: opacity .5s ease; }
#loading.fonts .ld-text { opacity: 1; }
#loading .ld-title { margin: 0; font: 500 30px/1.15 CormorantG, serif; letter-spacing: .05em; color: var(--ld-bone); }
#loading .ld-what { margin: 10px auto 0; max-width: 26em; font: 400 17px/1.5 CormorantG, serif; letter-spacing: .01em; color: #cfc5b5; text-wrap: balance; }
#loading .ld-nw { white-space: nowrap; }   /* the line breaks after the dash (“made —”) or not at all */
@media (max-width: 400px) { #loading .ld-nw:first-child { white-space: normal; } }   /* a narrow phone: the first half may wrap (it is wider than 20em there) */
html:lang(ja) #loading .ld-title { font: 400 27px/1.3 Shippori, serif; letter-spacing: .32em; padding-left: .32em; }
html:lang(ja) #loading .ld-what { margin-top: 14px; max-width: 21em; font: 400 14.5px/1.95 Shippori, serif; letter-spacing: .05em; word-break: keep-all; line-break: strict; }
/* progress: the museum's hairline, muted gold on a faint bone track */
#loading .ld-progress { display: block; margin: clamp(26px, 4.5vh, 40px) 0 0; width: 92%; max-width: 344px; }
#loading .ld-hair { position: relative; display: block; width: 100%; height: 1px; background: rgba(236,233,227,.08); overflow: hidden; }
@media (min-resolution: 2dppx) { #loading .ld-hair { height: .5px; } }
#loading .ld-hair span { position: absolute; inset: 0 auto 0 0; display: block; width: 0; background: rgba(241,199,48,.55); transition: width .6s ease; }
#loading .ld-status { margin: 14px 0 0; font: 500 10px/1.5 Inter, "Helvetica Neue", Arial, sans-serif; letter-spacing: .28em; padding-left: .28em; text-transform: uppercase; color: var(--ld-muted); }
html:lang(ja) #loading .ld-status { font: 400 11.5px/1.5 Shippori, serif; letter-spacing: .24em; padding-left: .24em; }
/* a slow start (no file for 30 s) or a failed one: the status says so in the museum's register; on failure the hairline goes */
#loading.stall .ld-status, #loading.fail .ld-status { margin-top: 22px; max-width: 30em; padding-left: 0; font: 400 13px/1.6 Inter, "Helvetica Neue", Arial, sans-serif; letter-spacing: .02em; text-transform: none; color: #cfc5b5; text-wrap: balance; }
html:lang(ja) #loading.stall .ld-status, html:lang(ja) #loading.fail .ld-status { font: 400 13.5px/1.8 Shippori, serif; letter-spacing: .04em; word-break: keep-all; line-break: strict; }
#loading.fail .ld-progress { display: none; }
#loading .ld-retry { margin-top: 18px; padding: 9px 22px; border: 1px solid rgba(232,224,209,.28); border-radius: 999px; background: transparent; color: var(--ld-bone); font: 500 11px/1 Inter, "Helvetica Neue", Arial, sans-serif; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; }
#loading .ld-retry[hidden] { display: none; }
#loading .ld-retry:hover { background: rgba(232,224,209,.06); }
#loading .ld-retry:focus-visible { outline: 2px solid var(--ld-gold); outline-offset: 3px; }
html:lang(ja) #loading .ld-retry { font: 400 13px/1 Shippori, serif; letter-spacing: .1em; }
@media (max-width: 600px) {
  #loading .ld-lockup { width: 298px; } #loading .ld-progress { max-width: 274px; }
  #loading .ld-title { font-size: 26px; } #loading .ld-what { font-size: 16px; max-width: 20em; }
  html:lang(ja) #loading .ld-title { font-size: 24px; } html:lang(ja) #loading .ld-what { font-size: 14px; } }
@media (max-height: 480px) {
  #loading .ld-lockup { width: 238px; } #loading .ld-progress { max-width: 219px; margin-top: 18px; } #loading .ld-text { margin-top: 18px; }
  #loading .ld-title { font-size: 22px; } #loading .ld-what { font-size: 15px; margin-top: 6px; }
  html:lang(ja) #loading .ld-title { font-size: 21px; } html:lang(ja) #loading .ld-what { font-size: 13px; line-height: 1.8; margin-top: 8px; } }
@media (prefers-reduced-motion: reduce) { #loading.atl-loader { transition: none; } #loading .ld-card { animation: none; } #loading .ld-text, #loading .ld-hair span { transition: none; } }

/* round 14 (embedded in NihontoWatch): the full-screen button (framed only, where allowed) — the corner row's icon twin of
   ?, its glyph flips while full screen; the keys help (?) is for keyboards — touch screens never see it */
#atl-fullb { display: inline-flex; align-items: center; justify-content: center; }
#atl-fullb[hidden] { display: none !important; }
#atl-fullb .out, #atl-fullb.on .in { display: none; } #atl-fullb.on .out { display: inline; }
@media (hover: none) and (pointer: coarse) { #b-help { display: none !important; } }
/* round 14: a phone on its side (short and not wide — framed by NihontoWatch it is ~850 × 330, under the site's tab bar).
   The phone layout applies (the media queries above), with the room it has: the search moves up beside the title, Views
   sits under the title, a card may use the height above the timeline, and the sword-shape panel waits for portrait (its
   blade needs height the screen does not have). */
@media (max-height: 520px) and (max-width: 1100px) and (min-width: 561px) {
  #atl-search { top: 12px !important; left: auto !important; right: 12px; transform: none !important; width: min(340px, 42vw) !important; }
  #atl-layersb { top: 52px; }
  body.layers-open #atl-layers { top: 88px; max-height: calc(100vh - var(--tl-h) - 1.6vh - 100px); overflow: auto; }
  body.atlas #atl-legend { top: 88px !important; max-height: calc(100vh - var(--tl-h) - 1.6vh - 100px) !important; }
  #atl-res { max-height: calc(100vh - var(--tl-h) - 1.6vh - 18px - 30px - 70px) !important; overflow: auto; }
  /* the card is a side sheet (right), not a bottom sheet: the place stays in view on the left (freeArea, atlas.js) */
  #atl-card, #atl-tour { left: auto !important; right: 8px !important; width: min(400px, 48vw) !important; top: 56px !important;
    bottom: calc(var(--tl-h) + 1.6vh + 8px) !important; max-height: none !important; border-radius: var(--r) !important; }
  #atl-sugata, #atl-sugatab { display: none !important; }
}
/* the loading screen on a very short screen (a phone on its side under the site's tab bar) */
@media (max-height: 380px) {
  #loading.atl-loader { padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  #loading .ld-lockup { width: 168px; } #loading .ld-text { margin-top: 12px; } #loading .ld-progress { max-width: 156px; margin-top: 12px; }
  #loading .ld-title { font-size: 20px; } #loading .ld-what { font-size: 14px; margin-top: 4px; line-height: 1.4; }
  #loading .ld-status { margin-top: 8px; }
  html:lang(ja) #loading .ld-title { font-size: 19px; } html:lang(ja) #loading .ld-what { font-size: 12.5px; line-height: 1.7; margin-top: 6px; }
  #loading.stall .ld-status, #loading.fail .ld-status { margin-top: 10px; } #loading .ld-retry { margin-top: 10px; }
}
/* ================================================================ round 15 (CRITIQUE_R5) */
/* ⋯ Settings: only the atlas's own settings (the engine builds its game tabs for its wiring; none of them is shown) */
body.atlas #settings .tabs, body.atlas #settings .tab:not([data-tab="atlas"]), body.atlas #settings footer { display: none !important; }
body.atlas #settings .tab[data-tab="atlas"] { display: block !important; padding: 4px 16px 16px; }
body.atlas .sheet { bottom: calc(var(--tl-h) + 1.6vh + 56px); max-height: calc(100vh - var(--tl-h) - 1.6vh - 56px - 64px); }
body.atlas #settings { width: min(360px, calc(100vw - 24px)); }
#settings .srow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(196,203,200,.09);
  font: italic 15px/1.35 var(--f-ital); color: #c9d1ce; }
body.ja #settings .srow { font: 14px/1.6 var(--f-ja); }
#settings .srow:last-child { border-bottom: 0; }
#settings .srow.chk { justify-content: flex-start; cursor: pointer; min-height: 44px; }
#settings .srow.chk input { width: 18px; height: 18px; flex: none; accent-color: #b99a5c; margin: 0; }
#settings .seg2 { display: inline-flex; flex: none; border: 1px solid rgba(196,203,200,.18); border-radius: 3px; overflow: hidden; }
#settings .seg2 button { background: none; border: 0; min-height: 36px; padding: 0 12px; font: 14px/1 var(--f-ital); color: rgba(214,221,218,.75); cursor: pointer; }
body.ja #settings .seg2 button { font: 14px/1 var(--f-ja); }
#settings .seg2 button + button { border-left: 1px solid rgba(196,203,200,.14); }
#settings .seg2 button.on { color: #f2ecdd; background: rgba(217,191,125,.18); }
#settings .srow.btns { justify-content: flex-start; flex-wrap: wrap; gap: 10px; }
#settings .sbtn { min-height: 40px; padding: 0 14px; border: 1px solid rgba(196,203,200,.2); border-radius: 3px; background: rgba(15,21,20,.4); color: #d6ddda; font: italic 15px/1 var(--f-ital); cursor: pointer; }
body.ja #settings .sbtn { font: 14px/1 var(--f-ja); }
#settings .sbtn:hover, #settings .seg2 button:hover { color: #f2ecdd; border-color: rgba(217,191,125,.4); }
/* ? Help */
#help .hb { padding: 4px 18px 16px; }
#help .hb h3 { margin: 16px 0 6px; font: 500 12px/1.2 var(--f-latin); letter-spacing: .18em; text-transform: uppercase; color: #c9b27c; }
body.ja #help .hb h3 { font: 600 14px/1.4 var(--f-ja); letter-spacing: .08em; text-transform: none; }
#help .hb p { margin: 0 0 8px; font: 15px/1.5 var(--f-ital); color: #c9d1ce; }
body.ja #help .hb p { font: 14px/1.85 var(--f-ja); line-break: strict; }
#help .hb p.k { margin-top: 12px; font-size: 14px; color: #a9b4b0; }
#help .keys { padding: 4px 0 4px; font: 14px/1.4 var(--f-ital); gap: 8px 14px; }
body.ja #help .keys { font: 14px/1.5 var(--f-ja); }
#help .keys dt { font: 500 13px/1.4 var(--f-latin); }
#help kbd { display: inline-block; min-width: 1.6em; padding: 1px 5px; border: 1px solid rgba(196,203,200,.25); border-radius: 3px; text-align: center; font: 500 12.5px/1.4 var(--f-latin); }
@media (hover: none) and (pointer: coarse) { body.atlas #b-help { display: inline-flex !important; } }
/* framed by NihontoWatch: the site's header owns the language — the map's own button steps back (Settings keeps a switch) */
body.nwframed #atl-langb, body.atlas.nwframed #corner #atl-langb { display: none !important; }   /* (r16) the touch rule body.atlas #corner button {display:inline-flex !important} outranked the plain one: 日本語 showed framed on every phone */
/* no cloud banks over the data: a quiet vignette at the screen's edges instead */
body.atlas #frame { display: block; inset: 0; border: 0; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse 120% 110% at 50% 45%, transparent 62%, rgba(6,10,11,.34) 100%); }
/* the card as a bottom sheet: portrait phones (half, then full) and portrait tablets (a side card left the place 114 px) */
.atl-grab { display: none; }
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px), (min-width: 761px) and (max-width: 1100px) and (min-height: 521px) and (orientation: portrait) {
  #atl-card .atl-grab { display: block; position: sticky; top: -12px; z-index: 3; width: calc(100% + 28px); height: 30px; margin: -12px -14px -6px; padding: 0; border: 0;
    background: linear-gradient(rgba(18,25,24,.96), rgba(18,25,24,0)); cursor: grab; touch-action: none; }
  #atl-card .atl-grab i { display: block; width: 44px; height: 4px; margin: 10px auto 0; border-radius: 2px; background: rgba(214,221,218,.38); }
  #atl-card { max-height: min(42vh, calc(100vh - var(--tl-h) - 1.6vh - 10px - 210px)) !important; transition: max-height .3s cubic-bezier(.4,0,.2,1); }
  body.sheetfull #atl-card { max-height: calc(100vh - var(--tl-h) - 1.6vh - 10px - 64px) !important; }
  body.cardopen #corner, body.cardopen #atl-sugatab, body.sheetfull #atl-layers, body.sheetfull #atl-legend, body.sheetfull #atl-most { display: none !important; }
  #atl-card .x { z-index: 4; }
}
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) { body.cardopen #atl-search, body.cardopen #atl-layersb, body.cardopen.layers-open #atl-layers { display: none !important; } }
@media (min-width: 761px) and (max-width: 1100px) and (min-height: 521px) and (orientation: portrait) {
  #atl-card { left: 12px !important; right: 12px !important; top: auto !important; width: auto !important; bottom: calc(var(--tl-h) + 1.6vh + 10px) !important; border-radius: var(--r) var(--r) 0 0; }
}
/* a phone on its side: the timeline folds to one slim scrubber row (play · year · track) so the map keeps most of the height;
   the curve, the ticks and the era readout return in portrait */
@media (max-height: 520px) and (max-width: 1100px) and (min-width: 561px) {
  :root, body.atlas, body.atlas.tchip-on { --tl-h: 50px !important; }
  #atl-time { grid-template-columns: auto auto minmax(0, 1fr) !important; grid-template-rows: 1fr !important; bottom: max(4px, env(safe-area-inset-bottom)) !important; left: max(8px, env(safe-area-inset-left)) !important; right: max(8px, env(safe-area-inset-right)) !important; }
  #atl-time .ctl { flex-direction: row !important; align-items: center; gap: 2px !important; padding: 0 2px 0 4px !important; }
  #atl-time .read { flex-direction: row !important; flex-wrap: nowrap !important; align-items: center !important; justify-content: flex-start !important; padding: 0 8px 0 2px !important; gap: 8px; }
  #atl-time .read::after { display: none !important; }
  #atl-year { font-size: 22px !important; }
  #atl-nengo, #atl-era, #atl-tchip { display: none !important; }
  #atl-track { grid-column: 3 !important; grid-row: 1 !important; margin: 7px 10px 7px 4px !important; }
  #atl-track .hist { top: 0 !important; height: 12px !important; opacity: .7; }
  #atl-track .bands { top: 14px !important; height: 20px !important; }
  #atl-track .ticks, #atl-track .evs { display: none !important; }
  body.atlas #corner { bottom: calc(var(--tl-h) + 10px) !important; }
}
/* readability for the readers this is for (many are older collectors): secondary text ≥ 13 px, tiny tags ≥ 12 px, lighter
   grey notes (≥ 4.5:1 on the panels), timeline years at ≥ 70 % — EN and JA alike; numerals lining in both */
body.atlas .atl-c small.n, body.atlas .atl-lbl small.n { font-size: 13px !important; }
body.atlas #corner { opacity: 1 !important; }
body.atlas #corner button { font-size: 13px !important; color: #d6ddda !important; }
body.atlas .tsel .tsh span { font-size: 12px !important; }
body.atlas .tsel .tsh .tall, body.atlas .tsel .tsg button { font-size: 13px !important; }
body.atlas #atl-most h4 .ht { font-size: 12px !important; } body.atlas #atl-most h4 .w, body.atlas #atl-most .mnote, body.atlas #atl-most .n, body.atlas #atl-most .nm small { font-size: 13px !important; }
body.atlas #atl-most .mnote, body.atlas #atl-most h4 .w, body.atlas #atl-most .nm small { color: #aab6b1 !important; }
body.atlas #atl-speed { font: 500 13px/1 var(--f-latin) !important; letter-spacing: .02em !important; color: #b4beba !important; font-variant-numeric: lining-nums !important; font-feature-settings: "lnum" 1 !important; }
body.atlas.ja #atl-speed { font: 13px/1 var(--f-ja) !important; letter-spacing: 0 !important; }
body.atlas.ja #atl-speed, body.atlas.ja #atl-nengo, body.atlas.ja #atl-card .chips, body.atlas.ja #atl-card th { font-variant-numeric: lining-nums; font-feature-settings: "lnum" 1; }
body.atlas #atl-nengo { font-size: 13px !important; }
body.atlas #atl-track .band .bl { font-size: 12px !important; color: rgba(214,221,218,.78) !important; }
body.atlas.ja #atl-track .band .bl { font-size: 13px !important; color: rgba(225,214,180,.86) !important; }
body.atlas #atl-track .ticks span { font-size: 12px !important; color: rgba(214,221,218,.74) !important; }
body.atlas #atl-sugatab { font-size: 12px !important; } body.atlas.ja #atl-sugatab { font-size: 13px !important; }
body.atlas #atl-card .en { font-size: 13px !important; color: #b0bbb7 !important; }
body.atlas #atl-card .chips span, body.atlas #atl-card thead th, body.atlas .conf { font-size: 12px !important; }
body.atlas.ja #atl-card .chips span, body.atlas.ja #atl-card thead th, body.atlas.ja .conf { font-size: 13px !important; }
body.atlas #atl-card tbody th, body.atlas #atl-card .amk small, body.atlas #atl-card p.k, body.atlas #atl-card .sparkax, body.atlas #atl-card .sparkax span { font-size: 13px !important; }
body.atlas #atl-card p.k, body.atlas #atl-card .sparkax, body.atlas #atl-card tbody th { color: #a9b5b0 !important; }
body.atlas #atl-card h3 { font-size: 12px !important; } body.atlas.ja #atl-card h3 { font-size: 13px !important; }
body.atlas #atl-card dt { font-size: 12px !important; } body.atlas.ja #atl-card dt { font-size: 13px !important; }
body.atlas #atl-card .src summary, body.atlas #atl-card .out, body.atlas #atl-card i.lab, body.atlas .ahold summary { font-size: 12px !important; }
body.atlas #atl-legend .hl em, body.atlas #atl-legend p, body.atlas #atl-legend .hl { font-size: 13px !important; }
body.atlas #atl-legend h4 { font-size: 12px !important; } body.atlas.ja #atl-legend h4 { font-size: 13px !important; }
body.atlas #atl-layers [data-l] span, body.atlas #atl-layers .wt button { font-size: 12px !important; } body.atlas.ja #atl-layers [data-l] span { font-size: 13px !important; }
body.atlas #atl-key small, body.atlas #atl-key { font-size: 12px !important; } body.atlas.ja #atl-key small { font-size: 13px !important; }
/* touch: every control at least 44 × 44 (padding included) */
@media (pointer: coarse) {
  body.atlas #corner button { min-width: 44px !important; height: 44px !important; padding: 0 10px !important; display: inline-flex !important; align-items: center; justify-content: center; }
  body.atlas #corner button[hidden], body.atlas #b-help[hidden] { display: none !important; }
  body.atlas.nwframed #corner #atl-langb { display: none !important; }
  body.atlas #atl-play { width: 44px !important; height: 44px !important; }
  body.atlas #atl-speed { min-height: 44px !important; min-width: 56px !important; padding: 0 6px !important; }
  body.atlas #atl-layersb, body.atlas #atl-sugatab { min-height: 44px !important; }
  body.atlas #atl-q { min-height: 44px !important; }
  body.atlas #atl-card .x, body.atlas .sheet .x { min-width: 44px !important; min-height: 44px !important; display: inline-flex; align-items: center; justify-content: center; }
  body.atlas #atl-card .x { right: 2px !important; top: 2px !important; }
  body.atlas #settings .seg2 button { min-height: 44px !important; min-width: 44px !important; }
  body.atlas #settings .sbtn { min-height: 44px !important; }
  body.atlas #atl-card .lnk { padding-top: 9px !important; padding-bottom: 9px !important; }
  body.atlas #atl-track::after { content: ''; position: absolute; left: -6px; right: -6px; top: -12px; bottom: -12px; }
  body.atlas #atl-card .chips span { padding: 9px 10px !important; }
}
/* phones: the bands that have room carry their era name (fitBands decides; the others stay quiet, the readout names the era) */
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  body.atlas #atl-track .band .bl { display: block !important; font-size: 12px !important; letter-spacing: .04em !important; }
  body.atlas.ja #atl-track .band .bl { font-size: 12px !important; letter-spacing: 0 !important; }
}
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) {
  #atl-time .ctl { flex-direction: row !important; align-items: center !important; gap: 2px !important; padding: 0 2px 0 8px !important; }
}
#atl-keyb { width: auto !important; min-width: 0 !important; height: 22px !important; padding: 0 8px !important; border-radius: 11px !important; font: italic 13px/1 var(--f-ital) !important; border: 1px solid var(--atl-line) !important; }
body.ja #atl-keyb { font: 12px/1 var(--f-ja) !important; }
/* JA: lining numerals everywhere (old-style figures read as subscripts next to kanji: 毎秒₁₀年, 1275–1325年) */
body.atlas.ja, body.atlas.ja #atl-card *, body.atlas.ja #atl-most *, body.atlas.ja #atl-time *, body.atlas.ja #atl-legend *, body.atlas.ja .sheet *, body.atlas.ja #atl-res *, body.atlas.ja .atl-lbl * { font-variant-numeric: lining-nums tabular-nums !important; font-feature-settings: "lnum" 1, "tnum" 1 !important; }
#help kbd { font: 500 13px/1.4 var(--f-up, var(--f-latin)) !important; font-style: normal !important; font-variant-numeric: lining-nums !important; font-feature-settings: "lnum" 1 !important; }
/* portrait phones: the track keeps room for its curve and named bands under a two-line readout (tier chip on) */
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) {
  body.atlas.tchip-on { --tl-h: 148px; }
  #atl-track { min-height: 44px; }
}
/* the Power legend heading may wrap (it names the two records a province year lies between) */
body.atlas #atl-legend h4 { white-space: normal !important; }
#atl-card .atl-grab { background: none !important; width: 100% !important; margin: -12px 0 -6px !important; }
/* the tally fits a narrow card with the larger type (a phone's side sheet is ~318 px) */
@media (max-width: 760px), (max-height: 520px) and (max-width: 1100px) {
  body.atlas #atl-card .tally th, body.atlas #atl-card .tally td { padding-left: 2px !important; padding-right: 2px !important; }
  body.atlas #atl-card .tally thead th { letter-spacing: 0 !important; }
  body.atlas #atl-card .tally tbody th { white-space: normal !important; }
}
@media (min-width: 761px) and (max-width: 1100px) and (min-height: 521px) and (orientation: portrait) { body.cardopen #atl-legend, body.cardopen #atl-most { display: none !important; } }
/* portrait phones: room for the curve and the named bands under the readout */
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) {
  :root { --tl-h: 112px; }
  #atl-track .hist { height: 16px !important; }
  #atl-track .bands { top: 18px !important; height: 18px !important; }
}
/* narrow JA phones: the nengō (two courts in 1336–92) takes a second line under the year — the timeline grows by it */
@media (max-width: 380px) { body.atlas.ja { --tl-h: 134px; } body.atlas.ja.tchip-on { --tl-h: 170px; } }

/* perf (2026-11-11): the 1598 realm names wait unseen (opacity 0) outside the political views — their crests (66 small
   pictures) are not fetched until the layer shows (the engine writes the layer's opacity every frame) */
body.atlas #realms:not([style*="opacity"]) .mon, body.atlas #realms[style*="opacity: 0;"] .mon { -webkit-mask: none; mask: none; }
/* (r16) the chooser: two places on one spot (Osafune · Hatakeda) — one tap opens the chosen card */
#atl-choose, #atl-choose * { font-style: normal !important; }
#atl-choose { position: fixed; z-index: 9; min-width: 168px; max-width: min(300px, calc(100vw - 16px)); padding: 6px; border: 1px solid var(--atl-line);
  background: linear-gradient(rgb(28,37,36), rgb(22,30,29)); box-shadow: 0 6px 24px rgba(0,0,0,.45); border-radius: var(--r, 3px); }
#atl-choose[hidden] { display: none !important; }
#atl-choose p { margin: 2px 6px 6px; font: 600 12px var(--f-up, var(--f-latin)); letter-spacing: .16em; text-transform: uppercase; color: #a9b5b0; }
body.ja #atl-choose p { font: 13px var(--f-ja); letter-spacing: .06em; text-transform: none; }
#atl-choose button { display: flex; width: 100%; align-items: baseline; justify-content: space-between; gap: 14px; min-height: 36px; padding: 6px 8px;
  background: none; border: 0; border-top: 1px solid rgba(214,221,218,.08); color: #efe8d6; cursor: pointer; text-align: left; }
#atl-choose button:first-of-type { border-top: 0; }
#atl-choose button:hover, #atl-choose button:focus-visible { background: rgba(214,221,218,.07); outline: none; }
#atl-choose b { font: 600 16px var(--f-up, var(--f-latin)); letter-spacing: .04em; } body.ja #atl-choose b { font: 600 15px var(--f-ja); }
#atl-choose small { font: 500 15px var(--f-up, var(--f-latin)); color: var(--atl-gold); font-variant-numeric: lining-nums tabular-nums; font-feature-settings: "lnum" 1, "tnum" 1; white-space: nowrap; }
@media (pointer: coarse) { #atl-choose button { min-height: 44px; } }
/* (r16) a tier name and its number stay on one line ("Jūyō" / "34" wrapped apart on cards and sheets) */
#atl-card .dz, .atl-tn { white-space: nowrap; }   /* (never .tn: the engine's family-tree node class) */
/* (r16) the SIDE card (desktop, tablets on their side) ends above the corner row (About · ? · ⛶ · ⋯ at --tl-h + 18 px, 30 px
   tall; 44 on touch): at 1280 × 720 and iPad landscape the row sat on the card's last lines ("Who held Bizen →" hidden) */
@media (min-width: 1101px), (min-width: 761px) and (min-height: 521px) and (orientation: landscape) {
  body.atlas #atl-card { max-height: calc(100vh - var(--tl-h) - 70px - 18px - 30px - 12px) !important; }
}
@media (pointer: coarse) and (min-width: 1101px), (pointer: coarse) and (min-width: 761px) and (min-height: 521px) and (orientation: landscape) {
  body.atlas #atl-card { max-height: calc(100vh - var(--tl-h) - 70px - 18px - 44px - 12px) !important; }
}
#atl-card a.amk span.atl-tn { font: inherit; color: inherit; letter-spacing: inherit; }
/* (r16) pupils without designated works fold under one line */
#atl-card details.pfold { margin-top: 4px; } #atl-card details.pfold summary { cursor: pointer; padding: 8px 0 4px; font: italic 13px var(--f-ital); color: #a9b5b0; list-style-position: inside; }
body.ja #atl-card details.pfold summary { font: 13px var(--f-ja); }
/* (r16) touch sizes the probes now run with: the 44 px Views button and corner row are taller than the 30 px ones the phone
   layout was measured on — the Views sheet opens under its button, the sword-shape panel stops above the corner row, and a
   portrait tablet's full card sheet takes the search's place (as on phones) */
@media (pointer: coarse) and (max-width: 760px), (pointer: coarse) and (max-height: 520px) and (max-width: 1100px) { body.layers-open #atl-layers { margin-top: 12px !important; } }
@media (min-width: 761px) and (max-width: 1100px) and (min-height: 521px) and (orientation: portrait) { body.sheetfull #atl-search, body.sheetfull #atl-res { display: none !important; } }
/* (r16) a small phone framed under NihontoWatch's tab bar (iPhone SE: ~320 × 500): the search results and the Views sheet stop
   above the corner row, and while the sword-shape panel is open it is the one sheet (the search and Views step back) */
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) {
  #atl-res { max-height: min(52vh, calc(100vh - var(--tl-h) - 18px - 44px - 10px - 112px)) !important; }
  body.layers-open #atl-layers { max-height: calc(100vh - var(--tl-h) - 18px - 44px - 10px - 162px); overflow: auto; }
}
@media (max-width: 560px) and (max-height: 640px) { body.sugata-open #atl-search, body.sugata-open #atl-layersb, body.sugata-open #atl-res { display: none !important; } }
/* (r16) a phone on its side with touch: the Views button is 44 px tall (ends at 96), so the legend and the Views sheet start below it */
@media (pointer: coarse) and (max-height: 520px) and (max-width: 1100px) and (min-width: 561px) {
  body.atlas #atl-legend { top: 102px !important; max-height: calc(100vh - var(--tl-h) - 1.6vh - 114px) !important; }
  body.layers-open #atl-layers { top: 102px !important; margin-top: 0 !important; max-height: calc(100vh - var(--tl-h) - 1.6vh - 114px) !important; }
}
/* (r16) a portrait phone in Japanese, 1336–92: both courts' era names on ONE line (the second line pushed the era bands out of the
   timeline); the era that ended that year is left to wider screens */
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) {
  body.ja #atl-nengo br, body.ja #atl-nengo i.pv { display: none; }
  body.ja #atl-nengo { white-space: nowrap; } body.ja #atl-nengo em.ct { margin-left: 4px; } body.ja #atl-nengo em.ct:first-child { margin-left: 0; }
  body.ja #atl-nengo i.pv { font-style: normal; }
}
@media (max-width: 380px) { body.atlas.ja #atl-nengo { font-size: 12px !important; letter-spacing: 0 !important; } body.atlas.ja #atl-nengo em.ct { margin-left: 2px; } }
/* (r16b, CRITIQUE_R6 S3/S10) the narrow track draws the general periods (atlas.js ERAS_COARSE): a little tighter tracking so
   "Kamakura" keeps its whole name on an upright phone; the unnamed slivers (Momoyama, Meiji) are plain dividers, not empty boxes */
body.atlas #atl-track.coarse .band .bl { letter-spacing: .05em !important; }
body.atlas #atl-track.coarse .band.nolab { background: transparent !important; }
@media (max-width: 360px) { body.atlas:not(.ja) #atl-track.coarse .band .bl { font-size: 11px !important; letter-spacing: .03em !important; } }
/* (r16b, CRITIQUE_R6 S11) an upright phone: Views sits at the end of the search row (no lone box under it) and opens as a
   bottom sheet over the timeline — a grab line, its title and a close button, the map dimmed behind (a tap there closes it) */
#atl-layers .shd { display: none; }
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) {
  body.atlas #atl-search { left: 16px !important; transform: none !important; width: calc(100vw - 32px - 56px) !important; }
  body.atlas #atl-search input { box-sizing: border-box; min-height: 44px; }
  body.atlas #atl-layersb { top: 60px !important; left: auto !important; right: 16px !important; width: 48px; min-height: 44px; padding: 0 !important; text-align: center; }
  body.atlas.layers-open::before { content: ''; position: fixed; inset: 0; z-index: 19; background: rgba(6,10,10,.42); }
  body.atlas.layers-open #atl-layers { position: fixed !important; top: auto !important; left: 0 !important; right: 0 !important; bottom: 0 !important; width: auto !important; margin: 0 !important;
    max-height: min(72vh, calc(100vh - 120px)) !important; overflow: auto; z-index: 20; box-sizing: border-box; border: 0 !important; border-top: 1px solid var(--atl-line) !important;
    border-radius: 14px 14px 0 0; background: rgba(18,25,24,.98) !important; padding: 6px 18px calc(18px + env(safe-area-inset-bottom)) !important; box-shadow: 0 -12px 40px rgba(0,0,0,.45); }
  body.atlas.layers-open #atl-layers .shd { display: flex; align-items: center; justify-content: space-between; position: relative; padding: 14px 0 6px; margin-bottom: 4px; border-bottom: 1px solid rgba(214,221,218,.10); }
  #atl-layers .shd .sgrab { position: absolute; left: 50%; top: 2px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: rgba(214,221,218,.28); }
  #atl-layers .shd b { font: 600 13px var(--f-up, var(--f-latin)); letter-spacing: .16em; text-transform: uppercase; color: #d6ddda; }
  body.ja #atl-layers .shd b { font: 600 15px var(--f-ja); letter-spacing: .12em; text-transform: none; }
  #atl-layers .shd .shx { width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; color: #d6ddda; font: 300 26px/1 var(--f-latin); cursor: pointer; }
  body.atlas.layers-open.keyopen #atl-key { z-index: 21 !important; top: 112px !important; }
}
body.atlas #atl-q { text-overflow: ellipsis; } body.atlas #atl-q::placeholder { text-overflow: ellipsis; }
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) { body.atlas #atl-toast { top: 116px; max-width: calc(100vw - 32px); box-sizing: border-box; } }
/* (r16b, CRITIQUE_R6 S15) Help reads in roman: long italic Cormorant at 15 px was hard going; the keys keep their kbd caps */
body.atlas:not(.ja) #help .hb p, body.atlas:not(.ja) #help .about, body.atlas:not(.ja) #help .keys, body.atlas:not(.ja) #help .keys dd { font-family: CormorantG, Shippori, serif !important; font-weight: 400 !important; font-style: normal !important; font-size: 16px !important; line-height: 1.55 !important; }
body.atlas:not(.ja) #help .hb p.k { font-size: 15px !important; }
/* (r16b, delight) the maker card's market link sits under "Designated" (not after the pupils); every card ends with a quiet
   "Share this view" */
#atl-card .mkt { margin: 6px 0 14px; }
#atl-card .shr { margin: 14px 0 0; padding-top: 8px; border-top: 1px solid rgba(214,221,218,.08); }
#atl-card .shrb { background: none; border: 0; padding: 4px 0; color: #aab6b1; font: italic 14px var(--f-ital); cursor: pointer; }
#atl-card .shrb::before { content: '↗'; display: inline-block; margin-right: 7px; font-style: normal; color: var(--atl-gold, #c9b27c); }
#atl-card .shrb:hover { color: #e3e8e5; }
body.ja #atl-card .shrb { font: 14px var(--f-ja); letter-spacing: .04em; }
@media (pointer: coarse) { #atl-card .shrb { min-height: 44px; } }
/* (r17, CRITIQUE_R7 S1) the bottom sheet's head is a solid band: scrolled rows pass UNDER it, never under a floating grab line */
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px), (min-width: 761px) and (max-width: 1100px) and (min-height: 521px) and (orientation: portrait) {
  body.atlas #atl-card .atl-grab { position: sticky !important; top: calc(-1 * var(--g3)) !important; width: calc(100% + 2 * var(--g3)) !important; height: calc(var(--g3) + 22px) !important;
    margin: calc(-1 * var(--g3)) calc(-1 * var(--g3)) 6px !important; background: rgb(16, 22, 21) !important; box-shadow: 0 8px 10px -8px rgba(0, 0, 0, .7); }
  body.atlas #atl-card .atl-grab i { margin-top: calc(var(--g3) * .5) !important; }
  body.atlas #atl-card .x { position: sticky !important; float: right; top: calc(-1 * var(--g3) + 1px) !important; margin: calc(-1 * var(--g3) - 45px) calc(-1 * var(--g3) + 8px) 0 0; z-index: 4; }
}
/* (r17, CRITIQUE_R7 S2) nothing from an open card (or the chooser) shows below or through About */
body.aboutopen #atl-card, body.aboutopen #atl-choose { visibility: hidden !important; }
/* (r17, CRITIQUE_R7 S5) the playhead line in two halves, clear of the period names (atlas.js headGap sets --kt / --kb) */
body.atlas #atl-head::before { bottom: auto !important; height: var(--kt, 100%); }
body.atlas #atl-head::after { content: ''; position: absolute; left: -.5px; bottom: 0; width: 1px; height: var(--kb, 0px); background: var(--atl-gold); box-shadow: 0 0 10px rgba(217,191,125,.55); }
/* (r17) portrait phones: three quiet year ticks under the general periods (1000 · 1300 · 1600 · 1900) */
@media (max-width: 560px), (max-width: 760px) and (min-height: 521px) {
  body.atlas #atl-track .ticks { display: block !important; top: var(--bandb, 36px) !important; height: 11px; pointer-events: none; }
  body.atlas #atl-head::after { display: none; }
  body.atlas #atl-track .ticks span { display: none; font-size: 10px !important; line-height: 11px; color: rgba(214,221,218,.5) !important; }
  body.atlas #atl-track .hist { height: 14px !important; } body.atlas #atl-track .bands { top: 15px !important; }   /* 3 px up: room for the year ticks under the names */
  body.atlas #atl-track:not(.tk-room) .ticks { display: none !important; }
  body.atlas #atl-track .ticks span.mj { display: block; }
  body.atlas #atl-track .ticks span.mj:last-child { transform: translateX(-100%); }
  body.atlas #atl-track .ticks span.mj:first-child { transform: translateX(-50%); }
}
body.atlas #atl-track .band.sliver { padding-left: 2px !important; } body.atlas #atl-track .band.sliver .bl { letter-spacing: 0 !important; padding-left: 0 !important; margin-left: 0 !important; }
/* (r18) legend rows: a long holder name ("Shogunal retainers (hatamoto)") wraps inside its column, never under the count */
body.atlas #atl-legend .hl { grid-template-columns: 14px minmax(0, 1fr) auto; }
body.atlas #atl-legend .hl span { white-space: normal; text-overflow: clip; line-height: 1.22; padding: 1px 0; }
