:root {
  --ink: #14212a;
  --muted: #60717b;
  --paper: #f9fbf7;
  --panel: rgba(255, 255, 255, 0.88);
  --line: rgba(20, 33, 42, 0.13);
  --teal: #0797a5;
  --teal-dark: #046478;
  --coral: #ef5d45;
  --sun: #f7bd46;
  --kelp: #3b8b65;
  --shadow: 0 18px 50px rgba(8, 45, 57, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0.82)),
    radial-gradient(circle at 18% 0%, rgba(247, 189, 70, 0.32), transparent 28rem),
    linear-gradient(135deg, #d6f3ee 0%, #f9efd5 52%, #e5f2ff 100%);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  letter-spacing: 0;
}

body[data-location="crystal-cavern"] {
  background:
    linear-gradient(180deg, rgba(247, 252, 255, 0.62), rgba(255, 255, 255, 0.86)),
    radial-gradient(circle at 12% 6%, rgba(125, 92, 255, 0.26), transparent 28rem),
    linear-gradient(135deg, #d7f4ff 0%, #eef2ff 52%, #d7fff4 100%);
}

body[data-location="volcanic-reef"] {
  background:
    linear-gradient(180deg, rgba(255, 249, 244, 0.72), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 18% 0%, rgba(239, 93, 69, 0.34), transparent 30rem),
    linear-gradient(135deg, #ffe0cf 0%, #f8f4ea 50%, #ffe9d6 100%);
}

body[data-location="starfall-trench"] {
  background:
    linear-gradient(180deg, rgba(245, 248, 255, 0.68), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 82% 4%, rgba(125, 92, 255, 0.32), transparent 30rem),
    linear-gradient(135deg, #dae4ff 0%, #f3efff 48%, #d9fbff 100%);
}

body[data-location="abyssal-archive"] {
  background:
    linear-gradient(180deg, rgba(246, 250, 248, 0.72), rgba(255, 255, 255, 0.88)),
    radial-gradient(circle at 20% 0%, rgba(59, 139, 101, 0.28), transparent 28rem),
    linear-gradient(135deg, #d8ede5 0%, #f2f4df 50%, #dbe8f0 100%);
}

button {
  font: inherit;
}

.app-shell {
  width: min(1500px, calc(100% - 28px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff8e7;
  background: linear-gradient(145deg, var(--teal-dark), var(--teal));
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-mark svg {
  width: 35px;
  height: 35px;
  fill: currentColor;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.85rem, 3vw, 3rem);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  font-size: 1.06rem;
  line-height: 1.15;
}

.brand-block p,
.goal-panel p {
  color: var(--muted);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stat-pill,
.icon-button,
.primary-action,
.secondary-action,
.tab,
.shop-card,
.inventory-card,
.collection-card,
.location-card,
.achievement-card,
.trade-card,
.passive-card,
.passive-upgrade-card,
.quick-stats article,
.world-strip article,
.stage-panel,
.odds-panel,
.goal-panel,
.feed-panel,
.tab-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stat-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 13px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(7, 81, 109, 0.12);
}

.stat-pill span,
.quick-stats span,
.streak-card span,
.risk-wrap span,
.shop-meta span,
.inventory-card span,
.collection-card span,
.world-strip span,
.location-card span,
.trade-card span,
.passive-card span,
.passive-upgrade-card span,
.odds-name,
.daily-note {
  color: var(--muted);
  font-size: 0.77rem;
  font-weight: 760;
  text-transform: uppercase;
}

.stat-pill strong {
  font-size: 1.12rem;
}

.icon-button {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.icon-button:hover,
.tab:hover,
.secondary-action:hover {
  transform: translateY(-1px);
}

.icon-button svg,
.primary-action svg,
.secondary-action svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon-button .settings-icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.15;
}

.icon-button .settings-icon * {
  vector-effect: non-scaling-stroke;
}

.icon-button.active {
  color: #fff;
  background: var(--teal-dark);
}

.icon-button.danger {
  color: #9d2e24;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 220px;
  padding: 7px 9px;
  color: #fff;
  pointer-events: none;
  content: attr(data-tooltip);
  background: rgba(20, 33, 42, 0.95);
  border-radius: 6px;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.75fr);
  gap: 18px;
  align-items: start;
  min-height: 0;
}

.play-column,
.side-column {
  display: grid;
  gap: 14px;
  min-height: 0;
}

.stage-panel,
.odds-panel,
.goal-panel,
.feed-panel,
.tab-panel {
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.stage-panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head.compact {
  margin-bottom: 10px;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 0.74rem;
  font-weight: 850;
  text-transform: uppercase;
}

.streak-card {
  min-width: 86px;
  padding: 10px 12px;
  text-align: right;
  background: rgba(255, 250, 231, 0.86);
  border: 1px solid rgba(247, 189, 70, 0.44);
  border-radius: var(--radius);
}

.streak-card strong {
  display: block;
  font-size: 1.5rem;
  line-height: 1;
}

.ocean-stage {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  background: #0b5f76;
  border: 1px solid rgba(4, 100, 120, 0.25);
  border-radius: var(--radius);
  isolation: isolate;
}

.ocean-stage::after {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  opacity: 0;
  transition: opacity 900ms ease;
}

.ocean-stage::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
  opacity: 0;
  transition: opacity 450ms ease, background 450ms ease;
}

body[data-location="crystal-cavern"] .ocean-stage::before {
  opacity: 0.34;
  background:
    radial-gradient(circle at 16% 22%, rgba(255, 255, 255, 0.95) 0 4px, transparent 5px),
    radial-gradient(circle at 76% 30%, rgba(195, 235, 255, 0.72) 0 5px, transparent 7px),
    linear-gradient(135deg, rgba(87, 69, 180, 0.26), rgba(51, 205, 216, 0.18));
}

body[data-location="volcanic-reef"] .ocean-stage::before {
  opacity: 0.42;
  background:
    radial-gradient(circle at 70% 72%, rgba(255, 93, 48, 0.44) 0 16px, transparent 42px),
    radial-gradient(circle at 24% 80%, rgba(255, 189, 70, 0.36) 0 10px, transparent 34px),
    linear-gradient(180deg, rgba(67, 30, 28, 0.18), rgba(239, 93, 69, 0.2));
}

body[data-location="starfall-trench"] .ocean-stage::before {
  opacity: 0.46;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 44% 28%, rgba(255, 255, 255, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 82% 16%, rgba(255, 216, 107, 0.95) 0 3px, transparent 5px),
    linear-gradient(180deg, rgba(28, 31, 82, 0.2), rgba(7, 12, 42, 0.28));
}

body[data-location="abyssal-archive"] .ocean-stage::before {
  opacity: 0.38;
  background:
    linear-gradient(90deg, transparent 0 14%, rgba(255, 244, 190, 0.16) 14% 15%, transparent 15% 31%, rgba(255, 244, 190, 0.12) 31% 32%, transparent 32%),
    radial-gradient(circle at 78% 22%, rgba(255, 244, 190, 0.42), transparent 9rem),
    linear-gradient(180deg, rgba(20, 33, 42, 0.08), rgba(59, 139, 101, 0.2));
}

body[data-weather="rain"] .ocean-stage::after {
  opacity: 0.36;
  background:
    repeating-linear-gradient(110deg, rgba(255, 255, 255, 0.24) 0 1px, transparent 1px 13px),
    rgba(41, 92, 120, 0.18);
}

body[data-weather="fog"] .ocean-stage::after {
  opacity: 0.42;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.08));
}

body[data-time="night"] .ocean-stage .scene-art {
  filter: saturate(0.84) brightness(0.78);
}

body[data-time="evening"] .ocean-stage .scene-art {
  filter: saturate(1.04) brightness(0.94);
}

.world-scene {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.scene-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.cloud-a {
  animation: cloudDrift 24s ease-in-out infinite alternate;
}

.cloud-b {
  animation: cloudDrift 32s ease-in-out infinite alternate-reverse;
}

.wave-a {
  animation: waveSlide 8s linear infinite;
}

.wave-b {
  animation: waveSlide 12s linear infinite reverse;
}

.boat {
  transform-origin: 450px 190px;
  animation: boatBob 3.8s ease-in-out infinite;
}

.scene-boat-visual-mount,
.scene-rod-visual-mount {
  transform-box: fill-box;
  transform-origin: center;
  pointer-events: none;
}

.boat-visual,
.rod-visual,
.rod-reel {
  transform-box: fill-box;
  transform-origin: center;
}

.boat-visual {
  transition: filter 180ms ease;
}

.rod-visual {
  filter: drop-shadow(0 3px 3px rgba(4, 35, 45, 0.16));
}

.rig-upgrade-pop {
  animation: rigUpgradePop 720ms ease;
}

.scene-avatar-mount {
  pointer-events: none;
}

.scene-avatar-mount .player-avatar {
  filter: drop-shadow(0 7px 7px rgba(4, 35, 45, 0.28));
}

body[data-location="crystal-cavern"] .scene-avatar-mount .player-avatar {
  filter: drop-shadow(0 0 8px rgba(142, 239, 255, 0.7)) drop-shadow(0 7px 7px rgba(4, 35, 45, 0.3));
}

body[data-location="volcanic-reef"] .scene-avatar-mount .player-avatar {
  filter: drop-shadow(0 0 8px rgba(255, 112, 51, 0.52)) drop-shadow(0 7px 7px rgba(10, 6, 6, 0.42));
}

body[data-location="starfall-trench"] .scene-avatar-mount .player-avatar {
  filter: drop-shadow(0 0 9px rgba(133, 255, 242, 0.55)) drop-shadow(0 7px 7px rgba(2, 7, 22, 0.5));
}

body[data-location="abyssal-archive"] .scene-avatar-mount .player-avatar {
  filter: drop-shadow(0 0 8px rgba(198, 168, 90, 0.42)) drop-shadow(0 7px 7px rgba(3, 16, 21, 0.44));
}

.avatar-upper,
.avatar-body-base,
.avatar-clothes-layer,
.avatar-arms-layer,
.avatar-head-group,
.avatar-head-core,
.avatar-hair-layer,
.avatar-hat-layer,
.avatar-glasses-layer,
.avatar-accessory-layer,
.avatar-left-arm,
.avatar-rod-control,
.avatar-rod-arm,
.avatar-aura-ring {
  transform-box: fill-box;
  transform-origin: center;
}

.avatar-upper {
  transform-box: view-box;
  transform-origin: 0 18px;
}

.avatar-rod-control {
  transform-box: view-box;
  transform-origin: 18px -16px;
}

.avatar-held-rod {
  transform-box: view-box;
  transform-origin: 42px -3px;
}

.rod-tip-lag {
  transform-box: fill-box;
  transform-origin: 0% 100%;
}

.avatar-upper {
  animation: avatarBodyIdle 3.2s ease-in-out infinite;
}

.avatar-head-group {
  animation: avatarHeadIdle 3.2s ease-in-out infinite;
}

.avatar-aura-ring {
  animation: avatarAura 2.8s ease-in-out infinite;
}

.bobber-svg {
  animation: bobberFloat 1.8s ease-in-out infinite;
}

.shadow-fish {
  transform-box: fill-box;
  transform-origin: center;
}

.shadow-one {
  animation: fishDrift 11s ease-in-out infinite;
}

.shadow-two {
  animation: fishDrift 9s ease-in-out infinite reverse;
}

.shadow-three {
  animation: fishDrift 13s ease-in-out infinite;
}

.ocean-stage.casting .line-svg {
  animation: castLine 880ms ease-out;
}

.ocean-stage.casting .avatar-rod-control {
  animation: avatarCastArm 880ms ease-out;
}

.ocean-stage.casting .rod-tip-lag {
  animation: rodTipLag 880ms ease-out;
}

.ocean-stage.casting .avatar-upper {
  animation: avatarLeanCast 880ms ease-out;
}

.ocean-stage.hooked .bobber-svg {
  animation: hookedBob 250ms ease-in-out infinite;
}

.ocean-stage.hooked .line-svg {
  stroke-dasharray: 2 3;
  animation: lineShake 170ms ease-in-out infinite;
}

.ocean-stage.hooked .avatar-head-group {
  animation: avatarBiteReact 430ms ease-in-out infinite;
}

.ocean-stage.hooked .avatar-rod-control {
  animation: avatarHookArm 240ms ease-in-out infinite;
}

.ocean-stage.reeling .avatar-upper {
  animation: avatarReelBody 220ms ease-in-out;
}

.ocean-stage.reeling .avatar-rod-control {
  animation: avatarReelArm 220ms ease-in-out;
}

.ocean-stage.caught {
  animation: stageFlash 520ms ease;
}

.ocean-stage.caught .avatar-upper {
  animation: avatarCelebrate 620ms ease;
}

.ocean-stage.caught .avatar-left-arm,
.ocean-stage.caught .avatar-rod-control {
  animation: avatarCheerArm 620ms ease;
}

.ocean-stage.lost {
  animation: lostPulse 520ms ease;
}

.ocean-stage.lost .avatar-upper {
  animation: avatarFail 620ms ease;
}

.ocean-stage.lost .avatar-rod-control {
  animation: avatarFailArm 620ms ease;
}

.stage-overlay {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.25fr);
  gap: 10px;
  align-items: end;
}

.bite-card,
.risk-wrap {
  padding: 12px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(7, 81, 109, 0.18);
}

.bite-card > span {
  display: block;
  margin-bottom: 5px;
  color: var(--teal-dark);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.bite-card strong {
  display: block;
  min-height: 2.45em;
  font-size: clamp(0.98rem, 1.4vw, 1.14rem);
  line-height: 1.22;
}

.status-content {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
}

.status-icon {
  display: grid;
  width: 58px;
  height: 44px;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.14)),
    color-mix(in srgb, var(--teal) 16%, white);
  border: 1px solid rgba(7, 151, 165, 0.18);
  border-radius: 7px;
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.status-icon:not(.empty) {
  animation: iconPop 320ms ease;
}

.status-icon.empty::before {
  width: 34px;
  height: 16px;
  content: "";
  border-top: 3px solid rgba(7, 100, 120, 0.3);
  border-bottom: 3px solid rgba(239, 93, 69, 0.24);
  border-radius: 999px;
}

.phase-meter,
.goal-meter,
.odds-track,
.upgrade-meter {
  position: relative;
  height: 9px;
  overflow: hidden;
  background: rgba(20, 33, 42, 0.09);
  border-radius: 999px;
}

.phase-meter {
  margin-top: 10px;
}

.phase-meter div,
.goal-meter div,
.odds-track div,
.upgrade-meter div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--sun), var(--coral));
  border-radius: inherit;
  transition: width 220ms ease;
}

