/* A · Reel deck. Painting stays at its original aspect ratio; live text and
   touch targets remain independent of the generated transparent artwork. */
#app .lake-shell {
  --hud-gutter: 22px;
  --hud-bottom: max(20px, env(safe-area-inset-bottom));
  --reel-size: clamp(190px, 24vw, 244px);
  --tackle-width: clamp(330px, 36vw, 410px);
  --fight-width: 290px;
  --nav-size: 60px;
  --hud-ink: #093c50;
  --hud-white: #fff9e5;
}
#app .scene-shade { background: linear-gradient(180deg, #064f732a, transparent 23%, transparent 70%, #053f5920); }
#app .topbar {
  top: max(13px, env(safe-area-inset-top));
  left: max(var(--hud-gutter), env(safe-area-inset-left));
  right: max(var(--hud-gutter), env(safe-area-inset-right));
  min-height: 62px;
  gap: 18px;
  align-items: center;
}
#app .lake-identity { display: flex; position: relative; min-width: 0; gap: 13px; align-items: center; }
#app .brand { display: block; flex: none; line-height: 0; filter: drop-shadow(0 3px 2px #03475c40); }
#app .hud-logo-art { display: block; width: 184px; height: 68px; background: url('./assets/ui/hud-logo-v17.webp') center / contain no-repeat; }
#app #map-open {
  position: static;
  display: flex;
  min-height: 40px;
  height: auto;
  padding: 0 0 0 13px;
  gap: 7px;
  border: 0;
  border-left: 1px solid #fff8dbaa;
  border-image: none;
  border-radius: 0;
  background: none;
  color: #fffbed;
  box-shadow: none;
  text-shadow: 0 1px 3px #105066;
}
#app #map-open .weather-sun { color: #ffda64; font-size: 26px; }
#app #map-open b { font-size: 16px; font-weight: 800; }
#app #map-open small { display: none; }
#app .header-actions { gap: 10px; padding: 0; align-items: center; flex: none; }
#app .coin-badge {
  min-width: 98px;
  height: 39px;
  padding: 0 14px 0 38px;
  border: 1px solid #80cfe655;
  border-image: none;
  border-radius: 25px;
  background: #074760dc;
  box-shadow: inset 0 1px 0 #a6eeed30;
  color: #fffbed;
}
#app .coin-badge > [data-ui-icon] { top: -5px; left: -7px; }
#app .coin-badge .ui-sprite { width: 48px; height: 48px; }
#app .coin-badge b { font-size: 23px; line-height: 1; }
#app .header-actions .round-tool {
  width: 47px;
  min-width: 47px;
  height: 47px;
  padding: 8px;
  border: 1.5px solid #9ee8efb3;
  border-image: none;
  border-radius: 50%;
  background: #07506ddc;
  box-shadow: inset 0 2px 2px #b4f6ff1a, 0 2px 4px #003f5c30;
  color: #fffcef;
}
#app .header-actions .round-tool .ui-sprite { width: 29px; height: 29px; }
#app #pause-open { font-family: var(--font); font-size: 24px; font-weight: 900; line-height: 1; }
#app #sound-toggle { display: none; }
#app .spot-tabs {
  top: 98px;
  left: 50%;
  right: auto;
  width: min(640px, calc(100% - 60px));
  transform: translateX(-50%);
  gap: 10px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
#app .spot-tabs button {
  position: relative;
  isolation: isolate;
  display: flex;
  flex: 1;
  min-width: 0;
  height: 66px;
  padding: 0 13px 8px;
  gap: 8px;
  border: 0;
  border-image: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: #b7f0f2;
  text-shadow: none;
  filter: drop-shadow(0 3px 2px #043a4c33);
}
#app .spot-tabs button::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  background: url('./assets/ui/flag-idle-v17.webp') center / contain no-repeat;
}
#app .spot-tabs button.active { color: var(--hud-ink); background: none; filter: drop-shadow(0 4px 3px #043a4c45); }
#app .spot-tabs button.active::before { background-image: url('./assets/ui/flag-active-v17.webp'); }
#app .spot-tabs button::after { content: ''; flex: none; order: -1; width: 12px; height: 15px; background: currentColor; clip-path: polygon(50% 100%, 8% 45%, 8% 22%, 23% 5%, 50% 0, 78% 5%, 93% 22%, 93% 45%); }
#app .spot-number { display: none; }
#app .spot-copy { display: block; }
#app .spot-copy b { font-size: 17px; font-weight: 800; line-height: 1.2; }
#app .spot-copy small { display: none; }
#app .lake-nav { top: 192px; left: var(--hud-gutter); display: flex; flex-direction: column; gap: 6px; }
#app .nav-medallion {
  position: relative;
  width: var(--nav-size);
  height: calc(var(--nav-size) + 17px);
  background: none;
  filter: drop-shadow(0 3px 3px #05334d45);
}
#app .nav-medallion > [data-ui-icon] { position: relative; width: var(--nav-size); height: var(--nav-size); display: block; }
#app .nav-medallion > [data-ui-icon]::before { content: ''; position: absolute; inset: 0; background: var(--nav-art) center / contain no-repeat; }
#app .nav-medallion > [data-ui-icon] .ui-sprite,
#app .nav-medallion > [data-ui-icon] .world-sprite { visibility: hidden; }
#app #aquarium-open { --nav-art: url('./assets/ui/nav-aquarium-v17.webp'); }
#app #creel-open { --nav-art: url('./assets/ui/nav-creel-v17.webp'); }
#app #journal-open { --nav-art: url('./assets/ui/nav-journal-v17.webp'); }
#app #shop-open { --nav-art: url('./assets/ui/nav-shop-v17.webp'); }
#app #travel-open { --nav-art: url('./assets/ui/nav-travel-v17.webp'); }
#app .nav-caption {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 26px;
  min-height: 26px;
  margin-top: -9px;
  padding: 1px 2px 3px;
  border: 1px solid #8fdde49c;
  border-image: none;
  border-radius: 16px;
  background: #064b66e8;
  box-shadow: none;
  color: #fffbea;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
