/* Square Meal. The identity: cubes, bites and butcher's paper.
   - Colour: the four meats (Brawn, Zip, Hide, Gut) on cream paper, with the same dark ink
     that outlines the cel-shaded world.
   - Shape: chunky ink-edged cards with a bite taken out of a corner.
   - Type: Space Grotesk (Console Central's typeface) for words, Silkscreen for little labels. */

@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Silkscreen"; font-weight: 400; font-display: swap; src: url("/fonts/silkscreen-latin-400-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ink: #1b1328;
  --ink-soft: #3b2f4e;
  --paper: #fff6e6;
  --paper-2: #f6e8cc;
  --paper-3: #ead6b0;
  --brawn: #ff5a4e; --zip: #ffd23f; --hide: #4f8cff; --gut: #b6ff3a;
  --meat: #ff8fa3; --core: #ffe9a8; --mint: #84f9d3; --bad: #ff5a4e; --night: #6a4aa8;
  --sky: #8fd8ff;
  --text: var(--ink);
  --dim: #6e6080;
  --body: "Space Grotesk", "Trebuchet MS", system-ui, sans-serif;
  --pixel: "Silkscreen", "Cascadia Mono", Consolas, monospace;
  --shadow: 4px 4px 0 var(--ink);
  --bite: 22px;
  font-family: var(--body);
  font-weight: 500;
  background: var(--ink);
  color: var(--text);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; }
body { background: var(--sky); }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; outline: none; }

