/* Otter Flow — layout A (29/11): clean font without outline, slim HUD bar, column layout, one card per panel.
   --b = one design pixel (set by layout.js). Loaded last: overrides the older pinned layout where they meet. */
@font-face {
  font-family: 'Game';
  font-weight: 600;
  font-display: block;
  src: url(../assets/fonts/fredoka-latin-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC;
}
@font-face {
  font-family: 'Game';
  font-weight: 600;
  font-display: block;
  src: url(../assets/fonts/fredoka-latin-ext-600.woff2) format('woff2');
  unicode-range: U+0100-02AF, U+1E00-1EFF;
}
@font-face {
  font-family: 'Game';
  font-weight: 600;
  font-display: block;
  src: url(../assets/fonts/rubik-cyrillic-600.woff2) format('woff2');
  unicode-range: U+0400-04FF;
}

:root {
  --b: 1;
  --font:
    'Game', 'Hiragino Maru Gothic ProN', 'Hiragino Sans', 'Yu Gothic UI', 'Meiryo', 'Apple SD Gothic Neo',
    'Malgun Gothic', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', system-ui, sans-serif;
  --ink: #f6f1e6;
  --dim: #a9c3c8;
  --gold: #e9b860;
  --fy: 0em;
}
html,
body,
button,
input {
  font-family: var(--font);
  font-weight: 600;
}

/* text: clean, no outline ring; a short soft shadow only */
.txt,
.pill > span,
.plaque > span,
.toggle > span,
.clean,
.ttl,
.sub,
.row-lbl,
.how span,
.lv-node > b,
.seal-badge > span,
.map-title > b,
.map-stars .txt {
  text-shadow: 0 calc(var(--b) * 1px) calc(var(--b) * 2px) rgba(0, 10, 20, 0.45) !important;
  letter-spacing: 0.02em;
  color: var(--ink);
  translate: none !important;
}
[data-fit] {
  padding-left: 0;
  padding-right: 0;
}

/* buttons: painted pills, smaller letters */
.pill {
  border-image-source: url(../assets/img/a-pill-navy.webp) !important;
  border-image-slice: 0 62 fill !important;
}
.pill.amber {
  border-image-source: url(../assets/img/a-pill-amber.webp) !important;
  border-image-slice: 0 52 fill !important;
}
.pill.amber:active {
  border-image-source: url(../assets/img/a-pill-amber-down.webp) !important;
}
.pill.teal {
  border-image-source: url(../assets/img/a-pill-navy.webp) !important;
}
.pin {
  font-size: calc(var(--fs) * var(--u) * 0.74px);
}
.pill > span {
  font-weight: 600;
}
.pill.amber > span {
  color: #fffaf0;
}

/* round icon button: dark disc (painted art) + clean glyph */
.ibtn {
  position: relative;
  width: calc(var(--b) * 38px);
  height: calc(var(--b) * 38px);
  border-radius: 50%;
  background: center / contain no-repeat url(../assets/img/a-round.webp);
  display: grid;
  place-items: center;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.ibtn img {
  width: 50%;
  height: 50%;
  object-fit: contain;
  pointer-events: none;
}
.ibtn:active {
  transform: scale(0.92);
  filter: brightness(0.88);
}
.ibtn::after {
  content: '';
  position: absolute;
  inset: calc(var(--b) * -4px);
}
.ibtn.big {
  width: calc(var(--b) * 58px);
  height: calc(var(--b) * 58px);
}

/* top row: corner buttons everywhere; in the game the slim bar fills the row */
#topRow {
  position: fixed;
  z-index: 30;
  left: calc(var(--sal) + var(--b) * 10px);
  right: calc(var(--sar) + var(--b) * 10px);
  top: var(--rowT);
  height: var(--rowH);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.land #topRow {
  left: max(calc(var(--sal) + var(--b) * 10px), calc(50% - var(--b) * 380px));
  right: max(calc(var(--sar) + var(--b) * 10px), calc(50% - var(--b) * 380px));
}
#corner {
  position: absolute;
  right: calc(var(--b) * 5px);
  top: 50%;
  translate: 0 -50%;
  display: flex;
  gap: calc(var(--b) * 6px);
  pointer-events: auto;
}
#corner .ibtn {
  width: var(--tb);
  height: var(--tb);
}
body[data-screen='start'] #corner {
  display: none;
}
#hudBar {
  display: none;
  flex: 0 1 auto;
  min-width: 0;
  height: 100%;
  align-items: center;
  gap: 0.7em;
  padding: 0 calc(var(--b) * 10px);
  white-space: nowrap;
  overflow: hidden;
  border-style: solid;
  border-color: transparent;
  border-width: 0 calc(var(--b) * 23px);
  border-image: url(../assets/img/a-bar.webp) 0 44 fill / 0 calc(var(--b) * 23px) stretch;
  font-size: calc(var(--b) * 15px);
  pointer-events: auto;
}
body[data-screen='game'] #hudBar {
  display: flex;
}
#hudBar .hud-lv {
  color: var(--ink);
  white-space: nowrap;
}
#hudBar .hud-moves {
  color: #cfdde4;
  white-space: nowrap;
  font-size: 0.92em;
}
#hudBar .hud-moves em {
  font-style: normal;
  color: var(--ink);
}
#hudBar .hud-stars {
  display: flex;
  flex: none;
  gap: 0.12em;
  height: 1.25em;
  aspect-ratio: 3.4;
}
#hudBar .hud-stars .st {
  flex: 1;
  background: center / contain no-repeat url(../assets/img/ia-star.webp);
}
#hudBar .hud-stars .st.off {
  background-image: url(../assets/img/ia-star-empty.webp);
}
#hudBar > * + *::before {
  content: none;
}