.risk-wrap {
  display: none;
}

.risk-wrap.visible {
  display: grid;
  gap: 8px;
}

.risk-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.risk-head strong {
  font-size: 0.78rem;
}

.risk-bar {
  position: relative;
  height: 16px;
  overflow: hidden;
  background: rgba(20, 33, 42, 0.1);
  border-radius: 999px;
}

.risk-bar i {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--zone-start, 42%);
  width: var(--zone-width, 16%);
  background: linear-gradient(90deg, rgba(247, 189, 70, 0.62), rgba(59, 139, 101, 0.7));
  box-shadow: 0 0 22px rgba(247, 189, 70, 0.45);
}

#riskMarker {
  position: absolute;
  top: -3px;
  bottom: -3px;
  left: 0;
  width: 5px;
  background: var(--ink);
  border-radius: 999px;
  transform: translateX(-50%);
  transition: left 80ms linear;
}

.risk-wrap small {
  color: var(--muted);
  line-height: 1.25;
}

.action-row {
  display: grid;
  grid-template-columns: 1.65fr 0.86fr 0.9fr;
  gap: 10px;
  margin-top: 12px;
}

.cast-mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

.primary-action,
.secondary-action,
.tab,
.buy-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 15px;
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    opacity 160ms ease;
}

.primary-action {
  color: #fff;
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 16px 30px rgba(4, 100, 120, 0.24);
  min-height: 58px;
  font-size: 1.03rem;
}