#app .nav-count { top: 0; right: -1px; min-width: 19px; height: 19px; padding: 0 4px; line-height: 15px; font-size: 10px; border: 2px solid #fffae9; background: #ff7858; }
#app .quest-card.paper-frame {
  top: 187px;
  bottom: auto;
  right: var(--hud-gutter);
  width: 242px;
  height: 102px;
  min-height: 0;
  padding: 15px 25px 15px 17px;
  gap: 10px;
  border: 0;
  border-image: none;
  border-radius: 0;
  background: url('./assets/ui/note-frame-v17.webp') center / contain no-repeat;
  color: var(--hud-ink);
  box-shadow: none;
  filter: drop-shadow(0 3px 4px #0e53664a);
}
#app .quest-card::after { content: '›'; position: absolute; right: 14px; top: 34px; color: #0c526b; font-size: 25px; font-weight: 800; }
#app .hud-npc { width: 44px; height: 52px; flex: 0 0 44px; border-radius: 19px 19px 9px 9px; background: #b4d9d5; }
#app .story-hud-copy { gap: 3px; }
#app .story-hud-copy strong { font-size: 13px; line-height: 1.35; }
#app .story-hud-copy small { font-size: 10px; line-height: 1.3; color: #517474; }
#app .current-tackle.panel-frame {
  left: var(--hud-gutter);
  right: auto;
  bottom: var(--hud-bottom);
  width: var(--tackle-width);
  aspect-ratio: 750 / 423;
  padding: 0;
  border: 0;
  border-image: none;
  border-radius: 0;
  background: url('./assets/ui/tackle-frame-v17.webp') center / contain no-repeat;
  color: var(--hud-white);
  box-shadow: none;
  filter: drop-shadow(0 4px 5px #08394e50);
  container-type: inline-size;
}
#app .tray-heading { position: absolute; left: 8%; top: 11%; width: 83%; height: 20%; min-height: 24px; margin: 0; padding: 0; color: var(--hud-white); font-size: 15px; letter-spacing: .04em; }
#app .tray-heading > span:first-child::before { display: none; }
#app .tray-swap { background: transparent; box-shadow: none; width: 27px; height: 27px; }
#app .tray-swap .ui-sprite { width: 22px; height: 22px; }
#app .tackle-hotbar { position: absolute; top: 34%; left: 7%; width: 85%; height: 44%; display: grid; grid-template-columns: 1.2fr 1fr .9fr; gap: 0; }
#app .hotbar-card.paper-frame {
  height: 100%;
  padding: 2px 4px 4px;
  border: 0;
  border-right: 1px solid #2f788b3b;
  border-image: none;
  border-radius: 0;
  background: none;
  box-shadow: none;
  color: var(--hud-ink);
}
#app .hotbar-card:last-child { border-right: 0; }
#app .hotbar-card::after { display: none; }
#app .hotbar-card:hover:not(:disabled) { background: #ffffff36; box-shadow: none; transform: translateY(-1px); }
#app .hotbar-card b { width: 100%; font-size: 12px; line-height: 1.3; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#app .hotbar-art { flex: 1; padding: 0; min-height: 0; }
#app .hotbar-art .rod-paint { width: 100%; height: 100%; max-width: 100%; aspect-ratio: 2; }
#app .hotbar-art .ui-sprite,
#app .hotbar-art .world-sprite { width: 48px; height: 48px; }
#app .supplies-status { position: absolute; left: 7%; bottom: 5%; width: 85%; height: 15%; min-height: 24px; padding: 1px 0; text-align: center; color: #e3f8f1; font-size: 11px; font-weight: 700; line-height: 1.3; }
#app .cast-group,
#app .cast-group:has(.rod-controls:not([hidden])) {
  left: auto;
  right: var(--hud-gutter);
  bottom: var(--hud-bottom);
  width: var(--reel-size);
  transform: none;
}
#app #cast-button {
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-image: none;
  border-radius: 50%;
  background: none;
  box-shadow: none;
  color: var(--hud-white);
  filter: drop-shadow(0 5px 4px #07374760);
  overflow: visible;
  touch-action: none;
  transition: transform .14s ease, filter .14s ease;
}
#app #cast-button::before,
#app #cast-button::after { content: none; display: none; }
#app #cast-button .reel-base { position: absolute; inset: 0; background: url('./assets/ui/reel-base-v17.webp') center / contain no-repeat; pointer-events: none; }
#app #cast-button .reel-handle { position: absolute; z-index: 3; top: 56%; left: 75%; width: 33%; height: 28%; background: url('./assets/ui/reel-handle-v17.webp') center / contain no-repeat; transform-origin: 15% 18%; pointer-events: none; }
#app #cast-button .reel-ripple { position: absolute; inset: 12%; border: 2px solid #b9f7ed00; border-radius: 50%; pointer-events: none; }
#app #cast-label { position: absolute; z-index: 4; top: 56%; left: 17%; width: 63%; color: #fff7df; font-size: clamp(24px, 3.2vw, 38px); font-family: var(--font); font-weight: 900; line-height: 1.14; letter-spacing: .015em; text-align: center; text-shadow: 0 2px 1px #b74931; transform: none; }
#app #cast-button[data-phase='waiting'] #cast-label,
#app #cast-button[data-phase='fighting'] #cast-label,
#app #cast-button[data-phase='escaped'] #cast-label { font-size: clamp(17px, 2.5vw, 28px); }
#app #cast-button[data-long-label='true'] #cast-label { font-size: clamp(15px, 2.1vw, 24px); }
#app .reel-caption { position: absolute; z-index: 4; top: 75%; left: 18%; width: 61%; font-size: 10px; line-height: 1.2; font-weight: 700; letter-spacing: .08em; pointer-events: none; }
#app #cast-icon { display: none; }
#app #cast-button:disabled { opacity: 1; cursor: default; }
#app #cast-button:disabled .reel-base { filter: saturate(.85); }
#app #cast-button:hover:not(:disabled) { filter: brightness(1.06) drop-shadow(0 5px 5px #06344760); }
#app #cast-button:active:not(:disabled),
#app #cast-button.reeling { transform: translateY(2px) scale(.97); }
#app .cast-group .round-banner { position: absolute; bottom: calc(100% + 11px); left: -28%; width: 150%; min-height: 0; margin: 0; padding: 0 7px; gap: 0; background: none; color: #fffcec; text-shadow: 0 1px 3px #09485b, 0 2px 5px #09485b; font-size: 12px; line-height: 1.5; }
#app .cast-group .round-banner.fighting { display: none; }
#app .cast-group .action-footer { position: absolute; top: 100%; width: 100%; margin: 1px 0 0; }
#app #action-hint { font-size: 9px; line-height: 1.2; white-space: normal; }
#app .key-hint { display: none; }
#app .rod-controls { position: absolute; right: calc(100% + 18px); bottom: 0; width: var(--fight-width); gap: 8px; margin: 0; }
#app .rod-controls button { min-height: 44px; border: 1px solid #8ddbdf; border-radius: 18px; background: #07516de8; color: #fff9df; font-size: 12px; box-shadow: 0 3px 0 #06394cc7; }
#app .rod-controls button.active { color: #163e47; background: #ffe3a4; border-color: #fff5cf; }
#app .rod-controls small { display: none; }
#app #fight-panel {
  top: auto;
  left: auto;
  right: calc(var(--hud-gutter) + var(--reel-size) + 18px);
  bottom: calc(var(--hud-bottom) + 58px);
  width: var(--fight-width);
  padding: 13px;
  border: 1px solid #8dd9dbb0;
  border-image: none;
  border-radius: 19px;
  background: #073f55ed;
  color: #fff9e5;
  box-shadow: 0 4px 12px #03334940;
  transform: none;
  filter: none;
}
#app .lake-shell:has(#fight-panel:not([hidden])) .current-tackle { display: none; }
#app #fight-panel .fight-profile { display: block; font-size: 9px; line-height: 1.4; margin-bottom: 6px; color: #bfdee1; }
#app #fight-panel .fight-top { margin-bottom: 7px; font-size: 11px; }
#app #fight-panel .fight-top strong { font-size: 21px; }
#app #fight-panel .tension-label { font-size: 10px; margin-bottom: 5px; }
#app #fight-panel .tension-track { height: 12px; }
#app #fight-panel .tension-scale { display: flex; font-size: 8px; margin-top: 4px; }
#app #fight-panel .grip-row { margin-top: 9px; font-size: 10px; gap: 8px; }
#app #fight-panel .fight-cue { font-size: 11px; line-height: 1.5; margin: 7px 0 0; }
#app #fight-panel .behavior-track { display: block; margin-top: 6px; }
#app #fight-panel .fight-warning { font-size: 10px; line-height: 1.4; margin-top: 5px; }
#app #fight-panel .stamina-row { display: flex; font-size: 9px; margin-top: 7px; }
#app #fight-panel[data-quality='overload'] { border-color: #ff9975; box-shadow: 0 0 0 2px #ff9a6840; }