/* game: buttons centred at the bottom (portrait) or in a column on the right (landscape); the otter peeks from below */
#gameBtns {
  pointer-events: auto; /* the screen layer ignores touches; its buttons must not */
  position: fixed;
  z-index: 6;
  left: 50%;
  translate: -50% 0;
  bottom: calc(var(--sab) + var(--b) * 16px);
  display: flex;
  gap: calc(var(--b) * 16px);
}
.land #gameBtns {
  left: auto;
  right: max(calc(var(--sar) + var(--b) * 18px), calc(50% - var(--b) * 370px));
  translate: 0 -50%;
  top: 55%;
  bottom: auto;
  flex-direction: column;
}
#pressureWrap {
  position: fixed;
  z-index: 30;
  left: calc(50% - var(--b) * 130px);
  width: calc(var(--b) * 260px);
  top: calc(var(--sat) + var(--b) * 62px);
  height: calc(var(--b) * 10px);
  border-radius: 99px;
}
#peek {
  position: fixed;
  z-index: 5;
  display: none;
  pointer-events: none;
  transform-origin: 50% 100%;
}
body[data-screen='game'] #peek {
  display: none;
} /* the otter is not needed on every screen */
body[data-screen='game'] #otter,
body[data-screen='game'] #otterShadow {
  display: none;
}
#peek[data-pose='idle'] {
  animation: otterBreathe 3.2s ease-in-out infinite;
}
#peek[data-pose='think'] {
  animation: otterThink 2.4s ease-in-out infinite;
}
#peek[data-pose='hype'] {
  animation: otterHype 0.32s ease-in-out infinite alternate;
}
#peek[data-pose='cheer'] {
  animation: otterCheer 0.5s cubic-bezier(0.3, 0.7, 0.4, 1) infinite;
}
body.calm #peek,
body.reduced #peek {
  animation: none !important;
}

