:root {
  --catalog-ink: #204d43;
  --catalog-muted: #708b80;
  --catalog-line: #cadcd1;
  --catalog-surface: #f2f7f2;
  --catalog-raised: linear-gradient(160deg, #ffffff, #edf5ed);
  --catalog-button: linear-gradient(#70af93, #42886c);
  --catalog-shadow: inset 0 1px 1px #ffffff, 0 2px 1px #bacdc0, 0 5px 12px #254d3d0f;
}
.app-icon { border-radius: 8px; box-shadow: 0 3px 0 #376b56, 0 6px 12px #2b57452b; }
.top-actions button, .icon-button, .stat, .controls button {
  background: var(--catalog-raised);
  border-color: #eef8ed;
  box-shadow: inset 0 2px 2px #ffffff, inset 0 -2px 2px #adc5b34d, 0 3px 0 #99b5a1, 0 7px 15px #355b4826;
}
.top-actions svg { filter: drop-shadow(0 1px 0 #fff); }
.top-actions #shopButton, .stat:first-child { background: linear-gradient(#fff3ca, #efcf7c); border-color: #fff4cb; color: #79612f; }
.top-actions .tab.active { background: var(--catalog-button); color: white; box-shadow: inset 0 1px 2px #c3e4cd, 0 3px 0 #2d634e; border-color: #8abd9f; }
.top-actions .tab.active svg { filter: drop-shadow(0 1px 0 #3d725c); }
.stat { border-radius: 8px; }
.controls #castButton.primary { background: var(--catalog-button); box-shadow: inset 0 2px 1px #a6ccb1, 0 4px 0 #326c50, 0 8px 16px #31544129; }
.controls #jerkButton { background: linear-gradient(#fff5df, #efdab5); box-shadow: inset 0 2px 2px #fff, 0 4px 0 #baa175, 0 8px 16px #31544129; }
.controls .control-icon { filter: drop-shadow(0 2px 0 #ffffff88); }
.controls #castButton .control-icon { filter: drop-shadow(0 2px 0 #356d51); }
.controls button.held, .controls button:active { box-shadow: inset 0 2px 4px #38634533, 0 1px 0 #8ca993; }
.meters, .toast { background: linear-gradient(#fcfffa, #eaf3e8); box-shadow: inset 0 1px 0 #fff, 0 3px 0 #8daa914a, 0 5px 12px #294b3a12; }
.track { background: #d8e5da; box-shadow: inset 0 2px 2px #446b4b22; }
.track i { background: linear-gradient(#9dcc9b, #67a483); box-shadow: inset 0 1px 1px #d4f3d6; }
.tension i { background: linear-gradient(#edd797, #c59f54); }
.stamina i { background: linear-gradient(#ace1d2, #72b4a9); }
dialog, .panel.active {
  color: var(--catalog-ink);
  border: 1px solid #f6fff8;
  background: var(--catalog-surface);
  box-shadow: inset 0 0 0 1px #d1e0d4, 0 5px 0 #b6c9b9, 0 22px 65px #143c3959;
  border-radius: 8px;
}
dialog { width: min(580px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: hidden; }
dialog::backdrop { background: #244d456e; -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.panel.active { left: max(12px, calc((100vw - 580px) / 2)); right: max(12px, calc((100vw - 580px) / 2)); max-height: min(86dvh, 840px); padding: 14px; }
.panel-title, dialog header {
  display: flex; align-items: center; justify-content: flex-start; gap: 10px;
  background: linear-gradient(#ffffff, #f1f7f1); border-bottom: 1px solid #c5d8ca;
  padding: 14px; min-height: 68px;
}
.panel-title { margin: -14px -14px 14px; top: -14px; }
.panel-title strong, dialog h2 { font-size: 20px; font-weight: 850; line-height: 1.3; margin: 0; min-width: 0; }
.panel-title strong { flex: 1; }
dialog h2 { flex: 1; }
.menu-badge { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; color: #528568; }
.menu-badge svg { width: 25px; height: 25px; filter: drop-shadow(0 2px 0 #fff); }
.panel-close, dialog header button, #modelReset {
  display: flex; align-items: center; justify-content: center; flex: 0 0 40px;
  width: 40px; height: 40px; min-height: 40px; padding: 9px; border-radius: 8px;
  border: 1px solid #d5e4d9; background: var(--catalog-raised); color: #376651; box-shadow: var(--catalog-shadow);
}
.panel-close svg, dialog header button svg, #modelReset svg { width: 21px; height: 21px; }
.shop-balance { display: flex; align-items: center; gap: 6px; font-size: 16px; margin-right: 4px; white-space: nowrap; }
.shop-balance > span, .shop-footer em i { display: inline-flex; color: #b58c3d; filter: drop-shadow(0 1px 0 #ffefa9); }
.shop-balance svg { width: 22px; height: 22px; }
.collection-count { font-size: 13px; font-weight: 750; white-space: nowrap; }
#shopDialog > form { display: flex; flex-direction: column; height: min(86dvh, 840px); }
.shop-tabs { flex: 0 0 auto; padding: 12px 14px; gap: 6px; }
.shop-tab { min-width: 0; min-height: 40px; border-radius: 8px; background: var(--catalog-raised); box-shadow: var(--catalog-shadow); border-color: #d5e4d7; color: #426c59; font-size: 12px; }
.shop-tab.active { background: var(--catalog-button); color: #fff; border-color: #6ba889; box-shadow: inset 0 1px 1px #c2e4cb, 0 2px 0 #346c51, 0 4px 8px #28543d24; }
.shop-list { flex: 1; min-height: 0; max-height: none; padding: 2px 14px 16px; overflow: auto; overscroll-behavior: contain; }
.shop-group { gap: 12px; }
.shop-group > h3 { display: none; }
.shop-card { display: grid; grid-template-columns: minmax(112px, 37%) minmax(0, 1fr); gap: 12px; align-items: center; min-height: 152px; padding: 10px; border: 1px solid #dce7dc; border-radius: 8px; background: var(--catalog-raised); box-shadow: inset 0 1px 1px #fff, 0 2px 5px #33573a0a; }
.shop-card.equipped { border-color: #9fc6aa; background: linear-gradient(135deg, #f4fcf4, #e8f4e8); outline: none; }
.shop-list .shop-copy { display: grid; gap: 4px; margin: 0; min-width: 0; }
.shop-copy b { color: #204d43; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.shop-copy small { color: #688776; font-size: 10px; font-weight: 700; }
.shop-copy .item-description { color: #749083; font-size: 11px; line-height: 1.45; margin: 0; }
.shop-copy .shop-footer { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 5px 0 0; }
.shop-footer em { display: flex; align-items: center; gap: 4px; color: #927034; font-size: 14px; font-weight: 800; margin: 0; font-style: normal; white-space: nowrap; }
.shop-footer em svg { width: 17px; height: 17px; }
.shop-list .shop-buy { min-height: 38px; min-width: 62px; padding: 7px 10px; text-align: center; color: white; font-size: 12px; font-weight: 750; border: 1px solid #7aac8e; background: var(--catalog-button); box-shadow: inset 0 1px 1px #c2e4cb, 0 2px 0 #366d52; }
.shop-list .shop-buy:disabled { color: #60836d; background: #e2efdf; border-color: #c2d6c0; box-shadow: inset 0 1px 2px #97b39422; cursor: default; }
.shop-list .shop-buy:active:not(:disabled) { transform: translateY(2px); box-shadow: inset 0 1px 3px #28583c44; }
.model-preview, .shop-list .model-preview { position: relative; display: block; width: 100%; min-height: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; overflow: hidden; }
.gear-thumb, .lure-thumb, .fish-thumb { display: block; width: 100%; height: auto; aspect-ratio: auto; border: 0; border-radius: 0; background: none; box-shadow: none; object-fit: contain; }
.shop-card > .model-preview { min-height: 112px; display: flex; align-items: center; }
.preview-symbol { position: absolute; right: 0; bottom: 0; width: 24px; height: 24px; color: #547b6659; }
.preview-symbol svg { width: 19px; height: 19px; }
.model-preview:hover .preview-symbol, .model-preview:focus-visible .preview-symbol { color: #396e54; }
.book-list { gap: 12px; }
.book-card { padding: 10px; gap: 4px; min-height: 184px; background: var(--catalog-raised); border-color: #dbe7dc; box-shadow: inset 0 1px 0 #fff, 0 3px 8px #30543b0d; }
.book-card.locked { filter: none; }
.book-card b { color: #204d43; font-size: 16px; }
.book-card span { font-size: 11px; color: #6c8b77; margin-top: 5px; }
.book-card em { color: #92a496; font-size: 10px; font-weight: 600; }
.book-card .model-preview { min-height: 95px; }
.switch-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.switch-group { gap: 10px; }
.switch-group h3 { color: #6e8b77; font-size: 12px; padding: 3px 0; }
.switch-card, .gear-card { background: var(--catalog-raised); border: 1px solid #d4e2d4; box-shadow: var(--catalog-shadow); padding: 10px; }
.switch-card { min-height: 136px; }
.switch-card b { white-space: normal; overflow-wrap: anywhere; text-align: center; line-height: 1.4; font-size: 12px; }
.switch-card.active, .gear-card.active { border-color: #8cba9a; outline: 0; background: linear-gradient(#f5fcf4, #dfefdf); box-shadow: inset 0 0 0 1px #b0d0b4, 0 2px 0 #a6c5ad; }
.gear-card b { color: var(--catalog-ink); font-size: 13px; }
.gear-card span { font-size: 11px; line-height: 1.45; color: #78907c; }
.intel { display: block; }
.intel p { border: 0; border-bottom: 1px solid #dce7dc; padding: 14px 2px; margin: 0; border-radius: 0; background: none; line-height: 1.7; color: #50715e; }
.intel p:last-child { border-bottom: 0; }
.spot-map-list { max-height: calc(86dvh - 88px); padding-top: 14px; }
.spot-card { background: var(--catalog-raised); border-radius: 8px; border-color: #d3e2d3; box-shadow: var(--catalog-shadow); }
.spot-card.active { background: #e5f1e3; border-color: #8bb493; outline: none; }
.spot-badges i { border-radius: 4px; background: #e2ede2; color: #6a826a; }
.dialog-notice { flex: 0 0 auto; padding: 10px 14px; margin: 0; color: #945f39; background: #fbedd9; border-top: 1px solid #ebd7b7; font-size: 12px; }
#modelDialog { width: min(720px, calc(100vw - 24px)); }
#modelDialog header { min-height: 66px; }
#modelTitle { font-size: 18px; overflow-wrap: anywhere; }
#modelViewport { height: min(54dvh, 450px); width: 100%; touch-action: none; cursor: grab; background: linear-gradient(#f1f8f3, #e3eee5); }
#modelViewport:active { cursor: grabbing; }
#modelViewport canvas { display: block; width: 100%; height: 100%; touch-action: none; }
#modelViewport p { padding: 32px; margin: 0; color: #718576; }
.model-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #ceddcf; font-size: 12px; color: #63816e; }
.catch-result { background: linear-gradient(#fefffb, #edf6eb); border-color: #fafff5; box-shadow: inset 0 0 0 1px #cddfc9, 0 5px 0 #97b794, 0 16px 44px #294b4340; }
@media (max-width: 350px) {
  .shop-card { grid-template-columns: minmax(88px, 35%) minmax(0, 1fr); gap: 8px; padding: 8px; }
  .shop-copy b { font-size: 12px; }
  .shop-copy .item-description { font-size: 10px; }
  .shop-list .shop-buy { min-width: 54px; padding: 7px; font-size: 11px; }
  .shop-footer em { font-size: 12px; }
  .book-list { gap: 8px; }
  .book-card { padding: 8px; min-height: 162px; }
  .panel-title, dialog header { gap: 6px; padding: 12px; }
  .menu-badge { width: 26px; flex-basis: 26px; }
}
@media (orientation: landscape) and (max-height: 520px) {
  #shopDialog > form { height: calc(100dvh - 24px); }
  .panel-title, dialog header { min-height: 54px; padding-top: 7px; padding-bottom: 7px; }
  .shop-tabs { padding-top: 8px; padding-bottom: 10px; }
  #modelViewport { height: calc(100dvh - 150px); }
  .model-footer { padding-top: 7px; padding-bottom: 7px; }
}
@media (prefers-reduced-motion: no-preference) {
  .shop-buy, .shop-tab, .panel-close, #modelReset { transition: background-color 0.15s, transform 0.15s, box-shadow 0.15s; }
}
