/* Full-bleed Ice Bay scene. Loaded after game.css so gameplay chrome stays thin. */
:root {
  --playbar-height: clamp(80px, 12vh, 110px);
  --pebble: clamp(48px, 4.6vw, 60px);
}

html,
body,
.app {
  background: #e4f3fb;
}

.world-art {
  display: block;
  z-index: 0;
}

.scene-art {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: none;
  mask-image: none;
  transition: opacity 180ms ease-out;
}

.scene-art img {
  position: absolute;
  left: 0;
  top: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transform: none;
  -webkit-user-drag: none;
}

.app[data-screen="intro"] .scene-art {
  opacity: 0;
}

.controls {
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  gap: 5px;
}

.controls button,
.controls a {
  background: transparent;
  filter: drop-shadow(0 2px 2px rgb(23 74 126 / 0.28));
}

.hud {
  top: max(8px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: 224px;
  min-width: 160px;
  min-height: 0;
  padding: 8px 10px;
  border: 0;
  border-radius: 16px;
  background: #123e66;
  box-shadow: 0 4px 12px rgb(18 62 102 / 0.24);
  color: #fff;
  filter: none;
  pointer-events: none;
}

.level-props {
  display: grid;
  gap: 5px;
  padding: 0;
}

.stage-markers,
.task-stars {
  display: flex;
  align-items: center;
  gap: 3px;
}

.stage-marker {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1px solid rgb(255 255 255 / 0.88);
  border-radius: 50%;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.stage-marker.current {
  border-color: var(--honey);
  background: var(--honey);
  color: #123e66;
}

.stage-marker.done {
  border-color: #c9e8f7;
  background: #c9e8f7;
  color: #123e66;
}

.task-star {
  position: relative;
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  opacity: 1;
  filter: none;
}

.level-label {
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.05;
  white-space: nowrap;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.task-star img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.task-star.on img {
  filter: drop-shadow(0 1px 2px rgb(18 62 102 / 0.48));
}

.task-star:not(.on) img {
  opacity: 0;
}

.task-star:not(.on)::before {
  content: "";
  position: absolute;
  inset: 2px;
  background: #dceaf4;
  clip-path: polygon(50% 0, 61% 36%, 98% 36%, 68% 58%, 79% 95%, 50% 72%, 21% 95%, 32% 58%, 2% 36%, 39% 36%);
  filter: drop-shadow(0 0 1px #123e66) drop-shadow(0 0 1px #123e66);
}

.app[data-screen="intro"] .hud {
  visibility: hidden;
}

.stage {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: block;
  pointer-events: none;
}

.board {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  pointer-events: none;
}

.board-panel {
  position: absolute;
  min-width: 0;
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  pointer-events: auto;
}

.board-panel::after,
.panel-tag,
.shore-arrow,
.question-mark {
  display: none;
}

.shore-panel {
  left: 5%;
  top: 64%;
  width: 43%;
  height: 21%;
  background: transparent;
}

.tray-panel {
  left: 52%;
  top: 61%;
  width: 44%;
  height: 25%;
  overflow: visible;
  background: transparent url("assets/collection-tray-v2.webp") center / 100% 100% no-repeat;
}

.pebble-area,
.tray-area {
  position: absolute;
}

#shorePieces {
  inset: 0 8%;
}

#trayPieces {
  inset: 21% 28% 20% 8%;
}

.board-panel.drop-ready {
  box-shadow: none;
  outline: 3px solid rgb(242 193 65 / 0.8);
  outline-offset: 2px;
}

.board-panel:focus-visible {
  outline: 3px solid rgb(255 248 230 / 0.92);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgb(23 74 126 / 0.42);
}

.pebble {
  z-index: 3;
  width: var(--pebble);
  height: var(--pebble);
  min-width: 48px;
  min-height: 48px;
}

.pebble img {
  width: var(--pebble);
  height: var(--pebble);
  min-width: 0;
  min-height: 0;
  max-width: none;
  max-height: none;
  object-fit: contain;
  filter: drop-shadow(0 5px 3px rgb(23 74 126 / 0.3));
}

.pebble.sel {
  filter: drop-shadow(0 0 7px rgb(242 193 65 / 0.9));
}

.pebble.sel::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8%;
  border-radius: 50%;
  background: rgb(242 193 65 / 0.2);
}

.pebble:focus-visible {
  box-shadow: 0 0 0 3px #fff8e6, 0 0 0 6px #f2c141;
}

.count-badge {
  top: 50%;
  right: 4%;
  display: grid;
  grid-template-rows: auto auto;
  place-content: center;
  gap: 1px;
  width: 80px;
  min-width: 80px;
  height: 72px;
  padding: 4px 6px;
  border: 0;
  border-radius: 16px;
  background: #123e66;
  color: #fff;
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  box-shadow: 0 4px 10px rgb(18 62 102 / 0.22);
  transform: translateY(-50%);
  pointer-events: none;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.count-badge[hidden] {
  display: none !important;
}

#countValue {
  color: #fff;
  font-size: 36px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.count-badge small {
  position: static;
  width: 52px;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  clip: auto;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.05;
  text-align: center;
  white-space: normal;
  border: 0;
}

.playbar {
  z-index: 210;
  height: var(--playbar-height);
  display: block;
  padding: 3px max(8px, env(safe-area-inset-right))
    max(3px, env(safe-area-inset-bottom)) 52px;
  background: transparent;
  box-shadow: none;
}

.guide-art,
.hero-art {
  display: none;
}

.center-console {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  justify-items: center;
  gap: 8px;
  align-self: stretch;
}

.feedback {
  position: static;
  inset: auto;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  width: auto;
  min-height: 0;
  max-width: 100%;
  margin: 0;
  padding: 2px 4px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--navy);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.08;
  text-align: left;
  transform: none;
  -webkit-text-stroke: 0.65px rgb(255 255 255 / 0.96);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 #fff, 0 0 4px rgb(255 255 255 / 0.9), 0 2px 3px rgb(23 74 126 / 0.3);
}

.feedback::before {
  display: none;
}

.answer-panel {
  position: static;
  inset: auto;
  display: flex;
  grid-column: 2;
  grid-row: 1;
  transform: none;
}

.answer-options {
  gap: 10px;
}

.ok,
.ok img {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
}

.ok img {
  transform-origin: center;
}

.answer-choice {
  width: 64px;
  height: 64px;
  min-width: 64px;
  min-height: 64px;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/pebbles/stone-c.webp") center / contain no-repeat;
  box-shadow: none;
  color: var(--navy);
  font-size: 27px;
  font-weight: 600;
  -webkit-text-stroke: 0.6px rgb(255 255 255 / 0.9);
  paint-order: stroke fill;
  text-shadow: 0 1px 0 #fff, 0 0 3px rgb(255 255 255 / 0.82), 0 2px 3px rgb(23 74 126 / 0.24);
  transition: transform 140ms ease-out, filter 140ms ease-out;
}

.answer-choice[aria-pressed="true"] {
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.08) drop-shadow(0 0 8px rgb(242 193 65 / 0.98));
}

