/* Wildbound — tall-grass catcher UI */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --bg: #0b1410; --panel: #122019; --panel2: #0e1813;
  --gold: #fbbf24; --gold-lt: #fde68a; --green: #4ade80; --blue: #7dd3fc;
  --txt: #f5efe0; --parchment: #e8dcc0; --dim: #a89878; --line: rgba(255,255,255,.08);
  --font-title: 'Cinzel', 'Trebuchet MS', serif;
  --font-num: 'Bebas Neue', 'Rajdhani', sans-serif;
  --font-ui: 'Rajdhani', 'Trebuchet MS', Verdana, sans-serif;
  /* materials */
  --wood: linear-gradient(180deg, #2e2318 0%, #241a10 50%, #1a120a 100%);
  --wood-lt: linear-gradient(180deg, #3d2f1f 0%, #2e2318 100%);
  --brass: linear-gradient(180deg, #fde68a 0%, #fbbf24 40%, #b45309 100%);
  --inset: inset 0 3px 10px rgba(0,0,0,.7), inset 0 -1px 0 rgba(255,255,255,.06);
  --raised: 0 4px 0 rgba(0,0,0,.4), 0 8px 20px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.12);
}
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--txt);
  font-family: var(--font-ui); }
/* fluid root: scales with viewport width */
html { font-size: clamp(13px, 1.6vw, 18px); }
#app { width: 100vw; margin: 0; height: 100vh; height: 100dvh; display: grid;
  grid-template-rows: auto 1fr auto;
  background: url('assets/habitat-forest.webp') center top / cover no-repeat, var(--bg); overflow: hidden; }
#main { min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* HUD — brass expedition plaque */
#hud { display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: linear-gradient(180deg, #1e1a14 0%, #14110c 100%);
  border-bottom: 1px solid rgba(251,191,36,.25);
  box-shadow: 0 4px 20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  position: sticky; top: 0; z-index: 40; }
