@font-face { font-family: "Archivo"; src: url("../../assets/fonts/archivo.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("../../assets/fonts/big-shoulders-display.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --navy-deep: #051826;
  --navy: #0a2a3f;
  --ink: #03101a;
  --ocean-teal: #14778a;
  --ocean-teal-light: #2fb2c4;
  --sand: #f0d9a8;
  --sand-dark: #d9b876;
  --off-white: #f4f6f4;
  --orange: #ff8c3b;
  --orange-dark: #e2701f;
  --red: #ff5d5d;
  --green: #4fb286;
  --purple: #a56cf0;
  --gold: #f0a63f;
  --card-bg: rgba(10, 42, 63, 0.92);
  --card-border: rgba(255, 255, 255, 0.09);
  --radius: 14px;
  --font: "Archivo", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --display: "Big Shoulders Display", "Archivo", Impact, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy-deep);
  color: var(--off-white);
  font-family: var(--font);
  height: 100%;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; }

#app {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(180deg, var(--navy-deep), var(--navy) 40%, var(--navy-deep));
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0,0,0,0.6);
  overflow-x: hidden;
}

.hidden { display: none !important; }

/* ---------- START SCREEN ---------- */
.screen--start {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.start-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 30%, rgba(255,160,90,0.22), transparent 55%),
    linear-gradient(180deg, #05080f 0%, #1a2533 38%, #0b4a66 39%, #04202e 75%, #010b12 100%);
}
.start-whale {
  position: absolute;
  left: 50%; bottom: 8%;
  width: min(120%, 720px);
  transform: translateX(-50%);
  fill: rgba(230,238,238,0.07);
  animation: whale-drift 9s ease-in-out infinite alternate;
}
@keyframes whale-drift { from { transform: translate(-52%, 6px); } to { transform: translate(-48%, -6px); } }
.start-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  padding: 32px 20px;
}
.start-poster {
  width: min(300px, 72vw, 36vh);
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 20px;
  border: 2px solid rgba(240,166,63,0.6);
  box-shadow: 0 20px 50px rgba(0,0,0,0.6), 0 0 60px rgba(240,166,63,0.25);
  animation: poster-in 0.6s ease-out;
}
@keyframes poster-in { from { opacity: 0; transform: scale(0.92); } to { opacity: 1; transform: none; } }
.start-kicker {
  font-size: 11px; font-weight: 800; letter-spacing: 3px;
  color: var(--orange);
  border: 1px solid rgba(255,140,59,0.4);
  padding: 6px 12px; border-radius: 99px;
}
.start-title { display: flex; flex-direction: column; line-height: 0.9; }
.start-title__big {
  font-family: var(--display);
  font-size: clamp(56px, 16vw, 104px);
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--off-white);
  text-shadow: 0 6px 30px rgba(0,0,0,0.6);
}
.start-title__region {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 6px;
  color: var(--sand);
  margin-top: 10px;
}
.start-slogan {
  font-size: 16px;
  line-height: 1.45;
  color: var(--off-white);
  opacity: 0.85;
  margin: 0;
}
.start-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.5px;
  opacity: 0.8;
  margin-top: 4px;
}
.start-stats strong { color: var(--sand); font-size: 14px; }