.primary-action:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(4, 100, 120, 0.3);
}

.primary-action.reel-now {
  background: linear-gradient(135deg, #e44836, #f7bd46);
  animation: reelPulse 780ms ease-in-out infinite;
}

.secondary-action,
.tab,
.filter-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.world-strip {
  display: grid;
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-stats article {
  padding: 13px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(7, 81, 109, 0.1);
}

.world-strip article {
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 10px 24px rgba(7, 81, 109, 0.1);
}

.quick-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.world-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 1.02rem;
  line-height: 1.16;
}

.mini-meter {
  height: 7px;
  margin-top: 7px;
  overflow: hidden;
  background: rgba(20, 33, 42, 0.1);
  border-radius: 999px;
}

.mini-meter div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--sun));
  border-radius: inherit;
  transition: width 240ms ease;
}

.info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.64fr);
  gap: 14px;
}

.odds-panel,
.goal-panel,
.feed-panel,
.tab-panel {
  padding: 14px;
}

.odds-list {
  display: grid;
  gap: 9px;
}

.odds-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) 64px;
  gap: 9px;
  align-items: center;
}

.odds-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.rarity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 16%, transparent);
}

.odds-value {
  font-size: 0.82rem;
  font-weight: 850;
  text-align: right;
}

.goal-panel p {
  min-height: 3.1em;
  line-height: 1.45;
}