.answer-choice:focus-visible {
  outline: none;
  box-shadow: none;
  transform: translateY(-3px) scale(1.06);
  filter: brightness(1.08) drop-shadow(0 0 8px rgb(255 255 255 / 1));
}

.ok-wrap {
  position: static;
  inset: auto;
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  left: auto;
  top: auto;
  right: auto;
  bottom: auto;
  display: flex;
  transform: none;
}

.app[data-zone-phase="total"] .ok-wrap {
  position: static;
  inset: auto;
  left: auto;
  transform: none;
}

.skip-demo {
  top: max(76px, calc(env(safe-area-inset-top) + 68px));
  left: max(8px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  min-width: 132px;
  min-height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: #123e66;
  box-shadow: 0 4px 12px rgb(18 62 102 / 0.24);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  text-shadow: none;
}

.rune {
  z-index: 220;
}

@media (orientation: portrait) {
  :root {
    --pebble: 48px;
  }

  .scene-art img {
    top: min(0px, calc(42vh - 75.2vw));
    height: auto;
    object-fit: contain;
  }

  #shorePieces {
    inset: 0 5%;
  }

  .shore-panel {
    left: 6%;
    top: 44%;
    width: 88%;
    height: 17%;
  }

  .tray-panel {
    left: 3%;
    top: 61.5%;
    width: 94%;
    max-width: 600px;
    height: 26%;
    transform: none;
  }

  .playbar {
    height: calc(94px + env(safe-area-inset-bottom));
    padding-top: 1px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
    padding-left: 54px;
  }

  .center-console {
    grid-template-columns: minmax(0, 1fr) 80px;
    grid-template-rows: minmax(0, 1fr) 64px;
    gap: 0 7px;
  }

  .feedback {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
    width: 100%;
    max-width: none;
    padding: 2px 8px;
    font-size: 18px;
    line-height: 1;
    text-align: center;
  }

  .answer-options {
    gap: 8px;
  }

  .answer-panel {
    grid-column: 1;
    grid-row: 2;
    justify-self: center;
  }

  .ok-wrap {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    justify-self: end;
  }
}