/* panels: one centred card, content in a column */
.modal .panel.a-card {
  position: absolute;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
  width: min(calc(100vw - var(--b) * 32px), calc(var(--b) * 320px));
  max-height: calc(100vh - var(--b) * 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--b) * 12px);
  padding: calc(var(--b) * 26px) calc(var(--b) * 22px) calc(var(--b) * 22px);
  border-style: solid;
  border-color: transparent;
  border-width: calc(var(--b) * 50px) calc(var(--b) * 22px) calc(var(--b) * 22px);
  /* copper pipe frame (painted art): the valve on the top-left coupling lives in the top slice, above the pipe */
  border-image: url(../assets/img/a-card2.webp) 135 90 88 105 fill / calc(var(--b) * 73px) calc(var(--b) * 49px)
    calc(var(--b) * 48px) calc(var(--b) * 57px) stretch;
  font-size: calc(var(--b) * 15px);
}
.modal .panel.a-card.has-otter {
  margin-top: 0;
}
.modal .panel.a-card.tall {
  width: min(calc(100vw - var(--b) * 32px), calc(var(--b) * 360px));
}
.veil {
  background: rgba(3, 14, 22, 0.62);
}
.ttl {
  margin: 0;
  font-size: 1.45em;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.06em;
  color: var(--ink);
  width: 100%;
  background: none !important;
}
.ttl > span {
  display: block;
}
.sub {
  margin: 0;
  color: var(--dim);
  font-size: 0.95em;
  text-align: center;
}
.panel .pill {
  width: 100%;
  height: calc(var(--b) * 46px);
  --hpx: calc(var(--b) * 46px);
  font-size: calc(var(--b) * 17px);
}
.panel .pill.navy {
  height: calc(var(--b) * 46px);
  --hpx: calc(var(--b) * 46px);
  font-size: calc(var(--b) * 15px);
}
.panel .pill.small {
  width: auto;
  min-width: calc(var(--b) * 108px);
  height: calc(var(--b) * 32px);
  --hpx: calc(var(--b) * 32px);
  font-size: calc(var(--b) * 13px);
  padding: 0 calc(var(--b) * 6px);
}
/* card buttons are already 42 px or taller: no invisible touch margin (it reached the neighbour button) */
.panel .pill {
  position: relative;
} /* its touch layer (::after) must stay inside the button, not cover the card */
.panel .pill::after,
.lang-btn::after {
  inset: 0 !important;
}
.ttl {
  line-height: 1.3;
}
.btn-row {
  display: flex;
  gap: calc(var(--b) * 20px);
  justify-content: center;
}
.ibtn.x {
  position: absolute;
  z-index: 3;
  top: calc(var(--b) * 18px);
  right: calc(var(--b) * 2px);
  width: var(--tb);
  height: var(--tb);
}
.ibtn.back {
  position: absolute;
  z-index: 3;
  top: calc(var(--b) * 18px);
  left: calc(var(--b) * 2px);
  width: var(--tb);
  height: var(--tb);
}
.card-otter {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  width: 46%;
  aspect-ratio: 1.6 / 1.12;
  pointer-events: none;
  overflow: hidden;
  bottom: calc(100% + var(--b) * 19px);
} /* the window ends exactly on the top edge of the copper pipe (30.2 b into the frame art, border-top 50 b): the otter comes out from BEHIND the pipe, no gap */
.card-otter > img {
  position: absolute;
  left: 0;
  bottom: -5%;
  width: 100%;
  transform-origin: 50% 100%;
  animation: otterCheer 0.5s cubic-bezier(0.3, 0.7, 0.4, 1) infinite;
}
#mod-lose .card-otter > img {
  animation: otterThink 2.4s ease-in-out infinite;
}
body.calm .card-otter > img {
  animation: none;
}
.stars,
.stars-wrap {
  position: relative;
  display: flex;
  gap: calc(var(--b) * 8px);
  justify-content: center;
}
.stars > i {
  width: calc(var(--b) * 40px);
  height: calc(var(--b) * 40px);
  background: center / contain no-repeat url(../assets/img/ia-star.webp);
  position: static !important;
}
.stars > i.star-empty,
.stars > i.off {
  background-image: url(../assets/img/ia-star-empty.webp);
}
.stars > i:nth-child(2) {
  width: calc(var(--b) * 50px);
  height: calc(var(--b) * 50px);
  translate: 0 calc(var(--b) * -6px);
}
.seal-badge {
  position: absolute !important;
  right: calc(var(--b) * -46px);
  top: 50%;
  translate: 0 -50%;
  width: calc(var(--b) * 44px);
  height: calc(var(--b) * 44px);
  font-size: calc(var(--b) * 11px);
}
.stats {
  color: var(--dim);
  font-size: 1.02em;
}
.btn-row .ibtn {
  width: var(--tb);
  height: var(--tb);
}
.how {
  display: flex;
  align-items: center;
  gap: calc(var(--b) * 12px);
  width: 100%;
}
.how img {
  width: calc(var(--b) * 44px);
  height: calc(var(--b) * 44px);
  object-fit: contain;
  flex: none;
}
.how > span:last-child {
  flex: 1;
  font-size: 0.95em;
  color: var(--ink);
  text-align: left;
}
.how-stars .stars > i {
  width: calc(var(--b) * 14px);
  height: calc(var(--b) * 14px);
  translate: none;
}
.how-stars {
  width: calc(var(--b) * 44px);
  flex: none;
}

