
    :root { color-scheme: dark; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #101c35; color: #f6efd6; }
    * { box-sizing: border-box; }
    html, body { margin: 0; min-height: 100%; }
    body { background: radial-gradient(circle at 50% 0%, #284062 0, #101c35 65%); }
    button { font: inherit; }
    .shell { width: min(1480px, 100% - 32px); margin: 0 auto; padding: 29px 0 34px; }
    .topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
    .brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
    .brand-icon { width: 43px; height: 43px; flex: none; display: grid; place-items: center; background: #ffc77f; color: #24314b; border: 3px solid #f6efd6; box-shadow: 4px 4px 0 #070f22; font-size: 24px; line-height: 1; }
    .brand-icon img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
    h1 { margin: 0; font-size: clamp(1.18rem, 3vw, 1.7rem); letter-spacing: .035em; line-height: 1.15; text-transform: uppercase; }
    .tag { margin: 5px 0 0; color: #9cb6c0; font-size: .84rem; }
    .status { display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: .8rem; color: #b9d3ce; }
    .status-dot { width: 9px; height: 9px; background: #7bdba4; box-shadow: 0 0 0 3px #315c5a; }
    .main-menu { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 22px; }
    .main-menu button { flex: 1 1 0; min-width: 0; min-height: 48px; padding: 9px 6px; border: 2px solid #7897a2; background: #203650; color: #d9e8dc; box-shadow: 3px 3px 0 #0a1328; cursor: pointer; font-size: clamp(.72rem, 2.6vw, .92rem); font-weight: 900; text-transform: uppercase; }
    .main-menu button[aria-pressed="true"] { border-color: #ffe1a7; background: #ffb76d; color: #27304a; }
    .main-menu button:focus-visible { outline: 3px solid #fff4cf; outline-offset: 4px; }
    .page-view[hidden] { display: none; }
    .gameplay-view { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
    .gameplay-view input, .gameplay-view select { user-select: text; -webkit-user-select: text; }
    .game-frame { position: relative; padding: 10px; border: 3px solid #708aa0; background: #263c5b; box-shadow: 0 0 0 5px #0b152a, 10px 10px 0 #070f22; }
    .game-frame[hidden], .dashboard[hidden], .mastery[hidden], .boat-shop[hidden], .arrival[hidden] { display: none; }
    .arrival { min-height: 270px; padding: clamp(22px, 5vw, 52px); border: 3px solid #78aa99; background: linear-gradient(#638b8b 0 35%, #a1b69c 35% 44%, #56877d 44% 100%); box-shadow: 5px 5px 0 #0a1328; color: #152e3c; }
    .arrival h2 { max-width: 680px; margin: 0 0 16px; font-size: clamp(1.4rem, 4vw, 2.5rem); text-transform: uppercase; }
    .arrival p { max-width: 580px; padding: 10px 13px; background: #e5e5c9; line-height: 1.5; font-weight: 700; }
    .round-panel { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin: 0 0 18px; padding: 14px 17px; border: 2px solid #7390a2; background: #203650; box-shadow: 5px 5px 0 #0a1328; }
    .round-panel[hidden], .round-result[hidden], .tournament-setup[hidden], .tournament-summary[hidden] { display: none; }
    .round-panel strong { display: block; color: #fff0c7; text-transform: uppercase; letter-spacing: .04em; }
    .round-panel p { margin: 5px 0 0; color: #b9d0ce; font-size: .8rem; line-height: 1.4; }
    .round-button { min-height: 42px; padding: 8px 14px; border: 2px solid #ffe1a7; background: #ffb76d; color: #27304a; box-shadow: 3px 3px 0 #703b4c; cursor: pointer; font-size: .82rem; font-weight: 900; text-transform: uppercase; }
    .round-button:hover { background: #ffcd87; }
    .round-button:disabled { border-color: #647d92; background: #435a70; color: #b8c9c6; box-shadow: 3px 3px 0 #15263e; cursor: default; }
    .round-button:focus-visible { outline: 3px solid #fff4cf; outline-offset: 4px; }
    .round-button.secondary { border-color: #a9c6ca; background: #31536a; color: #f6efd6; box-shadow: 3px 3px 0 #0a1328; }
    .round-button.secondary:hover { background: #42677e; }
    .round-stats { display: flex; flex-wrap: wrap; gap: 18px; color: #a9c6ca; font-size: .8rem; text-transform: uppercase; }
    .round-stats b { display: block; color: #ffce88; font-size: 1.35rem; }
    .round-panel .round-record, .round-result .round-record { color: #a7e0c1; font-weight: 700; }
    .round-panel .round-gap { width: 100%; margin-top: 0; color: #ffce88; }
    .round-panel .round-goal-line, .round-result .round-goal-line { color: #ffce88; font-weight: 700; }
    .round-goal-controls { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 11px; }
    .round-goal-controls label { display: grid; gap: 5px; color: #b9d0ce; font-size: .78rem; }
    .round-goal-controls label[hidden] { display: none; }
    .round-goal-controls select { width: min(100%, 250px); min-height: 40px; padding: 7px 10px; border: 2px solid #a9c6ca; border-radius: 0; background: #142840; color: #fff0c7; font: inherit; }
    .round-goal-controls select:focus-visible { outline: 3px solid #fff4cf; outline-offset: 3px; }
    .challenge-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin-top: 9px; }
    .challenge-controls label { display: grid; gap: 4px; color: #b9d0ce; font-size: .78rem; }
    .challenge-controls input { width: 155px; min-height: 42px; padding: 7px 9px; border: 2px solid #a9c6ca; background: #142840; color: #fff0c7; font: inherit; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
    .challenge-controls input:focus-visible { outline: 3px solid #fff4cf; outline-offset: 3px; }
    .round-panel .challenge-error { color: #ffb8aa; }
    .round-result .round-comparison { color: #ffce88; font-weight: 900; }
    .round-result { margin-top: 22px; padding: 19px; border: 2px solid #e3bf80; background: #203650; box-shadow: 5px 5px 0 #0a1328; }
    .round-result h2 { margin: 0 0 12px; font-size: 1.1rem; color: #fff0c7; text-transform: uppercase; }
    .round-result p { margin: 12px 0; color: #d2dfe0; }
    .round-result ol { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 10px 0 17px; padding-left: 23px; color: #d2dfe0; font-size: .82rem; }
    .round-actions { display: flex; flex-wrap: wrap; gap: 12px; }
    .tournament-setup { margin: 0 0 18px; padding: 17px; border: 2px solid #7390a2; background: #203650; box-shadow: 5px 5px 0 #0a1328; }
    .tournament-setup h2, .tournament-summary h3 { margin: 0 0 8px; color: #fff0c7; font-size: 1rem; text-transform: uppercase; }
    .tournament-setup p { margin: 7px 0 13px; color: #b9d0ce; font-size: .82rem; }
    .tournament-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-bottom: 13px; }
    .tournament-fields label { display: grid; gap: 5px; color: #b9d0ce; font-size: .78rem; }
    .tournament-fields input, .tournament-fields select { box-sizing: border-box; min-height: 40px; width: min(100%, 180px); padding: 7px 10px; border: 2px solid #a9c6ca; border-radius: 0; background: #142840; color: #fff0c7; font: inherit; }
    .tournament-fields label[hidden] { display: none; }
    .tournament-error { color: #ffb0a5 !important; font-weight: 700; }
    .tournament-summary { margin: 18px 0; padding: 14px; border: 2px solid #7390a2; background: #172b43; overflow-x: auto; }
    .tournament-summary p { margin: 8px 0; }
    .tournament-table { width: 100%; border-collapse: collapse; color: #d2dfe0; font-size: .82rem; }
    .tournament-table th, .tournament-table td { padding: 7px 5px; border-bottom: 1px solid #526d7c; text-align: left; }
    .tournament-table th { color: #ffce88; }
    .game-frame::before { content: ''; pointer-events: none; position: absolute; z-index: 3; inset: 10px; box-shadow: inset 0 0 0 3px rgba(10, 26, 47, .4); }
    .cast-meter { position: absolute; z-index: 4; left: 22px; bottom: 20px; width: min(276px, calc(100% - 44px)); padding: 8px 10px 9px; border: 2px solid #bbcfbb; background: #172c3ddf; box-shadow: 4px 4px 0 #102136; pointer-events: none; user-select: none; -webkit-user-select: none; }
    .cast-meter[hidden] { display: none; }
    .cast-meter-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #fff1ca; font-size: .72rem; font-weight: 900; text-transform: uppercase; }
    .cast-meter-track { position: relative; height: 16px; border: 2px solid #13283d; background: linear-gradient(90deg, #d85558, #e8aa49 30%, #72cb74 42% 58%, #e8aa49 70%, #d85558); }
    .cast-meter-marker { position: absolute; top: -5px; left: 50%; width: 5px; height: 22px; border: 1px solid #253344; background: #fff4d5; box-shadow: 1px 1px 0 #0d1828; transform: translateX(-50%); }
    .cast-meter-note { margin: 5px 0 0; color: #c8d9cc; font-size: .64rem; line-height: 1.25; }
    .river-controls { display: flex; justify-content: space-between; gap: 10px; margin: 14px 0 0; }
    .river-controls[hidden] { display: none; }
    .river-controls button { min-height: 44px; padding: 8px 13px; border: 2px solid #d2d4af; background: #315d69; color: #fff2cf; font: inherit; font-weight: 800; cursor: pointer; }
    .river-controls button:disabled { opacity: .5; cursor: default; }
    .river-navigation { margin: 13px 0 0; padding: 11px 13px; border: 2px solid #54757e; background: #1b3845; }
    .river-navigation[hidden] { display: none; }
    #skip-travel { position: absolute; z-index: 5; right: 22px; bottom: 22px; min-height: 44px; padding: 8px 14px; background: #f4b66d; color: #26344b; border: 2px solid #ffe1a7; cursor: pointer; }
    .motion-settings { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 12px 0; }
    #motion-setting { min-height: 44px; }
    html[data-reduced-motion="true"] *, html[data-reduced-motion="true"] *::before { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    #shore-positions button, #buy-boots { min-height: 44px; padding: 8px 12px; border: 2px solid #b5ceba; background: #2c4b53; color: #fff1bf; cursor: pointer; }
    #shore-positions button:disabled, #buy-boots:disabled { opacity: .55; cursor: default; }
    #shore-positions button[aria-pressed="true"] { background: #577a58; }
    #shore-note { font-size: .8rem; color: #bcd6ca; }
    .river-position { margin: 0 0 9px; color: #fff1bf; font-size: .8rem; font-weight: 800; }
    .river-track { height: 13px; border: 2px solid #9bb4a6; background: #465e65; }
    .river-viewport { width: 50%; height: 100%; background: #f4b66d; transition: margin-left .18s; }
    .river-stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 6px; margin-top: 9px; }
    .river-stops button { min-height: 44px; padding: 5px; border: 2px solid #729797; background: #274e5a; color: #e8eed5; font: inherit; font-size: .75rem; font-weight: 800; cursor: pointer; }
    .river-stops button[aria-pressed="true"] { border-color: #ffdc93; background: #765b4d; color: #fff1bf; }
    .river-stops button:disabled { opacity: .6; cursor: default; }
    .river-controls button:focus-visible, .river-stops button:focus-visible { outline: 3px solid #fff4cf; outline-offset: 3px; }
    .spot-note { margin: 11px 0 0; color: #d4e6ce; font-size: .8rem; line-height: 1.4; }
    .river-keys { margin: 8px 0 0; color: #a9c6ca; font-size: .74rem; line-height: 1.4; }
    canvas { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; image-rendering: pixelated; image-rendering: crisp-edges; background: #759eb5; cursor: crosshair; touch-action: none; }
    .fight-panel { position: absolute; z-index: 4; inset: auto 24px 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; border: 3px solid #f6e4ba; background: #14233fe8; box-shadow: 5px 5px 0 #071225; }
    .fight-panel[hidden] { display: none; }
    .meter-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; color: #f6efd6; font-size: .77rem; font-weight: 900; text-transform: uppercase; }
    .meter-track { height: 15px; border: 2px solid #738faa; background: #0a1830; overflow: hidden; }
    .meter-fill { display: block; height: 100%; width: 0; background: #78d8b0; transition: width .08s linear, background .08s linear; }
    .meter-fill.tension { background: #ffc77f; }
    .meter-fill.tension.danger { background: #ff716f; }
    .dashboard { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center; margin-top: 25px; }
    .controls { display: flex; align-items: center; gap: 20px; min-width: 0; }
    .cast { flex: none; min-width: 210px; min-height: 62px; padding: 12px 18px; border: 3px solid #ffe1a7; background: #ffb76d; color: #27304a; box-shadow: 5px 5px 0 #703b4c; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; font-size: 1rem; font-weight: 900; letter-spacing: .03em; text-transform: uppercase; transition: transform .08s, box-shadow .08s; }
    .cast:hover { background: #ffcd87; }
    .cast:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 #703b4c; }
    .cast:focus-visible, canvas:focus-visible { outline: 3px solid #fff4cf; outline-offset: 5px; }
    .cast:disabled { border-color: #647d92; background: #435a70; color: #b8c9c6; box-shadow: 4px 4px 0 #15263e; cursor: default; }
    .prompt { min-width: 0; }
    .prompt strong { display: block; font-size: .99rem; color: #fff4cf; line-height: 1.4; }
    .prompt span { display: block; margin-top: 4px; font-size: .82rem; color: #a9c6ca; line-height: 1.45; }
    .scoreboard { display: flex; gap: 9px; }
    .stat { min-width: 111px; padding: 9px 13px; border: 2px solid #536b85; background: #1c2c48; box-shadow: 4px 4px 0 #0a1328; }
    .stat-label { display: block; margin-bottom: 2px; font-size: .72rem; color: #a9c6ca; text-transform: uppercase; letter-spacing: .06em; }
    .stat-value { display: block; font-size: 1.45rem; line-height: 1.2; color: #ffce88; font-weight: 900; }
    .mastery { margin-top: 22px; padding: 17px 19px; border: 2px solid #638893; background: #1d3446; box-shadow: 5px 5px 0 #0a1328; }
    .mastery-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
    .mastery-head h2 { margin: 0; font-size: 1rem; text-transform: uppercase; letter-spacing: .04em; color: #fff0c7; }
    .mastery-count { color: #a7e0c1; font-size: 1.1rem; font-weight: 900; white-space: nowrap; }
    .mastery-track { height: 12px; margin-top: 12px; border: 2px solid #79949b; background: #10273b; }
    .mastery-fill { display: block; width: 0; height: 100%; background: #83c9a9; transition: width .2s linear; }
    .mastery-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 0; padding: 0; list-style: none; }
    .mastery-list li { min-height: 76px; padding: 10px; border: 2px solid #526d7c; background: #243c51; color: #d2dfe0; font-size: .8rem; line-height: 1.35; }
    .mastery-list li.done { border-color: #7ac4a1; background: #294c4d; color: #d8f1da; }
    .mastery-mark { display: block; margin-bottom: 5px; color: #ffc982; font-size: 1rem; font-weight: 900; }
    .mastery-list li.done .mastery-mark { color: #aaf0bf; }
    .mastery-note { margin: 12px 0 0; color: #b9d0ce; font-size: .78rem; line-height: 1.4; }
    .trophy-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 7px 16px; margin: 13px 0 0; padding: 0; list-style: none; color: #ffe0ae; font-size: .82rem; }
    .trophy-list li { padding: 7px 9px; border: 1px solid #5c7887; background: #243c51; }
    .equipment-shop { margin-top: 24px; padding: 17px 19px; border: 2px solid #638893; background: #1d3446; box-shadow: 5px 5px 0 #0a1328; }
    .equipment-shop[hidden] { display: none; }
    .equipment-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 7px 18px; }
    .equipment-head h2 { margin: 0; color: #fff0c7; font-size: 1rem; text-transform: uppercase; }
    .equipment-wallet { color: #ffd18a; font-size: .86rem; font-weight: 900; }
    .equipment-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 13px; }
    .equipment-option { padding: 13px; border: 2px solid #597887; background: #243c51; }
    .equipment-option[data-selected="true"] { border-color: #ffcf81; }
    .equipment-option.glasses-option { grid-column: 1 / -1; }
    .equipment-option h3 { margin: 0; color: #fff0c7; font-size: .9rem; }
    .equipment-option p { margin: 8px 0; color: #c2d4d3; font-size: .78rem; line-height: 1.4; }
    .equipment-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
    .equipment-actions button { min-height: 44px; padding: 7px 10px; border: 2px solid #d8cfaa; background: #315d69; color: #fff1cd; font: inherit; font-size: .77rem; font-weight: 800; cursor: pointer; }
    .equipment-actions button:disabled { opacity: .5; cursor: default; }
    .equipment-actions button:focus-visible { outline: 3px solid #fff4cf; outline-offset: 3px; }
    .equipment-status { margin: 12px 0 0; color: #a7e0c1; font-size: .8rem; line-height: 1.4; }
    .rod-heading { margin: 18px 0 7px; color: #fff0c7; font-size: .9rem; text-transform: uppercase; }
    .rod-status { margin: 0; color: #a7e0c1; font-size: .8rem; line-height: 1.4; }
    .rod-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
    .lure-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
    .lure-option { padding: 12px; border: 2px solid #597887; background: #243c51; }
    .lure-option[data-selected="true"] { border-color: #ffcf81; }
    .lure-option h4 { margin: 0; color: #fff0c7; font-size: .84rem; }
    .lure-option p { margin: 8px 0; color: #c2d4d3; font-size: .76rem; line-height: 1.4; }
    .rod-option { padding: 12px; border: 2px solid #597887; background: #243c51; }
    .rod-option[data-selected="true"] { border-color: #ffcf81; }
    .rod-option h4 { margin: 0; color: #fff0c7; font-size: .84rem; }
    .rod-option p { margin: 8px 0; color: #c2d4d3; font-size: .76rem; line-height: 1.4; }
    .rod-reach-track { height: 10px; border: 2px solid #819a9b; background: #14283d; }
    .rod-reach-fill { display: block; height: 100%; background: #f4bc79; }
    .method-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
    .method-card { padding: 12px; border: 2px solid #597887; background: #243c51; }
    .method-card[data-selected="true"] { border-color: #ffcf81; }
    .method-card h4 { margin: 0; color: #fff0c7; font-size: .84rem; }
    .method-card p { margin: 8px 0; color: #c2d4d3; font-size: .76rem; line-height: 1.4; }
    .spin-controls { margin-top: 12px; padding: 12px; border: 2px solid #799b9b; background: #1c3948; color: #e4ecd4; font-size: .8rem; }
    .spin-controls label { display: flex; align-items: center; gap: 12px; }
    .spin-controls input { flex: 1; min-width: 0; accent-color: #ffc77c; }
    .spin-controls select { flex: 1; min-width: 0; min-height: 40px; padding: 4px; border: 2px solid #9db8a7; background: #213f50; color: #fff2ce; font: inherit; }
    .spin-controls p { margin: 8px 0 0; line-height: 1.45; }
    .fight-advice { grid-column: 1 / -1; margin: 2px 0 0; color: #fff0c2; font-size: .76rem; line-height: 1.35; }
    .fight-controls { grid-column: 1 / -1; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #fff0c2; font-size: .76rem; font-weight: 800; }
    .fight-controls label { display: flex; align-items: center; gap: 7px; }
    .fight-controls select, .fight-controls button { min-height: 42px; border: 2px solid #d8cfaa; background: #315d69; color: #fff1cd; font: inherit; font-weight: 800; }
    .fight-controls select { padding: 4px 6px; }
    .fight-controls button { min-width: 82px; padding: 6px 10px; touch-action: none; user-select: none; cursor: pointer; }
    .fight-controls button:active, .fight-controls button[aria-pressed="true"] { background: #aa664c; }
    .fight-controls button:focus-visible, .fight-controls select:focus-visible { outline: 3px solid #fff4cf; outline-offset: 2px; }
    .snag-track { grid-column: 1 / -1; height: 9px; border: 1px solid #ad9a7c; background: #0a1830; }
    .snag-fill { display: block; width: 0; height: 100%; background: #ff8b6b; }
    .snag-label { grid-column: 1 / -1; display: flex; justify-content: space-between; margin-bottom: -8px; color: #ffcfaa; font-size: .73rem; font-weight: 800; text-transform: uppercase; }
    .boat-shop { display: grid; grid-template-columns: 82px minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 27px; padding: 17px 20px; border: 2px solid #7390a2; background: #203650; box-shadow: 5px 5px 0 #0a1328; }
    .boat-shop.owned { border-color: #e3bf80; }
    .boat-art { display: grid; place-items: center; width: 82px; height: 72px; border: 2px solid #6284a0; background: #315873; }
    .boat-art svg { display: block; width: 66px; height: 50px; image-rendering: pixelated; }
    .boat-info { min-width: 0; }
    .boat-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
    .boat-title h2 { margin: 0; color: #fff1cf; font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; }
    .boat-wallet { color: #ffd18a; font-size: .88rem; font-weight: 900; }
    .boat-description { margin: 6px 0 0; color: #b9d0ce; font-size: .86rem; line-height: 1.45; }
    .boat-progress-row { display: flex; align-items: center; gap: 11px; margin-top: 10px; }
    .boat-progress-row[hidden] { display: none; }
    .boat-progress-track { width: min(200px, 100%); height: 11px; border: 2px solid #7896aa; background: #101e36; }
    .boat-progress-fill { display: block; width: 0; height: 100%; background: #ffcb7e; }
    .boat-progress-count { white-space: nowrap; color: #e7d6b6; font-size: .77rem; }
    .boat-status { margin: 6px 0 0; color: #b9d0ce; font-size: .8rem; }
    .buy-boat { min-width: 171px; min-height: 56px; padding: 10px 14px; border: 2px solid #fff0c3; background: #f4b66d; color: #26344b; box-shadow: 4px 4px 0 #754a55; cursor: pointer; font-size: .9rem; font-weight: 900; text-transform: uppercase; }
    .buy-boat:hover:not(:disabled) { background: #ffcc87; }
    .buy-boat:disabled { border-color: #647d92; background: #435a70; color: #b8c9c6; box-shadow: 4px 4px 0 #15263e; cursor: default; }
    .buy-boat:focus-visible { outline: 3px solid #fff4cf; outline-offset: 5px; }
    .destinations { margin-top: 27px; padding-top: 21px; border-top: 1px solid #344663; }
    .destinations-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 13px; }
    .destinations-heading h2 { margin: 0; font-size: 1rem; line-height: 1.4; color: #f6efd6; text-transform: uppercase; letter-spacing: .055em; }
    .destinations-heading span, .map-note { font-size: .8rem; color: #a9c6ca; line-height: 1.45; }
    .route-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 27px; margin: 0; padding: 20px; list-style: none; border: 2px solid #54757e; background: repeating-linear-gradient(135deg, #1b3845 0 26px, #1d3b48 26px 52px); }
    .map-stop { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 174px; padding: 13px 15px; border: 2px solid #586f83; background: #1b2d47; box-shadow: 4px 4px 0 #0a1328; }
    .map-stop:nth-child(4) { grid-column: 3; grid-row: 2; }
    .map-stop:nth-child(5) { grid-column: 2; grid-row: 2; }
    .map-stop:nth-child(6) { grid-column: 1; grid-row: 2; }
    .map-stop:not(:last-child)::after { content: ''; position: absolute; z-index: 0; top: 50%; right: -29px; width: 27px; border-top: 3px dashed #86b8ac; }
    .map-stop:nth-child(3)::after { top: auto; right: auto; bottom: -30px; left: 50%; width: 0; height: 28px; border-top: 0; border-left: 3px dashed #86b8ac; }
    .map-stop:nth-child(4)::after, .map-stop:nth-child(5)::after { right: auto; left: -29px; }
    .map-stop[data-status="available"] { border-color: #76c5a7; background: #214342; }
    .map-stop[data-status="open"] { border-color: #dfb978; }
    .map-stop[data-current="true"] { outline: 3px solid #fff1c7; outline-offset: 3px; }
    .map-stop-head { display: flex; align-items: center; gap: 10px; }
    .map-number { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 2px solid #dcbf86; background: #354d60; color: #ffe0a0; font-size: .94rem; font-weight: 900; }
    .map-stop h3 { margin: 0; color: #fff4cf; font-size: .94rem; line-height: 1.3; }
    .map-place { margin: 12px 0 0; color: #c2d2d1; font-size: .79rem; line-height: 1.4; }
    .map-foot { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 7px; margin-top: auto; padding-top: 13px; }
    .map-status, .map-current { padding: 4px 6px; border: 1px solid #7995a4; color: #b9cdd0; font-size: .69rem; font-weight: 900; text-transform: uppercase; }
    .map-stop[data-status="available"] .map-status { border-color: #83d0ad; color: #aaf0bf; }
    .map-stop[data-status="open"] .map-status { border-color: #dfb978; color: #ffe0a0; }
    .map-current { border-color: #fff1c7; color: #fff1c7; }
    .map-current[hidden] { display: none; }
    .map-requirements { margin: 10px 0 0; color: #adbfca; font-size: .74rem; line-height: 1.45; }
    .map-travel { min-height: 38px; align-self: flex-start; margin-top: 11px; padding: 7px 10px; border: 2px solid #e6c48b; background: #f4b66d; color: #26344b; cursor: pointer; font-size: .76rem; font-weight: 900; }
    .map-travel:disabled { border-color: #647d92; background: #344e61; color: #aabdc0; cursor: default; }
    .map-travel:focus-visible { outline: 3px solid #fff4cf; outline-offset: 4px; }
    .map-note { margin: 12px 0 0; }
    .footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 33px; padding-top: 16px; border-top: 1px solid #344663; color: #7f9bad; font-size: .78rem; }
    .footer p { margin: 0; }
    @media (max-width: 760px) {
      .shell { width: min(100% - 20px, 580px); padding-top: 18px; }
      .topbar { margin-bottom: 16px; }
      .status { display: none; }
      .game-frame { padding: 5px; border-width: 2px; box-shadow: 0 0 0 3px #0b152a, 5px 5px 0 #070f22; }
      .game-frame::before { inset: 5px; }
      .meter-title { font-size: .75rem; }
      .meter-track { height: 11px; }
      .dashboard { grid-template-columns: 1fr; gap: 18px; margin-top: 18px; }
      .controls { align-items: stretch; gap: 16px; }
      .cast { min-width: 145px; min-height: 58px; font-size: .9rem; }
      .prompt { align-self: center; }
      .scoreboard { justify-content: stretch; }
      .stat { flex: 1; }
      .mastery { padding: 13px; }
      .mastery-list { grid-template-columns: 1fr; gap: 7px; }
      .mastery-list li { min-height: 0; }
      .equipment-options { grid-template-columns: 1fr; }
      .rod-options, .lure-options { grid-template-columns: 1fr; }
      .method-options { grid-template-columns: 1fr; }
      .boat-shop { grid-template-columns: 64px minmax(0, 1fr); gap: 13px; padding: 13px; margin-top: 22px; }
      .boat-art { width: 64px; height: 64px; }
      .boat-art svg { width: 56px; height: 45px; }
      .buy-boat { grid-column: 1 / -1; width: 100%; }
      .destinations { margin-top: 24px; }
      .route-map { grid-template-columns: 1fr; gap: 19px; padding: 13px; }
      .map-stop { min-height: 0; }
      .map-stop:nth-child(4), .map-stop:nth-child(5), .map-stop:nth-child(6) { grid-column: auto; grid-row: auto; }
      .map-stop:not(:last-child)::after, .map-stop:nth-child(3)::after, .map-stop:nth-child(4)::after, .map-stop:nth-child(5)::after { top: auto; right: auto; bottom: -22px; left: 24px; width: 0; height: 21px; border-top: 0; border-left: 3px dashed #86b8ac; }
      .footer { flex-direction: column; gap: 5px; margin-top: 27px; }
    }
    @media (max-width: 410px) {
      .brand-icon { width: 36px; height: 36px; font-size: 19px; }
      .controls { flex-direction: column; }
      .cast { width: 100%; }
      .prompt { width: 100%; }
    }
    @media (prefers-reduced-motion: reduce) { .cast, .river-viewport { transition: none; } }
  #extra-gear button, #use-net { min-height: 44px; padding: 10px 14px; margin: 6px; font: inherit; cursor: pointer; }
    #achievement-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
    #achievement-list article { border: 2px solid #7897a2; padding: 12px; }
    @media (max-width: 540px) { .main-menu button { flex-basis: 40%; } }
    .water-navigation { margin: 18px 0; padding: 18px; border: 2px solid #628b94; background: #132f40; }
    .water-navigation[hidden], .vessel-pad[hidden] { display: none; }
    .water-heading { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: center; }
    .water-heading h2 { margin: 5px 0; font-size: 1.2rem; color: #fff0bb; }
    .water-eyebrow { color: #86bbbd; font-size: .67rem; letter-spacing: .12em; }
    #water-area { color: #aacbcd; font-size: .8rem; }
    #vessel-status { color: #e9d7ab; font-size: .88rem; line-height: 1.5; }
    .water-chart { position: relative; height: 160px; overflow: hidden; border: 2px solid #5e8d9b; touch-action: none; background: repeating-linear-gradient(90deg, transparent 0 12.4%, #ffffff0b 12.4% 12.5%), linear-gradient(#507b64 0 15%, #559b9c 15% 48%, #286477 48% 76%, #1c485f 76%); cursor: crosshair; }
    .chart-bank, .chart-depth { position: absolute; left: 8px; color: #dce6bf; font-size: .56rem; letter-spacing: .08em; pointer-events: none; }
    .chart-bank { top: 4px; } .chart-depth { bottom: 6px; opacity: .65; }
    .chart-dock { position: absolute; top: 16%; transform: translateX(-50%); border: 1px solid #e7cd91; background: #684f42; color: #fff1c2; min-height: 36px; min-width: 32px; cursor: pointer; }
    .chart-obstacle { position: absolute; border: 1px dashed #e5ab7a; background: #de9a6a55; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; }
    .chart-vessel, .chart-target { position: absolute; transform: translate(-50%, -50%); pointer-events: none; color: #fff2c1; text-shadow: 0 2px #172a35; }
    .chart-target { color: #ffbf7f; font-size: 24px; }
    .water-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
    .water-actions button, .vessel-pad button { min-height: 44px; padding: 9px 13px; border: 2px solid #8cb0ac; background: #284e58; color: #fff0c2; cursor: pointer; font: inherit; font-size: .82rem; }
    .water-actions button:disabled { opacity: .45; cursor: default; }
    .water-actions button[aria-pressed="true"] { background: #5c775b; }
    .vessel-pad { display: flex; gap: 8px; margin-top: 10px; }
    .vessel-pad button { width: 54px; font-size: 1.2rem; touch-action: none; }
    .water-help { color: #abc7c6; font-size: .78rem; line-height: 1.6; margin: 10px 0 0; }
    @media (max-width: 540px) { .water-navigation { padding: 12px; } .water-actions button { flex: 1 1 45%; } }


/* Play screen: scene first, one primary action, secondary features on their own screens. */
.shell { width: min(1200px, 100% - 40px); padding-top: 20px; }
.topbar { margin-bottom: 16px; }
.main-menu { flex-wrap: nowrap; gap: 8px; margin-bottom: 20px; }
.main-menu button { min-height: 46px; }
.status { display: none; }
.game-frame { padding: 0; border: 2px solid #708a91; box-shadow: 0 0 0 4px #0b152a; overflow: hidden; }
.game-frame::before { inset: 0; box-shadow: inset 0 0 0 3px #0a1a2f33; }
.cast-meter { top: 12px; left: 50%; bottom: auto; width: min(258px, calc(100% - 32px)); transform: translateX(-50%); padding: 8px 10px; background: #172c3df5; }
.cast-meter-track { height: 16px; }
.cast-meter-marker { height: 24px; }
.cast-meter-note { font-size: .62rem; }
.fight-panel { position: relative; inset: auto; padding: 12px; border: 0; border-top: 2px solid #9cb5a9; background: #162d40; box-shadow: none; }
.river-controls { align-items: center; margin-top: 12px; }
.play-position { text-align: center; color: #d0dfd3; font-size: .78rem; }
.dashboard { grid-template-columns: minmax(0, 1fr) auto; margin-top: 14px; gap: 16px; }
.controls { gap: 16px; }
.cast { min-width: 210px; min-height: 58px; font-size: .88rem; }
.stat { min-width: 80px; padding: 6px 10px; box-shadow: none; background: transparent; border: 0; }
.stat-label { font-size: .62rem; }
.stat-value { font-size: 1.25rem; }
#free-streak { margin: 12px 0 0; color: #9ebbb8; font-size: .72rem; }
#achievement-toast:empty { display: none; }
.section-heading h2 { color: #fff0c7; margin: 0 0 8px; font-size: 1.2rem; }
.section-heading p { color: #a9c6ca; margin: 0 0 20px; font-size: .82rem; }
#view-map .river-navigation { margin-top: 0; }
#view-map .river-stops { grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); }
#view-map .water-chart { height: 230px; }
.map-help { margin-top: 14px; padding-top: 12px; border-top: 1px solid #54757e; }
.map-help summary { min-height: 44px; cursor: pointer; color: #d4e6ce; font-size: .86rem; }
#view-achievements .mastery:first-child { margin-top: 0; }
#view-events .round-panel, #view-events .tournament-setup { box-shadow: none; }
#extra-gear p { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #54757e; font-size: .8rem; line-height: 1.5; }
#extra-gear p span { flex: 1; }
#extra-gear p button { flex: none; }

/* Backpack: a paper doll, clear categories, and illustrated item cards. */
.gear-layout { display: grid; grid-template-columns: 350px minmax(0, 1fr); gap: 24px; align-items: start; }
.character-panel { position: sticky; top: 18px; border: 2px solid #668895; background: #192d42; padding: 18px 14px; box-shadow: 5px 5px 0 #09182a; }
.eyebrow { color: #a7c3bd; font-size: .62rem; letter-spacing: .14em; }
.character-heading { text-align: center; }
.character-heading h3 { margin: 7px 0 18px; font-size: 1.25rem; color: #ffcf8e; }
.paperdoll { display: grid; grid-template-columns: 85px minmax(0, 1fr) 85px; grid-template-rows: repeat(3, 97px); gap: 8px; align-items: stretch; }
.character-portrait { grid-column: 2; grid-row: 1 / 4; display: flex; flex-direction: column; align-items: center; justify-content: center; background: radial-gradient(ellipse, #48696a 0%, #203b48 56%, #15283c 80%); border: 1px solid #496777; }
.character-portrait svg { width: 100%; max-width: 145px; height: auto; image-rendering: pixelated; }
.character-name { margin-top: 12px; color: #92b5b8; font-size: .5rem; text-align: center; line-height: 1.6; }
.equipment-slot { display: flex; flex-direction: column; justify-content: center; align-items: center; min-width: 0; padding: 5px; border: 2px solid #e4bd78; background: #284655; color: #f5e9cf; cursor: pointer; }
.equipment-slot.is-empty { border-color: #536f7d; background: #203548; }
.equipment-slot:hover { background: #355d65; }
.equipment-slot:focus-visible, .inventory-tabs button:focus-visible { outline: 3px solid #ffe1a7; outline-offset: 3px; }
.slot-head { grid-column: 1; grid-row: 1; }.slot-hand { grid-column: 1; grid-row: 2; }.slot-feet { grid-column: 1; grid-row: 3; }
.slot-line { grid-column: 3; grid-row: 1; }.slot-reel { grid-column: 3; grid-row: 2; }.slot-tool { grid-column: 3; grid-row: 3; }
.slot-label { color: #adcbc5; text-transform: uppercase; font-size: .55rem; }
.slot-icon { display: block; height: 42px; }.slot-icon svg { display: block; width: 42px; height: 42px; }
.slot-name { font-size: .61rem; line-height: 1.3; text-align: center; }
.loadout-summary { margin: 18px 0 0; padding: 12px 0; border-block: 1px solid #3f5b6c; color: #edcf97; font-size: .72rem; line-height: 1.6; }
.loadout-lock { color: #ffc5a4; font-size: .73rem; line-height: 1.6; }.loadout-lock:empty { display: none; }
.character-help { margin-bottom: 0; color: #9dbdbb; font-size: .67rem; line-height: 1.6; }
.gear-catalog { min-width: 0; }
.inventory-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.inventory-tabs button { flex: 1 1 auto; min-height: 44px; padding: 8px; border: 1px solid #668794; background: #213b50; color: #c9ddd4; cursor: pointer; font-size: .73rem; }
.inventory-tabs button[aria-pressed="true"] { border-color: #f8d89e; background: #ffbf78; color: #293349; font-weight: 900; }
.category-help, .category-note { color: #a9c6c3; font-size: .77rem; line-height: 1.7; }
#equipment-shop { margin-top: 16px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.equipment-head { margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid #4b6379; }
#view-gear .rod-heading { font-size: .88rem; margin-top: 18px; }
#view-gear .equipment-options, #view-gear .rod-options, #view-gear .method-options, #view-gear .lure-options, #extra-gear { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#view-gear .equipment-option, #view-gear .rod-option, #view-gear .method-card, #view-gear .lure-option, .inventory-card, .spin-upgrade-card { min-width: 0; padding: 14px; border: 1px solid #537383; background: #20384d; box-shadow: 3px 3px 0 #0c1f32; }
#view-gear .equipment-option.glasses-option { grid-column: auto; }
#view-gear [data-selected="true"] { border-color: #eebc78; background: #294449; }
#view-gear .item-art { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.item-art > svg { width: 58px; height: 58px; flex: none; border: 1px solid #587486; background: #152a3c; padding: 3px; image-rendering: pixelated; }
#rod-river .item-art svg > path:first-child { fill: #92b59b; }
#rod-long .item-art svg > path:first-child { fill: #e8bf76; }
#gear-line-strong .item-art svg > path:nth-child(2) { fill: #8fae84; }
#gear-line-sensitive .item-art svg > path:nth-child(2) { fill: #cf8c8d; }
.item-state { color: #abc4c0; font-size: .56rem; font-weight: 800; line-height: 1.5; letter-spacing: .03em; }
[data-selected="true"] .item-state { color: #f6cf8c; }
#view-gear h3, #view-gear h4 { line-height: 1.4; }
#view-gear .inventory-card h3, .spin-upgrade-card h4 { margin: 0; color: #fff0c7; font-size: .9rem; }
#view-gear .inventory-card p, .spin-upgrade-card p { display: block; border: 0; padding: 0; margin: 8px 0; color: #bcd3cc; font-size: .77rem; line-height: 1.65; }
#view-gear .equipment-option p, #view-gear .rod-option p, #view-gear .method-card p, #view-gear .lure-option p { font-size: .77rem; line-height: 1.65; }
#view-gear .item-stock, #equipment-basic-stock, #equipment-worm-stock, #boots-status, #equipment-glasses-status, [id^="lure-stock-"] { color: #f0c68f !important; }
#view-gear .equipment-actions { gap: 7px; margin-top: 14px; }
#view-gear .equipment-actions button { width: 100%; min-height: 44px; font-size: .72rem; border-width: 1px; }
#view-gear .equipment-actions button[aria-pressed="true"] { background: #526d59; }
#view-gear .rod-reach-track { margin-top: 12px; height: 6px; border-width: 1px; }
#view-gear .rod-status { font-size: .73rem; line-height: 1.6; }
.spin-upgrade-card { margin-top: 12px; }
.spin-upgrade-card .equipment-actions span { color: #adc6c4; font-size: .72rem; line-height: 1.6; }
.extra-gear-section { padding-top: 16px; }.extra-gear-section > h3 { margin-top: 0; color: #ffdb9e; }
#avatar-rod[data-method="spinning"] > path:first-child { fill: #81c4c8; }
#avatar-rod[data-method="float"][data-rod="river"] > path:first-child { fill: #92b59b; }
#avatar-rod[data-method="float"][data-rod="long"] > path:first-child { fill: #e8bf76; }
@media (max-width: 960px) {
  .gear-layout { grid-template-columns: 310px minmax(0, 1fr); gap: 18px; }
  .paperdoll { grid-template-columns: 76px minmax(0, 1fr) 76px; }
  #view-gear .rod-options, #view-gear .method-options, #view-gear .lure-options, #extra-gear, #view-gear .equipment-options { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .gear-layout { grid-template-columns: 1fr; gap: 22px; }
  .character-panel { position: static; padding: 14px 12px; }
  .paperdoll { grid-template-columns: 85px minmax(0, 1fr) 85px; grid-template-rows: repeat(3, 86px); }
  .character-heading h3 { margin-bottom: 12px; }.character-portrait svg { max-width: 145px; }
  .character-name { display: none; }
  .inventory-tabs button { flex: 1 1 30%; padding: 8px 4px; font-size: .7rem; }
  #view-gear .equipment-options, #view-gear .rod-options, #view-gear .method-options, #view-gear .lure-options, #extra-gear { grid-template-columns: 1fr; }
}
button, summary, select { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

@media (max-width: 700px) {
  .shell { width: calc(100% - 24px); padding: 14px 0 max(16px, env(safe-area-inset-bottom)); }
  .topbar { margin-bottom: 12px; }
  .brand { gap: 10px; }
  .tag { font-size: .68rem; line-height: 1.4; }
  .main-menu { gap: 5px; margin-bottom: 14px; }
  .main-menu button { flex: 1 1 0; min-height: 44px; padding: 8px 2px; box-shadow: none; font-size: .64rem; letter-spacing: 0; }
  .dashboard { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; background: #15283d; border: 1px solid #54757e; }
  .controls { width: 100%; flex-direction: column; gap: 10px; }
  .cast { width: 100%; min-height: 56px; min-width: 0; box-shadow: 3px 3px 0 #703b4c; }
  .prompt { width: 100%; }
  .prompt strong { font-size: .85rem; }
  .prompt span { font-size: .74rem; line-height: 1.4; }
  .scoreboard { width: 100%; justify-content: center; gap: 24px; }
  .stat { display: flex; align-items: center; gap: 8px; padding: 0; }
  .stat-label { margin: 0; font-size: .65rem; }
  .stat-value { font-size: 1rem; }
  .play-position { font-size: .68rem; line-height: 1.3; }
  .river-controls { gap: 6px; }
  .river-controls button { padding: 6px 9px; font-size: .73rem; }
  .fight-panel { inset: auto; padding: 8px; gap: 8px; border-width: 0; border-top-width: 2px; box-shadow: none; }
  .fight-controls { gap: 6px; }
  .fight-controls label { flex: 1 1 100%; }
  .fight-controls select { flex: 1; min-width: 0; }
  .fight-controls button { flex: 1; min-height: 44px; }
  .fight-advice { font-size: .67rem; }
  .meter-title { font-size: .66rem; }
  .cast-meter { top: 8px; padding: 8px 10px; }
  .water-chart { margin-bottom: 10px; }
  #view-map .water-chart { height: 250px; }
  .chart-dock { min-width: 36px; min-height: 44px; }
  .chart-dock:nth-child(even) { top: 38%; }
  .chart-bank { font-size: .5rem; }
  #view-map .river-stops { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tournament-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tournament-fields input, .tournament-fields select { width: 100%; }
  .round-button { min-height: 44px; }
  #leaderboard-panel { overflow-x: auto; }
  #extra-gear p { flex-wrap: wrap; }
  #extra-gear p button { width: 100%; margin: 0; }
  .footer { margin-top: 16px; }
}
@media (max-width: 540px) {
  canvas { aspect-ratio: 3 / 2; height: auto; }
  .cast-meter-head { font-size: .66rem; }
  .cast-meter-note { font-size: .62rem; }
  .cast-meter-track { height: 16px; }
  .cast-meter-marker { height: 24px; }
  .fight-advice { display: none; }
  .water-heading h2 { font-size: 1rem; }
  .brand-icon { width: 32px; height: 32px; }
  h1 { font-size: 1.1rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .shell { width: min(880px, 100% - 24px); padding-top: 8px; }
  .topbar { display: none; }
  .main-menu { margin-bottom: 10px; }
  #view-fishing { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 12px; align-items: start; }
  #game-frame { grid-column: 1; grid-row: 1 / 4; }
  #river-controls, #dashboard, #free-streak { grid-column: 2; margin-top: 0; }
  #round-hud, #round-result { grid-column: 1 / -1; }
  .dashboard { padding: 8px; }
  .controls { flex-direction: column; }
  .cast { min-width: 0; width: 100%; }
  canvas { aspect-ratio: 2 / 1; }
  #game-frame:has(.fight-panel:not([hidden])) canvas { aspect-ratio: 3 / 1; }
  .fight-panel { padding: 6px 8px; gap: 5px; }
  .fight-advice { display: none; }
}
@media (max-width: 700px) {
  #round-hud { gap: 8px; padding: 10px; }
  #round-hud strong { font-size: .8rem; }
  #round-hud .round-stats { width: 100%; gap: 12px; font-size: .62rem; }
  #round-hud .round-stats b { font-size: 1rem; }
  #round-hud .round-gap { display: none; }
  #round-hud #round-gear { display: block; font-size: .66rem; }
  #round-hud .round-goal-line { font-size: .68rem; }
}
@media (max-height: 520px) and (orientation: landscape) {
  #dashboard { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  #dashboard .controls { width: 100%; flex-direction: column; gap: 10px; }
  #dashboard .cast { width: 100%; min-width: 0; min-height: 50px; padding: 8px; font-size: .76rem; }
  #dashboard .prompt strong { font-size: .73rem; }
  #dashboard .prompt span { font-size: .66rem; }
  #dashboard .scoreboard { justify-content: center; gap: 8px; }
  #dashboard .stat { min-width: 0; padding: 0; }
  #dashboard .stat-label { font-size: .56rem; }
  #dashboard .stat-value { font-size: 1rem; }
  #river-controls { display: grid; grid-template-columns: 44px 1fr 44px; gap: 5px; }
  #river-controls button { min-width: 0; padding: 5px; font-size: 0; }
  #river-left::after { content: '←'; font-size: 1rem; }
  #river-right::after { content: '→'; font-size: 1rem; }
  #free-streak, .footer { display: none; }
}
@media (max-width: 700px) {
  .fight-controls { display: grid; grid-template-columns: 1fr 1fr 1.2fr; align-items: end; }
  .fight-controls button { min-width: 0; padding: 6px 3px; font-size: .68rem; }
  .fight-controls label { display: grid; gap: 3px; font-size: .58rem; }
  .fight-controls select { width: 100%; min-width: 0; font-size: .65rem; }
}

/* Bottom survey and daily jobs use the same compact panels as mastery. */
.sonar-panel button, .job-card button { min-height: 44px; padding: 9px 14px; border: 2px solid #9eac96; background: #233e51; color: #f7e7c3; font: inherit; cursor: pointer; }
.sonar-panel button:disabled, .job-card button:disabled { opacity: .55; cursor: default; }
.sonar-panel .mastery-head { flex-wrap: wrap; gap: 12px; }
.sonar-profile { display: flex; align-items: flex-end; height: 170px; padding-top: 24px; overflow: hidden; border: 2px solid #80b6ad; background: repeating-linear-gradient(0deg, transparent 0 32px, #c3e7c615 32px 33px), linear-gradient(#286b78, #122e48); }
.sonar-column { position: relative; flex: 1; min-width: 0; border-top: 3px solid #e4c783; background: #7b7356; }
.sonar-column > span { position: absolute; top: -23px; left: 0; color: #f9eac8; white-space: nowrap; font-size: 11px; }
.sonar-plan { position: relative; height: 150px; margin-top: 12px; border: 2px solid #80b6ad; background: repeating-linear-gradient(90deg, transparent 0 24.8%, #c3e7c625 24.8% 25%), linear-gradient(#327d85, #163c53); }
.sonar-object { position: absolute; transform: translate(-50%, -50%); font: bold 26px monospace; color: #ffce8c; }
.chart-survey { position: absolute; top: 18%; bottom: 7%; border: 1px solid #a6dfcb; background: #a6dfcb16; pointer-events: none; }
.jobs-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.job-card { padding: 16px; border: 1px solid #638a8b; background: #213b4f; }
.job-card h3 { margin: 0 0 10px; color: #edd399; }
.job-card p { line-height: 1.6; }
.fish-guide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; padding-left: 24px; }
@media (max-width: 640px) { .jobs-list, .fish-guide { grid-template-columns: 1fr; } .sonar-panel { padding: 16px; } .sonar-panel h2 { font-size: 19px; } }

.lesson-panel, .underwater-panel { margin-top: 14px; padding: 16px; border: 2px solid #729e9f; background: #1c354b; }
.lesson-panel[hidden], .underwater-panel[hidden] { display: none; }
.lesson-panel .mastery-head { flex-wrap: wrap; gap: 10px; }
.lesson-panel h2 { font-size: 18px; margin: 0; }
.lesson-panel progress { width: 100%; height: 12px; accent-color: #aad9aa; }
.underwater-panel summary { cursor: pointer; min-height: 32px; color: #eed49d; }
#underwater { display: block; width: 100%; max-width: 720px; height: auto; max-height: none; aspect-ratio: 32 / 9; margin: 0 auto; cursor: default; touch-action: auto; image-rendering: pixelated; border: 1px solid #80b6ad; }
.marks-panel form { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.marks-panel label { display: grid; gap: 6px; min-width: 0; }
.marks-panel input, .marks-panel select { width: 100%; min-width: 0; padding: 10px; background: #152e44; border: 1px solid #85a9a4; color: #f5e6c6; font: inherit; }
.marks-panel label:last-of-type, #mark-position, .marks-panel .equipment-actions { grid-column: 1 / -1; }
.chart-mark { position: absolute; transform: translate(-50%, -50%); z-index: 3; min-width: 28px; min-height: 28px; border: 1px solid #e5c982; border-radius: 50%; background: #253e53; color: #ffe4a5; cursor: pointer; }
.sonar-plan { cursor: crosshair; touch-action: manipulation; }
.lesson-panel button, #lesson-start { min-height: 44px; padding: 10px; background: #25465d; color: #f9e6b8; border: 1px solid #98b7a4; font: inherit; cursor: pointer; }
@media (max-width: 640px) { .marks-panel form { grid-template-columns: 1fr; } .marks-panel .equipment-actions { flex-wrap: wrap; } }

.chart-survey-cell, #chart-scanning { position: absolute; pointer-events: none; }
.chart-survey-cell { background: #92d0a655; border: 1px solid #92d0a655; }
#chart-scanning { background: #ffb96877; border: 1px solid #ffd591; border-radius: 50%; z-index: 2; }
.sonar-plan-cell { position: absolute; background: #72b79b55; pointer-events: none; }
#sonar-plan[data-full="false"] { background: #344652; }
.sonar-unknown { background: #344652 !important; border: 0 !important; }

.conditions-panel { padding: 10px 14px; background: #20394b; border: 1px solid #678892; margin-bottom: 10px; color: #dbe5cf; font-size: .76rem; line-height: 1.5; }
.conditions-panel strong { color: #ffd59b; font-size: .86rem; }
.conditions-panel p { margin: 6px 0; }
.conditions-panel summary { cursor: pointer; }

.atlas-filters { display: flex; flex-wrap: wrap; gap: 14px; margin: 18px 0; }
.atlas-filters label { display: grid; gap: 6px; flex: 1 1 180px; min-width: 0; }
.atlas-filters select { max-width: 100%; width: 100%; }
.fish-guide { list-style: none; padding: 0; gap: 16px; }
.atlas-card { min-width: 0; background: #20394c; border: 1px solid #648892; padding: 16px; }
.atlas-card h3 { font-size: .94rem; line-height: 1.5; margin: 12px 0 8px; color: #ffe0a3; }
.atlas-card p { font-size: .76rem; line-height: 1.6; margin: 8px 0; overflow-wrap: anywhere; }
.atlas-art { background: #183b4d; text-align: center; }
.atlas-art svg { width: 160px; max-width: 100%; height: 100px; image-rendering: pixelated; }
.atlas-status { color: #b5d2be; }
.atlas-record, .atlas-count { color: #e6dab6; }
.atlas-card[data-advice="false"] .atlas-advice, .atlas-card[data-advice="false"] .atlas-tackle { color: #acbdc6; }

.cast-power-track { height: 7px; margin: 5px 0 10px; background: #17314b; border-radius: 4px; overflow: hidden; }
.cast-power-track span { display: block; height: 100%; width: 0; background: #f4cf88; }

/* Keep the sling, rod and predicted landing visible while charging. */
.cast-meter { position: relative; inset: auto; width: 100%; transform: none; padding: 8px 10px; border: 0; border-top: 2px solid #bbcfbb; box-shadow: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
.cast-meter-head { margin: 0; }
.cast-meter-head:first-child { grid-column: 1; grid-row: 1; }
.cast-power-track { grid-column: 1; grid-row: 2; margin: 4px 0; }
.cast-meter-head:nth-child(3) { grid-column: 2; grid-row: 1; }
.cast-meter-track { grid-column: 2; grid-row: 2; }
.cast-meter-note { grid-column: 1 / -1; margin: 0; }

#play-navigation { margin-top: 12px; padding: 12px; background: #193c47; border: 2px solid #739d99; }
#play-vessel-status { margin: 0; color: #fff0c2; font-size: .85rem; }

.atlas-passport { border-top: 1px solid #608087; margin-top: 10px; padding-top: 6px; overflow-wrap: anywhere; }
.atlas-record-history { font-size: .8rem; }
.atlas-record-history summary { cursor: pointer; color: #f3d6a2; }
.atlas-record-history ol { padding-left: 20px; }

.medal-panel, .rank-panel, .online-panel { margin: 18px 0; padding: 16px; border: 2px solid #6e9294; background: #183746; }
.medal-panel > p, .rank-panel > p, .online-panel > p { font-size: .85rem; line-height: 1.5; }
.medal-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 12px; }
.medal-card { border: 1px solid #719596; padding: 12px; min-width: 0; background: #21414f; }
.medal-card h3 { color: #f6cc87; margin-top: 0; }
.medal-row { border-top: 1px solid #58767e; padding: 8px 0; }
.medal-row p { font-size: .8rem; line-height: 1.5; margin: 0 0 8px; overflow-wrap: anywhere; }
.medal-row button, #achievement-list button { min-height: 44px; padding: 8px 10px; border: 2px solid #8bb0ad; background: #284e58; color: #fff0c2; font: inherit; font-size: .8rem; cursor: pointer; }
.medal-row button:disabled, #achievement-list button:disabled { opacity: .55; cursor: default; }

.activity-banner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 0; font-size: .8rem; color: #f4d6a1; }
.activity-panel { margin: 18px 0; padding: 16px; background: #183746; border: 2px solid #6e9294; }
.activity-panel p, .activity-panel li { font-size: .82rem; line-height: 1.5; }
.activity-panel ul { padding-left: 20px; }
.activity-meter { display: flex; gap: 12px; align-items: center; }
.activity-meter progress { width: 100%; min-width: 0; accent-color: #dfb56e; }
.activity-rewards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 10px; }
.activity-reward { background: #254958; border: 1px solid #759b9a; padding: 12px; min-width: 0; }
.activity-reward h3 { font-size: .95rem; margin-top: 0; color: #f8d395; }
.activity-reward button, .activity-banner button { min-height: 44px; padding: 8px 10px; border: 2px solid #8bb0ad; background: #284e58; color: #fff0c2; font: inherit; font-size: .8rem; cursor: pointer; }
.activity-reward button:disabled { opacity: .55; cursor: default; }
.activity-week-days { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(86px, 1fr)); padding: 0; gap: 8px; }
.activity-week-days li { padding: 8px; border: 1px solid #668a90; background: #203c4b; }
.activity-week-days li.active { background: #486c59; border-color: #bddbb3; }

.activity-meter strong { white-space: nowrap; flex-shrink: 0; }

#online-panel input:not([type=checkbox]), #online-panel select { max-width: 100%; }
#online-panel label { display: inline-block; margin: 8px 8px 8px 0; }
#online-canvas { display: block; width: 100%; height: auto; background: #143e51; border-radius: 12px; margin-top: 12px; touch-action: none; }
#online-panel code { display: block; overflow-wrap: anywhere; white-space: normal; }
#online-creel > div { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 8px 0; }

/* Unknown surface stays navigable: discovery never intercepts course input. */
.chart-fog { position: absolute; background: #273d4bf5; pointer-events: none; }
#chart-fog { pointer-events: none; }
.chart-vessel, .chart-target, #chart-scanning { z-index: 2; }

@media (max-width: 900px) {
  /* Full-size shore controls duplicate these compact chart markers. */
  .chart-dock { width: 14px; min-width: 14px; padding: 0; font-size: 9px; }
  .chart-dock:focus-visible { z-index: 3; outline: 2px solid #ffe5a5; }
}

/* The water chart now covers the full two-dimensional world. */
.water-chart { background: repeating-linear-gradient(90deg, transparent 0 12.4%, #ffffff0b 12.4% 12.5%), linear-gradient(#6d8868 0 5%, #3d8390 5% 40%, #316d83 40% 75%, #285775 75% 99%, #648364 99%); }
.chart-dock { top: 5%; }