.goal-meter {
  margin-top: 12px;
}

.event-feed {
  display: grid;
  max-height: 178px;
  gap: 7px;
  padding: 0;
  margin: 0;
  overflow: auto;
  list-style: none;
}

.event-feed li {
  display: flex;
  gap: 8px;
  align-items: baseline;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(20, 33, 42, 0.08);
  border-radius: 7px;
  animation: feedIn 240ms ease;
}

.event-feed li.with-icon {
  align-items: center;
}

.event-feed time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
}

.event-fish-icon {
  display: grid;
  width: 42px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 33, 42, 0.08);
  border-radius: 6px;
}

.event-feed strong {
  font-weight: 850;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.tab {
  min-height: 44px;
}

.tab.active {
  color: #fff;
  background: var(--ink);
}

.tab-panel {
  display: none;
  min-height: 620px;
}

.tab-panel.active {
  display: block;
}

@media (min-width: 1081px) {
  .play-column,
  .side-column {
    max-height: calc(100vh - 124px);
    padding-right: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(7, 100, 120, 0.42) transparent;
  }

  .side-column {
    position: sticky;
    top: 14px;
  }
}

.shop-list,
.inventory-list,
.collection-list,
.bank-list,
.location-list,
.trade-list,
.avatar-option-list,
.achievement-list {
  display: grid;
  gap: 10px;
}

.shop-card {
  position: relative;
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.shop-card:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 151, 165, 0.3);
  box-shadow: 0 12px 26px rgba(7, 81, 109, 0.12);
}

.shop-card.bought {
  animation: buyPop 450ms ease;
}

.shop-title-row,
.shop-bottom,
.inventory-title,
.collection-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.shop-title {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.shop-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--teal-dark), var(--kelp));
  border-radius: 7px;
}

.shop-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.shop-title h3,
.inventory-card h3,
.collection-card h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.1;
}

.shop-card p,
.collection-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.38;
}

.shop-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.shop-meta span {
  padding: 5px 7px;
  background: rgba(20, 33, 42, 0.06);
  border-radius: 6px;
}

.buy-button {
  min-width: 118px;
  min-height: 40px;
  color: #fff;
  background: var(--teal-dark);
  border: 0;
  border-radius: 7px;
}