/* settings / sound rows */
.row {
  display: flex;
  align-items: center;
  gap: calc(var(--b) * 10px);
  width: 100%;
  min-height: calc(var(--b) * 40px);
}
.row-ic {
  width: calc(var(--b) * 26px);
  height: calc(var(--b) * 26px);
  flex: none;
  display: grid;
  place-items: center;
}
.row-ic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.row-lbl {
  flex: 1;
  min-width: 0;
  font-size: 0.95em;
  text-align: left;
  white-space: nowrap;
  display: block;
}
.row .toggle {
  position: relative;
  width: calc(var(--b) * 66px);
  height: calc(var(--b) * 34px);
  flex: none;
  font-size: calc(var(--b) * 12.5px);
}
.row .slider {
  position: relative;
  flex: 1.4;
  height: calc(var(--b) * 12px);
  --hpx: calc(var(--b) * 12px);
}
.row .slider > .sl-knob {
  height: calc(var(--b) * 26px);
}
/* the water in the volume bar stretches only in the middle (9 pieces), so it grows and shrinks with the value */
.row .slider > .sl-fill {
  background-image: none; /* nine.js paints the baked 9 pieces inline */
  border-style: solid;
  border-color: transparent;
  border-width: 0 calc(var(--hpx) / 2);
  border-image: url(../assets/img/track-fill.webp) 0 59 fill / 0 calc(var(--hpx) / 2) stretch;
  width: max(var(--hpx), calc((100% + var(--hpx)) * var(--v)));
}

/* language list */
.lang-list {
  position: relative;
  width: 100%;
  flex: 0 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: calc(var(--b) * 38px);
  gap: calc(var(--b) * 7px);
  margin-bottom: calc(var(--b) * 4px);
  max-height: calc(100vh - var(--b) * 170px);
  overflow-y: auto;
  padding: 2px;
}
.lang-btn {
  --hpx: calc(var(--b) * 40px);
  font-size: calc(var(--b) * 14px);
}
/* landscape: 3 columns (5 rows) so the 14 languages fit without a scrollbar */
.land .lang-list {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: calc(var(--b) * 36px);
  max-height: none;
  overflow: visible;
}
.land .modal .panel.a-card.tall {
  width: min(calc(100vw - var(--b) * 32px), calc(var(--b) * 460px));
}

