/* Blade of Valor 2 — interactive illustrated 2D atlas */
.world-atlas-section { position: relative; padding-top: clamp(4.5rem, 8vw, 7.5rem); padding-bottom: clamp(4.5rem, 8vw, 7.5rem); }
.atlas-intro { max-width: 720px; margin: 1.1rem auto 0; color: var(--muted, #a7a7aa); line-height: 1.8; font-size: .96rem; }
.atlas-shell { width: min(1440px, calc(100% - 2.5rem)); margin: 3rem auto 0; padding: clamp(.7rem, 1.5vw, 1.25rem); border: 1px solid rgba(205,169,95,.26); border-radius: 1.05rem; background: radial-gradient(ellipse at 15% 0%,rgba(112,91,53,.14),transparent 42%), linear-gradient(145deg,rgba(17,20,26,.98),rgba(7,9,13,.985)); box-shadow: 0 28px 90px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.035); }
.atlas-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .55rem; margin-bottom: .85rem; }
.atlas-tab { display: flex; align-items: center; justify-content: center; gap: .6rem; min-height: 52px; padding: .7rem .85rem; border: 1px solid rgba(196,165,105,.18); border-radius: .55rem; color: #aeb0b5; background: rgba(255,255,255,.025); font: 600 .69rem/1.2 Montserrat,sans-serif; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; transition: color .2s,border-color .2s,background .2s,transform .2s; }
.atlas-tab span { color: #c8a45c; font-size: 1.05rem; }
.atlas-tab:hover { color: #f5e6c2; border-color: rgba(211,174,98,.55); transform: translateY(-1px); }
.atlas-tab.active { color: #f6e5bd; border-color: rgba(216,179,105,.7); background: linear-gradient(135deg,rgba(161,122,49,.24),rgba(75,58,34,.12)); box-shadow: inset 0 0 22px rgba(211,172,94,.08),0 0 22px rgba(186,143,67,.08); }
.atlas-layout { display: grid; grid-template-columns: minmax(0,1.66fr) minmax(300px,.74fr); gap: .85rem; align-items: stretch; }
.atlas-visual-column { min-width: 0; }
.atlas-map-stage { position: relative; min-height: 560px; height: clamp(540px,48vw,740px); overflow: hidden; border: 1px solid rgba(190,173,136,.2); border-radius: .75rem; isolation: isolate; background: radial-gradient(ellipse at 50% 45%,#334451,#101a23 69%,#080e15); }
.atlas-map-vignette { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(180deg,rgba(5,8,12,.16),transparent 18%,transparent 72%,rgba(3,6,10,.55)),radial-gradient(ellipse at center,transparent 42%,rgba(3,6,10,.38) 100%); }
.atlas-map-label { position: absolute; z-index: 2; pointer-events: none; color: rgba(240,224,186,.72); font: 700 .55rem/1 Cinzel,serif; letter-spacing: .17em; text-shadow: 0 2px 7px #071018,0 0 12px #071018; white-space: nowrap; }
.atlas-map-label-forest { left: 8%; top: 38%; }
.atlas-map-label-snow { left: 7%; top: 10%; }
.atlas-map-label-crystal { right: 8%; top: 26%; }
.atlas-map-label-fields { right: 5%; bottom: 23%; }
.atlas-map-markers { position: absolute; z-index: 4; inset: 0; pointer-events: none; }
.atlas-marker { position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(244,214,151,.92); border-radius: 50%; color: #f9e8bd; background: linear-gradient(145deg,#9c7437,#44331e); box-shadow: 0 0 0 4px rgba(219,180,104,.11),0 4px 15px rgba(0,0,0,.65); font: 700 .62rem Cinzel,serif; cursor: pointer; pointer-events: auto; transform: translate(-50%,-50%); transition: background .2s,box-shadow .2s,scale .2s; }
.atlas-marker::after { content: ""; position: absolute; inset: -6px; border: 1px solid rgba(230,197,132,.4); border-radius: inherit; animation: atlas-pulse 2.9s ease-out infinite; }
.atlas-marker:hover,.atlas-marker:focus-visible { z-index: 3; scale: 1.16; outline: none; background: #d3ad65; color: #16120b; box-shadow: 0 0 0 6px rgba(223,185,112,.17),0 0 24px rgba(230,190,106,.6); }
.atlas-marker.active { color: #1c160b; background: #ead09a; box-shadow: 0 0 0 5px rgba(239,207,144,.24),0 0 30px rgba(230,190,106,.78); }
.atlas-marker.secret { border-style: dashed; color: #c5c8cc; background: linear-gradient(145deg,#41474f,#1c232c); }
.atlas-marker.boss { border-color: rgba(223,114,83,.95); background: linear-gradient(145deg,#8e382d,#33191b); }
.atlas-marker.boss.active { color: #fff0dd; background: #a94e3a; box-shadow: 0 0 0 5px rgba(214,92,69,.22),0 0 28px rgba(219,93,72,.68); }
@keyframes atlas-pulse { 0% { opacity: .6; scale: .78; } 75%,100% { opacity: 0; scale: 1.55; } }
.atlas-map-controls { position: absolute; z-index: 5; right: .85rem; bottom: .9rem; display: flex; gap: .35rem; }
.atlas-map-controls button { width: 36px; height: 36px; border: 1px solid rgba(228,197,140,.35); border-radius: .35rem; color: #f0ddb7; background: rgba(8,13,19,.83); backdrop-filter: blur(8px); font-size: 1.1rem; cursor: pointer; }
.atlas-map-controls button:hover { color: #16120b; background: #d6b36f; }
.atlas-map-caption { position: absolute; z-index: 3; left: 1rem; bottom: 1rem; display: flex; align-items: center; gap: .5rem; color: rgba(241,222,184,.72); font: 600 .53rem Montserrat,sans-serif; letter-spacing: .15em; text-shadow: 0 1px 5px #000; pointer-events: none; }
.atlas-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #d5b36d; box-shadow: 0 0 12px #d5b36d; }
.atlas-map-fallback { position: absolute; z-index: 2; inset: 0; display: grid; place-items: center; color: #d7c8a9; font: 600 .8rem Montserrat,sans-serif; pointer-events: none; }
.atlas-map-fallback[hidden] { display: none; }
.atlas-inspector { min-width: 0; overflow: hidden; border: 1px solid rgba(203,169,105,.2); border-radius: .75rem; background: linear-gradient(165deg,rgba(24,29,37,.97),rgba(10,13,18,.99)); }
.atlas-inspector-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .9rem 1rem .7rem; border-bottom: 1px solid rgba(206,172,107,.14); }
.atlas-inspector-kicker { color: #d7b873; font: 700 .58rem Montserrat,sans-serif; letter-spacing: .17em; }
.atlas-inspector-mark { color: rgba(190,194,199,.38); font: 600 .49rem Montserrat,sans-serif; letter-spacing: .13em; }
.atlas-inspector-content { padding: 1.1rem 1.2rem 1.2rem; }
.atlas-inspector-type { margin-bottom: .55rem; color: #c6a45f; font: 700 .53rem Montserrat,sans-serif; letter-spacing: .15em; text-transform: uppercase; }
.atlas-inspector-content h3 { margin: 0 0 .65rem; color: #f2e8d4; font: 600 clamp(1.2rem,1.65vw,1.7rem)/1.16 Cinzel,serif; }
.atlas-inspector-content p { margin: 0 0 .85rem; color: #b6b7bb; font-size: .78rem; line-height: 1.72; }
.atlas-detail-tags { display: flex; flex-wrap: wrap; gap: .38rem; margin: .7rem 0 .9rem; }
.atlas-detail-tags span { padding: .36rem .52rem; border: 1px solid rgba(207,174,112,.23); border-radius: 99px; color: #ddc48f; background: rgba(198,158,86,.07); font-size: .59rem; }
.atlas-tip { padding: .7rem .8rem; border-left: 2px solid #c89e55; background: rgba(194,151,73,.08); }
.atlas-tip b { display: block; margin-bottom: .25rem; color: #d8b66d; font: 700 .52rem Montserrat,sans-serif; letter-spacing: .15em; }
.atlas-tip p { margin: 0; color: #c6c2b9; font-size: .72rem; line-height: 1.6; }
.atlas-reward { margin-top: .8rem; padding: .7rem .8rem; border: 1px solid rgba(195,155,75,.2); border-radius: .45rem; background: rgba(165,125,53,.06); }
.atlas-reward small { display: block; margin-bottom: .25rem; color: #c7a566; font: 700 .5rem Montserrat,sans-serif; letter-spacing: .14em; }
.atlas-reward strong { color: #e8d6ae; font-size: .74rem; font-weight: 600; }
.atlas-footer-note { display: flex; align-items: center; gap: .55rem; padding: .9rem .25rem .15rem; color: rgba(189,188,187,.57); font-size: .65rem; line-height: 1.6; }
.atlas-footer-note span:first-child { color: #d0a75d; }
.atlas-collection { min-height: 560px; padding: 1.25rem; border: 1px solid rgba(190,173,136,.2); border-radius: .75rem; background: radial-gradient(ellipse at 50% 0%,rgba(89,102,116,.18),transparent 60%),linear-gradient(150deg,#101923,#090e14); }
.atlas-collection[hidden] { display: none; }
.atlas-collection-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.atlas-collection-kicker { color: #d3b474; font: 700 .62rem Montserrat,sans-serif; letter-spacing: .18em; }
.atlas-collection-count { color: #858b94; font-size: .65rem; }
.atlas-collection-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .7rem; }
.atlas-collection-card { position: relative; min-width: 0; overflow: hidden; padding: 0; border: 1px solid rgba(194,169,122,.18); border-radius: .6rem; text-align: left; color: inherit; background: linear-gradient(150deg,rgba(32,42,52,.92),rgba(9,14,20,.96)); cursor: pointer; transition: border-color .2s,transform .2s,box-shadow .2s; }
.atlas-collection-card:hover { transform: translateY(-3px); border-color: rgba(214,178,105,.55); }
.atlas-collection-card.active { border-color: #cba45e; box-shadow: 0 0 0 1px rgba(213,172,96,.2),0 8px 24px rgba(0,0,0,.25); }
.atlas-card-art { position: relative; display: grid; place-items: center; height: 120px; overflow: hidden; background: radial-gradient(ellipse at 50% 70%,rgba(212,170,98,.18),transparent 52%),linear-gradient(145deg,#263746,#111923); }
.atlas-card-art::before { content: ""; position: absolute; width: 110px; height: 110px; border: 1px solid rgba(227,197,139,.14); border-radius: 50%; box-shadow: 0 0 0 14px rgba(226,193,129,.035),0 0 0 30px rgba(226,193,129,.025); }
.atlas-card-glyph { position: relative; z-index: 1; color: #e0c48c; font: 400 3rem/1 Cinzel,serif; text-shadow: 0 7px 18px rgba(0,0,0,.65),0 0 24px rgba(211,172,100,.3); }
.atlas-collection-card[data-tone="danger"] .atlas-card-art { background: radial-gradient(ellipse at 50% 70%,rgba(190,63,47,.35),transparent 52%),linear-gradient(145deg,#352a31,#101319); }
.atlas-collection-card[data-tone="ice"] .atlas-card-art { background: radial-gradient(ellipse at 50% 70%,rgba(91,188,223,.28),transparent 52%),linear-gradient(145deg,#273b4a,#101923); }
.atlas-collection-card[data-tone="friendly"] .atlas-card-art { background: radial-gradient(ellipse at 50% 70%,rgba(99,173,111,.25),transparent 52%),linear-gradient(145deg,#263c35,#111a18); }
.atlas-card-info { padding: .72rem .78rem .82rem; }
.atlas-card-type { display: block; margin-bottom: .35rem; color: #bc9b5d; font: 700 .48rem Montserrat,sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.atlas-card-info strong { display: block; overflow: hidden; color: #e7e0d4; font: 600 .79rem/1.35 Cinzel,serif; text-overflow: ellipsis; }
.atlas-card-rarity { display: block; margin-top: .38rem; color: #89919b; font: 600 .49rem Montserrat,sans-serif; letter-spacing: .08em; }
.atlas-rarity-common { color: #aeb4bd !important; }
.atlas-rarity-uncommon { color: #82c18b !important; }
.atlas-rarity-rare { color: #69b6e8 !important; }
.atlas-rarity-epic { color: #bd91ef !important; }
.atlas-rarity-legendary { color: #e0b45d !important; }
.atlas-map-stage[hidden],.atlas-visual-column [hidden] { display: none !important; }
@media (max-width: 1100px) {
  .atlas-layout { grid-template-columns: minmax(0,1.35fr) minmax(270px,.8fr); }
  .atlas-map-stage { min-height: 520px; }
  .atlas-collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .atlas-shell { width: min(100% - 1.2rem,680px); margin-top: 2rem; padding: .55rem; }
  .atlas-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .4rem; }
  .atlas-tab { min-height: 47px; justify-content: flex-start; padding: .58rem .65rem; font-size: .58rem; letter-spacing: .04em; }
  .atlas-layout { grid-template-columns: minmax(0,1fr); }
  .atlas-map-stage { height: clamp(430px,112vw,560px); min-height: 430px; }
  .atlas-map-label { font-size: .42rem; letter-spacing: .1em; }
  .atlas-marker { width: 28px; height: 28px; font-size: .55rem; }
  .atlas-inspector { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1fr); }
  .atlas-inspector-top { grid-column: 1/-1; }

.atlas-inspector-content { align-self: center; padding: .85rem; }
  .atlas-inspector-content h3 { font-size: 1.05rem; }
  .atlas-inspector-content p { font-size: .69rem; }
  .atlas-collection { min-height: 0; padding: .8rem; }
  .atlas-collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .atlas-card-art { height: 105px; }
  .atlas-map-caption { left: .65rem; bottom: .7rem; font-size: .42rem; letter-spacing: .09em; }
  .atlas-map-controls { right: .55rem; bottom: .55rem; }
  .atlas-map-controls button { width: 32px; height: 32px; }
}
@media (max-width: 420px) {
  .atlas-inspector { grid-template-columns: minmax(0,1fr); }

.atlas-inspector-content { padding: .9rem; }
  .atlas-map-stage { height: 460px; }
  .atlas-marker { width: 26px; height: 26px; }
  .atlas-map-label { font-size: .37rem; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-marker::after { animation: none; }
  .atlas-tab,.atlas-collection-card,.atlas-marker { transition: none; }
}
@media (max-width: 920px) and (min-width: 761px) {
  .topbar-inner { gap: .55rem; }
  .logo { font-size: .9rem; letter-spacing: .09em; }
  .nav-wrap { position: relative; gap: .55rem; }
  .menu-toggle { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; }
  .main-nav { display: none !important; position: absolute; top: calc(100% + .7rem); right: 0; left: auto; width: min(88vw,340px); max-height: calc(100vh - 100px); overflow: auto; flex-direction: column; align-items: stretch; gap: .15rem; padding: .6rem; border: 1px solid rgba(223,196,137,.22); border-radius: .85rem; background: rgba(7,10,15,.97); box-shadow: 0 22px 55px rgba(0,0,0,.48); opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(-8px) scale(.98); }
  .main-nav.open { display: flex !important; opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0) scale(1); }
  .main-nav a { display: block; padding: .8rem .9rem; font-size: .7rem; letter-spacing: .1em; }
}

/* === Atlas art direction v2: illustrated world-map presentation, no live map WebGL === */
.atlas-shell.atlas-map-open { padding: .6rem; }
.atlas-shell.atlas-map-open .atlas-tabs { display:none; }
.atlas-layout.is-map { display:block; position:relative; }
.atlas-layout.is-map .atlas-visual-column { width:100%; }
.atlas-map-stage {
  height: clamp(590px, 57vw, 850px);
  min-height: 590px;
  border:1px solid rgba(213,180,118,.45);
  border-radius:.72rem;
  background:#101720;
  box-shadow:0 24px 70px rgba(0,0,0,.42),inset 0 0 0 1px rgba(255,255,255,.035);
  cursor:grab;
  touch-action:pan-y;
  user-select:none;
}
.atlas-map-stage.is-dragging { cursor:grabbing; }
.atlas-map-layer { position:absolute; inset:0; transform:translate3d(0,0,0) scale(1); transform-origin:50% 50%; will-change:transform; transition:transform .22s cubic-bezier(.2,.75,.2,1); }
.atlas-map-stage.is-dragging .atlas-map-layer { transition:none; }
.atlas-map-art { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:cover; object-position:center; pointer-events:none; filter:saturate(1.08) contrast(1.05) brightness(.89); }
.atlas-route-lines { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; opacity:.76; }
.atlas-route-lines path { fill:none; stroke:rgba(233,196,117,.78); stroke-width:2.1; stroke-linecap:round; stroke-dasharray:8 8; filter:drop-shadow(0 0 4px rgba(255,190,85,.8)); }
.atlas-map-vignette { z-index:2; background:linear-gradient(180deg,rgba(4,7,11,.08),transparent 20%,transparent 57%,rgba(3,6,10,.4)),linear-gradient(90deg,rgba(3,5,8,.14),transparent 22%,transparent 88%,rgba(3,5,8,.23)),radial-gradient(ellipse at center,transparent 52%,rgba(2,5,9,.32) 100%); }
.atlas-map-label { z-index:2; padding:.42rem .68rem; border:1px solid rgba(231,197,135,.25); border-radius:99px; background:rgba(8,12,16,.45); backdrop-filter:blur(4px); color:rgba(246,229,194,.9); font-size:clamp(.48rem,.66vw,.68rem); letter-spacing:.2em; }
.atlas-map-label-forest { left:18%; top:42%; }
.atlas-map-label-snow { left:17%; top:7%; }
.atlas-map-label-crystal { right:8%; top:62%; }
.atlas-map-label-fields { right:23%; bottom:34%; }
.atlas-map-sidebar { position:absolute; z-index:7; inset:0 auto 0 0; width:126px; display:flex; flex-direction:column; gap:.35rem; padding:.85rem .55rem; border-right:1px solid rgba(225,189,118,.36); background:linear-gradient(180deg,rgba(4,7,11,.96),rgba(8,11,15,.8) 75%,rgba(5,8,12,.96)); box-shadow:14px 0 38px rgba(0,0,0,.18); }
.atlas-map-brand { padding:.3rem .2rem .9rem; border-bottom:1px solid rgba(214,178,106,.19); color:#f0d79c; font:700 .63rem Cinzel,serif; letter-spacing:.13em; text-align:center; }
.atlas-map-brand span { display:block; margin-top:.18rem; color:#b9975c; font-size:.52rem; }
.atlas-map-sidebar button { display:flex; align-items:center; gap:.55rem; min-height:39px; padding:.5rem .5rem; border:1px solid transparent; border-radius:.3rem; color:rgba(225,222,214,.7); background:transparent; text-align:left; font:600 .53rem Montserrat,sans-serif; letter-spacing:.04em; cursor:pointer; }
.atlas-map-sidebar button i { width:20px; flex:0 0 20px; color:#c4a36c; font:normal 1rem Cinzel,serif; text-align:center; }
.atlas-map-sidebar button:hover,.atlas-map-sidebar button.active { border-color:rgba(232,191,105,.48); color:#f7e5bd; background:linear-gradient(90deg,rgba(180,137,59,.3),rgba(127,91,35,.08)); box-shadow:inset 0 0 18px rgba(220,176,91,.08); }
.atlas-map-compass { position:absolute; z-index:6; top:16px; right:19px; display:grid; place-items:center; width:60px; height:60px; border:1px solid rgba(229,198,141,.48); border-radius:50%; color:#ead5a7; background:rgba(7,12,17,.48); box-shadow:0 5px 22px rgba(0,0,0,.3); }
.atlas-map-compass b { font-size:1.75rem; line-height:1; text-shadow:0 0 13px rgba(226,185,100,.45); }
.atlas-map-compass span,.atlas-map-compass small { position:absolute; font:600 .48rem Montserrat,sans-serif; }
.atlas-map-compass span { top:3px; } .atlas-map-compass small { bottom:3px; }
.atlas-map-markers { position:absolute; z-index:4; inset:0; pointer-events:none; }
.atlas-marker { display:flex; align-items:center; gap:.34rem; width:auto; height:auto; min-height:27px; padding:0; border:0; border-radius:0; overflow:visible; background:transparent; box-shadow:none; color:#fff2ce; pointer-events:auto; transform:translate(-50%,-50%); transition:filter .18s,scale .18s; }
.atlas-marker-number { position:relative; z-index:1; display:grid; place-items:center; width:31px; height:31px; flex:0 0 31px; border:1px solid rgba(244,213,149,.94); border-radius:50%; color:#fff0c7; background:linear-gradient(145deg,#6d5128,#18130d); box-shadow:0 0 0 3px rgba(9,11,13,.6),0 2px 12px #000; font:700 .66rem Cinzel,serif; }
.atlas-marker-label { padding:.38rem .58rem; border:1px solid rgba(221,187,125,.44); border-radius:3px; color:#f3e6ca; background:linear-gradient(180deg,rgba(8,12,17,.94),rgba(6,8,11,.85)); box-shadow:0 4px 12px rgba(0,0,0,.62); font:600 .57rem/1.2 Montserrat,sans-serif; white-space:nowrap; text-shadow:0 1px 3px #000; }
.atlas-marker::after { content:""; position:absolute; left:0; top:0; width:31px; height:31px; border:1px solid rgba(230,197,132,.42); border-radius:50%; animation:atlas-pulse 3s ease-out infinite; pointer-events:none; }
.atlas-marker:hover,.atlas-marker:focus-visible { z-index:8; scale:1.08; outline:none; filter:brightness(1.3); }
.atlas-marker.active { z-index:9; }
.atlas-marker.active .atlas-marker-number { color:#1a140a; background:linear-gradient(145deg,#fff0b6,#bd8b36); box-shadow:0 0 0 4px rgba(242,205,135,.22),0 0 25px rgba(248,205,120,.78); }
.atlas-marker.current .atlas-marker-number { border-color:#a6e6a0; color:#e8ffe4; background:linear-gradient(145deg,#3a8752,#142d1d); }
.atlas-marker.boss .atlas-marker-number { border-color:#ef957a; background:linear-gradient(145deg,#a34a37,#3e1516); }
.atlas-marker.secret .atlas-marker-number { border-color:#b69afa; color:#f0e7ff; background:linear-gradient(145deg,#6241a2,#211236); }
.atlas-map-controls { top:91px; right:17px; bottom:auto; display:flex; flex-direction:column; gap:.3rem; }
.atlas-map-controls button { width:34px; height:34px; border:1px solid rgba(230,197,137,.45); border-radius:3px; color:#f2dfb5; background:rgba(7,11,16,.8); box-shadow:0 3px 12px rgba(0,0,0,.35); font-size:1rem; }
.atlas-map-controls button:hover { color:#1b150b; background:#e2bd70; }
.atlas-map-region-strip { position:absolute; z-index:7; left:clamp(535px,43%,680px); right:230px; bottom:15px; min-height:82px; display:flex; align-items:stretch; gap:.42rem; overflow-x:auto; padding:.42rem; border:1px solid rgba(217,184,125,.44); border-radius:.35rem; background:linear-gradient(180deg,rgba(7,10,14,.9),rgba(4,7,10,.96)); box-shadow:0 8px 24px rgba(0,0,0,.48); scrollbar-width:thin; scrollbar-color:#8c6a36 transparent; }
.atlas-region-thumb { position:relative; display:flex; flex:1 0 74px; min-width:74px; align-items:flex-end; justify-content:center; min-height:70px; padding:.38rem .28rem; border:1px solid rgba(210,178,120,.24); border-radius:3px; color:#e6d8ba; background-size:cover; background-position:center; box-shadow:inset 0 -34px 24px rgba(0,0,0,.82); font:600 .5rem/1.22 Montserrat,sans-serif; text-align:center; cursor:pointer; }
.atlas-region-thumb[data-art="forest"] { background-image:url('../assets/atlas-forest.webp'); }
.atlas-region-thumb[data-art="snow"] { background-image:url('../assets/atlas-snow.webp'); }
.atlas-region-thumb[data-art="house"] { background-image:url('../assets/atlas-house.webp'); }
.atlas-region-thumb[data-art="cave"],.atlas-region-thumb[data-art="catacomb"] { background-image:url('../assets/atlas-cave.webp'); }
.atlas-region-thumb[data-art="crystal"] { background-image:url('../assets/atlas-crystal.webp'); }
.atlas-region-thumb[data-art="village"] { background-image:url('../assets/atlas-village.webp'); }
.atlas-region-thumb[data-art="castle"] { background-image:url('../assets/atlas-castle.webp'); }
.atlas-region-thumb-number { position:absolute; top:.22rem; left:.25rem; display:grid; place-items:center; width:18px; height:18px; border:1px solid rgba(239,211,153,.75); border-radius:50%; color:#fff0cb; background:rgba(7,10,14,.78); font:700 .5rem Cinzel,serif; }
.atlas-region-thumb.active { border-color:#f2cb7c; box-shadow:inset 0 -34px 24px rgba(0,0,0,.8),0 0 0 1px rgba(240,197,117,.55),0 0 15px rgba(240,190,103,.35); }
.atlas-map-legend { position:absolute; z-index:7; right:12px; bottom:15px; display:grid; gap:.45rem; min-width:190px; padding:.72rem .8rem; border:1px solid rgba(217,184,125,.38); border-radius:.35rem; color:#ddd4c5; background:rgba(6,9,13,.84); box-shadow:0 8px 24px rgba(0,0,0,.4); font:500 .52rem Montserrat,sans-serif; }
.atlas-map-legend span { display:flex; align-items:center; gap:.5rem; }
.legend-dot { width:9px; height:9px; border-radius:50%; box-shadow:0 0 8px currentColor; }
.legend-dot.current { color:#9be48b; background:#9be48b; } .legend-dot.available { color:#edbf5c; background:#edbf5c; } .legend-dot.boss { color:#eb7666; background:#eb7666; } .legend-dot.secret { color:#a98cf0; background:#a98cf0; }
.atlas-map-caption { left:142px; bottom:13px; font-size:.47rem; }
.atlas-map-fallback { display:none !important; }
.atlas-layout.is-map .atlas-inspector { position:absolute; z-index:8; left:138px; bottom:112px; width:min(430px,36%); max-height:255px; overflow:auto; border:1px solid rgba(223,187,117,.56); border-radius:4px; background:linear-gradient(145deg,rgba(4,7,11,.95),rgba(9,12,16,.91)); box-shadow:0 12px 36px rgba(0,0,0,.58),inset 0 0 22px rgba(190,145,65,.035); backdrop-filter:blur(7px); }
.atlas-layout.is-map .atlas-inspector-top { display:none; }
.atlas-layout.is-map .atlas-inspector-content { display:grid; grid-template-columns:105px minmax(0,1fr); align-content:start; gap:.34rem .85rem; padding:.78rem; }
.atlas-location-art { grid-column:1; grid-row:1 / span 5; min-height:142px; border:1px solid rgba(222,186,122,.32); border-radius:2px; background-size:cover; background-position:center; box-shadow:0 4px 16px rgba(0,0,0,.36); }
.atlas-location-art[data-art="forest"],.atlas-location-art[data-art="passage"] { background-image:url('../assets/atlas-forest.webp'); }
.atlas-location-art[data-art="snow"] { background-image:url('../assets/atlas-snow.webp'); }
.atlas-location-art[data-art="house"],.atlas-location-art[data-art="village"] { background-image:url('../assets/atlas-house.webp'); }
.atlas-location-art[data-art="cave"],.atlas-location-art[data-art="catacomb"] { background-image:url('../assets/atlas-cave.webp'); }
.atlas-location-art[data-art="grave"] { background-image:url('../assets/atlas-grave.webp'); }
.atlas-location-art[data-art="crystal"] { background-image:url('../assets/atlas-crystal.webp'); }
.atlas-location-art[data-art="surface"] { background-image:url('../assets/atlas-village.webp'); }
.atlas-location-art[data-art="secret"] { background:radial-gradient(circle at 50% 45%,#5b4b84,#151421 66%); }
.atlas-inspector-content .atlas-inspector-type { grid-column:2; margin:0; font-size:.48rem; }
.atlas-inspector-content h3 { grid-column:2; margin:0; font-size:clamp(1rem,1.25vw,1.35rem); }
.atlas-inspector-content p { grid-column:2; margin:0; font-size:.65rem; line-height:1.5; }
.atlas-inspector-content .atlas-detail-tags { grid-column:2; margin:.12rem 0; gap:.25rem; }
.atlas-inspector-content .atlas-detail-tags span { padding:.24rem .38rem; font-size:.49rem; }
.atlas-inspector-content .atlas-tip,.atlas-inspector-content .atlas-reward { grid-column:2; margin-top:.1rem; padding:.45rem .55rem; }
.atlas-inspector-content .atlas-tip p { font-size:.59rem; }
.atlas-layout:not(.is-map) .atlas-inspector { position:relative; left:auto; bottom:auto; width:auto; max-height:none; }
.atlas-layout:not(.is-map) .atlas-location-art { display:none; }
.atlas-layout:not(.is-map) .atlas-visual-column { width:auto; }
.atlas-collection { contain:content; }
@media (max-width:1100px) and (min-width:761px) {
  .atlas-map-stage { height:620px; min-height:620px; }
  .atlas-layout.is-map .atlas-inspector { width:36%; bottom:112px; }
  .atlas-map-region-strip { left:42%; right:205px; }
  .atlas-map-legend { min-width:172px; }
}
@media (max-width:760px) {
  .atlas-shell.atlas-map-open { padding:.35rem; }
  .atlas-map-stage { height:clamp(500px,132vw,590px); min-height:500px; border-radius:.45rem; touch-action:pan-y; }
  .atlas-map-layer { inset:46px 0 0; }
  .atlas-map-art { object-position:center; }
  .atlas-map-sidebar { inset:0 0 auto 0; width:100%; height:46px; flex-direction:row; align-items:center; justify-content:space-around; gap:.2rem; padding:.24rem; border-right:0; border-bottom:1px solid rgba(225,189,118,.36); }
  .atlas-map-brand { display:none; }
  .atlas-map-sidebar button { flex:1 1 0; justify-content:center; min-height:36px; padding:.25rem .1rem; font-size:.48rem; }
  .atlas-map-sidebar button i { width:auto; flex:0 0 auto; font-size:.95rem; }
  .atlas-map-label { display:none; }
  .atlas-map-compass { top:55px; right:8px; width:42px; height:42px; }
  .atlas-map-compass b { font-size:1.2rem; }
  .atlas-map-controls { top:105px; right:8px; }
  .atlas-map-controls button { width:31px; height:31px; }
  .atlas-marker { gap:0; }
  .atlas-marker-number { width:27px; height:27px; flex-basis:27px; font-size:.56rem; }
  .atlas-marker::after { width:27px; height:27px; }
  .atlas-marker-label { display:none; }
  .atlas-marker.active .atlas-marker-label { display:block; position:absolute; top:31px; left:50%; transform:translateX(-50%); max-width:150px; overflow:hidden; text-overflow:ellipsis; font-size:.49rem; }
  .atlas-map-region-strip { left:8px; right:8px; bottom:8px; min-height:65px; padding:.3rem; gap:.3rem; }
  .atlas-region-thumb { min-width:65px; flex-basis:65px; min-height:58px; font-size:.46rem; }
  .atlas-map-legend { display:none; }
  .atlas-map-caption { left:9px; top:55px; bottom:auto; font-size:.41rem; }
  .atlas-layout.is-map { display:flex; flex-direction:column; gap:.55rem; }
  .atlas-layout.is-map .atlas-inspector { position:relative; inset:auto; width:100%; max-height:none; margin:0; }
  .atlas-layout.is-map .atlas-inspector-content { grid-template-columns:82px minmax(0,1fr); gap:.3rem .65rem; padding:.72rem; }
  .atlas-location-art { min-height:135px; }
  .atlas-inspector-content .atlas-inspector-type { font-size:.45rem; }
  .atlas-inspector-content h3 { font-size:1rem; }
  .atlas-inspector-content p { font-size:.65rem; }
  .atlas-inspector-content .atlas-tip p { font-size:.58rem; }
  .atlas-collection { padding:.55rem; }
  .atlas-collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }

}
@media (max-width:380px) {
  .atlas-map-stage { height:505px; }
  .atlas-map-sidebar button span { font-size:.43rem; }
  .atlas-map-region-strip { left:5px; right:5px; }
  .atlas-layout.is-map .atlas-inspector-content { grid-template-columns:72px minmax(0,1fr); }
  .atlas-location-art { min-height:145px; }
}

/* Detailed creature portraits for the bestiary cards. */
.atlas-collection-card .atlas-card-art { background-size:cover; background-position:center 35%; }
.atlas-collection-card .atlas-card-art::before { display:none; }
.atlas-collection-card .atlas-card-glyph { display:none; }
.atlas-collection-card[data-entry-id="mushroom"] .atlas-card-art { background-image:url('../assets/creature-mushroom.webp'); }
.atlas-collection-card[data-entry-id="bat"] .atlas-card-art { background-image:url('../assets/creature-bat.webp'); }
.atlas-collection-card[data-entry-id="demon"] .atlas-card-art { background-image:url('../assets/creature-demon.webp'); }
.atlas-collection-card[data-entry-id="great-demon"] .atlas-card-art { background-image:url('../assets/creature-great-demon.webp'); }
.atlas-collection-card[data-entry-id="necromancer"] .atlas-card-art { background-image:url('../assets/creature-necromancer.webp'); }
.atlas-collection-card[data-entry-id="snow-boss"] .atlas-card-art { background-image:url('../assets/creature-snow-boss.webp'); }
.atlas-collection-card[data-entry-id="frog"] .atlas-card-art { background-image:radial-gradient(ellipse at 50% 60%,rgba(122,184,104,.5),transparent 50%),linear-gradient(150deg,#294839,#111a19); }
.atlas-collection-card[data-entry-id="samurai"] .atlas-card-art { background-image:radial-gradient(ellipse at 50% 60%,rgba(174,75,54,.35),transparent 48%),linear-gradient(145deg,#332c32,#11151b); }
.atlas-collection-card .atlas-card-art { height:156px; }
.atlas-region-thumb[data-art="grave"] { background-image:url('../assets/atlas-grave.webp'); }
.atlas-region-thumb[data-art="passage"] { background-image:url('../assets/atlas-forest.webp'); }
.atlas-region-thumb[data-art="catacomb"] { background-image:url('../assets/atlas-cave.webp'); }
@media (max-width:760px) {
  .atlas-map-stage { height:calc((100vw - 2.2rem) * .5625 + 46px); min-height:0; aspect-ratio:auto; }
  .atlas-map-layer { inset:0; }
  .atlas-map-art { object-fit:cover; object-position:center; }
  .atlas-map-sidebar { background:linear-gradient(180deg,rgba(4,7,11,.94),rgba(4,7,11,.6)); }
  .atlas-map-region-strip { display:none; }
  .atlas-map-caption { top:auto; left:8px; bottom:7px; padding:.3rem .42rem; border-radius:3px; background:rgba(5,8,12,.64); }
  .atlas-marker-number { width:25px; height:25px; flex-basis:25px; }
  .atlas-marker::after { width:25px; height:25px; }
  .atlas-map-controls { top:auto; bottom:8px; right:8px; flex-direction:row; }
  .atlas-map-compass { top:55px; right:8px; }
  .atlas-collection-card .atlas-card-art { height:130px; }
}
@media (max-width:760px) {
  .atlas-shell.atlas-map-open .atlas-tabs { display:grid; }
  .atlas-map-sidebar { display:none; }
  .atlas-map-stage { height:calc((100vw - 2.2rem) * .5625); min-height:0; }
  .atlas-map-layer { inset:0; }
  .atlas-map-compass { top:9px; left:9px; right:auto; }
  .atlas-map-controls { top:9px; bottom:auto; right:9px; }
  .atlas-map-caption { display:none; }
}

/* Illustrated equipment and potion cards. */
.atlas-collection-card[data-entry-id="legendary-weapon"] .atlas-card-art { background-image:url('../assets/item-legendary-weapon.webp'); }
.atlas-collection-card[data-entry-id="dragon-scale"] .atlas-card-art { background-image:url('../assets/item-dragon-scale.webp'); }
.atlas-collection-card[data-entry-id="armor"] .atlas-card-art { background-image:url('../assets/item-armor.webp'); }
.atlas-collection-card[data-entry-id="healing-potion"] .atlas-card-art { background-image:url('../assets/item-potion-red.webp'); }
.atlas-collection-card[data-entry-id="boost-potion"] .atlas-card-art { background-image:url('../assets/item-potion-blue.webp'); }
.atlas-collection-card[data-entry-id="rare-elixir"] .atlas-card-art { background-image:url('../assets/item-potion-purple.webp'); }
.atlas-collection-card[data-entry-id="legendary-weapon"] .atlas-card-art,
.atlas-collection-card[data-entry-id="dragon-scale"] .atlas-card-art,
.atlas-collection-card[data-entry-id="armor"] .atlas-card-art,
.atlas-collection-card[data-entry-id="healing-potion"] .atlas-card-art,
.atlas-collection-card[data-entry-id="boost-potion"] .atlas-card-art,
.atlas-collection-card[data-entry-id="rare-elixir"] .atlas-card-art { background-size:cover; background-position:center; }
.atlas-location-art span { display:inline-grid; place-items:center; margin:.4rem; width:22px; height:22px; border:1px solid rgba(241,210,151,.78); border-radius:50%; color:#f7e4b9; background:rgba(7,10,14,.78); font:700 .55rem Cinzel,serif; }
.atlas-marker::after { animation:none; }
.atlas-marker.active::after { animation:atlas-pulse 2.8s ease-out infinite; }
@media (max-width:760px) {
  .atlas-marker::after,.atlas-marker.active::after { animation:none; }
  .atlas-layout.is-map .atlas-inspector { backdrop-filter:none; -webkit-backdrop-filter:none; }
}
@media (max-width:1100px) and (min-width:761px) {
  .atlas-map-region-strip { left:calc(36% + 150px); right:205px; }
}

.atlas-map-stage.is-zoomed { touch-action:none; }

.atlas-location-art[data-art="snowcastle"] { background-image:url('../assets/atlas-castle.webp'); }
.atlas-location-art[data-art="fields"] { background-image:url('../assets/atlas-village.webp'); }
.atlas-location-art[data-art="surface"] { background-image:url('../assets/atlas-village.webp'); }
.atlas-region-thumb[data-art="snowcastle"] { background-image:url('../assets/atlas-castle.webp'); }
@media (max-width:760px) {
  .atlas-marker { width:44px; height:44px; min-width:44px; min-height:44px; display:grid; place-items:center; }
  .atlas-marker-number { width:26px; height:26px; }
  .atlas-marker::after { width:26px; height:26px; }
  .atlas-tab,.atlas-collection-card,.atlas-marker,.atlas-region-thumb { transition:none !important; }
}

/* Flat illustrated atlas panels replace every procedural 3D preview. */
.atlas-location-art[data-art="mushroom"]{background-image:url('../assets/creature-mushroom.webp')}
.atlas-location-art[data-art="bat"]{background-image:url('../assets/creature-bat.webp')}
.atlas-location-art[data-art="demon"]{background-image:url('../assets/creature-demon.webp')}
.atlas-location-art[data-art="great-demon"]{background-image:url('../assets/creature-great-demon.webp')}
.atlas-location-art[data-art="necromancer"]{background-image:url('../assets/creature-necromancer.webp')}
.atlas-location-art[data-art="snow-boss"]{background-image:url('../assets/creature-snow-boss.webp')}
.atlas-location-art[data-art="samurai"]{background-image:radial-gradient(ellipse at 50% 60%,rgba(174,75,54,.4),transparent 48%),linear-gradient(145deg,#332c32,#11151b)}
.atlas-location-art[data-art="frog"]{background-image:radial-gradient(ellipse at 50% 60%,rgba(122,184,104,.5),transparent 50%),linear-gradient(150deg,#294839,#111a19)}
.atlas-location-art[data-art="weapon"],.atlas-location-art[data-art="legendary-weapon"]{background-image:url('../assets/item-legendary-weapon.webp')}
.atlas-location-art[data-art="scale"]{background-image:url('../assets/item-dragon-scale.webp')}
.atlas-location-art[data-art="armor"]{background-image:url('../assets/item-armor.webp')}
.atlas-location-art[data-art="potion-red"]{background-image:url('../assets/item-potion-red.webp')}
.atlas-location-art[data-art="potion-blue"]{background-image:url('../assets/item-potion-blue.webp')}
.atlas-location-art[data-art="potion-purple"]{background-image:url('../assets/item-potion-purple.webp')}
.atlas-location-art[data-art="forge"]{background-image:url('../assets/atlas-grave.webp')}
.atlas-location-art[data-art="house"]{background-image:url('../assets/atlas-house.webp')}
.atlas-location-art{background-size:cover;background-position:center 36%;position:relative;overflow:hidden}
.atlas-inspector-art{min-height:158px;background-repeat:no-repeat}
.atlas-location-art[data-art="secret"]{filter:saturate(.5);background-image:linear-gradient(135deg,rgba(10,13,20,.4),rgba(10,13,20,.85)),url('../assets/atlas-world.webp');background-position:75% 55%}
.atlas-location-art::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,transparent 30%,rgba(4,7,11,.28));pointer-events:none}
.atlas-location-art span{position:relative;z-index:1}
.atlas-map-stage{overscroll-behavior:contain}
@media(max-width:760px){.atlas-inspector-art{min-height:128px}}


/* Accessible location finder for the illustrated map. */
.atlas-map-search-wrap{position:absolute;z-index:9;top:15px;left:15px;width:min(270px,34%);display:grid;gap:.3rem}
.atlas-map-search-label{color:#e2c58c;font:700 .48rem Montserrat,sans-serif;letter-spacing:.15em;text-shadow:0 1px 4px #000}
.atlas-map-search{width:100%;min-height:39px;padding:.55rem .72rem;border:1px solid rgba(223,188,126,.55);border-radius:4px;color:#f5e8ce;background:rgba(6,10,15,.9);font:500 .66rem Montserrat,sans-serif;outline:none;box-shadow:0 5px 17px rgba(0,0,0,.36)}
.atlas-map-search:focus{border-color:#f0ca7d;box-shadow:0 0 0 3px rgba(222,177,92,.18),0 5px 17px rgba(0,0,0,.36)}
.atlas-map-search::placeholder{color:#a9a19a}
.atlas-map-search-results{display:grid;gap:2px;max-height:250px;overflow:auto;padding:4px;border:1px solid rgba(223,188,126,.38);border-radius:4px;background:rgba(5,8,12,.97);box-shadow:0 12px 25px rgba(0,0,0,.55)}
.atlas-map-search-results[hidden]{display:none}
.atlas-map-search-result{min-height:35px;padding:.48rem .58rem;border:0;border-radius:2px;color:#e8dcc5;background:transparent;text-align:left;font:500 .62rem Montserrat,sans-serif;cursor:pointer}
.atlas-map-search-result:hover,.atlas-map-search-result:focus-visible{outline:none;color:#17120a;background:#d9b56e}
.atlas-search-empty{padding:.55rem;color:#b9afa0;font-size:.62rem}
.atlas-marker:focus-visible{outline:2px solid #fff0bd;outline-offset:4px}
@media(max-width:760px){.atlas-map-search-wrap{top:auto;left:8px;right:8px;bottom:50px;width:auto}.atlas-map-search-label{display:none}.atlas-map-search{min-height:36px}.atlas-map-search-results{max-height:170px}.atlas-map-controls{bottom:8px;top:auto}.atlas-map-caption{display:none}}

@media(prefers-reduced-motion:reduce){.atlas-marker::after{animation:none!important}.atlas-map-layer,.atlas-tab,.atlas-collection-card{transition:none!important}}


/* MOBILE MAP REWORK — keep the map in normal document flow. The map viewport
   is the only clipped surface; search, region shortcuts and details scroll normally. */
.atlas-map-viewport { position:absolute; inset:0; overflow:hidden; border-radius:inherit; }
.atlas-map-stage { overscroll-behavior:auto; }
@media (max-width:760px) {
  .atlas-shell.atlas-map-open { padding:.55rem; }
  .atlas-shell.atlas-map-open .atlas-tabs { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.45rem; }
  .atlas-tabs { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .atlas-tab { min-width:0; min-height:48px; justify-content:flex-start; gap:.45rem; padding:.62rem .65rem; font-size:.58rem; line-height:1.25; }
  .atlas-map-sidebar { display:none !important; }
  .atlas-layout.is-map { display:block; }
  .atlas-layout.is-map .atlas-visual-column { width:100%; min-width:0; }
  .atlas-map-stage {
    position:relative; height:auto !important; min-height:0 !important; max-height:none;
    overflow:visible; aspect-ratio:auto; border:0; border-radius:0;
    background:transparent; box-shadow:none; touch-action:pan-y pinch-zoom;
    overscroll-behavior:auto !important; contain:none;
  }
  .atlas-map-viewport {
    position:relative; inset:auto; width:100%; height:auto; aspect-ratio:16 / 9;
    overflow:hidden; border:1px solid rgba(213,180,118,.48); border-radius:.55rem;
    background:#101720; box-shadow:0 12px 34px rgba(0,0,0,.34);
    touch-action:pan-y pinch-zoom; overscroll-behavior:auto;
  }
  .atlas-map-layer { inset:0 !important; }
  .atlas-map-art { object-fit:cover; object-position:center; }
  .atlas-map-label { display:none; }
  .atlas-map-compass { top:8px; left:8px; right:auto; width:36px; height:36px; }
  .atlas-map-compass b { font-size:1rem; }
  .atlas-map-compass span,.atlas-map-compass small { font-size:.4rem; }
  .atlas-map-controls { top:8px; right:8px; bottom:auto; flex-direction:row; gap:.3rem; }
  .atlas-map-controls button { width:42px; height:42px; border-radius:.45rem; font-size:1.05rem; backdrop-filter:none; }
  .atlas-map-markers { overflow:visible; }
  .atlas-marker { width:44px; height:44px; min-width:44px; min-height:44px; display:grid; place-items:center; }
  .atlas-marker-number { width:27px; height:27px; flex-basis:27px; font-size:.58rem; }
  .atlas-marker::after,.atlas-marker.active::after { width:27px; height:27px; animation:none !important; }
  .atlas-marker-label { display:none !important; }
  .atlas-marker.active .atlas-marker-label { display:block !important; position:absolute; top:38px; left:50%; transform:translateX(-50%); max-width:125px; padding:.25rem .38rem; overflow:hidden; border-radius:3px; background:rgba(5,8,12,.94); font-size:.47rem; white-space:nowrap; text-overflow:ellipsis; }
  .atlas-map-caption,.atlas-map-legend { display:none !important; }
  .atlas-map-search-wrap {
    position:relative; inset:auto; z-index:10; width:auto; margin:.65rem 0 .5rem;
    display:grid; gap:.35rem;
  }
  .atlas-map-search-label { display:block; font-size:.52rem; }
  .atlas-map-search { min-height:46px; padding:.7rem .8rem; font-size:.78rem; border-radius:.45rem; }
  .atlas-map-search-results { position:relative; max-height:220px; overflow:auto; overscroll-behavior:contain; }
  .atlas-map-search-result { min-height:44px; font-size:.72rem; }
  .atlas-map-region-strip {
    position:relative; inset:auto; z-index:3; display:flex; width:100%; min-height:0;
    margin:0 0 .75rem; padding:.4rem; gap:.45rem; overflow-x:auto; overflow-y:hidden;
    border:1px solid rgba(217,184,125,.32); border-radius:.45rem;
    background:rgba(6,9,13,.94); box-shadow:none; scrollbar-width:thin;
    overscroll-behavior-x:contain; -webkit-overflow-scrolling:touch;
  }
  .atlas-region-thumb { flex:0 0 112px; min-width:112px; min-height:68px; min-height:68px; font-size:.58rem; scroll-snap-align:start; }
  .atlas-layout.is-map .atlas-inspector {
    position:relative !important; inset:auto !important; width:100% !important; max-height:none !important;
    display:block; margin:.15rem 0 0; overflow:visible; border-radius:.55rem;
    backdrop-filter:none; -webkit-backdrop-filter:none;
  }
  .atlas-layout.is-map .atlas-inspector-top { display:flex; padding:.85rem .9rem; }
  .atlas-layout.is-map .atlas-inspector-content {
    display:block; padding:.9rem; grid-template-columns:none; gap:0;
  }
  .atlas-layout.is-map .atlas-inspector-content > * { grid-column:auto; }
  .atlas-location-art { display:none !important; }
  .atlas-inspector-content .atlas-inspector-type { margin:0 0 .35rem; font-size:.53rem; }
  .atlas-inspector-content h3 { margin:0 0 .55rem; font-size:1.2rem; }
  .atlas-inspector-content p { margin:0 0 .7rem; font-size:.78rem; line-height:1.65; }
  .atlas-detail-tags { gap:.4rem; margin:.6rem 0 .75rem; }
  .atlas-detail-tags span { padding:.42rem .58rem; font-size:.65rem; }
  .atlas-tip,.atlas-reward { margin-top:.65rem !important; padding:.7rem .75rem !important; }
  .atlas-tip p { font-size:.72rem !important; }
  .atlas-footer-note { align-items:flex-start; font-size:.68rem; }
  .atlas-collection { min-height:0; padding:.7rem; }
  .atlas-collection-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:.55rem; }
  .atlas-collection-card .atlas-card-art { height:92px; }
  .atlas-card-info { padding:.65rem; }
  .atlas-card-info strong { font-size:.75rem; }
}
@media (max-width:390px) {
  .atlas-shell { width:calc(100% - 1rem); padding:.4rem; }
  .atlas-tab { min-height:46px; font-size:.54rem; }
  .atlas-map-controls button { width:40px; height:40px; }
  .atlas-region-thumb { flex-basis:104px; min-width:104px; }
  .atlas-collection-grid { grid-template-columns:1fr; }
}
@media (max-width:760px) {
  .atlas-map-stage.is-zoomed,.atlas-map-viewport { touch-action:pan-y pinch-zoom !important; }
}
@media (max-width:760px) {
  .atlas-map-search { font-size:16px; min-height:48px; }
  .atlas-map-controls button { width:44px; height:44px; }
}

/* Phone-first atlas: map, search, region shortcuts and inspector never overlap. */
@media (max-width: 760px) {
  .atlas-shell { width: calc(100% - 20px); margin-top: 1.35rem; padding: 8px; border-radius: 14px; }
  .atlas-shell.atlas-map-open { padding: 8px; }
  .atlas-layout.is-map .atlas-visual-column { display: flex; flex-direction: column; gap: 10px; }
  .atlas-map-stage { width: 100%; height: auto; min-height: 0; aspect-ratio: 4 / 3; overflow: visible; border-radius: 10px; cursor: default; }
  .atlas-map-viewport { position: relative; inset: auto; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 10px; }
  .atlas-map-layer { min-width: 100%; min-height: 100%; }
  .atlas-map-art { width: 100%; height: 100%; object-fit: cover; }
  .atlas-map-sidebar { display: none !important; }
  .atlas-map-compass { transform: scale(.78); transform-origin: top right; top: 7px; right: 7px; }
  .atlas-map-label { max-width: 35%; white-space: normal; font-size: clamp(6px, 1.55vw, 9px); line-height: 1.2; letter-spacing: .06em; }
  .atlas-marker { width: clamp(25px, 7vw, 32px); height: clamp(25px, 7vw, 32px); min-width: 25px; min-height: 25px; font-size: .58rem; touch-action: manipulation; }
  .atlas-marker-label { display: none; }
  .atlas-map-controls { right: 8px; bottom: 8px; gap: 5px; }
  .atlas-map-controls button { width: 40px; height: 40px; min-width: 40px; min-height: 40px; font-size: 1.2rem; }
  .atlas-map-legend { left: 8px; right: 8px; bottom: 8px; max-width: calc(100% - 150px); display: flex; flex-wrap: wrap; gap: 4px 8px; }
  .atlas-map-legend > span { font-size: 8px; }
  .atlas-map-caption { display: none; }
  .atlas-map-search-wrap { position: relative; inset: auto; order: 2; width: 100%; margin: 0; padding: 0; }
  .atlas-map-search-label { display: block; margin: 0 0 5px; font-size: .58rem; }
  .atlas-map-search { width: 100%; min-height: 46px; padding: .65rem .8rem; font-size: 16px; border-radius: 9px; }
  .atlas-map-search-results { position: relative; top: auto; left: auto; right: auto; max-height: 220px; overflow-y: auto; z-index: 8; }
  .atlas-map-region-strip { position: relative; inset: auto; order: 3; display: flex; gap: 8px; width: 100%; padding: 2px 0 5px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; }
  .atlas-region-thumb { flex: 0 0 138px; min-height: 64px; scroll-snap-align: start; }
  .atlas-inspector { display: grid; grid-template-columns: minmax(0,1fr); width: 100%; }
  .atlas-inspector-top { grid-column: auto; min-height: 44px; padding: .75rem .85rem; }
  .atlas-inspector-content { padding: .95rem; }
  .atlas-inspector-content h3 { font-size: 1.18rem; }
  .atlas-inspector-content p { font-size: .82rem; line-height: 1.65; }
  .atlas-inspector-art { min-height: 150px; max-height: 210px; }
  .atlas-collection { min-height: 0; padding: .75rem; }
  .atlas-collection-header { align-items: flex-start; gap: .6rem; }
  .atlas-collection-kicker { font-size: .58rem; line-height: 1.5; }
  .atlas-collection-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .atlas-collection-card { min-height: 0; }
  .atlas-card-art { height: clamp(88px, 27vw, 120px); }
  .atlas-card-info { padding: .65rem; }
  .atlas-card-info strong { font-size: .76rem; line-height: 1.4; white-space: normal; overflow-wrap: anywhere; }
  .atlas-card-type, .atlas-card-rarity { font-size: .54rem; line-height: 1.4; }
  .atlas-footer-note { align-items: flex-start; font-size: .7rem; }
  .atlas-tabs { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; margin-bottom: 10px; }
  .atlas-tab { min-width: 0; min-height: 48px; justify-content: flex-start; gap: .4rem; padding: .55rem .6rem; font-size: .62rem; line-height: 1.25; letter-spacing: .01em; }
  .atlas-tab b { overflow-wrap: anywhere; }
  .atlas-map-stage[hidden], .atlas-collection[hidden] { display: none !important; }
}
@media (max-width: 390px) {
  .atlas-map-stage, .atlas-map-viewport { aspect-ratio: 1 / 1; }
  .atlas-map-legend { max-width: calc(100% - 142px); }
  .atlas-map-legend > span { font-size: 7px; }
  .atlas-region-thumb { flex-basis: 126px; }
  .atlas-inspector-art { min-height: 128px; }
}
/* Final correction: the stage itself must grow with the search and region strip. */
@media (max-width: 760px) {
  .atlas-map-stage { aspect-ratio: auto !important; height: auto !important; }
  .atlas-map-viewport { aspect-ratio: 16 / 9 !important; height: auto !important; }
}
@media (max-width: 390px) {
  .atlas-map-viewport { aspect-ratio: 4 / 3 !important; }
}


/* ================================================================
   BOV UI STABILITY: text-first bestiary and touch-friendly controls
   ================================================================ */
.atlas-collection-grid.is-bestiary-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .45rem;
  align-content: start;
  max-height: min(66vh, 720px);
  overflow: auto;
  padding-right: .25rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(205, 166, 91, .55) transparent;
}
.atlas-bestiary-row {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 28px;
  align-items: center;
  gap: .85rem;
  width: 100%;
  min-height: 82px;
  padding: .78rem .85rem;
  overflow: hidden;
  border: 1px solid rgba(195, 164, 111, .16);
  border-radius: 9px;
  color: #e9e0d0;
  background: linear-gradient(110deg, rgba(26, 34, 43, .92), rgba(11, 16, 22, .94));
  text-align: left;
  cursor: pointer;
  transition: border-color .22s ease, background .22s ease, transform .22s ease, box-shadow .22s ease;
  -webkit-tap-highlight-color: transparent;
}
.atlas-bestiary-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(218, 178, 99, .8), transparent);
  opacity: 0;
  transition: opacity .2s ease;
}
.atlas-bestiary-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(214, 177, 105, .36);
  border-radius: 50%;
  color: #d9b66e;
  background: rgba(197, 151, 68, .08);
  font: 700 .72rem Cinzel, serif;
}
.atlas-bestiary-copy { display: grid; gap: .22rem; min-width: 0; }
.atlas-bestiary-copy strong { color: #f2e8d6; font: 600 1rem/1.25 Cinzel, serif; }
.atlas-bestiary-copy small { color: #c5a465; font: 700 .53rem/1.35 Montserrat, sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.atlas-bestiary-copy > span { display: -webkit-box; overflow: hidden; color: #a9afb7; font: 400 .68rem/1.5 Montserrat, sans-serif; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.atlas-bestiary-arrow { color: #9d8b68; font-size: 1.1rem; transition: color .2s ease, transform .2s ease; }
.atlas-bestiary-row:hover,
.atlas-bestiary-row:focus-visible {
  outline: none;
  border-color: rgba(224, 185, 104, .58);
  background: linear-gradient(110deg, rgba(54, 45, 31, .74), rgba(17, 23, 31, .98));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .23), inset 0 0 24px rgba(205, 162, 82, .045);
  transform: translateX(2px);
}
.atlas-bestiary-row:hover::before,
.atlas-bestiary-row.active::before { opacity: 1; }
.atlas-bestiary-row.active {
  border-color: rgba(222, 183, 102, .72);
  background: linear-gradient(110deg, rgba(81, 60, 29, .42), rgba(18, 24, 31, .98));
  box-shadow: inset 0 0 0 1px rgba(209, 166, 87, .12), 0 8px 24px rgba(0, 0, 0, .2);
}
.atlas-bestiary-row.active .atlas-bestiary-number { color: #18130a; background: linear-gradient(145deg, #f1d79c, #bd8b3b); }
.atlas-bestiary-row.active .atlas-bestiary-arrow,
.atlas-bestiary-row:hover .atlas-bestiary-arrow { color: #e3bf75; transform: translate(2px, -2px); }
.atlas-layout:not(.is-map) .atlas-collection { min-height: 0; }
.atlas-layout:not(.is-map) .atlas-inspector { min-height: 100%; }
.atlas-layout:not(.is-map) .atlas-inspector-content { padding: clamp(1rem, 2vw, 1.5rem); }
.atlas-layout:not(.is-map) .atlas-inspector-content h3 { font-size: clamp(1.35rem, 2vw, 2rem); }
.atlas-layout:not(.is-map) .atlas-inspector-content p { max-width: 58ch; font-size: .83rem; }

@media (max-width: 760px) {
  .atlas-collection-grid.is-bestiary-list { max-height: none; overflow: visible; padding: 0; gap: .5rem; }
  .atlas-bestiary-row { grid-template-columns: 38px minmax(0, 1fr) 22px; gap: .65rem; min-height: 76px; padding: .72rem .68rem; border-radius: 8px; }
  .atlas-bestiary-number { width: 34px; height: 34px; font-size: .66rem; }
  .atlas-bestiary-copy strong { font-size: .91rem; }
  .atlas-bestiary-copy small { font-size: .5rem; }
  .atlas-bestiary-copy > span { font-size: .64rem; -webkit-line-clamp: 2; }
  .atlas-layout:not(.is-map) { grid-template-columns: minmax(0, 1fr); }
  .atlas-layout:not(.is-map) .atlas-inspector { min-height: 0; }
  .atlas-layout:not(.is-map) .atlas-inspector-content { padding: .9rem; }
}
@media (hover: none) {
  .atlas-bestiary-row:hover { transform: none; box-shadow: none; }
  .atlas-bestiary-row:active { border-color: rgba(224, 185, 104, .72); background: rgba(91, 68, 33, .28); }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-bestiary-row, .atlas-bestiary-row::before, .atlas-bestiary-arrow { transition: none !important; }
}