.buy-button.affordable {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
}

.buy-button.maxed {
  color: var(--ink);
  background: rgba(20, 33, 42, 0.08);
}

.avatar-preview-card {
  display: grid;
  grid-template-columns: minmax(180px, 0.82fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 14px;
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 247, 194, 0.5), transparent 7rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(232, 249, 250, 0.72)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(7, 151, 165, 0.22);
  border-radius: var(--radius);
  box-shadow: 0 16px 34px rgba(7, 81, 109, 0.1);
}

.avatar-preview-water {
  min-height: 220px;
  overflow: hidden;
  border: 1px solid rgba(7, 100, 120, 0.2);
  border-radius: 8px;
  background: #8eced8;
  box-shadow:
    inset 0 -24px 40px rgba(7, 81, 109, 0.18),
    0 10px 24px rgba(7, 81, 109, 0.12);
}

.avatar-preview-svg {
  width: 100%;
  height: 100%;
  min-height: 220px;
  display: block;
}

.avatar-preview-copy {
  display: grid;
  gap: 7px;
  align-content: center;
}

.avatar-preview-copy span {
  color: var(--teal-dark);
  font-size: 0.73rem;
  font-weight: 850;
  text-transform: uppercase;
}

.avatar-preview-copy strong {
  font-size: 1.18rem;
  line-height: 1.1;
}

.avatar-preview-copy p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.avatar-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

#avatarCategoryControls {
  grid-template-columns: repeat(auto-fit, minmax(94px, 1fr));
  padding: 6px;
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid rgba(20, 33, 42, 0.08);
  border-radius: var(--radius);
}

.avatar-preset-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.avatar-preset-button {
  min-height: 78px;
  padding: 10px;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(232, 249, 250, 0.64)),
    rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 33, 42, 0.1);
  border-radius: 8px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.avatar-preset-button:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 151, 165, 0.3);
  box-shadow: 0 10px 22px rgba(7, 81, 109, 0.1);
}

.avatar-preset-button.active {
  border-color: rgba(247, 189, 70, 0.72);
  box-shadow:
    inset 0 0 0 1px rgba(247, 189, 70, 0.32),
    0 10px 22px rgba(247, 189, 70, 0.12);
}

.avatar-preset-button.locked {
  opacity: 0.72;
}

.avatar-preset-button span,
.avatar-preset-button em {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 820;
  text-transform: uppercase;
}

.avatar-preset-button strong {
  display: block;
  margin: 4px 0;
  font-size: 0.93rem;
  line-height: 1.05;
}

.filter-button.has-new {
  border-color: rgba(247, 189, 70, 0.7);
  box-shadow: inset 0 0 0 1px rgba(247, 189, 70, 0.28);
}

.avatar-option-list {
  margin-top: 12px;
}

.cosmetic-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(247, 252, 252, 0.62)),
    rgba(255, 255, 255, 0.72);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.cosmetic-card:hover {
  transform: translateY(-1px);
  border-color: rgba(7, 151, 165, 0.28);
  box-shadow: 0 12px 26px rgba(7, 81, 109, 0.11);
}

.cosmetic-card.locked {
  opacity: 0.68;
}

.cosmetic-card.selected {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(247, 189, 70, 0.18)),
    rgba(255, 255, 255, 0.72);
  border-color: rgba(247, 189, 70, 0.58);
  box-shadow:
    inset 0 0 0 1px rgba(247, 189, 70, 0.28),
    0 12px 26px rgba(247, 189, 70, 0.11);
}

.cosmetic-card.new::before {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  content: "";
  background: var(--sun);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(247, 189, 70, 0.72);
}

.cosmetic-card {
  position: relative;
}

.cosmetic-title-row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.cosmetic-title-row h3 {
  margin: 0;
  font-size: 0.95rem;
}

.cosmetic-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.cosmetic-swatch {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.86), transparent 1.7rem),
    rgba(20, 33, 42, 0.06);
  border: 1px solid rgba(20, 33, 42, 0.08);
  border-radius: 10px;
}

.cosmetic-swatch-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.skin-swatch,
.eye-swatch,
.cosmetic-mini {
  display: block;
  width: 34px;
  height: 34px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  box-shadow: 0 6px 12px rgba(20, 33, 42, 0.12);
}

.eye-swatch {
  position: relative;
  background: #fff;
}

.eye-swatch::before,
.eye-swatch::after {
  position: absolute;
  top: 13px;
  width: 6px;
  height: 6px;
  content: "";
  background: var(--eye-color);
  border-radius: 50%;
}

.eye-swatch::before {
  left: 8px;
}

.eye-swatch::after {
  right: 8px;
}

.cosmetic-mini {
  display: grid;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(135deg, var(--mini-primary) 0 52%, var(--mini-accent) 52% 100%);
  border-radius: 9px;
  font-size: 0.58rem;
  font-weight: 850;
}

.inventory-card,
.collection-card {
  padding: 11px;
  background: rgba(255, 255, 255, 0.68);
}