/* level select: balls in a grid (no path, no otter) */
body[data-screen='map'] #otter,
body[data-screen='map'] #otterShadow {
  display: none;
}
#mapField {
  display: flex;
  align-items: center;
  justify-content: center;
}
.map-grid {
  position: relative !important;
  inset: auto !important;
  display: grid;
  grid-template-columns: repeat(4, calc(var(--b) * 60px));
  gap: calc(var(--b) * 36px) calc(var(--b) * 22px);
  justify-content: center;
  align-content: center;
}
.land .map-grid {
  grid-template-columns: repeat(5, calc(var(--b) * 46px));
  gap: calc(var(--b) * 30px) calc(var(--b) * 32px);
}
.map-grid .lv-node {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  translate: none !important;
  width: 100% !important;
  aspect-ratio: 1;
  border-radius: 50%;
  background: center / contain no-repeat url(../assets/img/a-round.webp) !important;
  font-size: calc(var(--b) * 21px);
  animation: none !important;
}
.map-grid .lv-node > b {
  inset: 0 0 8% !important;
  color: var(--ink);
}
.map-grid .lv-node.current {
  background: radial-gradient(circle at 35% 30%, #a8f4ff, #22b4d8 58%, #0b5a82) !important;
  border: calc(var(--b) * 2px) solid #f4d58a;
  box-shadow:
    0 0 0 calc(var(--b) * 3px) rgba(120, 230, 255, 0.4),
    0 0 calc(var(--b) * 18px) rgba(60, 200, 255, 0.55);
}
.map-grid .lv-node.current > b {
  color: #fffaf0;
}
.map-grid .lv-node.locked {
  filter: saturate(0.55) brightness(0.72);
}
.map-grid .lv-node.locked > b {
  opacity: 0.8;
}
.map-grid .lv-node > .lv-st {
  top: auto !important;
  bottom: calc(var(--b) * -21px);
  height: calc(var(--b) * 15px) !important;
  left: 4% !important;
  right: 4% !important;
  gap: 6%;
}
.map-grid .lv-node > .lv-st > i {
  background-image: url(../assets/img/ia-star.webp) !important;
}
.map-grid .lv-node > .lv-st > i.off {
  background-image: url(../assets/img/ia-star-empty.webp) !important;
}
.map-grid .lv-node > .lv-lock {
  inset: auto !important;
  right: calc(var(--b) * -2px) !important;
  bottom: calc(var(--b) * -2px) !important;
  width: 34% !important;
  height: 34% !important;
}
.map-grid .lv-node:active {
  scale: 0.93;
}

/* map title and star chip: smaller clean text, same slim bar as the game HUD */
.plaque {
  border-image-source: url(../assets/img/a-bar.webp) !important;
  border-image-slice: 0 44 fill !important;
}
.map-title > b {
  font-size: 0.82em;
}

/* win: a smaller card low on the screen, so the full board (and the overflowing tub) stays in view */
#mod-win .veil {
  background: rgba(3, 14, 22, 0.28);
}
#mod-win .panel.a-card {
  width: min(calc(100vw - var(--b) * 32px), calc(var(--b) * 300px));
  gap: calc(var(--b) * 8px);
  padding-top: calc(var(--b) * 18px);
  padding-bottom: calc(var(--b) * 16px);
} /* centred like every panel */
#mod-win .ttl {
  font-size: 1.25em;
}
#mod-win .stars > i {
  width: calc(var(--b) * 34px);
  height: calc(var(--b) * 34px);
}
#mod-win .stars > i:nth-child(2) {
  width: calc(var(--b) * 42px);
  height: calc(var(--b) * 42px);
}
#mod-win .card-otter {
  width: 34%;
}

/* in a level the scenery steps back so the board reads first */
#bg,
#scenery {
  transition: filter 0.4s ease;
}
body[data-screen='game'] #bg,
body[data-screen='game'] #scenery {
  filter: blur(3px) brightness(0.62) saturate(0.85);
}

