/* Gnome G'home site: the game's own screen on the web (rebuilt 2026-10-06 from real screenshots of the game's HUD and Gnome Tools panel).
   One fixed screen, no page scrolling:
   - world: sky, sun, hills, the grass field with the gnome hole, a ground strip along the bottom
   - HUD pill stack top-left, time bar + speed buttons top-centre, the dock flush against a screen edge, the Gnome Tools panel beside it
   - menu layouts: World (dock is the tab selector), Floating (centred modal), Glide (flush right panel with a rail)
   Colours are the game's 17 theme colours (themes.css); borders follow its window styles (styles.css). World art is not themed. */
@font-face { font-family: "Amble"; src: url("/fonts/Amble-Regular.ttf") format("truetype"); font-display: swap; }   /* Apache 2.0, fonts/Amble-License.txt */
:root { --wf: clamp(8px, 1.1vw, 28px); --dl: 0px; --dr: 0px; --dt: 0px; --db: 0px; --pr: 0px; --dirt: #7a5233; --drop: 0 4px 0 rgba(0, 0, 0, 0.28);
  --font: "Amble", "Trebuchet MS", "Segoe UI", system-ui, sans-serif; --gs: 2.5; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: clamp(16px, min(1.25vw, 2.4vh), 44px); }  /* the game scales its whole UI with the window; so does this */
body { margin: 0; min-height: 100vh; font-family: var(--font); font-size: 1rem; line-height: 1.45; letter-spacing: 0.02em; color: var(--text);
  background-color: var(--world); background-image: linear-gradient(var(--veil), var(--veil)), linear-gradient(var(--world), var(--world)), url("/img/grass.png");
  background-blend-mode: normal, color, normal; background-repeat: repeat; background-size: auto, auto, calc(12 * var(--wf)) calc(12 * var(--wf)); image-rendering: pixelated; }
