/* 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 .town-tabs[hidden]{display:none!important}
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,.town-tabs){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,.town-tabs 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,.town-tabs 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],#travel-map-toolbar button[aria-pressed=true],.journal-categories button[aria-pressed=true],.crafting-view-switch button[aria-pressed=true],.admin-tabs button[aria-selected=true],.town-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,.town-tabs 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}
/* Switch character, Linked accounts and Leave stay in view while Settings scrolls. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #settings-modal #settings-footer{position:sticky;bottom:-16px;z-index:2;padding-bottom:16px;background:#0f1a12!important;border-top:1px solid var(--menu-edge)!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-more-icon .frontier-item-icon{width:20px;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:not(.bl-item-pixel-art 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}
/* A recipe you can't make yet still reads at a glance, as the alchemy screens' tiles do (Nov 26). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row.is-missing .workshop-row-icon{opacity:.62;filter:grayscale(.45)}
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;align-self:center!important;justify-self:center!important;text-align:center!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 :is(#inventory-list,#inventory-container-list) .bl-item-slot{position:relative}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-list,#inventory-container-list) .bl-item-slot-label{display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:2;position:absolute;left:2px;right:2px;bottom:2px;margin:0!important;padding:0!important;font:400 13px/.9 var(--g-pixel)!important;color:var(--g-ink)!important;text-align:center;white-space:normal;overflow-wrap:normal;overflow:hidden;text-shadow:1px 1px 0 #000,-1px 1px 0 #000;pointer-events:none;z-index:2}
/* A long name keeps to two lines, so it never runs over the picture; the card shows it whole (Q, Nov 26). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-list,#inventory-container-list) .bl-item-slot-label.is-long{font-size:11px!important;-webkit-line-clamp:2}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-list,#inventory-container-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 :is(#inventory-list,#inventory-container-list) .bl-item-slot .bl-item-icon{transform:translateY(-5px)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-list,#inventory-container-list) .bl-item-slot:has(.bl-item-slot-label.is-long) .bl-item-icon{transform:translateY(-9px) scale(.85)}
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}
/* The line under a notice title is the game font too, a size under the title (Q, Nov 27: sky notices). */
html body .world-notice p{font:400 19px/1.2 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)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord:hover{color:#c3caff!important}
/* No pulse: the mask clips the glow, so an animated filter only cost a repaint every frame (0.5.7). */
/* A full tab row (Dockyard open) squeezes the tabs a little. Discord stays in view. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{flex:1 1 auto;min-width:52px;padding-left:5px!important;padding-right:5px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord{flex:none;position:sticky;right:0;z-index:1;background:linear-gradient(90deg,#0f1712cc,#0f1712 14px)!important;padding-left:14px!important}

/* ---------- 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-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 :is(#inventory-list,#inventory-container-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-carrying-status :is(.bl-carry-label,.bl-carry-value,.bl-carry-speed){white-space:nowrap;flex:none}
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}
/* A long name (Iron Smithing Hammer) wraps instead of pushing the panel past its column. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-name{white-space:normal!important;overflow-wrap:anywhere;text-overflow:clip}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail :is(.bl-item-detail,.bl-item-detail>*,.bl-item-detail-body>*){min-width:0;max-width:100%}
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}
/* Keep authored art and its backing together under browser colour overrides. */
#game-menu .build-detail-art {
  forced-color-adjust: none;
  color-scheme: only light;
}
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 #game-menu-pages:has(.journal-board){overflow:hidden!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#browserlands-react-root,.frontier-dock,.frontier-body):has(.journal-board){height:100%!important;min-height:0!important;overflow:hidden!important}
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;height:100%;min-height:0}
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;min-height:0}
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;flex:1;min-height:0;overflow-y:auto;overflow-x:hidden}
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;min-width:0;min-height:0;overflow:auto}
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}
@media(max-width:760px){
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-board{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:12px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-side{padding-right:8px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head{flex-wrap:wrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head h3{font-size:28px!important;overflow-wrap:anywhere}
}

/* ---------- 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}
/* Under the bars: play time left, the Wardrobe button right, on one row (Q, Nov 19). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-foot{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .bl-pack-foot .bl-pack-played{margin:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .bl-pack-foot .bl-pack-wardrobe{width:auto!important;min-height:0!important;margin:0;padding:3px 14px!important;background:none!important;border:1px solid var(--g-edge)!important;color:var(--g-ink)!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 .bl-pack-foot .bl-pack-wardrobe:hover{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}
/* Waypoint filters: a labelled group apart from zoom. On is filled like the World tab, off is plain, focus is an outline. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-filters,html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-pins{display:flex;align-items:center;margin-left:16px;padding-left:12px;border-left:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar .waypoint-filters-label{margin-right:8px;font:400 18px/1 var(--g-pixel)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-filters button,html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-pins button{box-shadow:none!important;color:var(--g-muted)!important;outline:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-filters button[aria-pressed=true],html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-pins button[aria-pressed=true]{background:var(--g-tile-hi)!important;color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-filters button:focus-visible,html body #game-menu#game-menu#game-menu#game-menu.ui-game #map-mode-tabs #travel-map-toolbar #waypoint-pins button:focus-visible{outline:2px solid var(--g-ink);outline-offset:-4px}
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" "status status" "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;white-space:normal!important;overflow-wrap:anywhere;line-height:1.2!important;min-width:0}
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" "status" "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 #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:visible!important;overflow-wrap:anywhere;display:block!important;max-width:420px}
/* Disassemble card (bug forum, Nov 27): the status runs the full width on its own row,
   at most three lines, and the bar never grows past a third of the screen. Clicks on
   its empty parts reach the world, so the bar never blocks the piece being aimed at. */
html body #build-mode-dock.ui-game-dock>#build-mode-status{grid-area:status;max-width:none!important;max-height:3.45em;flex-shrink:0!important;overflow:hidden!important;margin:-4px 0 0}
html body #build-mode-dock.ui-game-dock>#build-mode-status:empty{display:none!important}
html:not(.touch-mode) body #build-mode-dock.ui-game-dock{max-height:34vh!important;pointer-events:none}
html:not(.touch-mode) body #build-mode-dock.ui-game-dock :is(button,select,input,label,a,summary,kbd,#build-takedown,#build-mode-quick){pointer-events:auto}
/* 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}
/* The preview has no name line, so the icon centres in the box and the grade sits along the bottom (Q, Nov 24). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .workshop-selection .bl-item-slot .bl-item-icon{position:absolute!important;inset:10px auto auto 10px!important;width:calc(100% - 20px)!important;height:calc(100% - 20px)!important;transform:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .workshop-selection .bl-item-slot:has(>.ui-quality) .bl-item-icon{inset:6px auto auto 14px!important;width:calc(100% - 28px)!important;height:calc(100% - 28px)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .workshop-selection .bl-item-slot>.ui-quality{left:0!important;right:0;top:auto!important;bottom:5px;justify-content:center}
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,var(--page-h,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:calc(100% - 12px);height:calc(100% - 12px)}
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-frames-table{width:100%;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-frames-table th{position:sticky;top:0;background:#101a12;text-align:left;border-bottom:1px solid var(--g-edge);padding:6px 14px 6px 0;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-frames-table td{padding:6px 14px 6px 0;border-bottom:1px solid #ffffff10;white-space:nowrap}
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;right:8px;bottom:8px;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}

/* 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-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" "status" "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}
/* Equipped check and hotbar number share the top left corner: the number sits beside the check (Q, Nov 24). */
.bl-item-slot .bl-item-equipped-mark{left:3px;top:2px;width:16px;height:20px;box-sizing:border-box;z-index:1;border:1px solid #576b50;border-radius:0;background:#131b17;color:#b8e08c;font:400 11px/1 "Asciilands Pixel",VT323,Consolas,monospace}
.bl-item-slot:has(.bl-item-equipped-mark) .bl-item-hotbar-key{left:22px}
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}

html body #build-mode-dock.ui-game-dock #build-mode-copy:has(#build-mode-farm-upkeep:not([hidden])) {grid-template-areas:"label cost" "status status" "upkeep upkeep"}
html body #build-mode-dock.ui-game-dock #build-mode-farm-upkeep {grid-area:upkeep;font:400 19px/1.15 var(--g-pixel);color:var(--g-muted);overflow-wrap:anywhere}

/* ---------- Dockyard (sailing): tiers, stages, materials, work, boats ---------- */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel{display:flex;flex-direction:column;gap:18px;max-width:980px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel[hidden]{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel h3{margin:0 0 10px!important;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 #dockyard-panel .dock-empty,html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-finished{margin:0;font:400 22px/1.2 var(--g-pixel)!important;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-finished{color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-tiers{display:flex;flex-wrap:wrap;gap:4px 18px;border-bottom:1px solid var(--g-edge);padding-bottom:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-tier{padding:4px 0 6px;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 #dockyard-panel .dock-tier.is-current{color:var(--g-gold)!important;box-shadow:inset 0 -2px var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-tier.is-locked{color:var(--g-dim)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-tier.is-locked::before{content:"";display:inline-block;width:9px;height:11px;margin-right:6px;vertical-align:-1px;background:currentColor;clip-path:polygon(20% 45%,20% 25%,35% 5%,65% 5%,80% 25%,80% 45%,100% 45%,100% 100%,0 100%,0 45%,35% 45%,35% 28%,45% 18%,55% 18%,65% 28%,65% 45%)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:0;padding:0;list-style:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;text-align:center;color:var(--g-dim)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li::before{content:"";position:absolute;top:15px;left:-50%;width:100%;height:2px;background:var(--g-edge);z-index:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li:first-child::before{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li.is-done::before,html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li.is-current::before{background:var(--g-gold-deep)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages b{position:relative;z-index:1;display:grid;place-items:center;width:30px;height:30px;background:#0c140e;border:2px solid var(--g-edge);font:400 22px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages span{font:400 20px/1.1 var(--g-pixel)!important;color:inherit!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li.is-done{color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li.is-done b{border-color:var(--g-leaf);color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li.is-current{color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages li.is-current b{border-color:var(--g-gold);background:var(--g-gold);color:#1b1608;box-shadow:0 0 10px #e0c27a55}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-body{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(220px,1fr);gap:28px;align-items:start;padding-top:14px;border-top:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material{display:flex;align-items:center;gap:12px;padding:8px 0;border-bottom:1px solid #ffffff0d}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-icon{flex:none;width:40px;height:40px;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 #dockyard-panel .dock-icon :is(img,svg,canvas,.bl-item-pixel-art){max-width:32px;max-height:32px;image-rendering:pixelated}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material-copy{flex:1;min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 12px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material-copy strong{font:400 21px/1 var(--g-pixel)!important;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material-copy small{font:400 19px/1 var(--g-pixel)!important;color:var(--g-muted);text-align:right}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material-copy .dock-cells{grid-column:1/-1}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material.is-done strong,html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material.is-done small{color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-tick{width:84px;text-align:center;font:400 22px/1 var(--g-pixel)!important;color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-deliver{flex:none;width:84px;padding:6px 4px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-cells{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:2px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-cells i{height:8px;background:#0c140e;border:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-cells i.is-on{background:var(--g-gold-deep);border-color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-material.is-done .dock-cells i.is-on{background:#5f8a46;border-color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-work{display:flex;flex-direction:column;gap:10px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-work .dock-cells i{height:14px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-work-count{margin:0;font:400 26px/1 var(--g-pixel)!important;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-why{margin:0;font:13px/1.4 var(--g-mono)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-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 #dockyard-panel .dock-primary: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 #dockyard-panel .dock-primary.is-on{background:none!important;color:var(--g-gold)!important;animation:dock-working 1.4s ease-in-out infinite}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boats{padding-top:14px;border-top:1px solid var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat{display:flex;align-items:center;gap:16px;padding:10px;background:var(--g-tile);border:1px solid var(--g-tile-edge);max-width:640px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat-art{flex:none;width:96px;height:72px;display:grid;place-items:center}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat-art img{max-width:96px;max-height:72px;image-rendering:pixelated}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat-copy{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat-copy strong{font:400 26px/1 var(--g-pixel)!important;color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat-copy small{font:12px/1.3 var(--g-mono)!important;color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-cost{display:flex;flex-wrap:wrap;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-chip{display:inline-flex;align-items:center;gap:6px;padding:2px 8px 2px 2px;border:1px solid var(--g-edge);font:400 18px/1 var(--g-pixel)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-chip .dock-icon{width:26px;height:26px;border:0;background:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-chip .dock-icon :is(img,svg,canvas,.bl-item-pixel-art){max-width:22px;max-height:22px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-chip.is-ok{color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-chip.is-short{color:var(--g-warn)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-slip{margin:0;font:400 19px/1 var(--g-pixel)!important;color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-slip.is-ready{color:var(--g-leaf)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-timer{font:400 32px/1 var(--g-pixel)!important;color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat>button{flex:none;min-width:120px}
@keyframes dock-working{50%{box-shadow:0 0 0 2px #e0c27a55}}
@media (prefers-reduced-motion:reduce){html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-primary.is-on{animation:none}}
@media (max-width:760px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-body{grid-template-columns:1fr}html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-stages span{font-size:15px}html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat{flex-wrap:wrap}html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat>button{flex:1 1 100%}}
/* The dockyard: built in stages by the town (sailing). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-card .build-materials .build-staged{color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-stages{display:flex;flex-direction:column;gap:4px;margin:0 0 10px;padding:0 0 0 22px;font:400 19px/1.1 var(--g-pixel);color:var(--g-ink)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-stages li::marker{color:var(--g-gold)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .build-detail-note{margin:0 0 12px;font:13px/1.4 var(--g-mono);color:var(--g-muted)}
/* Take down building: confirmation and progress, full width under the dock row. */
html body #build-mode-dock #build-takedown{grid-column:1/-1;display:flex;flex-direction:column;gap:8px;padding-top:10px;border-top:1px solid var(--g-edge)}
html body #build-mode-dock #build-takedown[hidden]{display:none!important}
html body #build-mode-dock #build-takedown-title{font:400 24px/1 var(--g-pixel);color:var(--g-ink)}
html body #build-mode-dock #build-takedown-facts{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:3px}
html body #build-mode-dock #build-takedown-facts li{font:400 19px/1.15 var(--g-pixel);color:var(--g-muted)}
html body #build-mode-dock #build-takedown-facts li.warn{color:var(--g-warn)}
html body #build-mode-dock #build-takedown-progress{height:12px;background:var(--g-tile);border:1px solid var(--g-gold-deep)}
html body #build-mode-dock #build-takedown-fill{height:100%;width:0;background:var(--g-gold)}
html body #build-mode-dock #build-takedown-buttons{display:flex;gap:8px;justify-content:flex-end}
html body #build-mode-dock #build-takedown-confirm{background:var(--g-warn)!important;color:#1a0f0b!important;border-color:var(--g-warn)!important}
html body #build-mode-dock #build-mode-takedown[aria-pressed=true]{color:var(--g-gold)!important;border-color:var(--g-gold)!important;box-shadow:inset 0 -2px var(--g-gold)!important}

/* ---------- Pack on phones: the hotbar row above replaced the earlier stacking, so stack every part in one column ---------- */
@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)!important;grid-template-areas:"char" "list" "hotbar" "load" "detail" "ground"!important;grid-template-rows:repeat(6,auto)!important;column-gap:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail{position:static;max-height:none;overflow:visible;min-height:0;border-top:1px solid var(--g-edge)!important;padding-top:12px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character{justify-self:center;max-width:100%}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions{flex-direction:row!important;flex-wrap:wrap;align-self:stretch}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions>.bl-item-action{flex:1 1 0;margin:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions>.bl-item-quantity-control{flex:1 0 100%}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list{grid-template-columns:repeat(auto-fill,minmax(64px,1fr))!important}
}

/* Dockyard boat card (Q, Nov 12): art, details, then one action column.
   Order is the one big gold button. For the town and Cancel are small and
   plain under it. Boats you may bring are compact chips with the owner as a tag. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat{flex-wrap:nowrap;align-items:flex-start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-acts{flex:none;width:200px;display:flex;flex-direction:column;gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-acts .dock-primary{width:100%;padding:10px 12px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-acts .dock-second{width:100%;padding:3px 8px!important;font-size:13px!important;background:none!important;border-color:var(--g-edge)!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-acts .dock-second:hover:not(:disabled){color:var(--g-ink)!important;border-color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-recalls{display:flex;flex-wrap:wrap;gap:4px;align-items:center;margin-top:4px;padding-top:6px;border-top:1px dashed var(--g-edge)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-recalls-label{flex-basis:100%;color:var(--g-muted)}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-recall{display:inline-flex!important;align-items:center;gap:6px;padding:2px 6px!important;height:auto!important;min-height:0!important;font-size:13px!important;white-space:nowrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-recall small{padding:0 4px;border:1px solid var(--g-edge);color:var(--g-muted);font-size:11px!important}
/* Fit: a tighter boat card so the whole dockyard page stays on one screen. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-boat{padding:6px 10px;gap:12px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-acts{gap:4px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #dockyard-panel .dock-recalls{flex-direction:row;margin-top:2px;padding-top:4px}

/* Menu tab bar (Nov 12): every tab shares the row and nothing sits on top of
   another. Discord takes its own space at the end, never floating over tabs.
   Under 1500 px it shrinks to its icon and cloak, the count on hover. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav{flex-wrap:nowrap!important;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{flex:1 1 0!important;min-width:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{overflow:hidden;text-overflow:clip;white-space:nowrap;max-width:100%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord{position:static!important;flex:none!important;background:none!important}
@media (max-width:1500px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord{padding:8px 6px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav #game-menu-discord>span:not(.ui-discord-icon){display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] kbd{display:none!important}
}

/* Tabs sized to their label (Nov 14, "Settlement"): each tab starts as wide as
   its word and the spare room is shared, so no label clips. Same type size. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{flex:1 1 auto!important;min-width:max-content!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{overflow:visible!important;max-width:none!important}

/* Crafting on a phone held sideways (short, coarse pointer). The recipe list and
   the ingredients are the only scroll boxes, and the page itself does not
   scroll. The big picture goes: the selected tile and Make already name the
   recipe. Amount and Make sit in a short footer that never moves. */
@media (max-height:500px) and (pointer:coarse){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop{grid-template-columns:minmax(0,1fr) 300px!important;align-items:stretch!important;gap:10px!important}
  /* Less the search row above the recipes (44 px): it made the page scroll by exactly that much (Nov 26 audit). */
  html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(.workshop-list,.workshop-detail).ui-panel{height:calc(var(--station-h,calc(100dvh - 134px)) - 44px);min-height:0;max-height:none}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail.ui-panel{order:0!important;position:static!important;padding-left:12px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-selection{display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail-scroll{padding:6px 2px 4px 0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail .recipe-materials li{min-height:0!important;padding-block:2px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-footer{position:static!important;gap:6px!important;padding:6px 0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount{gap:4px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-amount :is(button,input){min-height:34px!important;height:34px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-make{min-height:38px!important;height:38px!important;padding-block:4px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-footer .recipe-feedback{min-height:18px!important;height:18px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-list.ui-panel{grid-template-columns:repeat(auto-fill,minmax(84px,1fr))!important}
  /* Other ways to make it would sit under the fold as a bare heading: phones keep the ingredients only. */
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail :is(.workshop-detail-heading:has(+ .workshop-alternatives),.workshop-alternatives){display:none!important}
}

/* Short screens (landscape phones, under 420 px tall): a compact menu head, so
   stations fit with no scroll (Q: no station scrolls on a phone, Nov 24). */
@media (max-height:420px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .game-menu-heading{padding-top:0!important;min-height:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{gap:1px;padding:3px 4px 4px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] .ui-pix{width:16px;height:16px}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{font-size:15px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] kbd{display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages{padding:6px 10px!important}
}

/* Short screens: the Journal's quest list keeps the room, not the chrome above and below it (Nov 25). */
@media (max-height:420px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-board{grid-template-columns:220px minmax(0,1fr);gap:12px}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-side{gap:6px;padding-right:10px}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-mode button{font-size:19px!important;padding:2px 0 3px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories{margin:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-categories button{width:28px!important;height:28px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-quest{padding:4px 8px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-unlocked{margin:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-discoveries{display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail .frontier-goal{gap:8px}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-detail-head h3{font-size:24px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps{gap:8px}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .journal-steps>li{font-size:18px}
}

/* Short screens: Social fits. The menu tab names the page, so its header and title go;
   Trade nearby moves under the friends list (Nov 25). */
@media (max-height:420px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-social:not([hidden]){display:flex!important;flex-direction:column;gap:6px}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-social>:is(.framed-head,h3){display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-social>.direct-trade-nearby{order:9;display:flex;align-items:center;gap:10px;margin:0!important;padding:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-social>.direct-trade-nearby h4{margin:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #social-account{margin:0!important;padding:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #social-account .social-toolbar{margin:0 0 6px!important;padding:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #social-account :is(input,button){height:30px!important;min-height:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #social-account .people-tabs{margin:0 0 6px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #social-account .people-tabs button{padding:0 10px!important}
}

/* Short screens: Settlement's Overview sits in two columns, treasury beside the town's
   numbers, the plan below (Nov 25). */
@media (max-height:420px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-header{min-height:0!important;margin-bottom:4px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-title{font-size:22px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-tabs{margin:0 0 6px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-tabs button{min-height:0!important;height:28px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-page:not([hidden]){display:grid!important;grid-template-columns:minmax(0,2fr) minmax(0,3fr);gap:2px 10px;align-items:start}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-page>:is(#town-plan-section,#town-rules){grid-column:1/-1}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-page:not([hidden])>:is(#town-treasury,.town-top){grid-column:auto!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-page h4{display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-page .town-section{margin:0!important;padding:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-top{margin:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview #town-banner-badge{display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-stats{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-stats>*{min-height:40px!important;height:auto;padding:2px 6px!important;gap:6px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-stats>* svg{width:16px!important;height:16px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-stats>* :is(b,strong,span){font-size:16px!important;line-height:1!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-tabs{gap:0 4px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-tabs button{font-size:17px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview #town-rules{display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview #town-upkeep-breakdown{display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview,html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-page:not([hidden]){padding-bottom:0!important;margin-bottom:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#governance-modal,#town-panel):has(#town-overview){padding-bottom:0!important;margin-bottom:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-overview .town-treasury-row :is(input,button){height:30px!important;min-height:0!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #town-panel#town-panel #town-plan-form :is(textarea,input){min-height:0!important;height:30px!important}
}

/* An empty Pack reads as one quiet line across the whole grid, in the game font (Q, Nov 24 night). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-list>.bl-inventory-empty{grid-column:1/-1;min-height:86px;border:1px dashed var(--g-edge,#3a4a36)!important;border-radius:0!important;color:var(--g-dim,#7d8771)!important;font:400 24px/1 var(--g-pixel,"VT323"),monospace!important}

/* Recipe screens (Smithing's brief, Nov 25): whole names on two lines, the upgrade strip in
   the pixel font, the button one verb, and the button close under the ingredients. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-copy strong{white-space:normal!important;display:-webkit-box!important;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-height:14px!important;font-size:15px!important;min-height:28px;text-align:center;text-overflow:clip}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-row-icon{width:48px!important;height:48px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .station-upgrade-head b{font:400 20px/1 var(--g-pixel,'VT323')!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .station-upgrade-head small{font:400 17px/1 var(--g-pixel,'VT323')!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .station-upgrade .station-opens>li>span{font:400 17px/1 var(--g-pixel,'VT323')!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .station-upgrade .station-opens>li{display:inline-flex!important;flex-direction:row!important;width:auto!important;height:auto!important;padding:0!important;border:0!important;background:none!important;font:400 17px/1 var(--g-pixel,'VT323')!important;color:var(--g-ink)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .station-upgrade .station-opens .frontier-item-icon{width:22px!important;height:22px!important;flex:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .station-upgrade>button{font:400 19px/1 var(--g-pixel,'VT323')!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail .workshop-detail-scroll{flex:0 1 auto!important;min-height:96px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail .workshop-footer{margin-top:14px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail .workshop-make{font:400 24px/1 var(--g-pixel,'VT323')!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game .workshop-detail .workshop-make>span{font:inherit!important}
/* Nothing picked in the Pack: no detail pane, so no lone rule line beside an empty Pack (Q, Nov 25). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail:not(:has(*)){border-left-color:transparent!important}
/* A container open on the Pack page (Q, Nov 25, like Minecraft): the chest above the Pack grid,
   in the same columns and tiles. The ground panel steps aside while it is open. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container{grid-template-areas:"char container detail" "char list detail" "char hotbar detail" "char load detail"!important;grid-template-rows:auto minmax(0,1fr) auto auto!important;height:var(--page-h,calc(100dvh - 140px));align-items:stretch}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .inventory-ground-panel{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-list{min-height:0;overflow-y:auto;align-content:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container{grid-area:container;display:grid;gap:6px;min-width:0;padding:8px;border:1px solid #3a4a36;background:#111b15}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container[hidden]{display:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-head{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-head .ui-heading{margin:0 auto 0 0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-head input[type=search]{width:140px;height:30px;min-height:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container-list{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:6px;max-height:calc(var(--page-h,600px) * .36);overflow-y:auto;align-content:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container-list>:is(.bl-item-slot,.ui-empty-slot){aspect-ratio:1;min-height:0!important;position:relative}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container-list .ui-empty-slot{background:#111b14;border:1px solid #1b271d}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container-list .bl-item-slot.is-locked{cursor:default;opacity:.85}
@media(max-width:1100px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container{grid-template-columns:minmax(0,1fr) 240px!important;grid-template-areas:"container detail" "list detail" "hotbar detail" "load detail"!important;grid-template-rows:auto minmax(0,1fr) auto auto!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-character{display:none!important}
}
@media(max-width:640px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container{grid-template-columns:minmax(0,1fr) minmax(0,.9fr)!important;grid-template-areas:"container detail" "list detail"!important;grid-template-rows:auto minmax(0,1fr)!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container :is(.bl-hotbar-editor,.bl-pack-toolbar){display:none!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container-list{grid-template-columns:repeat(4,minmax(0,1fr))}
}
/* Chest tiles stay the Pack's size at every width, and the Pack grid keeps room under the chest. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container-list{grid-template-columns:repeat(auto-fill,minmax(52px,64px))!important;grid-auto-rows:max-content;justify-content:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container{overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-item-detail{min-height:0;max-height:100%;overflow-y:auto;grid-row:1/-1}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-hotbar-editor-slots{max-width:520px}
@media(max-width:1100px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container{grid-template-rows:auto minmax(130px,1fr) auto auto!important}}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-list{grid-template-columns:repeat(auto-fill,minmax(52px,64px))!important;grid-auto-rows:max-content!important;grid-template-rows:none!important;justify-content:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-hotbar-editor-slots{grid-template-columns:repeat(8,minmax(0,56px))!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-hotbar-editor-slots>*{aspect-ratio:1;height:auto!important;min-height:0!important}
/* With a chest open, the card keeps every action in view: Used for shows one row. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-item-detail .bl-item-uses{max-height:38px;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-item-detail :is(.bl-item-art,.bl-item-art-inspect,.bl-sword-inspect){max-height:72px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-gold{display:inline-flex;align-items:center;gap:6px}html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-gold input{width:80px;height:30px;min-height:0}

/* ---------- Kit: rows of controls and segmented choices ----------
   One control height, one gap. Every control in a .ui-row sits on one line,
   fields and buttons alike. .ui-row-part flattens a wrapper (a form, a
   section) so its controls join the row. .ui-row-note takes a line of its own.
   A .ui-seg choice is one joined strip: no gaps, the picked option gold. */
:root{--g-control:36px;--g-gap:8px;--g-label:96px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row:not([hidden]){display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:var(--g-gap)!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row .ui-row-part:not([hidden]){display:contents!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row :is(button,select,input:not([type=checkbox]):not([type=radio]):not([type=range])){height:var(--g-control)!important;min-height:var(--g-control)!important;margin:0!important;box-sizing:border-box!important;align-self:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row>label:not(.ui-row-note):not([hidden]){display:inline-flex!important;align-items:center!important;gap:var(--g-gap)!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row .ui-row-note{flex:1 0 100%!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row .ui-row-note:empty{display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row .ui-grow{flex:1 1 12ch!important;min-width:0!important;width:auto!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row .ui-row-part>:is(h4,p:not(.ui-row-note)){display:none!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg{display:inline-flex!important;gap:0!important;flex-wrap:nowrap!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg>button{height:var(--g-control)!important;min-height:var(--g-control)!important;width:auto!important;min-width:84px!important;margin:0 0 0 -1px!important;border:1px solid var(--g-edge)!important;background:#101a13!important;color:var(--g-muted)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg>button:first-child{margin-left:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg>button:is([aria-checked=true],[aria-pressed=true]){position:relative;z-index:1;border-color:var(--g-gold)!important;color:var(--g-gold)!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-row .ui-row-label{flex:0 0 var(--g-label)!important;margin:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg.ui-seg-column{flex-direction:column!important;align-items:stretch!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg.ui-seg-column>button{width:100%!important;margin:-1px 0 0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg.ui-seg-column>button:first-child{margin-top:0!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages .ui-seg .ui-tick{display:none!important}
/* The container's slots take the Pack's dotted drop outline. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container-list :is(.ui-empty-slot,.bl-item-slot).is-drop-target{outline:2px dashed var(--g-gold)!important;outline-offset:-2px}
/* Containers take the Pack's own eight columns and a one-line head, so the Pack keeps its room (Q, Nov 26). */
@media(min-width:1101px){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-container-list{grid-template-columns:repeat(8,minmax(0,64px))!important}
}
/* One row when it fits; a head with four access choices (a shelf) wraps Search and Store similar below instead of spilling over the Pack (Q, Nov 26). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-head{flex-wrap:wrap;row-gap:6px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-head .ui-heading{flex:0 1 auto;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-head input[type=search]{flex:1 1 90px;width:auto;min-width:90px}
/* Book and letter art fills its whole box; drawn a little smaller it sits inside the cell like other items. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game :is(#inventory-list,#inventory-container-list) .bl-item-slot:is([data-item-id^="book1_"],[data-item-id^="letter1_"],[data-container-item^="book1_"],[data-container-item^="letter1_"]) .bl-item-icon{transform:scale(.8);transform-origin:50% 60%}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-head :is(button,.chest-access button){height:30px;min-height:0;padding:0 8px;white-space:nowrap}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-log>summary{width:auto;height:30px;padding:0 8px!important;font-size:18px;color:inherit}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-log .ui-hint-pop{width:220px;max-width:none}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container .container-log .chest-withdrawals{grid-template-columns:1fr;margin:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-container:has(.container-log[open]){overflow:visible}
/* With a container open the Pack keeps rows for its stacks: sort and load share a line, no Hotbar caption. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-pack-toolbar{flex-direction:row!important;align-items:center!important;gap:12px!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-pack-toolbar .bl-carrying-status{flex:1 1 auto;min-width:0}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-hotbar-editor-head{display:none!important}
/* Top menu (Q, Nov 26): equal padding on every tab, the spare width shared out evenly, so the
   gaps between labels match; icon, gap and label are the same box in every tab, on one baseline. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section]{flex:1 1 auto!important;width:auto!important;min-width:0!important;padding:8px 6px 9px!important;grid-template-rows:24px 18px!important;row-gap:3px!important;align-content:center!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav button[data-section] span{display:block;height:18px;line-height:18px!important;overflow:visible;text-overflow:clip}
/* Menu tabs (Q, Nov 26), chosen in Settings > Video. Hidden tabs stay hidden in every mode. Touch mode keeps its own bar. */
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=labels]{display:flex!important;justify-content:flex-start!important;gap:0!important;flex-wrap:nowrap!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=labels]>button[data-section]{flex:1 1 0!important;max-width:78px!important;min-width:0!important;padding:8px 0 9px!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=labels]>button[data-section] span{font-size:17px!important;letter-spacing:0!important;white-space:nowrap;overflow:hidden;text-overflow:clip}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=icons]{display:flex!important;justify-content:flex-start!important;gap:4px!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=icons]>button[data-section]{flex:0 1 auto!important;display:flex!important;flex-direction:row!important;align-items:center!important;gap:8px!important;padding:10px 12px!important;grid-template-rows:none!important;min-width:0!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=icons]>button[data-section]:not(.is-active) span{display:none!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=icons]>button[data-section] svg{width:26px!important;height:26px!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=icons]>button[data-section].is-active span{font-size:22px!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=rows]{display:grid!important;grid-template-rows:repeat(2,32px)!important;grid-auto-flow:column!important;grid-auto-columns:1fr!important;grid-template-columns:none!important;gap:2px 4px!important;align-items:stretch}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=rows]>button[data-section]{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;padding:4px 10px!important;grid-template-rows:none!important;min-height:0!important;height:32px!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=rows]>button[data-section] svg{width:18px!important;height:18px!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav[data-tabs=rows]>button[data-section] span{font-size:18px!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-nav>button[data-section][hidden]{display:none!important}
/* The container window (Q, Nov 26): with a chest, hold, shelf, drop box or Lectern open, the container sits over
   the Pack and hotbar with the item card on the right, as on live; no character pane. Phones keep their layout. */
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container{grid-template-columns:minmax(0,1fr) 240px!important;grid-template-areas:"container detail" "list detail" "hotbar detail" "load detail"!important;grid-template-rows:auto minmax(0,1fr) auto auto!important;max-width:940px!important;margin:0 auto!important;width:100%!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-character{display:none!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-pack-toolbar .bl-carrying-status{flex:none!important;overflow:visible!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-pack-toolbar{justify-content:space-between!important}
/* Tablets are touch screens tall enough for the desktop container window: phones keep theirs (max-height 500px).
   Before this the chest sat below the screen on a tablet and the Pack list had no height (0.5.1). */
@media (min-height:501px){
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container{grid-template-columns:minmax(0,1fr) 240px!important;grid-template-areas:"container detail" "list detail" "hotbar detail" "load detail"!important;grid-template-rows:auto minmax(0,1fr) auto auto!important;max-width:940px!important;margin:0 auto!important;width:100%!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-character{display:none!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-pack-toolbar .bl-carrying-status{flex:none!important;overflow:visible!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container .bl-pack-toolbar{justify-content:space-between!important}
}
/* No page scroll on the Pack (Q, Nov 26 audit: 34 px at 1100): the Pack fits the page height, and the
   item grid gives up room first, scrolling inside its own box. */
/* A full Pack scrolls in its own box, rows keep their tile size (live report, Nov 26). */
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout:not(.has-container){height:var(--page-h)!important;max-height:var(--page-h)!important;grid-template-rows:minmax(0,auto) auto auto minmax(0,1fr)!important;overflow:hidden}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout:not(.has-container) #inventory-list{min-height:0!important;height:auto!important;max-height:100%!important;align-self:stretch!important;overflow-y:auto!important;grid-auto-rows:max-content!important;grid-template-rows:none!important;align-content:start!important}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout:not(.has-container) :is(#inventory-character,#inventory-item-detail){max-height:var(--page-h);overflow:hidden auto}
/* Options fits the page (Q, Nov 26 audit: 26 to 34 px of page scroll): the tabs and footer stay put, the open view scrolls in its own box when it is long. */
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #settings-modal:not([hidden]){display:flex!important;flex-direction:column;height:var(--page-h)!important;max-height:var(--page-h)!important;overflow:hidden}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #settings-modal>[id^="settings-"][id$="-view"]{flex:1 1 auto;min-height:0;overflow-y:auto}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #settings-modal>:is(#settings-tabs,#settings-footer,.settings-head){flex:none}
/* Help fits the page (Q, Nov 26 audit: 2500 px of scroll): topic list on the left, the open topic on the
   right, each in its own box. Only one topic is open at a time (help-guide.js). */
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-help:not([hidden]){display:flex!important;flex-direction:column;height:var(--page-h)!important;max-height:var(--page-h)!important;overflow:hidden}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-help>*{flex:none}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-help>.help-layout{flex:1 1 auto!important;min-height:0;align-items:stretch}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-help .help-layout>:is(#help-categories,.help-content){min-height:0;max-height:100%;overflow-y:auto}
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-help #help-categories{flex-wrap:nowrap!important;overflow-x:hidden}
/* Shaped gear (staffs, wands, forged pieces) sits centred in a hotbar slot: its image had a 5 px margin pushing it right (Q, Nov 26). */
#inventory-hotbar .hotbar-slot-icon img:is(.bl-shaped-sword,.bl-shaped-gear){margin:0!important}
/* Phones on their side: a station never scrolls the page. The station panel fits the page and its body
   scrolls in its own box (Nov 26 audit: the Smelter scrolled 128 to 143 px). */
@media (max-height:500px) and (pointer:coarse){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .frontier-dock.is-expanded{max-height:var(--page-h)!important;display:flex!important;flex-direction:column!important;overflow:hidden!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game .frontier-dock.is-expanded>.frontier-body{flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important}
}
/* Phones on their side: the Magic page never scrolls the page (UI's audit, Nov 26: it scrolled 44 to 196 px,
   and the lines and scrolls overlapped). The foci sit in one row, and each column scrolls in its own box. */
@media (max-height:500px){
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #magic-panel.has-spell-book:not([hidden]){height:var(--page-h)!important;max-height:var(--page-h)!important;overflow:hidden!important;display:flex!important;flex-direction:column!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #magic-panel .spell-book{flex:1 1 auto!important;min-height:0!important;display:flex!important;flex-direction:column!important;margin:0!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #magic-panel .spell-foci{flex:0 0 auto!important;grid-template-columns:none!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #magic-panel .spell-layout{flex:1 1 auto!important;min-height:0!important;grid-template-rows:minmax(0,1fr)!important;margin-top:4px!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #magic-panel .spell-layout :is(.spell-slots,.spell-scrolls,.spell-compose){min-height:0!important;max-height:100%!important;overflow-y:auto!important;overscroll-behavior:contain}
}
/* Phones (Mobile's walk, Nov 26). The Pack figure's turn arrows sat under the screen edge: turning is on Looks.
   Looks scrolls inside its own column instead of pushing the page. */
@media (max-height:500px) and (pointer:coarse){
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-character .inventory-character-turn{display:none!important}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #wardrobe-panel{height:100%;max-height:100%;min-height:0}
  html.touch-mode body #game-menu#game-menu#game-menu#game-menu.ui-game #wardrobe-panel .wd-looks{min-height:0;max-height:100%;overflow-y:auto}
}

/* The Build page never scrolls (Q, Nov 26: no menu page scrolls). The page holds its
   height, the piece tiles scroll inside their own box, and the detail stays in view. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages:has(>#build-modal:not([hidden])){overflow:hidden!important;display:flex!important;flex-direction:column}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #game-menu-pages>#build-modal:not([hidden]){display:flex!important;flex-direction:column;flex:1 1 auto;min-height:0;max-height:100%;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-panel{flex:1 1 auto;min-height:0;grid-template-rows:minmax(0,1fr)!important;align-items:stretch!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-browser{display:flex!important;flex-direction:column;min-height:0;overflow:hidden}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-list{flex:1 1 auto;min-height:0;max-height:none!important;overflow:auto!important;overscroll-behavior:contain;align-content:start}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-detail{position:static!important;min-height:0;max-height:100%;overflow:auto}
/* Narrow screens: portrait stacks tiles over a bounded detail; a short landscape
   screen (a phone on its side) keeps the detail beside the tiles. */
@media(max-width:850px) and (orientation:portrait){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-panel{display:grid!important;grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr) minmax(0,38%)!important;gap:8px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-detail{display:flex!important;border-left:0!important;border-top:1px solid var(--g-edge,#33452f)!important;padding:8px 0 0!important}
}
@media(max-width:1000px) and (orientation:landscape){
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-panel{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(180px,34%)!important;grid-template-rows:minmax(0,1fr)!important;gap:10px!important}
  html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-modal #build-detail{display:flex!important;padding:0 0 0 10px!important}
}
/* Build tiles never squash their picture or spill their lines (Q, Nov 27). A grid row would not
   grow to a button tile's content, so the tiles wrap in rows that take their tallest tile. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list{display:flex!important;flex-wrap:wrap!important;align-content:flex-start!important;align-items:stretch!important}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list{container-type:inline-size}
/* Every row on the same column tracks, the last partial row left-aligned at the same width (Q, Nov 27). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list .build-card{flex:0 0 calc((100cqw - 40px) / 6)!important;max-width:none!important;min-width:0!important;min-height:96px!important;height:auto!important;box-sizing:border-box}
@container (max-width:700px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list .build-card{flex-basis:calc((100cqw - 32px) / 5)!important}}
@container (max-width:560px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list .build-card{flex-basis:calc((100cqw - 24px) / 4)!important}}
@container (max-width:420px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list .build-card{flex-basis:calc((100cqw - 16px) / 3)!important}}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #build-list .build-card>*{flex-shrink:0!important}
/* Menu tabs choice in Options: each label on one line (Q, Nov 27). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #menu-tabs-choice button{white-space:nowrap!important}
/* Help keeps one topic in view with no page scroll, but Smithing practice opened from it is taller
   than the page: it scrolls, so the anvil and Finish are reachable (bug forum 1576149809415593994). */
html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #game-help.is-smithing-practice:not([hidden]){overflow-y:auto!important;overscroll-behavior:contain}
/* The item card never squeezes its parts: the card scrolls instead. Squeezed, the picture let a tall
   sprite run down over the rows and Inspect folded under Sharpen (bug forum 1576086822495326339). */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail :is(.bl-item-detail,.bl-item-detail-body,.bl-item-detail-actions)>*{flex-shrink:0!important}
/* With a chest open the picture is capped at 72px (above): the icon inside fits that box too. */
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout.has-container #inventory-item-detail :is(.bl-item-art,.bl-item-art-inspect)>.bl-item-detail-icon{width:72px!important;height:72px!important;max-height:72px}
html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail :is(.bl-item-art,.bl-item-art-inspect,.bl-sword-inspect){overflow:hidden}
/* A narrow Pack wraps the actions two to a row instead of squeezing all of them onto one line. */
@media(max-width:640px){html body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-item-detail .bl-item-detail-actions>.bl-item-action{flex:1 1 calc(50% - 8px)}}
/* Settings from the title screen shows only Settings: the tab bar and wallet above beat the hiding rule in game-menu.css (bug forum 1576377304228040734). */
html body.entry-settings-open #game-menu#game-menu#game-menu#game-menu#game-menu#game-menu.ui-game :is(#game-menu-nav,#game-menu-wallet){display:none!important}
/* A short screen (a phone on its side) lets the Pack page scroll as one: with an item on the ground the fixed-height grid
   squeezed the Pack to a row and clipped Ground Items out of reach (bug forum 1577128169000017961). */
@media (max-height:520px){html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout:not(.has-container){height:auto!important;max-height:none!important;overflow:visible!important;grid-template-rows:repeat(4,auto)!important}html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game #inventory-items-layout:not(.has-container) #inventory-list{max-height:none!important;overflow:visible!important}}
/* Station machines (Smelter, Campfire, Stove) fit the page at 1080p with no scroll (Q, Dec 1): the
   upgrade bar, a running batch, the Melt row and a full Pack page all showed at once and scrolled the page.
   The Pack page sits in two rows of nine and the gaps between the parts are a little tighter. */
@media (min-height:421px){
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-pack .ui-slot-grid{grid-template-columns:repeat(9,minmax(0,1fr))}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-cook-body{gap:10px}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-cook-progress{margin:8px 0}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-cook-cost{margin:6px 0}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-cook-actions{margin-top:6px}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-pack .ui-heading{margin-bottom:6px!important}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-pack{padding-top:8px!important}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-pack .ui-slot.bl-item-slot{height:72px!important}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-machine-slot{padding:6px 4px}
  html:not(.touch-mode) body #game-menu#game-menu#game-menu#game-menu.ui-game .ui-cook .ui-machine-slot .ui-slot.bl-item-slot{width:56px!important;height:56px!important}
}
