/* 偷鱼大作战 — portrait H5 game shell */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #061c2b;
  overscroll-behavior: none;
}
body {
  position: fixed;
  inset: 0;
  color: #fff;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-rounded,
    "SF Pro Rounded", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
button { font-family: inherit; }

/* Ambient backdrop, only visible beside the game column on wide screens */
.ambient {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #061c2b;
  display: none;
}
.ambient__img {
  position: absolute;
  inset: -12%;
  background: url("images/gen/gptimg_1795500448_look.png") center 42% / cover no-repeat;
  filter: blur(30px) saturate(1.12) brightness(0.44);
  transform: scale(1.06);
}
.ambient__veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 78% at 50% 44%, rgba(8, 34, 54, 0.08), rgba(2, 13, 23, 0.82) 82%),
    linear-gradient(180deg, rgba(2, 13, 23, 0.5), transparent 30%, rgba(2, 13, 23, 0.58));
}

.game {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #08253a;
  isolation: isolate;
  touch-action: none;
}
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Home takes over the stage; the game HUD stays out of the way until entry */
.game.is-home #scene,
.game.is-home .hud,
.game.is-home .hint,
.game.is-home .vignette {
  opacity: 0;
  visibility: hidden;
}
#scene, .hud, .hint, .vignette {
  transition: opacity 0.34s ease, visibility 0.34s ease;
}
.vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(125% 90% at 50% 44%, transparent 52%, rgba(5, 24, 40, 0.24) 100%),
    linear-gradient(180deg, rgba(6, 28, 47, 0.22) 0%, transparent 15%, transparent 70%, rgba(46, 25, 8, 0.3) 100%);
}

/* Top HUD */
.hud {
  position: absolute;
  z-index: 10;
  top: calc(9px + env(safe-area-inset-top, 0px));
  left: 11px;
  right: 11px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 6px;
  align-items: start;
  pointer-events: none;
}
.hud__left { justify-self: start; min-width: 0; }
.hud__right { justify-self: end; }
.timer-pill { grid-column: 2; justify-self: center; }

.pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 0 13px;
  border-radius: 21px;
  color: #fff;
  background: linear-gradient(180deg, rgba(24, 74, 112, 0.97) 0%, rgba(10, 39, 63, 0.97) 100%);
  border: 1.5px solid rgba(255, 199, 94, 0.92);
  box-shadow:
    0 3px 0 rgba(4, 20, 33, 0.5),
    0 9px 22px rgba(0, 0, 0, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    inset 0 -6px 12px rgba(0, 0, 0, 0.14);
}
.pill::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.timer-pill {
  gap: 8px;
  min-width: 119px;
  justify-content: center;
  padding: 0 14px 0 12px;
}
.timer-pill .clock {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: #ffd06b;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.4));
}
#timerText {
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.7px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.32);
}
.timer-pill.urgent {
  border-color: rgba(255, 143, 83, 0.95);
  background: linear-gradient(180deg, rgba(113, 45, 31, 0.97), rgba(61, 22, 17, 0.97));
  animation: urgentPulse 0.9s ease-in-out infinite;
}
.timer-pill.urgent #timerText { color: #ffd9b8; }
.timer-pill.urgent .clock { color: #ffb37a; }
@keyframes urgentPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 3px 0 rgba(4, 20, 33, 0.5), 0 0 0 0 rgba(255, 120, 60, 0); }
  50% { transform: scale(1.035); box-shadow: 0 3px 0 rgba(4, 20, 33, 0.5), 0 0 18px 2px rgba(255, 110, 50, 0.32); }
}