.inventory-card {
  animation: cardIn 220ms ease;
}

.inventory-card.variant-shiny {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(255, 247, 211, 0.82)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(212, 164, 17, 0.42);
}

.inventory-card.variant-mutated {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.7), rgba(236, 63, 164, 0.13)),
    rgba(255, 255, 255, 0.68);
  border-color: rgba(236, 63, 164, 0.42);
}

.variant-chip {
  color: #805f06;
  background: rgba(247, 189, 70, 0.18);
}

.variant-chip.mutated {
  color: #9d236c;
  background: rgba(236, 63, 164, 0.13);
}

.fish-card-main {
  display: flex;
  min-width: 0;
  gap: 10px;
  align-items: center;
}

.fish-icon {
  display: grid;
  width: 58px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.9), transparent 16px),
    color-mix(in srgb, var(--rarity-color, var(--teal)) 14%, white);
  border: 1px solid color-mix(in srgb, var(--rarity-color, var(--teal)) 26%, transparent);
  border-radius: 7px;
  box-shadow: inset 0 -8px 16px rgba(7, 81, 109, 0.08);
}

.fish-icon.locked-icon {
  background: rgba(20, 33, 42, 0.08);
  border-color: rgba(20, 33, 42, 0.12);
}

.fish-icon-svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.fish-icon-art {
  transform-origin: 50% 50%;
}

.inventory-card:hover .fish-icon-art,
.collection-card:hover .fish-icon-art {
  animation: fishWiggle 780ms ease;
}

.inventory-card h3,
.collection-card h3 {
  color: var(--rarity-color, var(--ink));
}

.inventory-value {
  font-weight: 900;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 255, 255, 0.56);
  border: 1px dashed rgba(20, 33, 42, 0.18);
  border-radius: var(--radius);
}

.collection-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.scope-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.filter-button {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.82rem;
}

.filter-button.active {
  color: #fff;
  background: var(--ink);
}

#riskyCastButton.active {
  background: linear-gradient(135deg, #9d2e24, var(--coral));
}

.collection-card.locked {
  filter: saturate(0.35);
  opacity: 0.68;
}

.collection-card.completed {
  border-color: color-mix(in srgb, var(--rarity-color, var(--teal)) 46%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rarity-color, var(--teal)) 22%, transparent);
}

.location-card,
.trade-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.location-card.current {
  border-color: rgba(7, 151, 165, 0.42);
  background: rgba(235, 251, 249, 0.82);
}

.location-card.locked,
.trade-card.locked {
  filter: saturate(0.45);
  opacity: 0.7;
}

.location-card h3,
.trade-card h3,
.achievement-card strong {
  display: block;
  margin: 0 0 5px;
  font-size: 0.98rem;
}

.location-card p,
.trade-card p,
.achievement-card p,
.passive-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.36;
}

.achievement-block {
  margin-top: 14px;
}

.achievement-card {
  padding: 10px;
  background: rgba(255, 255, 255, 0.58);
}

.achievement-card.earned {
  border-color: rgba(212, 164, 17, 0.45);
  background: rgba(255, 247, 211, 0.7);
}

.passive-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.68);
}

.passive-card strong {
  display: block;
  margin: 4px 0;
  font-size: 1.35rem;
}

.passive-upgrade-list {
  display: grid;
  gap: 10px;
}

.passive-upgrade-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.passive-upgrade-card h3 {
  margin: 3px 0 5px;
  font-size: 1rem;
}

.passive-upgrade-card p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.36;
}

.collection-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.collection-stats span {
  padding: 5px 7px;
  background: rgba(20, 33, 42, 0.06);
  border-radius: 6px;
}

.rarity-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  padding: 5px 8px;
  color: var(--rarity-color, var(--ink));
  background: color-mix(in srgb, var(--rarity-color, var(--ink)) 14%, white);
  border: 1px solid color-mix(in srgb, var(--rarity-color, var(--ink)) 28%, transparent);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.burst-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.spark {
  position: absolute;
  width: 9px;
  height: 9px;
  background: var(--spark-color, #fff);
  border-radius: 50%;
  box-shadow: 0 0 18px var(--spark-color, #fff);
  animation: sparkFly 760ms ease-out forwards;
}

.settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 25, 31, 0.46);
  backdrop-filter: blur(10px);
}

.settings-overlay[hidden] {
  display: none;
}

.settings-panel {
  width: min(720px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 250, 0.94)),
    var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: var(--radius);
  box-shadow: 0 30px 90px rgba(6, 30, 37, 0.34);
  animation: modalIn 180ms ease;
}