.hud-title { font-family: var(--font-title); font-weight: 900; letter-spacing: 4px; font-size: 24px;
  background: linear-gradient(180deg, #fde68a 0%, #fbbf24 50%, #d97706 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.9)); }
.hud-stats { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.hstat { text-align: center; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.3));
  border-radius: 12px; padding: 7px 14px; min-width: 76px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 8px rgba(0,0,0,.4);
  border: 1px solid rgba(255,255,255,.06); cursor: default; }
button.hstat { cursor: pointer; font-family: inherit; color: inherit; }
button.hstat:hover { border-color: rgba(251,191,36,.3); }
.hstat span { display: block; font-size: 10px; color: #c9b896; letter-spacing: 2.5px; font-weight: 700; font-family: var(--font-ui); margin-bottom: 2px; }
.hstat b { font-size: 20px; font-weight: 400; color: #fff8e7; font-family: var(--font-num); letter-spacing: 1.5px; text-shadow: 0 2px 4px rgba(0,0,0,.8); }
#hud-combo-wrap b { color: #fb923c; }
#hud-reset-btn { opacity: .85; }
#hud-reset-btn:hover { opacity: 1; border-color: rgba(251,191,36,.4); }
.hstat b { font-size: 17px; }
button.hstat { background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 0; }
button.hstat:hover b { color: var(--gold); }
#hud-reset-btn.broke { animation: bonusglow 1s infinite; }
#hud-reset-btn.broke b, #hud-reset-btn.broke span { color: #fca5a5; }
.wb-icon { display: inline-flex; width: 1.3em; height: 1.3em; vertical-align: -0.25em; flex: none; }
.wb-icon svg { width: 100%; height: 100%; display: block; }
.cm-label .wb-icon { width: 1.1em; height: 1.1em; color: #fb923c; }
.combo-meter { margin-top: 10px; padding: 12px; background: rgba(0,0,0,.45);
  border-radius: 16px; text-align: center; box-shadow: var(--inset); border: 1px solid rgba(0,0,0,.5); }
.cm-label { font-size: 11px; font-weight: 700; letter-spacing: 3px; color: #fb923c; margin-bottom: 8px; font-family: var(--font-ui); }
.cm-bar { height: 12px; background: rgba(0,0,0,.6); border-radius: 6px; overflow: hidden; margin-bottom: 8px;
  box-shadow: inset 0 2px 4px rgba(0,0,0,.8); }
.cm-fill { height: 100%; width: 0%; border-radius: 6px;
  background: linear-gradient(90deg, #ea580c, #fbbf24, #fde68a);
  transition: width .4s cubic-bezier(.2,.9,.3,1.2); box-shadow: 0 0 10px rgba(251,146,60,.7); }
.cm-text { font-size: 15px; font-weight: 700; color: var(--parchment); font-family: var(--font-ui); }
.combo-meter.maxed .cm-label { animation: huntpulse 1s infinite; color: #fde68a; }
.win-combo { font-size: 18px; font-weight: 900; color: #fb923c; margin: 6px 0; text-shadow: 0 0 12px rgba(251,146,60,.6); }
.win-big-label { font-family: var(--font-title); font-weight: 900; letter-spacing: 3px; margin-bottom: 8px;
  animation: bigwin .45s ease-out both; }
.win-big-label.tier1 { font-size: clamp(20px, 3vw, 28px); color: #fbbf24; text-shadow: 0 0 16px rgba(251,191,36,.55); }
.win-big-label.tier2 { font-size: clamp(22px, 3.2vw, 30px); color: #fde68a; text-shadow: 0 0 20px rgba(253,230,138,.65); }
.win-big-label.tier3 { font-size: clamp(24px, 3.5vw, 34px); color: #fff; text-shadow: 0 0 28px rgba(251,191,36,.75); }
@keyframes bigwin { to { transform: scale(1.08); } }
#win-overlay.big1 .win-card { border-color: #fbbf24; box-shadow: 0 0 40px rgba(251,191,36,.5); }
#win-overlay.big2 .win-card { border-color: #fde68a; box-shadow: 0 0 44px rgba(253,230,138,.45); }
#win-overlay.big3 .win-card { border-color: #fff; box-shadow: 0 0 56px rgba(251,191,36,.55); }
.win-combo span { color: #4ade80; font-size: 15px; }
.win-combo-start { font-size: 14px; color: #fb923c; opacity: .9; margin: 4px 0; }
.win-pack-link { display: inline-flex; align-items: center; gap: 5px; margin: 4px 0; padding: 5px 10px; border-radius: 8px;
  color: #fff1a8; background: rgba(100,71,18,.72); border: 1px solid rgba(251,191,36,.45); font-weight: 900; letter-spacing: 1px; }
.win-pack-link .wb-icon { width: 1.1em; height: 1.1em; }
.win-pack-link span { color: #4ade80; }
.hidden { display: none !important; }

/* encounter banner */
#encounter-banner { position: absolute; top: 70px; left: 50%; transform: translateX(-50%); z-index: 30; pointer-events: none;
  text-align: center; font-weight: 900; font-size: 20px; color: #fff;
  padding: 8px; opacity: 0; text-shadow: 0 2px 12px rgba(0,0,0,.8); }
#encounter-banner.show { animation: bannerin 3s ease-out forwards; }
@keyframes bannerin { 0% { opacity: 0; transform: scale(.8); } 12% { opacity: 1; transform: scale(1.05); }
  20% { transform: scale(1); } 80% { opacity: 1; } 100% { opacity: 0; } }


/* board */
#board-wrap { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; }
/* on-cell capture */
.catch-badge { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); z-index: 5;
  background: rgba(0,0,0,.75); border: 1px solid var(--gold); color: var(--gold);
  font-weight: 900; font-size: 15px; padding: 2px 10px; border-radius: 10px; }
.catch-badge.crit { color: #fde68a; border-color: #fde68a; box-shadow: 0 0 14px rgba(253,224,71,.8); }
.fly-ball { position: absolute; width: 44px; height: 44px; font-size: 38px; z-index: 30; pointer-events: none;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
.fly-ball.crit { filter: drop-shadow(0 0 12px rgba(253,224,71,.9)); }
.cell-ball { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 52px; z-index: 4; }
.cell-ball.crit { filter: drop-shadow(0 0 16px rgba(253,224,71,1)); }
.cell-ball.shk1 { animation: cellshk1 .38s; } .cell-ball.shk2 { animation: cellshk2 .62s; } .cell-ball.shk3 { animation: cellshk3 .48s; }
@keyframes cellshk1 { 25% { transform: translateX(-7px) rotate(-8deg); } 75% { transform: translateX(7px) rotate(8deg); } }
@keyframes cellshk2 { 20% { transform: translateX(-9px) rotate(-10deg); } 60% { transform: translateX(9px) rotate(10deg); } }
@keyframes cellshk3 { 30% { transform: translateX(-6px) rotate(-6deg) scale(1.06); } 70% { transform: translateX(6px) rotate(6deg) scale(1.06); } }
.cell.caught-cell { animation: catchgold .8s; }
@keyframes catchgold { 0% { box-shadow: 0 0 0 0 rgba(251,191,36,.9); } 100% { box-shadow: 0 0 0 22px rgba(251,191,36,0); } }
.cell.broke { animation: brokeshake .5s; }
@keyframes brokeshake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.cell-msg { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; z-index: 6;
  font-weight: 900; font-size: 15px; letter-spacing: 1px; text-shadow: 0 2px 6px #000;
  animation: cellmsg .9s ease-out forwards; pointer-events: none; }
.cell-msg.win { color: var(--gold); } .cell-msg.lose { color: #f87171; }
#board.apex-anticipation { animation: apexzoom 1.2s ease-in-out infinite; }
@keyframes apexzoom { 50% { transform: scale(1.03); } }
#board.apex-anticipation::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  border-radius: 12px; box-shadow: inset 0 0 60px rgba(239,68,68,.4); animation: apexpulse 1.2s infinite; }
@keyframes apexpulse { 50% { box-shadow: inset 0 0 90px rgba(239,68,68,.6); } }
.cell-msg.near-miss { color: #fbbf24 !important; font-size: 20px !important; font-weight: 900;
  animation: nearmiss .4s 3; text-shadow: 0 0 16px rgba(251,191,36,.8); }
@keyframes nearmiss { 50% { transform: scale(1.35); } }
#app.near-shake { animation: nearshake .4s 3; }
@keyframes nearshake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
@keyframes cellmsg { 0% { opacity: 0; transform: translateY(8px) scale(.8); } 25% { opacity: 1; transform: none; }
  75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
#board { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: clamp(4px, 0.8vmin, 10px);
  /* Square board that fits: size from height, cap by width */
  height: 100%; aspect-ratio: 1 / 1; max-width: 100%; margin: 0 auto; }
.cell { position: relative; border-radius: 12px; overflow: hidden; min-height: 0; min-width: 0;
  background: linear-gradient(180deg, #16281d, #0e1a13); border: 1px solid var(--line); }
.cell.spinning { background: #0b1510; }
.cell.grass { background:
  radial-gradient(60% 50% at 50% 100%, rgba(74,222,128,.25), transparent 70%),
  linear-gradient(180deg, #101f15, #0b1510); }
.cell.grass::after { content: '🌿'; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; font-size: 26px; opacity: .5; }
.cell.mon { cursor: pointer; transition: transform .15s; }
.cell.mon img { width: 100%; height: 100%; object-fit: cover; }
.cell.mon.sel { outline: 3px solid var(--gold); transform: scale(1.04); z-index: 2;
  box-shadow: 0 0 18px rgba(251,191,36,.6); }
.cell.mon.marked { outline: 3px solid #fde68a; box-shadow: 0 0 14px rgba(253,230,138,.55); }
.cell.mon.hit { animation: hitshake .35s; }
@keyframes hitshake { 25% { transform: translateX(-5px); } 50% { transform: translateX(5px); } 75% { transform: translateX(-3px); } }
.hpbar { position: absolute; left: 6px; right: 6px; bottom: 22px; height: 7px; background: rgba(0,0,0,.6);
  border-radius: 4px; overflow: hidden; }
.hpfill { height: 100%; transition: width .4s; }
.hptext { position: absolute; bottom: 4px; left: 0; right: 0; text-align: center; font-size: 11px;
  font-weight: 700; text-shadow: 0 1px 3px #000; }
.cell-rarity { position: absolute; top: 4px; right: 6px; font-size: 15px; text-shadow: 0 1px 4px #000; }
.roll-in-sigil { position: absolute; z-index: 4; bottom: 32px; left: 5px; width: 26px; height: 26px; display: grid; place-items: center;
  color: #fff1a8; background: rgba(70,45,9,.86); border: 1px solid rgba(253,230,138,.8); border-radius: 50%;
  box-shadow: 0 0 14px rgba(251,191,36,.72); animation: sigilglow 1.2s ease-in-out infinite alternate; }
.roll-in-sigil .wb-icon { width: 15px; height: 15px; }
@keyframes sigilglow { to { box-shadow: 0 0 22px rgba(251,191,36,.95); transform: scale(1.08); } }
.cell.pack-link { box-shadow: 0 0 0 3px rgba(251,191,36,.95), 0 0 24px rgba(251,191,36,.68); filter: brightness(1.18); }
.weak-tag { position: absolute; top: 4px; left: 4px; background: #b91c1c; color: #fff; font-size: 9px;
  font-weight: 900; padding: 2px 5px; border-radius: 4px; letter-spacing: .5px; animation: weakpulse 1s infinite; }
@keyframes weakpulse { 50% { transform: scale(1.12); } }
.chase-tag { position: absolute; top: 22px; left: 4px; background: var(--gold); color: #3a2500; font-size: 9px;
  font-weight: 900; padding: 2px 5px; border-radius: 4px; }
.shiny-tag { position: absolute; top: 4px; left: 4px; color: #fef08a; font-size: 13px;
  text-shadow: 0 0 8px #fde047; animation: weakpulse 1.2s infinite; }
.shiny-img { filter: hue-rotate(40deg) saturate(1.6) brightness(1.15); }
.dmg { position: absolute; top: 30%; left: 0; right: 0; text-align: center; font-size: 26px; font-weight: 900;
  color: #fff; text-shadow: 0 2px 6px #000; animation: dmgfloat .9s ease-out forwards; pointer-events: none; z-index: 5; }
.dmg.super { color: #fbbf24; font-size: 32px; }
.dmg.weakdmg { color: #94a3b8; font-size: 20px; }
@keyframes dmgfloat { to { transform: translateY(-34px); opacity: 0; } }

/* shared bits */
.hint { color: var(--dim); text-align: center; padding: 8px; font-family: var(--font-ui); font-size: 14px; letter-spacing: .3px; }
.t-sub { color: var(--dim); font-size: 12px; }
.big-btn { width: 100%; padding: 12px; border: 1px solid rgba(251,191,36,.4); border-radius: 12px; font-size: 18px;
  font-weight: 900; letter-spacing: 1px; cursor: pointer; font-family: inherit;
  background: linear-gradient(180deg, #36533a, #1d3524); color: #f5efe0;
  box-shadow: 0 3px 0 #102116, 0 6px 18px rgba(0,0,0,.3); }
.big-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #102116; }
.big-btn:disabled { opacity: .4; }

/* rarity tags */
.rtag { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,.08); }
.rtag.gold { background: rgba(251,191,36,.18); border: 1px solid var(--gold); }

/* overlay + capture */
#overlay { position: fixed; inset: 0; background: rgba(4,8,6,.9); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.cap-panel { background: var(--panel); border: 2px solid var(--gold); border-radius: 18px; padding: 20px;
  max-width: 460px; width: 100%; text-align: center; max-height: 92vh; overflow-y: auto; }
.cap-panel h3 { margin: 0 0 12px; letter-spacing: 2px; color: var(--gold); }
.cap-target { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 10px; }
.cap-target img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
@keyframes ballpulse { to { transform: scale(.94); filter: brightness(.7); } }
@keyframes ballarc { 60% { top: 120px; transform: scale(1.1); } 100% { top: 105px; transform: scale(1); } }
@keyframes cshake1 { 25% { transform: rotate(-7deg); } 75% { transform: rotate(7deg); } }
@keyframes cshake2 { 20% { transform: rotate(8deg) translateX(4px); } 60% { transform: rotate(-8deg) translateX(-4px); } }
@keyframes cshake3 { 30% { transform: rotate(-6deg); } 70% { transform: rotate(6deg); } }
.catch-success img { animation: catchglow 1s ease-out; }
@keyframes catchglow { 0% { filter: brightness(2.2); transform: scale(1.15); } 100% { filter: brightness(1); } }
@keyframes breakout { 30% { transform: scale(1.2); filter: brightness(2); } 100% { transform: scale(1.4); opacity: 0; } }
.gotcha { color: var(--gold); font-size: 24px; letter-spacing: 1px; }




@media (max-width: 640px) {
  /* HUD compress */
  #hud { padding: 6px 8px; gap: 4px; }
  .hud-title { font-size: 14px; letter-spacing: 1.5px; }
  .hud-stats { gap: 4px; }
  .hstat { padding: 4px 5px; min-width: 48px; }
  .hstat span { font-size: 7px; letter-spacing: 1px; }
  .hstat b { font-size: 13px; }
  /* board scale */
  #board { gap: 6px; }
  .cell { border-radius: 10px; }
  /* console: stack on mobile */
  #spin-panel { padding: 8px; }
  .console { width: 96vw; }
  .console-top { grid-template-columns: 1fr 1fr; gap: 8px; }
  .con-spin { grid-column: 1 / -1; order: -1; }
  .spin-round { width: 82px; height: 82px; }
  .spin-wrap { width: 92px; height: 92px; }
  .spin-round span { font-size: 18px; letter-spacing: 2px; }
  .bet-value b, .win-value b { font-size: 28px; }
  .step { width: 44px; min-height: 44px; font-size: 22px; }
  .con-combo { padding: 6px 10px; margin-top: 6px; }
  .con-modes { grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 6px; }
  .mode-card { padding: 8px; }
  .mode-card b { font-size: 11px; }
  .mode-card span { font-size: 10px; }
  .con-utils { flex-direction: row; grid-column: 1 / -1; }
  .con-utils .util { flex: 1; min-height: 44px; min-width: 0; padding: 10px 5px; font-size: 10px; letter-spacing: 1px; }
  .journal-milestones { grid-template-columns: repeat(2, 1fr); }
  .journal-tasks { grid-template-columns: 1fr; }
  .field-journal { padding: 14px; }
  .field-journal .dex-mini-grid { grid-template-columns: repeat(3, 1fr); }
  /* pay strip + hint */
  .pay-strip { font-size: 11px; gap: 8px; flex-wrap: wrap; }
  .hint { font-size: 12px; padding: 6px; }
  /* win overlay fit */
  .win-card { max-width: 92vw; padding: 16px; }
  .win-big-label.tier1 { font-size: 22px; }
  .win-big-label.tier2 { font-size: 26px; }
  .win-big-label.tier3 { font-size: 32px; }
  /* bonus arenas */
  .tm-bar { width: 260px; }
  .bonus-title { font-size: 20px; }
}

/* touch targets — minimum 44px */
@media (pointer: coarse) {
  .step, .mode-card, .util, .hstat { min-height: 44px; }
  #spin-btn { min-width: 104px; min-height: 104px; }
}

/* reduce motion for performance on low-end */
@media (prefers-reduced-motion: reduce) {
  .spin-lights, #spin-panel::before { animation: none; }
}

/* ---- casino deck ---- */
#spin-panel { background:
    radial-gradient(120% 100% at 50% 0%, rgba(251,191,36,.06) 0%, transparent 50%),
    linear-gradient(180deg, #1a1512 0%, #12100d 50%, #0c0a08 100%);
  border-top: 1px solid rgba(251,191,36,.15); padding: 8px 12px 6px; margin-top: 0;
  box-shadow: 0 -8px 24px rgba(0,0,0,.5);
  position: relative; overflow: hidden; }
#spin-panel::before { display: none; }
/* ---- console: fresh cohesive design ---- */
.console { width: min(860px, 96vw); margin: 0 auto; }
.console-top { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: stretch; }
.con-panel { background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.35));
  border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 4px 16px rgba(0,0,0,.4); }
.con-label { font-size: 11px; letter-spacing: 3px; color: #a89878; font-weight: 700; }
.bet-controls { display: flex; align-items: center; gap: 8px; }
.bet-value { text-align: center; min-width: 80px; }
.bet-value b { font-family: var(--font-num); font-size: 38px; color: #fff8e7; letter-spacing: 2px; display: block; line-height: 1; text-shadow: 0 2px 6px rgba(0,0,0,.8); }
.bet-value i { font-style: normal; font-size: 11px; color: #a89878; }
.win-value b { font-family: var(--font-num); font-size: 38px; color: #fde68a; letter-spacing: 2px; text-shadow: 0 0 16px rgba(251,191,36,.4), 0 2px 6px rgba(0,0,0,.8); }
.win-sub { display: flex; gap: 12px; font-size: 11px; color: #a89878; }
.win-sub b { color: #fff8e7; font-weight: 700; }
.win-sub .up { color: #4ade80; } .win-sub .down { color: #fca5a5; }
.con-spin { display: flex; align-items: center; justify-content: center; }
/* combo bar: full width, prominent */
.con-combo { display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 8px 12px;
  background: linear-gradient(90deg, rgba(251,146,60,.08), rgba(251,146,60,.02));
  border: 1px solid rgba(251,146,60,.2); border-radius: 10px; }
.con-combo .cm-label { font-size: 12px; font-weight: 700; letter-spacing: 2px; color: #fb923c; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.con-combo .cm-bar { flex: 1; height: 10px; background: rgba(0,0,0,.5); border-radius: 5px; overflow: hidden; box-shadow: inset 0 2px 4px rgba(0,0,0,.7); }
.con-combo .cm-text { font-size: 14px; font-weight: 700; color: #fff8e7; white-space: nowrap; font-family: var(--font-num); letter-spacing: 1px; }
.con-combo.maxed { border-color: rgba(253,230,138,.5); box-shadow: 0 0 16px rgba(251,191,36,.2); }
/* modes: horizontal cards with icon left */
.con-modes { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 8px; }
.buy-bonus-btn { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 58px; padding: 8px 16px; border-radius: 14px;
  background: linear-gradient(165deg, #3d2f12 0%, #2a2010 60%, #1a1408 100%);
  border: 1px solid rgba(251,191,36,.45); cursor: pointer; font-family: var(--font-ui);
  box-shadow: 0 6px 20px rgba(251,191,36,.15), inset 0 1px 0 rgba(255,255,255,.08);
  transition: transform .12s, box-shadow .2s; }
.buy-bonus-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(251,191,36,.25); }
.buy-bonus-btn:active { transform: scale(.98); }
.buy-bonus-btn em { font-style: normal; display: flex; color: #fbbf24; }
.buy-bonus-btn em .wb-icon { width: 28px; height: 28px; filter: drop-shadow(0 0 8px rgba(251,191,36,.6)); }
.buy-bonus-btn div { display: flex; flex-direction: column; gap: 1px; text-align: left; }
.buy-bonus-btn b { font-size: 16px; letter-spacing: 2px; color: #fde68a; font-weight: 700; text-shadow: 0 0 12px rgba(251,191,36,.4); }
.buy-bonus-btn span { font-size: 11px; color: #d4c5a5; }
.bonus-bet-row { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 12px 0; }
.bonus-bet-row > span { font-size: 12px; letter-spacing: 2px; color: #a89878; font-weight: 700; }
.bonus-bet-pills { display: flex; gap: 6px; }
.bpill { padding: 8px 16px; border-radius: 10px; font-family: var(--font-num); font-size: 16px;
  background: rgba(0,0,0,.4); border: 1px solid rgba(255,255,255,.12); color: #c9b896; cursor: pointer; transition: all .15s; }
.bpill:hover { border-color: rgba(251,191,36,.3); }
.bpill.on { background: linear-gradient(180deg, #3d3423, #2a2418); border-color: rgba(251,191,36,.5); color: #fde68a;
  box-shadow: 0 0 12px rgba(251,191,36,.2); }
.mode-card { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px;
  cursor: pointer; font-family: var(--font-ui); text-align: left;
  transition: transform .12s, box-shadow .2s, border-color .2s;
  position: relative; overflow: hidden; }
.mode-card::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.06) 45%, transparent 60%); }
.mode-card em { font-style: normal; flex: none; display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: rgba(0,0,0,.35); box-shadow: inset 0 2px 6px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.08); }
.mode-card em .wb-icon { width: 24px; height: 24px; }
.mode-card div { display: flex; flex-direction: column; gap: 1px; }
.mode-card b { font-size: 14px; letter-spacing: 1.5px; font-family: var(--font-ui); font-weight: 700; }
.mode-card span { font-size: 11px; opacity: .8; }
.mode-card:hover { transform: translateY(-2px); }
.mode-card:active { transform: scale(.98); }
.mode-card.frenzy { background: linear-gradient(165deg, #3d1512 0%, #2a0e0c 60%, #1a0806 100%);
  border: 1px solid rgba(239,68,68,.4);
  box-shadow: 0 6px 20px rgba(239,68,68,.15), inset 0 1px 0 rgba(255,255,255,.08); }
.mode-card.frenzy:hover { box-shadow: 0 8px 28px rgba(239,68,68,.25), inset 0 1px 0 rgba(255,255,255,.1); border-color: rgba(239,68,68,.6); }
.mode-card.frenzy b { color: #fca5a5; text-shadow: 0 0 12px rgba(239,68,68,.4); }
.mode-card.frenzy em { color: #ef4444; }
.mode-card.frenzy em .wb-icon { filter: drop-shadow(0 0 6px rgba(239,68,68,.6)); }
.mode-card.frenzy span { color: #d4a5a5; }
.mode-card.hunt { background: linear-gradient(165deg, #241a3d 0%, #1a1230 60%, #100a20 100%);
  border: 1px solid rgba(139,92,246,.4);
  box-shadow: 0 6px 20px rgba(139,92,246,.15), inset 0 1px 0 rgba(255,255,255,.08); }
.mode-card.hunt:hover { box-shadow: 0 8px 28px rgba(139,92,246,.25), inset 0 1px 0 rgba(255,255,255,.1); border-color: rgba(139,92,246,.6); }
.mode-card.hunt b { color: #c4b5fd; text-shadow: 0 0 12px rgba(139,92,246,.4); }
.mode-card.hunt em { color: #a78bfa; }
.mode-card.hunt em .wb-icon { filter: drop-shadow(0 0 6px rgba(139,92,246,.6)); }
.mode-card.hunt span { color: #b5a8d4; }
.mode-card.titan { background: linear-gradient(165deg, #3d2f12 0%, #2a2010 60%, #1a1408 100%);
  border: 1px solid rgba(251,191,36,.4);
  box-shadow: 0 6px 20px rgba(251,191,36,.15), inset 0 1px 0 rgba(255,255,255,.08); }
.mode-card.titan:hover { box-shadow: 0 8px 28px rgba(251,191,36,.25), inset 0 1px 0 rgba(255,255,255,.1); border-color: rgba(251,191,36,.6); }
.mode-card.titan b { color: #fde68a; text-shadow: 0 0 12px rgba(251,191,36,.4); }
.mode-card.titan em { color: #fbbf24; }
.mode-card.titan em .wb-icon { filter: drop-shadow(0 0 6px rgba(251,191,36,.6)); }
.mode-card.titan span { color: #d4c5a5; }
.con-utils { display: flex; flex-direction: row; gap: 8px; align-items: stretch; }
.con-utils .util { padding: 14px 20px; font-size: clamp(10px, 1vw, 13px); letter-spacing: clamp(.5px, .14vw, 2px); font-weight: 700; white-space: normal;
  position: relative; z-index: 1; line-height: 1.1; overflow: visible; overflow-wrap: normal; text-align: center; min-width: 0;
  background: linear-gradient(180deg, #2a2f2a 0%, #1a1f1a 100%);
  border: 1px solid rgba(255,255,255,.12); border-radius: 14px; color: #c9d1c9;
  box-shadow: 0 4px 12px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.08);
  cursor: pointer; font-family: var(--font-ui); transition: all .15s; }
.con-utils .util:hover { border-color: rgba(251,191,36,.3); color: #fff; }
.con-utils .util.on { background: linear-gradient(180deg, #3d3423 0%, #2a2418 100%);
  border-color: rgba(251,191,36,.5); color: #fde68a;
  box-shadow: 0 0 16px rgba(251,191,36,.2), inset 0 1px 0 rgba(255,255,255,.1); }
.deck-col { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; align-items: center; }
.bet-col { max-width: 240px; }
.win-col { max-width: 240px; }
/* spin column — contained, no overflow */
.spin-wrap { position: relative; width: 116px; height: 116px; flex: none; align-self: center; display: flex; align-items: center; justify-content: center; }
/* (old mode-row styles removed — using .con-modes grid) */
.mode-card em .wb-icon { width: 1.4em; height: 1.4em; }
.mode-card b { font-size: 12px; letter-spacing: 1.5px; color: var(--parchment); font-family: var(--font-title); }
.mode-card span { font-size: 10px; color: var(--dim); font-weight: 600; }
.mode-card:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0,0,0,.4), inset 0 2px 6px rgba(0,0,0,.4); }
.mode-card.frenzy { background: linear-gradient(180deg, #4a1a14 0%, #2a0f0c 100%); }
.mode-card.frenzy b { color: #fca5a5; }
.mode-card.hunt { background: linear-gradient(180deg, #2a1a4a 0%, #170f2a 100%); }
.mode-card.hunt b { color: #c4b5fd; }
.mode-card.titan { background: linear-gradient(180deg, #4a3010 0%, #2a1c08 100%); }
.mode-card.titan b { color: var(--gold-lt); }
.mode-utils { display: flex; flex-direction: column; gap: 6px; }
.mode-utils .util { padding: 8px 14px; font-size: 12px; }
/* session tracker */
.session-row { display: flex; gap: 8px; align-items: stretch; }
.session-box { flex: 1; background: rgba(0,0,0,.45); border-radius: 12px;
  text-align: center; padding: 8px 4px; box-shadow: var(--inset); border: 1px solid rgba(0,0,0,.5); }
.session-box span { display: block; font-size: 9px; color: var(--dim); letter-spacing: 2.5px; font-weight: 700; }
.session-box b { font-size: 19px; font-weight: 700; font-family: var(--font-ui); text-shadow: 0 1px 2px rgba(0,0,0,.8); }
.session-box b.up { color: var(--green); }
.session-box b.down { color: #fca5a5; }
.bet-stepper { display: flex; align-items: stretch; justify-content: center; gap: 6px; width: 100%; }
.step { width: 52px; min-height: 64px; background: linear-gradient(180deg, #2a241c 0%, #1a1610 100%);
  border: 1px solid rgba(251,191,36,.25);
  color: #fde68a; border-radius: 14px; font-size: 28px; font-weight: 400; cursor: pointer; font-family: var(--font-num);
  box-shadow: 0 4px 12px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); transition: transform .08s;
  text-shadow: 0 2px 4px rgba(0,0,0,.8); }
.step:active { transform: translateY(2px); box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.step:disabled { opacity: .3; }
.step:disabled { opacity: .25; }
.bet-display { flex: 1; background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.4));
  border-radius: 14px; text-align: center; padding: 10px 4px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.05);
  border: 1px solid rgba(251,191,36,.2); }
.bet-display span { display: block; font-size: 10px; color: var(--dim); letter-spacing: 4px; font-weight: 700; font-family: var(--font-ui); }
.bet-display b { font-size: 36px; font-weight: 400; color: var(--parchment); display: inline-block;
  text-shadow: 0 2px 4px rgba(0,0,0,.9); font-family: var(--font-num); letter-spacing: 2px; }
.bet-display b.bump { animation: betbump .3s; }
@keyframes betbump { 40% { transform: scale(1.25); } }
.bet-display i { display: block; font-style: normal; font-size: 10px; color: var(--dim); }
.deck-btns { display: flex; gap: 6px; }
.deck-btns .util { flex: 1; }
.util { background: linear-gradient(180deg, #232f28, #161f1a); border: 2px solid var(--line); color: var(--dim);
  border-radius: 10px; padding: 9px 4px; font-family: inherit; font-weight: 900; font-size: 10px;
  letter-spacing: 1px; cursor: pointer; box-shadow: 0 3px 0 rgba(0,0,0,.35); transition: transform .08s; }
.util:active { transform: translateY(2px); box-shadow: none; }
.util.on { border-color: #38bdf8; color: #38bdf8; box-shadow: 0 0 12px rgba(56,189,248,.35); }
.util.bonus { color: #f0abfc; border-color: #a855f7; background: linear-gradient(180deg, rgba(168,85,247,.18), rgba(88,28,135,.28));
  animation: bonusglow 2s ease-in-out infinite; font-size: 11px; }
@keyframes bonusglow { 50% { box-shadow: 0 0 12px rgba(168,85,247,.5); } }
/* ============ BONUS MENU ============ */
.bonus-menu { text-align: center; max-width: 560px; }
.bonus-menu h2 { font-size: 28px; letter-spacing: 3px; color: var(--gold); margin-bottom: 4px; }
.bonus-cards { display: flex; gap: 12px; margin: 18px 0; }
.bcard { flex: 1; border-radius: 14px; padding: 16px 10px; cursor: pointer; color: #fff;
  border: 2px solid; background: rgba(0,0,0,.4); transition: transform .15s; }
.bcard:hover { transform: translateY(-3px) scale(1.02); }
.bcard-name { font-size: 17px; font-weight: 900; letter-spacing: 1px; margin-bottom: 6px; }
.bcard-cost { font-size: 22px; font-weight: 900; color: var(--gold); margin-bottom: 8px; }
.bcard-desc { font-size: 12px; color: var(--dim); line-height: 1.5; }
.bcard-desc i { color: #9fb3c8; }
.bcard.frenzy { border-color: #ef4444; box-shadow: 0 0 16px rgba(239,68,68,.25); }
.bcard.frenzy .bcard-name { color: #fca5a5; }
.bcard.hunt { border-color: #a855f7; box-shadow: 0 0 16px rgba(168,85,247,.3); }
.bcard.hunt .bcard-name { color: #d8b4fe; }
.bcard.titan { border-color: #fbbf24; box-shadow: 0 0 16px rgba(251,191,36,.3); }
.bcard.titan .bcard-name { color: #fde68a; }
/* ============ shared bonus arena ============ */
#bonus-arena { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden; }
#bonus-arena.hidden { display: none; }
#bonus-arena.frenzy { background: radial-gradient(80% 80% at 50% 30%, #4a1212 0%, #1f0a0a 55%, #050303 100%); }
#bonus-arena.titan { background: radial-gradient(80% 80% at 50% 30%, #3a2a08 0%, #1a1206 55%, #050302 100%); }
#bonus-arena::before { content: ''; position: absolute; inset: -50%; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 18deg, rgba(255,255,255,.03) 18deg 20deg);
  animation: stormspin 24s linear infinite; }
#bonus-arena.enter { animation: huntenter .5s; }
#bonus-hud { position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 28px;
  padding: 18px; background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); }
.bonus-title { font-size: 26px; font-weight: 900; letter-spacing: 3px; animation: huntpulse 1.6s ease-in-out infinite; }
.bonus-title.frenzy-t { color: #fca5a5; text-shadow: 0 0 18px rgba(239,68,68,.9); }
.bonus-title.titan-t { color: #fde68a; text-shadow: 0 0 18px rgba(251,191,36,.9); }
.bonus-count { font-size: 18px; font-weight: 800; color: #fff; }
.bonus-total { font-size: 20px; font-weight: 800; color: #4ade80; }
.bonus-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.bonus-mon { display: flex; flex-direction: column; align-items: center; transform: translateY(-120vh); transition: transform .5s cubic-bezier(.2,.9,.3,1.1); }
.bonus-stage.drop .bonus-mon { transform: none; }
.bonus-mon img { width: 180px; height: 180px; object-fit: cover; border-radius: 16px; }
.frenzy-throw .bonus-mon img { border: 2px solid rgba(239,68,68,.6); box-shadow: 0 0 24px rgba(239,68,68,.4); }
.frenzy-name { margin-top: 8px; font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 2px 6px #000; }
.frenzy-ball { position: absolute; top: -60px; left: 50%; margin-left: -22px; font-size: 44px; z-index: 3; }
.frenzy-ball.fly { animation: frenzyballfly .4s cubic-bezier(.3,.7,.4,1) forwards; }
@keyframes frenzyballfly { to { transform: translateY(140px); } }
.frenzy-msg { margin-top: 10px; font-size: 24px; font-weight: 900; animation: cellmsg 1s ease-out forwards; }
.frenzy-msg.win { color: #4ade80; text-shadow: 0 0 12px rgba(74,222,128,.7); }
.frenzy-msg.miss { color: #64748b; font-size: 18px; }
.bonus-stage.win-flash { animation: catchgold .6s; }
.bonus-stage.miss-flash { animation: brokeshake .4s; }
.bonus-mon.caught-glow img { animation: huntcaught .7s; }
.bonus-mon.shk1 { animation: cellshk1 .38s; } .bonus-mon.shk2 { animation: cellshk2 .62s; } .bonus-mon.shk3 { animation: cellshk3 .48s; }
/* titan */
.titan-mon img { width: 300px !important; height: 300px !important;
  border: 4px solid rgba(251,191,36,.7) !important; box-shadow: 0 0 60px rgba(251,191,36,.5) !important; }
.titan-hpbar { width: 300px; height: 14px; background: rgba(0,0,0,.6); border-radius: 7px; margin-top: 12px; overflow: hidden; border: 1px solid #fbbf24; }
.titan-hpfill { height: 100%; background: linear-gradient(90deg, #ef4444, #fbbf24); transition: width .5s; }
.titan-name { margin-top: 8px; font-size: 22px; font-weight: 900; color: #fde68a; text-shadow: 0 2px 8px #000; }
.bonus-stage.hit1 { animation: brokeshake .4s; }
.attack-pick { margin-top: 20px; display: flex; gap: 12px; z-index: 10; }
.ap-label { width: 100%; text-align: center; font-size: 20px; font-weight: 900; color: #fff; letter-spacing: 2px; margin-bottom: 4px; }
.attack-pick { flex-wrap: wrap; justify-content: center; }
.ap-btn { background: linear-gradient(180deg, #3a2a08, #1a1206); border: 2px solid #fbbf24; color: #fde68a;
  border-radius: 12px; padding: 12px 20px; font-size: 16px; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.ap-btn span { font-size: 11px; color: #9fb3c8; font-weight: 400; }
.ap-btn:hover { transform: scale(1.05); box-shadow: 0 0 16px rgba(251,191,36,.4); }
.cf-list { margin: 12px 0; display: flex; flex-direction: column; gap: 6px; }
.cf-row { font-size: 16px; color: #fff; }
.cf-bonus { color: #4ade80; font-size: 13px; }
.bonus-finale { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column;
  align-items: center; justify-content: center; opacity: 0; transform: scale(.8); transition: all .5s; pointer-events: none; }
.bonus-finale.show { opacity: 1; transform: none; }
/* ============ APEX HUNT (bonus round) ============ */
#hunt-arena { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column;
  align-items: center; justify-content: center; overflow: hidden;
  background: radial-gradient(80% 80% at 50% 30%, #2a1650 0%, #12081f 55%, #050308 100%); }
#hunt-arena.hidden { display: none; }
#hunt-arena::before { content: ''; position: absolute; inset: -50%;
  background: repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 18deg, rgba(168,85,247,.05) 18deg 20deg);
  animation: stormspin 24s linear infinite; pointer-events: none; }
@keyframes stormspin { to { transform: rotate(360deg); } }
#hunt-arena.enter { animation: huntenter .5s; }
@keyframes huntenter { 0% { filter: brightness(3); } 100% { filter: none; } }
#hunt-hud { position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; justify-content: center; gap: 28px;
  padding: 18px; background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); }
.hunt-title { font-size: 26px; font-weight: 900; letter-spacing: 3px; color: #e9d5ff;
  text-shadow: 0 0 18px rgba(168,85,247,.9); animation: huntpulse 1.6s ease-in-out infinite; }
@keyframes huntpulse { 50% { text-shadow: 0 0 32px rgba(168,85,247,1); transform: scale(1.03); } }
.hunt-balls { display: flex; gap: 6px; font-size: 22px; }
.hball.used { filter: grayscale(1); opacity: .3; }
.hunt-mult { font-size: 22px; font-weight: 900; color: #9fb3c8; }
.hunt-mult.hot { color: #fbbf24; text-shadow: 0 0 14px rgba(251,191,36,.8); animation: huntpulse 1s infinite; }
.hunt-total { font-size: 20px; font-weight: 800; color: #4ade80; }
.hunt-stage { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.hunt-mon { display: flex; flex-direction: column; align-items: center; transform: translateY(-120vh); transition: transform .6s cubic-bezier(.2,.9,.3,1.1); }
.hunt-stage.drop .hunt-mon { transform: none; }
.hunt-mon img { width: 240px; height: 240px; object-fit: cover; border-radius: 20px;
  border: 3px solid rgba(168,85,247,.6); box-shadow: 0 0 40px rgba(168,85,247,.5); }
.hunt-mon.in-ball img { animation: huntballpulse .45s ease-in-out infinite alternate; }
@keyframes huntballpulse { to { transform: scale(.92); filter: brightness(1.3); } }
.hunt-mon.caught-glow img { animation: huntcaught .7s; }
@keyframes huntcaught { 0% { box-shadow: 0 0 0 0 rgba(251,191,36,.9); } 100% { box-shadow: 0 0 0 30px rgba(251,191,36,0); } }
.hunt-mon.shk1 { animation: cellshk1 .38s; } .hunt-mon.shk2 { animation: cellshk2 .62s; } .hunt-mon.shk3 { animation: cellshk3 .48s; }
.hunt-name { margin-top: 12px; font-size: 20px; font-weight: 800; color: #fff; text-shadow: 0 2px 8px #000; }
.hunt-ball { position: absolute; top: -80px; left: 50%; margin-left: -30px; font-size: 60px; z-index: 3; }
.hunt-ball.fly { animation: huntballfly .55s cubic-bezier(.3,.7,.4,1) forwards; }
@keyframes huntballfly { to { transform: translateY(200px); } }
.hunt-msg { margin-top: 14px; font-size: 28px; font-weight: 900; letter-spacing: 2px;
  animation: cellmsg 1.2s ease-out forwards; }
.hunt-msg.win { color: #fbbf24; text-shadow: 0 0 20px rgba(251,191,36,.8); }
.hunt-msg.lose { color: #f87171; }
/* timing meter */
.timing-meter { position: absolute; bottom: 12%; left: 50%; transform: translateX(-50%); z-index: 10;
  background: rgba(0,0,0,.7); border: 2px solid #a855f7; border-radius: 14px; padding: 14px 20px; }
.tm-label { text-align: center; font-weight: 900; font-size: 18px; color: #e9d5ff; margin-bottom: 10px; letter-spacing: 1px; }
.timing-meter.locked .tm-label { color: #fbbf24; }
.tm-bar { position: relative; width: 320px; height: 26px; border-radius: 13px; overflow: hidden;
  background: linear-gradient(90deg, #7f1d1d 0%, #7f1d1d 30%, #a16207 30%, #a16207 45%, #15803d 45%, #15803d 55%, #a16207 55%, #a16207 70%, #7f1d1d 70%); }
.tm-zone { position: absolute; top: 0; bottom: 0; pointer-events: none; }
.tm-zone.good { left: 30%; width: 40%; background: rgba(251,191,36,.25); border-left: 1px dashed rgba(251,191,36,.6); border-right: 1px dashed rgba(251,191,36,.6); }
.tm-zone.perfect { left: 45%; width: 10%; background: rgba(74,222,128,.35); border-left: 1px solid #4ade80; border-right: 1px solid #4ade80; }
.tm-marker { position: absolute; top: -2px; bottom: -2px; width: 4px; background: #fff;
  box-shadow: 0 0 8px #fff; }
.hunt-finale { position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column;
  align-items: center; justify-content: center; opacity: 0; transform: scale(.8); transition: all .5s; pointer-events: none; }
.hunt-finale.show { opacity: 1; transform: none; }
.fin-title { font-size: 44px; font-weight: 900; color: #fbbf24; letter-spacing: 3px;
  text-shadow: 0 0 30px rgba(251,191,36,.9); margin-bottom: 8px; }
.fin-catches { font-size: 20px; color: #e9d5ff; margin-bottom: 16px; }
.fin-total { font-size: 56px; font-weight: 900; color: #4ade80; text-shadow: 0 0 24px rgba(74,222,128,.6); }
.fin-sub { margin-top: 12px; font-size: 15px; color: #9fb3c8; }
/* spin hero */
.spin-lights { position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: conic-gradient(from 0deg, #fbbf24, transparent 12%, #fbbf24 24%, transparent 36%, #fbbf24 48%, transparent 60%, #fbbf24 72%, transparent 84%, #fbbf24);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
  animation: spinlights 3s linear infinite; opacity: .9; }
@keyframes spinlights { to { transform: rotate(360deg); } }
.spin-round { position: relative; width: 108px; height: 108px; border-radius: 50%;
  cursor: pointer; font-family: inherit; border: 4px solid #92400e;
  background: radial-gradient(circle at 35% 28%, #fef3c7, #fde68a 30%, var(--gold) 58%, #b45309 100%);
  box-shadow: 0 7px 0 #78350f, 0 14px 38px rgba(251,191,36,.55), inset 0 3px 12px rgba(255,255,255,.6),
    inset 0 -8px 16px rgba(120,53,15,.5);
  transition: transform .08s; z-index: 1; }
.spin-round.idle { animation: spinbreathe 2.2s ease-in-out infinite; }
@keyframes spinbreathe { 50% { box-shadow: 0 7px 0 #78350f, 0 14px 52px rgba(251,191,36,.85),
  inset 0 3px 12px rgba(255,255,255,.6), inset 0 -8px 16px rgba(120,53,15,.5); transform: scale(1.03); } }
.spin-round span { position: relative; font-size: 26px; font-weight: 700; letter-spacing: 4px; color: #3a2500;
  font-family: var(--font-title); text-shadow: 0 1px 0 rgba(255,255,255,.5), 0 2px 4px rgba(120,53,15,.3); }
.spin-round:active { transform: translateY(6px) scale(.95);
  box-shadow: 0 1px 0 #78350f, 0 4px 14px rgba(251,191,36,.4), inset 0 2px 8px rgba(255,255,255,.4); }
/* win display */
.win-display { background: linear-gradient(180deg, rgba(0,0,0,.6), rgba(0,0,0,.4));
  border-radius: 14px; text-align: center; padding: 10px 4px;
  display: flex; flex-direction: column; justify-content: center; gap: 2px;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.8), 0 1px 0 rgba(255,255,255,.05);
  border: 1px solid rgba(251,191,36,.2); min-height: 88px; }
.win-display span { font-size: 10px; color: var(--dim); letter-spacing: 3px; font-weight: 700; font-family: var(--font-ui); }
.win-display b { font-size: 36px; font-weight: 400; color: var(--parchment); text-shadow: 0 2px 4px rgba(0,0,0,.9); font-family: var(--font-num); line-height: 1; letter-spacing: 2px; }
.win-display.flash { animation: winflash .8s; }
@keyframes winflash { 0%, 100% { box-shadow: inset 0 2px 8px rgba(0,0,0,.6); }
  40% { box-shadow: 0 0 30px rgba(251,191,36,.9), inset 0 0 12px rgba(251,191,36,.4); transform: scale(1.05); } }
.deck-hint { font-size: 11px; color: var(--dim); text-align: center; }
.deck-hint b { color: var(--gold); }
#spin-panel .hint { margin-top: 6px; font-size: 11px; }
#spin-panel .hint b { color: var(--gold); }

/* board cascade drop-in */
.cell.drop { animation: dropin .45s cubic-bezier(.2,.9,.3,1.2) backwards; }
@keyframes dropin {
  0% { transform: translateY(-46px) scale(.7); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---- win / loss presentation ---- */
#win-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center;
  justify-content: center; padding: 16px; overflow-y: auto; pointer-events: none; }
#win-overlay.show { animation: winoverlay .3s ease-out; }
@keyframes winoverlay { from { opacity: 0; } }
#win-overlay.tier3 { background: radial-gradient(70% 70% at 50% 50%, rgba(253,230,138,.3), rgba(4,8,6,.9)); }
#win-overlay.tier2 { background: radial-gradient(70% 70% at 50% 50%, rgba(74,222,128,.18), rgba(4,8,6,.86)); }
#win-overlay.tier1 { background: radial-gradient(70% 70% at 50% 50%, rgba(125,211,252,.13), rgba(4,8,6,.82)); }
#win-overlay.tier0 { background: rgba(4,8,6,.6); }
#win-overlay.lost { background: rgba(4,8,6,.55); }
#win-fx { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.win-card { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 18px 22px;
  text-align: center; background: linear-gradient(180deg, rgba(20,38,27,.97), rgba(9,18,13,.97));
  border: 2px solid rgba(251,191,36,.35); border-radius: 22px;
  box-shadow: 0 20px 70px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.08);
  animation: wincard .35s ease-out; pointer-events: auto; }
@keyframes wincard { from { transform: scale(.6); opacity: 0; } }
.win-title { max-width: 100%; font-size: clamp(24px, 4vw, 36px); line-height: 1.05; font-weight: 900; letter-spacing: 1.5px; color: #fff;
  text-shadow: 0 3px 18px rgba(0,0,0,.8); overflow-wrap: anywhere; text-wrap: balance; }
.tier0 .win-title { color: #bbf7d0; }
.tier1 .win-title { color: #bae6fd; }
.tier3 .win-title { color: var(--gold); font-size: clamp(30px, 5vw, 42px); text-shadow: 0 0 24px rgba(251,191,36,.6), 0 3px 12px #000;
  animation: goldpulse .7s ease-out; }
.tier2 .win-title { color: var(--gold); text-shadow: 0 0 22px rgba(251,191,36,.6), 0 3px 12px #000; }
@keyframes goldpulse { 50% { transform: scale(1.06); } }
.win-title.lose { color: #94a3b8; font-size: 34px; }
.win-new { display: inline-block; margin: 8px 0; background: var(--green); color: #052e16;
  font-weight: 900; letter-spacing: 2px; padding: 5px 14px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 0 14px rgba(74,222,128,.35); }
.win-combo { display: inline-block; margin: 6px 0; background: linear-gradient(180deg, #fb923c, #ea580c);
  color: #fff; font-weight: 900; letter-spacing: 2px; padding: 5px 14px; border-radius: 8px; font-size: 14px;
  box-shadow: 0 0 18px rgba(251,146,60,.4); }
.win-new, .win-combo, .win-pack-link, .progress-award {
  box-sizing: border-box;
  max-width: 100%;
  line-height: 1.35;
  overflow-wrap: anywhere;
  white-space: normal;
}
.crit-text { color: #fde68a; text-shadow: 0 0 18px rgba(253,224,71,.9); font-size: 22px; }
.cap-creature.crit-flash img { animation: critflash .6s; }
@keyframes critflash { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(2.5) sepia(1) saturate(3); } }
.cf-images { display: flex; gap: 10px; justify-content: center; margin: 12px 0; }
.cf-images img { width: 90px; height: 90px; object-fit: cover; border-radius: 14px; box-shadow: 0 6px 20px rgba(0,0,0,.6); }
.cf-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.cf-thumb { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.win-card img { display: block; flex: none; width: min(150px, 20vh); height: min(150px, 20vh); object-fit: cover; border-radius: 16px; margin: 4px 0;
  box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.tier3 .win-card img { border: 3px solid var(--gold); box-shadow: 0 0 44px rgba(251,191,36,.65); }
.win-name { font-size: 18px; font-weight: 800; }
.win-amount { font-size: clamp(30px, 4vw, 40px); line-height: 1.05; font-weight: 900; color: var(--gold); margin-top: 2px;
  text-shadow: 0 2px 14px rgba(0,0,0,.8); }
.win-multiplier { color: var(--parchment); font: 700 14px var(--font-ui); letter-spacing: 1px; opacity: .8; }
.progress-award { display: inline-block; margin: 6px 0; padding: 5px 10px; border-radius: 8px;
  color: #dcfce7; background: rgba(34,94,54,.8); border: 1px solid rgba(74,222,128,.45); font-weight: 800; letter-spacing: 1px; }

/* phase labels (WEAKEN! / THROW!) */
#phase-label { position: fixed; top: 38%; left: 50%; transform: translate(-50%, -50%) scale(.8);
  font-size: 52px; font-weight: 900; letter-spacing: 6px; color: #fff; z-index: 150;
  text-shadow: 0 0 30px rgba(251,191,36,.9), 0 4px 12px #000; opacity: 0; pointer-events: none; }
#phase-label.show { animation: phasestamp .9s ease-out forwards; }
@keyframes phasestamp { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
  40% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.05); } }
/* big catch chance */
/* harvest converge + target ring */
.cell.converge { animation: convergeflash .55s; }
@keyframes convergeflash { 0% { filter: brightness(1); } 40% { filter: brightness(2.2) saturate(1.6);
  box-shadow: 0 0 26px rgba(251,191,36,.9); } 100% { filter: brightness(1); } }
.cell.targeted { animation: targetpulse 1.1s ease-in-out infinite; }
@keyframes targetpulse { 50% { box-shadow: 0 0 0 4px var(--gold), 0 0 30px rgba(251,191,36,.8); } }
#win-fx { position: absolute; inset: 0; pointer-events: none; }
#app.win-shake { animation: winshake .6s; }
@keyframes winshake { 20% { transform: translate(-6px, 3px) rotate(-.4deg); } 40% { transform: translate(6px, -3px) rotate(.4deg); }
  60% { transform: translate(-4px, -2px); } 80% { transform: translate(4px, 2px); } }
.cell.mon.idle img { animation: idlebounce 2.6s ease-in-out infinite; }
@keyframes idlebounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
#board.shake-sm { animation: boardshake .3s; }
@keyframes boardshake { 25% { transform: translate(-4px, 2px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-2px, -2px); } }
/* reel spin: transform a short, loopable symbol strip on the compositor */
.cell.spinning .reel-strip { position: absolute; inset: 0 0 auto; height: 400%; display: flex; flex-direction: column;
  will-change: transform; backface-visibility: hidden; animation-name: reelroll; animation-timing-function: linear; animation-iteration-count: infinite; }
.cell.spinning .reel-strip img { display: block; flex: 0 0 25%; width: 100%; height: 25%; object-fit: cover; }
@keyframes reelroll {
  from { transform: translate3d(0, -75%, 0); }
  to { transform: translate3d(0, 0, 0); }
}
.cell.land { animation: cellland .28s cubic-bezier(.18,.72,.28,1); will-change: transform, opacity; }
@keyframes cellland { 0% { transform: scale(.86); opacity: .55; } 68% { transform: scale(1.025); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
/* paytable strip */
.pay-strip { display: flex; justify-content: center; gap: 10px; margin-top: 6px; padding: 4px;
  background: rgba(0,0,0,.3); border-radius: 8px; border: 1px solid var(--line); font-size: 12px; }
@media (max-height: 800px) {
  .pay-strip, #spin-panel .hint { display: none; }
  .win-card { gap: 2px; padding: 12px 18px; }
  .win-card img { width: min(112px, 17vh); height: min(112px, 17vh); }
  .win-new, .progress-award { margin: 3px 0; padding: 4px 8px; }
}
.pay-strip span { font-size: 12px; font-weight: 800; color: var(--gold); display: flex; align-items: center; gap: 4px; }
.pdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* compact dex overlay */
.dex-mini-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.dex-mini { background: var(--panel2); border-radius: 10px; padding: 6px; text-align: center;
  border: 1px solid var(--line); }
.dex-mini.caught { border-color: var(--green); }
.dex-mini img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.dex-mini img.silhouette { filter: brightness(0); }
.dex-mini b { font-size: 10px; display: block; margin-top: 2px; }
.field-journal { max-width: 760px; text-align: left; border-color: rgba(251,191,36,.55);
  background: linear-gradient(180deg, #17291e, #0d1811); }
.field-journal h3, .journal-summary { text-align: center; }
.field-journal .dex-mini-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.field-journal .dex-mini { padding: 4px; }
.field-journal .dex-mini b { font-size: 9px; }
.journal-summary { color: var(--parchment); font: 20px var(--font-num); letter-spacing: 1px; margin: -4px 0 14px; }
.journal-section { margin: 14px 0; padding: 12px; background: rgba(0,0,0,.22); border: 1px solid var(--line); border-radius: 12px; }
.journal-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.journal-heading b { color: var(--gold-lt); font-size: 12px; letter-spacing: 1.5px; }
.journal-heading span { color: var(--dim); font-size: 10px; letter-spacing: 1px; }
.journal-milestones { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.journal-milestone { display: flex; flex-direction: column; gap: 4px; padding: 9px; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.journal-milestone b { color: var(--parchment); font-size: 11px; letter-spacing: 1px; }
.journal-milestone span, .journal-milestone strong { color: var(--dim); font-size: 11px; }
.journal-milestone strong { color: var(--gold); }
.journal-milestone.complete { border-color: rgba(74,222,128,.35); background: rgba(34,94,54,.18); }
.journal-milestone.complete strong { color: var(--green); }
.journal-tasks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.journal-task { padding: 10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 9px; }
.journal-task-top { display: flex; align-items: start; justify-content: space-between; gap: 6px; }
.journal-task-top div { display: flex; flex-direction: column; gap: 3px; }
.journal-task-top b { color: var(--parchment); font-size: 12px; }
.journal-task-top span, .journal-task small { color: var(--dim); font-size: 11px; }
.journal-task-top strong { color: var(--gold); white-space: nowrap; font-size: 12px; }
.journal-task.complete { border-color: rgba(74,222,128,.35); }
.journal-task.complete .journal-task-top strong { color: var(--green); }
.journal-progress { height: 5px; margin: 9px 0 4px; overflow: hidden; border-radius: 5px; background: rgba(0,0,0,.45); }
.journal-progress i { display: block; height: 100%; background: linear-gradient(90deg, #4ade80, #fde68a); border-radius: inherit; }
@media (max-width: 640px) {
  .journal-milestones { grid-template-columns: repeat(2, 1fr); }
  .journal-tasks { grid-template-columns: 1fr; }
  .field-journal .dex-mini-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Ball icon — CSS sphere replacing emoji */
.ball-icon { width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8a8a, #dc2626 45%, #7f1d1d 100%);
  box-shadow: 0 4px 12px rgba(220,38,38,.5), inset 0 -3px 6px rgba(0,0,0,.3); }

/* ---- Wildbound polish pass: clearer hierarchy, tighter game footprint ---- */
:root {
  --forest-950: #07110c;
  --forest-900: #0b1710;
  --forest-800: #122219;
  --brass-line: rgba(225, 177, 72, .26);
  --soft-gold: #f5d47a;
}

#app {
  background:
    linear-gradient(180deg, rgba(5, 13, 8, .24), rgba(5, 13, 8, .10) 42%, rgba(5, 10, 7, .58)),
    url('assets/habitat-forest.webp') center / cover no-repeat,
    var(--forest-950);
}

#hud {
  min-height: 62px;
  gap: clamp(6px, 1vw, 14px);
  padding: 7px clamp(10px, 2vw, 24px);
  background: linear-gradient(180deg, rgba(18, 25, 18, .98), rgba(10, 15, 10, .98));
  border-bottom-color: var(--brass-line);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.hud-title { font-size: clamp(18px, 2.2vw, 25px); letter-spacing: clamp(1.5px, .3vw, 4px); }
.hud-stats { gap: clamp(4px, .7vw, 9px); }
.hstat { min-width: 70px; padding: 5px 10px; border-color: rgba(235, 215, 170, .10); border-radius: 10px; }
.hstat span { font-size: 10px; letter-spacing: 1.8px; color: #b8aa87; }
.hstat b { font-size: 19px; }
button.hstat { background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(0,0,0,.28)); border: 1px solid rgba(235,215,170,.10); padding: 5px 10px; }
#hud-reset-btn { opacity: .78; }
#hud-reset-btn:hover { opacity: 1; }

#board-wrap {
  padding: clamp(6px, 1.2vmin, 14px);
  background: radial-gradient(ellipse at center, rgba(5, 12, 8, .08), rgba(5, 10, 7, .16) 70%);
}
#board {
  padding: clamp(5px, .75vmin, 9px);
  border: 1px solid rgba(222, 189, 109, .20);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(8, 18, 12, .82), rgba(6, 13, 9, .92));
  box-shadow: 0 18px 46px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255,255,255,.055), 0 0 0 5px rgba(6, 13, 9, .20);
}
.cell {
  border-radius: 12px;
  border-color: rgba(230, 225, 205, .14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 5px 12px rgba(0,0,0,.22);
}
.cell.mon { transition: transform .16s ease, filter .16s ease, box-shadow .16s ease; }
.cell.mon:hover { filter: brightness(1.08); }
.cell.mon.sel { outline: 2px solid var(--soft-gold); box-shadow: 0 0 0 3px rgba(8,17,11,.74), 0 0 20px rgba(245,212,122,.40); }
.cell.grass::after { opacity: .34; filter: saturate(.78); }

#spin-panel {
  padding: 6px 12px 4px;
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(220, 171, 68, .075), transparent 72%),
    linear-gradient(180deg, rgba(19, 23, 17, .98), rgba(9, 12, 9, .99));
  border-top-color: var(--brass-line);
  box-shadow: 0 -8px 26px rgba(0,0,0,.32);
}
#spin-panel .console { width: min(760px, 94vw); }
.console-top { gap: 8px; }
.con-panel { min-height: 92px; padding: 6px 10px; gap: 4px; border-color: rgba(232, 219, 183, .10); border-radius: 12px; }
.con-label { font-size: 10px; letter-spacing: 2.2px; }
.bet-controls { gap: 6px; }
.bet-value { min-width: 68px; }
.bet-value b, .win-value b { font-size: 32px; }
.bet-value i { font-size: 10px; }
.step { width: 46px; min-height: 48px; border-radius: 11px; font-size: 24px; }
.win-sub { gap: 9px; font-size: 10px; }
.spin-wrap { width: 96px; height: 96px; }
.spin-round { width: 88px; height: 88px; border-width: 3px; box-shadow: 0 5px 0 #78350f, 0 10px 24px rgba(251,191,36,.38), inset 0 3px 10px rgba(255,255,255,.55), inset 0 -6px 12px rgba(120,53,15,.42); }
.spin-round.idle { animation-duration: 2.8s; }
.spin-round span { font-size: 21px; letter-spacing: 2.5px; }
.spin-round:focus-visible { outline: 3px solid #fff4c2; outline-offset: 4px; }
.spin-lights { opacity: .62; }
.con-combo { margin-top: 6px; padding: 6px 10px; gap: 9px; border-color: rgba(251,146,60,.16); }
.con-combo .cm-label { font-size: 10px; letter-spacing: 1.5px; }
.con-combo .cm-bar { height: 8px; }
.con-combo .cm-text { font-size: 12px; }
.con-modes { margin-top: 6px; gap: 8px; }
.buy-bonus-btn { min-height: 48px; padding: 6px 12px; gap: 9px; border-radius: 11px; box-shadow: 0 4px 14px rgba(251,191,36,.10), inset 0 1px 0 rgba(255,255,255,.07); }
.buy-bonus-btn em .wb-icon { width: 22px; height: 22px; }
.buy-bonus-btn b { font-size: 13px; letter-spacing: 1.5px; }
.buy-bonus-btn span { font-size: 10px; }
.con-utils { gap: 6px; }
.con-utils .util { min-height: 48px; padding: 8px 11px; border-radius: 11px; font-size: 10px; letter-spacing: 1px; box-shadow: 0 3px 9px rgba(0,0,0,.32), inset 0 1px 0 rgba(255,255,255,.07); }
.pay-strip { gap: clamp(7px, 1.2vw, 16px); margin-top: 4px; padding: 3px 8px; border-color: rgba(235,215,170,.08); background: rgba(0,0,0,.24); }
.pay-strip span { font-size: 11px; }
.pdot { width: 7px; height: 7px; }
#spin-panel .hint { margin-top: 2px; padding: 3px 4px 0; font-size: 10px; letter-spacing: .15px; color: #a99d82; }

button, [role="button"] { -webkit-appearance: none; }
button:focus-visible { outline: 2px solid #f8e4a1; outline-offset: 3px; }
button:disabled { cursor: not-allowed; }

/* One forest-and-brass identity across base play and every feature mode. */
#bonus-arena.frenzy, #bonus-arena.titan, #hunt-arena {
  background:
    linear-gradient(180deg, rgba(5, 13, 8, .74), rgba(5, 10, 7, .80)),
    url('assets/habitat-forest.webp') center / cover no-repeat,
    var(--forest-950);
}
#bonus-arena.frenzy::before, #bonus-arena.titan::before, #hunt-arena::before {
  background: radial-gradient(ellipse at 50% 38%, rgba(195, 146, 50, .13), transparent 58%), repeating-conic-gradient(from 0deg at 50% 50%, transparent 0deg 24deg, rgba(225, 198, 129, .022) 24deg 25deg);
  opacity: .8;
}
#bonus-arena.frenzy { box-shadow: inset 0 0 120px rgba(132, 47, 35, .12); }
#bonus-arena.titan { box-shadow: inset 0 0 140px rgba(210, 158, 43, .14); }
#hunt-arena { box-shadow: inset 0 0 130px rgba(53, 106, 70, .16); }
#bonus-hud, #hunt-hud { gap: clamp(10px, 2vw, 26px); padding: 12px 18px; flex-wrap: wrap; }
.bonus-title, .hunt-title { font-size: clamp(18px, 2.1vw, 25px); letter-spacing: 2px; animation-duration: 2.2s; }
.bonus-title.frenzy-t, .bonus-title.titan-t, .hunt-title { color: var(--soft-gold); text-shadow: 0 0 18px rgba(202, 157, 66, .48); }
.hunt-mult.hot { color: var(--soft-gold); text-shadow: 0 0 14px rgba(202,157,66,.5); }
.hunt-mon img { border-color: rgba(222,189,109,.58); box-shadow: 0 0 36px rgba(41,91,58,.38); }
.timing-meter { border: 1px solid rgba(222,189,109,.62); background: rgba(7,17,11,.88); box-shadow: 0 12px 36px rgba(0,0,0,.42); }
.tm-label { color: #f3e7c7; }
.tm-bar { max-width: min(320px, 78vw); }
.fin-title { max-width: 92vw; font-size: clamp(24px, 5vw, 42px); line-height: 1.08; text-align: center; }
.fin-total { font-size: clamp(36px, 7vw, 56px); }
.fin-sub { max-width: min(680px, 92vw); padding: 0 12px; line-height: 1.45; text-align: center; }
.ap-btn { min-width: 130px; min-height: 68px; border-width: 1px; border-color: rgba(222,189,109,.48); background: linear-gradient(180deg, rgba(50,46,28,.96), rgba(18,23,15,.98)); }
.ap-btn span { color: #c9c0aa; line-height: 1.3; }
.ap-btn:hover { border-color: var(--soft-gold); transform: translateY(-2px); }

.bonus-menu { width: min(680px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto; padding: clamp(16px, 3vw, 26px); border: 1px solid var(--brass-line); border-radius: 18px; background: linear-gradient(160deg, rgba(23,35,25,.99), rgba(8,15,10,.99)); box-shadow: 0 22px 70px rgba(0,0,0,.65), inset 0 1px 0 rgba(255,255,255,.06); }
.bonus-menu h2 { margin-top: 0; font-size: clamp(22px, 3vw, 28px); }
.bonus-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.bcard { min-width: 0; padding: 14px 10px; border-width: 1px; border-radius: 12px; background: rgba(4,10,7,.44); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.bcard:hover { transform: translateY(-2px); }
.bcard.frenzy { border-color: rgba(216,133,87,.56); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.bcard.hunt { border-color: rgba(121,166,116,.55); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.bcard.titan { border-color: rgba(222,189,109,.62); box-shadow: inset 0 1px 0 rgba(255,255,255,.05); }
.bcard-name { font-size: clamp(13px, 1.3vw, 17px); }
.bcard-cost { font-size: clamp(18px, 2vw, 22px); }
.bcard-desc { color: #c0b79f; font-size: 11px; line-height: 1.45; }

#overlay, #win-overlay { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.cap-panel, .field-journal { border-radius: 18px; box-shadow: 0 22px 70px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); }
.win-card { border-color: rgba(222,189,109,.40); }

@media (max-width: 760px) {
  #hud { min-height: 54px; padding: max(5px, env(safe-area-inset-top)) 8px 5px; gap: 5px; }
  .hud-title { font-size: 16px; letter-spacing: 1.5px; }
  .hud-stats { gap: 4px; }
  .hstat { min-width: 52px; padding: 4px 6px; }
  .hstat span { font-size: 8px; letter-spacing: 1px; }
  .hstat b { font-size: 15px; }
  button.hstat { padding: 4px 6px; }
  #spin-panel { padding: 5px 8px max(3px, env(safe-area-inset-bottom)); }
  #spin-panel .console { width: 100%; }
  #board-wrap { container-type: size; }
  #board { width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); flex: none; }
  .console-top { grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 5px; }
  .con-spin { grid-column: auto; order: 0; }
  .con-panel { min-height: 74px; padding: 5px 4px; }
  .con-label { font-size: 9px; letter-spacing: 1.5px; }
  .bet-controls { gap: 3px; }
  .bet-value { min-width: 44px; }
  .bet-value b, .win-value b { font-size: 26px; }
  .bet-value i { font-size: 9px; }
  .step { width: 40px; min-height: 44px; font-size: 22px; }
  .win-sub { flex-wrap: wrap; justify-content: center; gap: 3px 7px; font-size: 9px; }
  .spin-wrap { width: 76px; height: 76px; }
  .spin-round { width: 70px; height: 70px; }
  #spin-btn { min-width: 70px; min-height: 70px; }
  .spin-round span { font-size: 16px; letter-spacing: 1.5px; }
  .con-combo { margin-top: 5px; padding: 5px 7px; gap: 6px; }
  .con-combo .cm-label { font-size: 9px; letter-spacing: .8px; }
  .con-combo .cm-text { font-size: 11px; }
  .con-modes { grid-template-columns: minmax(110px, .85fr) minmax(0, 1.5fr); gap: 5px; margin-top: 5px; }
  .buy-bonus-btn { min-height: 44px; padding: 5px 7px; gap: 6px; }
  .buy-bonus-btn em .wb-icon { width: 18px; height: 18px; }
  .buy-bonus-btn b { font-size: 10px; letter-spacing: .8px; }
  .buy-bonus-btn span { font-size: 9px; }
  .con-utils { gap: 4px; }
  .con-utils .util { min-height: 44px; padding: 6px 3px; font-size: 9px; letter-spacing: .4px; }
  #spin-panel .pay-strip { gap: 6px 10px; flex-wrap: wrap; }
  .pay-strip span { font-size: 10px; }
  #spin-panel .hint { display: none; }
  .bonus-cards { grid-template-columns: 1fr; }
  .bonus-bet-row { flex-wrap: wrap; }
  .bonus-menu { padding: 16px; }
  #bonus-hud, #hunt-hud { justify-content: center; gap: 8px 14px; padding: 10px 8px; }
  .hunt-balls { font-size: 18px; }
  .hunt-mult, .hunt-total, .bonus-total { font-size: 16px; }
  .hunt-mon img { width: min(220px, 54vw); height: min(220px, 54vw); }
  .titan-mon img { width: min(260px, 64vw) !important; height: min(260px, 64vw) !important; }
  .titan-hpbar { width: min(260px, 64vw); }
  .attack-pick { max-width: 96vw; gap: 6px; margin-top: 12px; }
  .ap-btn { min-width: 0; min-height: 58px; flex: 1 1 30%; padding: 9px 7px; font-size: 13px; }
  .ap-btn span { font-size: 10px; }
  .ap-label { font-size: 15px; letter-spacing: 1px; }
}

@media (max-width: 420px) {
  .hud-title { font-size: 14px; }
  .hstat { min-width: 46px; }
  #hud-reset-btn { min-width: 38px; }
  .console-top { grid-template-columns: minmax(0,1fr) 76px minmax(0,1fr); }
  .con-panel { min-width: 0; }
  .bet-value { min-width: 38px; }
  .step { width: 34px; }
  .con-modes { grid-template-columns: minmax(110px, .85fr) minmax(0, 1.5fr); }
  .con-utils .util { font-size: 10px; }
  .pay-strip { justify-content: center; }
}

@media (max-height: 500px) and (max-width: 900px) {
  #hud { min-height: 46px; padding-block: 3px; }
  .hstat { padding-block: 2px; }
  #spin-panel { padding-block: 3px; }
  .con-panel { min-height: 62px; }
  .bet-value b, .win-value b { font-size: 22px; }
  .step { min-height: 44px; }
  .spin-wrap { width: 64px; height: 64px; }
  .spin-round, #spin-btn { width: 58px; height: 58px; min-width: 58px; min-height: 58px; }
  .spin-round span { font-size: 14px; letter-spacing: 1px; }
  .con-combo { margin-top: 3px; padding: 3px 6px; }
  .con-combo .cm-label { font-size: 8px; }
  .con-combo .cm-text { font-size: 10px; }
  .con-modes { margin-top: 3px; }
  .buy-bonus-btn, .con-utils .util { min-height: 40px; }
}

@media (max-height: 760px) and (min-width: 761px) {
  #hud { min-height: 54px; padding-block: 4px; }
  .con-panel { min-height: 78px; }
  .spin-wrap { width: 84px; height: 84px; }
  .spin-round { width: 76px; height: 76px; }
  .step { min-height: 44px; }
  #spin-panel .hint { display: none; }
  .pay-strip { margin-top: 3px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
