/* BIG CATCH: PESCA TROPICAL — mobile first (base 390×844) */
:root {
  --jungle: #16734A; --amazon: #239B68; --river: #168BC4; --sun: #FFD447;
  --orange: #F28C28; --brown: #493528; --water: #36BBD4;
  --cream: #FFF6DC; --ink: #2a1d14; --dark: #2e1f14;
  --display: 'Lilita One', 'Arial Rounded MT Bold', 'Trebuchet MS', sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #0b1d18; overscroll-behavior: none; }
body {
  font-family: Nunito, system-ui, -apple-system, 'Segoe UI', sans-serif; font-weight: 700; color: var(--ink);
  display: flex; justify-content: center; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; cursor: pointer; }
h2, h3, p { margin: 0; }

#app {
  position: relative; overflow: hidden; background: var(--jungle);
  width: min(100vw, 480px, calc(100vh * .62)); height: 100vh;
  width: min(100vw, 480px, calc(100dvh * .62)); height: 100dvh;
}

/* ---------- Topo ---------- */
#top {
  position: absolute; z-index: 20; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 12px 8px; pointer-events: none;
}
#top > * { pointer-events: auto; }
#top-title { flex: 1; font-family: var(--display); font-size: 20px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .45); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ico-btn {
  width: 42px; height: 42px; flex: none; border-radius: 14px; border: 3px solid var(--dark); background: linear-gradient(#8a6248, #5f4332);
  color: #ffe9c2; display: grid; place-items: center; box-shadow: 0 4px 0 var(--dark); padding: 0;
}
.ico-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--dark); }
.ic { width: 22px; height: 22px; display: block; }
.pill {
  display: flex; align-items: center; gap: 6px; height: 42px; padding: 0 14px 0 8px; border-radius: 21px;
  background: rgba(42, 29, 20, .82); border: 3px solid var(--dark); color: var(--sun); font-family: var(--display); font-size: 19px;
}
.coin-ic {
  display: inline-block; width: 20px; height: 20px; border-radius: 50%; flex: none; vertical-align: -4px;
  background: radial-gradient(circle at 35% 30%, #fff3a8, #FFD447 45%, #d8990f); border: 2px solid #8a5a06;
}
.pill.bump { animation: bump .35s; }
@keyframes bump { 40% { transform: scale(1.18); } }

/* ---------- Telas ---------- */
.screen { position: absolute; inset: 0; display: none; flex-direction: column; }
.screen.active { display: flex; }
.screen.scroll {
  overflow-y: auto; -webkit-overflow-scrolling: touch; padding: calc(70px + env(safe-area-inset-top)) 14px calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(120% 60% at 50% 0%, #239B68 0%, #16734A 45%, #0d4a31 100%);
}
.screen-h { font-family: var(--display); font-weight: 400; font-size: 26px; color: #fff; text-align: center; text-shadow: 0 3px 0 rgba(0, 0, 0, .35); margin-bottom: 14px; text-transform: uppercase; }
.scene-wrap { position: absolute; inset: 0; }
.scene-wrap svg, .loc-scene svg { width: 100%; height: 100%; display: block; }

/* ---------- Botões ---------- */
.btn {
  --sh: #2e1f14; font-family: var(--display); font-size: 19px; letter-spacing: .4px; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  border: 3px solid var(--dark); border-radius: 18px; padding: 12px 16px; color: var(--ink);
  box-shadow: 0 6px 0 var(--sh), 0 12px 18px rgba(0, 0, 0, .28); transition: transform .07s, box-shadow .07s; touch-action: manipulation;
}
.btn:active:not(:disabled), .btn.down { transform: translateY(4px); box-shadow: 0 2px 0 var(--sh), 0 4px 8px rgba(0, 0, 0, .28); }
.btn-yellow { background: linear-gradient(#ffe98a, #FFD447 45%, #f5b921); --sh: #a86a08; border-color: #6e4305; }
.btn-green { background: linear-gradient(#52cf93, #239B68); --sh: #0f5a39; border-color: #0b3f29; color: #fff; }
.btn-wood { background: linear-gradient(#8f664b, #5f4332); --sh: #2e1f14; color: #ffe9c2; }
.btn-red { background: linear-gradient(#ffa052, #f2542d); --sh: #9c2a10; border-color: #6e1b08; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .25); }
.btn-xl { font-size: 26px; padding: 16px; border-radius: 22px; }
.btn-sm { font-size: 13px; padding: 10px 4px; flex-direction: column; gap: 4px; border-radius: 16px; }
.btn:disabled { filter: saturate(.35) brightness(.9); cursor: default; }
.btn .ic { width: 24px; height: 24px; }
.btn-xl .ic { width: 28px; height: 28px; }

/* ---------- Início ---------- */
.logo { position: absolute; top: 10.5%; left: 0; right: 0; text-align: center; pointer-events: none; }
.logo-big {
  font-family: var(--display); font-size: 78px; line-height: .86; color: var(--sun); letter-spacing: 1px;
  -webkit-text-stroke: 9px #5a2f0a; paint-order: stroke fill; text-shadow: 0 7px 0 #5a2f0a, 0 12px 18px rgba(0, 0, 0, .35);
  animation: logo-in .7s cubic-bezier(.2, 1.4, .4, 1) both;
}
.logo-rib {
  display: inline-block; margin-top: 16px; padding: 5px 18px 6px; border-radius: 12px; background: var(--jungle); border: 3px solid #0b3f29;
  color: #fff; font-family: var(--display); font-size: 20px; letter-spacing: 2px; text-transform: uppercase; box-shadow: 0 4px 0 #0b3f29; transform: rotate(-2deg);
}
.logo-tag { margin-top: 12px; color: #fff; font-weight: 900; font-size: 13px; letter-spacing: 2px; text-transform: uppercase; text-shadow: 0 2px 4px rgba(0, 0, 0, .55); }
@keyframes logo-in { from { transform: scale(.6) translateY(-30px); opacity: 0; } }
.home-menu { position: absolute; left: 16px; right: 16px; bottom: calc(22px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 340px) { .row3 { gap: 6px; } .btn-sm { font-size: 10.5px; letter-spacing: 0; } .logo-big { font-size: 62px; } }
.record-pill {
  align-self: center; display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 16px;
  background: rgba(42, 29, 20, .78); color: var(--sun); font-size: 14px; font-weight: 900;
}
.record-pill .ic { width: 18px; height: 18px; }

/* ---------- Pescaria ---------- */
#stage.shake { animation: shake .28s linear infinite; }
@keyframes shake { 25% { transform: translate(3px, -2px); } 50% { transform: translate(-3px, 2px); } 75% { transform: translate(2px, 2px); } }
.prompt {
  position: absolute; top: calc(74px + env(safe-area-inset-top)); left: 16px; right: 16px; text-align: center; pointer-events: none;
  font-family: var(--display); font-size: 18px; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .5), 0 0 12px rgba(0, 0, 0, .35); line-height: 1.2;
}
.prompt small { display: table; margin: 6px auto 0; padding: 3px 12px; border-radius: 12px; background: rgba(42, 29, 20, .62); font-family: Nunito, sans-serif; font-weight: 800; font-size: 13px; text-shadow: none; }
.prompt.big { font-size: 46px; color: var(--sun); -webkit-text-stroke: 6px #6e1b08; paint-order: stroke fill; animation: pop .3s cubic-bezier(.2, 1.6, .4, 1) both, pulse .4s .3s ease-in-out infinite alternate; }
.prompt.bad { font-size: 38px; color: #ffd9cf; -webkit-text-stroke: 6px #6e1b08; paint-order: stroke fill; animation: pop .3s cubic-bezier(.2, 1.6, .4, 1) both; }
.prompt.big small, .prompt.bad small { -webkit-text-stroke: 0; color: #fff; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
@keyframes pulse { to { transform: scale(1.08); } }
#fish-ui { position: absolute; left: 16px; right: 16px; bottom: calc(22px + env(safe-area-inset-bottom)); }
#act.alert { animation: pulse .25s ease-in-out infinite alternate; }

.fight { background: rgba(42, 29, 20, .9); border: 3px solid var(--dark); border-radius: 24px; padding: 12px 14px 16px; color: #fff; box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.fight-top { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--display); font-size: 16px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.fight-top span + span { font-family: Nunito, sans-serif; font-weight: 800; font-size: 12px; text-transform: none; color: #ffe9c2; letter-spacing: 0; }
.bar { position: relative; height: 40px; border-radius: 20px; background: #170f0a; border: 3px solid #000; overflow: hidden; touch-action: none; }
.zone {
  position: absolute; top: 0; bottom: 0; border-radius: 16px; background: linear-gradient(#5fe0a0, #239B68); display: grid; place-items: center;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}
.zone svg { width: 30px; height: 16px; opacity: .9; }
.bar.in .zone { background: linear-gradient(#a6ffcf, #2fd487); box-shadow: inset 0 0 0 2px #fff, 0 0 16px #5fe0a0; }
.marker { position: absolute; top: -2px; bottom: -2px; width: 8px; margin-left: -4px; border-radius: 4px; background: var(--sun); border: 2px solid #5a2f0a; box-shadow: 0 0 8px rgba(255, 212, 71, .9); }
.prog { position: relative; height: 20px; margin: 10px 0 14px; border-radius: 10px; background: #170f0a; border: 2px solid #000; overflow: hidden; }
.prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: linear-gradient(#ffe98a, #F28C28); border-radius: 8px; }
.prog span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: 1.5px; text-shadow: 0 1px 2px #000; }
#hold { touch-action: none; }

/* ---------- Painéis ---------- */
.panel { background: var(--cream); border: 3px solid var(--dark); border-radius: 22px; padding: 14px; box-shadow: 0 6px 0 rgba(0, 0, 0, .28); margin-bottom: 16px; }
.panel-h { font-family: var(--display); font-weight: 400; font-size: 18px; text-transform: uppercase; color: var(--brown); margin-bottom: 10px; letter-spacing: .5px; }
.note { font-size: 11px; color: #8a7462; text-align: center; margin-top: 10px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 10px; background: #eadfbd; font-size: 12px; font-weight: 800; color: var(--brown); }
.tag.gold { background: var(--sun); }

/* ---------- Mapa ---------- */
.loc { background: var(--cream); border: 3px solid var(--dark); border-radius: 22px; overflow: hidden; box-shadow: 0 6px 0 rgba(0, 0, 0, .28); margin-bottom: 18px; --sil: #c9b993; }
.loc.cur { border-color: var(--sun); box-shadow: 0 0 0 3px var(--dark), 0 8px 0 rgba(0, 0, 0, .3); }
.loc-scene { position: relative; height: 118px; border-bottom: 3px solid var(--dark); }
.loc.locked .loc-scene svg { filter: grayscale(.85) brightness(.6); }
.loc-lock { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.loc-lock .ic { width: 44px; height: 44px; filter: drop-shadow(0 3px 0 rgba(0, 0, 0, .5)); }
.loc-body { padding: 12px 14px 16px; }
.loc-body h3 { font-family: var(--display); font-weight: 400; font-size: 24px; text-transform: uppercase; color: var(--jungle); }
.loc-body p { font-size: 13px; color: #6a5545; margin: 2px 0 8px; }
.loc-fish { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; margin-bottom: 8px; }
.loc-fish svg { width: 100%; height: auto; }
.loc-foot { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }

/* ---------- Troféus ---------- */
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.tabs button { font-family: var(--display); font-size: 17px; text-transform: uppercase; padding: 10px; border-radius: 16px; border: 3px solid var(--dark); background: #0d4a31; color: #bfe5cf; }
.tabs button.on { background: var(--sun); color: var(--ink); box-shadow: 0 4px 0 #a86a08; }
.best { text-align: center; }
.best .fish { width: 72%; max-width: 250px; height: auto; margin: -4px auto -6px; display: block; }
.best-name { font-family: var(--display); font-size: 26px; text-transform: uppercase; color: var(--jungle); line-height: 1; }
.best-w { font-family: var(--display); font-size: 40px; color: var(--orange); line-height: 1.1; }
.best-meta { font-size: 12px; color: #6a5545; text-transform: uppercase; letter-spacing: 1px; }
.rank { list-style: none; margin: 0; padding: 0; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; font-size: 15px; }
.rank li:nth-child(odd) { background: #f3e8c6; }
.rank .pos { width: 26px; font-family: var(--display); font-size: 17px; color: #8a7462; text-align: center; }
.rank li:nth-child(1) .pos { color: #d8990f; } .rank li:nth-child(2) .pos { color: #8a949a; } .rank li:nth-child(3) .pos { color: #b0692c; }
.rank .who { flex: 1; min-width: 0; }
.rank .who small { display: block; font-size: 11px; color: #8a7462; font-weight: 700; }
.rank .w { font-family: var(--display); font-size: 17px; white-space: nowrap; }
.rank li.me { background: var(--sun); box-shadow: inset 0 0 0 2px #a86a08; }
.rank li.me .pos, .rank li.me small { color: var(--ink); }
.album-count { text-align: center; color: #fff; font-family: var(--display); font-size: 22px; margin-bottom: 12px; text-shadow: 0 2px 0 rgba(0, 0, 0, .35); }
.album-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; --sil: #cdbd97; }
.cell { background: #f3e8c6; border: 2px solid #d9c99c; border-radius: 12px; padding: 4px 2px 5px; text-align: center; min-width: 0; }
.cell.got { background: #fff; border-color: var(--rc, var(--brown)); box-shadow: 0 3px 0 var(--rc, var(--brown)); }
.cell svg { width: 100%; height: auto; display: block; }
.cell b { display: block; font-size: 10px; font-weight: 900; color: var(--brown); white-space: nowrap; }

/* ---------- Equipamento ---------- */
.stat { display: grid; grid-template-columns: 82px 1fr 30px; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .5px; }
.stat:last-child { margin-bottom: 0; }
.stat-bar { display: grid; grid-template-columns: repeat(10, 1fr); gap: 3px; }
.stat-bar i { height: 14px; border-radius: 4px; background: #e3d6ae; }
.stat-bar i.on { background: linear-gradient(#52cf93, #239B68); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); }
.stat span:last-child { text-align: right; font-family: var(--display); font-size: 16px; color: var(--jungle); }
.gear { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; }
.gear h3 { font-family: var(--display); font-weight: 400; font-size: 20px; text-transform: uppercase; color: var(--jungle); }
.gear .tier { font-size: 14px; }
.gear .eff { font-size: 12px; color: #8a7462; }
.pips { display: flex; gap: 4px; margin-top: 6px; }
.pips i { width: 22px; height: 8px; border-radius: 4px; background: #e3d6ae; }
.pips i.on { background: var(--orange); }
.gear .btn { width: auto; min-width: 118px; grid-row: 1 / span 3; grid-column: 2; font-size: 15px; padding: 10px 12px; flex-direction: column; gap: 2px; }
.gear .btn small { font-family: Nunito, sans-serif; font-weight: 900; font-size: 10px; letter-spacing: .5px; opacity: .8; }

/* ---------- Modal / cartão de captura ---------- */
.modal { position: absolute; inset: 0; z-index: 40; display: grid; place-items: center; padding: 18px; background: rgba(8, 26, 20, .78); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); overflow: hidden; }
.modal-card { position: relative; width: 100%; max-width: 360px; background: var(--cream); border: 4px solid var(--dark); border-radius: 26px; padding: 16px 16px 18px; text-align: center; box-shadow: 0 10px 0 rgba(0, 0, 0, .35); animation: pop .35s cubic-bezier(.2, 1.5, .4, 1) both; }
.card-h { font-family: var(--display); font-size: 22px; text-transform: uppercase; color: var(--jungle); letter-spacing: .5px; }
.card-fish { position: relative; margin: 6px 0 2px; border-radius: 18px; overflow: hidden; background: radial-gradient(circle, #fff 0%, var(--rc-soft, #d7f0f7) 70%); border: 3px solid var(--rc, var(--river)); }
.card-fish::before { content: ''; position: absolute; inset: -60%; background: repeating-conic-gradient(rgba(255, 255, 255, .55) 0 10deg, transparent 10deg 20deg); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
.card-fish .fish { position: relative; width: 84%; height: auto; display: block; margin: 0 auto; animation: float 2.6s ease-in-out infinite alternate; filter: drop-shadow(0 8px 6px rgba(0, 0, 0, .25)); }
.card-fish .fish.silhouette { --sil: #c9b993; filter: none; animation: none; }
.card-name { font-family: var(--display); font-size: 28px; text-transform: uppercase; line-height: 1.05; margin-top: 8px; }
.card-w { font-family: var(--display); font-size: 52px; line-height: 1; color: var(--orange); -webkit-text-stroke: 5px var(--dark); paint-order: stroke fill; margin: 4px 0 6px; }
.card-w small { font-size: 26px; }
.rar { display: inline-flex; align-items: center; gap: 4px; padding: 4px 12px; border-radius: 12px; color: #fff; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: 1px; background: var(--rc, var(--river)); }
.rar .ic { width: 13px; height: 13px; }
.card-desc { font-size: 13px; color: #6a5545; margin: 8px 6px 0; }
.card-rew { display: flex; justify-content: center; gap: 10px; margin: 12px 0 4px; font-family: var(--display); font-size: 19px; }
.card-rew span { padding: 4px 12px; border-radius: 12px; background: #f3e8c6; }
.card-meta { font-size: 11px; color: #8a7462; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.badges { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.badge { padding: 4px 12px; border-radius: 10px; background: #e2452f; color: #fff; font-family: var(--display); font-size: 15px; text-transform: uppercase; transform: rotate(-3deg); box-shadow: 0 3px 0 #7a1c10; animation: pulse .5s ease-in-out infinite alternate; }
.badge.new { background: var(--river); box-shadow: 0 3px 0 #0b4a6e; transform: rotate(2deg); }
.card-btns { display: grid; gap: 12px; }
.card-btns .btn-wood { font-size: 15px; padding: 9px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -14px; width: 9px; height: 14px; border-radius: 2px; animation: fall 2.6s linear both; }
@keyframes fall { to { transform: translateY(105vh) rotate(720deg); } }

.toast { position: absolute; z-index: 50; left: 50%; bottom: 120px; transform: translate(-50%, 20px); padding: 10px 18px; border-radius: 16px; background: rgba(42, 29, 20, .95); color: #fff; font-size: 14px; font-weight: 800; opacity: 0; pointer-events: none; transition: .25s; max-width: 86%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-height: 700px) {
  .logo { top: 9%; } .logo-big { font-size: 60px; } .logo-rib { font-size: 16px; margin-top: 10px; } .logo-tag { margin-top: 8px; }
  .home-menu { gap: 10px; } .btn-xl { font-size: 22px; padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .wave, .sway, .fly, .drift, .mist, .ray, .bubble, .twinkle, .bob-anim, .card-fish::before, #stage.shake { animation: none !important; }
}
