/* Round 187: layout fixes from the playtest (see assets/layout-polish.js). */
/* Art credits live in the main menu now. */
#nav .art-credits{display:none}
.menu-credits{margin:10px 0 0;font:12px system-ui}.menu-credits a{color:#9fd3e6}
/* The on-screen arrow pad is for touch play only. */
body:not(.touch-mode) #touch{display:none}
/* The side deck only folds on phones. */
.side-fold{display:none}

@media(max-width:720px){
  /* A shorter HUD, so the room can start higher and fill the screen. */
  #hud{padding:7px 8px}
  #hud .room-title{font-size:15px;line-height:1.15;margin:0 0 3px}
  #hud .hud-row{font-size:11px;line-height:1.3}
  #hud .meter{height:5px;margin:2px 0 3px}
  #hud #usePotion{min-height:0;padding:3px 8px;margin-top:3px;font-size:11px}
  #hud .explore-row{font-size:11px;margin-top:2px}

  /* Battle: the side deck folds into one row above the hand. */
  #battleModal .hand-row{flex-direction:column;gap:6px}
  #battleModal .hand-row>#hand{width:100%}
  #battleModal .side-column.foldable{flex:0 0 auto;width:100%;box-sizing:border-box}
  #battleModal .side-column.foldable .side-col-head{display:flex!important;flex-direction:row!important;align-items:center;justify-content:flex-start;gap:8px;cursor:pointer;padding:5px 10px;text-align:left}
  #battleModal .side-column.foldable .side-col-head small{flex:1}
  #battleModal .side-fold{display:inline-block;font:700 11px system-ui;color:#d9ccff;border:1px solid #8b74e0;border-radius:999px;padding:2px 10px}
  #battleModal .side-column.foldable:not(.open) .side-col-list{display:none}
  #battleModal .side-column.foldable.open .side-col-list{display:flex;flex-direction:row;overflow-x:auto;gap:8px;padding:0 6px 8px;max-height:none}
  #battleModal .side-column.foldable.open .side-col-list .card-wrap{flex:0 0 120px;width:120px}
  /* Shorter enemy-move boxes: the affliction text shows two lines; tap the box for the rest. */
  #battleModal .intent-bubble{cursor:pointer}
  #battleModal .intent-bubble{padding:6px 8px}
  #battleModal .intent-bubble:not(.expanded) .affliction{margin:3px 0 0;font-size:11px;display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
  #battleModal .intent-bubble:not(.expanded) .affliction small,#battleModal .intent-bubble:not(.expanded) .affliction .answer{display:none}
  /* The hand header and the card art take less height, so a whole card fits above the footer. */
  #battleModal .hand-title{display:none}
  .touch-mode #battleModal #hand .card .art{aspect-ratio:5/4}
  .touch-mode #battleModal #hand .card{min-height:0}
  /* A bigger enemy portrait, and the Aether row on one line. */
  #battleModal .compact-monster{width:3.6em;height:3.6em}
  #battleModal .aether-panel small{display:none}
  /* The mechanic tray: one compact row. */
  #battleModal .mech-tray{padding:6px 8px;margin:6px 0}
  #battleModal .mt-count{min-width:36px;height:28px;font-size:14px}
  #battleModal .mt-text small{display:none}
  #battleModal .mt-help{font-size:10px;padding:4px 7px;min-height:0}
}
/* Round 188: on narrow phones the talent tree fits the screen instead of scrolling sideways. */
@media(max-width:480px){
  .talent-layout{min-width:calc(var(--paths,3) * 61px);row-gap:28px;grid-auto-rows:98px}
  .talent-node{width:58px;flex-basis:58px;height:98px;padding:3px}
  .talent-node .talent-icon{height:48px}
  .talent-node b,.talent-node .talent-name,.talent-node span:not(.talent-icon){font-size:9px;line-height:1.15}
}
/* Round 192: things you can open or pick up stand out from the painting: a white rim and a
   slow pulsing glow (cyan in Neon Aftermath, warm gold in the other worlds). Used ones stay
   readable: dimmed and greyed, not see-through. */
#world{--item-glow:#ffe9a0}
#world[data-environment="neon"]{--item-glow:#8ff7ff}
.poi-node.poi-art{width:52px!important;height:52px!important}
.poi-node.poi-art:not(.used):not(.poi-merchant),.map-chest,#world .relic{animation:itemGlow 2.4s ease-in-out infinite!important}
.poi-node.used{opacity:.8!important}
.poi-node.poi-art.used{filter:grayscale(.65) brightness(.85) drop-shadow(0 0 1.5px #000c)!important;animation:none!important}
@keyframes itemGlow{
  0%,100%{filter:drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 5px var(--item-glow)) drop-shadow(0 0 1px #000)}
  50%{filter:drop-shadow(0 0 2px #fff) drop-shadow(0 0 12px var(--item-glow)) drop-shadow(0 0 22px var(--item-glow))}}
@media(prefers-reduced-motion:reduce){
  .poi-node.poi-art:not(.used):not(.poi-merchant),.map-chest,#world .relic{animation:none!important;filter:drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 9px var(--item-glow))!important}}
/* Round 209: enemies on the map are drawn at 80% of their old size, shrunk around their feet so
   they keep standing in the same spot. (CSS `scale` stacks with the left/right facing flip.)
   Battle portraits are unchanged. */
#world .enemy-node > .monster-sprite{scale:.88;transform-origin:50% 100%} /* Round 229: 10% larger (was .8) */
/* Round 211: no enemy picture on the battle page (its name, health and moves stay). */
#battleModal .compact-monster,#battleModal .battle-monster{display:none!important}
#battleModal #combatLog{margin:6px 0;padding:6px 10px;border:1px solid #2e5566;border-radius:8px;background:#0b1a26aa;font:12px/1.4 system-ui;color:#cfe6ef}
/* Round 214: End turn at the right end of the Turn / energy bar. */
#battleModal .compact-bar{display:flex;align-items:center;flex-wrap:wrap}
#battleModal .compact-bar #endTurn.end-turn-inline{margin-left:auto}
/* Round 215: things you can open or pick up are drawn at half their old size, around their centre
   (they stay where they were placed). Their name labels stay full size, just under the picture. */
#world .poi-node,#world .map-chest,#world .relic{scale:.5}
#world .poi-node::after{scale:2;transform-origin:50% 0;top:calc(100% + 3px)!important}
/* Round 215: a tighter battle screen: less padding and smaller gaps between every part. */
#battleModal{padding:12px 14px!important}
#battleModal>*{margin-top:0!important;margin-bottom:0!important}
#battleModal>*+*{margin-top:6px!important}
#battleModal .battle-compact{display:grid;gap:6px}
#battleModal .compact-combatants{gap:6px!important}
#battleModal .compact-side{padding:6px 10px!important}
#battleModal .debuff-strip{margin-top:3px!important;padding:3px 7px!important;min-height:0!important}
#battleModal .intent-bubbles{gap:6px!important}
#battleModal .intent-bubble{padding:6px 10px!important}
#battleModal .intent-bubble .affliction{margin-top:3px!important}
#battleModal #combatLog{padding:4px 10px!important}
#battleModal .aether-panel{padding:5px 10px!important}
#battleModal .compact-bar{gap:6px!important}
#battleModal .combat-tools{padding:4px 10px!important}
#battleModal .hand-title{line-height:1.1}
#battleModal .hand-title h2,#battleModal .hand-title h3{margin:0!important}
#battleModal .hand-row,#battleModal .hand-row .cards{gap:8px!important}
/* Round 216: you/enemy boxes at about half their height. Name, Block/Armor and debuffs share the
   top row; a slimmer health bar runs along the bottom. */
#battleModal .compact-side,#battleModal .compact-enemy-info{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px 8px!important}
#battleModal .compact-side{padding:5px 8px!important}
#battleModal .compact-side.enemy{display:block!important}
#battleModal .compact-enemy-info{width:100%}
#battleModal .compact-head{order:1;margin:0!important;line-height:1.1}
#battleModal .compact-head b{font-size:14px!important}
#battleModal .compact-tags{order:2;display:flex;gap:6px;min-height:0!important;margin:0!important}
#battleModal .compact-tags:empty{display:none}
#battleModal .debuff-strip{order:3;flex:1 1 auto;margin:0!important;padding:0!important;border:0!important;background:none!important;min-height:0!important;font-size:11px!important;justify-content:flex-end}
#battleModal .debuff-strip .ds-cap{font-size:9px!important}
#battleModal .hp-row{order:4;flex:1 0 100%;margin:0!important;gap:5px!important}
#battleModal .hp-row .hp-icon,#battleModal .hp-row .hp-icon svg{width:16px!important;height:16px!important}
#battleModal .hp-row .meter{height:16px!important;margin:0!important}
#battleModal .hp-row .meter-label{font-size:11px!important;line-height:16px!important}
#battleModal .hud-stat{gap:4px!important;padding:0!important}
#battleModal .hud-crystal,#battleModal .hud-crystal .gem,#battleModal .hud-shield{width:20px!important;height:20px!important;min-width:0!important}
#battleModal .hud-crystal b,#battleModal .hud-shield b,#battleModal .hud-crystal .gem b{font-size:11px!important;line-height:20px!important}
#battleModal .hud-cap{font-size:10px!important}
#battleModal .compact-side,#battleModal .compact-enemy-info{justify-content:flex-start!important;text-align:left!important}
#battleModal .hp-row{display:flex!important;align-items:center;width:100%}
#battleModal .hp-row .meter{flex:1 1 auto!important;width:auto!important;min-width:0}
#battleModal .debuff-strip{display:flex!important;flex-wrap:wrap;align-items:center;gap:4px!important;margin-left:auto!important}
#battleModal .debuff-strip .ds-item,#battleModal .debuff-strip .dot-hud{font-size:10px!important;padding:1px 6px!important}
#battleModal .compact-side,#battleModal .compact-enemy-info{flex-direction:row!important}
#battleModal .compact-side.enemy{display:block!important}
#battleModal .hud-shield{width:auto!important;height:auto!important;font-size:10px!important}
/* Round 219: the last-moves line and the Aether panel, smaller and slimmer. */
#battleModal #combatLog{padding:2px 8px!important;font-size:11px!important;line-height:1.3!important;border-radius:6px!important}
#battleModal .aether-panel{padding:2px 8px!important;font-size:11px!important;gap:6px!important;border-radius:6px!important;min-height:0!important}
#battleModal .aether-panel b,#battleModal .aether-panel strong,#battleModal .aether-panel .aether-count{font-size:12px!important}
#battleModal .aether-panel small{font-size:10px!important}
#battleModal .aether-panel .aether-pip,#battleModal .aether-panel i{width:9px!important;height:9px!important}
/* Round 225: the encounter and the element share the top line */
#battleModal .combat-tools.with-encounter{display:block}#battleModal .combat-tools .encounter-line + p{display:inline;margin:0!important}
/* Round 239: a gap before the talent buttons (Overdrive, Echo, Overload) on the encounter line */
#battleModal .combat-tools > button.ability{margin-left:8px}
/* Round 277 (owner request): smaller cards, same picture. The ownership band becomes a slim strip at the top,
   the rules box is tighter, and the footer folds down (level and mastery stay, the serial number goes). */
.card:not(.side-col-list .card){padding-top:21px!important;padding-bottom:7px!important}
.card:not(.side-col-list .card) .ownership{top:4px!important;height:14px!important;right:46px!important;left:6px!important;padding:0 6px!important;font-size:7.5px!important;letter-spacing:.3px!important;border-radius:7px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;display:block!important;line-height:14px!important}
.card:not(.side-col-list .card) .cost{top:4px!important}
.card:not(.side-col-list .card) .card-name{min-height:0!important;padding:2px 30px 4px 0!important;line-height:1.15!important}
.card:not(.side-col-list .card) .rules{min-height:56px!important;padding:6px 7px!important;font-size:11.5px!important;line-height:1.35!important}
.card:not(.side-col-list .card) .upgrade-row{margin-top:5px!important;font-size:9.5px!important}
.card:not(.side-col-list .card) .mastery-label{margin-top:2px!important;font-size:8px!important;line-height:1.1!important}
.card:not(.side-col-list .card) .track{height:5px!important}
.touch-mode .card:not(.side-col-list .card) .ownership{font-size:7px!important;letter-spacing:0!important}
.card:not(.side-col-list .card) .card-serial{display:none!important}
/* Round 277: nothing sits on top of card text. The small type icon in the rules box floats beside the words
   (it was pinned over the corner and covered the end of the first line); the smallest labels are a size larger. */
.card .rules .kind-badge{position:static!important;float:right!important;font-size:16px!important;margin:-1px 0 2px 6px!important}
.card:not(.side-col-list .card) .ownership{font-size:8px!important}
.card:not(.side-col-list .card) .upgrade-row{font-size:10px!important}
.card:not(.side-col-list .card) .mastery-label{font-size:9px!important}
.card:not(.side-col-list .card) .card-name{letter-spacing:0!important;padding-right:32px!important}
.touch-mode #hand .card:not(.side-col-list .card) .card-name{font-size:12px!important}
/* Round 278 (owner: "the crystal in the hidden chest is not visible"): hidden chests were 20px (30px in the tile
   worlds) before Round 215's half scale, so about 10-15px on screen. They are now as big as the other points of
   interest, and a chest holding an Upgrade Crystal glows cyan and wears a crystal badge. */
#world .map-chest{width:44px!important;height:44px!important}
#world .map-chest.crystal-chest{filter:drop-shadow(0 0 3px #fff) drop-shadow(0 0 14px #5ff2ff) drop-shadow(0 0 28px #5ff2ff)!important}
#world .map-chest.crystal-chest::after{content:'◆';position:absolute;right:-12px;top:-18px;font:900 34px/1 system-ui;color:#9ffcff;text-shadow:0 0 6px #5ff2ff,0 0 2px #003a44}
/* Round 279 (playtest): room above the collection headings under the gear slots and crystal sockets, and between
   the start screen's Import and God Mode buttons. */
.gear-slots + h2,.crystal-sockets + h2{margin-top:22px!important}
#godStartBtn{margin-left:8px}
/* Round 279 (playtest): on desktop the movement hint sat on the south exit's label; it now waits in the
   bottom-left corner. Phones keep it where it was (their arrow pad and labels are laid out around it). */
body:not(.touch-mode) .hint{left:16px!important;transform:none!important}
/* Round 281 (owner: "fix the character screen"): the talent panel sits under the branch tabs and sticks to the top
   while the tree scrolls (it was pinned to the bottom and covered the tabs and the lowest talents); the banner
   shows the hero's head (it was cut at the neck). */
#menuOverlay .talent-detail{position:sticky!important;top:-24px!important;bottom:auto!important;margin:0 0 14px!important;box-shadow:0 8px 18px #0009}
#menuOverlay .sheet-portrait{max-height:200px!important;object-position:center 24%!important}
/* Round 283 (owner request): energy is green when full, yellow at 2, orange at 1 (dim at 0). */
.energy-hud.energy-full{border-color:#4fe07a!important;background:linear-gradient(180deg,#0f3a1c,#07190c)!important;box-shadow:0 0 10px #4fe07a55!important}
.energy-hud.energy-full .orb.on:not(.bonus){background:radial-gradient(circle at 35% 30%,#f0fff4 0,#8dff9e 30%,#25c24a 70%,#0b6a22 100%)!important;box-shadow:0 0 8px #4fe07a!important}
.energy-hud.energy-full .num{color:#dcffe4!important;text-shadow:0 0 6px #2ed15a!important}
.energy-hud.energy-two{border-color:#f2d64c!important}
.energy-hud.energy-two .num{color:#fff6c4!important;text-shadow:0 0 6px #f5cf1e!important}
.energy-hud.energy-one{border-color:#ff8a2a!important;background:linear-gradient(180deg,#3d1e08,#1d0e04)!important;box-shadow:0 0 10px #ff8a2a55!important}
.energy-hud.energy-one .orb.on:not(.bonus){background:radial-gradient(circle at 35% 30%,#fff1e0 0,#ffb066 30%,#f06a00 70%,#8a3400 100%)!important;box-shadow:0 0 8px #ff8a2a!important}
.energy-hud.energy-one .num{color:#ffe2c4!important;text-shadow:0 0 6px #ff7a1a!important}
.energy-hud.energy-empty{border-color:#6b5a3a!important;opacity:.8}
.energy-hud .num small{font-size:1em!important}
/* Round 283: the Aether row moves into the side deck header. */
#battleModal .aether-panel.aether-moved{display:none!important}
#battleModal .side-col-head .aether-mini{display:inline-block;margin-left:6px;padding:0 7px;border-radius:999px;background:#2a1f55;border:1px solid #9b86ff;color:#e3dcff;font:800 11px/1.6 system-ui;white-space:nowrap;vertical-align:middle;cursor:help}
#battleModal .side-col-head > b{display:inline!important}
#battleModal .side-col-head .aether-mini{font-size:10px;line-height:1.5;padding:0 6px;margin-left:5px}
/* Round 291 (playtest): card names were a gradient that faded into the frame (dark orange on gold, dark purple on
   the Soulbound purple). A light fill with a dark outline reads on every frame and keeps the gold / lavender tint. */
.card .card-name,.card.soulbound .card-name{background:none!important;-webkit-background-clip:border-box!important;background-clip:border-box!important;-webkit-text-fill-color:#fff1c9!important;color:#fff1c9!important;-webkit-text-stroke:0!important;filter:none!important;text-shadow:0 1px 0 #2a1604,1px 0 0 #2a1604,-1px 0 0 #2a1604,0 -1px 0 #2a1604,0 2px 3px #000c!important}
.card.soulbound .card-name{-webkit-text-fill-color:#f7ecff!important;color:#f7ecff!important;text-shadow:0 1px 0 #1d0b36,1px 0 0 #1d0b36,-1px 0 0 #1d0b36,0 -1px 0 #1d0b36,0 2px 3px #000c!important}
/* Round 291 (playtest): the ×N copies badge sat on the card's energy cost. It now hangs on the right edge beside the art. */
.card .stack-count-badge,.stack-count-badge{top:34%!important;right:-10px!important}
/* Round 291 (playtest): on phones a pair's leader panel is ~95px wide and its Armor badge squeezed the health bar to
   0px. The badge keeps its shield and number (the word "Armor" goes) and the bar keeps at least 44px. */
@media(max-width:560px){#battleModal .compact-side.enemy .hp-row .hud-cap{display:none}#battleModal .compact-side.enemy .hp-row .meter{min-width:44px;flex:1 1 44px}#battleModal .compact-side.enemy .hp-row .meter-label{font-size:10px}}
/* Round 292 (owner: simpler, clearer). Six top-bar buttons: Save moved into the Menu, Aetherlink into the Gear screen. */
#nav button.nav-folded{display:none!important}
.save-now-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:10px 0}
/* Battle: no "Your hand" heading (the cards say it); End turn glows when nothing is left to play. */
#battleModal .hand-title{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0 0 0 0)!important;margin:0!important;padding:0!important}
#battleModal #endTurn.end-turn-ready{border-color:#ffe08a!important;box-shadow:0 0 0 2px #ffcf5a66,0 0 18px #ffcf5acc!important;animation:endTurnReady 1.3s ease-in-out infinite}
@keyframes endTurnReady{50%{box-shadow:0 0 0 3px #ffcf5a99,0 0 26px #ffcf5a}}
@media(prefers-reduced-motion:reduce){#battleModal #endTurn.end-turn-ready{animation:none}}
/* Phones: the battle bar drops the level/XP pill (it's on the map HUD and the victory screen), the Character button
   becomes an icon, and End turn joins the same row instead of taking one of its own. */
@media(max-width:560px){
  #battleModal .compact-bar>.xp-pill{display:none}
  #battleModal .compact-bar #battleChar{font-size:0!important;padding:6px 10px!important}
  #battleModal .compact-bar #battleChar::before{content:'👤';font-size:16px}
  #battleModal .compact-bar #endTurn{min-height:44px}
}
/* World: the movement hint goes after the first three rooms. */
body.hint-learned #game .hint,body.hint-learned .hint{display:none!important}
/* Round 293 (owner: go ahead with all the suggestions). */
/* The encounter bar folds away (its element badge sits beside the enemy's name). */
#battleModal .combat-tools.with-encounter.bar-folded{display:none!important}
#battleModal .compact-side.enemy .compact-head .fx-el-moved{display:inline-flex;margin-left:2px}
/* "Next turn" / "Turn after": one line each: label, move, damage, then its chips. */
#battleModal .intent-bubble{display:flex!important;flex-wrap:wrap;align-items:center;gap:3px 8px;padding:6px 10px!important;min-height:0!important}
#battleModal .intent-bubble .when{font-size:10px!important;letter-spacing:.06em;text-transform:uppercase;opacity:.85;margin:0!important}
#battleModal .intent-bubble .what{font-size:14px!important;margin:0!important}
#battleModal .intent-bubble .dmg{font-size:13px!important;margin:0!important;font-weight:700}
#battleModal .intent-bubble .dmg::before{content:'· ';opacity:.6}
#battleModal .intent-bubble .fx-row{display:inline-flex!important;flex-wrap:wrap;gap:4px;margin:0!important}
/* Slim Pitch buttons under the cards. */
#battleModal .card-wrap .ability.pitch{min-height:0!important;padding:4px 8px!important;font-size:13px!important;line-height:1.2!important}
#battleModal .compact-head b .fx-el-moved{margin-left:4px;vertical-align:middle}#battleModal .fx-el-moved .fx-chip.icon-only{padding:0 4px!important;min-width:0!important;font-size:12px!important}
/* Round 294 (owner: nicer, friendlier menus; a shorter Character page). */
/* A ✕ pinned top-right on every top-bar screen. */
#menuModal .menu-x-pin{position:sticky;top:0;height:0;z-index:30}
#menuModal .menu-x{position:absolute;top:-8px;right:-8px;width:38px;height:38px;margin:0;padding:0!important;border-radius:50%;display:grid;place-items:center;font:700 16px/1 system-ui;color:#d8f4ff;background:#0d2230ee;border:1px solid #4aa3b8;box-shadow:0 2px 10px #0008;cursor:pointer}
#menuModal .menu-x:hover,#menuModal .menu-x:focus-visible{background:#164056;border-color:#9fe7f5;color:#fff}
/* One heading size on every screen (Gear and Quests used a bigger h1). */
#menuModal>h1{font-size:26px;margin:2px 0 10px}
/* Character: no portrait (Round 295); the name and level head the page. */
/* Character: the four stat boxes in one row, tighter. */
#menuModal .sheet-grid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;margin-bottom:14px}
#menuModal .sheet-grid>*{padding:10px 12px!important;margin:0!important;min-height:0!important;font-size:13px;line-height:1.45}
#menuModal .sheet-grid h3,#menuModal .sheet-grid b:first-child{font-size:14px;margin:0 0 4px!important}
#menuModal .sheet-grid p{margin:2px 0!important}
@media(max-width:900px){#menuModal .sheet-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
/* Character: smaller talent tiles and tighter rows (the connector lines are measured, so they follow). */
#menuModal .talent-lane{gap:14px!important;padding:8px 4px!important}
#menuModal .talent-node{width:74px!important;height:88px!important;flex-basis:74px!important;padding:4px!important}
#menuModal .talent-node .talent-icon{height:48px!important}
#menuModal .talent-node .talent-name,#menuModal .talent-node small,#menuModal .talent-node .talent-label{font-size:9.5px!important;line-height:1.15!important}
#menuModal .talent-layout{grid-auto-rows:auto!important;grid-template-rows:none!important;row-gap:22px!important}
#menuModal .talent-slot{height:auto!important;min-height:0!important;display:flex;justify-content:center}
/* Deck: only pressable buttons under the cards, in one compact row; two cards a row on phones. */
#menuModal .workshop .card-wrap .actions button.info-only{display:none!important}
#menuModal .workshop .card-wrap .actions{display:flex!important;flex-wrap:wrap;gap:4px;justify-content:center}
#menuModal .workshop .card-wrap .actions button{flex:1 1 auto;min-height:0!important;padding:4px 8px!important;font-size:12px!important;line-height:1.25!important;margin:0!important}
@media(max-width:560px){
  #menuModal .workshop .cards{gap:8px!important}
  #menuModal .workshop .card-wrap{width:calc(50% - 4px)!important;min-width:0!important}
  #menuModal .workshop .card-wrap>.card{zoom:.86}
  #menuModal .workshop .card-wrap .stack-info{font-size:11px;margin:2px 0!important;text-align:center}
  #menuModal .deck-presets .preset-row{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important}
  #menuModal .deck-presets .preset{padding:6px!important;min-width:0}
  #menuModal .deck-presets .preset>small{display:none}
  #menuModal .deck-presets .preset-actions{display:flex;flex-direction:column;gap:4px}
  #menuModal .deck-presets .preset-actions button{width:100%;min-height:30px;padding:4px!important;font-size:11px!important}
}
/* Round 295: talent connectors are straight lines with square corners. */
.talent-connectors path{stroke-linejoin:miter;stroke-linecap:butt}
/* Round 295: the Aetherlink Gauntlet is a section of the Gear screen. */
#menuModal .gear-aetherlink{margin-top:18px;padding-top:14px;border-top:1px solid #2e5566}#menuModal .gear-aetherlink>h2{margin-top:0}
/* Round 296: the Character page's stat breakdown, and exploration in the quest log. */
#menuModal .char-stats-panel{margin:4px 0 16px}
#menuModal .char-xp{display:flex;align-items:center;gap:12px;margin:0 0 10px;font-size:13px;color:#cfe6ef}#menuModal .char-xp .track{flex:1;max-width:340px;margin:0}
#menuModal .char-stats{width:100%;border-collapse:separate;border-spacing:0;border:1px solid #2e5566;border-radius:10px;overflow:hidden;background:#0b1a26;font-size:13px}
#menuModal .char-stats th,#menuModal .char-stats td{padding:6px 10px;border-bottom:1px solid #18303e;text-align:left;vertical-align:middle}
#menuModal .char-stats tr:last-child th,#menuModal .char-stats tr:last-child td{border-bottom:0}
#menuModal .char-stats th{font-weight:700;color:#e8f6fb;white-space:nowrap;width:1%}#menuModal .char-stats .st-icon{display:inline-block;width:22px;text-align:center;margin-right:4px}
#menuModal .char-stats .st-total{font:800 15px system-ui;color:#ffe7b0;white-space:nowrap;width:1%;text-align:right}
#menuModal .char-stats .st-from{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px}#menuModal .char-stats .st-from small{color:#8fb3c2;font-size:11.5px}
#menuModal .char-stats .src{padding:1px 7px;border-radius:999px;font-size:11.5px;background:#173042;color:#cde7f1;border:1px solid #2e5566}
#menuModal .char-stats .src-talents{background:#2b2140;border-color:#6f56a8;color:#e2d4ff}#menuModal .char-stats .src-gear{background:#1d3324;border-color:#4f8d5c;color:#d4f5d8}
#menuModal .char-stats .src-aetherlink{background:#103540;border-color:#3aa7c0;color:#c8f3ff}#menuModal .char-stats .src-world{background:#3a2a14;border-color:#a87b3a;color:#ffe2b3}
#menuModal .char-rules{margin-top:10px;padding:8px 12px;border:1px solid #4f8d5c;border-radius:10px;background:#10201a;font-size:13px}#menuModal .char-rules ul{margin:4px 0 0;padding-left:18px}
@media(max-width:560px){#menuModal .char-stats th,#menuModal .char-stats td{padding:5px 6px}#menuModal .char-stats tr{display:grid;grid-template-columns:1fr auto}#menuModal .char-stats th,#menuModal .char-stats .st-total{border-bottom:0}#menuModal .char-stats .st-from{grid-column:1 / -1;padding-top:0}}
#menuModal .quest-explore{margin:12px 0;padding:10px 12px;border:1px solid #2e5566;border-radius:10px;background:#0b1a26}
#menuModal .quest-explore>b{display:block;margin-bottom:6px;color:#ffe7b0}#menuModal .quest-explore .track{margin:0 0 8px}
#menuModal .quest-explore ul{list-style:none;margin:0 0 6px;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:4px 16px}
#menuModal .quest-explore li{display:flex;justify-content:space-between;gap:8px;font-size:13px;border-bottom:1px dotted #22404f;padding:2px 0}
#menuModal .quest-explore small{color:#8fb3c2}
/* Round 326 (owner): every piece of text in the world view is one style and size: system-ui, semibold, 10% smaller
   than the old enemy labels (--wtext, set by assets/world-font.js; it follows the map's scale like they did).
   That is the map itself (room and street signs, door labels, enemy labels, item name pop-ups), the HUD, the
   minimap, the top-bar buttons, the hint line and toasts. Menus and the battle screen keep their own type.
   Emoji glyphs (icons, not text) keep their size. */
#world,#world *:not(.poi-glyph):not(.art-glyph),#world .enemy-node::after,#world .enemy-node:after,
#hud,#hud *,#minimap,#minimap *,#nav,#nav button,#game>.hint,#toast{
  font-family:system-ui,-apple-system,'Segoe UI',Roboto,sans-serif!important;font-size:var(--wtext,10px)!important;font-weight:600!important;
  letter-spacing:normal!important;font-style:normal!important}
/* The map is scaled to fit the screen, and some labels sit inside scaled nodes, so a label's size is set per element
   (--wf, by assets/world-font.js) to look --wtext on screen, like the HUD. */
#world *:not(.poi-glyph):not(.art-glyph),#world .enemy-node::after,#world .enemy-node:after,#world .item-name-pop{font-size:var(--wf,10px)!important}
/* Round 348 (owner: "all of the interactable objects are too small, increase size by 25% and standardize it across all
   maps; make sure they are not see-through at all until interacted with"). Every world draws them at one size: 32px on
   screen for points of interest, chests, relics, switches and vaults (paintings were 26px, chests 22px, relics 18px),
   44px for the merchant and the Cardsmith (were 36px and 28px). The boxes are twice that because of Round 215's half
   scale. Until used they are fully opaque: a guarded relic is no longer faded, and glyph objects get a solid disc. */
#world .poi-node,#world .poi-node.poi-art,#world .map-chest,#world .relic:not(.hidden-crystal){width:64px!important;height:64px!important}
#world .poi-node.poi-merchant,#world .poi-node.poi-art.poi-merchant,#world .poi-node.poi-cardsmith,#world .poi-node.poi-art.poi-cardsmith{width:88px!important;height:88px!important}
#world .relic.gear-relic img{width:54px;height:54px}
#world .poi-node:not(.poi-art) .poi-glyph{font-size:36px!important}
#world .poi-node:not(.used),#world .map-chest,#world .relic{opacity:1!important}
#world .poi-node:not(.poi-art):not(.used){background:radial-gradient(circle,#2b1f4c,#140f26)!important}
#world .relic.relic-guarded{filter:drop-shadow(0 0 1px #000)!important}
/* Round 358 (owner: "increase the size of objects"; "waypoints should have a light glow that fits the world colour
   scheme, the other objects should not. make sure no object is opaque until interacted and used up"). Objects are 25%
   bigger again: 40px on screen (box 80px under Round 215's half scale), the merchant and the Cardsmith 55px. Only Nexus
   Waypoints and hidden chests glow, in their world's colour; everything else has just a thin dark outline. Every object is solid until
   used, then dims. */
/* Round 358 fix: Round 215 drew objects at half scale with the CSS `scale` property, which also halved their centring
   shift, so every picture's top-left corner sat on its spot: they drew about 20px right of and 30-40px below where they
   stand (onto kerbs and buildings). Objects are now drawn at their real size with no scale, centred on their spot as
   intended (pictures stand on it). Hidden crystals keep their old half scale. */
#world .poi-node,#world .map-chest,#world .relic{scale:1!important}
#world .relic.hidden-crystal{scale:.5!important}
#world .poi-node,#world .poi-node.poi-art,#world .map-chest,#world .relic:not(.hidden-crystal){width:40px!important;height:40px!important}
#world .poi-node.poi-merchant,#world .poi-node.poi-art.poi-merchant,#world .poi-node.poi-cardsmith,#world .poi-node.poi-art.poi-cardsmith{width:55px!important;height:55px!important}
#world .relic.gear-relic img{width:34px;height:34px}
#world .poi-node:not(.poi-art) .poi-glyph{font-size:22px!important}
#world .map-chest.crystal-chest::after{right:-6px!important;top:-9px!important;font-size:17px!important}
#world .poi-node .quest-mark{font-size:14px}
#world#world .poi-node,#world#world .poi-node.poi-art,#world#world .map-chest,#world#world .relic,#world#world .map-chest.crystal-chest{animation:none!important;filter:drop-shadow(0 0 1px #000c)!important;box-shadow:none!important}
#world#world .poi-node:not(.used),#world#world .map-chest,#world#world .relic{opacity:1!important}
#world#world .poi-node.used{opacity:.75!important;filter:grayscale(.7) brightness(.8) drop-shadow(0 0 1px #000c)!important}
#world{--wp-glow:#ffe9a0}
#world[data-environment="neon"]{--wp-glow:#7ff3ff}
#world[data-environment="solaris"]{--wp-glow:#ffd36b}
#world[data-environment="sky"]{--wp-glow:#bfe6ff}
#world[data-environment="wilds"]{--wp-glow:#b9f07a}
#world[data-environment="vespera"]{--wp-glow:#c69bff}
#world[data-environment="chronospire"]{--wp-glow:#ffbe5c}
#world#world .poi-node.poi-nexus:not(.used){animation:waypointGlow 2.6s ease-in-out infinite!important}
/* Owner: "i like the chests to glow": hidden chests glow like waypoints; a chest holding an Upgrade Crystal keeps its cyan. */
#world#world .map-chest{animation:waypointGlow 2.6s ease-in-out infinite!important}
#world#world .map-chest.crystal-chest{--wp-glow:#5ff2ff}
@keyframes waypointGlow{0%,100%{filter:drop-shadow(0 0 1px #000c) drop-shadow(0 0 4px color-mix(in srgb,var(--wp-glow) 70%,transparent))}50%{filter:drop-shadow(0 0 1px #000c) drop-shadow(0 0 9px color-mix(in srgb,var(--wp-glow) 85%,transparent))}}
@media(prefers-reduced-motion:reduce){#world#world .poi-node.poi-nexus:not(.used),#world#world .map-chest{animation:none!important;filter:drop-shadow(0 0 1px #000c) drop-shadow(0 0 6px color-mix(in srgb,var(--wp-glow) 75%,transparent))!important}}
/* Round 383 (owner: "increase the size of interactable objects, they are kind of hard to identify"). 40% bigger in every
   world: 56px for points of interest, chests, relics, switches and vaults, 76px for the merchant and the Cardsmith. */
#world#world .poi-node,#world#world .poi-node.poi-art,#world#world .map-chest,#world#world .relic:not(.hidden-crystal){width:56px!important;height:56px!important}
#world#world .poi-node.poi-merchant,#world#world .poi-node.poi-art.poi-merchant,#world#world .poi-node.poi-cardsmith,#world#world .poi-node.poi-art.poi-cardsmith{width:76px!important;height:76px!important}
/* Round 418: the Afterlight Vault door is a wide, flat picture: drawn 92px across (the height its picture gives) */
#world#world .poi-node.poi-art.poi-vault[style*="city-vault-3"]{width:76px!important;height:76px!important}/* Round 456: the vault entrance is a small building: the merchant's size */
#world#world .relic.gear-relic img{width:48px;height:48px}
#world#world .poi-node:not(.poi-art) .poi-glyph{font-size:30px!important}
#world#world .map-chest.crystal-chest::after{right:-7px!important;top:-11px!important;font-size:22px!important}
#world#world .poi-node .quest-mark{font-size:18px}
/* Same round (owner: "add a faint glow to interactable objects as well"). Every object that has not been used gets a
   faint, steady glow in its world's colour (about half as strong as the pulsing glow of waypoints and chests, which keep
   theirs); used objects stay dim with none. */
#world#world#world .poi-node:not(.used):not(.poi-nexus),#world#world#world .relic{animation:none!important;filter:drop-shadow(0 0 1px #000c) drop-shadow(0 0 5px color-mix(in srgb,var(--wp-glow,#9fdcff) 45%,transparent))!important}
/* Round 441 (owner: "reduce interactable object size, increase building size"): in the top-down city objects are a quarter
   smaller: 42px (the merchant and the Cardsmith 58px, the vault door 69x42), beside storeys of 50px. */
#world#world.td-city .poi-node,#world#world.td-city .poi-node.poi-art,#world#world.td-city .map-chest,#world#world.td-city .relic:not(.hidden-crystal){width:42px!important;height:42px!important}
#world#world.td-city .poi-node.poi-merchant,#world#world.td-city .poi-node.poi-art.poi-merchant,#world#world.td-city .poi-node.poi-cardsmith,#world#world.td-city .poi-node.poi-art.poi-cardsmith{width:58px!important;height:58px!important}
#world#world.td-city .poi-node.poi-art.poi-vault[style*="city-vault-3"]{width:58px!important;height:58px!important}
#world#world.td-city .relic.gear-relic img{width:36px;height:36px}
/* Round 457 (owner: "can you make waypoints pulse with energy?"): a Nexus Waypoint breathes brighter and sends two rings of
   its world's colour out across the ground, one after the other (flat ovals, as the pad lies on the ground). */
#world#world .poi-node.poi-nexus:not(.used){animation:waypointPulse 2.2s ease-in-out infinite!important;overflow:visible!important}
@keyframes waypointPulse{0%,100%{filter:brightness(1) drop-shadow(0 0 1px #000c) drop-shadow(0 0 4px color-mix(in srgb,var(--wp-glow) 70%,transparent))}50%{filter:brightness(1.28) drop-shadow(0 0 1px #000c) drop-shadow(0 0 12px color-mix(in srgb,var(--wp-glow) 95%,transparent))}}
#world#world#world .poi-node.poi-nexus:not(.used)::before,#world#world#world .poi-node.poi-nexus:not(.used)::after{content:""!important;display:block!important;position:absolute!important;left:var(--wp-cx,50%)!important;top:var(--wp-cy,64%)!important;width:100%!important;height:52%!important;margin:0!important;translate:-50% -50%!important;scale:1!important;font-size:0!important;border-radius:50%!important;border:2px solid var(--wp-glow,#9fdcff)!important;box-shadow:0 0 6px var(--wp-glow,#9fdcff),inset 0 0 4px var(--wp-glow,#9fdcff)!important;background:none!important;pointer-events:none!important;opacity:0;transform-origin:50% 50%!important;animation:waypointRing 2.2s ease-out infinite!important}
#world#world#world .poi-node.poi-nexus:not(.used)::after{animation-delay:-1.1s!important}
@keyframes waypointRing{0%{transform:scale(.04);opacity:0}8%{opacity:1}100%{transform:scale(2.1);opacity:0}}
/* Round 459 (owner: "waypoint pulse doesn't start from the center dot of the waypoint"): each world's pad has its centre in a
   different place in its picture (drawn contained, standing on the bottom of its square box); the rings start there */
#world .poi-node.poi-nexus[style*="city-nexus"]{--wp-cx:47.7%;--wp-cy:68%}
#world .poi-node.poi-nexus[style*="elaris-nexus"]{--wp-cx:48.8%;--wp-cy:59.8%}
#world .poi-node.poi-nexus[style*="sky-nexus"]{--wp-cx:51%;--wp-cy:58.6%}
#world .poi-node.poi-nexus[style*="wilds-nexus"]{--wp-cx:46.5%;--wp-cy:55.5%}
#world .poi-node.poi-nexus[style*="vespera-nexus"]{--wp-cx:49.8%;--wp-cy:54.7%}
#world .poi-node.poi-nexus[style*="chronospire-nexus"]{--wp-cx:48.6%;--wp-cy:68%}
@media(prefers-reduced-motion:reduce){#world#world#world .poi-node.poi-nexus:not(.used)::before,#world#world#world .poi-node.poi-nexus:not(.used)::after{animation:none!important;display:none!important}#world#world .poi-node.poi-nexus:not(.used){animation:none!important}}
/* Round 475 (owner: "the circle under the elite enemies doesn't look good, just keep the glow but make it orange"): an elite
   has an orange glow hugging its sprite (two thin passes and a soft halo); no ring under it */
#world .enemy-node.elite .monster-sprite,#world .enemy-node.elite .wildlife-sprite{filter:drop-shadow(0 0 .8px #ff9a2e) drop-shadow(0 0 .8px #ff9a2e) drop-shadow(0 0 5px rgba(255,130,30,.7))!important}
/* Round 475 (owner: "sometimes the game gets blurred when i move and stop moving"): the hero's idle "breathe" was a scale
   animation, so the browser drew it at low quality whenever the hero stood still; no animation now: a still hero is crisp */
#world #player:not(.walking) .hero-sprite,#player:not(.walking) .hero-sprite{animation:none!important}
/* Round 521 (owner: "make the quest exclamation point gold and bigger"); Round 522 (owner's example picture): a drawn gold "!"
   (questMarkSVG in quests.js), 11 x 18px (owner: "25% smaller", then "another 30% smaller" twice), with a soft gold glow so it reads on any ground */
#world#world#world .poi-node .quest-mark{font-size:0!important;line-height:0;top:-16px;width:11px;height:18px;filter:drop-shadow(0 0 3px #ffd23fb0) drop-shadow(0 1px 1px #0008)}
#world#world#world .poi-node .quest-mark svg{display:block;width:11px;height:18px}

/* Round 540 (owner: "room names can be made very small, barely visible on the map"): every world's Map screen shows a room's
   name and state as small faint text with no box; the room you are in and boss rooms keep their frames; object badges stay. */
.map-canvas .panel { min-width: 0 !important; min-height: 0 !important; width: auto !important; height: auto !important; padding: 1px 4px !important; } /* (Round 540: the box is the text, so it can sit beside a road) */
.map-canvas .panel:not(.current-room):not(.boss-room) { background: none !important; border-color: transparent !important; box-shadow: none !important; }
.map-canvas .panel.current-room, .map-canvas .panel.boss-room { background: rgba(8, 14, 22, .55) !important; }
.map-canvas .panel b { font-size: 6.5px !important; font-weight: 600 !important; opacity: .6; text-shadow: 0 0 3px #000, 0 0 2px #000 !important; }
.map-canvas .panel small { font-size: 5px !important; opacity: .5; letter-spacing: .3px !important; }
.map-canvas .panel .lock-hint { position: absolute !important; top: 100% !important; left: 50% !important; transform: translateX(-50%) !important; white-space: nowrap !important; font-size: 5.5px !important; opacity: .75; } /* Round 540: the lock note hangs under the name, so the label stays the name's size */
/* Round 549 (owner: "the world maps seem to have the old road lines, we need to remove those"): the dotted guide lines drawn
   from room centre to room centre (and their stubs) are gone in every world; the roads drawn on the map are the routes, and a
   locked door still shows its 🔒 note on the room's label. */
.map-canvas .map-link, .map-canvas .map-links .map-link { display: none !important; }
