/* Sju nätter – the HUD, the menus and the touch controls over the 3D picture. The box, the corner buttons and the
   start screen's frame come from css/game-stage.css. Everything over the game is clear and warm (the fire's
   yellow), so it reads against the dark forest; nothing sits on a corner button. */

.sk-stage { cursor: default; }
.sk-stage.is-playing { cursor: none; }
.sk-stage.is-playing.is-menu-open, .sk-stage.is-playing.is-touch { cursor: default; }
.sk-stage #game { image-rendering: pixelated; image-rendering: crisp-edges; }

.sk-hud { position: absolute; inset: 0; pointer-events: none; font-weight: 700; }
.sk-stage:not(.is-playing) .sk-hud { display: none; }
.sk-stage.is-menu-open .sk-aim, .sk-stage.is-menu-open .sk-note { display: none; }   /* the pause menu alone (Ramel) */

/* the clock: "Natt 2 av 7" and the sun/moon arc, top middle (clear of the pause and fullscreen buttons) */
.sk-clock {
  position: absolute; top: calc(0.5rem + var(--safe-top, 0px)); left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.1rem;
  font-size: calc(0.95rem * var(--ui, 1)); color: #ffe9a8; text-shadow: 0 0 6px rgba(0, 0, 0, 0.9), 0 1px 2px #000;
}
.sk-clock.is-night { color: #b9c8ff; }
.sk-day-row { display: flex; align-items: center; gap: 0.4rem; }
.sk-weather { display: inline-flex; width: calc(1.5rem * var(--ui, 1)); height: calc(1.5rem * var(--ui, 1)); filter: drop-shadow(0 1px 2px #000); }
.sk-weather:empty { display: none; }
.sk-weather .sk-picture { width: 100%; height: 100%; }
.sk-weather[data-kind="storm"] { animation: sk-weather-flash 1.6s steps(2, end) infinite; }
@keyframes sk-weather-flash { 50% { filter: drop-shadow(0 1px 2px #000) brightness(1.5); } }
@media (prefers-reduced-motion: reduce) { .sk-weather[data-kind="storm"] { animation: none; } }
.sk-arc { position: relative; width: calc(9rem * var(--ui, 1)); height: calc(1.6rem * var(--ui, 1)); border-bottom: 2px solid rgba(255, 233, 168, 0.5); overflow: hidden; }
.sk-sun, .sk-moon { position: absolute; left: 0; bottom: -0.4rem; width: calc(0.9rem * var(--ui, 1)); height: calc(0.9rem * var(--ui, 1)); border-radius: 50%; transform: translateX(-50%); }
.sk-sun { background: #ffd34d; box-shadow: 0 0 10px #ffb400; }
.sk-moon { background: #dfe8ff; box-shadow: 0 0 8px #aab8ff; }

/* the fire's fuel: a flame and a bar, top left under the pause button */
.sk-fire {
  position: absolute; top: calc(3.6rem + var(--safe-top, 0px)); left: calc(0.7rem + var(--safe-left, 0px));
  display: flex; align-items: center; gap: 0.35rem;
}
.sk-icon { width: calc(1.4rem * var(--ui, 1)); height: calc(1.4rem * var(--ui, 1)); fill: #ffb84d; filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.9)); }
.sk-bar { width: calc(7rem * var(--ui, 1)); height: calc(0.9rem * var(--ui, 1)); background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.35); }
.sk-bar span { display: block; height: 100%; width: 100%; background: #ffb84d; transition: width 0.3s linear; }
.sk-fire.is-low .sk-bar span { background: var(--magenta, #ff3fb4); animation: sk-blink 0.6s steps(2) infinite; }
.sk-fire.is-out .sk-icon { fill: #666; }
/* the fire's level: one lit pip per level (sim.js fireStage) */
.sk-fire-level { display: flex; gap: 3px; }
.sk-fire-level i { width: calc(0.45rem * var(--ui, 1)); height: calc(0.45rem * var(--ui, 1)); transform: rotate(45deg); border: 1px solid rgba(255, 184, 77, 0.6); background: rgba(0, 0, 0, 0.5); }
.sk-fire-level i.is-on { background: #ffb84d; box-shadow: 0 0 6px #ff9a30; }
@keyframes sk-blink { to { opacity: 0.35; } }

/* the radio and the towers, under the fire meter: the radio is dim until it stands, one tower picture per tower
   (waiting / its signal is out / given to the radio), and the signal I carry on my way home */
.sk-radio { position: absolute; top: calc(3.6rem + var(--safe-top, 0px) + 2rem * var(--ui, 1)); left: calc(0.7rem + var(--safe-left, 0px)); display: flex; align-items: center; gap: 0.35rem; filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.9)); }
.sk-radio .sk-picture { width: calc(1.6rem * var(--ui, 1)); height: calc(1.6rem * var(--ui, 1)); }
.sk-radio.is-missing .sk-radio-icon { opacity: 0.4; }
.sk-radio.is-complete .sk-radio-icon { filter: drop-shadow(0 0 6px #5ef0ff); }
.sk-tower-pip.is-idle { opacity: 0.55; }
.sk-tower-pip.is-taken { filter: drop-shadow(0 0 5px #ffe34d); animation: sk-blink 0.6s steps(2) infinite; }
.sk-tower-pip.is-done { filter: drop-shadow(0 0 6px #5ef0ff); }
.sk-radio { pointer-events: auto; cursor: pointer; }
.sk-radio-key { display: flex; align-items: center; margin-left: 0.3rem; padding: 0.1rem 0.25rem; border: 1px solid #9fe6ff; background: rgba(4, 6, 20, 0.7); animation: sk-blink 1s steps(2) infinite; }
/* the map in the middle of the picture */
.sk-map { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(78cqh, 26rem); border: 2px solid rgba(255, 233, 168, 0.6); box-shadow: 0 0 18px rgba(0, 0, 0, 0.8); pointer-events: auto; cursor: pointer; z-index: 4; }
.sk-map canvas { display: block; width: 100%; height: auto; }
.sk-radio-signal { display: flex; align-items: center; gap: 0.15rem; margin-left: 0.3rem; padding: 0.1rem 0.3rem; border: 1px solid #ffe34d; background: rgba(4, 6, 20, 0.7); color: #ffe34d; animation: sk-blink 0.8s steps(2) infinite; }

/* health and food, bottom left */
.sk-vitals { position: absolute; left: calc(0.7rem + var(--safe-left, 0px)); bottom: calc(0.7rem + var(--safe-bottom, 0px)); display: flex; flex-direction: column; gap: 0.3rem; }
.sk-vital { display: flex; align-items: center; gap: 0.35rem; }
.sk-vital:first-child .sk-icon { fill: #ff5a7a; }
.sk-vital:first-child .sk-bar span { background: #ff5a7a; }
.sk-vital:nth-child(2) .sk-icon { fill: #9be36a; }
.sk-vital:nth-child(2) .sk-bar span { background: #9be36a; }
.sk-vital.is-low .sk-bar span { animation: sk-blink 0.6s steps(2) infinite; }

/* the quick slots, bottom middle */
.sk-slots { position: absolute; left: 50%; bottom: calc(0.6rem + var(--safe-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 0.4rem; pointer-events: auto; }
.sk-slot {
  position: relative; width: calc(3.5rem * var(--ui, 1)); height: calc(3.7rem * var(--ui, 1)); border: 2px solid rgba(255, 255, 255, 0.35);
  background: rgba(4, 6, 20, 0.6); color: #fff; padding: 0.35rem; cursor: pointer;
}
.sk-slot svg { width: 75%; height: 68%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sk-slot kbd { position: absolute; left: 0.15rem; top: 0.1rem; font-size: 0.7rem; opacity: 0.9; font-family: inherit; }
.sk-slot-label { display: block; font-size: max(11px, calc(0.65rem * var(--ui, 1))); white-space: nowrap; }
.sk-slot.is-chosen { border-color: var(--yellow, #ffe34d); color: var(--yellow, #ffe34d); box-shadow: 0 0 10px rgba(255, 227, 77, 0.5); }
.sk-slot.is-on { border-color: #ffe9a8; color: #ffe9a8; background: rgba(255, 184, 77, 0.3); }
.sk-slot.is-off { opacity: 0.4; }
.sk-slot[data-tier]:not([data-tier="0"])::after { position: absolute; right: 0.25rem; top: 0.1rem; font-size: 0.55rem; color: #5ef0ff; letter-spacing: 1px; }
.sk-slot[data-tier="1"]::after { content: "●"; }
.sk-slot[data-tier="2"]::after { content: "●●"; }
.sk-helmet { display: flex; align-items: center; gap: 0.3rem; font-size: 0.6rem; color: #5ef0ff; }
.sk-helmet .sk-picture { width: calc(1.4rem * var(--ui, 1)); height: calc(1.4rem * var(--ui, 1)); }
.sk-vital.is-healing .sk-bar span { box-shadow: 0 0 10px #9be36a, 0 0 3px #fff; filter: brightness(1.35); }
.sk-vital.is-healing .sk-icon { color: #9be36a; }
.sk-battery { position: absolute; left: 0.3rem; right: 0.3rem; bottom: 0.25rem; height: 0.28rem; background: rgba(255, 255, 255, 0.18); }
.sk-battery i { display: block; height: 100%; width: 100%; background: #ffe9a8; transition: width 1s linear; }
.sk-battery.is-low i { background: #ff3fb4; }
.sk-battery.is-charging i { background: #5ef0ff; animation: sk-charge 0.8s ease-in-out infinite alternate; }
.sk-battery.is-dead { outline: 1px solid #ff3fb4; }
@keyframes sk-charge { from { opacity: 0.55; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sk-battery.is-charging i { animation: none; } }
.is-touch .sk-slots { display: none; }
.sk-stage:not(.has-mouse) .sk-slot kbd { display: none; }

/* Fixed positions for resources; the same pictures also appear in action hints and recipes. */
.sk-right {
  position: absolute; right: calc(0.7rem + var(--safe-right, 0px)); bottom: calc(5rem + var(--safe-bottom, 0px));
  display: flex; flex-direction: row; align-items: flex-end; gap: 0.6rem;
  color: #fff; text-shadow: 0 1px 2px #000;
}
.sk-pack, .sk-storage {
  width: calc(15rem * var(--sk-scale, 1)); padding: 0.55rem; border: 1px solid rgba(255, 233, 168, 0.5);
  background: rgba(4, 6, 20, 0.88); font-size: 0.85rem;
}
.sk-storage { border-color: #ffb84d; }
.sk-storage[hidden] { display: none; }
.sk-inventory-head { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.4rem; font-size: 0.95rem; color: #ffe9a8; }
.sk-inventory-head .sk-picture { width: 1.65rem; height: 1.65rem; }
.sk-capacity { margin-left: auto; font-variant-numeric: tabular-nums; }
.sk-goods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.3rem; }
.sk-item { position: relative; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0 0.1rem; padding: 0.3rem; background: rgba(255, 233, 168, 0.08); }
.sk-item > .sk-picture { width: 2rem; height: 2rem; grid-row: 1 / 3; }
.sk-amount { font-size: 1.2rem; font-variant-numeric: tabular-nums; text-align: center; }
.sk-item-name { grid-column: 1 / 3; grid-row: 3; text-align: center; font-size: 0.75rem; }
.sk-item.is-empty { background: rgba(255, 255, 255, 0.025); }
.sk-item.is-empty .sk-picture { opacity: 0.48; }
.sk-item.is-empty .sk-amount { color: #aeb1bd; }
.sk-places { display: flex; gap: 3px; margin-top: 0.45rem; }
.sk-places i { flex: 1; height: 5px; background: rgba(255, 255, 255, 0.18); }
.sk-places i.is-used { background: #ffcf72; }
.sk-pack.is-full .sk-capacity { color: #ff77c6; }
.sk-pack.is-full .sk-places i.is-used { background: #ff77c6; }
.sk-picture { display: inline-block; width: 2rem; height: 2rem; flex-shrink: 0; vertical-align: middle; }
.sk-delta { position: absolute; right: 0; top: -0.35rem; font-size: 1rem; color: #ffe9a8; opacity: 0; text-shadow: 0 1px 3px #000; }
.sk-item.is-loss .sk-delta { color: #ffb6db; }
.sk-item.is-feedback .sk-delta { animation: sk-delta 1.15s ease-out both; }
.sk-item.is-feedback .sk-amount { animation: sk-count 0.45s ease-out; }
.sk-item.is-new { animation: sk-arrive 1.1s ease-out; }
.sk-fire.is-feedback, .sk-vital.is-feedback { animation: sk-confirm 0.6s ease-out; }
.sk-pack.is-refused { animation: sk-refused 0.5s ease-out; }
@keyframes sk-delta { 0%, 30% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-16px); } }
@keyframes sk-count { 35% { transform: scale(1.45); color: #ffe34d; } }
@keyframes sk-arrive { 0%, 30% { background: rgba(255, 227, 77, 0.38); } }
@keyframes sk-confirm { 30% { filter: brightness(1.8); transform: scale(1.08); } }
@keyframes sk-refused { 20%, 60% { transform: translateX(-4px); border-color: #ff3fb4; } 40%, 80% { transform: translateX(4px); border-color: #ff3fb4; } }

/* the aim: a small cross in the middle, what E does under it, the help-hold's ring */
.sk-aim { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 0.3rem; }
.sk-cross { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); box-shadow: 0 0 4px #000; }
.sk-aim.is-target .sk-cross { background: var(--yellow, #ffe34d); box-shadow: 0 0 8px var(--yellow, #ffe34d); }
.sk-aim-label { font-size: calc(1.05rem * var(--ui, 1)); color: #fff; text-shadow: 0 0 6px #000, 0 1px 2px #000; white-space: nowrap; min-height: 1.2em; }
.sk-aim-label { display: flex; align-items: center; gap: 0.25rem; padding: 0.15rem 0.4rem; background: rgba(4, 6, 20, 0.75); }
.sk-aim-label:empty { background: none; }
.sk-aim-label .sk-picture { width: 1.8em; height: 1.8em; }
.sk-aim-label kbd { font-family: inherit; display: inline-block; padding: 0 0.35em; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 3px; margin-right: 0.3em; font-size: 0.85em; }
.sk-hold { width: calc(5rem * var(--ui, 1)); height: 0.45rem; background: rgba(0, 0, 0, 0.6); border: 1px solid #fff; visibility: hidden; }
.sk-hold.is-holding { visibility: visible; }
.sk-hold span { display: block; height: 100%; width: 0; background: #9be36a; }

/* the build menu (B / slot 4): what you can build, with costs */
.sk-build { position: absolute; left: 50%; top: 60%; transform: translateX(-50%); display: flex; gap: 0.4rem; pointer-events: auto; }
.sk-build button {
  min-width: calc(6rem * var(--ui, 1)); padding: 0.4rem 0.5rem; border: 2px solid rgba(255, 255, 255, 0.4); background: rgba(4, 6, 20, 0.75);
  color: #fff; font: inherit; font-weight: 700; font-size: max(12px, calc(0.85rem * var(--ui, 1))); cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 0.15rem;
}
.sk-build[hidden] { display: none; }
.sk-build button > .sk-picture { width: 2.8rem; height: 2.8rem; }
.sk-cost { display: flex; gap: 0.5rem; }
.sk-cost-item { display: inline-flex; align-items: center; gap: 0.2rem; font-size: 1rem; }
.sk-cost-item .sk-picture { width: 1.5rem; height: 1.5rem; }
.sk-build button kbd { font-family: inherit; font-size: 0.75em; opacity: 0.7; }
.sk-build button small { font-weight: 400; font-size: 0.8em; color: #ffe9a8; }
.sk-build button.is-chosen { border-color: var(--yellow, #ffe34d); color: var(--yellow, #ffe34d); }
.sk-build button.is-poor { color: rgba(255, 255, 255, 0.7); border-style: dashed; }
.sk-build button.is-poor small { color: var(--magenta, #ff3fb4); }
/* Ramel's stall: price on top, an arrow down, then what you get (gear: its picture + name) */
.sk-trade .sk-flow-arrow { display: block; line-height: 1; font-size: 1.2em; color: #ffe9a8; transform: rotate(90deg); }
.sk-trade button { justify-content: flex-start; }
.sk-trade button > span:not(.sk-cost):not(.sk-flow-arrow) { font-size: 0.8em; font-weight: 400; text-align: center; }

/* a short line at the top (under the clock) and the big texts in the middle */
.sk-note { position: absolute; top: calc(4.2rem + var(--safe-top, 0px)); left: 50%; transform: translateX(-50%); margin: 0; font-size: calc(1.05rem * var(--ui, 1)); color: #fff; text-shadow: 0 0 8px #000, 0 1px 2px #000; white-space: nowrap; }
.sk-big {
  position: absolute; top: 16%; left: 50%; transform: translateX(-50%); margin: 0; font-size: calc(2.4rem * var(--ui, 1)); font-weight: 900; font-style: italic;
  color: var(--yellow, #ffe34d); text-shadow: 0 0 16px rgba(255, 227, 77, 0.6), 0 2px 4px #000; white-space: nowrap; opacity: 0; transition: opacity 0.3s;
}
.sk-big.is-shown { opacity: 1; }
.sk-big.is-red { color: var(--magenta, #ff3fb4); text-shadow: 0 0 16px rgba(255, 63, 180, 0.7), 0 2px 4px #000; }
.sk-big.is-blue { color: #b9c8ff; text-shadow: 0 0 16px rgba(185, 200, 255, 0.7), 0 2px 4px #000; }

/* red at the edges when hurt; a dark pulsing edge when the night comes (works without sound) */
.sk-vignette { position: absolute; inset: 0; box-shadow: inset 0 0 0 0 rgba(255, 40, 60, 0); transition: box-shadow 0.15s; }
.sk-vignette.is-hurt { box-shadow: inset 0 0 90px 30px rgba(255, 40, 60, 0.6); }
.sk-vignette.is-down { box-shadow: inset 0 0 140px 80px rgba(0, 0, 0, 0.85); }
.sk-dark-warn { position: absolute; inset: 0; opacity: 0; box-shadow: inset 0 0 120px 50px rgba(120, 20, 40, 0.8); }
.sk-dark-warn.is-on { animation: sk-pulse 1.2s ease-in-out infinite; }
@keyframes sk-pulse { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* ---------- the menus ---------- */

.sk-overlay[hidden] { display: none; }
.sk-overlay { background: rgba(4, 6, 20, 0.72); }
.sk-menu { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; width: min(30rem, 90%); }
.sk-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; }
.sk-label { margin: 0; color: var(--yellow, #ffe34d); font-weight: 700; }
.sk-choice {
  padding: 0.4rem 0.9rem; border: 2px solid rgba(94, 240, 255, 0.5); background: rgba(94, 240, 255, 0.08); color: var(--cyan, #5ef0ff);
  font: inherit; font-weight: 700; cursor: pointer;
}
.sk-choice.is-chosen { border-color: var(--yellow, #ffe34d); color: var(--yellow, #ffe34d); background: rgba(255, 227, 77, 0.15); }
.sk-choice.is-sure { border-color: var(--magenta, #ff3fb4); color: var(--magenta, #ff3fb4); }
.sk-choice:disabled { opacity: 0.45; cursor: default; }
.sk-privacy { font-size: 0.85rem; color: rgba(255, 255, 255, 0.7); margin: 0; text-align: center; }
.sk-privacy a { color: var(--cyan, #5ef0ff); }
.sk-rooms { display: flex; flex-direction: column; gap: 0.3rem; width: 100%; }
.sk-room { display: flex; justify-content: space-between; padding: 0.5rem 0.8rem; border: 2px solid rgba(94, 240, 255, 0.4); background: rgba(94, 240, 255, 0.06); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.sk-room:disabled { opacity: 0.5; cursor: default; }
.sk-free { color: var(--yellow, #ffe34d); }
.sk-empty { margin: 0; color: rgba(255, 255, 255, 0.6); }
.sk-code { display: flex; gap: 0.6rem; }
.sk-code-item { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; font-size: 0.75rem; color: #fff; }
.sk-code-item svg { width: 3rem; height: 3rem; }
.sk-players { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; width: 100%; max-width: 22rem; }
.sk-players li { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.6rem; background: rgba(255, 255, 255, 0.06); color: #fff; }
.sk-players li.is-you { outline: 2px solid var(--yellow, #ffe34d); }
.sk-players li.is-gone { opacity: 0.5; }
.sk-name { font-weight: 700; }
.sk-about { margin-left: auto; font-size: 0.8rem; opacity: 0.75; }
.sk-kick { margin-left: 0.4rem; border: 1px solid var(--magenta, #ff3fb4); background: none; color: var(--magenta, #ff3fb4); cursor: pointer; width: 1.6rem; height: 1.6rem; }
.sk-swatch { display: inline-flex; width: 1.6rem; height: 1rem; }
.sk-swatch i { flex: 1; }
.sk-status { margin: 0; color: rgba(255, 255, 255, 0.8); }
.sk-open { margin: 0; color: var(--cyan, #5ef0ff); }
.sk-keys { display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 0.8rem; margin: 0; max-width: 28rem; color: #fff; text-align: left; }
.sk-keys dt { display: flex; gap: 0.3rem; }
.sk-keys dd { margin: 0; }
.sk-key { display: inline-block; padding: 0.1rem 0.5rem; border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 3px; font-family: inherit; font-size: 0.85rem; }
.sk-pad { width: min(22rem, 100%); }
.sk-result { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; color: #fff; }
.sk-result strong { font-size: 2.2rem; color: var(--yellow, #ffe34d); }
.sk-lab-link { font-size: 0.8rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- touch ---------- */

.sk-touch { position: absolute; inset: 0; pointer-events: none; }
.sk-touch[hidden] { display: none; }
.sk-stick { position: absolute; width: 112px; height: 112px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.4); background: rgba(0, 0, 0, 0.25); display: none; transform: translate(-50%, -50%); }
.sk-stick.is-on { display: block; }
.sk-stick-knob { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: rgba(255, 255, 255, 0.7); }
.sk-touch-button {
  position: absolute; width: 64px; height: 64px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.5); background: rgba(4, 6, 20, 0.55); color: #fff;
  pointer-events: auto; padding: 14px; touch-action: none;
}
.sk-touch-button svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sk-touch-button.is-on { border-color: var(--yellow, #ffe34d); color: var(--yellow, #ffe34d); }
.sk-touch-button:active { background: rgba(255, 227, 77, 0.35); }
.sk-touch-use { right: calc(1rem + var(--safe-right, 0px)); bottom: calc(5.2rem + var(--safe-bottom, 0px)); width: 80px; height: 80px; border-color: var(--yellow, #ffe34d); }
.sk-touch-hit { right: calc(6.6rem + var(--safe-right, 0px)); bottom: calc(4.2rem + var(--safe-bottom, 0px)); }
.sk-touch-lamp { right: calc(1.5rem + var(--safe-right, 0px)); bottom: calc(11rem + var(--safe-bottom, 0px)); width: 52px; height: 52px; }
.sk-touch-build { right: calc(7rem + var(--safe-right, 0px)); bottom: calc(10.4rem + var(--safe-bottom, 0px)); width: 52px; height: 52px; }
.sk-touch-view { right: calc(0.9rem + var(--safe-right, 0px)); top: calc(4rem + var(--safe-top, 0px)); width: 48px; height: 48px; }
/* Reticle stays on the aim ray. Captions move independently when a small screen needs room. */
.sk-stage { container-type: size; }
.sk-aim { width: 0; height: 0; display: block; transform: none; }
.sk-cross { position: absolute; left: -3px; top: -3px; }
.sk-aim-label { position: absolute; left: 0; top: 14px; transform: translateX(-50%); }
.sk-hold { position: absolute; left: 0; top: 58px; transform: translateX(-50%); }
.sk-item-name { overflow-wrap: anywhere; }
.sk-cost { flex-wrap: wrap; justify-content: center; }
.sk-cost-item { white-space: nowrap; }
.sk-bed-up .sk-picture { width: 1.2rem; height: 1.2rem; vertical-align: -0.2rem; }
.sk-bed-up.is-missing { color: #ff9bd2; }
/* the screen goes dark while the bed skips days */
.sk-sleep-fade { position: absolute; inset: 0; background: #02030a; opacity: 0; pointer-events: none; transition: opacity 0.6s ease; z-index: 6; }
.sk-sleep-fade.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .sk-sleep-fade { transition: none; } }
.sk-cost-item.is-missing { color: #ff9bd2; }
.sk-build { top: 50%; transform: translate(-50%, -50%); width: min(94%, calc(44rem * var(--ui, 1))); }
.sk-build button { flex: 1; min-width: 0; }
.sk-build .sk-build-close { flex: 0 0 3.5rem; min-width: 3.5rem; font-size: 0.85rem; align-self: flex-start; }
.sk-stage.is-build-open .sk-right, .sk-stage.is-build-open .sk-aim { visibility: hidden; }
.sk-stage.is-build-open .sk-touch-button, .sk-stage.is-build-open .sk-touch-eat { visibility: hidden; }

/* Touch: the plates stay left of the action buttons; food remains reachable without the quick slots. */
.is-touch .sk-right { bottom: auto; top: calc(7.5rem + var(--safe-top, 0px)); right: auto; left: calc(0.7rem + var(--safe-left, 0px)); align-items: flex-start; flex-direction: column-reverse; }
.is-touch .sk-vitals { bottom: calc(1.2rem + var(--safe-bottom, 0px)); left: calc(4.4rem + var(--safe-left, 0px)); }
.sk-touch-eat { display: none; }
.is-touch .sk-touch-eat {
  display: flex; position: absolute; right: -3.2rem; bottom: 0; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 2px; border: 1px solid #ffe9a8; background: rgba(4, 6, 20, 0.88); color: #fff;
  font: inherit; font-size: 11px; pointer-events: auto; touch-action: manipulation;
}
.sk-touch-eat .sk-picture { width: 24px; height: 24px; }
.sk-touch-eat:disabled { opacity: 0.45; border-color: #999; }

@container (min-width: 1400px) { .sk-right { zoom: 1.25; } }
@container (max-width: 700px) {
  .sk-right { gap: 0.4rem; }
  .sk-pack, .sk-storage { width: 12rem; padding: 0.4rem; }
  .sk-item { padding: 0.15rem; }
  .sk-item > .sk-picture { width: 1.6rem; height: 1.6rem; }
  .sk-amount { font-size: 1.05rem; }
  .sk-slot { width: 3rem; height: 3.5rem; }
  .sk-slots { gap: 0.25rem; }
  .sk-build { gap: 0.25rem; }
  .sk-build button { padding: 0.4rem 0.2rem; font-size: 0.75rem; }
}
@container (max-height: 500px) {
  .sk-right { bottom: auto; top: calc(7.1rem + var(--safe-top, 0px)); flex-direction: row; }
  .is-touch .sk-right { flex-direction: row-reverse; }
  .sk-pack, .sk-storage { width: 11.6rem; padding: 0.3rem; }
  .sk-inventory-head { font-size: 0.8rem; margin-bottom: 0.2rem; }
  .sk-inventory-head .sk-picture { width: 1.25rem; height: 1.25rem; }
  .sk-item > .sk-picture { width: 1.45rem; height: 1.45rem; }
  .sk-item { padding: 0.15rem; }
  .sk-amount { font-size: 1.05rem; }
  .sk-note { top: 4.5rem; max-width: 70%; white-space: normal; text-align: center; }
  .sk-build button > .sk-picture { width: 2rem; height: 2rem; }
  .sk-aim-label { top: calc(4.5rem - 50cqh); }
  .sk-hold { top: calc(6.25rem - 50cqh); }
  .is-touch .sk-aim-label { top: max(14px, calc(18.5rem - 50cqh)); }
  .is-touch .sk-hold { top: max(58px, calc(21rem - 50cqh)); }
}
@container (min-height: 501px) and (min-width: 461px) and (max-width: 1199px) {
  .sk-right { flex-direction: column; }
  .is-touch .sk-right { flex-direction: column-reverse; }
  .is-touch .sk-touch-eat { right: -6rem; }
}
@container (max-width: 460px) {
  .sk-right, .is-touch .sk-right { top: auto; left: 0.5rem; right: 0.5rem; bottom: calc(4.5rem + var(--safe-bottom, 0px)); flex-direction: row; align-items: flex-end; gap: 0.4rem; }
  .sk-pack, .sk-storage { width: calc((100cqw - 1.4rem) / 2); }
  .sk-storage[hidden] + .sk-pack { margin-left: auto; }
  .sk-item { display: flex; flex-wrap: wrap; justify-content: center; column-gap: 0; padding: 0.1rem; }
  .sk-item > .sk-picture { width: 1.25rem; height: 1.25rem; order: 0; }
  .sk-item .sk-amount { order: 1; font-size: 1rem; }
  .sk-item .sk-item-name { order: 2; width: 100%; }
  .sk-goods { gap: 2px; }
  .sk-inventory-head { font-size: 0.78rem; gap: 3px; }
  .sk-inventory-head .sk-picture { width: 1.2rem; height: 1.2rem; }
  .sk-vitals, .is-touch .sk-vitals { top: calc(7rem + var(--safe-top, 0px)); left: 0.7rem; bottom: auto; }
  .sk-bar { width: 4rem; }
  .sk-aim-label { white-space: normal; text-align: center; max-width: calc(100cqw - 2rem); top: calc(12rem - 50cqh); }
  .is-touch .sk-aim-label { left: calc(-50cqw + 4.6rem); top: -1rem; width: 8rem; max-width: 8rem; flex-wrap: wrap; justify-content: center; }
  .sk-big { white-space: normal; text-align: center; font-size: 1.6rem; }
  .is-touch .sk-touch-use, .is-touch .sk-touch-hit { bottom: calc(15.5rem + var(--safe-bottom, 0px)); }
  .is-touch .sk-touch-lamp { bottom: calc(21rem + var(--safe-bottom, 0px)); }
  .is-touch .sk-touch-build { bottom: calc(20rem + var(--safe-bottom, 0px)); }
  .sk-build { flex-wrap: wrap; }
  .sk-build button { flex: 1 1 40%; }
  .sk-build .sk-build-close { flex: 1 1 100%; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .sk-item.is-feedback .sk-delta { animation: sk-delta-still 1.2s both; }
  .sk-item.is-feedback .sk-amount, .sk-item.is-new, .sk-fire.is-feedback, .sk-vital.is-feedback, .sk-pack.is-refused { animation: sk-delta-still 0.8s; }
  .sk-bar span { transition: none; }
}
@keyframes sk-delta-still { 0%, 85% { opacity: 1; background-color: rgba(255, 227, 77, 0.2); } 100% { background-color: transparent; } }

/* Ramel's stall sits low, so he himself stays in sight above it */
.sk-build.sk-trade { top: 66%; }
