/* Game menu look (#240). Loaded after ui-system.css and wins over it.
   A pixel font (VT323) for labels, counts and buttons; one framed panel with
   ASCII corners; icon tabs on top; only things you can pick are tiles; one tab
   style everywhere; no intro sentences. Plain text stays monospace and small. */
@font-face{font-family:"Asciilands Pixel";font-style:normal;font-weight:400;font-display:swap;src:url("../media/font-vt323-400.woff2") format("woff2")}
:root{
  --g-ink:#e8e2c8;--g-muted:#9aa78f;--g-dim:#5d6a56;--g-gold:#e0c27a;--g-gold-deep:#a8893f;--g-leaf:#9fcf7a;--g-warn:#d9775f;
  --g-panel:#0f1a12f5;--g-tile:#1b2a20;--g-tile-hi:#2c4130;--g-tile-edge:#26382a;--g-edge:#33452f;
  --g-pixel:"Asciilands Pixel","VT323",Consolas,monospace;--g-mono:Consolas,"IBM Plex Mono",monospace;
}

/* ---------- Shell ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game{overflow:visible;border:1px solid var(--g-gold-deep)!important;border-top-width:1px!important;border-radius:0!important;background:var(--g-panel)!important;box-shadow:0 24px 90px #000c!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game::before,html body #game-menu#game-menu#game-menu#game-menu.ui-game::after,html body #game-menu#game-menu#game-menu#game-menu.ui-game>footer::before,html body #game-menu#game-menu#game-menu#game-menu.ui-game>footer::after{position:absolute;z-index:3;font:400 34px/1 var(--g-pixel);color:var(--g-gold);pointer-events:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game::before{content:"┌";left:-7px;top:-11px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game::after{content:"┐";right:-7px;top:-11px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game>footer{display:block!important;position:absolute;inset:auto 0 0 0;height:0;padding:0!important;border:0!important;font-size:0!important;overflow:visible}
html body #game-menu#game-menu#game-menu#game-menu.ui-game>footer::before{content:"└";left:-7px;bottom:-13px;font-size:34px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game>footer::after{content:"┘";right:-7px;bottom:-13px;font-size:34px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .game-menu-heading{display:flex!important;align-items:stretch!important;gap:8px!important;padding:8px 14px 0!important;background:transparent!important;border-bottom:1px solid var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .game-menu-heading>div:first-child{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);flex:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .game-menu-layout{display:block!important;flex:1;min-height:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages{height:100%;padding:16px 20px!important}
/* Icon tabs */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav{display:flex!important;flex-direction:row!important;flex-wrap:nowrap;align-items:stretch;gap:0!important;flex:1;min-width:0;padding:0!important;border:0!important;background:none!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{position:relative;display:grid!important;justify-items:center;align-content:center;gap:3px;min-width:60px;min-height:0!important;padding:8px 8px 9px!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;color:var(--g-muted)!important;font:400 18px/1 var(--g-pixel)!important;white-space:nowrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{font:400 18px/1 var(--g-pixel)!important;color:inherit}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] .ui-pix{width:24px;height:24px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] kbd{position:absolute;top:3px;right:3px;padding:0!important;margin:0!important;border:0!important;background:none!important;opacity:1!important;color:var(--g-dim)!important;font:400 14px/1 var(--g-pixel)!important;display:block!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]:hover{color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section].is-active{color:var(--g-gold)!important;border:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section].is-active::after{content:"";position:absolute;left:8px;right:8px;bottom:0;height:3px;background:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]::before{display:none!important;content:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-wallet{display:flex!important;align-items:center;gap:6px;padding:0 6px;color:var(--g-gold)!important;font:400 24px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-wallet span{font:400 24px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-wallet .ui-pix{width:16px;height:16px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-resume{align-self:center;min-height:0!important;padding:6px 10px!important;font-size:0!important;background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-muted)!important;outline:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-resume kbd{margin:0!important;padding:0!important;border:0!important;background:none!important;font:400 20px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-resume:hover{border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-discord{align-self:center;margin:0 4px 0 0!important;padding:4px 8px!important;border:1px solid var(--g-edge)!important;background:none!important;color:var(--g-muted)!important;font:400 18px/1 var(--g-pixel)!important;font-weight:400!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-discord:hover{color:var(--g-gold)!important;border-color:var(--g-gold)!important}

/* ---------- Type and controls inside pages ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages :is(h2,h3){font-family:var(--g-pixel)!important;font-weight:400!important;letter-spacing:.01em;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages h2{font-size:30px!important;line-height:1!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages h3{font-size:24px!important;line-height:1.05!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages h4{font:400 18px/1 var(--g-pixel)!important;color:var(--g-muted)!important;text-transform:uppercase;letter-spacing:.06em}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages button:not(.bl-item-slot):not(.build-card){font-family:var(--g-pixel)!important;font-size:20px!important;line-height:1!important;font-weight:400!important;border-radius:0!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages button:not(.bl-item-slot):not(.build-card) *{font-family:var(--g-pixel)!important;font-size:inherit!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages :is(input[type=search],input[type=text],select){font:400 18px/1 var(--g-pixel)!important;background:#101a13!important;border:1px solid var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages kbd{font-family:var(--g-pixel)!important}
/* Primary actions are gold. */
/* The gold rule takes an id's weight through :is(), so disabled must match it. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages :is(.workshop-make,#help-replay-tutorial.is-primary,#town-fund-form button){background:var(--g-gold)!important;color:#16200f!important;border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages :is(.workshop-make,#help-replay-tutorial.is-primary,#town-fund-form button):disabled{cursor:default!important;background:#22301f!important;color:var(--g-dim)!important;border-color:var(--g-edge)!important}

/* ---------- One tab style ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-filter-bar,#build-category-tabs,.crafting-filter,#settings-tabs,#map-mode-tabs,.journal-categories,.crafting-view-switch,.admin-tabs,.admin-filter){display:flex!important;flex-wrap:wrap;align-items:flex-end;gap:4px 18px!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;grid-template-columns:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-filter-bar .inventory-filter,#build-category-tabs button,.crafting-filter button,#settings-tabs button,#map-mode-tabs>button,.journal-categories button,.crafting-view-switch button,.admin-tabs button,.admin-filter button){flex:none!important;width:auto!important;min-width:0!important;min-height:0!important;height:auto!important;padding:4px 0 5px!important;margin:0!important;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;color:var(--g-muted)!important;font:400 21px/1 var(--g-pixel)!important;text-transform:none!important;letter-spacing:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-filter-bar .inventory-filter,#build-category-tabs button,.crafting-filter button,#settings-tabs button,#map-mode-tabs>button,.journal-categories button,.crafting-view-switch button,.admin-tabs button,.admin-filter button)::before{content:none!important;display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-filter-bar .inventory-filter.is-active,#build-category-tabs button.is-active,.crafting-filter button[aria-pressed=true],#settings-tabs button[aria-selected=true],#map-mode-tabs>button[aria-pressed=true],.journal-categories button[aria-pressed=true],.crafting-view-switch button[aria-pressed=true],.admin-tabs button[aria-selected=true],.admin-filter button[aria-pressed=true]){color:var(--g-gold)!important;box-shadow:inset 0 -2px var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-filter-bar .inventory-filter,#build-category-tabs button,.crafting-filter button,#settings-tabs button,#map-mode-tabs>button,.journal-categories button,.admin-tabs button,.admin-filter button):hover{color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .crafting-filter b{margin-left:6px;color:var(--g-dim);font:inherit!important}
/* Journal category tabs: icon, title and count in one line. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button{display:inline-flex!important;align-items:center;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button svg{width:16px;height:16px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button small{font:inherit!important;color:var(--g-dim)!important}

/* ---------- Flat panels: no boxes around groups ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-list,.inventory-ground-panel,#inventory-character,#inventory-item-detail,.workshop-list.ui-panel,.workshop-detail.ui-panel,.workshop-footer,#social-guest,.help-card,#town-overview,.frontier-goal,.journal-goal-list,#build-list,.bl-pack-sort,#settings-footer,.storage-panel,.ui-panel){background:none!important;border:0!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-item-detail,.workshop-detail.ui-panel){border-left:1px solid var(--g-edge)!important;padding-left:18px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-ground-panel{border-top:1px dashed var(--g-edge)!important;padding-top:10px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card{border-bottom:1px solid var(--g-edge)!important;padding:12px 0!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .frontier-goal{border-bottom:1px solid var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .frontier-goal.is-pinned{box-shadow:inset 3px 0 var(--g-gold)!important;background:#1d2b20!important}

/* ---------- Less text ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(.crafting-context p,.journal-pin-help,.help-heading p,#game-social>p:first-of-type,.frontier-empty-context .frontier-lead,.frontier-empty-context button,.bl-pack-result-count,#town-summary:empty){display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .crafting-context h2{font-size:22px!important;color:var(--g-muted)!important}

/* ---------- Item tiles ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-slot{background:var(--g-tile)!important;border:1px solid var(--g-tile-edge)!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-slot.is-selected{background:var(--g-tile-hi)!important;outline:2px solid var(--g-gold)!important;outline-offset:-2px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-qty{background:none!important;border:0!important;font:400 20px/1 var(--g-pixel)!important;color:var(--g-ink)!important;text-shadow:1px 1px 0 #000,-1px 0 0 #000;right:4px!important;bottom:2px!important;top:auto!important;left:auto!important;padding:0!important;min-width:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-slot-label{font:400 16px/1 var(--g-pixel)!important;color:var(--g-muted)!important}

/* ---------- Crafting: recipes as tiles ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-list.ui-panel{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));grid-auto-rows:min-content;gap:8px!important;padding:2px!important;align-content:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-group{grid-column:1/-1;display:flex;align-items:center;gap:10px;margin:8px 0 0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-group::after{content:"";flex:1;height:1px;background:var(--g-edge)}
/* Stations further up the chain fold into one dim line each (#240). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-more{grid-column:1/-1;display:flex;align-items:center;gap:8px;margin:2px 0 0!important;padding:4px 2px;border-top:1px solid var(--g-edge);font:400 18px/1 var(--g-pixel);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-group+.workshop-more,html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-more+.workshop-more{border-top:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-more-icon{width:20px;height:20px;display:inline-grid;place-items:center;opacity:.45;filter:grayscale(1)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-more-icon img,html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-more-icon svg{max-width:20px;max-height:20px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row{display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:flex-start!important;gap:4px!important;padding:8px 4px 6px!important;min-height:0!important;background:var(--g-tile)!important;border:1px solid var(--g-tile-edge)!important;text-align:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row.is-selected{background:var(--g-tile-hi)!important;outline:2px solid var(--g-gold);outline-offset:-2px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-icon{width:56px!important;height:56px!important;background:none!important;border:0!important;position:relative}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-icon :is(canvas,img,svg,.frontier-item-icon){width:100%!important;height:100%!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-qty{background:none!important;border:0!important;font:400 18px/1 var(--g-pixel)!important;text-shadow:1px 1px 0 #000}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-copy{display:block;min-width:0;width:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-copy strong{display:block;font:400 18px/1 var(--g-pixel)!important;color:var(--g-ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-copy :is(.workshop-row-state,.workshop-variant){display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row.is-missing .workshop-row-icon{opacity:.38;filter:grayscale(.6)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row.is-missing strong{color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row>button{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail-heading{display:flex;align-items:center;gap:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail-heading::after{content:"";flex:1;height:1px;background:var(--g-edge)}

/* ---------- Build: pieces as tiles, quiet locks ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list{display:grid!important;grid-template-columns:repeat(auto-fill,minmax(118px,1fr))!important;gap:8px!important;padding:2px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card{display:flex!important;flex-direction:column!important;align-items:center!important;gap:4px!important;padding:8px 6px 8px!important;min-height:0!important;background:var(--g-tile)!important;border:1px solid var(--g-tile-edge)!important;text-align:center!important;font:400 16px/1.1 var(--g-pixel)!important;position:relative}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card *{font-family:var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card.is-selected{background:var(--g-tile-hi)!important;outline:2px solid var(--g-gold);outline-offset:-2px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card strong{font-size:19px!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card :is(span,small,p){font-size:16px!important;color:var(--g-muted)!important;line-height:1.1!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card.is-undiscovered :is(img,canvas,svg,.build-card-art,.build-preview){opacity:.22;filter:grayscale(1) brightness(.7)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card.is-undiscovered strong{color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-discovery-badge{position:absolute!important;top:6px;right:6px;width:14px;height:14px;padding:0!important;margin:0!important;font-size:0!important;background:none!important;border:0!important;color:var(--g-dim)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-discovery-badge::before{content:"";display:block;width:14px;height:14px;background:currentColor;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'><path d='M2 0h3v1H2zM1 1h1v2H1zM5 1h1v2H5zM0 3h7v4H0z' fill='black'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8' shape-rendering='crispEdges'><path d='M2 0h3v1H2zM1 1h1v2H1zM5 1h1v2H5zM0 3h7v4H0z' fill='black'/></svg>") center/contain no-repeat}

/* ---------- Empty states: one heading and one short line, top left ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(.frontier-empty-context,#town-welcome,#game-social){display:flex;flex-direction:column;align-items:flex-start;gap:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-summary{font:400 20px/1 var(--g-pixel)!important;color:var(--g-muted)!important;border:0!important;padding:0!important}

/* ---------- Help: topic list as plain rows ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #help-categories button{background:none!important;border:0!important;border-left:2px solid transparent!important;color:var(--g-muted)!important;text-align:left!important;padding:6px 10px!important;font-size:20px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #help-categories button:is([aria-pressed=true],.is-active){color:var(--g-gold)!important;border-left-color:var(--g-gold)!important;background:#1d2b20!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card li{background:none!important;border:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card summary{font:400 22px/1 var(--g-pixel)!important}

@media (max-width:900px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{min-width:48px;padding-inline:4px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{display:none}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-discord{display:none!important}
}

/* ---------- Details (round 2) ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card :is(.build-card-copy,.build-materials){display:flex!important;flex-direction:column!important;align-items:center!important;gap:2px!important;text-align:center!important;width:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card-icon{width:64px!important;height:48px!important;background:none!important;border:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card .build-materials .needs-material{color:var(--g-warn)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card .build-materials .has-material{color:var(--g-leaf)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card:not(.is-undiscovered) .build-card-state{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card.is-undiscovered .build-materials{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card.is-undiscovered .build-card-state{color:var(--g-dim)!important;font-size:16px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail :is(li,.workshop-alternatives li){background:none!important;border:0!important;border-left:0!important;padding-left:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail .bl-item-slot{background:var(--g-tile)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount button{background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount button[aria-pressed=true]{color:var(--g-gold)!important;border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-make{min-height:44px!important;font-size:24px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-sort button{background:none!important;border:0!important;color:var(--g-muted)!important;padding:4px 6px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-sort button[aria-pressed=true]{color:var(--g-gold)!important;box-shadow:inset 0 -2px var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(.bl-pack-weight,.bl-pack-result-count,.inventory-ground-panel strong,.inventory-ground-panel h3,.inventory-ground-panel .group-title){font:400 20px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character button{background:none!important;border:1px dashed var(--g-edge)!important;color:var(--g-dim)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-filter-bar{border-bottom:0!important}

/* ---------- Details (round 3) ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game, html body #game-menu#game-menu#game-menu#game-menu.ui-game *{font-synthesis:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages :is(strong,b,h2,h3,h4,button){font-weight:400!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card .build-discovery-badge{position:absolute!important;top:6px;right:6px;width:14px;height:14px;padding:0!important;margin:0!important;font-size:0!important;line-height:0!important;color:var(--g-dim)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card.is-undiscovered .build-card-icon{opacity:.4;filter:grayscale(1) brightness(.75)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card.is-undiscovered :is(img,canvas,svg,.build-card-art,.build-preview){opacity:1;filter:none}
/* Item names along the bottom of each Pack tile; quantity moves to the top corner. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list .bl-item-slot{position:relative}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list .bl-item-slot-label{display:block!important;position:absolute;left:2px;right:2px;bottom:2px;margin:0!important;padding:0!important;font:400 13px/1 var(--g-pixel)!important;color:var(--g-ink)!important;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-shadow:1px 1px 0 #000,-1px 1px 0 #000;pointer-events:none;z-index:2}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list .bl-item-slot .bl-item-qty{top:2px!important;bottom:auto!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list .bl-item-slot .bl-item-icon{transform:translateY(-5px)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .anvil-repair .bl-item-slot-label{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .anvil-repair .bl-item-slot{min-height:0!important;height:auto!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-action:has(.bl-sharpen-cost){display:flex!important;align-items:center;justify-content:center;flex-wrap:wrap;gap:4px 8px;height:auto!important;min-height:36px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button{display:inline-flex!important;flex-direction:row!important;align-items:center!important;grid-template-columns:none!important;gap:6px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button > *{margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-count{background:none!important;padding:0!important;color:var(--g-gold)!important;font:400 20px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .frontier-section-heading>span{font:400 26px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discovery-seal{border-style:dotted!important;background:none!important;color:var(--g-dim)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discoveries{border-bottom:1px solid var(--g-edge)!important}

/* ---------- Details (round 4) ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel:has(#town-welcome) #town-summary{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #social-guest{padding:0!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-social{gap:14px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#town-welcome h3,#game-social h3){color:var(--g-gold)!important}

/* The tutorial coach and world notices share the menu's look. */
html body #first-steps-coach{background:var(--g-panel)!important;border:1px solid var(--g-gold-deep)!important;box-shadow:0 10px 40px #000a!important;font-synthesis:none}
html body #first-steps-coach h2{font:400 30px/1 var(--g-pixel)!important;color:var(--g-ink)!important;letter-spacing:.01em}
html body #first-steps-coach small{font:400 18px/1 var(--g-pixel)!important;color:var(--g-gold)!important;letter-spacing:.04em}
html body #first-steps-coach .tutorial-next-action{font:400 21px/1.2 var(--g-pixel)!important;color:var(--g-gold)!important;font-weight:400!important}
html body #first-steps-coach .tutorial-head .tutorial-skip-step{font:400 18px/1 var(--g-pixel)!important}
html body #first-steps-coach .tutorial-keys span{font:400 20px/1 var(--g-pixel)!important}
html body #first-steps-coach .tutorial-action{font:400 21px/1.2 var(--g-pixel)!important}
html body #first-steps-coach::after{background:var(--g-panel)!important;border-color:var(--g-gold-deep)!important}
html body .world-notice{border:1px solid var(--g-gold-deep)!important;border-left:4px solid var(--notice-accent)!important;font-synthesis:none}
html body .world-notice strong{font:400 24px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body .world-notice .world-notice-mark{font:400 20px/1 var(--g-pixel)!important}

/* ================= Round 2 layouts (owner feedback on #255) ================= */

/* Discord: a glowing icon at the end of the tabs. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord{display:grid!important;justify-items:center;align-content:center;gap:3px;margin:0 0 0 auto!important;padding:8px 10px 9px!important;border:0!important;background:none!important;color:#9aa6ff!important;font:400 18px/1 var(--g-pixel)!important;text-decoration:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord span{font:inherit!important;color:inherit}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav .ui-discord-icon{width:24px;height:24px;background:currentColor;-webkit-mask:url("../media/social-discord.svg") center/contain no-repeat;mask:url("../media/social-discord.svg") center/contain no-repeat;filter:drop-shadow(0 0 3px #7c88ff);animation:ui-discord-glow 2.4s ease-in-out infinite}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord:hover{color:#c3caff!important}
@keyframes ui-discord-glow{50%{filter:drop-shadow(0 0 7px #8f9bff)}}
@media(prefers-reduced-motion:reduce){html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav .ui-discord-icon{animation:none}}

/* ---------- Inventory: character left, fixed grid centre, details right ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-filter-bar,html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(.bl-pack-search,.bl-pack-sort,.bl-pack-result-count){display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-view{display:block!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout{display:grid!important;grid-template-columns:200px minmax(0,1fr) 240px!important;grid-template-areas:"char list detail" "char ground detail";grid-template-rows:auto 1fr;gap:12px 20px!important;align-items:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-inspector{display:contents!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character{grid-area:char;display:grid!important;grid-template-columns:52px 1fr 52px;grid-template-rows:auto 60px 60px auto;gap:8px 6px;align-items:center;justify-items:center;padding:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-heading{grid-column:1/-1;width:100%;display:flex;align-items:center;justify-content:space-between}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-heading strong{font:400 22px/1 var(--g-pixel)!important;color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-turn button{min-height:0!important;width:24px;height:24px;padding:0!important;background:none!important;border:1px solid var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character canvas{grid-column:2;grid-row:2/5;width:100%!important;max-width:104px;height:auto!important;image-rendering:pixelated}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear{display:contents!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button{width:52px!important;height:52px!important;min-height:0!important;padding:0!important;display:grid!important;place-items:center;position:relative;background:#121c15!important;border:1px dashed #3a4d36!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button:not(.is-empty){border-style:solid!important;border-color:var(--g-tile-edge)!important;background:var(--g-tile)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button small{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button.is-empty::before{content:"";width:22px;height:22px;background:#3e523b}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=head]{grid-column:1;grid-row:2}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=body]{grid-column:1;grid-row:3}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=hand]{grid-column:3;grid-row:2}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=offhand]{grid-column:3;grid-row:3}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=head].is-empty::before{-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M2 0h4v1H2zM1 1h6v3H1zM2 4h4v1H2z' fill='black'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M2 0h4v1H2zM1 1h6v3H1zM2 4h4v1H2z' fill='black'/></svg>") center/contain no-repeat}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=body].is-empty::before{-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M0 0h2v1h4V0h2v2H7v5H1V2H0z' fill='black'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M0 0h2v1h4V0h2v2H7v5H1V2H0z' fill='black'/></svg>") center/contain no-repeat}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=hand].is-empty::before{-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M6 0h1v1H6zM5 1h1v1H5zM4 2h1v1H4zM3 3h1v1H3zM1 4h2v2H1zM0 6h1v1H0z' fill='black'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M6 0h1v1H6zM5 1h1v1H5zM4 2h1v1H4zM3 3h1v1H3zM1 4h2v2H1zM0 6h1v1H0z' fill='black'/></svg>") center/contain no-repeat}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=offhand].is-empty::before{-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M0 0h8v3H7v2H6v1H5v1H3V6H2V5H1V3H0z' fill='black'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M0 0h8v3H7v2H6v1H5v1H3V6H2V5H1V3H0z' fill='black'/></svg>") center/contain no-repeat}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-column{grid-area:list;display:flex!important;flex-direction:column;gap:12px;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-toolbar{order:2;display:flex!important;flex-direction:column;gap:8px;padding:0!important;border:0!important;background:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-condition{display:flex;gap:8px;order:2}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list{order:1;display:grid!important;grid-template-columns:repeat(8,minmax(0,1fr))!important;gap:6px!important;padding:0!important;max-height:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list>:is(.bl-item-slot,.ui-empty-slot){aspect-ratio:1;width:auto!important;height:auto!important;min-height:0!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list .ui-empty-slot{background:#111b14;border:1px solid #1b271d}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-carrying-status{display:flex!important;align-items:center;gap:10px;font:400 19px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-carrying-status span{font:inherit!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-carry-bar{flex:1;height:8px;background:#111b14;border:1px solid var(--g-edge);display:block}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-carry-bar i{display:block;height:100%;background:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-carrying-status.is-over .bl-carry-bar i{background:var(--g-warn)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-carrying-status.is-over .bl-carry-label,html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-carrying-status .bl-carry-speed{color:var(--g-warn)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail{grid-area:detail;min-height:320px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-name{font:400 30px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-ground-panel{grid-area:ground}

/* ---------- Crafting: square tiles, no page title, stepper ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .crafting-context{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-list.ui-panel{grid-template-columns:repeat(auto-fill,minmax(96px,1fr))!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row{position:relative;aspect-ratio:1;justify-content:center!important;padding:6px 4px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-icon{width:62%!important;height:auto!important;aspect-ratio:1;flex:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-copy strong{font-size:17px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row.is-elsewhere .workshop-row-icon{opacity:.3!important;filter:grayscale(1)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row.is-elsewhere::after{content:"";position:absolute;top:6px;right:6px;width:12px;height:12px;background:var(--g-dim);-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M2 0h3v1H2zM1 1h1v2H1zM5 1h1v2H5zM0 3h7v4H0z' fill='black'/></svg>") center/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'><path d='M2 0h3v1H2zM1 1h1v2H1zM5 1h1v2H5zM0 3h7v4H0z' fill='black'/></svg>") center/contain no-repeat}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-selection{display:flex!important;align-items:center;gap:14px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-selection .bl-item-slot{width:96px!important;height:96px!important;aspect-ratio:1;flex:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-facts span{background:none!important;border:0!important;color:var(--g-muted)!important;font:400 19px/1 var(--g-pixel)!important;padding:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount{display:flex!important;align-items:center;gap:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount>span{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount :is(.workshop-step,.workshop-max){width:38px;height:38px;min-height:0!important;padding:0!important;background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-ink)!important;font-size:24px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount .workshop-max{width:auto;padding:0 12px!important;margin-left:8px!important;font-size:20px!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount output{min-width:56px;height:38px;display:grid;place-items:center;border-block:1px solid var(--g-edge);font:400 24px/1 var(--g-pixel)!important;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount button:disabled{opacity:.35}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-footer{display:flex!important;flex-direction:column;gap:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-action,html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-make{width:100%}

/* ---------- Build: details on the right, finish only there ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #building-choices{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-panel{display:grid!important;grid-template-columns:minmax(0,1fr) 270px!important;gap:20px!important;align-items:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-detail{position:sticky;top:0;display:flex!important;flex-direction:column;gap:12px;padding:0 0 0 18px!important;border:0!important;border-left:1px solid var(--g-edge)!important;background:none!important;min-height:360px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-detail .build-detail-art{width:110px;height:96px;display:grid;place-items:center;background:var(--g-tile);border:1px solid var(--g-tile-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-detail .build-detail-art>*{max-width:100%;max-height:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-detail h3{font-size:30px!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-detail .build-detail-label{display:flex;align-items:center;gap:10px;margin:4px 0 0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-detail .build-detail-label::after{content:"";flex:1;height:1px;background:var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-chips{display:flex;flex-wrap:wrap;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-chip{display:inline-flex;align-items:center;gap:6px;padding:2px 8px 2px 2px;background:#142017;font:400 20px/1 var(--g-pixel)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-chip span{font:inherit!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-chip.is-ok{color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-chip.is-short{color:var(--g-warn)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-chip-icon{width:26px;height:26px;display:grid;place-items:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-chip-icon>*{max-width:26px;max-height:26px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-locked{margin:0;color:var(--g-muted);font:400 20px/1.2 var(--g-pixel)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-finishes{display:flex;flex-wrap:wrap;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-finishes button{min-height:0!important;padding:5px 9px!important;background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-muted)!important;font-size:18px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-finishes button[aria-pressed=true]{color:var(--g-gold)!important;border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-place{margin-top:auto!important;min-height:44px!important;background:var(--g-gold)!important;color:#16200f!important;border-color:var(--g-gold)!important;font-size:24px!important;display:inline-flex!important;align-items:center;justify-content:center;gap:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-place kbd{border:1px solid #8b7434!important;background:none!important;color:#5b4a1d!important;font-size:16px!important;padding:0 4px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-place:disabled{background:#22301f!important;color:var(--g-dim)!important;border-color:var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-empty{color:var(--g-muted);font:400 20px/1 var(--g-pixel)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-category-tabs{align-items:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-catalog-toolbar{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-catalog-actions{display:flex;flex-wrap:wrap;gap:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-region-count{align-self:center;color:var(--g-muted);font:400 18px/1 var(--g-pixel)!important;white-space:nowrap;font-variant-numeric:tabular-nums}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-catalog-toolbar #build-catalog-actions button{display:inline-flex;align-items:center;gap:6px;padding:6px 10px!important;min-height:32px!important;border:1px solid var(--g-edge)!important;background:var(--g-tile)!important;color:var(--g-ink)!important;font-size:18px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-catalog-toolbar #build-catalog-actions button:hover{border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-filters:not([hidden]){display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin:12px 0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-filters label{display:flex;align-items:center;gap:8px;color:var(--g-muted);font:400 18px/1 var(--g-pixel)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-filters select{min-height:32px;padding:4px 8px}

/* ---------- Journal: list left, quest right ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-board{display:grid!important;grid-template-columns:270px minmax(0,1fr);gap:22px;align-items:stretch;min-height:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-side{display:flex;flex-direction:column;gap:12px;border-right:1px solid var(--g-edge);padding-right:16px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-mode{display:flex;gap:18px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-mode button{min-height:0!important;padding:4px 0 5px!important;background:none!important;border:0!important;color:var(--g-muted)!important;font-size:22px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-mode button[aria-pressed=true]{color:var(--g-gold)!important;box-shadow:inset 0 -2px var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories{gap:4px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button{width:34px!important;height:34px!important;justify-content:center;padding:0!important;border:1px solid transparent!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button[aria-pressed=true]{border-color:var(--g-gold)!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-quests{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:2px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-quest{width:100%;display:grid!important;grid-template-columns:20px 1fr auto;align-items:center;gap:8px;min-height:0!important;padding:9px 10px!important;background:none!important;border:0!important;text-align:left;color:var(--g-muted)!important;font-size:20px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-quest:hover{color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-quest.is-selected{background:var(--g-tile-hi)!important;color:var(--g-ink)!important;box-shadow:inset 3px 0 var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-pin-mark{color:var(--g-gold)!important;font:400 17px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-empty{color:var(--g-dim);font:400 19px/1.2 var(--g-pixel);padding:6px 10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discoveries{border:0!important;padding:8px 0 0!important;gap:10px!important;font:400 17px/1 var(--g-pixel)!important;text-transform:uppercase;letter-spacing:.06em}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discoveries span{font:inherit!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discovery-seal{width:28px!important;height:28px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail{display:block!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail .frontier-goal{display:flex!important;flex-direction:column;gap:16px;border:0!important;background:none!important;box-shadow:none!important;padding:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head{display:flex;align-items:center;gap:12px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head h3{font-size:34px!important;margin:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:14px;max-width:560px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps>li{display:grid;grid-template-columns:24px 1fr auto;align-items:center;gap:6px 10px;font:400 22px/1.1 var(--g-pixel);color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps>li *{font-family:var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps>li:not(.is-complete):not(.is-current){color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-check{width:18px;height:18px;border:2px solid var(--g-dim);display:grid;place-items:center;color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .is-complete>.journal-check{border-color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps progress{grid-column:2/4;width:100%;height:8px;appearance:none;border:1px solid var(--g-edge);background:#111b14}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps progress::-webkit-progress-bar{background:#111b14}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps progress::-webkit-progress-value{background:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps small{grid-column:2/4;font:400 18px/1.2 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail .frontier-reward{display:flex!important;flex-direction:row!important;align-items:center!important;gap:16px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-reward{display:inline-flex;align-items:center;gap:6px;color:var(--g-gold)!important;font:400 26px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail .goal-track{background:#22301f!important;border:1px solid var(--g-edge)!important;color:var(--g-ink)!important;padding:8px 14px!important;font-size:21px!important}

/* ---------- Map: one stable toggle, no flavour text ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#travel-zone-description,#travel-zone-facts,#travel-zone-subtitle,#zone-travel-status,#waypoint-controls>small,#travel-map-meta){display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs{gap:0!important;align-items:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button{width:84px;padding:6px 0!important;text-align:center;border:1px solid var(--g-edge)!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button+button{border-left:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button[aria-pressed=true]{background:var(--g-tile-hi)!important;color:var(--g-gold)!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-zone-title{font:400 28px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .travel-badge{background:none!important;border:1px solid var(--g-edge)!important;font:400 17px/1 var(--g-pixel)!important;color:var(--g-muted)!important}

/* ---------- Help: clear topic headers ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card{padding:0!important;border:1px solid var(--g-edge)!important;margin:0 0 8px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card>summary{display:flex!important;align-items:center;gap:12px;padding:10px 14px!important;background:var(--g-tile)!important;cursor:pointer;list-style:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card>summary *{font:400 26px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card>summary::after{content:"+"!important;margin-left:auto;font:400 28px/1 var(--g-pixel);color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card[open]>summary::after{content:"-"!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card[open]>summary{border-bottom:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card>:not(summary){padding-inline:14px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .help-card>:not(summary):last-child{padding-bottom:12px}

/* ---------- Round 2 fixes ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-column{display:contents!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout{grid-template-areas:"char list detail" "char load detail" "char ground detail"!important;grid-template-rows:auto auto 1fr!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list{grid-area:list}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-toolbar{grid-area:load}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character{grid-area:char}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail{grid-area:detail;border-left:1px solid var(--g-edge)!important;padding-left:18px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-ground-panel{grid-area:ground;align-self:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-list.ui-panel>.workshop-row{width:auto!important;min-width:0!important;max-width:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-step-text,html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps .journal-count{font-size:22px!important;line-height:1.1!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button{width:84px!important;flex:0 0 84px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-list.ui-panel{justify-items:stretch!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-list.ui-panel>.workshop-row[id]{width:100%!important;height:auto!important;max-height:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button[type][type]{width:84px!important;flex:0 0 84px!important;padding:6px 0!important;text-align:center!important;border:1px solid var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button[type][type]+button{border-left:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button[type][type][aria-pressed=true]{background:var(--g-tile-hi)!important;color:var(--g-gold)!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell:not(.local-map-open) #travel-worldmap-panel>.group-title{display:none!important}

/* ================= Round 3 (owner feedback) ================= */

/* Tabs: every section gets the same width. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{flex:0 0 74px!important;width:74px!important;min-width:0!important;padding-inline:2px!important;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* Inventory: character stands on the turn arrows, slots centred with clear icons. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character{grid-template-rows:auto 60px 60px auto auto!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-heading{justify-content:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-turn{grid-column:2;grid-row:5;display:flex;justify-content:center;gap:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .inventory-character-cloak{grid-column:2;grid-row:6;justify-self:center;width:auto!important;min-height:0!important;margin-top:4px;padding:3px 10px!important;background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-gold)!important;font:400 17px/1 var(--g-pixel)!important;white-space:nowrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .inventory-character-switch{grid-column:2;grid-row:7;justify-self:center;width:auto!important;min-height:0!important;margin-top:4px;padding:3px 10px!important;background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-gold)!important;font:400 17px/1 var(--g-pixel)!important;white-space:nowrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .inventory-character-cloak[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .inventory-character-switch[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .inventory-character-cloak:hover:not(:disabled){background:var(--g-tile-hi)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .inventory-character-switch:hover:not(:disabled){background:var(--g-tile-hi)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character canvas{grid-row:2/5!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button{display:flex!important;align-items:center!important;justify-content:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button .inventory-gear-icon{position:absolute;inset:6px;display:flex;align-items:center;justify-content:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button.is-empty .inventory-gear-icon{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button.is-empty::before{width:26px!important;height:26px!important;margin:auto;background:#4b6346!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-weight{margin:2px 0 0!important;font:400 19px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-uses-label{display:flex;align-items:center;gap:10px;margin:14px 0 6px;font:400 17px/1 var(--g-pixel)!important;color:var(--g-muted)!important;text-transform:uppercase;letter-spacing:.06em}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-uses-label::after{content:"";flex:1;height:1px;background:var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-uses{display:flex;flex-wrap:wrap;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-use{display:inline-flex;align-items:center;gap:6px;padding:2px 8px 2px 2px;background:#142017;font:400 18px/1 var(--g-pixel)!important;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-use span{font:inherit!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-use .bl-item-use-icon{width:24px!important;height:24px!important;flex:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-use .ui-pix{width:20px;height:20px;margin:2px;color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail{display:flex!important;flex-direction:column;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-icon{width:88px!important;height:88px!important;background:var(--g-tile);border:1px solid var(--g-tile-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions{margin-top:12px;display:flex;flex-wrap:wrap;gap:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-tool-part-control{display:grid;gap:4px;width:100%;min-width:0;grid-column:1/-1;font:400 17px/1.1 var(--g-pixel);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-tool-part-control select{width:100%;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-tool-part-benefit{font:400 18px/1.1 var(--g-pixel);color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list.is-fixed-grid .ui-empty-slot.is-drop-target,html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list.is-fixed-grid .bl-item-slot.is-drop-target{outline:2px dashed var(--g-gold)!important;outline-offset:-2px}

/* Crafting: counts sit beside their labels; have / need is coloured. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .crafting-filter{gap:24px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .crafting-filter b{margin-left:4px!important;font:inherit!important;color:var(--g-dim)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .crafting-filter button[aria-pressed=true] b{color:var(--g-gold-deep)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .recipe-materials li{display:grid!important;grid-template-columns:28px 1fr auto;align-items:center;gap:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .recipe-material-name{font:400 20px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .recipe-material-count strong{font:400 22px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .recipe-materials li.is-enough .recipe-material-count strong{color:var(--g-leaf)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .recipe-materials li.is-short .recipe-material-count strong{color:var(--g-warn)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-alt{display:flex!important;align-items:center;gap:6px;flex-wrap:wrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-alt-station{display:inline-flex;align-items:center;justify-content:center;min-width:28px;height:28px;padding:0 4px;background:#142017;font:400 17px/1 var(--g-pixel)!important;color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-alt-station .frontier-item-icon,html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-alt-chip .frontier-item-icon{width:24px!important;height:24px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-alt-chip{display:inline-flex;align-items:center;gap:3px;font:400 20px/1 var(--g-pixel)!important;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-alt-arrow{font:400 22px/1 var(--g-pixel)!important;color:var(--g-gold)}

/* Map: toggle, then zoom, one row of matching controls; bigger map, small key. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;gap:0 10px!important;margin-bottom:10px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button[type][type]{height:36px;padding:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs>button[type][type]+button{margin-left:-10px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs :is(#travel-map-toolbar,#local-map-controls){display:flex!important;align-items:center;gap:0!important;margin:0!important;padding:0!important;border:0!important;background:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell.local-map-open #map-mode-tabs #travel-map-toolbar,html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell:not(.local-map-open) #map-mode-tabs #local-map-controls{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs :is(#travel-map-toolbar,#local-map-controls) button{height:36px!important;min-width:36px!important;min-height:0!important;padding:0 10px!important;background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-ink)!important;font:400 20px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs :is(#travel-map-toolbar,#local-map-controls) button+button{border-left:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-map-zoom-value{margin-left:10px;font:400 18px/1 var(--g-pixel)!important;color:var(--g-dim)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell.local-map-open #travel-worldmap-panel{grid-template-columns:minmax(0,1fr) 140px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #local-map-legend{gap:6px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #local-map-legend .map-key-item{font-size:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #local-map-legend .map-key-item span,html body #game-menu#game-menu#game-menu#game-menu.ui-game #local-map-legend .map-key-item strong{font:400 17px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell:not(.local-map-open){grid-template-columns:minmax(0,1fr) 190px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-zone-card{min-height:0!important;padding:0!important;border:0!important;background:none!important;display:flex;flex-direction:column;gap:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-side-panel{display:flex!important;flex-direction:column;gap:16px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-map-legend .group-title{font:400 17px/1 var(--g-pixel)!important;color:var(--g-muted)!important;text-transform:uppercase;letter-spacing:.06em}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages:has(#travel-modal:not([hidden])){padding:14px 16px 16px!important}

/* Journal: All as a word, reward and Pin on the title row, chips for materials. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories .journal-all{width:auto!important;padding:0 8px!important;font:400 20px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head{display:flex!important;align-items:center;gap:12px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head h3{flex:1;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head .frontier-reward{display:flex!important;flex-direction:row!important;align-items:center!important;gap:14px!important;margin-left:auto}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-materials{grid-column:2/4;list-style:none;margin:2px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-materials li{display:inline-flex;align-items:center;gap:6px;padding:2px 8px 2px 2px;background:#142017;font:400 18px/1 var(--g-pixel)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-materials .frontier-item-icon{width:22px!important;height:22px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discoveries{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:6px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discoveries>div{display:flex;flex-wrap:wrap;gap:4px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discovery-seal{width:24px!important;height:24px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discovery-seal svg{width:14px;height:14px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-side{min-width:0;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-heading{display:contents!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-heading strong{grid-column:1/-1;grid-row:1;justify-self:center}

/* ---------- Round 3 fixes ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] kbd{right:8px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-meals{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell.local-map-open #travel-side-panel{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell.local-map-open{grid-template-columns:1fr!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell.local-map-open #travel-worldmap{min-height:0!important;height:auto!important;flex:1!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #travel-shell.local-map-open #travel-worldmap-panel{height:100%!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head .frontier-reward{flex:none!important;flex-wrap:nowrap!important;align-self:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-detail-actions .bl-item-quantity-control{display:flex;gap:6px}

/* ---------- Placement dock: compact, game styled ---------- */
html body #build-mode-dock{font-synthesis:none;background:var(--g-panel)!important;border:1px solid var(--g-gold-deep)!important;border-radius:0!important;box-shadow:0 10px 40px #000a!important;padding:10px 14px!important;gap:10px 14px!important;max-width:min(860px,calc(100vw - 24px))}
html body #build-mode-dock *{border-radius:0!important}
html body #build-mode-dock #build-mode-label{font:400 26px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #build-mode-dock #build-mode-status{font:400 19px/1.15 var(--g-pixel)!important;color:var(--g-gold)!important}
html body #build-mode-dock #build-mode-cost{font:400 19px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #build-mode-dock #build-mode-controls{display:flex!important;flex-wrap:wrap;gap:4px 12px}
html body #build-mode-dock #build-mode-controls span{font:400 17px/1 var(--g-pixel)!important;color:var(--g-muted)!important;background:none!important;border:0!important;padding:0!important}
html body #build-mode-dock kbd{font:400 16px/1 var(--g-pixel)!important;color:var(--g-ink)!important;background:none!important;border:1px solid var(--g-edge)!important;padding:1px 4px!important;box-shadow:none!important}
html body #build-mode-dock :is(button,select){min-height:34px!important;font:400 19px/1 var(--g-pixel)!important;background:#16231a!important;color:var(--g-ink)!important;border:1px solid var(--g-edge)!important;box-shadow:none!important;padding:4px 10px!important}
html body #build-mode-dock button:hover,html body #build-mode-dock select:hover{border-color:var(--g-gold)!important}
html body #build-mode-dock button:disabled{opacity:.45;cursor:not-allowed!important;border-color:var(--g-edge)!important}
html body #build-mode-dock #build-mode-done{background:var(--g-gold)!important;color:#16200f!important;border-color:var(--g-gold)!important}
html body #build-mode-dock label{font:400 16px/1 var(--g-pixel)!important;color:var(--g-muted)!important;text-transform:uppercase;letter-spacing:.06em}
html body #build-mode-dock #build-mode-icon{background:var(--g-tile)!important;border:1px solid var(--g-tile-edge)!important}

/* Tabs: icon and label centred in every tab. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{justify-content:center!important;grid-template-columns:100%!important;text-align:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{justify-self:center}

/* The dragged item is the same square tile, lifted (#240). It lives on the
   body, outside the menu, so it is styled here directly. */
html body article.bl-item-slot.bl-item-drag-image.bl-item-drag-image{display:grid!important;place-items:center;padding:0!important;border-radius:0!important;background:#2c4130!important;border:2px solid #e0c27a!important;outline:0!important;transform:scale(1.08)!important;box-shadow:0 10px 24px #000b!important;opacity:.95}
html body .bl-item-drag-image.bl-item-drag-image *{border-radius:0!important}
html body .bl-item-drag-image.bl-item-drag-image :is(.bl-item-slot-label,.bl-item-name,small,h3,h4,p){display:none!important}
html body .bl-item-drag-image.bl-item-drag-image .bl-item-icon{width:76%!important;height:76%!important}
html body .bl-item-drag-image.bl-item-drag-image .bl-item-qty{position:absolute!important;right:4px!important;bottom:2px!important;top:auto!important;left:auto!important;background:none!important;border:0!important;padding:0!important;min-width:0!important;font:400 20px/1 "Asciilands Pixel","VT323",monospace!important;color:#e8e2c8!important;text-shadow:1px 1px 0 #000}
html body article.bl-item-slot.bl-item-drag-image.bl-item-drag-image{min-height:0!important;max-height:none!important;height:auto!important;aspect-ratio:1!important}

/* ================= Round 4 ================= */
/* No frame corners: they read as resize handles. A plain gold frame. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game::before,html body #game-menu#game-menu#game-menu#game-menu.ui-game::after,html body #game-menu#game-menu#game-menu#game-menu.ui-game>footer::before,html body #game-menu#game-menu#game-menu#game-menu.ui-game>footer::after{content:none!important;display:none!important}
/* Tabs start flush in the corner, with faint dividers between them. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .game-menu-heading{padding-left:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{border-right:1px solid #ffffff12!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]:first-child{border-left:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section].is-active{background:#ffffff08!important}

/* Item details: actions stay at the bottom whatever the Used for list holds. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail{align-self:stretch!important;display:flex!important;flex-direction:column;min-height:0;max-height:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail{flex:1;min-height:0;display:flex!important;flex-direction:column}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-body{flex:1;min-height:0;overflow:auto}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions{margin-top:auto!important;padding-top:12px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-use.is-more{color:var(--g-muted);padding:2px 8px}

/* Placement dock: pickers, then piece and actions, then a thin hint row. */
html body #build-mode-dock.ui-game-dock{display:grid!important;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"quick quick" "main actions" "hints hints";align-items:center;gap:10px 18px!important;width:min(860px,calc(100vw - 24px))!important;padding:12px 16px 10px!important}
html body #build-mode-dock.ui-game-dock #build-mode-quick{grid-area:quick}
html body #build-mode-dock.ui-game-dock .ui-dock-main{grid-area:main;display:flex;align-items:center;gap:12px;min-width:0}
html body #build-mode-dock.ui-game-dock #build-mode-icon{flex:none;width:48px;height:48px}
html body #build-mode-dock.ui-game-dock #build-mode-copy{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"label cost" "status status";align-items:baseline;gap:4px 12px;min-width:0}
html body #build-mode-dock.ui-game-dock #build-mode-label{grid-area:label}
html body #build-mode-dock.ui-game-dock #build-mode-cost{grid-area:cost}
html body #build-mode-dock.ui-game-dock #build-mode-status{grid-area:status;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #build-mode-dock.ui-game-dock .ui-dock-actions{grid-area:actions;display:flex;align-items:center;gap:6px;flex-wrap:nowrap}
html body #build-mode-dock.ui-game-dock .ui-dock-actions button{min-height:32px!important;padding:3px 10px!important;font-size:18px!important}
html body #build-mode-dock.ui-game-dock #build-mode-done{padding:3px 16px!important}
html body #build-mode-dock.ui-game-dock #build-mode-controls{grid-area:hints;display:flex!important;justify-content:center;gap:4px 18px;padding-top:8px;border-top:1px solid var(--g-edge)}
@media(max-width:720px){html body #build-mode-dock.ui-game-dock{grid-template-columns:1fr;grid-template-areas:"quick" "main" "actions" "hints"}html body #build-mode-dock.ui-game-dock .ui-dock-actions{flex-wrap:wrap}}
html body #build-mode-dock.ui-game-dock .ui-dock-main{flex-direction:row!important;flex-wrap:nowrap!important}
html body #build-mode-dock.ui-game-dock #build-mode-copy{display:grid!important;flex:1 1 auto!important;width:auto!important;max-width:none!important}
html body #build-mode-dock.ui-game-dock :is(#build-mode-label,#build-mode-cost){white-space:nowrap!important}
html body #build-mode-dock.ui-game-dock #build-mode-controls{flex-direction:row!important;flex-wrap:wrap!important;align-items:center!important;width:auto!important;max-width:none!important}
html body #build-mode-dock.ui-game-dock #build-mode-controls span{display:inline-flex!important;align-items:center;gap:5px;white-space:nowrap}

/* ================= Round 5 ================= */
/* The dock follows its hidden state again (the grid rule overrode it). */
html body #build-mode-dock.ui-game-dock[hidden]{display:none!important}
/* Above the hotbar, and the status may wrap to two lines instead of cutting off. */
html body #build-mode-dock.ui-game-dock{bottom:104px!important}
html body #build-mode-dock.ui-game-dock #build-mode-status{white-space:normal!important;overflow:hidden!important;text-overflow:clip!important;display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;max-width:420px}
/* Menu scrollbars: thin and in the frame's colours, not a thick bright bar. */
html body #game-menu.ui-game,html body #game-menu.ui-game *{scrollbar-width:thin;scrollbar-color:#3a4d36 transparent}
/* Clicking tiles never selects text or starts a browser image drag. */
html body #game-menu.ui-game :is(#game-menu-pages,#game-menu-nav,.game-menu-heading){user-select:none;-webkit-user-select:none}
html body #game-menu.ui-game :is(input,textarea,[contenteditable],.help-card p,.help-card li){user-select:text;-webkit-user-select:text}
html body #game-menu.ui-game :is(img,canvas,svg){-webkit-user-drag:none;user-drag:none}
/* Item details: fixed height text block, one use per row, so Split and Drop stay put. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-body{flex:none!important;height:300px!important;overflow:hidden!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-uses{flex-direction:column!important;align-items:flex-start!important;flex-wrap:nowrap!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-detail-description{display:-webkit-box!important;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions{margin-top:0!important}
/* Used for: room for five rows is always kept, nothing is clipped; the
   full list grows only when opened. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-body{height:auto!important;overflow:visible!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-uses{min-height:calc(5 * 30px + 4 * 6px);gap:6px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-use{height:30px;box-sizing:border-box}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-detail-description{min-height:2.6em}
html body #game-menu#game-menu#game-menu#game-menu.ui-game button.bl-item-use.is-more{min-height:0!important;height:30px;padding:0 10px!important;background:none!important;border:1px dashed var(--g-edge)!important;color:var(--g-gold)!important;font:400 18px/1 var(--g-pixel)!important;cursor:pointer}
html body #game-menu#game-menu#game-menu#game-menu.ui-game button.bl-item-use.is-more:hover{border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-uses-none{font:400 18px/30px var(--g-pixel);color:var(--g-dim)}
/* Item tiles are square everywhere, including the crafting detail. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-selection .bl-item-slot{width:96px!important;height:96px!important;min-height:0!important;max-height:96px!important;aspect-ratio:1!important;padding:0!important;box-sizing:border-box!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(.bl-item-slot,.ui-slot){aspect-ratio:1}
/* Construction art stays inside its square tile (Build detail and cards). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-detail .build-detail-art{width:110px!important;height:110px!important;aspect-ratio:1;padding:10px;box-sizing:border-box;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#build-detail .build-detail-art,.build-card-icon)>*{width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;display:block}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card-icon{overflow:hidden}
/* Pack: a larger character so equipment and looks are readable. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout{grid-template-columns:270px minmax(0,1fr) 240px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character{grid-template-columns:56px 1fr 56px!important;grid-template-rows:auto 88px 88px 88px auto!important;gap:10px 8px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character canvas{grid-row:2/5!important;max-width:150px!important;width:150px!important;height:auto!important;align-self:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear button{width:56px!important;height:56px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=head]{grid-row:2!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=body]{grid-row:3!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=hand]{grid-row:2!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .inventory-character-gear [data-equipment-slot=offhand]{grid-row:3!important}
/* Item description and tips: two lines, click to read in full. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-about{position:relative;cursor:pointer;max-height:2.9em;overflow:hidden;font:12px/1.45 var(--g-mono);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-about :is(.bl-item-detail-description,.bl-item-use-tip){display:block!important;-webkit-line-clamp:unset!important;margin:0 0 4px!important;font:inherit!important;color:inherit!important;min-height:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-about:not(.is-open)::after{content:"more";position:absolute;right:0;bottom:0;padding-left:18px;background:linear-gradient(90deg,transparent,#0f1a12 14px);font:400 16px/1.45em var(--g-pixel);color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-about.is-open{max-height:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-about:focus-visible{outline:1px solid var(--g-gold);outline-offset:2px}
/* Stack the Pack's columns before the character and detail squeeze out its grid. */
@media(max-width:1100px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout{grid-template-columns:minmax(270px,1fr) 240px!important;grid-template-areas:"char detail" "list detail" "load detail" "ground detail"!important;grid-template-rows:auto auto auto auto!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list{grid-template-columns:repeat(5,minmax(0,1fr))!important}
}
@media(max-width:640px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout{grid-template-columns:minmax(0,1fr) minmax(0,.95fr)!important;grid-template-areas:"char char" "list detail" "load detail" "ground detail"!important;grid-template-rows:repeat(4,auto)!important;column-gap:10px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail{border-left:0!important;padding-left:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}

/* The selected item stays beside the Pack while its rows scroll past. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail{position:sticky;top:0;align-self:start!important;max-height:var(--pack-detail-height,calc(100dvh - 160px));overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail{flex:none}
/* Fit every icon to its tile, reserving a bottom strip for stack counts. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-slot .bl-item-icon{position:absolute;inset:5px 5px 13px;width:auto!important;height:auto!important;min-width:0;min-height:0;display:grid;place-items:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-item-slot .bl-item-icon>:is(img,svg,canvas){position:absolute;inset:0;width:100%!important;height:100%!important;max-width:100%;max-height:100%;object-fit:contain;display:block}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-icon{padding:6px;box-sizing:border-box;flex-shrink:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-icon .bl-item-pixel-art{width:100%;height:100%;object-fit:contain}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-uses{min-height:0}
@media(max-width:640px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-name{font-size:23px!important;overflow-wrap:anywhere}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions{flex-direction:column}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions>*{max-width:100%;box-sizing:border-box}
}

/* ---------- Admin (#267): players, tools and accounts ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel{display:flex;flex-direction:column;gap:14px;min-height:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-tabs{border-bottom:1px solid var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-counts{display:flex;flex-wrap:wrap;gap:6px 28px;margin:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-counts div{display:flex;align-items:baseline;gap:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-counts dt{font:400 18px/1 var(--g-pixel)!important;color:var(--g-muted)!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-counts dd{margin:0!important;font:400 24px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:10px 24px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-search{flex:1 1 240px;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-split{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:20px;align-items:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table-wrap{overflow:auto;max-height:min(56vh,560px)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table{width:100%;table-layout:fixed;border-collapse:collapse;font:13px/1.35 var(--g-mono);color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th{position:sticky;top:0;background:#101a12;text-align:left;border-bottom:1px solid var(--g-edge);padding:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th button{all:unset;cursor:pointer;display:block!important;width:auto!important;min-width:0!important;min-height:0!important;padding:6px 10px 6px 0!important;margin:0!important;background:none!important;border:0!important;box-shadow:none!important;font:400 18px/1 var(--g-pixel)!important;color:var(--g-muted)!important;white-space:nowrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th button:hover,html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th[aria-sort=ascending] button,html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th[aria-sort=descending] button{color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th[aria-sort=ascending] button::after{content:" ^"}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th[aria-sort=descending] button::after{content:" v"}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td{padding:6px 10px 6px 0;border-bottom:1px solid #ffffff10;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th{overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th button{overflow:hidden;text-overflow:ellipsis}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(1),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(1){width:22px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(2),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(2){width:19%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(3),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(3){width:17%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(4),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(4){width:24%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(5),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(5){width:15%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(6),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(6){width:12%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(7),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(7){width:13%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table tbody tr{cursor:pointer}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table tbody tr:hover,#admin-panel .admin-table tbody tr:focus-visible{background:var(--g-tile)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table tbody tr.is-selected{background:var(--g-tile-hi);box-shadow:inset 3px 0 var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-dot-col{width:18px;padding-left:6px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-dot{display:inline-block;width:8px;height:8px;background:var(--g-dim)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-dot.is-online{background:var(--g-leaf);box-shadow:0 0 6px var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-dot.is-unknown{background:none;border:1px solid var(--g-dim)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-role{margin-left:8px;padding:0 4px;border:1px solid var(--g-gold-deep);color:var(--g-gold);font:400 14px/1 var(--g-pixel)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-detail{border-left:1px solid var(--g-edge);padding-left:20px;min-height:200px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-detail h3{margin:0 0 10px;font:400 26px/1 var(--g-pixel);color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-facts{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;margin:0 0 14px;font:13px/1.4 var(--g-mono)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-facts dt{color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-facts dd{margin:0;color:var(--g-ink);overflow-wrap:anywhere}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-actions{display:flex;flex-wrap:wrap;gap:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-actions button.admin-primary{background:var(--g-gold)!important;color:#1b1608!important;border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-actions button.admin-danger{color:var(--g-warn)!important;border-color:var(--g-warn)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-note,#admin-panel .admin-empty{margin:8px 0 0;color:var(--g-muted);font:13px/1.4 var(--g-mono)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-pages{display:flex;gap:8px;margin-top:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-tools{list-style:none;margin:0;padding:0;max-width:640px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-tool{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;border-bottom:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-tool-copy{display:flex;flex-direction:column;gap:2px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-tool-copy strong{font:400 21px/1 var(--g-pixel);color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-tool-copy small{font:12px/1.4 var(--g-mono);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-switch{display:inline-flex!important;align-items:center;gap:8px;min-width:0!important;padding:4px 6px!important;background:none!important;border:0!important;box-shadow:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-switch-track{position:relative;width:34px;height:16px;border:1px solid var(--g-edge);background:#0c140e}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-switch-track::after{content:"";position:absolute;top:2px;left:2px;width:10px;height:10px;background:var(--g-dim)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-switch[aria-checked=true] .admin-switch-track{border-color:var(--g-gold);background:#2a240f}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-switch[aria-checked=true] .admin-switch-track::after{left:20px;background:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-switch-label{font:400 18px/1 var(--g-pixel);color:var(--g-muted);width:28px;text-align:left}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-switch[aria-checked=true] .admin-switch-label{color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel section[data-view=accounts] #account-admin-panel{border:0!important;background:none!important;padding:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel section[data-view=accounts] #account-admin-panel>h3{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .ui-visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
@media (max-width:760px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-split{grid-template-columns:1fr}html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-detail{border-left:0;border-top:1px solid var(--g-edge);padding:14px 0 0;min-height:0}html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(3),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(3){display:none}html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(5),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(5){display:none}html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table td:nth-child(6),html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .admin-table th:nth-child(6){display:none}}
#admin-tools-chip{position:fixed;left:50%;top:6px;transform:translateX(-50%);z-index:62;padding:2px 10px;border:1px solid #e0c27a;background:#2a1f0ae6;color:#ffd76a;font:400 17px/1.1 "Asciilands Pixel","VT323",Consolas,monospace;letter-spacing:1px;pointer-events:none}
#admin-tools-chip[hidden]{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord .ui-founders-left{display:flex!important;align-items:center;gap:4px;font:400 15px/1 var(--g-pixel)!important;color:#b9e08a!important;white-space:nowrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord .ui-founders-left[hidden]{display:none!important}
.founder-cloak{width:14px;height:14px;flex:none;image-rendering:pixelated}

/* Vitals under the character: health, stamina, hunger, and mana once magic is known. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .bl-pack-condition{grid-column:1/-1;grid-row:8;display:flex!important;flex-direction:column;gap:5px;width:100%;margin-top:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals{display:flex!important;flex-direction:column;gap:5px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar{position:relative;height:18px;background:#111b14;border:1px solid var(--g-edge);border-radius:0}
/* Shared compact type; the slight optical lift keeps pixel-font descenders inside both bars. */
html body #hud-root .hud-bar .label,
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar .label{position:absolute;inset:0;display:flex;align-items:center;justify-content:space-between;padding:0 6px 2px!important;font:400 14px/14px var(--g-pixel)!important;letter-spacing:0!important;text-transform:none!important;text-shadow:none!important;color:var(--g-ink)!important}
html body #hud-root .hud-bar .label span,
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar .label span{font:inherit!important;letter-spacing:inherit!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .bl-pack-condition,html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .bl-pack-vitals{width:100%;justify-self:stretch;align-self:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar{display:block!important;width:100%!important;min-width:0;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar .fill{position:absolute;left:0;top:0;bottom:0;height:auto!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar.health .fill{background:#9c3b33}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar.stamina .fill{background:#5e7d3a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar.food .fill{background:#a8893f}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-vitals .hud-bar.mana .fill{background:#3e5f9c}

/* ---------- Pet page (#237): portrait, icon bars, bond pips, ability tiles ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel{display:grid;grid-template-columns:minmax(220px,300px) minmax(0,1fr);gap:28px;align-items:start;max-width:960px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel button{min-height:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-hero{display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-portrait{width:100%;aspect-ratio:4/3;display:grid;place-items:center;background:radial-gradient(ellipse at 50% 70%,#2a3a24 0,#141f16 70%);border-bottom:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-portrait img{width:82%;height:82%;object-fit:contain;image-rendering:pixelated}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-rename{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:4px 10px;margin:4px 0 0;width:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-title{margin:0!important;font:400 34px/1 var(--g-pixel)!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-rename-toggle{padding:2px 6px!important;background:none!important;border:0!important;box-shadow:none!important;color:var(--g-muted)!important;font:400 17px/1 var(--g-pixel)!important;text-decoration:underline}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-rename-toggle:hover{color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-rename{display:flex;gap:6px;width:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-rename[hidden]{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-rename input{flex:1;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-message{flex-basis:100%;margin:0;min-height:0;font:12px/1.4 var(--g-mono);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-message:empty{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-kind{margin:0;font:400 19px/1.1 var(--g-pixel);color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-where{margin:0;font:12px/1.4 var(--g-mono);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-feed{display:inline-flex!important;align-items:center;gap:6px;background:var(--g-gold)!important;color:#1b1608!important;border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-feed:disabled{background:#22301f!important;color:var(--g-dim)!important;border-color:var(--g-edge)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-feed img{width:22px;height:22px;image-rendering:pixelated}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-feed b{font:inherit;opacity:.7}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-side{display:flex;flex-direction:column;gap:18px;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-care{display:flex;flex-direction:column;gap:10px;padding-bottom:16px;border-bottom:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar{display:flex;align-items:center;gap:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-care-icon{width:20px;height:20px;flex:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar[data-care=health] .pet-care-icon{color:#e0706a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar[data-care=hunger] .pet-care-icon{color:#d9a35a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar[data-care=mood] .pet-care-icon{color:#e0c27a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-cells{display:grid;grid-template-columns:repeat(10,1fr);gap:3px;flex:1;max-width:320px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-cells i{height:12px;background:#0c140e;border:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar[data-care=health] .pet-cells i.is-on{background:#c95c55;border-color:#e0706a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar[data-care=hunger] .pet-cells i.is-on{background:#b5823e;border-color:#d9a35a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar[data-care=mood] .pet-cells i.is-on{background:#b89a4e;border-color:#e0c27a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar.is-low .pet-care-icon{animation:pet-low 1.6s ease-in-out infinite}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bond{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;padding-bottom:16px;border-bottom:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-label{font:400 22px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-pips{display:flex;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-pip{position:relative;width:22px;height:22px;transform:rotate(45deg) scale(.72);background:#0c140e;border:2px solid var(--g-edge);overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-pip::after{content:"";position:absolute;left:0;bottom:0;width:100%;height:var(--fill,0%);background:#5d6a3a}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-pip.is-on{background:var(--g-gold);border-color:var(--g-gold);box-shadow:0 0 8px #e0c27a66}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-pip.is-on::after{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-next{display:inline-flex;align-items:center;gap:6px;font:400 20px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-next[hidden]{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-next .pet-pix{width:18px;height:18px;color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-abilities{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability{display:flex!important;flex-direction:column;align-items:center;gap:4px;padding:10px 4px 8px!important;background:var(--g-tile)!important;border:1px solid var(--g-tile-edge)!important;color:var(--g-dim)!important;box-shadow:none!important;opacity:1!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability .pet-ability-icon{width:30px;height:30px;display:grid;place-items:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability .pet-pix{width:28px;height:28px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability strong{font:400 19px/1 var(--g-pixel)!important;color:inherit}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability small{font:12px/1.2 var(--g-mono);color:var(--g-dim)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability.is-unlocked{color:var(--g-ink)!important;border-color:var(--g-gold-deep)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability.is-unlocked .pet-ability-icon{color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability.is-unlocked small{color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability.is-unlocked:not(:disabled):hover{background:var(--g-tile-hi)!important;border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability.is-unlocked:disabled{color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-ability.is-on{border-color:var(--g-gold)!important;box-shadow:inset 0 0 0 1px var(--g-gold),0 0 10px #e0c27a44!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-fetch-lesson{align-self:flex-start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-fetch-lesson[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-ability-message{margin:0;min-height:18px;font:13px/1.4 var(--g-mono);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag{display:flex;flex-direction:column;gap:8px;padding:12px 0;border-top:1px solid var(--g-edge);border-bottom:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag[hidden]{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag-detail{margin:0;font:400 18px/1 var(--g-pixel);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag-contents{display:flex;flex-wrap:wrap;gap:6px;margin:0;padding:0;list-style:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag-contents li{position:relative;width:44px;height:44px;display:grid;place-items:center;background:var(--g-tile);border:1px solid var(--g-tile-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag-contents img{width:32px;height:32px;image-rendering:pixelated}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag-contents b{position:absolute;right:2px;bottom:1px;font:400 15px/1 var(--g-pixel);color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag form{display:flex;gap:6px;margin:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag select{flex:1;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag input{width:72px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-bag-message{margin:0;font:12px/1.4 var(--g-mono);color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-details summary{cursor:pointer;font:400 20px/1 var(--g-pixel)!important;color:var(--g-muted)!important;list-style:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-details summary::-webkit-details-marker{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-details summary::before{content:"+ "}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-details[open] summary::before{content:"- "}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-details summary:hover{color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-stats{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:10px 0 0;font:13px/1.4 var(--g-mono)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-stats dt{color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .companion-stats dd{margin:0;color:var(--g-ink)}
@keyframes pet-low{50%{opacity:.45}}
@media (prefers-reduced-motion:reduce){html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-bar.is-low .pet-care-icon{animation:none}}
@media (max-width:760px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel{grid-template-columns:1fr;gap:18px}html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-portrait{aspect-ratio:16/9}html body #game-menu#game-menu#game-menu#game-menu.ui-game #companion-panel .pet-abilities{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Station names occupy their own row, outside the icon. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-slot.bl-item-slot{aspect-ratio:auto;min-height:112px;grid-template-rows:64px auto;padding-bottom:20px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-slot .bl-item-icon{position:relative;inset:auto;width:64px!important;height:64px!important;justify-self:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-slot .bl-item-slot-label{position:relative;white-space:normal;overflow-wrap:anywhere;line-height:1.15;color:var(--g-ink,#e8e2c8);z-index:1}

/* Admin Population tab: players online over time on every realm. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .population-summary{margin:10px 0 4px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .population-wrap{position:relative;margin-top:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #admin-panel .population-chart{display:block;width:100%;height:auto;background:rgba(0,0,0,.18);border:1px solid var(--g-edge)}
#admin-panel .population-grid{stroke:rgba(255,255,255,.08);stroke-width:1}
#admin-panel .population-axis{fill:var(--g-muted,#9aa596);font:13px var(--g-pixel,monospace)}
#admin-panel .population-line{fill:none;stroke-width:2;stroke-linejoin:round}
#admin-panel .population-total{stroke:var(--g-ink,#e6e1cf);stroke-dasharray:5 5;opacity:.55}
#admin-panel .population-cursor{stroke:rgba(255,255,255,.35);stroke-width:1}
#admin-panel .population-tip{position:absolute;top:8px;display:grid;gap:2px;padding:6px 8px;background:#101712f2;border:1px solid var(--g-edge);color:var(--g-ink,#e6e1cf);font:15px var(--g-pixel,monospace);pointer-events:none;min-width:150px}

/* A long cost wraps inside its column rather than running under the action buttons. */
html body #build-mode-dock.ui-game-dock #build-mode-cost{white-space:normal!important;min-width:0;overflow-wrap:anywhere}
html body #build-mode-dock.ui-game-dock .ui-dock-main,html body #build-mode-dock.ui-game-dock #build-mode-copy{min-width:0!important;overflow:hidden}
html body #build-mode-dock.ui-game-dock:has(#build-mode-upgrade:not([hidden])){grid-template-columns:minmax(0,1fr)!important;grid-template-areas:"quick" "main" "actions" "hints"}
html body #build-mode-dock.ui-game-dock:has(#build-mode-upgrade:not([hidden])) .ui-dock-actions{flex-wrap:wrap}

/* ---------- Hotbar editor: the in-world bar's nine slots, under the pack grid ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout{grid-template-areas:"char list detail" "char hotbar detail" "char load detail" "char ground detail"!important;grid-template-rows:auto auto auto 1fr!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-hotbar-editor{grid-area:hotbar;display:grid;gap:6px;min-width:0}
.bl-hotbar-editor-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap}
.bl-hotbar-editor-title{font:400 19px/1 var(--g-pixel,monospace);color:var(--g-gold,#d8c27a)}
.bl-hotbar-editor-slots{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px}
html body .bl-hotbar-editor .bl-hotbar-editor-slot{position:relative;aspect-ratio:1;min-width:0;min-height:0!important;padding:4px!important;display:grid;place-items:center;background:var(--g-tile,#213026)!important;border:1px solid var(--g-tile-edge,#44513f)!important;border-radius:3px;cursor:grab;touch-action:none}
html body .bl-hotbar-editor .bl-hotbar-editor-slot.is-empty{background:#111b14!important;border:1px dashed #3a4d36!important;cursor:default}
html body .bl-hotbar-editor .bl-hotbar-editor-slot.is-equipped{border:2px solid #c1cf91!important}
html body .bl-hotbar-editor .bl-hotbar-editor-slot.is-drop-target{border:2px solid var(--g-gold,#d8c27a)!important;background:#2c3a26!important}
html body .bl-hotbar-editor .bl-hotbar-editor-slot.is-dragging{opacity:.35}
.bl-hotbar-editor-slot kbd{position:absolute;left:3px;top:1px;border:0;background:none;padding:0;font:11px sans-serif;color:#b7c1ae}
.bl-hotbar-editor-slot .bl-item-icon{width:70%;height:70%}
.bl-hotbar-editor-slot .bl-item-icon img{width:100%;height:100%;object-fit:contain;image-rendering:pixelated}
/* Pack tiles show the key they sit on. */
.bl-item-slot .bl-item-hotbar-key{position:absolute;left:3px;top:2px;z-index:1;padding:0 3px;border:1px solid #52634a;border-radius:2px;background:#131b17e8;font:10px/1.3 sans-serif;color:#d9e0c9;pointer-events:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-hotbar-editor-slots{display:grid!important;gap:6px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-hotbar-editor-slot{aspect-ratio:1;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;margin:0!important;padding:4px!important;display:grid!important;place-items:center;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-hotbar-editor-slot kbd{position:absolute!important;left:3px;top:1px;margin:0!important;padding:0!important;border:0!important;background:none!important;box-shadow:none!important;font:11px/1 sans-serif!important;color:#b7c1ae!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-hotbar-editor-slot .bl-item-icon{width:70%!important;height:70%!important;display:grid;place-items:center}