/* top row geometry shared by the game HUD, the map header and the corner buttons: one button size, one bar height */
:root {
  --tb: calc(var(--b) * 40px);
  --rowH: calc(var(--b) * 48px);
  --rowT: calc(var(--sat) + var(--b) * 10px);
  --rowL: calc(var(--sal) + var(--b) * 10px);
  --rowR: calc(var(--sar) + var(--b) * 10px);
}
:root.land {
  --rowL: max(calc(var(--sal) + var(--b) * 10px), calc(50% - var(--b) * 380px));
  --rowR: max(calc(var(--sar) + var(--b) * 10px), calc(50% - var(--b) * 380px));
}
#scr-map .rbtn {
  position: fixed !important;
  width: var(--tb) !important;
  height: var(--tb) !important;
  translate: none !important;
  transform: none !important;
  background: center / contain no-repeat url(../assets/img/a-round.webp);
  border-radius: 50%;
}
#scr-map .rbtn > i {
  inset: 25%;
  background-image: url(../assets/img/ia-back.webp) !important;
}
#btnMapBack {
  left: var(--rowL) !important;
  top: calc(var(--rowT) + (var(--rowH) - var(--tb)) / 2) !important;
}
#btnWorldPrev,
#btnWorldNext {
  top: calc(50% - var(--tb) / 2) !important;
}
#btnWorldPrev {
  left: var(--rowL) !important;
}
#btnWorldNext {
  left: auto !important;
  right: var(--rowR) !important;
}
/* map header: world name and star count share ONE bar, the same height as the game HUD bar */
#scr-map .map-title {
  position: fixed !important;
  left: calc(var(--rowL) + var(--tb) + var(--b) * 8px) !important;
  right: calc(var(--rowR) + var(--tb) * 2 + var(--b) * 19px) !important;
  width: auto !important;
  top: var(--rowT) !important;
  height: var(--rowH) !important;
  translate: none !important;
  transform: none !important;
  --hpx: var(--rowH);
  font-size: calc(var(--b) * 14px) !important;
  padding: 0 !important;
}
#scr-map .map-title > small {
  display: none;
}
#scr-map .map-title > b {
  top: 0 !important;
  bottom: 0 !important;
  left: calc(var(--b) * 2px) !important;
  right: calc(var(--b) * 84px) !important;
  justify-content: flex-start;
  font-size: 1em;
  letter-spacing: 0 !important;
}
#scr-map .map-stars {
  position: fixed !important;
  right: calc(var(--rowR) + var(--tb) * 2 + var(--b) * 30px) !important;
  left: auto !important;
  width: calc(var(--b) * 66px) !important;
  top: var(--rowT) !important;
  height: var(--rowH) !important;
  translate: none !important;
  transform: none !important;
  background: none !important;
  border-image: none !important;
  border-width: 0 !important;
  padding: 0 !important;
  gap: calc(var(--b) * 6px);
  font-size: calc(var(--b) * 14px) !important;
  justify-content: flex-end;
  z-index: 7;
}
#scr-map .map-stars > i {
  height: 50%;
  flex: none;
}
#scr-map .map-stars > .txt {
  margin: 0 !important;
}
#scr-map .map-stars::after {
  content: none;
}

/* portrait map: the world arrows leave the grid and sit side by side at the bottom */
.port #btnWorldPrev,
.port #btnWorldNext {
  top: auto !important;
  bottom: calc(var(--sab) + var(--b) * 18px) !important;
}
.port #btnWorldPrev {
  left: calc(50% - var(--tb) - var(--b) * 14px) !important;
}
.port #btnWorldNext {
  right: auto !important;
  left: calc(50% + var(--b) * 14px) !important;
}
/* the board steps back while a card is open (the win keeps it: the card celebrates that board) */
#boardCanvas {
  transition: opacity 0.25s ease;
}
body[data-modal]:not([data-modal='mod-win']) #boardCanvas {
  opacity: 0;
}

/* while a card is open only the card speaks: the screen behind (menu buttons, logo, game buttons) steps back, the HUD
   bar dims with it, and on the win/lose cards it hides (it would contradict the card's final numbers) */
.screen,
#hudBar {
  transition: opacity 0.25s ease;
}
body[data-modal] .screen {
  opacity: 0;
}
body[data-modal] #hudBar {
  opacity: 0.35;
}
body[data-modal='mod-win'] #hudBar,
body[data-modal='mod-lose'] #hudBar {
  opacity: 0;
}
/* landscape: cards are centred in the space under the top row, so the valve never touches it */
.land .modal .panel.a-card {
  top: calc(50% + var(--rowH) / 2 + var(--b) * 4px);
  max-height: calc(100vh - var(--rowH) - var(--b) * 34px);
}
/* landscape: the game buttons share the gear's vertical axis */
.land #gameBtns {
  right: calc(var(--rowR) + var(--b) * 1px);
}
/* landscape language list: the last row is centred */
.land .lang-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.land .lang-list {
  gap: calc(var(--b) * 6px);
}
#langList > .lang-btn {
  height: 100%;
  --hpx: calc(var(--b) * 38px);
} /* the grid row decides, not the generic card pill height */
.land #langList > .lang-btn {
  width: calc((100% - var(--b) * 18px) / 4);
  height: calc(var(--b) * 32px);
  --hpx: calc(var(--b) * 32px);
  font-size: calc(var(--b) * 13px);
}
.how + .pill {
  margin-top: calc(var(--b) * 8px);
}
.port #scr-map .map-title > b {
  white-space: normal;
  line-height: 1.05;
  text-align: left;
} /* a long world name takes two lines instead of shrinking */