@media (max-width: 760px) {
  #app .lake-shell { --hud-gutter: 12px; --hud-bottom: max(24px, env(safe-area-inset-bottom)); --reel-size: clamp(126px, 33vw, 214px); --tackle-width: calc(100% - var(--reel-size) - 31px); --fight-width: calc(100vw - var(--reel-size) - 42px); --nav-size: 58px; }
  #app .topbar { min-height: 58px; gap: 8px; align-items: flex-start; }
  #app .lake-identity { display: block; flex: 1; }
  #app .hud-logo-art { width: clamp(113px, 28vw, 164px); height: 48px; background-position: left center; }
  #app #map-open { position: relative; padding: 0 0 0 8px; border: 0; min-height: 24px; gap: 5px; }
  #app #map-open::before { content: ''; position: absolute; inset: -10px -8px; }
  #app #map-open .weather-sun { font-size: 16px; }
  #app #map-open b { font-size: 11px; }
  #app .header-actions { gap: 7px; padding-top: 7px; }
  #app .coin-badge { min-width: 80px; height: 34px; padding-left: 30px; padding-right: 10px; }
  #app .coin-badge b { font-size: 20px; }
  #app .coin-badge > [data-ui-icon] { top: -5px; left: -9px; }
  #app .coin-badge .ui-sprite { width: 44px; height: 44px; }
  #app .header-actions .round-tool { width: 44px; height: 44px; min-width: 44px; padding: 7px; }
  #app #pause-open { font-size: 22px; }
  #app .spot-tabs { top: 88px; width: calc(100% - 20px); gap: 3px; }
  #app .spot-tabs button { height: clamp(46px, 10vw, 62px); padding: 0 6px 5px; gap: 5px; }
  #app .spot-copy b { font-size: 13px; }
  #app .spot-tabs button::after { width: 9px; height: 12px; }
  #app .lake-nav { top: 166px; gap: 9px; }
  #app .quest-card.paper-frame { top: 159px; width: 195px; height: 82px; padding: 10px 23px 10px 14px; gap: 7px; }
  #app .quest-card::after { top: 26px; font-size: 21px; right: 12px; }
  #app .hud-npc { width: 36px; height: 43px; flex-basis: 36px; }
  #app .story-hud-copy strong { font-size: 11px; }
  #app .story-hud-copy small { font-size: 9px; }
  #app .tray-heading { font-size: 12px; min-height: 22px; }
  #app .tray-swap { width: 23px; height: 23px; }
  #app .tray-swap .ui-sprite { width: 19px; height: 19px; }
  #app .hotbar-card.paper-frame { padding: 0 2px 2px; }
  #app .hotbar-card b { font-size: 10px; }
  #app .hotbar-art .ui-sprite, #app .hotbar-art .world-sprite { width: 35px; height: 35px; }
  #app .supplies-status { font-size: 9px; min-height: 18px; }
  #app .tray-heading::before, #app .supplies-status::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
  #app #cast-label { font-size: clamp(23px, 5vw, 31px); }
  #app #cast-button[data-phase='waiting'] #cast-label,
  #app #cast-button[data-phase='fighting'] #cast-label,
  #app #cast-button[data-phase='escaped'] #cast-label { font-size: clamp(15px, 3.6vw, 23px); }
  #app .reel-caption { font-size: 8px; letter-spacing: 0; }
  #app .cast-group .round-banner { left: -40%; width: 155%; bottom: calc(100% + 10px); font-size: 10px; }
  #app #action-hint { font-size: 8px; }
  #app #fight-panel { padding: 11px; }
  #app .lake-shell:has(#fight-panel:not([hidden])) .quest-card { display: none; }
}

