/* One live map control: share its quiet green treatment without masking alerts. */
#game-ui > header .header-menu-button:not(.map-attention){background:#14271ee6;border:1px solid #8a92746b;border-radius:3px;color:#dddcc4;font-weight:400}
#game-ui > header .header-menu-button:not(.map-attention):hover,
#game-ui > header .header-menu-button:not(.map-attention)[aria-expanded="true"],
#game-ui > header .header-menu-button:not(.map-attention)[aria-pressed="true"]{background:#354432;border-color:#cebf8c}
#game-ui > header .header-menu-button:focus-visible{outline:2px solid #e6d0a1;outline-offset:3px}
#game-ui .header-menu-icon{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#game-ui .header-menu-label{padding:0;white-space:nowrap}
#game-ui #journal-toggle{display:flex;align-items:center;justify-content:center;gap:6px}
/* Compact menus retain their existing touch-target widths and text-only map. */
#game-ui .commandbar #world-map-button .header-menu-icon{display:none}
#game-ui .commandbar #world-map-button .header-menu-label{min-width:0;white-space:normal}
@media(max-width:420px){#game-ui #journal-toggle .header-menu-label{display:none}}
@media(min-width:761px) and (min-height:601px),(min-width:1101px){
 /* 40.48px of Korean text + 16px icon + 6px gap + 20px padding + border:
    the previous fullscreen button's approximately 84.5 by 34px footprint. */
 #game-ui > header .header-menu-button{display:flex;align-items:center;justify-content:center;gap:6px;flex:0 0 84.5px;width:84.5px;min-width:84.5px;height:34px;min-height:34px;padding:0 10px;font-size:11px;line-height:18px;white-space:nowrap;border-radius:3px}
 #game-ui > header .header-menu-button svg{width:16px;height:16px;flex:0 0 16px}
 #game-ui #header-world-tools #world-map-button.map-attention{padding:0 9px}
}

/* Keep the five upper-right controls on one centered, evenly spaced row.
   Compact layouts retain their text hiding, map relocation and touch widths. */
#game-ui > header .header-right{--header-control-gap:calc(20px / 3);gap:var(--header-control-gap)}
#game-ui > header .display-controls{gap:var(--header-control-gap);flex:0 0 auto}
#game-ui > header #journal-toggle,
#game-ui > header #fullscreen-toggle,
#game-ui > header #volume-toggle,
#game-ui > header #pause{height:34px;min-height:34px;margin:0;align-items:center;justify-content:center}
#game-ui > header #volume-toggle,
#game-ui > header #pause{display:flex;flex:0 0 36px;width:36px;min-width:36px;padding:0}
#game-ui > header .header-menu-icon,
#game-ui > header .display-button svg{display:block;flex:0 0 16px;width:16px;height:16px}
#game-ui > header #pause .resume-symbol,
#game-ui > header #pause[aria-pressed="true"] .pause-symbol{display:none}
#game-ui > header #pause[aria-pressed="true"] .resume-symbol{display:block}
@media(max-width:760px),(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 #game-ui > header .header-right{--header-control-gap:4px;justify-content:flex-end}
}

/* The in-game masthead becomes the one live map/level display. The selection
   screen keeps its title. Reserve a real header box for rare-drop geometry. */
#game-ui > header{gap:12px}
#game-ui > header #header-location{position:static;inset:auto;display:flex;flex:1 1 auto;align-items:center;min-width:0;max-width:none;margin:0;padding:0;background:none;pointer-events:none}
#game-ui > header #header-location .location{min-width:0;gap:9px}
#game-ui > header #header-location .location>div{min-width:0}
#game-ui > header #header-location .location-icon{flex:0 0 auto;font-size:20px;line-height:1}
#game-ui > header #header-location h2{font-size:16px;line-height:24px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#game-ui > header #header-location p{margin-top:2px;font-size:10px;line-height:15px;white-space:normal;word-break:keep-all;overflow-wrap:anywhere}
#game-ui > header .header-right{flex:0 0 auto;width:auto;margin-left:auto}
#game-ui > header #to-title{display:flex;align-items:center;justify-content:center;gap:6px;flex:0 0 84.5px;width:84.5px;min-width:84.5px;height:34px;min-height:34px;padding:0 10px;margin:0;font-size:11px;line-height:18px;white-space:nowrap}
@media(max-width:760px),(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 #game-ui > header{height:auto;min-height:44px;gap:8px;padding-top:4px;padding-bottom:4px}
 #game-ui > header #header-location h2{font-size:13px;line-height:18px;letter-spacing:1px}
 #game-ui > header #header-location p{margin-top:0;font-size:9px;line-height:14px}
 #game-ui > header #header-location .location{gap:7px}
 #game-ui > header #header-location .location-icon{font-size:17px}
 #game-ui > header #journal-toggle{flex:0 0 84.5px;width:84.5px;min-width:84.5px;padding:0 10px;font-size:11px;line-height:18px;gap:6px}
 #game-ui > header #journal-toggle .header-menu-label{display:inline;font-size:11px}
}
/* Narrow phones keep complete labels and the whole map/level line. The menu
   remains right-aligned directly below it rather than colliding or shrinking. */
@media(max-width:520px){
 #game-ui > header{flex-wrap:wrap;gap:4px 0;padding-top:6px;padding-bottom:6px}
 #game-ui > header #header-location{flex:1 0 100%;width:100%;min-height:32px}
 #game-ui > header .header-right{justify-content:flex-end}
 #game-ui .field-gold{top:calc(90px + env(safe-area-inset-top))}
}
/* Text enlargement can grow the header instead of clipping its level range. */
@media(min-width:761px) and (min-height:601px),(min-width:1101px){
 #game-ui > header{height:auto;min-height:62px;padding-top:6px;padding-bottom:6px}
}
@media(max-width:760px),(orientation:landscape) and (max-height:600px) and (max-width:1100px){
 #game-ui > footer .commandbar{grid-template-columns:repeat(6,minmax(40px,1fr))}
}
@media(max-width:520px){#game-ui > header .header-right{max-width:100%;flex-wrap:wrap}}