.score-pill {
  gap: 8px;
  padding: 0 15px 0 10px;
  overflow: hidden;
}
.fish-thumb {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  border-radius: 50%;
  background: #0b2a45;
  box-shadow: 0 0 0 2px rgba(255, 200, 90, 0.82), 0 2px 6px rgba(0, 0, 0, 0.38);
}
.score-text {
  display: flex;
  align-items: baseline;
  gap: 1px;
  line-height: 1;
  font-weight: 900;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.3);
}
.score-text b { font-size: 21px; font-variant-numeric: tabular-nums; }
.score-text em {
  font-style: normal;
  font-size: 14px;
  margin: 0 1px;
  color: rgba(255, 255, 255, 0.46);
}
.score-text span {
  font-size: 14px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
}
.score-pill .progress {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 4px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.14);
  overflow: hidden;
}
.score-pill .progress i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffe19a, #ff9f45);
  box-shadow: 0 0 7px rgba(255, 176, 78, 0.8);
  transition: width 0.26s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.score-pill.bump { animation: pillBump 0.3s cubic-bezier(0.2, 1.4, 0.4, 1); }
@keyframes pillBump {
  0% { transform: scale(1); }
  42% { transform: scale(1.07); }
  100% { transform: scale(1); }
}

.icon-btn {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  pointer-events: auto;
  border: 1.5px solid rgba(255, 199, 94, 0.92);
  background: linear-gradient(180deg, #1b517a 0%, #0b2c47 100%);
  box-shadow:
    0 3px 0 rgba(4, 20, 33, 0.5),
    0 8px 18px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  transition: transform 0.12s ease, filter 0.12s ease;
}
.icon-btn .mp-icon { width: 22px; height: 22px; }
.icon-btn:active { transform: scale(0.9); filter: brightness(1.1); }
.icon-btn:disabled { opacity: 0.45; pointer-events: none; }

/* Small phones / landscape column */
.game.narrow .pill { height: 36px; border-radius: 18px; padding: 0 10px; }
.game.narrow .timer-pill { min-width: 96px; gap: 6px; padding: 0 10px; }
.game.narrow #timerText { font-size: 16px; letter-spacing: 0.4px; }
.game.narrow .timer-pill .clock { width: 16px; height: 16px; flex-basis: 16px; }
.game.narrow .fish-thumb { width: 23px; height: 23px; flex-basis: 23px; }
.game.narrow .score-pill { padding-right: 12px; gap: 6px; }
.game.narrow .score-text b { font-size: 17px; }
.game.narrow .score-text em, .game.narrow .score-text span { font-size: 12px; }
.game.narrow .score-pill .progress { left: 11px; right: 11px; bottom: 3px; }
.game.narrow .icon-btn { width: 38px; height: 38px; }
.game.narrow .icon-btn .mp-icon { width: 19px; height: 19px; }

/* Hint */
.hint {
  position: absolute;
  z-index: 8;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 184px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 32px);
  padding: 9px 14px 9px 12px;
  border-radius: 999px;
  white-space: nowrap;
  color: #fff2d8;
  font-size: 12.5px;
  letter-spacing: 0.2px;
  background: rgba(8, 32, 52, 0.74);
  border: 1px solid rgba(255, 209, 128, 0.36);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
  animation: hintFloat 2.6s ease-in-out infinite;
}
.hint .mp-icon { width: 17px; height: 17px; flex: 0 0 17px; color: #ffcf6b; }
.hint.hide { opacity: 0; transform: translate(-50%, 8px); }
@keyframes hintFloat {
  0%, 100% { margin-bottom: 0; }
  50% { margin-bottom: 4px; }
}
.game.short .hint { bottom: calc(env(safe-area-inset-bottom, 0px) + 170px); font-size: 11.5px; padding: 8px 12px; }
.game.narrow .hint { font-size: 11px; gap: 5px; padding: 8px 11px; }

/* Result / pause overlay */
.overlay {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(3, 17, 29, 0.5);
  -webkit-backdrop-filter: blur(5px) saturate(0.95);
  backdrop-filter: blur(5px) saturate(0.95);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.24s ease, visibility 0.24s ease;
}
.overlay.show { opacity: 1; visibility: visible; pointer-events: auto; }
.card {
  position: relative;
  width: min(100%, 328px);
  max-height: calc(100% - 16px);
  overflow: visible;
  padding: 24px 20px 20px;
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(44, 112, 159, 0.55), transparent 62%),
    linear-gradient(180deg, #123f63 0%, #0a2942 62%, #071d2f 100%);
  border: 1.5px solid rgba(255, 200, 90, 0.82);
  box-shadow:
    0 26px 64px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    inset 0 -16px 30px rgba(0, 0, 0, 0.18);
  transform: translateY(14px) scale(0.95);
  transition: transform 0.3s cubic-bezier(0.18, 0.9, 0.24, 1.18);
  scrollbar-width: none;
}
.card::-webkit-scrollbar { display: none; }
.overlay.show .card { transform: translateY(0) scale(1); }
.card__badge {
  width: 66px;
  height: 66px;
  margin: -49px auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #ffe6af;
  background:
    radial-gradient(circle at 36% 30%, #3a83b8, #0f3a5c 68%, #0a2942 100%);
  border: 2px solid rgba(255, 205, 108, 0.95);
  box-shadow:
    0 6px 0 rgba(4, 19, 31, 0.42),
    0 12px 26px rgba(0, 0, 0, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.card__badge .mp-icon { width: 30px; height: 30px; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.22)); }
.card__title {
  margin: 2px 0 0;
  font-size: 24px;
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #fff7e6;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.28);
}
.card__sub {
  margin: 8px 0 0;
  color: rgba(226, 243, 255, 0.74);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.1px;
}
.card__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 17px 0 4px;
  padding: 13px 10px;
  border-radius: 16px;
  background: rgba(4, 20, 34, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.stat { display: flex; align-items: baseline; gap: 4px; }
.stat__label { font-size: 11px; color: rgba(215, 236, 255, 0.62); }
.stat__value {
  font-size: 22px;
  font-weight: 900;
  color: #ffd273;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.22);
}
.stat__unit { font-size: 11px; color: rgba(215, 236, 255, 0.62); }
.stat__line { width: 1px; height: 22px; background: rgba(255, 255, 255, 0.12); }
.card__score {
  margin: 8px 0 2px;
  font-size: 12.5px;
  color: rgba(226, 243, 255, 0.68);
}
.card__score b {
  margin-left: 3px;
  font-size: 19px;
  color: #ffe0a0;
  font-variant-numeric: tabular-nums;
}
.btn {
  display: block;
  width: 100%;
  height: 50px;
  margin-top: 11px;
  padding: 0 16px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.1s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn--primary {
  color: #4a2406;
  background: linear-gradient(180deg, #ffd889 0%, #ffab4c 38%, #ff8a3d 100%);
  border: 1.5px solid rgba(255, 235, 190, 0.9);
  box-shadow:
    0 5px 0 #b95316,
    0 12px 22px rgba(255, 120, 40, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn--ghost {
  color: #ffeccb;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 222, 166, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.btn:active { transform: translateY(3px); }
.btn--primary:active { box-shadow: 0 2px 0 #b95316, 0 6px 14px rgba(255, 120, 40, 0.2); }
.btn--ghost:active { background: rgba(255, 255, 255, 0.1); }
.btn[hidden] { display: none; }
.game.short .card { padding: 20px 18px 16px; border-radius: 24px; }
.game.short .card__badge { width: 56px; height: 56px; margin-top: -42px; }
.game.short .card__title { font-size: 21px; }
.game.short .btn { height: 46px; margin-top: 9px; }

/* Boot / loading */
.boot {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  background:
    radial-gradient(120% 100% at 50% 28%, #155478 0%, #0a3350 42%, #061c2b 100%);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.boot.gone { opacity: 0; visibility: hidden; pointer-events: none; }
.boot__ring {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid rgba(255, 202, 100, 0.18);
  border-top-color: #ffca64;
  animation: spin 1.15s linear infinite;
  box-shadow: 0 0 26px rgba(255, 176, 70, 0.14);
}
.boot__ring .mp-icon {
  width: 27px;
  height: 27px;
  color: #ffca64;
  animation: spin 1.15s linear infinite reverse;
}
.boot__brand {
  margin-top: 20px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 3px;
  color: #fff2d4;
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.3), 0 0 24px rgba(255, 180, 90, 0.22);
}
.boot__tip {
  margin: 10px 0 0;
  font-size: 12.5px;
  letter-spacing: 0.6px;
  color: rgba(198, 231, 255, 0.68);
}
.boot__retry { width: 200px; margin-top: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Centred game column in landscape or on wide screens */
@media (orientation: landscape), (min-width: 760px) {
  .ambient { display: block; }
  .game {
    left: 50%;
    right: auto;
    width: min(100vw, 72vh, 560px);
    transform: translateX(-50%);
    border-radius: 22px;
    border: 1px solid rgba(255, 205, 110, 0.24);
    box-shadow: 0 26px 90px rgba(0, 0, 0, 0.62), 0 0 0 1px rgba(0, 0, 0, 0.4);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hint, .timer-pill.urgent, .boot__ring, .boot__ring .mp-icon { animation: none; }
}

/* =========================================================
   Home / start screen
   The generated key art is the whole screen; only the baked
   "开始游戏" button is turned into a real tap target.
   ========================================================= */
.home {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  background: #0b3550;
  transform-origin: 50% 42%;
  transition: opacity 0.36s ease, transform 0.46s cubic-bezier(0.32, 0.82, 0.35, 1),
    filter 0.36s ease, visibility 0.36s ease;
}
.home.leaving {
  opacity: 0;
  transform: scale(1.035);
  filter: blur(1.5px) saturate(1.04);
  pointer-events: none;
}
.home.gone {
  display: none;
}
.home__art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}
.home::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(6, 36, 56, 0.2) 0%, transparent 11%, transparent 84%, rgba(6, 36, 56, 0.26) 100%);
  mix-blend-mode: multiply;
}

/* Real tap target laid precisely over the painted button */
.home__start {
  position: absolute;
  left: 24.6%;
  top: 68.8%;
  width: 50.8%;
  height: 10%;
  z-index: 3;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.13s ease, filter 0.13s ease;
}
.home__start::before {
  content: "";
  position: absolute;
  inset: -5%;
  border-radius: inherit;
  border: 2px solid rgba(255, 222, 139, 0.62);
  box-shadow:
    0 0 18px rgba(255, 187, 78, 0.34),
    inset 0 0 20px rgba(255, 223, 142, 0.16);
  animation: startGlow 2.7s ease-in-out infinite;
  pointer-events: none;
}
.home__start::after {
  content: "";
  position: absolute;
  inset: 3%;
  border-radius: inherit;
  background: radial-gradient(60% 100% at 50% 0%, rgba(255, 255, 255, 0.26), transparent 64%);
  opacity: 0.7;
  pointer-events: none;
}
.home__start:active {
  transform: scale(0.965);
  filter: brightness(1.1) saturate(1.04);
}
.home__start:active::before {
  border-color: rgba(255, 247, 210, 0.95);
  box-shadow: 0 0 30px rgba(255, 205, 110, 0.7), inset 0 0 26px rgba(255, 236, 180, 0.3);
}
.home__start:focus-visible {
  outline: 2px solid #ffe7a8;
  outline-offset: 4px;
}
@keyframes startGlow {
  0%, 100% {
    transform: scale(1);
    border-color: rgba(255, 222, 139, 0.46);
    box-shadow: 0 0 14px rgba(255, 187, 78, 0.26), inset 0 0 15px rgba(255, 223, 142, 0.1);
  }
  50% {
    transform: scale(1.025);
    border-color: rgba(255, 236, 178, 0.88);
    box-shadow: 0 0 25px rgba(255, 196, 88, 0.5), inset 0 0 22px rgba(255, 233, 176, 0.2);
  }
}

/* Rising bubbles keep the pond alive without touching the artwork */
.home__bubbles {
  position: absolute;
  inset: auto 0 0;
  height: 34%;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.bubble {
  position: absolute;
  bottom: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid rgba(226, 250, 255, 0.68);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.62), rgba(167, 231, 255, 0.1) 62%);
  opacity: 0;
  animation: bubbleRise 7s ease-in infinite;
}
.bubble--1 { left: 16%; width: 5px; height: 5px; animation-delay: 0.4s; animation-duration: 7.4s; }
.bubble--2 { left: 34%; width: 8px; height: 8px; animation-delay: 2.1s; animation-duration: 8.6s; }
.bubble--3 { left: 58%; width: 4px; height: 4px; animation-delay: 4.2s; animation-duration: 6.8s; }
.bubble--4 { left: 76%; width: 7px; height: 7px; animation-delay: 1.2s; animation-duration: 8.2s; }
.bubble--5 { left: 88%; width: 4px; height: 4px; animation-delay: 3.4s; animation-duration: 7.1s; }
@keyframes bubbleRise {
  0% { opacity: 0; transform: translate3d(0, 20px, 0) scale(0.6); }
  12% { opacity: 0.62; }
  62% { opacity: 0.45; }
  100% { opacity: 0; transform: translate3d(10px, -118px, 0) scale(1.05); }
}

/* Best score appears only after the player has finished a run */
.home__best {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 14.5%);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: calc(100% - 44px);
  padding: 8px 15px;
  border-radius: 999px;
  color: #fff3d8;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(13, 61, 88, 0.72), rgba(7, 40, 61, 0.78));
  border: 1px solid rgba(255, 216, 137, 0.42);
  box-shadow: 0 6px 18px rgba(2, 25, 40, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: bestIn 0.35s cubic-bezier(0.2, 1.1, 0.36, 1);
}
.home__best .mp-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  color: #ffd36a;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.28));
}
.home__best b {
  color: #ffe7a1;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}
@keyframes bestIn {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Loading pill only, never a full-screen cover over the key art */
.home__loading {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 15.5%);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border-radius: 999px;
  color: rgba(255, 245, 224, 0.92);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  white-space: nowrap;
  background: rgba(8, 38, 58, 0.58);
  border: 1px solid rgba(255, 228, 169, 0.3);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.home__loading.gone {
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
}
.home__loading-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 217, 132, 0.24);
  border-top-color: #ffe0a0;
  animation: spin 0.9s linear infinite;
}

/* Toast used for brief system messages, not part of the game UI */
.toast {
  position: absolute;
  z-index: 70;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 90px);
  transform: translate(-50%, 10px);
  max-width: calc(100% - 48px);
  padding: 9px 15px;
  border-radius: 999px;
  color: #fff3db;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(6, 31, 48, 0.88);
  border: 1px solid rgba(255, 214, 128, 0.36);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}
.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Small back-to-home link in overlays */
.card__home {
  display: block;
  margin: 12px auto 0;
  padding: 5px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(220, 240, 255, 0.58);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: color 0.14s ease, background 0.14s ease;
}
.card__home:hover { color: #ffe7b0; background: rgba(255, 255, 255, 0.05); }
.card__home:active { transform: scale(0.96); color: #fff3d5; }
.card__best {
  margin: 7px 0 0;
  color: rgba(255, 227, 168, 0.72);
  font-size: 11.5px;
  letter-spacing: 0.3px;
}
.card__best b {
  margin: 0 2px;
  color: #ffe2a0;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.game.narrow .home__best { font-size: 11.5px; padding: 7px 12px; }
.game.narrow .home__loading { font-size: 11px; }

@media (prefers-reduced-motion: reduce) {
  .home__start::before, .bubble, .home__best { animation: none; }
}

/* ---- Home v3: portrait layout cut from the landscape key art ---- */
.home__bg {
  position: absolute;
  inset: 0;
  background: url("images/gen/gptimg_1795570530_look.png") 30% 50% / cover no-repeat;
  pointer-events: none;
}
.home__crop {
  position: absolute;
  pointer-events: none;
}
.crop {
  display: block;
  width: 100%;
  height: 100%;
  background-image: url("images/gen/gptimg_1795570530_look.png");
  background-repeat: no-repeat;
  -webkit-mask-image: radial-gradient(farthest-side, #000 80%, transparent 100%);
  mask-image: radial-gradient(farthest-side, #000 80%, transparent 100%);
  pointer-events: none;
}
.home__start { background: transparent; }
.home__best { bottom: calc(env(safe-area-inset-bottom, 0px) + 6%); }
.home__loading { bottom: calc(env(safe-area-inset-bottom, 0px) + 7%); }