@media (max-width: 420px) {
  #app .lake-shell { --hud-gutter: 9px; --reel-size: clamp(120px, 34vw, 143px); --tackle-width: calc(100% - var(--reel-size) - 21px); --fight-width: calc(100vw - var(--reel-size) - 32px); --nav-size: 51px; }
  #app .header-actions { gap: 5px; }
  #app .coin-badge { min-width: 73px; padding-left: 26px; padding-right: 8px; }
  #app .coin-badge b { font-size: 18px; }
  #app .header-actions .round-tool { width: 44px; min-width: 44px; height: 44px; }
  #app .header-actions .round-tool .ui-sprite { width: 27px; height: 27px; }
  #app .quest-card.paper-frame { width: 174px; height: 74px; top: 153px; padding: 9px 23px 9px 12px; }
  #app .hud-npc { width: 31px; height: 38px; flex-basis: 31px; }
  #app .story-hud-copy { gap: 2px; }
  #app .story-hud-copy strong { font-size: 10px; }
  #app .story-hud-copy small { font-size: 8px; }
  #app .quest-card::after { top: 25px; right: 11px; font-size: 18px; }
  #app .nav-caption { font-size: 10px; height: 23px; min-height: 23px; }
  #app .lake-nav { top: 157px; gap: 5px; }
  #app .nav-medallion { height: calc(var(--nav-size) + 14px); }
  #app .nav-count { min-width: 17px; height: 17px; line-height: 13px; font-size: 8px; }
  #app .current-tackle.panel-frame { aspect-ratio: 750 / 423; }
  #app .tray-heading { top: 10%; height: 20%; min-height: 21px; font-size: 11px; }
  #app .tackle-hotbar { top: 34%; height: 44%; }
  #app .hotbar-card b { font-size: 9px; }
  #app .hotbar-art .ui-sprite, #app .hotbar-art .world-sprite { width: 28px; height: 28px; }
  #app .supplies-status { bottom: 3%; height: 16%; font-size: 8px; }
  #app .rod-controls { right: calc(100% + 12px); gap: 6px; }
  #app .rod-controls button { font-size: 10px; padding: 0 3px; min-height: 44px; border-radius: 15px; }
  #app #fight-panel { right: calc(var(--hud-gutter) + var(--reel-size) + 12px); padding: 9px; }
  #app #fight-panel .fight-cue { font-size: 10px; }
}