.js body { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; background: none; }
body.dock-right { --dr: 4.9rem; } body.dock-left { --dl: 4.9rem; } body.dock-top { --dt: 4.4rem; } body.dock-bottom { --db: 4.4rem; }
body:not(.dock-top) { --dt: 0px; } body:not(.dock-bottom) { --db: 0px; }
img { max-width: 100%; height: auto; } img.px, .px { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--rate-text); text-underline-offset: 3px; } a:hover { color: var(--res-title); }
:focus-visible { outline: 3px solid var(--res-title); outline-offset: 2px; }
code { background: var(--btn-bg); color: var(--text); padding: 0.05em 0.4em; border: 1px solid var(--panel-border); border-radius: 4px; font-size: 0.92em; }
button { font: inherit; letter-spacing: inherit; } .small { color: var(--sub); font-size: 0.88rem; } .up { color: var(--rate-up); } .down { color: var(--rate-down); }
.cn { display: inline-block; width: 0.85em; height: 0.85em; margin-right: 0.2em; vertical-align: -0.12em; border-radius: 50%; border: 1px solid #6b4e0e; background: radial-gradient(circle at 35% 30%, #fff3b0, #e6b636 60%, #a8801c); }

/* ---------- the world: sky, sun, hills, field, ground strip (built by site.js on every page) ---------- */
.skyworld { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: #9fd7a0; }
.skyworld .sky { position: absolute; inset: 0 0 auto 0; height: 40vh; background: linear-gradient(#bfe6f3 0%, #cfeaf0 45%, #e4f1e6 100%); }
.skyworld .sun { position: absolute; left: 32vw; top: -9vh; width: 29vh; height: 29vh; border-radius: 50%; background: radial-gradient(circle, #fbf3b2 0 62%, rgba(251, 243, 178, 0.55) 63% 100%); transform: translateX(-50%); }
.skyworld svg { position: absolute; left: 0; top: 10vh; width: 100%; height: 25vh; }
.skyworld .field { position: absolute; left: 0; right: 0; top: 31.5vh; bottom: 0; background-color: var(--world);
  background-image: linear-gradient(var(--veil), var(--veil)), linear-gradient(var(--world), var(--world)), url("/img/grass.png");
  background-blend-mode: normal, color, normal; background-size: auto, auto, calc(12 * var(--wf)) calc(12 * var(--wf)); image-rendering: pixelated; }
/* the skyline: the field's own tufts rooted along its top edge (img/fringe.png, 192x9 grass pixels of 3 world px each), put through the same theme tint as the field.
   The colour layers fill the whole strip, so the tufts' own shape is cut back out with the same image as a mask. */
.skyworld .fringe { position: absolute; left: 0; right: 0; top: calc(31.5vh - 1.6875 * var(--wf)); height: calc(1.6875 * var(--wf)); image-rendering: pixelated;
  background-image: linear-gradient(var(--veil), var(--veil)), linear-gradient(var(--world), var(--world)), url("/img/fringe.png");
  background-blend-mode: normal, color, normal; background-size: auto, auto, calc(36 * var(--wf)) 100%; background-repeat: repeat, repeat, repeat-x;
  -webkit-mask: url("/img/fringe.png") 0 0 / calc(36 * var(--wf)) 100% repeat-x; mask: url("/img/fringe.png") 0 0 / calc(36 * var(--wf)) 100% repeat-x; }
.skyworld .strip { position: absolute; left: 0; right: 0; bottom: var(--db); height: 5.4vh; background: #75593a; border-top: 3px solid #5b4329; }
.skyworld .strip::before { content: ""; position: absolute; left: 8vw; right: 8vw; top: 50%; height: 2px; background: #e9e3d3; opacity: 0.85; }
.skyworld .strip i { position: absolute; top: calc(50% - 4px); width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.skyworld::after { content: ""; position: absolute; inset: 0; background: var(--veil); pointer-events: none; }

/* ---------- HUD: the game's pill stack (top-left) ---------- */
.hud { position: fixed; z-index: 15; left: calc(var(--dl) + 0.6rem); top: calc(var(--dt) + 0.6rem); display: grid; gap: 0.4rem; justify-items: start; width: 13.2rem; transition: left 0.2s, top 0.2s; }
.hudrow { display: flex; gap: 0.35rem; align-items: stretch; }
.hudtog { display: grid; gap: 0.1rem; } .hb { width: 1.7rem; flex: 1; padding: 0; line-height: 1; font-weight: 800; color: var(--text); background: var(--btn-bg); border: 2px solid var(--panel-border); border-radius: 6px; cursor: pointer; } .hb:disabled { opacity: 0.55; cursor: default; }
.pill { display: flex; align-items: center; gap: 0.5rem; height: 2.55rem; padding: 0 0.85rem; font-size: 0.95rem; color: var(--text); background: var(--pill-bg); border: 2px solid var(--pill-border); border-radius: 7px; box-shadow: var(--drop); }
.pill .lv { font-size: 0.74rem; color: var(--sub); letter-spacing: 0.06em; } .pill b { margin-left: auto; font-weight: 400; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.pill img { width: 1.35rem; height: 1.35rem; object-fit: contain; margin-left: 0.5rem; } .pill.bump b { animation: bump 0.25s steps(3); }
.res { width: 9.6rem; } .coinp { width: 11rem; height: 2.9rem; } .coinp b { font-size: 1.35rem; } .coinp .vr { align-self: stretch; width: 2px; margin: 0.4rem 0.1rem; background: var(--pill-border); } .coinp img { margin-left: 0; width: 1.6rem; height: 1.6rem; }
.expbar { display: flex; align-items: center; gap: 0.3rem; margin-left: 1.5rem; width: 11.4rem; } .explbl { padding: 0 0.4rem; font-size: 0.66rem; color: var(--text); background: rgba(20, 26, 22, 0.85); border-radius: 4px; letter-spacing: 0.1em; }
.exp { flex: 1; height: 0.62rem; border-radius: 4px; background: var(--pill-bg); overflow: hidden; border: 2px solid var(--panel-border); } .exp i { display: block; height: 100%; width: 0; background: var(--progress); }
.gnomes { height: 2rem; width: auto; padding: 0 0.7rem 0 0.5rem; font-size: 0.82rem; } .gnomes b { margin: 0; font-size: 0.82rem; } .tri { width: 0; height: 0; border: 0.45rem solid transparent; border-bottom: 0.8rem solid var(--rate-up); border-top: 0; }
@keyframes bump { 0% { transform: scale(1); } 50% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* ---------- time bar + speed buttons (top-centre) ---------- */

/* ---------- the garden: title in the sky, the field with the gnome hole ---------- */
.game { position: fixed; z-index: 5; left: var(--dl); right: calc(var(--dr) + var(--pr)); top: var(--dt); bottom: var(--db); pointer-events: none; font-size: var(--wf); transition: right 0.2s; }
/* the splash: the title sign, tagline and badge over the garden until a click, a tap, a key or a few seconds clear it */
.splash { position: fixed; inset: 0; z-index: 55; display: grid; place-items: end center; padding: 1rem calc(var(--dr) + 1rem) calc(var(--db) + 7vh) calc(var(--dl) + 1rem); font-size: var(--wf); background: linear-gradient(to bottom, transparent 38%, rgba(10, 18, 12, 0.4) 70%);   /* sits low and the dimming starts below the row of sprites, so they stay in plain view while it is up */ cursor: pointer; transition: opacity 0.4s; }
.splash.off { opacity: 0; pointer-events: none; } .splash[hidden] { display: none; }
.hero { width: min(40em, 100%); text-align: center; } .hero .hint { margin: 1.4em 0 0; font-size: 1em; color: #fff; opacity: 0.85; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.6); }
.topbadge { position: fixed; z-index: 15; top: calc(var(--dt) + 0.5rem); left: calc(50% + (var(--dl) - var(--dr)) / 2 - var(--pr) / 2); transform: translateX(-50%); font-size: var(--wf); } .topbadge .badge { margin: 0 0.2em; } .topbadge { opacity: 0; transition: opacity 0.4s; } body.splashed .topbadge { opacity: 1; }   /* the pinned badge shows once the splash has gone */
.titlesign { position: relative; display: block; margin: 0 auto; width: min(34em, 100%); aspect-ratio: 636 / 92; background: url("/img/banner.svg") center / 100% 100% no-repeat;
  filter: hue-rotate(var(--ribbon-hue)) saturate(var(--ribbon-sat)) drop-shadow(0 5px 0 rgba(0, 0, 0, 0.2)); }
.titlesign h1 { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; padding: 0 12%; white-space: nowrap; font-size: 2.7em; font-weight: 400; letter-spacing: 0.08em; color: #fff4dc;
  text-shadow: 3px 0 #3e2818, -3px 0 #3e2818, 0 3px #3e2818, 0 -3px #3e2818, 2px 2px #3e2818, -2px 2px #3e2818, 2px -2px #3e2818, -2px -2px #3e2818, 4px 5px rgba(0, 0, 0, 0.35); }
.lead { display: block; width: fit-content; max-width: 100%; margin: 0.7em auto 0; padding: 0.35em 1em; font-size: 1.15em; color: var(--text); background: var(--panel-bg); border: 3px var(--bs, solid) var(--panel-border); border-radius: var(--r); box-shadow: var(--drop); }
.badge { display: inline-block; margin: 0.6em 0 0; padding: 0.35em 1.2em; font-size: 1em; color: var(--res-title); background: var(--btn-bg); border: 3px var(--bs, solid) var(--panel-border); border-radius: var(--r); box-shadow: var(--drop); text-decoration: none; }
a.badge:hover { background: var(--btn-hover); color: var(--res-title); }
.world { position: absolute; left: 0; right: 0; top: 42vh; display: flex; justify-content: center; pointer-events: none; }
.ground { position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 0.5em; pointer-events: none; }
.ground > * { pointer-events: auto; }
.node { background: none; border: 0; padding: 0; cursor: pointer; line-height: 0; position: relative; border-radius: 0.6em; } .node img { display: block; image-rendering: pixelated; height: auto; }
.node:hover { filter: drop-shadow(0 0 0.35em rgba(255, 255, 255, 0.9)); } .node:active img { transform: translateY(2px); }
.node[data-res="stone"] img { width: 5em; } .node[data-res="metal"] img { width: 4.8em; } .node[data-res="water"] img { width: 6em; image-rendering: auto; } .node.tree img { width: 7.4em; }
.hole { position: relative; width: calc(160 * var(--w)); line-height: 0; margin: 0 6em; } .hole img { width: 100%; height: calc(94 * var(--w)); }
.walker { position: absolute; z-index: 6; pointer-events: none; transform-origin: 50% 100%; will-change: left, top; }
.carry { position: absolute; z-index: 7; width: calc(14 * var(--w)); height: calc(14 * var(--w)); object-fit: contain; image-rendering: pixelated; pointer-events: none; }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-2.2em); } }

/* ---------- the dock: flush against a screen edge, the tab selector of the World Menu ---------- */
.dock { position: fixed; z-index: 31; display: flex; align-items: center; gap: 0.35rem; padding: 0.5rem 0.4rem; background: var(--pill-bg); border: 0 solid var(--panel-border); box-shadow: none; border-radius: 0; }
body.dock-right .dock { top: 0; bottom: 0; right: 0; width: var(--dr); flex-direction: column; border-left-width: 3px; } body.dock-left .dock { top: 0; bottom: 0; left: 0; width: var(--dl); flex-direction: column; border-right-width: 3px; }
body.dock-top .dock { top: 0; left: 0; right: 0; height: var(--dt); flex-direction: row; border-bottom-width: 3px; } body.dock-bottom .dock { bottom: 0; left: 0; right: 0; height: var(--db); flex-direction: row; border-top-width: 3px; }
.dock .tabs, .dock .tools { display: flex; gap: 0.35rem; align-items: center; } .dock .tabs { flex: 1; } body.dock-right .dock .tabs, body.dock-left .dock .tabs, body.dock-right .dock .tools, body.dock-left .dock .tools { flex-direction: column; width: 100%; } body.dock-right .dock .tabs, body.dock-left .dock .tabs { justify-content: flex-start; }
.dk { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.15rem; width: 100%; min-width: 3.4rem; padding: 0.35rem 0.1rem; font-size: 0.68rem; line-height: 1.1; color: var(--sub); background: none; border: 2px solid transparent; border-radius: 6px; cursor: pointer; text-decoration: none; }
.dk:hover { background: var(--btn-hover); color: var(--text); } .dk[aria-pressed="true"], .dk[aria-current="page"] { color: var(--text); background: var(--btn-bg); border-color: var(--panel-border); }
.dk img.ic { width: 1.9rem; height: 1.9rem; object-fit: contain; image-rendering: pixelated; } .dk .gl { font-size: 1.5rem; line-height: 1.9rem; height: 1.9rem; }
.dk .badge2 { position: absolute; top: 0; right: 0.3rem; min-width: 1.15rem; height: 1.15rem; padding: 0 0.2rem; font-size: 0.68rem; line-height: 1.15rem; text-align: center; color: #0e2a10; background: var(--rate-up); border-radius: 0.6rem; }
.dock .arrows { display: flex; gap: 0.2rem; } .dock .arr { width: 1.6rem; height: 1.6rem; padding: 0; font-size: 1.1rem; line-height: 1; color: var(--sub); background: none; border: 0; cursor: pointer; } .dock .arr:hover { color: var(--res-title); }
.dock .clock { padding: 0.2rem 0.3rem; font-size: 0.66rem; text-align: center; color: var(--sub); border: 2px solid var(--panel-border); border-radius: 4px; background: var(--pill-bg); white-space: nowrap; }

/* ---------- the Gnome Tools panel (the game's DrawPanel) ---------- */
.js .desk { display: none; } .desk { width: min(52rem, 100vw - 2rem); margin: 1rem auto; display: grid; gap: 1rem; position: relative; }
.win, .frame, .menupanel { background: var(--panel-bg); border: var(--bw, 3px) var(--bs, solid) var(--panel-border); border-radius: var(--r); box-shadow: var(--drop); }
.menupanel { position: fixed; z-index: 30; display: flex; flex-direction: column; min-height: 0; color: var(--text); }
.menupanel.L-world { top: calc(var(--dt) + 0.6rem); right: calc(var(--dr) + 0.6rem); width: clamp(23rem, 29vw, 37rem); max-height: calc(100dvh - var(--dt) - var(--db) - 1.2rem); }
.dimmer { position: fixed; inset: 0; z-index: 29; background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.menupanel.L-floating { left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(44rem, 100vw - 4rem); max-height: calc(100dvh - 4rem); }
.menupanel.L-glide { top: var(--dt); bottom: var(--db); right: var(--dr); width: min(38rem, 100vw - var(--dl)); border-radius: var(--r) 0 0 var(--r); border-right-width: 0; }
.mhead, .wtitle { display: flex; align-items: center; gap: 0.7rem; padding: 0.55rem 0.9rem 0.45rem; border-bottom: 2px solid var(--panel-border); }
.mhead .ttl { display: grid; line-height: 1.1; } .mhead h2 { margin: 0; font-size: 1.4rem; font-weight: 400; color: var(--text); letter-spacing: 0.06em; } .mhead .sub { font-size: 0.72rem; color: var(--sub); margin-top: 0.1rem; }
.mhead .hb2 { padding: 0.3rem 0.8rem; font-size: 0.8rem; color: var(--sub); background: none; border: 2px solid var(--panel-border); border-radius: 6px; text-decoration: line-through; cursor: default; }
.wx { margin-left: auto; padding: 0.2rem 0.4rem; font-size: 1.2rem; line-height: 1; color: var(--text); background: none; border: 0; cursor: pointer; } .wx:hover { color: var(--res-title); }
.mmain { display: flex; flex: 1; min-height: 0; } .mcontent { flex: 1; min-width: 0; min-height: 0; overflow: auto; }
.mtabs { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.45rem 0.7rem; border-bottom: 2px solid var(--panel-border); }
.mrail { flex: none; width: 9.5rem; display: flex; flex-direction: column; gap: 0.35rem; padding: 0.6rem 0.5rem; border-right: 2px solid var(--panel-border); overflow: auto; } .mrail .tab { width: 100%; justify-content: flex-start; }
.tab, .wtab, .chipbtn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.25rem 0.8rem; font-size: 0.86rem; color: var(--text); cursor: pointer; background: var(--btn-bg); border: 2px solid var(--panel-border); border-radius: 6px; text-decoration: none; }
.tab:hover, .wtab:hover, .chipbtn:hover { background: var(--btn-hover); } .tab[aria-selected="true"], .wtab[aria-selected="true"], .chipbtn[aria-pressed="true"] { color: var(--res-title); border-color: var(--res-title); }
.tab img.ic { width: 1.4rem; height: 1.4rem; object-fit: contain; image-rendering: pixelated; } .tab .gl { font-size: 1.1rem; }
.wtabs { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.55rem 0.8rem 0; }
.wbody { padding: 0.7rem 0.8rem 0.9rem; } .pane > :first-child { margin-top: 0; } .pane > :last-child { margin-bottom: 0; } .js .menupanel .pane { display: none; } .js .menupanel .pane.on { display: block; }
.filters { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.7rem; }
/* cards: the game's body cards */
.card { padding: 0.55rem 0.75rem; background: rgba(255, 255, 255, 0.025); border: 2px solid color-mix(in srgb, var(--panel-border) 75%, transparent); border-radius: 6px; }
.hirecards { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 0.7rem; }
.hire header { display: flex; align-items: center; gap: 0.45rem; } .hire h3 { margin: 0; font-size: 1.02rem; font-weight: 400; color: var(--res-title); letter-spacing: 0.05em; } .hire img.shirt { width: 1.2rem; height: 1.2rem; }
.hire p { margin: 0.25rem 0 0.4rem; font-size: 0.86rem; } .gbtn { display: block; width: 74%; margin: 0 auto; height: 2.1rem; font-size: 0.9rem; color: var(--text); background: var(--btn-bg); border: 3px solid var(--panel-border); border-radius: 6px; cursor: pointer; }
.gbtn:hover:not(:disabled) { background: var(--btn-hover); } .gbtn:disabled { color: var(--sub); background: transparent; cursor: default; }
.cropgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 0.55rem; } .crop { display: flex; gap: 0.6rem; align-items: center; } .crop[hidden] { display: none; }
.crop img.big { width: 2.7rem; height: 2.7rem; flex: none; } .cbody { min-width: 0; } .crop h3, .seas h3 { margin: 0; font-size: 0.98rem; font-weight: 400; color: var(--res-title); letter-spacing: 0.05em; }
.meta { display: flex; flex-wrap: wrap; gap: 0.1rem 0.6rem; margin: 0.15rem 0; font-size: 0.74rem; color: var(--sub); } .chips { display: flex; flex-wrap: wrap; gap: 0.25rem; margin: 0.25rem 0 0; }
.chip { display: inline-block; padding: 0 0.45rem; font-size: 0.7rem; border-radius: 5px; background: var(--pill-bg); border: 2px solid currentColor; }
.s-spring { color: var(--rate-up); } .s-summer { color: var(--res-title); } .s-autumn { color: var(--hungry-border); } .s-winter { color: var(--progress); }
.pairs { display: grid; gap: 0.9rem; } .pairs h3 { margin: 0 0 0.35rem; font-size: 1rem; font-weight: 400; } .pairs ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.3rem; }
.pair { display: flex; align-items: center; gap: 0.4rem; padding: 0.2rem 0.5rem; background: rgba(255, 255, 255, 0.025); border: 2px solid color-mix(in srgb, var(--panel-border) 60%, transparent); border-radius: 6px; font-size: 0.84rem; }
.pair img { width: 1.6rem; height: 1.6rem; } .pair b { color: var(--sub); font-weight: 400; } .pair .pct { margin-left: auto; font-style: normal; } .pair.good .pct { color: var(--rate-up); } .pair.bad .pct { color: var(--rate-down); }
.seasgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0.55rem; } .slist { margin: 0.3rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.2rem; } .slist li { display: flex; align-items: center; gap: 0.4rem; font-size: 0.84rem; } .slist img { width: 1.5rem; height: 1.5rem; }
.seas.s-spring h3 { color: var(--rate-up); } .seas.s-summer h3 { color: var(--res-title); } .seas.s-autumn h3 { color: var(--hungry-border); } .seas.s-winter h3 { color: var(--progress); }
ul.feat { margin: 0.8rem 0 0; padding: 0; list-style: none; display: grid; gap: 0.5rem; } ul.feat li { position: relative; padding-left: 1.7rem; }
ul.feat li::before { content: ""; position: absolute; left: 0; top: 0.25em; width: 16px; height: 16px; background: url("/img/sprites/heart.png") center / 100% 100% no-repeat; image-rendering: pixelated; } .mystery { text-align: center; }
/* Settings (a tab of the same panel) */
.swrows { padding: 0.8rem 0.9rem 1rem; display: grid; gap: 0.7rem; } .swrow { display: grid; grid-template-columns: 6rem 1fr; gap: 0.6rem; align-items: center; } .swrow[hidden] { display: none; }
.swl { color: var(--sub); font-size: 0.86rem; } .segs { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.seg { font-size: 0.82rem; color: var(--text); background: var(--btn-bg); cursor: pointer; border: 2px solid var(--panel-border); border-radius: 6px; padding: 0.3rem 0.7rem; } .seg:hover:not(:disabled) { background: var(--btn-hover); } .seg[aria-pressed="true"], .seg.strong { color: var(--res-title); border-color: var(--res-title); }
.themepick { font-size: 0.86rem; color: var(--text); background: var(--btn-bg); border: 2px solid var(--panel-border); border-radius: 6px; padding: 0.25rem 0.5rem; cursor: pointer; width: 100%; } .themepick option { background: var(--panel-bg); color: var(--text); }

/* ---------- long-form text (Support, Privacy) inside a menu ---------- */
.doctext { padding: 0.8rem 1.2rem 1.4rem; } .doctext > :first-child { margin-top: 0; } .doctext > :last-child { margin-bottom: 0; } .doctext li { margin: 0.3rem 0; }
.doctext h2 { margin-top: 1.4rem; font-size: 1.15rem; font-weight: 400; color: var(--res-title); letter-spacing: 0.05em; border-bottom: 2px dashed var(--panel-border); padding-bottom: 0.2rem; }
.doctext .card { padding: 0.1rem 1rem; } .doctext .card h2 { border: 0; margin-top: 0.7rem; }

/* ---------- toasts + the gnome's announcement ---------- */
.toasts { position: fixed; z-index: 45; left: calc(var(--dl) + 0.8rem); bottom: calc(var(--db) + 0.8rem); display: grid;   /* the bottom-left corner of the play area (a phone: right above the dock) */ gap: 0.5rem; pointer-events: none; max-width: min(24rem, calc(100vw - 1.6rem)); }
.toast { padding: 0.5rem 0.9rem; font-size: 0.9rem; color: var(--text); border-color: var(--built-tag); animation: toastin 0.2s ease-out; position: relative; } @keyframes toastin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.announce { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; padding: 1rem; background: rgba(0, 0, 0, 0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fadein 0.3s ease-out; }
.announce[hidden] { display: none; } @keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.annwrap { position: relative; display: flex; align-items: flex-end; gap: 2.2rem; width: min(50rem, 100%); margin-bottom: clamp(1rem, 12vh, 7rem); }
.anngnome { flex: none; animation: walkin 1.15s steps(12) both, gwalk 0.56s steps(8) 2, gwalk 1.8s steps(8) 1s infinite; } .anngnome.leaving { animation: walkout 0.9s steps(10) forwards, gwalk 0.56s steps(8) infinite; }
@keyframes walkin { from { transform: translateX(-70vw); } to { transform: translateX(0); } } @keyframes walkout { from { transform: translateX(0); } to { transform: translateX(-70vw); } }
.annbox { position: relative; flex: 1; min-width: 0; padding: 1rem 1.1rem 0.9rem; background: var(--panel-bg); border: 2px var(--bs, solid) var(--built-tag); border-radius: min(var(--r), 4px); box-shadow: 4px 5px 0 rgba(0, 0, 0, 0.4); opacity: 0; animation: boxin 0.25s ease-out 1.2s forwards, bob 1.6s ease-in-out 1.45s infinite; }
@keyframes boxin { from { opacity: 0; } to { opacity: 1; } } @keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
.annbox::before, .annbox::after { content: ""; position: absolute; top: 3.2rem; border: solid transparent; } .annbox::before { left: -18px; border-width: 9px 18px 9px 0; border-right-color: var(--built-tag); margin-top: -2px; } .annbox::after { left: -14px; border-width: 8px 16px 8px 0; border-right-color: var(--panel-bg); margin-top: -1px; }
.anntitle { margin: 0 0 0.5rem; font-size: 1.2rem; font-weight: 400; color: var(--res-title); letter-spacing: 0.05em; } .anntext { margin: 0; color: var(--text); font-size: 1rem; white-space: pre-line; }
.annfoot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 0.9rem; } .annpage { font-size: 0.78rem; color: var(--sub); }
.annbtn { min-width: 6rem; padding: 0.4rem 1rem; font-size: 0.95rem; color: var(--text); background: var(--btn-bg); border: 2px solid var(--panel-border); border-radius: 6px; cursor: pointer; } .annbtn:hover { background: var(--btn-hover); color: var(--res-title); }
.annskip { background: none; border: 0; color: var(--sub); font-size: 0.8rem; cursor: pointer; text-decoration: underline; padding: 0.2rem; }

/* ---------- the game's real worker gnomes (sliced from assets/gnome_shirts_sheet.png): 8 walk frames across, 6 poses down ---------- */
.gn { --s: var(--gs, 2.5); --row: 1; --g: url("/img/gnomes/red.png"); display: inline-block; flex: none; vertical-align: bottom; width: calc(16px * var(--s)); height: calc(28px * var(--s));
  background: var(--g) 0 calc(var(--row) * var(--s) * -28px) / calc(128px * var(--s)) calc(168px * var(--s)) no-repeat; image-rendering: pixelated; animation: gwalk 0.56s steps(8) infinite; }
.gn.idle { animation-duration: 1.8s; } .gn.still { animation: none; } .gn.red { --g: url("/img/gnomes/red.png"); } .gn.orange { --g: url("/img/gnomes/orange.png"); } .gn.skyblue { --g: url("/img/gnomes/skyblue.png"); } .gn.gray { --g: url("/img/gnomes/gray.png"); } .gn.black { --g: url("/img/gnomes/black.png"); } .gn.green { --g: url("/img/gnomes/green.png"); } .gn.brown { --g: url("/img/gnomes/brown.png"); }
@keyframes gwalk { to { background-position: calc(var(--s) * -128px) calc(var(--row) * var(--s) * -28px); } }

/* ---------- smaller screens ---------- */
@media (max-width: 899px) {
  :root { --wf: 9px; } .game { right: var(--dr); } .hud { width: auto; } .res { width: 7.6rem; } .coinp { width: 9rem; } .expbar { width: 9.4rem; }
  .menupanel.L-world, .menupanel.L-floating, .menupanel.L-glide { left: calc(var(--dl) + 0.4rem); right: calc(var(--dr) + 0.4rem); top: calc(var(--dt) + 0.4rem); bottom: calc(var(--db) + 0.4rem); width: auto; max-height: none; transform: none; border-radius: var(--r); border-right-width: var(--bw, 3px); }
  .hirecards { grid-template-columns: 1fr; } .mrail { width: 7rem; } .swrow { grid-template-columns: 1fr; gap: 0.25rem; }
  /* the dock stays on the edge it was given at every width (right unless Settings says otherwise), as in the game; on a small screen it only slims down */
  body.dock-right { --dr: 4.2rem; } body.dock-left { --dl: 4.2rem; } body.dock-top .dk, body.dock-bottom .dk { min-width: 3rem; }
  .annwrap { flex-direction: column; align-items: stretch; gap: 1.6rem; margin-bottom: 1rem; } .anngnome { align-self: flex-start; margin-left: 1rem; order: 2; }
  .annbox::before { left: 1.6rem; top: auto; bottom: -18px; border-width: 18px 9px 0 9px; border-color: var(--built-tag) transparent transparent transparent; } .annbox::after { left: calc(1.6rem + 2px); top: auto; bottom: -14px; border-width: 16px 8px 0 8px; border-color: var(--panel-bg) transparent transparent transparent; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .gn, .annbox { animation: none !important; } .annbox { opacity: 1; } .announce { animation: none; } }
[hidden] { display: none !important; }

body.dock-top .dk, body.dock-bottom .dk { width: auto; min-width: 5rem; } body.dock-top .dock .tabs, body.dock-bottom .dock .tabs { justify-content: flex-start; }

/* ---------- the garden, at the game's own sizes: 1 world px = var(--w), so a gnome (45x63), the hole (160x94) and a plot (70x70) keep the game's proportions ----------
   The garden is the whole field below the hole: site.js lays out as many 70px plots as fit, and dirt.js bakes the tilled land under them (the game's shape, drawn in the grass's pixel style).
   Inside a square the row anchor (the game's gy) is at y 52.5 and the plot centre at x 35; every offset below is the game's own, in world px. */
.world { --w: 0.0625em; }
.ground { align-items: flex-start; }
.ground > .node, .ground > .hole { align-self: flex-start; height: 7.95em; display: flex; align-items: flex-end; }
.ground { position: relative; z-index: 2; }
.garden { position: absolute; z-index: 1; left: 50%; top: calc(133.6 * var(--w)); pointer-events: none; } .garden .sq { pointer-events: auto; }
.garden .soil { position: absolute; image-rendering: pixelated; pointer-events: none; }
.sq { position: absolute; width: calc(70 * var(--w)); height: calc(70 * var(--w)); padding: 0; background: none; border: 0; cursor: pointer; line-height: 0; }
.sq:hover { z-index: 3; } .sq.digging, .sq.growing, .sq.taken { cursor: default; } .sq > * { position: absolute; pointer-events: none; }
.tillout, .digout, .nag, .mound { display: none; }
.tillout, .digout { overflow: visible; fill: none; stroke: rgba(230, 40, 35, 0.88); stroke-width: 1.1; }
.tillout { left: 0; top: 0; width: 100%; height: 100%; stroke-dasharray: 6 6; } .digout { left: calc(5 * var(--w)); top: calc(24.5 * var(--w)); width: calc(60 * var(--w)); height: calc(28 * var(--w)); stroke-dasharray: 1 1; }
/* the prompts only show on the square under the mouse; a phone has no hover, so there the first square and every undug plot keep theirs (world.cpp DrawGardenGhosts / DrawDigPrompt) */
@media (hover: hover) { .sq.untilled:hover .tillout, .sq.untilled:hover .nag, .sq.undug:hover .digout, .sq.undug:hover .nag { display: block; } }
.sq.untilled.hot .tillout, .sq.untilled.hot .nag, .sq.undug.hot .digout, .sq.undug.hot .nag { display: block; }   /* under the auto-play hand */
@media (hover: none) { .garden:not(.started) .sq.seed .tillout, .garden:not(.started) .sq.seed .nag, .sq.undug .digout, .sq.undug .nag { display: block; } }
/* DrawNagArrow + DrawNagLabel: the tip rests 34px above the anchor and bobs 8px either way (sin(t*3)); head 14x8, shaft 5x8, label pill 2px above the shaft */
.nag { left: 50%; top: calc(18.5 * var(--w)); width: 0; height: 0; animation: nag 1.0472s ease-in-out infinite alternate; }
@keyframes nag { from { transform: translateY(calc(-8 * var(--w))); } to { transform: translateY(calc(8 * var(--w))); } }
.nagarrow::before { content: ""; position: absolute; left: calc(-7 * var(--w)); top: calc(-8 * var(--w)); border: calc(7 * var(--w)) solid transparent; border-top: calc(8 * var(--w)) solid rgb(235, 30, 25); border-bottom: 0; }
.nagarrow::after { content: ""; position: absolute; left: calc(-2.5 * var(--w)); top: calc(-16 * var(--w)); width: calc(5 * var(--w)); height: calc(8.5 * var(--w)); background: rgb(235, 30, 25); }
.naglabel { position: absolute; left: 0; bottom: calc(18 * var(--w)); transform: translateX(-50%); font-size: calc(12 * var(--w)); line-height: 1; padding: 0.25em 0.5em; white-space: nowrap; color: rgba(255, 255, 255, 0.9); background: rgba(20, 20, 20, 0.67); border-radius: 0.4em; }
/* a dug plot: the empty_plot mound (60x28 on the anchor), then the sprout and the crop, sized every frame by site.js exactly as world.cpp DrawPlot does */
.mound { left: calc(5 * var(--w)); top: calc(24.5 * var(--w)); width: calc(60 * var(--w)); height: calc(28 * var(--w)); image-rendering: pixelated; } .sq.empty .mound, .sq.pending .mound { display: block; }
.sq img.crop { object-fit: fill; image-rendering: pixelated; }
.bar { left: calc(15 * var(--w)); width: calc(40 * var(--w)); height: calc(5 * var(--w)); background: rgba(0, 0, 0, 0.35); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); border-radius: calc(2.5 * var(--w)); overflow: hidden; } .bar i { display: block; width: 0; height: 100%; background: rgb(76, 175, 80); }
.sq.digging .bar { top: calc(56.5 * var(--w)); } .sq.growing .bar { top: calc(-1.5 * var(--w)); visibility: hidden; } .sq.growing:hover .bar { visibility: visible; }
.spark { width: 0; height: 0; } .spark::before, .spark::after { content: ""; position: absolute; background: rgb(255, 255, 235); }
.spark::before { left: calc(-1 * var(--arm)); top: calc(-0.75 * var(--w)); width: calc(2 * var(--arm)); height: calc(1.5 * var(--w)); } .spark::after { left: calc(-0.75 * var(--w)); top: calc(-1 * var(--arm)); width: calc(1.5 * var(--w)); height: calc(2 * var(--arm)); }

/* ---------- the garden's two popups (main.cpp DrawTillConfirmPopup, ui.cpp DrawPlantPopupImpl) and the float text beside the HUD pills ---------- */
.popback { position: fixed; inset: 0; z-index: 60; } .gpop { position: fixed; z-index: 61; color: var(--text); }
.tillpop { min-width: 12.5rem; max-width: 22.5rem; padding: 0.7rem 0.75rem; text-align: center; } .tillpop h3 { margin: 0; font-size: 1.125rem; font-weight: 400; color: var(--res-title); }
.tillpop p { display: flex; align-items: center; justify-content: center; gap: 0.35rem; margin: 0.35rem 0 0.6rem; font-size: 0.94rem; }
.tillpop .row { display: flex; justify-content: center; gap: 0.5rem; } .tillpop .seg { min-width: 4.5rem; font-size: 0.94rem; } .tillpop .seg:disabled { opacity: 0.5; cursor: default; }
.plantpop { width: 12.5rem; padding: 0.5rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.375rem; }
.ptile { height: 2.375rem; padding: 0 0.3rem; display: flex; flex-direction: column; justify-content: center; gap: 0.1rem; overflow: hidden; text-align: left; line-height: 1.1; color: var(--text); background: var(--btn-bg); border: 2px solid var(--panel-border); border-radius: 6px; cursor: pointer; }
.ptile:hover:not(:disabled) { background: var(--btn-hover); } .ptile:disabled { opacity: 0.5; cursor: default; } .ptile:disabled .pn span { text-decoration: line-through; }
.ptile .pn, .ptile .pc { display: flex; align-items: center; gap: 0.25rem; white-space: nowrap; } .ptile .pn { font-size: 0.875rem; } .ptile .pc { font-size: 0.8125rem; color: var(--sub); }
.ptile img { width: 0.875rem; height: 0.875rem; object-fit: contain; image-rendering: pixelated; } .plantpop .none { grid-column: 1 / -1; margin: 0.2rem; font-size: 0.875rem; line-height: 1.35; }
.hudfloat { position: fixed; z-index: 46; pointer-events: none; white-space: nowrap; font-size: 0.95rem; color: var(--res-title); text-shadow: 0 2px 0 rgba(0, 0, 0, 0.7); animation: rise 1.4s ease-out forwards; }

/* ---- auto-play: the game's hand cursor (84px, hotspot at its fingertip: 14% across, 5% down, as main.cpp ResolveCursor) and the label that says so ---- */
.autohand { position: fixed; z-index: 70; width: 5.25rem; height: auto; margin: -0.28rem 0 0 -0.74rem; pointer-events: none; image-rendering: pixelated; opacity: 0;
  transition: left 1s ease-in-out, top 1s ease-in-out, opacity 0.3s; transform-origin: 14% 5%; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.25)); }
.autohand.on { opacity: 1; } .autohand.press { animation: handpress 0.3s linear; }
@keyframes handpress { 0%, 100% { transform: rotate(0); } 17% { transform: rotate(-14deg); } 50% { transform: rotate(12deg); } 83% { transform: rotate(-8deg); } }

/* ---- "a gnome's on the way": the job's shirt icon (22px) bobbing 2px just above a clicked tree or node, with its N/M pill at the icon's lower right (world.cpp DrawGatherPendingShirtBadge) ---- */
.shirtbadge { position: absolute; left: 50%; width: 0; height: 0; pointer-events: none; animation: shirtbob 1.0472s ease-in-out infinite alternate; }
@keyframes shirtbob { from { transform: translateY(calc(-2 * var(--w))); } to { transform: translateY(calc(2 * var(--w))); } }
.node .shirtbadge img.px { position: absolute; left: calc(-11 * var(--w)); bottom: 0; width: calc(22 * var(--w)); max-width: none; height: calc(22 * var(--w)); transform: none; }
.shirtbadge b { position: absolute; left: 0.68em; top: 0.68em; transform: translate(-50%, -50%); padding: 0.18em 0.36em; font-size: calc(11 * var(--w)); font-weight: 400; line-height: 1; white-space: nowrap;
  color: rgb(230, 230, 230); background: rgba(20, 20, 20, 0.9); border: 1px solid rgb(180, 180, 180); border-radius: 0.6em; }
/* a dock with more items than its edge has room for scrolls along that edge instead of spilling off it */
body.dock-right .dock .tabs, body.dock-left .dock .tabs { min-height: 0; overflow-y: auto; scrollbar-width: none; } body.dock-top .dock .tabs, body.dock-bottom .dock .tabs { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.dock .tabs::-webkit-scrollbar { display: none; }
/* the auto-play label sits in the middle of the field, clear of whichever edge the dock is on */

/* ---------- phones (site.js sets .mobile on a small touch screen): the game's mobile shell ----------
   Top to bottom on an upright phone: the banner, the HUD as two compact rows, the sky's edge, the hole and the resources, the garden, the ground strip, the dock. */
:root.mobile { --wf: clamp(8.5px, 2.6vw, 11px); }   /* the world scales with the phone, so the hole and the four resources always fit across it */
:root.mobile body.dock-bottom { --db: 4.1rem; } :root.mobile body.dock-top { --dt: 4.1rem; }
/* the dock is one strip of named items that scrolls sideways under a thumb; no arrows or clock in it */
:root.mobile .dock { padding: 0.3rem; } :root.mobile .dock .tools { display: none; }
:root.mobile body.dock-bottom .dk, :root.mobile body.dock-top .dk { flex: 1 1 0; min-width: 2.9rem; padding: 0.25rem 0.1rem; } :root.mobile .dock .tabs { gap: 0.15rem; } :root.mobile .dk img.ic { width: 1.7rem; height: 1.7rem; } :root.mobile .dk .gl { font-size: 1.35rem; line-height: 1.7rem; height: 1.7rem; }
/* a menu is a sheet that fills the screen from the top edge down to the dock */
:root.mobile .menupanel.L-world, :root.mobile .menupanel.L-floating, :root.mobile .menupanel.L-glide { left: calc(var(--dl) + 8px); right: calc(var(--dr) + 8px); top: calc(var(--dt) + 8px); bottom: calc(var(--db) + 8px); width: auto; height: auto;
  max-height: none; transform: none; border-radius: var(--r); border-right-width: var(--bw, 3px); }
:root.mobile .mhead h2 { font-size: 1.2rem; } :root.mobile .doctext { padding: 0.7rem 0.9rem 1.1rem; }
/* the HUD is the game's own pill stack, top-left, a little denser for a phone; the pinned badges sit stacked at the bottom, above the dock */
:root.mobile .hero { width: 100%; } :root.mobile .lead { font-size: 1.15em; margin-top: 0.5em; padding: 0.3em 0.7em; } :root.mobile .badge { font-size: 1.25em; margin-top: 0.45em; }
/* the HUD: money, gnomes and EXP on one row, the four resources on the next */
/* the hole and the resources sit closer together, and the labels keep to the bottom edge */
:root.mobile .hole { margin: 0 0.6em; } :root.mobile .ground { gap: 0.4em; }
:root.mobile .toasts { bottom: calc(var(--db) + 0.6rem); } :root.mobile .toast { font-size: 0.82rem; padding: 0.4rem 0.7rem; }
:root.mobile .autohand { width: 3.6rem; margin: -0.2rem 0 0 -0.5rem; }
/* a phone on its side has little height: the tagline goes, the HUD keeps to the left of the banner, the world starts higher and menus may take most of the screen */
@media (orientation: landscape) {
  :root.mobile { --wf: 9px; } :root.mobile body.dock-bottom { --db: 3.6rem; } :root.mobile .lead { display: none; }
  :root.mobile .world { top: 22vh; } :root.mobile .skyworld .strip, :root.mobile .panbar { height: 4vh; } :root.mobile .topbadge { bottom: calc(var(--db) + 4vh + 0.5rem); }
  :root.mobile .menupanel.L-world, :root.mobile .menupanel.L-floating, :root.mobile .menupanel.L-glide { max-height: calc(100dvh - var(--dt) - var(--db) - 16px); }
}
/* the 404 page keeps its sign in the sky (no splash there) */
main.game > .hero { position: absolute; left: 50%; top: 18vh; transform: translateX(-50%); pointer-events: auto; }
/* while the splash is up, an already-open menu waits behind it */
body:not(.splashed) .menupanel { visibility: hidden; }

/* phones: the two pinned badges stay on one compact row above the HUD, however narrow the screen */
:root.mobile .topbadge { top: auto; bottom: calc(var(--db) + 5.4vh + 0.5rem); display: flex; flex-direction: column; align-items: center; gap: 0.35rem; white-space: nowrap; }
:root.mobile .topbadge .badge { margin: 0; padding: 0.25em 0.9em; font-size: 1.1em; }
:root.mobile .hud { left: calc(var(--dl) + 0.4rem); top: calc(var(--dt) + 0.4rem); width: 12rem; gap: 0.25rem; } :root.mobile .hudtog { display: none; }
:root.mobile .pill { height: 1.75rem; } :root.mobile .coinp { width: 100%; }
:root.mobile .splash .hero .badge { margin: 0.45em 0.15em 0; }

/* ---------- the phone's minimap and speed pair (top-right, as in the game's mobile HUD); not on desktop ---------- */
.minimap { display: none; }
:root.mobile .minimap { display: block; position: fixed; z-index: 15; right: calc(var(--dr) + 0.4rem); top: calc(var(--dt) + 0.4rem); width: min(8.6rem, calc(100vw - 13.2rem)); }
.mmbox { box-sizing: content-box; height: 1.625rem; padding: 0.5rem; background: var(--panel-bg); border: 2px solid var(--panel-border); border-radius: 8px; box-shadow: var(--drop); }   /* ui.cpp kMinimapGroundH 26 + kMinimapPad 8 */
.mmground { position: relative; height: 100%; background: rgba(70, 50, 30, 0.7); border: 1.5px solid var(--panel-border); }
.mmhouse { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--rate-up); }
.mmview { position: absolute; left: 18%; right: 18%; top: 0; bottom: 0; box-sizing: border-box; background: rgba(255, 255, 255, 0.16); border: 2px solid var(--res-title); }
.mmspeed { position: relative; display: flex; gap: 0.4rem; margin-top: 0.35rem; }
.mmb { flex: 1; height: 1.7rem; padding: 0; font-size: 1rem; font-weight: 800; line-height: 1; color: var(--text); background: var(--btn-bg); border: 2px solid var(--panel-border); border-radius: 6px; box-shadow: var(--drop); cursor: pointer; } .mmb:disabled { opacity: 0.4; cursor: default; }
.mmrate { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0.05rem 0.35rem; font-size: 0.7rem; font-weight: 400; color: var(--rate-up); background: var(--pill-bg); border: 2px solid var(--pill-border); border-radius: 6px; pointer-events: none; } .mmrate.paused { color: #f08c78; border-color: #f08c78; }
/* the gnomes' walk cycle follows the game speed, and holds still while paused */
.gn.walker:not(.idle) { animation-duration: calc(0.56s / var(--sim, 1)); } body.paused .gn.walker { animation-play-state: paused; }
/* the auto-play note drops under the minimap */

/* ---------- desktop: the minimap top-centre with Pause / 0.5x / 1x / 3x under it, the two badges either side of it ---------- */
.minimap, .topbadge { --cx: var(--cxj, calc(50% + (var(--dl) - var(--dr)) / 2 - var(--pr) / 2)); --mmw: 19.5rem; }   /* site.js sets --cxj from the free space between the HUD and the dock or an open menu */
:root.mm-narrow .minimap, :root.mm-narrow .topbadge { --mmw: 13rem; }
.mmdesk { display: none; }
:root:not(.mobile) .minimap { display: block; position: fixed; z-index: 15; top: calc(var(--dt) + 0.6rem); left: var(--cx); width: var(--mmw); transform: translateX(-50%); transition: left 0.2s; }
:root:not(.mobile) .mmspeed { display: none; } :root:not(.mobile) .mmdesk { display: flex; gap: 0.35rem; margin-top: 0.4rem; }
.mmsp { flex: 1; height: 1.9rem; padding: 0; font-size: 0.78rem; color: var(--text); background: var(--btn-bg); border: 2px solid var(--panel-border); border-radius: 6px; box-shadow: var(--drop); cursor: pointer; } .mmsp:hover { background: var(--btn-hover); }
.mmsp.on { color: var(--rate-up); border-color: var(--rate-up); }

/* ---------- sliding the view a tiny bit (site.js setPan sets --pan): the world and the field move together, the sun and hills less ---------- */
.world { left: var(--pan, 0px); right: calc(0px - var(--pan, 0px)); }
.skyworld .field { background-position: var(--pan, 0px) 0; }
.skyworld .fringe { background-position: var(--pan, 0px) 0; -webkit-mask-position: var(--pan, 0px) 0; mask-position: var(--pan, 0px) 0; }
.skyworld .sun { left: calc(32vw + var(--pan, 0px) * 0.35); }
.skyworld svg { left: calc(-60px + var(--pan, 0px) * 0.55); width: calc(100% + 120px); }
/* the two handles: the minimap's ground strip and the brown strip along the bottom, whose middle dot is the thumb */
.mmground { cursor: grab; touch-action: none; } .mmground.grab { cursor: grabbing; }
.panbar { position: fixed; z-index: 10; left: 0; right: 0; bottom: var(--db); height: 5.4vh; touch-action: none; cursor: ew-resize; } .panbar.grab { cursor: grabbing; }
.skyworld .strip .thumb { width: 14px; height: 14px; top: calc(50% - 7px); transform: translateX(-50%); cursor: grab; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.35); } .skyworld .strip.grab .thumb { cursor: grabbing; }

/* desktop: the Steam and itch badges sit stacked in the bottom-right corner, just above the ground strip, out of the way of the minimap, the HUD and the garden's middle */
:root:not(.mobile) .topbadge { top: auto; left: auto; right: calc(var(--dr) + 0.8rem); bottom: calc(var(--db) + 5.4vh + 0.7rem); transform: none; display: flex; flex-direction: column; align-items: flex-end; gap: 0.35rem; white-space: nowrap; pointer-events: none; }
:root:not(.mobile) .topbadge .badge { margin: 0; font-size: 0.85rem; padding: 0.3em 0.9em; pointer-events: auto; }

/* the minimap is clickable: .game lets clicks fall through to the world, so its own pieces opt back in */
.minimap { pointer-events: auto; }
/* the pause button: two bars, and a play triangle while the game is paused (the speed badge on a phone shows the bars when paused) */
.mmsp[data-speed="0"] { display: flex; align-items: center; justify-content: center; gap: 3px; }
.mmsp .pb { width: 3px; height: 11px; background: currentColor; } .mmsp[data-speed="0"].on .pb { display: none; }
.mmsp[data-speed="0"].on::after { content: ""; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.mmrate.paused::before { content: ""; display: inline-block; width: 7px; height: 9px; vertical-align: -1px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.topbadge .badge { pointer-events: auto; }   /* the wrapper lets clicks through to the world; the badges themselves are links */
.mmground:focus-visible { outline: 2px solid var(--res-title); outline-offset: 2px; }
/* a toast is clickable: a click clears it (the stack around it lets clicks through to the world) */
.toast { pointer-events: auto; cursor: pointer; }