@media (orientation: portrait) and (min-width: 600px) {
  .shore-panel {
    top: 47%;
    height: 16%;
  }

  .tray-panel {
    left: 50%;
    top: 64%;
    width: 92%;
    height: 23.5%;
    transform: translateX(-50%);
  }

  .playbar {
    height: calc(94px + env(safe-area-inset-bottom));
  }

  .feedback {
    font-size: 18px;
  }
}

@media (orientation: landscape) and (max-height: 620px) {
  :root {
    --pebble: 48px;
  }

  .shore-panel {
    top: 63%;
    height: 20%;
  }

  .tray-panel {
    top: 61%;
    height: 25%;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  :root {
    --playbar-height: 76px;
  }

  .scene-art {
    height: 100%;
  }

  .world-art {
    display: block;
  }

  .scene-art img {
    left: 50%;
    width: min(100vw, calc(100vh * 1.65));
    height: auto;
    top: 8px;
    object-fit: contain;
    transform: translateX(-50%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
  }

  .shore-panel {
    left: 5%;
    top: 60%;
    width: 43%;
    height: 24%;
  }

  .tray-panel {
    left: 53%;
    top: 58%;
    width: 44%;
    height: 27.5%;
  }

  .hud {
    min-height: 26px;
    padding: 2px 5px;
  }

  .task-star {
    width: 18px;
    height: 18px;
  }

  .playbar {
    padding: 0 8px 4px 46px;
  }

  .center-console {
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 72px;
    gap: 6px;
  }

  .feedback {
    grid-column: 1;
    align-self: center;
    padding: 3px 7px;
    font-size: 16px;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .ok,
  .ok img {
    width: 72px;
    height: 72px;
    min-width: 72px;
    min-height: 72px;
  }

  .ok-wrap {
    align-self: end;
  }

  .skip-demo {
    top: 66px;
    min-height: 44px;
  }

  .rune {
    width: 30px;
    max-height: 42px;
  }
}

@media (max-width: 599px) {
  .hud {
    top: max(70px, calc(env(safe-area-inset-top) + 62px));
  }
}

/* Compact, non-interactive action cues stay clear of faces and live pebbles. */
.action-cue {
  position: fixed;
  z-index: 225;
  top: 76px;
  left: 8px;
  display: none;
  flex-direction: column;
  width: 280px;
  min-height: 106px;
  height: 106px;
  padding: 9px 10px;
  border: 0;
  border-radius: 18px;
  background: #123e66;
  box-shadow: 0 5px 14px rgb(18 62 102 / 0.24);
  color: #fff;
  pointer-events: none;
  overflow: hidden;
  -webkit-text-stroke: 0;
  text-shadow: none;
}

.app[data-screen="play"] .action-cue,
.app[data-screen="demo"] .action-cue {
  display: flex;
}

.cue-mode {
  display: none;
  min-width: 0;
}

.app[data-zone-phase="collect"] .cue-collect,
.app[data-zone-phase="total"] .cue-total {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
}

.cue-heading {
  margin: 0;
  color: #fff;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.05;
}

.cue-row {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 42px;
  margin: 0;
}

.cue-icon {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
}

.cue-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cue-stone {
  width: 42px;
  height: 42px;
}

.cue-tray {
  width: 84px;
  height: 42px;
}

.cue-check {
  width: 42px;
  height: 42px;
}

.cue-fallback {
  display: none;
  padding: 2px 5px;
  border-radius: 6px;
  background: #fff;
  color: #123e66;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

.cue-icon.asset-missing img {
  display: none;
}

.cue-icon.asset-missing .cue-fallback {
  display: block;
}

.cue-arrow {
  position: relative;
  flex: 0 0 18px;
  width: 18px;
  height: 3px;
  border-radius: 3px 0 0 3px;
  background: #fff;
}

.cue-arrow::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -1px;
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 8px solid #fff;
  transform: translateY(-50%);
}

.cue-question {
  display: grid;
  flex: 0 0 28px;
  place-items: center;
  width: 28px;
  height: 42px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
}

.cue-subtitle {
  display: block;
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.05;
  white-space: nowrap;
}

@media (orientation: portrait) {
  .hud {
    top: max(76px, calc(env(safe-area-inset-top) + 68px));
    width: 176px;
    padding: 8px 10px;
  }
}

@media (orientation: portrait) and (max-width: 499px) {
  .action-cue {
    top: max(76px, calc(env(safe-area-inset-top) + 68px));
    left: 8px;
    width: 210px;
    min-height: 100px;
    height: 100px;
    padding: 8px;
    border-radius: 16px;
  }

  .cue-heading {
    font-size: 20px;
    line-height: 1.05;
    white-space: nowrap;
  }

  .cue-row {
    height: 42px;
    gap: 4px;
    margin: 0;
  }

  .cue-stone {
    width: 42px;
    height: 42px;
  }

  .cue-tray {
    width: 76px;
    height: 42px;
  }

  .cue-check {
    width: 34px;
    height: 38px;
  }

  .cue-question {
    flex-basis: 24px;
    width: 24px;
    height: 42px;
    font-size: 24px;
  }

  .cue-arrow {
    width: 10px;
    flex-basis: 10px;
    height: 2px;
  }

  .cue-arrow::after {
    border-top-width: 5px;
    border-bottom-width: 5px;
    border-left-width: 6px;
  }

  .cue-subtitle {
    font-size: 12px;
  }

  .hud {
    top: max(76px, calc(env(safe-area-inset-top) + 68px));
    width: 128px;
    min-width: 128px;
    gap: 5px;
    padding: 8px;
  }

  .level-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .level-props {
    gap: 0;
  }

  .task-star {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }
}

@media (orientation: portrait) and (min-width: 500px) {
  .level-label {
    font-size: 17px;
  }
}

@media (orientation: landscape) and (max-height: 560px) {
  .tray-panel {
    left: 48.5%;
    width: 48.5%;
  }

  .action-cue {
    top: 76px;
    left: 8px;
    width: 225px;
    min-height: 90px;
    height: 90px;
    padding: 6px 8px;
    border-radius: 16px;
  }

  .cue-heading {
    font-size: 20px;
  }

  .cue-mode {
    gap: 1px;
  }

  .cue-row {
    height: 42px;
    gap: 4px;
    margin: 0;
  }

  .cue-stone {
    width: 42px;
    height: 42px;
  }

  .cue-tray {
    width: 76px;
    height: 42px;
  }

  .cue-check {
    width: 34px;
    height: 38px;
  }

  .cue-question {
    flex-basis: 24px;
    width: 24px;
    height: 42px;
    font-size: 24px;
  }

  .cue-arrow {
    width: 10px;
    flex-basis: 10px;
    height: 2px;
  }

  .cue-arrow::after {
    border-top-width: 5px;
    border-bottom-width: 5px;
    border-left-width: 6px;
  }

  .cue-subtitle {
    font-size: 11px;
    line-height: 1;
  }

  #trayPieces {
    inset: 21% 23% 20% 4%;
  }

  .count-badge {
    top: auto;
    right: 2.5%;
    bottom: calc(100% + 4px);
    transform: none;
  }

  .answer-choice {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
  }

  .hud {
    top: max(8px, env(safe-area-inset-top));
    width: 200px;
    transform: none;
  }

  .task-star {
    width: 24px;
    height: 24px;
    flex-basis: 24px;
  }

  .skip-demo {
    top: 76px;
    min-height: 48px;
  }
}

@media (orientation: landscape) and (max-width: 700px) {
  .action-cue {
    width: 160px;
    min-height: 96px;
    height: 96px;
    padding: 8px;
  }

  .cue-heading {
    font-size: 16px;
    max-width: 100%;
    white-space: normal;
  }

  .cue-mode {
    gap: 1px;
  }

  .cue-row {
    height: 34px;
    gap: 3px;
  }

  .cue-stone {
    width: 34px;
    height: 34px;
  }

  .cue-tray {
    width: 50px;
    height: 34px;
  }

  .cue-check {
    width: 30px;
    height: 34px;
  }

  .cue-question {
    flex-basis: 20px;
    width: 20px;
    height: 34px;
    font-size: 20px;
  }

  .cue-arrow {
    width: 8px;
    flex-basis: 8px;
  }

  .cue-arrow::after {
    border-top-width: 4px;
    border-bottom-width: 4px;
    border-left-width: 5px;
  }

  .cue-subtitle {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scene-art,
  .pebble,
  .pebble img {
    transition: none !important;
  }
}

/* Pause interlude: a light Ice Bay vignette; other dialogs keep game.css styling. */
.overlay[data-kind="pause"] {
  padding: 12px;
  background: rgb(226 244 251 / 0.68);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.overlay[data-kind="pause"] .dialog {
  position: relative;
  width: min(500px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 30px;
  background: linear-gradient(#fffefb 0 42%, #f3fbff 100%);
  box-shadow: 0 18px 48px rgb(23 74 126 / 0.2);
}

.overlay[data-kind="pause"] .pause-close {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  float: none;
  width: 56px;
  height: 56px;
  min-width: 56px;
  min-height: 56px;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.9);
  color: var(--navy);
  font-size: 30px;
  line-height: 1;
  box-shadow: 0 4px 14px rgb(23 74 126 / 0.16);
}

.overlay[data-kind="pause"] .pause-art {
  display: block;
  height: clamp(200px, 29vh, 270px);
  padding: 0 72px 0 0;
  margin: 0;
  overflow: hidden;
}

.overlay[data-kind="pause"] .pause-art img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

.overlay[data-kind="pause"] .pause-content {
  position: relative;
  padding: 10px 20px 18px;
  border-radius: 44% 44% 29px 29px / 22px 22px 29px 29px;
  background: #f8fdff;
  text-align: center;
}

.overlay[data-kind="pause"] .pause-content h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(24px, 4.5vw, 28px);
  line-height: 1.08;
}

.overlay[data-kind="pause"] .pause-copy {
  margin: 4px 0 0;
  color: rgb(23 74 126 / 0.82);
  font-size: 15px;
}

.overlay[data-kind="pause"] .pause-resume {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 320px);
  min-height: 60px;
  margin: 10px auto 12px;
  padding: 4px 18px;
  border: 0;
  border-radius: 20px;
  background: var(--honey);
  color: var(--navy);
  font-size: 22px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 5px 0 #d5a52b, 0 8px 18px rgb(23 74 126 / 0.16);
}

.overlay[data-kind="pause"] .pause-resume img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.overlay[data-kind="pause"] .pause-level-label {
  margin: 0;
  color: rgb(23 74 126 / 0.78);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.2;
}

.overlay[data-kind="pause"] .pause-levels {
  flex-wrap: nowrap;
  gap: 6px;
  margin: 6px 0 0;
}

.overlay[data-kind="pause"] .pause-levels .level-choice {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 19px;
  box-shadow: none;
}

.overlay[data-kind="pause"] .pause-levels .level-choice img {
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.92;
}

.overlay[data-kind="pause"] .pause-levels .level-choice span {
  text-shadow:
    0 1px 0 #fff8e6,
    0 -1px 0 #fff8e6,
    1px 0 0 #fff8e6,
    -1px 0 0 #fff8e6;
}

.overlay[data-kind="pause"] .pause-levels .level-choice.done img {
  filter: sepia(0.32) saturate(1.45) brightness(1.08);
}

.overlay[data-kind="pause"] .pause-levels .level-choice.done::after {
  content: "✓";
  position: absolute;
  z-index: 2;
  top: -3px;
  right: -2px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--honey);
  color: var(--navy);
  font-size: 12px;
  line-height: 17px;
}

.overlay[data-kind="pause"] .pause-levels .level-choice.now {
  box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--honey);
}

.overlay[data-kind="pause"] button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px var(--honey);
}

