/* Didder Fishing — second front of the `gold_miner` engine (the new Gold Miner's layout and code, reskinned): Didder's
   mascot fishing from a canoe on a night river, Didder's palette (deep purple, neon purple, orange). The page fills
   whatever height the host gives: top bar and controls keep their size, the river scene scales into what is left. */
:root {
  --gold: #ff9d2e; --gold-deep: #d96a00; --wood: #4b1d8a; --wood-dark: #2a0f52; --wood-ink: #12051f;
  --cream: #fbeaff; --green: #ff8a1f; --green-dark: #a84300; --neon: #c45bff;
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; background: #0b0318; overflow: hidden; touch-action: manipulation; user-select: none; -webkit-user-select: none;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #fff; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
button:disabled { cursor: default; }
svg { display: block; }

.stage { position: relative; width: 100%; max-width: 520px; height: 100%; margin: 0 auto; overflow: hidden;
  background: url(assets/bg.webp?v=b181a3f4e5) center 62% / cover no-repeat, #12051f;
  display: flex; flex-direction: column; container-type: size; }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 14%, rgba(0,0,0,0) 55%, rgba(16,5,34,.82) 100%); }
.stage > * { position: relative; z-index: 1; }

/* 1. top bar */
.top { flex: none; height: calc(var(--og-safe-top, env(safe-area-inset-top)) + 54px); display: flex; align-items: flex-start; justify-content: space-between;
  padding: calc(var(--og-safe-top, env(safe-area-inset-top)) + 8px) 10px 0; z-index: 6 !important; }
.top .right { display: flex; gap: 6px; }
.pill { position: relative; display: flex; align-items: center; gap: 6px; height: 36px; min-width: 96px; max-width: 34cqw; padding: 0 12px 0 6px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(38,12,74,.88), rgba(16,5,34,.9)); border: 2px solid var(--gold);
  box-shadow: 0 3px 0 var(--wood-ink), 0 0 12px rgba(255,200,60,.25), inset 0 1px 0 rgba(255,255,255,.18); }