@media (max-width: 350px) {
  #app .lake-shell { --hud-gutter: 7px; --reel-size: 113px; --tackle-width: calc(100% - 128px); --fight-width: calc(100vw - 139px); --nav-size: 46px; }
  #app .hud-logo-art { width: 104px; height: 45px; }
  #app .header-actions { gap: 4px; }
  #app .coin-badge { min-width: 66px; padding-left: 24px; }
  #app .coin-badge b { font-size: 17px; }
  #app .header-actions .round-tool { width: 38px; height: 38px; min-width: 38px; padding: 6px; }
  #app .spot-copy b { font-size: 12px; }
  #app .spot-tabs button { padding-left: 3px; padding-right: 3px; gap: 4px; }
  #app .quest-card.paper-frame { width: 162px; height: 69px; }
  #app .tray-heading { font-size: 10px; }
  #app .supplies-status { font-size: 7px; }
  #app #cast-label { font-size: 23px; }
  #app #cast-button[data-phase='waiting'] #cast-label,
  #app #cast-button[data-phase='fighting'] #cast-label,
  #app #cast-button[data-phase='escaped'] #cast-label { font-size: 14px; }
  #app #cast-button[data-long-label='true'] #cast-label { font-size: 12px; }
  #app .reel-caption { font-size: 7px; }
  #app #fight-panel { padding: 8px; }
  #app #fight-panel .tension-scale { font-size: 7px; }
}

@media (max-height: 720px) and (max-width: 760px) and (orientation: portrait) {
  #app .lake-shell { --nav-size: 44px; }
  #app .lake-nav { gap: 1px; top: 136px; }
  #app .quest-card.paper-frame { top: 144px; }
  #app .nav-caption { height: 22px; min-height: 22px; font-size: 10px; }
  #app .lake-shell:has(#fight-panel:not([hidden])) .lake-nav { display: none; }
  #app #fight-panel .fight-profile { display: none; }
}

@media (max-height: 800px) and (min-width: 761px) {
  #app .lake-nav { flex-direction: row; gap: 10px; }
}

@media (max-height: 600px) and (orientation: landscape) {
  #app .lake-shell { --hud-gutter: 12px; --hud-bottom: max(21px, env(safe-area-inset-bottom)); --reel-size: clamp(126px, 27vh, 166px); --tackle-width: 280px; --fight-width: 258px; --nav-size: 43px; }
  #app .topbar { top: max(6px, env(safe-area-inset-top)); min-height: 45px; align-items: center; }
  #app .lake-identity { display: flex; flex: none; gap: 9px; }
  #app .hud-logo-art { width: 130px; height: 45px; }
  #app #map-open { padding: 0 0 0 9px; min-height: 29px; border-left: 1px solid #f5ffdf8a; }
  #app #map-open b { font-size: 11px; }
  #app #map-open .weather-sun { font-size: 18px; }
  #app .header-actions { gap: 7px; padding-top: 0; }
  #app .header-actions .round-tool { width: 38px; min-width: 38px; height: 38px; padding: 6px; }
  #app .coin-badge { min-width: 82px; height: 31px; }
  #app .coin-badge b { font-size: 19px; }
  #app .spot-tabs { top: 60px; left: auto; right: 12px; width: min(48%, 385px); transform: none; gap: 3px; }
  #app .spot-tabs button { height: 44px; padding: 0 5px 5px; }
  #app .spot-copy b { font-size: 12px; }
  #app .lake-nav { display: flex; flex-direction: row; top: 64px; left: 12px; gap: 6px; }
  #app .nav-medallion { height: 59px; }
  #app .nav-caption { height: 22px; min-height: 22px; font-size: 9px; }
  #app .nav-count { min-width: 16px; height: 16px; line-height: 12px; font-size: 8px; }
  #app .quest-card.paper-frame { top: 137px; right: 14px; width: 174px; height: 74px; padding: 9px 23px 9px 12px; }
  #app .quest-card::after { top: 25px; }
  #app .hud-npc { width: 31px; height: 38px; flex-basis: 31px; }
  #app .story-hud-copy strong { font-size: 10px; }
  #app .story-hud-copy small { font-size: 8px; }
  #app .current-tackle.panel-frame { aspect-ratio: 750 / 423; padding: 0; }
  #app .tray-heading { top: 11%; font-size: 12px; }
  #app .tackle-hotbar { top: 34%; height: 44%; }
  #app .supplies-status { bottom: 5%; font-size: 9px; }
  #app .hotbar-card b { font-size: 10px; }
  #app .hotbar-art .ui-sprite, #app .hotbar-art .world-sprite { width: 35px; height: 35px; }
  #app .cast-group .round-banner { font-size: 10px; bottom: calc(100% + 7px); }
  #app #cast-label { font-size: 25px; }
  #app #cast-button[data-phase='waiting'] #cast-label,
  #app #cast-button[data-phase='fighting'] #cast-label,
  #app #cast-button[data-phase='escaped'] #cast-label { font-size: 16px; }
  #app .reel-caption { font-size: 8px; }
  #app .rod-controls { right: calc(100% + 18px); }
  #app #fight-panel { right: calc(var(--hud-gutter) + var(--reel-size) + 18px); bottom: calc(var(--hud-bottom) + 53px); width: var(--fight-width); padding: 9px 12px; }
  #app #fight-panel .fight-profile,
  #app #fight-panel .stamina-row { display: none; }
  #app #fight-panel .fight-top { margin-bottom: 4px; }
  #app #fight-panel .grip-row { margin-top: 6px; }
  #app #fight-panel .fight-cue { margin-top: 5px; font-size: 10px; }
  #app .lake-shell:has(#fight-panel:not([hidden])) .lake-nav { display: flex; }
  #app .lake-shell:has(#fight-panel:not([hidden])) .quest-card { display: none; }
}