.settings-head,
.settings-section-head,
.settings-actions,
.account-mode-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-head {
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.settings-content {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.settings-section {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.settings-section-head {
  justify-content: space-between;
  margin-bottom: 12px;
}

.settings-section-head span,
.settings-field span,
.settings-toggle span,
.settings-range > span,
.account-form span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  text-transform: uppercase;
}

.settings-section-head strong {
  display: block;
  margin-top: 3px;
  font-size: 1.05rem;
}

.settings-chip {
  max-width: 230px;
  padding: 6px 9px;
  overflow: hidden;
  color: var(--teal-dark);
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(7, 151, 165, 0.1);
  border-radius: 999px;
}

.account-mode-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 10px;
}

.account-form,
.settings-field,
.settings-range {
  display: grid;
  gap: 6px;
}

.account-form {
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  margin-bottom: 10px;
}

.settings-field {
  margin-bottom: 10px;
}

.account-form input,
.settings-field input {
  min-height: 40px;
  width: 100%;
  padding: 8px 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.account-form input:focus,
.settings-field input:focus {
  border-color: rgba(7, 151, 165, 0.56);
  box-shadow: 0 0 0 3px rgba(7, 151, 165, 0.12);
}

.settings-actions {
  flex-wrap: wrap;
}

.settings-actions .buy-button {
  min-width: 130px;
}

.settings-message {
  min-height: 20px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.settings-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
}

.settings-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal-dark);
}

.settings-range {
  margin-top: 10px;
}

.settings-range > span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.settings-range input {
  width: 100%;
  accent-color: var(--teal-dark);
}

.danger-button {
  color: #fff;
  background: linear-gradient(135deg, #9d2e24, var(--coral));
}

body.reduce-animations *,
body.reduce-animations *::before,
body.reduce-animations *::after {
  transition-duration: 1ms !important;
  animation-duration: 1ms !important;
  animation-iteration-count: 1 !important;
}

.toast-root {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100% - 36px));
}