/* hints left: a small badge on the bulb; empty = dimmed bulb */
.hint-n {
  position: absolute;
  top: -4%;
  right: -4%;
  min-width: 36%;
  height: 36%;
  padding: 0 6%;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, #a8f4ff, #22b4d8 60%, #0b5a82);
  border: calc(var(--b) * 1.5px) solid #f4d58a;
  color: #fff;
  font-size: calc(var(--b) * 13px);
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}
#btnHint.empty img {
  opacity: 0.4;
  filter: grayscale(0.6);
}
#btnHint.empty .hint-n {
  background: #33434c;
  color: #9fb0b8;
}

/* game top row: [sound] [slim bar: level, stars, moves] [settings], centred as one group */
body[data-screen='game'] #topRow {
  justify-content: center;
  gap: calc(var(--b) * 8px);
}
body[data-screen='game'] #corner {
  display: contents;
}
body[data-screen='game'] #btnSound {
  order: -1;
  pointer-events: auto;
  flex: none;
}
body[data-screen='game'] #btnSettings {
  order: 1;
  pointer-events: auto;
  flex: none;
}

/* pressure timer: the same track art as the volume bar (9 pieces, no tiles = no seams), a glossy water fill that
   shrinks with the time left, a light sweeping along it, amber when time is short */
#pressureWrap {
  top: calc(var(--rowT) + var(--rowH) + var(--b) * 8px);
  left: calc(50% - var(--b) * 120px);
  width: calc(var(--b) * 240px);
  height: calc(var(--b) * 16px);
  --hpx: calc(var(--b) * 16px);
  --v: 1;
  background: none;
  box-shadow: none;
  overflow: visible;
  border-radius: 0;
  border-style: solid;
  border-color: transparent;
  border-width: 0 calc(var(--hpx) / 2);
  border-image: url(../assets/img/track.webp) 0 59 fill / 0 calc(var(--hpx) / 2) stretch;
}
#pressureWrap > i {
  position: absolute;
  top: 18%;
  bottom: 18%;
  left: calc(var(--hpx) * -0.32);
  width: max(calc(var(--hpx) * 0.7), calc((100% + var(--hpx) * 0.64) * var(--v)));
  border-radius: 99px;
  overflow: hidden;
  animation: none;
  transition: background 0.3s;
  background: linear-gradient(180deg, #c8fff8 0%, #5ff0e4 30%, #1cc4c0 62%, #0b8b93 100%);
  box-shadow:
    inset 0 calc(var(--b) * -1.5px) 0 rgba(0, 60, 70, 0.35),
    0 0 calc(var(--b) * 8px) rgba(80, 240, 230, 0.45);
}
#pressureWrap > i::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  translate: -100% 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: pressShine 1.8s ease-in-out infinite;
}
@keyframes pressShine {
  to {
    translate: 260% 0;
  }
}
#pressureWrap.urgent > i {
  background: linear-gradient(180deg, #fff0c0 0%, #ffc04a 30%, #f28a12 62%, #b85a07 100%);
  box-shadow:
    inset 0 calc(var(--b) * -1.5px) 0 rgba(90, 40, 0, 0.35),
    0 0 calc(var(--b) * 10px) rgba(255, 150, 40, 0.6);
}
body.calm #pressureWrap > i::after,
body.reduced #pressureWrap > i::after {
  animation: none;
  display: none;
}
/* End of css/clean.css (complete file). */