@media (orientation: landscape) and (max-height: 600px) {
  .overlay[data-kind="pause"] .dialog {
    display: grid;
    grid-template-areas: "pause-art pause-content";
    grid-template-columns: minmax(0, 1fr) minmax(300px, 46%);
    width: min(760px, calc(100vw - 24px));
    height: min(358px, calc(100vh - 24px));
    max-height: calc(100vh - 24px);
    overflow: hidden;
  }

  .overlay[data-kind="pause"] .pause-close {
    top: 6px;
    right: 6px;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    font-size: 26px;
  }

  .overlay[data-kind="pause"] .pause-art {
    grid-area: pause-art;
    height: 100%;
    min-height: 0;
    padding: 8px 0 8px 8px;
  }

  .overlay[data-kind="pause"] .pause-content {
    grid-area: pause-content;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 12px 18px 12px 14px;
    border-radius: 34px 0 0 34px;
  }

  .overlay[data-kind="pause"] .pause-content h2 {
    font-size: 24px;
  }

  .overlay[data-kind="pause"] .pause-copy {
    margin-top: 2px;
    font-size: 14px;
  }

  .overlay[data-kind="pause"] .pause-resume {
    flex: none;
    min-height: 56px;
    margin: 6px auto;
    font-size: 20px;
    box-shadow: 0 4px 0 #d5a52b, 0 7px 14px rgb(23 74 126 / 0.14);
  }

  .overlay[data-kind="pause"] .pause-level-label {
    font-size: 12px;
  }

  .overlay[data-kind="pause"] .pause-levels {
    margin-top: 4px;
  }
}