/* ---------- BUTTONS ---------- */
.btn {
  font-family: var(--font);
  border: none;
  border-radius: 10px;
  padding: 14px 20px;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 1px;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.15s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible, .tab:focus-visible, .cast-opt:focus-visible, .menu-tile:focus-visible { outline: 2px solid var(--sand); outline-offset: 2px; }
.btn--primary {
  background: linear-gradient(180deg, var(--orange), var(--orange-dark));
  color: #1a0e00;
  box-shadow: 0 6px 18px rgba(255,140,59,0.3);
}
.btn--primary:hover { filter: brightness(1.07); }
.btn--secondary {
  background: rgba(255,255,255,0.08);
  color: var(--off-white);
  border: 1px solid var(--card-border);
}
.btn--block { width: 100%; }
.btn--xl { padding: 18px 44px; font-size: 18px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn--reel {
  background: linear-gradient(180deg, var(--ocean-teal-light), var(--ocean-teal));
  color: #04222a;
  box-shadow: 0 6px 18px rgba(47,178,196,0.3);
}
.btn--danger {
  background: linear-gradient(180deg, #ff6b5b, #d8342a);
  color: #fff;
  box-shadow: 0 6px 22px rgba(255,80,60,0.45);
  animation: action-pulse 0.18s ease-in-out infinite alternate;
}

/* ---------- HUD ---------- */
.hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(5, 24, 38, 0.94);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.hud__back {
  background: none; border: none; color: var(--off-white);
  font-size: 20px; cursor: pointer; width: 32px;
}
.hud__title { font-family: var(--display); font-weight: 900; letter-spacing: 1.5px; font-size: 20px; }
.hud__stats { display: flex; gap: 12px; align-items: center; font-size: 13px; font-weight: 700; }
.hud__sound { background: none; border: none; font-size: 16px; cursor: pointer; padding: 0; }
.hud__coins { color: var(--sand); }
.hud__level { color: var(--ocean-teal-light); }
.hud__xp { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: rgba(255,255,255,0.05); }
.hud__xp-fill { height: 100%; width: 0; background: var(--ocean-teal-light); transition: width 0.6s ease; }

#screens { flex: 1; display: flex; flex-direction: column; }
.screen { display: none; padding: 14px; flex-direction: column; gap: 12px; }
.screen.active { display: flex; }
#screen-play.active { flex: 1; }
.screen-heading {
  font-family: var(--display);
  font-size: 22px;
  letter-spacing: 1.5px;
  color: var(--sand);
  margin: 0;
}
.screen-note { font-size: 12px; opacity: 0.65; margin: 0; line-height: 1.4; }

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.menu-tile {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  color: var(--off-white);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
}
.menu-tile__icon { font-size: 24px; }
.menu-tile:active { transform: scale(0.97); }
.menu-tile:hover { border-color: rgba(255,255,255,0.2); }

.howto { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--card-border); font-size: 13px; }
.howto__title { font-weight: 800; letter-spacing: 2px; font-size: 11px; color: var(--sand); }
.howto ol { margin: 8px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; line-height: 1.4; opacity: 0.9; }
.howto__keys { margin-top: 10px; font-size: 12px; opacity: 0.65; }
kbd { background: rgba(255,255,255,0.1); border: 1px solid var(--card-border); border-radius: 4px; padding: 1px 6px; font-family: inherit; font-size: 11px; }

.energy-bar-wrap { display: flex; flex-direction: column; gap: 6px; }
.energy-bar-label { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 1px; opacity: 0.8; font-variant-numeric: tabular-nums; }

/* ---------- BARS ---------- */
.bar { position: relative; height: 14px; background: rgba(0,0,0,0.35); border-radius: 8px; overflow: hidden; border: 1px solid var(--card-border); }
.bar__fill { height: 100%; width: 0%; transition: width 0.08s linear; }
.bar__label {
  position: absolute; inset: 0; display: flex; align-items: center; padding-left: 8px;
  font-size: 9px; font-weight: 800; letter-spacing: 1.5px; color: rgba(255,255,255,0.9);
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.bar--energy { height: 8px; }
.bar--energy .bar__fill { background: linear-gradient(90deg, var(--gold), var(--orange)); transition: width 0.4s ease; }
.bar--tension .bar__fill { background: linear-gradient(90deg, var(--green), var(--gold) 60%, var(--red)); }
.bar--fish-energy .bar__fill { background: linear-gradient(90deg, var(--ocean-teal-light), var(--ocean-teal)); }
.scene-fightbars .bar { height: 18px; }
.scene-fightbars.danger .bar--tension { box-shadow: 0 0 0 2px rgba(255,93,93,0.7); animation: action-pulse 0.2s infinite alternate; }

/* ---------- TACKLE / LOCATIONS shared list styling ---------- */
.tackle-list, .locations-grid { display: flex; flex-direction: column; gap: 10px; }

/* ---------- PLAY SCREEN ---------- */
.moby-strip {
  display: flex; align-items: center; gap: 12px;
  width: 100%;
  padding: 8px 12px 8px 8px;
  border-radius: var(--radius);
  border: 1px solid rgba(240,196,63,0.25);
  background: linear-gradient(100deg, rgba(240,166,63,0.14), rgba(10,42,63,0.6));
  color: var(--off-white);
  text-align: left;
  cursor: pointer;
  flex-shrink: 0;
}
.moby-strip:hover { border-color: rgba(240,196,63,0.5); }
.moby-strip__img { width: 84px; height: 84px; border-radius: 12px; object-fit: cover; flex-shrink: 0; border: 1px solid rgba(240,196,63,0.35); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
.moby-strip__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.moby-strip__title { font-family: var(--display); font-size: 20px; font-weight: 900; letter-spacing: 1px; color: var(--gold); }
.moby-strip__status { font-size: 12px; opacity: 0.85; line-height: 1.3; }
.moby-strip__status strong { color: var(--sand); }
.moby-strip--done { border-color: var(--gold); background: linear-gradient(100deg, rgba(240,166,63,0.3), rgba(10,42,63,0.6)); }

.event-strip {
  font-size: 12px;
  padding: 10px 14px;
  background: rgba(20,119,138,0.14);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--sand);
  cursor: pointer;
  line-height: 1.4;
}

.scene-wrap {
  position: relative;
  flex: 1;
  min-height: 340px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: #04141f;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
#fishing-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
.scene-location {
  position: absolute; top: 10px; left: 10px;
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
  color: var(--off-white);
  background: rgba(3,16,26,0.55);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 99px;
  padding: 6px 10px;
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.scene-location__change { color: var(--orange); font-size: 10px; }
.scene-location:hover { border-color: rgba(255,255,255,0.3); }
.scene-status {
  position: absolute; top: 22%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--display);
  font-size: clamp(26px, 6vw, 40px); font-weight: 900; letter-spacing: 1.5px;
  color: var(--off-white); text-shadow: 0 2px 10px rgba(0,0,0,0.9);
  background: rgba(3,16,26,0.62);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 2px 18px 4px;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  animation: status-pop 0.25s ease-out;
}
.scene-status--bite { color: var(--sand); }
.scene-status--good { color: #8ff0bd; }
.scene-status--danger { color: #ff6b5b; animation: status-pop 0.25s ease-out, action-pulse 0.15s infinite alternate; }
.scene-status--legend { color: var(--gold); font-size: clamp(28px, 7vw, 48px); }
@keyframes status-pop { from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; } to { transform: translate(-50%, -50%) scale(1); opacity: 1; } }
.scene-hint {
  position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 24px);
  font-size: 12px; font-weight: 600; text-align: center;
  background: rgba(3,16,26,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 99px; padding: 7px 14px;
  pointer-events: none;
}
.scene-fightbars:not(.hidden) ~ .scene-hint { bottom: 62px; }
.scene-fightbars {
  position: absolute; bottom: 10px; left: 10px; right: 42px;
  display: flex; flex-direction: column; gap: 6px;
  pointer-events: none;
}

/* cast type selector */
.cast-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cast-opt {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 6px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: rgba(255,255,255,0.04);
  color: var(--off-white);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.cast-opt__name { font-weight: 800; font-size: 12px; letter-spacing: 1px; }
.cast-opt__meta { font-size: 10px; opacity: 0.7; white-space: nowrap; }
.cast-opt:hover { border-color: rgba(255,255,255,0.22); }
.cast-opt.active { border-color: var(--sand); background: rgba(240,217,168,0.12); }
.cast-opt--wild.active { border-color: var(--orange); background: rgba(255,140,59,0.14); }
.cast-selector.locked .cast-opt { opacity: 0.45; pointer-events: none; }

.btn--action {
  padding: 18px;
  font-size: 15px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.btn--action.pulse { animation: action-pulse 0.4s ease-in-out infinite alternate; }
@keyframes action-pulse {
  from { filter: brightness(1); }
  to { filter: brightness(1.35); }
}

@keyframes shake {
  0%,100% { transform: translate(0,0); }
  20% { transform: translate(-6px,2px); }
  40% { transform: translate(6px,-2px); }
  60% { transform: translate(-4px,3px); }
  80% { transform: translate(4px,-3px); }
}
.screen-shake { animation: shake 0.35s ease-in-out; }

/* ---------- TABS ---------- */
.tab-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  color: var(--off-white);
  padding: 8px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
}
.tab.active { background: var(--orange); color: #1a0e00; border-color: var(--orange); }

/* ---------- LEADERBOARD ---------- */
.leaderboard-rows { display: flex; flex-direction: column; gap: 6px; }
.lb-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-size: 13px;
}
.lb-row.you { border-color: var(--orange); background: rgba(255,140,59,0.12); }
.lb-row__rank { width: 30px; font-weight: 800; opacity: 0.8; }
.lb-row__name { flex: 1; font-weight: 600; }
.lb-row__value { font-weight: 800; color: var(--sand); font-variant-numeric: tabular-nums; }
.lb-row__rank--1 { color: var(--gold); }
.lb-row__rank--2 { color: #cfd8dc; }
.lb-row__rank--3 { color: #d8a06a; }

/* ---------- COLLECTION ---------- */
.collection-progress { font-size: 13px; opacity: 0.85; }
.collection-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fish-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fish-card.uncaught { opacity: 0.35; }
.fish-card__icon { font-size: 22px; }
.fish-card__photo { width: 100%; height: 40px; object-fit: cover; border-radius: 6px; }
.fish-card__name { font-weight: 700; }
.fish-card__rarity { font-size: 9px; letter-spacing: 0.5px; text-transform: uppercase; }
.fish-card__weight { font-size: 10px; opacity: 0.75; }

/* ---------- LOCATIONS ---------- */
.location-card {
  border-radius: var(--radius);
  padding: 16px;
  border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
  min-height: 108px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  color: var(--off-white);
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.15s;
}
.location-card:hover:not(:disabled) { border-color: rgba(255,255,255,0.35); transform: translateY(-1px); }
.location-card.current { border-color: var(--sand); box-shadow: inset 0 0 0 1px var(--sand); }
.location-card.locked { cursor: not-allowed; filter: saturate(0.4) brightness(0.75); }
.location-card__name { font-family: var(--display); font-weight: 900; font-size: 24px; letter-spacing: 0.5px; }
.location-card__tag { font-size: 12px; opacity: 0.85; }
.location-card__meta { font-size: 11px; opacity: 0.6; }
.location-card__lock { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; letter-spacing: 1px; opacity: 0.95; }
.location-card.current .location-card__lock { color: var(--sand); }

/* ---------- TACKLE ---------- */
.rod-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.rod-card__header { display: flex; justify-content: space-between; align-items: center; }
.rod-card__name { font-weight: 800; }
.rod-card__level { font-size: 11px; opacity: 0.8; }
.stat-row { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.stat-row__label { width: 66px; opacity: 0.75; }
.stat-bar { flex: 1; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.08); overflow: hidden; }
.stat-bar__fill { height: 100%; background: var(--ocean-teal-light); }
.rod-card__actions { display: flex; gap: 8px; margin-top: 4px; }
.rod-card__actions .btn { flex: 1; padding: 10px; font-size: 12px; }

/* ---------- ACHIEVEMENTS ---------- */
.achievements-list { display: flex; flex-direction: column; gap: 8px; }
.ach-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 10px; padding: 10px 12px;
}
.ach-row.unlocked { border-color: var(--green); }
.ach-row__icon { font-size: 20px; }
.ach-row__title { font-weight: 700; font-size: 13px; }
.ach-row__desc { font-size: 11px; opacity: 0.75; }

/* ---------- PROFILE ---------- */
.profile-content { display: flex; flex-direction: column; gap: 14px; }
.profile-hero { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.profile-hero__name { font-family: var(--display); font-size: 28px; font-weight: 900; }
.profile-hero__id { font-size: 11px; opacity: 0.6; }
.profile-league { font-size: 12px; color: var(--sand); font-weight: 700; letter-spacing: 1px; }
.profile-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px;
  padding: 12px; text-align: center;
}
.stat-tile__value { font-size: 18px; font-weight: 900; color: var(--sand); }
.stat-tile__label { font-size: 10px; opacity: 0.7; letter-spacing: 1px; margin-top: 2px; }

/* ---------- MODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(2,10,17,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
  overflow-y: auto;
}
.modal {
  background: linear-gradient(160deg, var(--navy), var(--navy-deep));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px 22px;
  width: 100%; max-width: 380px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center;
  animation: modal-in 0.3s cubic-bezier(.2,1.3,.4,1);
  margin: auto;
}
@keyframes modal-in { from { transform: scale(0.85); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal--legend { border-color: var(--gold); box-shadow: 0 0 60px rgba(240,166,63,0.35); }
.modal__image { width: 100%; max-height: 170px; object-fit: cover; border-radius: 10px; }
.drawer {
  background: linear-gradient(160deg, var(--navy), var(--navy-deep));
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  width: 100%; max-width: 400px;
  position: relative;
  margin: auto;
}
.drawer__close {
  position: absolute; top: 10px; right: 12px;
  background: none; border: none; color: var(--off-white);
  font-size: 18px; cursor: pointer; opacity: 0.7;
}
.drawer .menu-grid { margin-top: 18px; }
.modal__badge { font-size: 13px; font-weight: 900; letter-spacing: 2px; color: var(--orange); }
.modal__fish-name { font-family: var(--display); font-size: 30px; font-weight: 900; letter-spacing: 0.5px; line-height: 1; }
.modal__weight { font-family: var(--display); font-size: 46px; font-weight: 900; color: var(--sand); line-height: 1; }
.modal__rarity { font-size: 12px; letter-spacing: 1px; }
.modal__fight { font-size: 11px; opacity: 0.6; letter-spacing: 1px; }
.modal__fight:empty { display: none; }
.modal__rewards { display: flex; gap: 14px; font-weight: 800; font-size: 13px; margin-top: 4px; }
.modal__rewards span:first-child { color: var(--green); }
.modal__rewards span:last-child { color: var(--gold); }
.modal__pb { font-size: 12px; font-weight: 800; color: var(--red); letter-spacing: 1px; }
.modal__rank { margin-top: 6px; padding-top: 10px; border-top: 1px dashed var(--card-border); width: 100%; }
.modal__rank-label { font-size: 10px; letter-spacing: 1px; opacity: 0.7; }
.modal__rank-value { font-size: 18px; font-weight: 900; }
.modal__rank-delta { font-size: 12px; color: var(--green); font-weight: 700; }
.modal__near-miss { font-size: 12px; color: var(--sand); background: rgba(255,255,255,0.05); border-radius: 8px; padding: 8px; }
.modal__actions { display: flex; flex-direction: column; gap: 8px; width: 100%; margin-top: 8px; }

/* ---------- TOAST ---------- */
.toast {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%);
  width: max-content; max-width: calc(100% - 32px);
  background: #e9f1ee; color: #062018; font-weight: 700; font-size: 13px; line-height: 1.35;
  text-align: center;
  padding: 10px 18px; border-radius: 14px; z-index: 200; box-shadow: 0 8px 26px rgba(0,0,0,0.45);
  animation: toast-in 0.25s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -10px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (min-width: 481px) {
  html:not(.embed) #app { margin-top: 20px; margin-bottom: 20px; border-radius: 20px; min-height: calc(100vh - 40px); max-width: 560px; }
}

@media (min-width: 900px) {
  #app { max-width: 1100px; }
  .hud { padding: 12px 32px; }
  .screen { padding: 20px 32px; gap: 14px; }
  .scene-wrap { min-height: 460px; }
  .moby-strip, .event-strip, #screen-play .btn--action, #screen-play .energy-bar-wrap, .cast-selector {
    max-width: 760px; margin-left: auto; margin-right: auto; width: 100%;
  }
  .collection-grid { grid-template-columns: repeat(6, 1fr); }
  .locations-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .tackle-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; align-items: start; }
  .leaderboard-rows { max-width: 640px; margin: 0 auto; width: 100%; }
}

/* ---------- EMBED (inside the landing page iframe) ---------- */
html.embed, html.embed body { height: 100%; overflow: hidden; }
html.embed #app {
  max-width: none; margin: 0; border-radius: 0; box-shadow: none;
  height: 100%; min-height: 0;
}
html.embed #screens { min-height: 0; overflow-y: auto; }
html.embed .screen--start { min-height: 0; height: 100%; }
html.embed .start-content { gap: 12px; padding: 20px 16px; }
html.embed .start-poster { width: min(260px, 64vw, 32vh); }
html.embed .screen { padding: 10px 12px; gap: 9px; }
html.embed #screen-play.active { min-height: 0; }
html.embed .scene-wrap { min-height: 220px; }
html.embed .event-strip { display: none; }
html.embed .moby-strip__img { width: 64px; height: 64px; }
html.embed .btn--action { padding: 15px; }
html.embed .toast { top: 56px; }
html.embed .modal-overlay { position: absolute; }
@media (min-width: 900px) {
  html.embed .screen { padding: 12px 20px; }
  html.embed .scene-wrap { min-height: 300px; }
}

@media (prefers-reduced-motion: reduce) {
  .start-poster, .start-whale, .btn--danger, .scene-status--danger, .btn--action.pulse { animation: none; }
}