@media (max-height: 430px) and (orientation: landscape) {
  #app .quest-card.paper-frame { display: none; }
  #app #fight-panel .tension-scale, #app #fight-panel .behavior-track { display: none; }
  #app #fight-panel .fight-warning { margin-top: 3px; font-size: 9px; }
  #app #fight-panel .fight-top strong { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  #app .nav-medallion, #app .spot-tabs button, #app #cast-button { transition: none; }
}
/* Motion follows the actual fishing state; no fake progress or perpetual idle spin. */
#app #cast-button[data-reeling='true'] .reel-handle{animation:reel-a-crank .75s linear infinite}
#app #cast-button[data-phase='casting'] .reel-base{animation:reel-a-cast .75s cubic-bezier(.2,.7,.3,1) both}
#app #cast-button[data-phase='waiting'] .reel-ripple{animation:reel-a-ripple 2.3s ease-out infinite}
#app #cast-button[data-phase='bite'] .reel-ripple{animation:reel-a-ripple .75s ease-out infinite}
#app #cast-button[data-phase='bite'] .reel-base{animation:reel-a-alert .65s ease-in-out infinite}
#app #cast-button[data-danger='true'] .reel-base{filter:drop-shadow(0 0 7px #ff7158)}
#app #cast-button[data-danger='true'] .reel-ripple{border-color:#ffae71;animation:reel-a-ripple .6s ease-out infinite}
#app #cast-button[data-paused='true'] *, .page-hidden #app #cast-button *{animation-play-state:paused!important}
@keyframes reel-a-crank{to{transform:rotate(360deg)}}
.title-account-actions{position:absolute;top:max(18px,env(safe-area-inset-top));right:22px;display:flex;gap:10px;z-index:5}
.title-account-actions[hidden],.title-account-actions button[hidden],.leaderboard-entry[hidden]{display:none!important}
.title-account-actions button{min-height:44px;min-width:70px;padding:9px 18px;border:1px solid #f7e3ae;border-radius:22px;background:#164e59ed;color:#fff4d6;font-weight:700;box-shadow:0 3px 12px #123f4530}
.title-account-actions #title-register{background:#fff1cc;color:#25535a}
#app .leaderboard-entry{position:absolute;right:var(--hud-gutter,16px);top:192px;z-index:12;display:flex;align-items:center;gap:8px;min-height:58px;padding:9px 14px;border:2px solid #e5b85c;border-radius:16px;background:linear-gradient(140deg,#fff8db,#f5d78b);color:#624517;box-shadow:0 4px 12px #123e4940;text-align:left;cursor:pointer}
.leaderboard-entry>span:first-child{font-size:29px}.leaderboard-entry b{display:block;font-size:17px}.leaderboard-entry small{display:block;font-size:10px;margin-top:3px}
.online-page{min-height:0}.online-content{overflow:auto;padding:20px;flex:1;min-height:0;color:#294f52}.online-content p{line-height:1.7}.online-form,.online-actions{display:grid;gap:16px;max-width:480px;margin:0 auto}.online-form label{display:grid;gap:7px;font-weight:700}.online-form input,.rank-filter select{box-sizing:border-box;width:100%;min-height:48px;border:1px solid #9ab8ac;border-radius:10px;background:#fffdf5;padding:10px 12px;color:#25464b;font:inherit}.online-alternate{text-align:center;margin:18px 0}.online-note{font-size:12px;color:#617774}.ranking-intro{display:flex;align-items:center;gap:14px;padding:16px;border-radius:14px;background:#fff0c8;margin-bottom:20px}.ranking-intro>span{font-size:38px}.ranking-intro p{font-size:12px;margin:6px 0 0}.rank-filter{display:grid;gap:8px;font-weight:700}.rank-columns{display:flex;justify-content:space-between;font-size:12px;padding:20px 10px 10px;color:#71817b}.ranking-list{list-style:none;padding:0;margin:0}.ranking-list li{display:flex;align-items:center;gap:12px;padding:14px 10px;border-bottom:1px solid #d3ded3}.rank-number{width:30px;height:30px;display:grid;place-items:center;border-radius:50%;background:#dce9e0}.rank-podium .rank-number{background:#edce82;color:#634712;font-weight:800}.rank-name{flex:1;overflow-wrap:anywhere}.ranking-list small{font-weight:400}.online-content button{min-height:44px}
@media(max-width:760px){#app .leaderboard-entry{top:166px;right:12px;padding:8px 10px;min-height:54px}.title-account-actions{right:14px;top:max(12px,env(safe-area-inset-top))}.online-content{padding:14px}}
@media(max-height:600px){#app .leaderboard-entry{top:136px}.leaderboard-entry small{display:none}.title-account-actions button{padding:6px 12px}}
#app #leaderboard-open[hidden]{display:none!important}
#app .rank-nav-entry .nav-caption{color:#634313;background:#f6dda0;border-color:#fff0be;font-weight:900}
#app #leaderboard-open{--nav-art:url('./assets/ui/nav-ranking-v23.webp')}
#app .rank-nav-entry>[data-ui-icon] .ui-sprite{visibility:hidden}
#app .lake-shell:has(.rank-nav-entry:not([hidden])) .quest-card{max-width:calc(100% - var(--nav-size) * 2 - var(--hud-gutter) * 2 - 18px)}
#app .rank-nav-entry>.ui-sprite{filter:drop-shadow(0 2px 5px #ffdb78)}
#app .lake-nav{display:flex;flex-direction:column!important;gap:4px;max-height:calc(100% - 350px);overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#b4dfdc transparent;padding:3px 5px 6px 2px;overscroll-behavior:contain}
#app .lake-nav .nav-medallion{flex-shrink:0}
@media(max-height:720px) and (orientation:portrait){#app .lake-nav{gap:1px}}
#modal[data-view="ranking"] .rank-atlas-heading{display:flex;align-items:center;gap:12px;padding:12px 4px 18px;color:#315968}
.rank-atlas-heading>.ui-sprite,.rank-atlas-heading>span{width:54px;height:54px;flex:none}.rank-atlas-heading>span .ui-sprite{width:100%;height:100%}
.rank-atlas-heading b{font-size:17px}.rank-atlas-heading p{font-size:12px;margin:6px 0 0;color:#66848a}.rank-atlas-heading>strong{margin-left:auto;font-size:28px;color:#a77930;white-space:nowrap}.rank-atlas-heading strong small{display:block;font-size:10px;font-weight:400}
#modal[data-view="ranking"] .rank-fish-card{cursor:pointer;transition:transform .15s,filter .15s;background:#fffbed}
#modal[data-view="ranking"] .rank-fish-card:hover{filter:brightness(1.025);transform:translateY(-2px)}
#modal[data-view="ranking"] .rank-fish-card:focus-visible{outline:3px solid #c0923e;outline-offset:-3px}
#modal[data-view="ranking"] .rank-fish-card p{display:flex;justify-content:space-between;color:#9b7236;margin:8px 0 0}
#modal[data-view="ranking"] .rank-fish-card .fish-paint{width:100%;height:82px;object-fit:contain}
.rank-species-hero{display:flex;align-items:center;justify-content:center;gap:24px;padding:12px 20px;background:linear-gradient(120deg,#e6f1e9,#fff6d9);border-radius:16px;margin:12px 0 16px;border:1px solid #d4dfcc}
.rank-hero-art{width:42%;max-width:230px}.rank-hero-art .fish-paint{width:100%}.rank-species-hero small{font-size:9px;letter-spacing:2px;color:#928153}.rank-species-hero h3{font-size:28px;color:#315869;margin:8px 0}.rank-species-hero p{font-size:12px;color:#768578;margin:0}
.rank-table-heading,.rank-records li{display:grid;grid-template-columns:54px minmax(0,1fr) minmax(96px,auto);align-items:center;gap:12px}
.rank-table-heading{padding:8px 16px;font-size:11px;color:#708584}.rank-table-heading>span:last-child{text-align:right}
.rank-records{list-style:none;margin:0;padding:0}.rank-records li{padding:14px 16px;border-bottom:1px solid #dce4d8;min-height:64px;box-sizing:border-box}.rank-records li:nth-child(even){background:#e8eee32e}.rank-records strong{text-align:right;font-size:22px;font-variant-numeric:tabular-nums;color:#315e6c}.rank-records strong small{font-size:11px;font-weight:400}.rank-place{width:32px;height:32px;display:grid;place-items:center;font-size:16px;font-weight:800;color:#6d8586}.rank-top .rank-place{border-radius:50%;background:#eed390;color:#866126;box-shadow:inset 0 0 0 3px #fff5d5}.rank-top-2 .rank-place{background:#dfe7e8;color:#586d7d}.rank-top-3 .rank-place{background:#e5ccb7;color:#885f40}.rank-player{overflow-wrap:anywhere;color:#315463;font-weight:700}.rank-player small{font-size:10px;background:#d8e9da;border-radius:5px;margin-left:8px;padding:2px 5px}.rank-self{box-shadow:inset 3px 0 #7b9f77}.rank-empty{display:flex;align-items:center;justify-content:center;flex-direction:column;text-align:center;min-height:180px;padding:20px;color:#617e7e}.rank-empty>.ui-sprite{width:64px;height:64px;margin-bottom:12px}.rank-empty b{font-size:18px;color:#446976}.rank-empty p{font-size:12px;line-height:1.9}.rank-results{min-height:80px}
@media(max-width:760px){#modal[data-view="ranking"] .rank-atlas-heading{gap:8px;padding:8px 0 12px}.rank-atlas-heading b{font-size:14px}.rank-atlas-heading p{font-size:10px}.rank-atlas-heading>strong{display:none}.rank-species-hero{gap:12px;padding:10px}.rank-species-hero h3{font-size:22px}.rank-table-heading,.rank-records li{grid-template-columns:34px minmax(0,1fr) minmax(82px,auto);gap:8px;padding-left:8px;padding-right:8px}.rank-records strong{font-size:20px}}
@media(max-height:600px) and (orientation:landscape){#app .lake-nav{max-height:calc(100% - 260px);gap:2px}.rank-species-hero{margin:6px 0;padding:4px 16px}.rank-hero-art{max-width:120px}.rank-species-hero h3{font-size:20px}.rank-species-hero p{display:none}.rank-atlas-heading{display:none!important}}
@keyframes reel-a-cast{0%{transform:rotate(0) scale(1)}35%{transform:rotate(-9deg) scale(.92)}100%{transform:rotate(0) scale(1)}}
@keyframes reel-a-ripple{0%{border-color:#ffe9a2;opacity:.85;transform:scale(.8)}100%{border-color:#b9f7ed;opacity:0;transform:scale(1.25)}}
@keyframes reel-a-alert{50%{filter:drop-shadow(0 0 7px #fff1ac);transform:translateY(-2px)}}
@media(prefers-reduced-motion:reduce){#app #cast-button *{animation:none!important}#app #cast-button[data-phase='bite'] .reel-base{filter:drop-shadow(0 0 6px #fff1ac)}}
.rank-personal-card-best{display:flex;align-items:baseline;justify-content:space-between;gap:6px;padding-top:9px;margin-top:8px;border-top:1px solid #d8dcc8;color:#466369}.rank-personal-card-best>small{font-size:10px;white-space:nowrap}.rank-personal-card-best>strong{font-size:16px;font-variant-numeric:tabular-nums;color:#996b29}.rank-personal-card-best strong small{font-size:10px;font-weight:500}
.rank-personal-summary{display:grid;grid-template-columns:1fr 1fr;gap:10px;flex-shrink:0;margin:0 0 10px}.rank-personal-local,.rank-personal-online{display:flex;flex-direction:column;justify-content:center;gap:5px;min-width:0;padding:12px 16px;border-radius:13px;border:1px solid #d1dfd5;background:#f5f8ee;color:#395d64}.rank-personal-online{border-color:#dfcb97;background:linear-gradient(125deg,#fff7df,#f7edcc);color:#856025}.rank-personal-summary small{font-size:11px}.rank-personal-summary strong{font-size:24px;font-variant-numeric:tabular-nums;line-height:1.1}.rank-personal-summary strong small{font-size:12px;font-weight:500}.rank-personal-summary span{font-size:10px;line-height:1.45;overflow-wrap:anywhere;opacity:.86}.rank-personal-summary span b{font-size:12px}
@media(max-width:480px){.rank-personal-summary{gap:7px;margin-bottom:6px}.rank-personal-local,.rank-personal-online{padding:10px}.rank-personal-summary strong{font-size:21px}.rank-personal-summary span{font-size:9px}.rank-personal-card-best{flex-wrap:wrap;gap:3px}.rank-personal-card-best>strong{font-size:14px}}
@media(max-height:600px) and (orientation:landscape){.rank-personal-summary{gap:8px;margin-bottom:4px}.rank-personal-local,.rank-personal-online{display:grid;grid-template-columns:auto 1fr;gap:3px 12px;padding:7px 12px}.rank-personal-summary strong{font-size:19px;text-align:right}.rank-personal-summary span{grid-column:1/-1}}