.pill .v { font-weight: 900; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; color: var(--cream); }
.pill.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 40% { transform: scale(1.12); } }
.coin { flex: none; display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: url(assets/coin.webp?v=30be8c09b0) center / contain no-repeat; }
.title { position: absolute; left: 8px; top: 4px; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; max-width: calc(100% - 120px); pointer-events: none; }
.logo { position: relative; transform: rotate(-1.5deg); pointer-events: none;
  padding: 5px 14px 6px; border-radius: 8px; background: linear-gradient(180deg, #6d2fc0, #4b1d8a 55%, #2e1060); border: 2px solid #1c0838;
  box-shadow: 0 4px 0 #12051f, 0 6px 14px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,220,160,.35); }
.logo span { display: block; white-space: nowrap; font: 900 20px/1 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: 1px;
  background: linear-gradient(180deg, #fffbe0 0%, #ffbf47 40%, #f0a800 70%, #c47a00 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1px #2e1060; filter: drop-shadow(0 2px 0 #1c0838); }
.logo.big span { font-size: 34px; }
.round { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #6d2fc0, var(--wood-dark)); border: 2px solid var(--gold);
  box-shadow: 0 3px 0 var(--wood-ink), 0 6px 12px rgba(0,0,0,.4); transition: transform .1s; }
.round:active { transform: translateY(2px) scale(.95); box-shadow: 0 1px 0 var(--wood-ink); }
.round svg { width: 18px; height: 18px; fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.round b { font: 900 18px Georgia, serif; }
#btnSound .off { display: none; } #btnSound.muted .on { display: none; } #btnSound.muted .off { display: block; }

/* 2. the mine scene */
.scene { flex: 1 1 0; min-height: 0; position: relative; container-type: size; }
.ground { position: absolute; left: 0; right: 0; bottom: 2px; height: 100%; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.signs { position: absolute; right: 8px; top: 6px; z-index: 3; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.sign { position: relative; min-width: 76px; height: 30px; padding: 0 10px 0 14px; border-radius: 4px 8px 8px 4px; transform: rotate(-2deg);
  background: linear-gradient(180deg, #b0743a, #84501f 55%, #64390f); border: 2px solid #1c0838;
  box-shadow: 0 3px 0 #12051f, 0 5px 10px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,220,160,.4); transition: transform .12s; }
.sign.alt { transform: rotate(2deg); border-radius: 8px 4px 4px 8px; padding: 0 14px 0 10px; }
.sign::before { content: ''; position: absolute; left: 5px; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: #1c0838; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.sign.alt::before { left: auto; right: 5px; }
.sign span { display: block; font-size: 11.5px; font-weight: 900; letter-spacing: 1px; color: var(--cream); text-shadow: 0 1px 0 #1c0838, 0 0 6px rgba(0,0,0,.4); white-space: nowrap; }
.sign:active { transform: translateY(2px) rotate(0deg); }

.msg { position: relative; max-width: 100%; pointer-events: none;
  padding: 4px 12px; border-radius: 999px; background: rgba(16,5,34,.62); border: 1px solid rgba(255,157,46,.45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 12px; font-weight: 800; color: var(--cream); transition: opacity .25s; }
.msg.hot { color: #fff; border-color: var(--gold); box-shadow: 0 0 14px rgba(255,200,60,.5); }

/* 3. controls */
.controls { flex: none; padding: 0 10px calc(var(--og-safe-bottom, env(safe-area-inset-bottom)) + 10px); display: flex; flex-direction: column; gap: 8px; z-index: 4 !important; }
.hud { display: grid; grid-template-columns: 1.25fr 1fr; gap: 8px; }
.box { height: 44px; border-radius: 12px; background: linear-gradient(180deg, rgba(38,12,74,.9), rgba(16,5,34,.92)); border: 1.5px solid rgba(255,157,46,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 3px 8px rgba(0,0,0,.35); display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; }
.box .k { font-size: 9.5px; font-weight: 900; letter-spacing: 1.2px; color: #dcb8ff; }
.box .v { display: flex; align-items: center; gap: 4px; font-size: 16px; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 0; max-width: 100%; }
.box .v .coin { width: 16px; height: 16px; }
.box.win.lit { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,200,60,.65), inset 0 1px 0 rgba(255,255,255,.2); }
.box.win.lit .v { color: #ffbf47; }
.betbox { flex-direction: row; justify-content: space-between; padding: 0 4px; }
.betbox .mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.mini { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #6d2fc0, var(--wood-dark)); border: 1.5px solid var(--gold); box-shadow: 0 2px 0 var(--wood-ink); }
.mini svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; }
.mini:active:not(:disabled) { transform: translateY(1px) scale(.94); }
.mini:disabled { opacity: .4; }

.picks { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.pick { position: relative; height: 58px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; overflow: hidden;
  background: linear-gradient(180deg, #ffd25a 0%, #f5a623 45%, #d9771a 100%); border: 2px solid #fff0b0;
  box-shadow: 0 4px 0 #8a4a0b, 0 8px 14px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.55); transition: transform .08s, box-shadow .08s, filter .2s; }
.pick::before { content: ''; position: absolute; left: -40%; top: 0; width: 30%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); animation: shine 3.6s ease-in-out infinite; }
.pick:nth-child(2)::before { animation-delay: .25s; } .pick:nth-child(3)::before { animation-delay: .5s; } .pick:nth-child(4)::before { animation-delay: .75s; }
@keyframes shine { 0%, 70% { left: -40%; } 100% { left: 130%; } }
.pick b { position: relative; font-size: 21px; font-weight: 900; line-height: 1; color: #fff; -webkit-text-stroke: 1px #8a4a0b; paint-order: stroke fill; text-shadow: 0 2px 0 #8a4a0b; }
.pick .cost { position: relative; display: flex; align-items: center; gap: 3px; max-width: 100%; padding: 1px 6px; border-radius: 999px; background: rgba(90,30,0,.5); }
.pick .cost em { font-style: normal; font-size: 11px; font-weight: 900; color: #fff3c4; white-space: nowrap; overflow: hidden; }
.pick .cost .coin { width: 12px; height: 12px; }
.pick:active:not(:disabled) { transform: translateY(3px) scale(.97); box-shadow: 0 1px 0 #8a4a0b, 0 3px 6px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.55); }
.pick:disabled { filter: saturate(.45) brightness(.8); }
.pick.on { filter: brightness(1.12); box-shadow: 0 4px 0 #8a4a0b, 0 0 18px rgba(255,220,90,.9), inset 0 2px 0 rgba(255,255,255,.55); }
.pick.tap { animation: tapRing .35s ease-out; }
@keyframes tapRing { 0% { box-shadow: 0 4px 0 #8a4a0b, 0 0 0 0 rgba(255,240,170,.9); } 100% { box-shadow: 0 4px 0 #8a4a0b, 0 0 0 14px rgba(255,240,170,0); } }

/* particles + floating finds */
.fx { position: absolute !important; inset: 0; z-index: 7 !important; pointer-events: none; overflow: hidden; }
.chip { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff6c0, #ffc21a 60%, #b8860b);
  box-shadow: 0 0 6px rgba(255,200,50,.9); will-change: transform, opacity; }
.chip.rock { background: radial-gradient(circle at 35% 30%, #c9a27a, #7a5532); box-shadow: none; border-radius: 3px; }
.spark { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px rgba(255,240,180,.95); will-change: transform, opacity; }
.find { position: absolute; display: flex; flex-direction: column; align-items: center; will-change: transform, opacity; transform: translate(-50%, -50%); }
.find img { width: var(--s, 64px); height: var(--s, 64px); object-fit: contain; filter: drop-shadow(0 4px 8px rgba(0,0,0,.55)); }
.find::before { content: ''; position: absolute; left: 50%; top: calc(var(--s, 64px) / 2); width: calc(var(--s, 64px) * 1.6); aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle, rgba(255,236,150,.75), rgba(255,200,60,0) 66%); z-index: -1; }
.find .amt { margin-top: 2px; padding: 2px 10px; border-radius: 999px; white-space: nowrap; font-size: 14px; font-weight: 900; color: #ffd08a;
  background: linear-gradient(180deg, #8a4f1c, #4e2a0c); border: 1.5px solid #ffb347; box-shadow: 0 3px 8px rgba(0,0,0,.45); }
.find.gem .amt { color: #fff; background: linear-gradient(180deg, #7c3aed, #3b0764); border-color: #e9d5ff; }
.find.big .amt { font-size: 17px; }
.trail { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff7cf; box-shadow: 0 0 6px 2px rgba(255,220,120,.9); }
/* option b: finds stack briefly at the top-right */
.stack { position: absolute !important; right: 8px; top: calc(var(--og-safe-top, env(safe-area-inset-top)) + 54px); z-index: 7 !important; display: flex; flex-direction: column; gap: 4px;
  align-items: flex-end; pointer-events: none; }
.stack .row { display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 3px; border-radius: 999px; background: rgba(16,5,34,.78); border: 1px solid rgba(255,157,46,.7);
  font-size: 12px; font-weight: 900; color: #ffd08a; animation: rowIn .3s cubic-bezier(.3,1.5,.5,1); }
.stack .row img { width: 22px; height: 22px; object-fit: contain; }
.stack .row.out { opacity: 0; transform: translateX(20px); transition: opacity .4s, transform .4s; }
@keyframes rowIn { from { opacity: 0; transform: translateY(16px) scale(.6); } }

/* summary of a 10× / 50× / 100× haul (Didder's result card) */
.summary { position: absolute !important; inset: 0; z-index: 8 !important; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(0,0,0,.5); }
.summary[hidden] { display: none; }
.summary .card { width: min(100%, 380px); max-height: 100%; display: flex; flex-direction: column; border-radius: 18px; padding: 12px 14px; border: 2px solid var(--gold);
  background: linear-gradient(180deg, #3a1470 0%, #24094a 55%, #12051f 100%); box-shadow: 0 0 30px rgba(255,190,40,.35); animation: pop .35s cubic-bezier(.3,1.5,.5,1); }
@keyframes pop { from { transform: scale(.7); opacity: 0; } }
.summary .eyebrow { text-align: center; font-size: 10.5px; font-weight: 900; letter-spacing: 2px; color: rgba(240,210,255,.7); }
.summary h3 { text-align: center; font-size: 20px; font-weight: 900; color: #ffbf47; text-shadow: 0 2px 0 #1c0838; }
.haul { margin-top: 8px; min-height: 0; flex: 1 1 auto; overflow-y: auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 6px; border-radius: 12px; background: rgba(0,0,0,.3); }
.haul .it { position: relative; display: flex; flex-direction: column; align-items: center; padding: 4px 2px 3px; border-radius: 10px; border: 1px solid rgba(255,157,46,.35);
  background: linear-gradient(180deg, rgba(90,30,150,.5), rgba(0,0,0,.35)); animation: rise .35s backwards; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.haul .it img { width: 40px; height: 40px; object-fit: contain; }
.haul .it b { font-size: 11px; font-weight: 900; color: #ffd08a; }
.haul .it i { position: absolute; top: 2px; right: 3px; font-style: normal; font-size: 10px; font-weight: 900; padding: 0 4px; border-radius: 4px; background: #ffb347; color: #1c0838; }
.haul .it.pot { border-color: #e9d5ff; box-shadow: 0 0 10px rgba(200,160,255,.45); }
.summary .total { margin-top: 8px; display: flex; justify-content: center; align-items: baseline; gap: 8px; font-size: 13px; font-weight: 800; color: rgba(240,210,255,.85); }
.summary .total b { font-size: 24px; color: #ffbf47; font-variant-numeric: tabular-nums; }
.acts { margin-top: 10px; display: grid; grid-template-columns: 1fr 1.3fr; gap: 8px; }
.acts button { height: 44px; border-radius: 999px; font-weight: 900; }
.acts .ghost { background: rgba(255,255,255,.1); border: 1px solid rgba(240,210,255,.4); font-size: 14px; }
.acts .again { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; background: linear-gradient(180deg, #5fd36a, #2e9b38); box-shadow: 0 3px 0 var(--green-dark); }
.acts .again b { font-size: 14px; } .acts .again small { font-size: 10px; font-weight: 800; color: #eaffd8; }
.acts button:active { transform: translateY(2px); }

/* big win */
.bigwin { position: absolute !important; inset: 0; z-index: 9 !important; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  background: radial-gradient(circle at 50% 45%, rgba(70,20,130,.6), rgba(0,0,0,.82)); }
.bigwin[hidden] { display: none; }
.rays { position: absolute; left: 50%; top: 45%; width: 160cqmin; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; opacity: .55;
  background: repeating-conic-gradient(from 0deg, rgba(255,214,90,.55) 0 8deg, rgba(255,214,90,0) 8deg 20deg); border-radius: 50%;
  -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: spin 14s linear infinite; }
@keyframes spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
.bw-item { position: relative; width: min(42cqw, 30cqh); filter: drop-shadow(0 0 22px rgba(255,214,90,.9)); animation: bwIn .7s cubic-bezier(.3,1.6,.5,1), bob 2.2s 0.7s ease-in-out infinite; }
@keyframes bwIn { from { transform: scale(.2) rotate(-25deg); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-6px) scale(1.03); } }
.bw-title { position: relative; font: 900 clamp(26px, 10cqw, 44px)/1 "Arial Black", Impact, system-ui, sans-serif; letter-spacing: 1px; text-align: center; padding: 0 10px;
  background: linear-gradient(180deg, #fffbe0, #ffbf47 45%, #f0a800 75%, #b86b00); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px #2e1060; filter: drop-shadow(0 4px 0 #1c0838); animation: bwIn .6s .1s cubic-bezier(.3,1.6,.5,1) backwards; }
.bw-amount { position: relative; font-size: clamp(30px, 12cqw, 52px); font-weight: 900; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 3px 0 #4b1d8a, 0 0 20px rgba(255,214,90,.8); }
.bw-tap { position: relative; margin-top: 6px; font-size: 13px; font-weight: 800; color: rgba(255,240,200,.85); animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .4; } }

/* sheets */
.sheet { position: absolute !important; inset: 0; z-index: 10 !important; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.55); }
.sheet[hidden] { display: none; }
.sheet .card { width: 100%; max-height: 88%; overflow-y: auto; padding: 16px 16px calc(var(--og-safe-bottom, env(safe-area-inset-bottom)) + 14px); border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #2c0f57, #12051f); border-top: 2px solid var(--gold); animation: up .3s ease-out; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet h2 { font-size: 18px; font-weight: 900; color: #ffbf47; margin-bottom: 8px; }
.sheet p { font-size: 13px; line-height: 1.45; color: #ecdcff; margin-bottom: 8px; }
.sheet p b { color: #ffbf47; }
.sheet .small { font-size: 11px; opacity: .75; }
.sheet .close { display: block; flex: none; width: 100%; height: 48px; min-height: 48px; line-height: 48px; padding: 0; margin-top: 10px; border-radius: 999px; font-weight: 900; font-size: 15px;
  background: linear-gradient(180deg, #ffd25a, #d9771a); color: #1c0838; box-shadow: 0 3px 0 #8a4a0b; }
.paytable table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 4px 0 8px; }
.paytable th { text-align: left; font-size: 10.5px; letter-spacing: 1px; color: #dcb8ff; padding: 4px; border-bottom: 1px solid rgba(255,157,46,.35); }
.paytable td { padding: 4px; border-bottom: 1px solid rgba(255,255,255,.08); }
.paytable .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.paytable .it { display: flex; align-items: center; gap: 6px; }
.paytable .it img { width: 26px; height: 26px; object-fit: contain; }
.paytable .tag { font-size: 9px; font-weight: 900; padding: 1px 5px; border-radius: 4px; background: #7c3aed; color: #fff; margin-left: 4px; }
.hist { display: flex; flex-direction: column; gap: 4px; }
.hist .row { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: rgba(0,0,0,.25); font-size: 13px; }
.hist .row img { width: 30px; height: 30px; object-fit: contain; }
.hist .row b { color: #ffbf47; font-variant-numeric: tabular-nums; }
.hist .empty { font-size: 13px; opacity: .7; text-align: center; padding: 18px 0; }

.tabs { display: flex; gap: 4px; padding: 4px; margin-bottom: 8px; border-radius: 999px; background: rgba(255,255,255,.06); }
.tabs button { flex: 1; height: 30px; border-radius: 999px; font-size: 12px; font-weight: 900; color: rgba(255,255,255,.6); }
.tabs button.on { background: linear-gradient(180deg, #ffd25a, #f0a800); color: #1c0838; box-shadow: 0 2px 0 #8a4a0b; }
.rank { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.rank li { display: grid; grid-template-columns: 26px 34px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 12px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,157,46,.12); animation: rise .3s backwards; }
.rank .pos { text-align: center; font-weight: 900; font-size: 14px; color: rgba(255,255,255,.45); }
.rank li:nth-child(1) .pos { color: #ffb347; } .rank li:nth-child(2) .pos { color: #d7dde4; } .rank li:nth-child(3) .pos { color: #f59e5b; }
.rank li:nth-child(-n+3) { border-color: rgba(255,157,46,.4); background: linear-gradient(90deg, rgba(255,200,60,.14), rgba(255,255,255,.04)); }
.rank .av { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px; color: #1c0838; object-fit: cover;
  background: linear-gradient(180deg, #ffe08a, #d9951a); box-shadow: 0 0 0 1.5px rgba(255,157,46,.5); }
.rank .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; color: rgba(255,255,255,.9); }
.rank .tt { display: flex; align-items: center; gap: 4px; font-weight: 900; font-size: 13.5px; color: #ffbf47; font-variant-numeric: tabular-nums; }
.rank .tt .coin { width: 14px; height: 14px; }
.rank .empty { display: block; text-align: center; opacity: .6; padding: 16px 0; }
.mock-note { margin-top: 8px; text-align: center; color: #ffb4a8 !important; }
.toast { position: absolute !important; left: 50%; bottom: 140px; transform: translate(-50%, 20px); z-index: 11 !important; max-width: 88%; padding: 8px 14px; border-radius: 12px;
  background: rgba(30,12,2,.92); border: 1px solid var(--gold); font-size: 13px; font-weight: 700; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.loader { position: absolute !important; inset: 0; z-index: 20 !important; display: grid; place-items: center; background: #12051f url(assets/bg.webp?v=b181a3f4e5) center 62% / cover; transition: opacity .4s; }
.loader.done { opacity: 0; pointer-events: none; }
.ld-card { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.ld-card .logo { position: static; transform: rotate(-1.5deg); }
.ld-bar { width: 180px; height: 8px; border-radius: 999px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,157,46,.6); overflow: hidden; }
.ld-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #ffd25a, #f5a623); transition: width .2s; }

/* ── short panels (the host lowers the game, e.g. inside a live room) ── */
@container (max-height: 560px) {
  .top { height: calc(var(--og-safe-top, env(safe-area-inset-top)) + 46px); padding-top: calc(var(--og-safe-top, env(safe-area-inset-top)) + 6px); }
  .round { width: 32px; height: 32px; } .pill { height: 32px; } .logo span { font-size: 15px; } .logo { padding: 3px 9px 4px; }
  .pick { height: 50px; } .pick b { font-size: 18px; } .box { height: 40px; } .controls { gap: 6px; }
  .sign { height: 26px; min-width: 66px; } .sign span { font-size: 10.5px; } .signs { gap: 4px; }
  .stack { top: calc(var(--og-safe-top, env(safe-area-inset-top)) + 46px); }
}
@container (max-height: 470px) {
  .pick { height: 46px; } .pick b { font-size: 16px; } .pick .cost { padding: 0 5px; } .pick .cost em { font-size: 10px; }
  .box { height: 36px; } .box .k { display: none; } .mini { width: 28px; height: 28px; }
  .hud { gap: 6px; } .picks { gap: 6px; }
  .sign { height: 24px; min-width: 58px; padding: 0 8px 0 11px; } .sign span { font-size: 9.5px; }
  .msg { font-size: 11px; padding: 3px 10px; }
}
@container (max-height: 390px) {
  .controls { flex-direction: row; align-items: stretch; padding-bottom: calc(var(--og-safe-bottom, env(safe-area-inset-bottom)) + 8px); }
  .hud { grid-template-columns: 1fr; flex: 0 0 38%; gap: 4px; } .box { height: auto; min-height: 30px; } .betbox { padding: 0 2px; }
  .picks { flex: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; } .pick { height: auto; min-height: 30px; }
  .pick b { font-size: 15px; } .pick .cost em { font-size: 10px; }
  .msg { display: none; }
}
/* the scene's own height (the title sits in the scene) */
@container (max-height: 250px) { .logo { display: none; } }
@media (prefers-reduced-motion: reduce) { .fireflies i, .pick::before, .rays, .boat, .ripples i, .boat .phones { animation: none !important; } }
/* TURBO: every delay halves (game.js T()); the swing follows */
#btnTurbo svg { fill: none; }
#btnTurbo.on { background: radial-gradient(circle at 35% 30%, #ffe27a, #d98a10); box-shadow: 0 3px 0 var(--wood-ink), 0 0 14px rgba(255,214,90,.85); }
#btnTurbo.on svg { fill: #fff; stroke: #7a4a00; }
@container (max-width: 360px) { .top .right { gap: 4px; } .round { width: 32px; height: 32px; } .pill { min-width: 84px; } }
/* PRIZES sign → glass panel with every prize the game can give */
.sheet.glass { align-items: center; padding: 14px; }
.sheet.glass .card { border-radius: 18px; border: 1.5px solid #ffb347; max-height: 100%; display: flex; flex-direction: column;
  background: rgba(20,6,40,.74); -webkit-backdrop-filter: blur(12px) saturate(1.25); backdrop-filter: blur(12px) saturate(1.25);
  box-shadow: 0 12px 30px rgba(0,0,0,.5), 0 0 18px rgba(255,157,46,.35); animation: pop .3s cubic-bezier(.3,1.4,.5,1); }
.sheet.glass .sub { font-size: 11.5px; opacity: .8; margin-bottom: 8px; }
.pgrid { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: grid; grid-auto-rows: max-content; align-content: start; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 2px; }
.pc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(0,0,0,.25)); border: 1px solid rgba(255,157,46,.18); animation: rise .3s backwards; min-width: 0; }
.pc img { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,0,0,.5)); }
.pc .nm { width: 100%; font-size: 10.5px; font-weight: 800; color: rgba(255,255,255,.88); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pc .vl { display: flex; align-items: center; gap: 3px; font-size: 12.5px; font-weight: 900; color: #ffbf47; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pc .vl .coin { width: 12px; height: 12px; }
.pc .mx { font-size: 9.5px; font-weight: 800; color: rgba(240,210,255,.6); }
.pc .ch { font-size: 9px; color: rgba(255,255,255,.5); }
.pc.best { border-color: #ffb347; background: linear-gradient(180deg, rgba(255,200,60,.28), rgba(90,50,10,.35)); box-shadow: 0 0 14px rgba(255,200,60,.45); }
.pc.best::after { content: 'TOP'; position: absolute; top: 4px; right: 4px; font-size: 8.5px; font-weight: 900; padding: 1px 5px; border-radius: 6px; background: #ffb347; color: #1c0838; }
.pc.best img { animation: bob 2.4s ease-in-out infinite; }
@container (max-height: 470px) { .pc img { width: 44px; height: 44px; } }

/* ── Didder Fishing: the river scene ── */
.stage::after { background: linear-gradient(180deg, rgba(10,2,24,.5) 0%, rgba(10,2,24,0) 14%, rgba(10,2,24,0) 55%, rgba(10,2,24,.85) 100%); }
.fireflies { position: absolute !important; inset: 0; z-index: 0 !important; pointer-events: none; }
.fireflies i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #ffd27a; box-shadow: 0 0 8px 3px rgba(255,170,60,.75);
  animation: ffDrift 6s ease-in-out infinite alternate, ffBlink 2.4s ease-in-out infinite; }
@keyframes ffDrift { to { transform: translate(var(--dx), var(--dy)); } }
@keyframes ffBlink { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }

/* the rig keeps its shape: the canoe on the left, the line's water spot on the right */
.rig { position: relative; width: min(94cqw, 140cqh, 440px); aspect-ratio: 1.5 / 1; margin-right: 8cqw; }
.boat { position: absolute; left: 0; bottom: 0; width: 66%; aspect-ratio: 560 / 557; transform-origin: 50% 85%; animation: rock 3.4s ease-in-out infinite; z-index: 2; }
.boat img { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 10px 12px rgba(0,0,0,.55)); transform-origin: 50% 90%; }
@keyframes rock { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(-2.5%) rotate(1.4deg); } }
/* headphones glow behind the head (Didder neon) */
.boat .phones { position: absolute; left: 10%; top: 6%; width: 62%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(196,91,255,.65) 0%, rgba(196,91,255,.25) 40%, rgba(196,91,255,0) 70%); animation: phones 2.2s ease-in-out infinite; }
@keyframes phones { 0%, 100% { opacity: .55; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); } }
.rig.busy .boat .phones { animation-duration: .5s; }
.boat.is-cast img { animation: castSwing .3s cubic-bezier(.3,0,.4,1); }
@keyframes castSwing { 0% { transform: rotate(-6deg); } 60% { transform: rotate(5deg) translateX(2%); } 100% { transform: rotate(0); } }
.boat.is-reel img { animation: reelPull .3s ease-in-out infinite alternate; }
@keyframes reelPull { from { transform: rotate(0); } to { transform: rotate(-3deg) translateX(-1.5%); } }
.boat.is-net img { animation: netHeave .42s ease-in-out infinite alternate; }
@keyframes netHeave { from { transform: rotate(0); } to { transform: rotate(-4deg) translate(-2%, 1%); } }
.boat.is-cheer img { animation: hop .5s cubic-bezier(.3,1.6,.5,1) 3; }
@keyframes hop { 0% { transform: translateY(0) scale(1); } 40% { transform: translateY(-9%) scale(1.03, .97); } 100% { transform: translateY(0) scale(1); } }
/* water rings around the canoe */
.ripples { position: absolute; left: 4%; bottom: -2%; width: 60%; height: 18%; pointer-events: none; z-index: 1; }
.ripples i { position: absolute; left: 50%; top: 50%; width: 100%; height: 100%; border-radius: 50%; border: 2px solid rgba(214,150,255,.55);
  transform: translate(-50%, -50%) scale(.6); opacity: 0; animation: ripple 3.6s ease-out infinite; }
.ripples i:nth-child(2) { animation-delay: 1.2s; } .ripples i:nth-child(3) { animation-delay: 2.4s; }
@keyframes ripple { 0% { transform: translate(-50%, -50%) scale(.55); opacity: .9; } 100% { transform: translate(-50%, -50%) scale(1.35); opacity: 0; } }
.spot { position: absolute; left: 86%; bottom: 9%; width: 2px; height: 2px; }
.line { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 3; }
.line path { fill: none; stroke: rgba(255,240,255,.75); stroke-width: 1.2; filter: drop-shadow(0 0 2px rgba(196,91,255,.9)); }
.bobber { position: absolute; left: 86%; bottom: 9%; width: 14px; height: 18px; margin: 0 0 -6px -7px; z-index: 3; pointer-events: none; }
.bobber i { position: absolute; inset: 0; border-radius: 50% 50% 46% 46%; background: linear-gradient(180deg, #ff7a00 0 52%, #fff 52%);
  box-shadow: 0 0 8px rgba(255,140,40,.8), inset -2px -2px 0 rgba(0,0,0,.18); animation: float 1.6s ease-in-out infinite; }
.bobber i::before { content: ''; position: absolute; left: 50%; top: -6px; width: 2px; height: 7px; margin-left: -1px; background: #fff; border-radius: 1px; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(2px) rotate(4deg); } }
.net { position: absolute; left: 86%; bottom: 9%; width: 34%; aspect-ratio: 1; transform: translate(-50%, -50%); z-index: 4; pointer-events: none; }
.net svg { width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 6px 8px rgba(0,0,0,.5)); }
.net .ng { opacity: 0; transition: opacity .3s; }
.net.gold .ng { opacity: 1; animation: phones .5s ease-in-out infinite; }
.net.xl { width: 44%; }
.net.burst { animation: netBurst .38s ease-out forwards; }
@keyframes netBurst { to { opacity: 0; filter: brightness(1.8); scale: 1.35; } }
.stage.shake { animation: shake .45s cubic-bezier(.36,.07,.19,.97); }
.stage.shake.hard { animation: shakeHard .5s cubic-bezier(.36,.07,.19,.97); }
@keyframes shake { 10%, 90% { transform: translate(-1px, 1px); } 20%, 80% { transform: translate(3px, -2px); } 30%, 50%, 70% { transform: translate(-4px, 2px); } 40%, 60% { transform: translate(4px, -1px); } }
@keyframes shakeHard { 10%, 90% { transform: translate(-2px, 2px); } 20%, 80% { transform: translate(6px, -4px); } 30%, 50%, 70% { transform: translate(-8px, 4px); } 40%, 60% { transform: translate(8px, -3px); } }

/* water particles */
.drop { position: absolute; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 35% 30%, #fff, #c9b6ff 55%, rgba(150,110,255,.6));
  box-shadow: 0 0 6px rgba(200,160,255,.8); will-change: transform, opacity; }
.bub { position: absolute; border-radius: 50%; border: 1.5px solid rgba(235,220,255,.85); background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.7), rgba(255,255,255,0) 55%); will-change: transform, opacity; }
.ring { position: absolute; border-radius: 50%; border: 2px solid rgba(225,190,255,.85); box-shadow: 0 0 8px rgba(196,91,255,.6); pointer-events: none; }
.ring.gold { border-color: rgba(255,200,90,.95); box-shadow: 0 0 14px rgba(255,180,60,.9); }
.trail.bubble { width: 7px; height: 7px; background: none; border: 1.5px solid rgba(235,220,255,.85); box-shadow: none; }
.find::before { background: radial-gradient(circle, rgba(220,150,255,.7), rgba(196,91,255,0) 66%); }
.find .amt { color: #fff3e0; background: linear-gradient(180deg, #ff8a1f, #c24e00); border-color: #ffd9a8; }
.find.gem .amt { background: linear-gradient(180deg, #a243ff, #4a0f8f); border-color: #ecd5ff; }
.find.mini::before { display: none; }

/* title: a neon sign */
.logo { background: linear-gradient(180deg, rgba(60,16,110,.92), rgba(28,6,56,.92)); border: 2px solid var(--neon); border-radius: 10px;
  box-shadow: 0 0 12px rgba(196,91,255,.75), 0 0 2px #fff inset, 0 4px 0 #12051f; }
.logo span { background: linear-gradient(180deg, #fff6e8 0%, #ffcf7a 40%, #ff8a1f 72%, #e05a00 100%); -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 1px #3a0f6e; filter: drop-shadow(0 0 6px rgba(255,140,40,.55)); }
.round { background: radial-gradient(circle at 35% 30%, #6d2fc0, #2a0f52); border-color: var(--neon); box-shadow: 0 3px 0 #12051f, 0 0 10px rgba(196,91,255,.5); }
.mini { background: radial-gradient(circle at 35% 30%, #6d2fc0, #2a0f52); border-color: var(--neon); box-shadow: 0 2px 0 #12051f; }
.pill { border-color: var(--gold); box-shadow: 0 3px 0 #12051f, 0 0 12px rgba(255,140,40,.3), inset 0 1px 0 rgba(255,255,255,.18); }
.box { border-color: rgba(196,91,255,.75); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 0 10px rgba(196,91,255,.25); }
.box.win.lit { border-color: var(--gold); box-shadow: 0 0 16px rgba(255,150,40,.7), inset 0 1px 0 rgba(255,255,255,.2); }
/* wooden signs (from the mood image) */
.sign { background: linear-gradient(180deg, #b0743a, #84501f 55%, #64390f); border-color: #3e220e; box-shadow: 0 3px 0 #2a170b, 0 0 10px rgba(196,91,255,.35), inset 0 1px 0 rgba(255,220,160,.4); }
.sign::before { background: #3e220e; }
.sign span { color: #fff1c9; text-shadow: 0 1px 0 #3e220e, 0 0 6px rgba(0,0,0,.4); }
/* the casts: Didder orange */
.pick { background: linear-gradient(180deg, #ffb24d 0%, #ff7a00 50%, #e05200 100%); border-color: #ffdcae;
  box-shadow: 0 4px 0 #8a2f00, 0 8px 14px rgba(0,0,0,.45), 0 0 12px rgba(255,120,20,.35), inset 0 2px 0 rgba(255,255,255,.5); }
.pick b { -webkit-text-stroke: 1px #8a2f00; text-shadow: 0 2px 0 #8a2f00; }
.pick:active:not(:disabled) { box-shadow: 0 1px 0 #8a2f00, 0 3px 6px rgba(0,0,0,.4), inset 0 2px 0 rgba(255,255,255,.5); }
.pick.on { box-shadow: 0 4px 0 #8a2f00, 0 0 20px rgba(255,150,40,.95), inset 0 2px 0 rgba(255,255,255,.55); }
.pick.tap { animation: tapRing .35s ease-out; }
@keyframes tapRing { 0% { box-shadow: 0 4px 0 #8a2f00, 0 0 0 0 rgba(255,210,150,.9); } 100% { box-shadow: 0 4px 0 #8a2f00, 0 0 0 14px rgba(255,210,150,0); } }
.pick .cost { background: rgba(70,15,0,.5); }
.acts .again { background: linear-gradient(180deg, #ffb24d, #ff7a00 55%, #e05200); box-shadow: 0 3px 0 #8a2f00; }
.acts .again small { color: #fff1e0; }
.sheet .close, .tabs button.on { background: linear-gradient(180deg, #ffb24d, #ff7a00); color: #2a0a00; box-shadow: 0 3px 0 #8a2f00; }
.sheet .card { border-top-color: var(--neon); }
.summary .card { border-color: var(--neon); box-shadow: 0 0 30px rgba(196,91,255,.5); }
.haul .it.pot { border-color: #ffd9a8; box-shadow: 0 0 10px rgba(255,150,40,.5); }
.pc.best { border-color: var(--gold); background: linear-gradient(180deg, rgba(255,140,40,.3), rgba(70,20,130,.4)); box-shadow: 0 0 14px rgba(255,140,40,.45); }
.pc.best::after { background: var(--gold); color: #2a0a00; }
.paytable .tag { background: #a243ff; }
#btnTurbo.on { background: radial-gradient(circle at 35% 30%, #ffc070, #ff7a00); box-shadow: 0 3px 0 #12051f, 0 0 14px rgba(255,150,40,.85); }
#btnTurbo.on svg { stroke: #6a2400; }
.ld-card .ld-mascot { width: 150px; animation: rock 3.4s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(196,91,255,.6)); }
.ld-bar i { background: linear-gradient(90deg, #ffb24d, #ff7a00); }
.ld-bar { border-color: var(--neon); }

/* big win: the chest is pulled from the water and opens with the find */
.bigwin { background: radial-gradient(circle at 50% 45%, rgba(110,40,190,.55), rgba(8,2,20,.88)); }
.rays { background: repeating-conic-gradient(from 0deg, rgba(255,160,60,.5) 0 8deg, rgba(196,91,255,0) 8deg 20deg); }
.bw-pull { position: relative; width: min(46cqw, 34cqh); aspect-ratio: 1; }
.bw-chest { position: absolute; left: 10%; bottom: 0; width: 80%; filter: drop-shadow(0 0 18px rgba(196,91,255,.8));
  animation: chestPull .7s cubic-bezier(.2,.9,.3,1.2) both; }
@keyframes chestPull { 0% { transform: translateY(120%) rotate(-8deg); opacity: 0; } 55% { opacity: 1; } 80% { transform: translateY(-6%) rotate(3deg); } 100% { transform: translateY(0) rotate(0); } }
.bigwin.open .bw-chest { animation: chestPop .45s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes chestPop { 0% { transform: scale(1); } 40% { transform: scale(1.12, .9); } 100% { transform: scale(.92) translateY(10%); opacity: .9; } }
.bw-pull .bw-item { position: absolute; left: 15%; top: 0; width: 70%; opacity: 0; transform: translateY(60%) scale(.3); animation: none; }
.bigwin.open .bw-item { opacity: 1; animation: itemOut .6s cubic-bezier(.3,1.6,.5,1) forwards, itemBob 2.2s .6s ease-in-out infinite; }
@keyframes itemBob { 0%, 100% { opacity: 1; transform: translateY(-18%) scale(1); } 50% { opacity: 1; transform: translateY(-23%) scale(1.03); } }
@keyframes itemOut { from { opacity: 0; transform: translateY(60%) scale(.3); } to { opacity: 1; transform: translateY(-18%) scale(1); } }
.bigwin.only-chest .bw-item { display: none; }
.bigwin.only-chest.open .bw-chest { animation: chestPullOnly .5s cubic-bezier(.3,1.6,.5,1) both; }
@keyframes chestPullOnly { 40% { transform: scale(1.15); } 100% { transform: scale(1.05); } }
.bw-water { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; pointer-events: none;
  background: linear-gradient(180deg, rgba(120,60,220,0), rgba(70,20,140,.55) 40%, rgba(20,5,45,.9)); }
.bw-water i { position: absolute; left: 50%; top: 18%; width: 70%; height: 26%; border-radius: 50%; border: 2px solid rgba(225,190,255,.7);
  transform: translate(-50%, -50%) scale(.5); animation: ripple 1.6s ease-out infinite; }
.bw-water i:nth-child(2) { animation-delay: .8s; }
.bw-title { background: linear-gradient(180deg, #fff6e8, #ffcf7a 45%, #ff8a1f 75%, #c44a00); -webkit-background-clip: text; background-clip: text; -webkit-text-stroke: 1.5px #3a0f6e; filter: drop-shadow(0 4px 0 #1c0838); }
.bw-amount { text-shadow: 0 3px 0 #4b1d8a, 0 0 20px rgba(255,150,40,.8); }
.stage.turbo .boat.is-reel img { animation-duration: .15s; }
@container (max-height: 390px) { .rig { width: min(94cqw, 150cqh, 440px); } }

/* ── result card and win popups sit HIGH, just under the top bar (owner, 12/11/2026): the finds rising and the mascot / miner
   underneath stay visible. The backdrop fades out downwards instead of darkening the whole stage. ── */
.summary { align-items: flex-start; padding: calc(var(--og-safe-top, env(safe-area-inset-top)) + 50px) 14px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.3) 50%, rgba(0,0,0,.06) 100%); }
.summary .card { max-height: 100%; }
@container (min-height: 600px) { .summary .card { max-height: 64%; } }
.bigwin { justify-content: flex-start; padding-top: calc(var(--og-safe-top, env(safe-area-inset-top)) + 44px);
  background: radial-gradient(ellipse at 50% 26%, rgba(0,0,0,.25), rgba(0,0,0,.62) 48%, rgba(0,0,0,.12) 100%); }
.bigwin .rays { top: 30%; }
@container (max-height: 470px) { .bigwin { padding-top: calc(var(--og-safe-top, env(safe-area-inset-top)) + 36px); } }
/* fishing: the purple big-win backdrop follows the raised popup; the water strip moves under the chest */
.bigwin { background: radial-gradient(ellipse at 50% 26%, rgba(110,40,190,.45), rgba(8,2,20,.66) 48%, rgba(8,2,20,.12) 100%); }
.bw-water { display: none; }
.bw-pull::after { content: ''; position: absolute; left: 0; right: 0; bottom: -6%; height: 22%; border-radius: 50%; pointer-events: none; z-index: -1;
  background: radial-gradient(ellipse, rgba(150,90,255,.55), rgba(70,20,140,0) 70%); box-shadow: 0 0 0 2px rgba(225,190,255,.35); animation: ripplePulse 1.6s ease-out infinite; }
@keyframes ripplePulse { 0% { transform: scale(.7); opacity: 1; } 100% { transform: scale(1.25); opacity: 0; } }