/* Juice v13: decorative Ice Bay feedback only; this layer never receives input. */
.fx {
  pointer-events: none;
}

.fx.fx-front {
  z-index: 520;
}

.fx-item {
  position: fixed;
  display: block;
  width: 8px;
  height: 18px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  will-change: transform, opacity;
}

.fx-halo {
  width: clamp(98px, 13vw, 148px);
  height: clamp(98px, 13vw, 148px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(255 248 230 / 0.38) 0 18%,
    rgb(242 193 65 / 0.2) 19% 39%,
    rgb(191 232 245 / 0.14) 40% 56%,
    transparent 57%
  );
}

.fx-halo--arrival {
  width: 76px;
  height: 76px;
  background: radial-gradient(
    circle,
    rgb(255 248 230 / 0.5) 0 22%,
    rgb(191 232 245 / 0.24) 23% 52%,
    transparent 54%
  );
}

.fx-halo--success {
  background: radial-gradient(
    circle,
    rgb(255 248 230 / 0.32) 0 15%,
    rgb(242 193 65 / 0.28) 17% 38%,
    rgb(191 232 245 / 0.2) 40% 56%,
    transparent 58%
  );
}

.fx-ice-dust {
  width: 5px;
  height: 13px;
  background: linear-gradient(#fff8e6, #bfe8f5);
}

.fx-snow-rosette {
  width: 7px;
  height: 19px;
  box-shadow: 0 0 5px rgb(255 248 230 / 0.58);
}

.fx-snow-rosette:nth-of-type(3n) {
  width: 5px;
  height: 15px;
}

.fx-glint {
  width: 4px;
  height: 17px;
  border-radius: 50% 50% 20% 20%;
  box-shadow: 0 0 4px rgb(255 248 230 / 0.68);
}

.fx-firework-halo {
  width: clamp(150px, 22vw, 250px);
  height: clamp(150px, 22vw, 250px);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgb(255 248 230 / 0.28) 0 14%,
    rgb(242 193 65 / 0.18) 15% 36%,
    rgb(191 232 245 / 0.12) 37% 54%,
    transparent 56%
  );
}