/* ---- the bite: a scalloped chunk out of the top-right corner ---------------------------------- */
.bitten {
  --b: var(--bite);
  -webkit-mask:
    radial-gradient(circle at calc(100% - var(--b) * 0.15) calc(var(--b) * 0.55), #0000 calc(var(--b) * 0.62), #000 calc(var(--b) * 0.62 + 1px)),
    radial-gradient(circle at calc(100% - var(--b) * 0.95) calc(var(--b) * 0.05), #0000 calc(var(--b) * 0.58), #000 calc(var(--b) * 0.58 + 1px)),
    radial-gradient(circle at calc(100% + var(--b) * 0.05) calc(var(--b) * 1.35), #0000 calc(var(--b) * 0.5), #000 calc(var(--b) * 0.5 + 1px));
  -webkit-mask-composite: source-in, source-in;
  mask:
    radial-gradient(circle at calc(100% - var(--b) * 0.15) calc(var(--b) * 0.55), #0000 calc(var(--b) * 0.62), #000 calc(var(--b) * 0.62 + 1px)),
    radial-gradient(circle at calc(100% - var(--b) * 0.95) calc(var(--b) * 0.05), #0000 calc(var(--b) * 0.58), #000 calc(var(--b) * 0.58 + 1px)),
    radial-gradient(circle at calc(100% + var(--b) * 0.05) calc(var(--b) * 1.35), #0000 calc(var(--b) * 0.5), #000 calc(var(--b) * 0.5 + 1px));
  mask-composite: intersect;
}
/* A mask clips any shadow on the card itself, so the ink shadow goes on a wrapper (.lift)
   and follows the bitten outline. */
.lift { filter: drop-shadow(7px 7px 0 var(--ink)); }
.lift-small { filter: drop-shadow(4px 4px 0 var(--ink)); }
.paper { background: var(--paper); border: 3px solid var(--ink); border-radius: 10px; color: var(--ink); }
.paper.bitten { box-shadow: inset 0 -5px 0 var(--paper-2); }

/* ---- buttons -------------------------------------------------------------------------------- */
button { font: 700 .82rem/1.1 var(--body); letter-spacing: .01em; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 8px; min-height: 42px; padding: .55em 1em; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); transition: transform .06s, box-shadow .06s, background .12s; }
button:hover { background: #fffdf6; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
button:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--hide); outline-offset: 3px; }
button.primary { background: var(--zip); }
button.primary:hover { background: #ffe066; }
button.quiet { background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; }
button.quiet:hover { transform: none; box-shadow: none; }
.button-link { display: inline-flex; align-items: center; gap: 8px; padding: .7em 1.1em; border-radius: 8px; font: 700 .9rem var(--body); text-decoration: none; color: var(--ink); background: var(--zip); border: 3px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
button.big { display: grid; text-align: left; gap: 2px; padding: 12px 22px; min-height: 64px; }
button.big strong { font-size: 1.35rem; letter-spacing: -.01em; }
button.big small { font-weight: 500; font-size: .8rem; opacity: .75; }
.chip-button { min-height: 34px; padding: .35em .8em; font-size: .72rem; border-width: 2px; box-shadow: 2px 2px 0 var(--ink); }
button[aria-pressed="false"].chip-button { background: var(--paper-3); }

/* ---- the top bar ------------------------------------------------------------------------------ */
.top { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; z-index: 20; pointer-events: none; }
.top > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 400 .72rem var(--pixel); letter-spacing: .1em; background: var(--paper); padding: 6px 10px; border-radius: 6px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.brand-mark { width: 16px; height: 16px; border-radius: 3px; background: conic-gradient(var(--brawn) 0 25%, var(--zip) 0 50%, var(--hide) 0 75%, var(--gut) 0); border: 2px solid var(--ink); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
body.playing .brand { display: none; }

/* ---- title -------------------------------------------------------------------------------------- */
/* The island turns behind; a hard-banded shade on the left keeps the card readable. */
.title { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; padding: 76px 5vw 24px; overflow-y: auto;
  background: linear-gradient(90deg, #1b132866 0 34%, #1b132833 34% 52%, #0000 52%); }
.title-lift { width: min(520px, 100%); animation: land .5s steps(5) both; }
.title-card { padding: 28px 30px 22px; }
@keyframes land { from { transform: translateY(24px) rotate(-1.5deg); opacity: 0; } to { transform: none; opacity: 1; } }
.logo { display: flex; align-items: center; gap: 16px; margin: 0 0 8px; }
.logo-cube { width: clamp(92px, 16vw, 128px); flex: none; filter: drop-shadow(4px 5px 0 var(--ink)); animation: bob 2.4s steps(6) infinite; }
.logo-limb { transform-origin: 90px 102px; animation: flap 1.2s steps(4) infinite; }
.logo-eye { animation: blink 5s steps(1) infinite; transform-box: fill-box; transform-origin: center; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-2deg); } }
@keyframes flap { 50% { transform: rotate(-16deg); } }
@keyframes blink { 0%, 96% { transform: none; } 97%, 99% { transform: scaleY(.15); } }
.wordmark { margin: 0; display: grid; font: 700 clamp(2.8rem, 9vw, 4.6rem)/.84 var(--body); letter-spacing: -.045em; text-transform: uppercase; }
.wordmark span { color: var(--paper); text-shadow: 3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink), 3px 3px var(--ink), -3px -3px var(--ink), 3px -3px var(--ink), -3px 3px var(--ink), 6px 7px 0 var(--ink); }
.wordmark .w1 { color: var(--zip); }
.wordmark .w2 { color: var(--brawn); margin-left: .5em; }
.kicker { margin: 14px 0 6px; font: 400 .78rem var(--pixel); letter-spacing: .06em; color: var(--brawn); text-transform: uppercase; }
.intro { margin: 0 0 16px; line-height: 1.5; color: var(--ink-soft); font-size: 1rem; }
.who { background: var(--paper-2); border: 2px dashed var(--paper-3); border-radius: 8px; padding: 10px 12px; }
.who p { margin: 0; }
.who a { color: var(--ink); font-weight: 700; text-decoration-color: var(--brawn); text-decoration-thickness: 3px; }
.note { color: var(--dim); font-size: .92rem; line-height: 1.45; margin: 4px 0; }
.title-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 10px; align-items: center; }
.big-link { min-height: 64px; padding: 0 22px; font-size: 1.05rem; }
.dev-login { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dev-login label { font-weight: 700; }
.dev-login input { font: 500 1rem var(--body); padding: 9px 10px; border: 3px solid var(--ink); border-radius: 8px; background: #fff; color: var(--ink); width: 11em; }
.online-line { margin: 6px 0 12px; font: 400 .72rem var(--pixel); color: var(--dim); }
.online-line::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 8px; background: var(--gut); border: 2px solid var(--ink); border-radius: 2px; animation: blink 2s steps(1) infinite; }
.meat-key { list-style: none; margin: 0; padding: 12px 0 0; border-top: 3px dotted var(--paper-3); display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.meat-key li { display: grid; justify-items: start; gap: 2px; font-weight: 700; font-size: .88rem; }
.meat-key i { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 3px; box-shadow: inset 0 -5px 0 #0002; }
.meat-key small { font-weight: 500; font-size: .7rem; color: var(--dim); }
.meat-key .brawn i { background: var(--brawn); } .meat-key .zip i { background: var(--zip); } .meat-key .hide i { background: var(--hide); } .meat-key .gut i { background: var(--gut); }

/* ---- dialogs ------------------------------------------------------------------------------------ */
.help { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; background: #1b1328aa; padding: 16px; overflow-y: auto; }
.help > .lift { max-width: 660px; width: 100%; }
.journal > .lift { max-width: 800px; }
.help-card { padding: 24px 28px; max-height: calc(100dvh - 40px); overflow-y: auto; }
.help-card h2 { margin: 0 0 12px; font: 700 2rem/1 var(--body); letter-spacing: -.03em; }
.help-card li { margin: 0 0 8px; line-height: 1.5; color: var(--ink-soft); }
.help-card strong { color: var(--ink); }
.chip { display: inline-block; padding: 0 7px; border-radius: 4px; color: var(--ink); font-weight: 700; border: 2px solid var(--ink); line-height: 1.35; }
.chip.brawn { background: var(--brawn); } .chip.zip { background: var(--zip); } .chip.hide { background: var(--hide); } .chip.gut { background: var(--gut); }
.controls { width: 100%; border-collapse: collapse; margin: 8px 0 12px; font-size: .86rem; }
.controls th, .controls td { text-align: left; padding: 5px 8px; border-bottom: 2px dotted var(--paper-3); color: var(--ink-soft); }
.controls thead th { font: 400 .68rem var(--pixel); color: var(--dim); }
.controls tbody th { color: var(--ink); white-space: nowrap; }

.journal-tabs { display: flex; gap: 8px; margin: 0 0 14px; }
.journal-tabs button { min-height: 36px; }
.journal-tabs button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.journal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 12px; margin: 0 0 16px; }
.journal-card { background: #fff; border: 3px solid var(--ink); border-radius: 8px; padding: 10px 12px; box-shadow: 3px 3px 0 var(--ink); }
.journal-card strong { display: block; margin: 8px 0 4px; font-size: 1.1rem; letter-spacing: -.01em; }
.journal-card.locked { background: var(--paper-2); box-shadow: 2px 2px 0 var(--paper-3); border-color: var(--paper-3); }
.journal-card.locked strong { color: var(--dim); }
.journal-swatch { display: flex; gap: 5px; }
.journal-swatch i { width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 5px; box-shadow: inset 0 -6px 0 #0002; }
.journal-card.locked .journal-swatch i { border-style: dashed; border-color: var(--dim); box-shadow: none; }
.journal-how, .journal-perk { margin: 4px 0 0; font-size: .82rem; color: var(--dim); line-height: 1.4; }
.journal-perk { color: var(--ink-soft); }
.journal-card.locked .journal-perk { font-style: italic; }
.journal-card .chip { font-size: .72rem; }

/* ---- loading: a cube chomping ---------------------------------------------------------------- */
.loading { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; z-index: 9; pointer-events: none; }
.loading p { margin: 0; font: 400 .8rem var(--pixel); background: var(--paper); border: 2px solid var(--ink); border-radius: 6px; padding: 4px 10px; box-shadow: 2px 2px 0 var(--ink); }
.chomp { position: relative; width: 64px; height: 64px; }
.chomp i { position: absolute; left: 0; right: 0; height: 32px; background: var(--brawn); border: 3px solid var(--ink); }
.chomp i:first-child { top: 0; border-radius: 8px 8px 0 0; background: var(--zip); transform-origin: 0 100%; animation: chomp .5s steps(3) infinite alternate; }
.chomp i:last-child { bottom: 0; border-radius: 0 0 8px 8px; }
@keyframes chomp { to { transform: rotate(-28deg); } }
.offline { position: fixed; inset: 0; display: grid; place-items: center; background: #1b132888; z-index: 40; }
.offline p { padding: 16px 22px; font: 700 1rem var(--body); box-shadow: var(--shadow); }

/* ---- HUD -------------------------------------------------------------------------------------- */
.hud { position: fixed; inset: 0; pointer-events: none; z-index: 5; font-size: .88rem; }
.hud button { pointer-events: auto; }
.status { position: absolute; left: 14px; bottom: 14px; width: min(310px, calc(100vw - 28px)); filter: drop-shadow(4px 4px 0 var(--ink)); }
.status-card { padding: 12px 14px 10px; display: grid; gap: 7px; --bite: 18px; }
.status-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-right: 18px; }
.tier { font: 700 1.15rem/1 var(--body); letter-spacing: -.02em; }
.limbs { display: flex; gap: 4px; }
/* Limb pips are little cubes: a lit top, a darker body. */
.pip { width: 15px; height: 15px; border: 2px solid var(--ink); border-radius: 3px; position: relative; overflow: hidden; background: var(--paper-3); box-shadow: inset 0 4px 0 #fff8; }
.pip.on { background: var(--gut); box-shadow: inset 0 4px 0 #fff9, inset 0 -3px 0 #0002; }
.pip.lost { background: var(--meat); }
.pip.none { opacity: .25; }
.pip u { position: absolute; left: 0; right: 0; bottom: 0; background: var(--gut); }
.meter { display: grid; grid-template-columns: 62px 1fr auto; align-items: center; gap: 8px; }
.meter-label { font: 400 .62rem var(--pixel); color: var(--dim); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { position: relative; height: 14px; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 4px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; transition: width .12s; }
.vigor .bar { height: 20px; }
.vigor .bar i { background: repeating-linear-gradient(90deg, var(--brawn) 0 14px, #ff7a70 14px 16px); }
.vigor .bar span { position: relative; display: block; text-align: center; font: 700 .72rem/16px var(--body); color: var(--ink); }
.stomach .bar i { background: var(--zip); }
.stomach.empty .meter-label { color: var(--bad); animation: wobble .6s steps(4) infinite; }
.grow { grid-template-columns: 1fr 90px; }
.grow .meter-label { color: var(--ink-soft); }
.grow .bar i { background: var(--mint); }
.molt .bar i { background: var(--core); }
.form { font: 700 .74rem var(--body); color: var(--ink); background: var(--core); border: 2px solid var(--ink); border-radius: 4px; padding: 1px 6px; }
.diet { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px 0 2px; border-top: 2px dotted var(--paper-3); border-bottom: 2px dotted var(--paper-3); }
.meat { display: grid; grid-template-columns: 16px 1fr; grid-template-rows: auto auto; column-gap: 5px; align-items: center; }
.meat i { width: 16px; height: 16px; border: 2px solid var(--ink); border-radius: 3px; grid-row: span 2; box-shadow: inset 0 -4px 0 #0002; }
.meat span { font: 400 .55rem var(--pixel); text-transform: uppercase; color: var(--dim); }
.meat b { font: 700 .95rem/1 var(--body); }

.side { position: absolute; right: 14px; top: 62px; display: grid; gap: 8px; justify-items: end; }
.map-frame { position: relative; border: 3px solid var(--ink); border-radius: 10px; overflow: hidden; --bite: 16px; background: var(--ink); }
#minimap { display: block; width: 180px; height: 180px; image-rendering: pixelated; background: var(--hide); }
.compass { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); font: 400 .6rem var(--pixel); color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: 3px; padding: 0 3px; }
.online { margin: 0; background: var(--paper); padding: 3px 8px; border-radius: 6px; font: 400 .6rem var(--pixel); border: 2px solid var(--ink); }
.toolbar { display: grid; grid-template-columns: repeat(4, 44px); gap: 6px; }
/* Tool buttons: an icon above a tiny label. The icons are drawn as masks so they take the ink colour. */
.tool { width: 44px; height: 50px; min-height: 0; padding: 26px 0 4px; font: 400 .5rem var(--pixel); text-transform: uppercase; position: relative; box-shadow: 2px 2px 0 var(--ink); border-width: 2px; overflow: hidden; white-space: nowrap; text-overflow: clip; }
.tool::before, .context::before { content: ""; position: absolute; left: 50%; top: 5px; width: 20px; height: 20px; transform: translateX(-50%); background: var(--ink); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.icon-journal { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3 2h11l3 3v13H3zM6 6h7v2H6zm0 4h7v2H6z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.icon-sniff { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M8 2h4v8h4v5a3 3 0 0 1-3 3H7a3 3 0 0 1-3-3v-5h4zM7 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2zm6 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.icon-photo { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 5h4l2-2h4l2 2h4v12H2zm8 2a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm0 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
.icon-feral { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M2 4h16v4l-3 2-2-2-3 6-3-6-2 2-3-2z'/%3E%3C/svg%3E"); }
.icon-den { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M1 17 6 7h8l5 10zm6-1h6l-1-5H8z' fill-rule='evenodd'/%3E%3C/svg%3E"); }
#feral[aria-pressed="true"] { background: var(--brawn); }
#feral[aria-pressed="true"]::after { content: "on"; position: absolute; top: 2px; right: 3px; font-size: .45rem; }
.context { position: relative; padding-left: 38px; }
.context::before { left: 18px; top: 50%; transform: translate(-50%, -50%); }
.context:not(.icon-den)::before { display: none; }
.context:not(.icon-den) { padding-left: 1em; }
.context:disabled { opacity: 0.6; cursor: default; filter: saturate(0.5); }
.den-badge { margin: 0; background: var(--mint); color: var(--ink); border: 2px solid var(--ink); border-radius: 6px; padding: 3px 8px; font: 400 .6rem var(--pixel); text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink); }
.pack-list { margin: 0; max-width: 200px; text-align: right; font: 700 .78rem var(--body); background: var(--mint); border: 2px solid var(--ink); border-radius: 6px; padding: 3px 8px; }
.pack-list:empty { display: none; }

.emotes { position: absolute; right: 14px; bottom: 14px; display: grid; grid-template-columns: repeat(3, auto); gap: 6px; }
.emotes button { min-height: 30px; padding: .3em .7em; font-size: .74rem; border-width: 2px; border-radius: 14px 14px 14px 3px; box-shadow: 2px 2px 0 var(--ink); }

/* The name of the land you're in, underlined in that land's colour. */
.area { position: absolute; top: 15%; left: 0; right: 0; margin: 0 auto; width: max-content; max-width: 90vw; text-align: center; font: 700 clamp(1.8rem, 5vw, 3rem)/1 var(--body); letter-spacing: -.03em; color: var(--paper); text-transform: uppercase; opacity: 0;
  text-shadow: 3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink), 3px 3px var(--ink), -3px -3px var(--ink), 3px -3px var(--ink), -3px 3px var(--ink), 5px 6px 0 var(--ink);
  padding-bottom: 10px; background: linear-gradient(var(--area, var(--zip)), var(--area, var(--zip))) center bottom / 60% 8px no-repeat; }
.area[data-biome="meadow"] { --area: var(--zip); } .area[data-biome="forest"] { --area: var(--brawn); } .area[data-biome="marsh"] { --area: var(--gut); }
.area[data-biome="tundra"] { --area: var(--hide); } .area[data-biome="rock"] { --area: var(--paper-3); } .area[data-biome="beach"] { --area: var(--core); }
.area.show { animation: area 3.2s steps(8) forwards; }
@keyframes area { 0% { opacity: 0; transform: translateY(10px) scale(.96); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; } }

/* Prompts, with keycaps. */
.prompt { position: absolute; left: 50%; bottom: 25%; transform: translateX(-50%); margin: 0; background: var(--paper); color: var(--ink); padding: 9px 16px; border: 3px solid var(--ink); border-radius: 22px; font: 700 .95rem var(--body); box-shadow: var(--shadow); white-space: nowrap; }
.prompt kbd, .toast kbd { display: inline-block; min-width: 1.7em; padding: 1px 6px; margin: 0 2px; text-align: center; font: 700 .85em var(--body); background: var(--zip); border: 2px solid var(--ink); border-radius: 5px; box-shadow: 0 3px 0 var(--ink); position: relative; top: -2px; }
.action { position: absolute; left: 50%; bottom: calc(25% - 24px); transform: translateX(-50%); width: 180px; height: 14px; background: var(--paper-2); border: 3px solid var(--ink); border-radius: 7px; overflow: hidden; box-shadow: 2px 2px 0 var(--ink); }
.action i { position: absolute; inset: 0 auto 0 0; background: var(--zip); }
.action.thrash { border-color: var(--bad); animation: wobble .3s steps(3) infinite; }
.action.thrash i { background: var(--bad); }
.dazed { position: absolute; top: 38%; left: 0; right: 0; text-align: center; margin: 0; font: 700 3rem var(--body); letter-spacing: -.03em; color: var(--zip); animation: wobble .6s steps(4) infinite;
  text-shadow: 3px 0 var(--ink), -3px 0 var(--ink), 0 3px var(--ink), 0 -3px var(--ink), 5px 6px 0 var(--ink); }
@keyframes wobble { 50% { transform: rotate(-4deg) scale(1.05); } }
.hidden-badge { position: absolute; left: 14px; bottom: 232px; margin: 0; background: var(--ink); color: var(--mint); border: 2px solid var(--ink); border-radius: 6px; padding: 4px 10px; font: 400 .62rem var(--pixel); text-transform: uppercase; box-shadow: 2px 2px 0 #0006; }

/* Toasts: little paper speech bubbles with a coloured tab. */
.toasts { position: absolute; top: 62px; left: 14px; display: grid; gap: 8px; max-width: min(400px, calc(100vw - 230px)); }
.toast { position: relative; background: var(--paper); color: var(--ink); border: 3px solid var(--ink); border-left-width: 10px; border-left-color: var(--mint); border-radius: 6px 12px 12px 6px; padding: 8px 12px; font-size: .88rem; line-height: 1.35; box-shadow: 3px 3px 0 var(--ink); transition: opacity .5s; animation: pop .25s steps(3); }
.toast.gold { border-left-color: var(--zip); background: #fff8d6; }
.toast.bad { border-left-color: var(--brawn); }
.toast.out { opacity: 0; }
@keyframes pop { from { transform: translateX(-12px); opacity: 0; } }

.photo-bar { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 10px; pointer-events: auto; }
body.photo .hud > *:not(.photo-bar):not(.toasts) { display: none !important; }
body.photo .top { display: none; }

/* Touch controls. */
.touch { position: absolute; inset: 0; }
.stick { position: absolute; width: 112px; height: 112px; margin: -56px 0 0 -56px; border: 3px solid var(--paper); border-radius: 50%; background: #1b132833; }
.knob { position: absolute; left: 30px; top: 30px; width: 46px; height: 46px; border-radius: 50%; background: var(--paper); border: 3px solid var(--ink); }
.touch button { position: absolute; pointer-events: auto; width: 78px; height: 78px; border-radius: 50%; font-size: .9rem; }
.t-bite { right: 22px; bottom: 120px; background: var(--brawn); }
.t-grab { right: 112px; bottom: 70px; background: var(--gut); }

@media (max-width: 760px) {
  .title { align-items: flex-end; padding: 64px 12px 12px; background: linear-gradient(0deg, #1b132866 0 60%, #0000 60%); }
  .title-card { padding: 20px 18px 16px; }
  .title-lift { width: 100%; }
  .meat-key { grid-template-columns: repeat(2, 1fr); }
  .side { top: 56px; } #minimap { width: 120px; height: 120px; } .toolbar { grid-template-columns: repeat(2, 44px); }
  .emotes { display: none; }
  .status { width: calc(100vw - 28px); }
  .toasts { max-width: calc(100vw - 170px); }
  .actions .chip-button { padding: .3em .55em; }
}
@media (prefers-reduced-motion: reduce) {
  .dazed, .logo-cube, .logo-limb, .logo-eye, .chomp i, .title-lift, .online-line::before, .stomach.empty .meter-label { animation: none; }
  .area.show { animation-duration: .01s; opacity: 1; }
}

/* Your colour on the wheel, under the limb squares. */
.hue { display: flex; align-items: center; gap: 6px; margin: 2px 0 6px; font-size: 11px; line-height: 1.25; color: var(--ink); opacity: .85; }
.hue i { flex: none; width: 12px; height: 12px; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper-3); }

/* Cravings and renown, under the map. */
.goals { width: 220px; border: 3px solid var(--ink); border-radius: 8px; padding: 7px 9px 6px; box-shadow: 3px 3px 0 var(--ink); display: grid; gap: 4px; }
.goals-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.goals-head strong { font: 700 .95rem/1 var(--body); }
.goals-head span { font: 400 .55rem var(--pixel); color: var(--dim); text-transform: uppercase; }
.renown-bar { height: 8px; border-width: 2px; }
.renown-bar i { background: var(--zip); }
.goals-label { margin: 2px 0 0; font: 400 .55rem var(--pixel); color: var(--dim); text-transform: uppercase; }
.cravings { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cravings li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 5px; font: 700 .74rem/1.2 var(--body); border-top: 2px dotted var(--paper-3); padding-top: 4px; }
.cravings li:first-child { border-top: 0; padding-top: 0; }
.cravings b { font: 400 .55rem var(--pixel); color: var(--ink); background: var(--zip); border: 2px solid var(--ink); border-radius: 4px; padding: 1px 4px; white-space: nowrap; }
.cravings button { min-height: 0; width: 20px; height: 20px; padding: 0; font: 700 .7rem/1 var(--body); border-width: 2px; border-radius: 5px; box-shadow: 1px 1px 0 var(--ink); }
.cravings button:disabled { opacity: .35; }
.cravings li.done { animation: pop .3s steps(3); background: #fff8d6; }
@media (max-width: 760px) {
  .goals { width: 150px; padding: 5px 7px; }
  .cravings li { font-size: .66rem; grid-template-columns: 1fr auto; }
  .cravings button { display: none; }
}

/* Your brood, under the den button. */
.brood-list { margin: 0; white-space: pre-line; font: 700 .74rem/1.35 var(--body); }
/* Short screens: a smaller map and a tighter goals card keep the right-hand column clear of the emotes. */
@media (max-height: 720px) {
  #minimap { width: 130px; height: 130px; }
  .side { gap: 6px; }
  .goals { gap: 2px; padding: 5px 8px; }
  .cravings li { padding-top: 2px; }
}

/* Orders for your kids. */
.orders { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; margin-top: 2px; }
.orders button { min-height: 0; padding: 3px 0; font: 400 .5rem var(--pixel); text-transform: uppercase; border-width: 2px; border-radius: 5px; box-shadow: 1px 1px 0 var(--ink); }
.orders button[aria-pressed="true"] { background: var(--mint); }