.toast {
  padding: 12px 14px;
  color: #fff;
  background: rgba(20, 33, 42, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  box-shadow: 0 18px 50px rgba(8, 45, 57, 0.24);
  animation: toastIn 220ms ease;
}

.toast.with-icon {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.toast-fish-icon {
  display: grid;
  width: 58px;
  height: 44px;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
}

.toast strong {
  color: var(--toast-color, #fff);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes cloudDrift {
  to {
    transform: translateX(34px);
  }
}

@keyframes waveSlide {
  to {
    transform: translateX(-70px);
  }
}

@keyframes boatBob {
  0%,
  100% {
    transform: translateY(0) rotate(-0.6deg);
  }
  50% {
    transform: translateY(9px) rotate(0.7deg);
  }
}

@keyframes bobberFloat {
  0%,
  100% {
    transform: translateY(-3px);
  }
  50% {
    transform: translateY(7px);
  }
}

@keyframes fishDrift {
  0%,
  100% {
    transform: translateX(-22px);
  }
  50% {
    transform: translateX(32px) translateY(-8px);
  }
}

@keyframes fishWiggle {
  0%,
  100% {
    transform: translateX(0) rotate(0deg);
  }
  35% {
    transform: translateX(3px) rotate(2deg);
  }
  70% {
    transform: translateX(-2px) rotate(-1deg);
  }
}

@keyframes iconPop {
  45% {
    transform: scale(1.08);
  }
}

@keyframes castLine {
  from {
    stroke-dashoffset: 80;
    opacity: 0.2;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

@keyframes hookedBob {
  0%,
  100% {
    transform: translateY(-12px);
  }
  50% {
    transform: translateY(15px);
  }
}

@keyframes lineShake {
  0%,
  100% {
    transform: translateX(-2px);
  }
  50% {
    transform: translateX(3px);
  }
}

@keyframes avatarBodyIdle {
  50% {
    transform: translateY(-1.5px) rotate(-0.8deg);
  }
}

@keyframes avatarHeadIdle {
  50% {
    transform: translateY(-1.4px) rotate(-0.7deg);
  }
}

@keyframes avatarAura {
  50% {
    opacity: 0.7;
    transform: scale(1.08);
  }
}

@keyframes avatarCastArm {
  0% {
    transform: rotate(0deg) translateY(0);
  }
  42% {
    transform: rotate(-34deg) translate(-5px, -7px);
  }
  100% {
    transform: rotate(12deg) translate(4px, 2px);
  }
}

@keyframes rodTipLag {
  0%,
  100% {
    transform: rotate(0deg);
  }
  42% {
    transform: rotate(5deg) translateY(1px);
  }
  72% {
    transform: rotate(-7deg) translateY(-1px);
  }
}

@keyframes avatarLeanCast {
  45% {
    transform: rotate(-4deg) translateX(-3px);
  }
  100% {
    transform: rotate(2deg) translateX(2px);
  }
}

@keyframes avatarBiteReact {
  50% {
    transform: translateY(-5px) rotate(4deg);
  }
}

@keyframes avatarHookArm {
  50% {
    transform: rotate(8deg) translate(3px, 2px);
  }
}

@keyframes avatarReelBody {
  50% {
    transform: rotate(-7deg) translate(-5px, 2px);
  }
}

@keyframes avatarReelArm {
  50% {
    transform: rotate(18deg) translate(-4px, 4px);
  }
}

@keyframes avatarCelebrate {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-11px) rotate(-4deg);
  }
}

@keyframes avatarCheerArm {
  45% {
    transform: rotate(-65deg) translate(-7px, -11px);
  }
}

@keyframes avatarFail {
  45% {
    transform: translateY(7px) rotate(5deg);
  }
}

@keyframes avatarFailArm {
  45% {
    transform: rotate(38deg) translate(5px, 7px);
  }
}

@keyframes rigUpgradePop {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(247, 189, 70, 0));
    transform: scale(1);
  }
  42% {
    filter: drop-shadow(0 0 16px rgba(247, 189, 70, 0.85));
    transform: scale(1.045);
  }
}

@keyframes stageFlash {
  0%,
  100% {
    box-shadow: none;
  }
  45% {
    box-shadow: inset 0 0 0 999px rgba(255, 247, 211, 0.28);
  }
}

@keyframes lostPulse {
  45% {
    box-shadow: inset 0 0 0 999px rgba(239, 93, 69, 0.22);
  }
}

@keyframes reelPulse {
  50% {
    transform: translateY(-2px) scale(1.015);
  }
}

@keyframes feedIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.gull {
  animation: gullDrift 9s ease-in-out infinite;
}

.gull-b {
  animation-duration: 12s;
  animation-delay: -3s;
}

.sunny-sun {
  animation: sunGlow 5s ease-in-out infinite;
}

.mist {
  animation: mistSlide 7s ease-in-out infinite alternate;
}

.crystal-spark,
.star,
.archive-mote {
  transform-origin: center;
  animation: twinkle 2.8s ease-in-out infinite;
}

.spark-b,
.star-c,
.mote-b {
  animation-delay: -1s;
}

.spark-c,
.star-e,
.mote-c {
  animation-delay: -1.8s;
}

.steam {
  animation: steamRise 4.4s ease-in-out infinite;
}

.steam-b {
  animation-delay: -1.4s;
}

.ember {
  animation: emberFloat 3.8s ease-in-out infinite;
}

.ember-b {
  animation-delay: -1.1s;
}

.ember-c {
  animation-delay: -2.1s;
}

.lava-crack {
  animation: lavaPulse 1.9s ease-in-out infinite;
}

.nebula-swirl {
  animation: nebulaDrift 12s ease-in-out infinite alternate;
}

.archive-mote {
  animation-name: moteFloat;
  animation-duration: 5s;
}

@keyframes buyPop {
  50% {
    transform: scale(1.015);
    border-color: rgba(247, 189, 70, 0.8);
  }
}

@keyframes gullDrift {
  50% {
    transform: translateX(18px) translateY(-5px);
  }
}

@keyframes sunGlow {
  50% {
    opacity: 0.78;
    transform: scale(1.05);
  }
}

@keyframes mistSlide {
  to {
    transform: translateX(32px);
    opacity: 0.34;
  }
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.36;
    transform: scale(0.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

@keyframes steamRise {
  0%,
  100% {
    opacity: 0.14;
    transform: translateY(12px);
  }
  50% {
    opacity: 0.34;
    transform: translateY(-12px);
  }
}

@keyframes emberFloat {
  50% {
    opacity: 0.42;
    transform: translateY(-22px) translateX(8px);
  }
}

@keyframes lavaPulse {
  50% {
    opacity: 1;
    stroke-width: 7px;
  }
}

@keyframes nebulaDrift {
  to {
    transform: translateX(-28px) translateY(10px) scale(1.05);
  }
}

@keyframes moteFloat {
  0%,
  100% {
    opacity: 0.34;
    transform: translateY(14px);
  }
  50% {
    opacity: 0.95;
    transform: translateY(-14px);
  }
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes sparkFly {
  to {
    opacity: 0;
    transform: translate(var(--spark-x), var(--spark-y)) scale(0.2);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

@media (max-width: 1080px) {
  .game-layout {
    grid-template-columns: 1fr;
  }

  .tab-panel {
    min-height: auto;
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 18px, 1500px);
    padding-top: 12px;
  }

  .topbar,
  .panel-head,
  .shop-title-row,
  .shop-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .top-actions,
  .action-row,
  .quick-stats,
  .world-strip,
  .info-grid,
  .stage-overlay {
    grid-template-columns: 1fr;
  }

  .top-actions {
    display: grid;
    grid-template-columns: 1fr 46px 46px;
  }

  .ocean-stage {
    min-height: 330px;
  }

  .stage-overlay {
    align-items: stretch;
  }

  .odds-row {
    grid-template-columns: 96px minmax(0, 1fr) 54px;
  }

  .location-card,
  .trade-card,
  .passive-card,
  .passive-upgrade-card,
  .avatar-preview-card,
  .cosmetic-card,
  .cast-mode-toggle {
    grid-template-columns: 1fr;
  }

  .avatar-actions {
    grid-template-columns: 1fr;
  }

  .account-form {
    grid-template-columns: 1fr;
  }

  .settings-panel {
    max-height: calc(100vh - 18px);
  }
}