.fx-firework-ray {
  width: 8px;
  height: 31px;
  border-radius: 60% 60% 20% 20%;
  box-shadow: 0 0 5px rgb(255 248 230 / 0.42);
}

.fx-firework-glint {
  width: 7px;
  height: 22px;
  background: linear-gradient(#fff8e6, #f2c141 55%, #bfe8f5);
  box-shadow: 0 0 5px rgb(255 248 230 / 0.52);
}

.fx-ice-ribbon {
  width: 3px;
  height: clamp(22px, 4.5vh, 42px);
  border-radius: 70% 20% 70% 30%;
  box-shadow: 0 0 4px rgb(255 248 230 / 0.28);
}

.fx-ice-ribbon--right {
  width: 2px;
}

@media (max-width: 500px) {
  .fx-firework-halo {
    width: 120px;
    height: 120px;
  }
}

.fx-ambient {
  z-index: 4;
  width: 11px;
  height: 20px;
  border-radius: 66% 34% 62% 38%;
  background: linear-gradient(rgb(191 232 245 / 0.62), rgb(255 248 230 / 0.52));
  box-shadow: 0 0 7px rgb(191 232 245 / 0.4);
  opacity: 0.42;
  animation: fx-ambient-drift 8s ease-in-out var(--fx-delay) infinite;
}

@keyframes fx-ambient-drift {
  0%,
  100% {
    transform: translate(-50%, -50%) translateY(-5px) rotate(-7deg) scale(0.92);
    opacity: 0.18;
  }

  48% {
    transform: translate(-50%, -50%) translateY(18px) rotate(8deg) scale(1);
    opacity: 0.46;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fx-item,
  .fx-ambient {
    display: none !important;
    animation: none !important;
  }
}
