#menu-layer {
  --fm-deep:#0a2232; --fm-panel:#133747; --fm-panel-light:#1a4250;
  --fm-ink:#fff2d2; --fm-muted:#bad3d1; --fm-mint:#89e0ce; --fm-gold:#ffd274;
  --fm-accent:#88e4d3; --fm-wash:#16494f; --fm-edge:#4d7284; --fm-line:#375b68; --fm-pixel:"Harbour Pixel",system-ui,sans-serif;
  position:fixed; top:0;right:0;bottom:0;left:0;z-index:12; background:var(--fm-deep); color:var(--fm-ink);
  font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  -webkit-font-smoothing:antialiased; color-scheme:dark;
}
#menu-layer[data-page=map] {--fm-accent:#a4e5bc;--fm-wash:#204d48}
#menu-layer[data-page=aquarium] {--fm-accent:#87e7dc;--fm-wash:#125559}
#menu-layer[data-page=log],#menu-layer[data-page=detail] {--fm-accent:#d7b5ff;--fm-wash:#43375b}
#menu-layer[data-page=gear] {--fm-accent:#f4ce80;--fm-wash:#574333}
#menu-layer[data-page=tray] {--fm-accent:#ffb797;--fm-wash:#62423d}
#menu-layer[data-page=harbour] {--fm-accent:#ffd780;--fm-wash:#554033}
#menu-layer[hidden] {display:none}
#menu-layer * {box-sizing:border-box}
#menu-layer h1,#menu-layer h2,#menu-layer h3,#menu-layer p,#menu-layer dl,#menu-layer dd {margin:0}
#menu-layer button,#menu-layer select,#menu-layer input {font:inherit}
#menu-layer button {cursor:pointer}
#menu-layer button:disabled {cursor:default}
#menu-layer :is(button,input,select):focus-visible {outline:3px solid #ffe6a1;outline-offset:3px}
#menu-layer button {transition:background-color .12s ease,border-color .12s ease}
#menu-layer h1,#menu-layer h2,#menu-layer h3,#menu-layer .fm-card strong,#menu-layer .fm-ground h3,#menu-layer .fm-scene-label strong {font-family:var(--fm-pixel);font-weight:normal}
#menu-layer h1 {font-size:clamp(24px,3.1vw,40px);line-height:1.1;outline:0}
#menu-layer h2 {font-size:clamp(23px,2.15vw,30px);line-height:1.18}
#menu-layer h3 {font-size:clamp(17px,1.66vw,22px);line-height:1.2}
#menu-layer small {font-size:13px;line-height:1.4}
.fm-shell {height:100%;display:flex;flex-direction:column}
.fm-header {height:clamp(65px,9vh,88px);flex:none;padding:0 max(22px,calc((100vw - 1440px)/2 + 30px));display:flex;align-items:center;justify-content:space-between;gap:18px;background:linear-gradient(105deg,var(--fm-wash),#12283d 65%);border-bottom:2px solid var(--fm-accent)}
.fm-heading,.fm-coins {display:flex;align-items:center;gap:clamp(14px,2.5vw,35px)}
.fm-coins {gap:8px;padding:4px 11px;background:#102333;border:1px solid #8c7852;color:var(--fm-gold);font:21px var(--fm-pixel);font-variant-numeric:tabular-nums;font-synthesis:none}
.fm-coins img {width:26px;height:26px;object-fit:contain;image-rendering:pixelated}
.fm-scroll {min-height:0;overflow:auto;flex:1;overscroll-behavior:contain;scrollbar-color:#456d78 #0b2737;background:linear-gradient(155deg,#142c40 0%,#0c1e30 58%,#122b38 100%)}
.fm-body {width:100%;max-width:1440px;margin:0 auto;padding:clamp(17px,2vw,30px);padding-bottom:max(24px,3vw)}
.fm-columns {display:grid;grid-template-columns:minmax(0,1.22fr) minmax(0,1fr);align-items:start;gap:clamp(13px,1.65vw,24px)}
.fm-stack {display:flex;flex-direction:column;gap:16px;min-width:0}
.fm-stack.fm-tight {gap:8px}
.fm-panel,.fm-scene,.fm-card {border:2px solid var(--fm-edge);box-shadow:2px 3px 0 #071b27}
.fm-panel {padding:clamp(16px,2vw,28px);background:linear-gradient(140deg,#18374b,#132e40 82%);min-width:0}
.fm-muted,.fm-ground small,.fm-slot small,.fm-inventory small,.fm-sale-item small,.fm-entry-name + p {color:var(--fm-muted)}
#menu-layer h2 + p,#menu-layer h3 + p,#menu-layer .fm-big + p {margin-top:7px}
.fm-divider {height:1px;flex:none;background:var(--fm-line)}
.fm-actions {display:flex;align-items:center;gap:9px;flex-wrap:wrap}
#menu-layer .fm-button {min-height:37px;display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #6b8a91;
  padding:7px 13px;color:var(--fm-ink);background:#1b3e50;box-shadow:inset 0 2px #ffffff13,inset 0 -2px #092735,1px 2px 0 #071b26;
  font:16px/1.3 var(--fm-pixel);text-align:center}
#menu-layer .fm-button.teal {border-color:#72a99e;background:#24615e;color:#f4ffe6;box-shadow:inset 0 2px #4f8a7f,inset 0 -2px #184945,1px 2px 0 #071b26}
#menu-layer .fm-button.amber {background:#734a37;color:#ffe1ae;border-color:#ad805c;box-shadow:inset 0 2px #92684c,inset 0 -2px #513c33,1px 2px 0 #071b26}
#menu-layer .fm-button.gold {border-color:#ffda83;background:#efbd5a;color:#352c1e;box-shadow:inset 0 2px #ffe1a0,inset 0 -2px #bb8b3b,1px 2px 0 #071b26}
#menu-layer .fm-button:not(:disabled):hover {filter:brightness(1.16)}
#menu-layer .fm-button:active:not(:disabled) {transform:translateY(1px)}
#menu-layer .fm-button:disabled {filter:saturate(.32);opacity:.62}
#menu-layer .fm-back {min-height:34px;padding:4px 16px}
#menu-layer .fm-back span {font:24px/1 system-ui}
.fm-nav {flex:none;display:flex;justify-content:center;align-items:stretch;gap:clamp(2px,.7vw,10px);background:#101e31;border-top:2px solid var(--fm-edge);padding:4px 12px max(4px,env(safe-area-inset-bottom));overflow:auto}
#menu-layer .fm-nav button {border:0;border-bottom:3px solid transparent;display:flex;align-items:center;justify-content:center;gap:7px;background:transparent;color:var(--fm-muted);padding:8px clamp(8px,1.2vw,19px);font:15px/1.1 var(--fm-pixel);white-space:nowrap}
#menu-layer .fm-nav button:hover,#menu-layer .fm-nav button[aria-current=page] {color:var(--fm-ink);background:var(--fm-wash)}
#menu-layer .fm-nav button[aria-current=page] {border-bottom-color:var(--fm-accent);color:var(--fm-accent)}
.fm-nav img {width:31px;height:23px;object-fit:contain;image-rendering:pixelated}
.fm-notice {position:absolute;left:50%;transform:translateX(-50%);bottom:65px;z-index:1;background:#153e48;border:2px solid #86bab0;padding:9px 16px;text-align:center;color:var(--fm-ink);box-shadow:2px 3px #081d29;pointer-events:none}
.fm-scene {position:relative;overflow:hidden;background:#142d38}
.fm-scenery {position:absolute;top:0;left:0;width:100%;height:100%;object-fit:cover;image-rendering:pixelated}
.fm-chart {aspect-ratio:16/9}
.fm-chart .fm-scenery {object-fit:fill}
.fm-pin {position:absolute;display:flex;align-items:center;justify-content:center;transform:translate(-50%,-50%);border:0;background:transparent;padding:6px;width:35px;height:35px}
.fm-pin span {width:13px;height:13px;display:block;background:#bdf6dc;border:3px solid #f1ffe7;box-shadow:0 0 0 3px #18353b;transform:rotate(45deg)}
.fm-pin.current span {background:#ffb338;border-color:#fff2bd}
.fm-pin:hover span {transform:rotate(45deg) scale(1.2)}
.fm-roam {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:14px}
#menu-layer .fm-roam button {padding:5px 0;border:0;text-align:left;background:transparent;color:var(--fm-ink)}
.fm-roam button:hover strong {color:var(--fm-gold)}
.fm-roam strong,.fm-roam span {display:block}
.fm-roam strong {font:16px/1.25 var(--fm-pixel)}
.fm-roam span {margin-top:4px;font-size:13px;color:var(--fm-muted)}
.fm-grounds {display:grid;gap:10px;margin-top:18px}
.fm-ground {display:flex;align-items:center;justify-content:space-between;gap:9px;min-height:65px;padding:10px 12px;background:#102e3e;border:1px solid var(--fm-line)}
.fm-ground.is-here {border-color:#79958b;background:#173b46}
.fm-ground small {display:block;margin-top:3px}
.fm-ground .fm-button {flex:none}
#menu-layer .fm-footnote {border-top:1px solid var(--fm-line);margin-top:20px;padding-top:14px;font-size:14px}
.fm-fish {display:block;object-fit:contain;image-rendering:pixelated}
.fm-scene-label {position:absolute;bottom:14px;left:14px;display:flex;flex-direction:column;gap:4px;padding:10px 14px;background:#0a2532e8;border:1px solid #86a098}
.fm-scene-label strong {font-size:23px}
.fm-scene-label span {color:var(--fm-mint);font-size:14px}
.fm-tank,.fm-entry-art {min-height:clamp(340px,62vh,690px)}
.fm-swimmer {position:absolute;height:22%;transform:translate(-50%,-50%);pointer-events:none}
.fm-swimmer img {position:absolute;top:0;left:0;width:100%;height:100%;transform-origin:center;image-rendering:pixelated}
.fm-big {display:block;margin-top:12px;color:var(--fm-gold);font:clamp(23px,2.6vw,36px)/1.2 var(--fm-pixel)}
.fm-slot,.fm-pick {display:flex;align-items:center;gap:12px;min-height:54px;padding:6px 8px;background:#102d3c;border:1px solid var(--fm-line)}
.fm-slot img,.fm-pick img {flex:none;width:55px;height:43px}
.fm-slot>span:not(.fm-empty-slot),.fm-pick>span:not(.fm-radio) {flex:1 1 auto}
.fm-slot strong,.fm-pick strong {font:16px/1.2 var(--fm-pixel)}
.fm-slot small,.fm-pick small {display:block;color:var(--fm-mint)}
.fm-slot:not(.vacant) {border-left:3px solid var(--catch-accent);background:linear-gradient(100deg,var(--catch-wash),#132e40 55%)}
.fm-slot.vacant {color:#a4c0c0;border-style:dashed}
.fm-empty-slot {width:55px;text-align:center;color:#6f999b;font-size:26px}
#menu-layer .fm-pick {width:100%;color:var(--fm-ink);text-align:left}
.fm-pick.selected {border-color:var(--fm-mint);background:#214b56}
.fm-radio {flex:none;display:block;width:14px;height:14px;border:2px solid #89aaa9}
.fm-pick.selected .fm-radio {background:var(--fm-mint);box-shadow:inset 0 0 0 2px #184553}
.fm-eyebrow {font-size:12px;font-weight:700;letter-spacing:1px;color:var(--fm-gold);text-transform:uppercase}
.fm-line-heading {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:15px}
.fm-line-heading :is(p,span) {color:var(--fm-mint);font-size:14px}
.fm-filters {display:grid;grid-template-columns:1.3fr 1fr 1fr auto;align-items:end;gap:12px;margin-bottom:16px}
.fm-field {display:grid;gap:5px;min-width:0}
.fm-field>span {font-size:13px;font-weight:600;color:var(--fm-muted)}
#menu-layer select,#menu-layer input[type=search] {width:100%;min-width:0;height:39px;padding:6px 10px;border:1px solid #698995;border-radius:0;background:#0c2b3a;color:var(--fm-ink)}
#menu-layer input[type=search]::placeholder {color:#9ab7b9}
.fm-check {display:flex;align-items:center;gap:6px;min-height:39px;cursor:pointer;color:var(--fm-muted);white-space:nowrap}
.fm-check input {accent-color:var(--fm-mint)}
.fm-card-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
/* Each tier uses the same accent in the log, tray and occupied tank slots. */
.grade-0,.tier-0 {--catch-accent:#c3dbcd;--catch-wash:#274749}
.grade-1,.tier-1 {--catch-accent:#98e3ae;--catch-wash:#285044}
.grade-2,.tier-2 {--catch-accent:#91cff4;--catch-wash:#254965}
.grade-3,.tier-3 {--catch-accent:#b0bafe;--catch-wash:#384567}
.grade-4,.tier-4 {--catch-accent:#ceabff;--catch-wash:#49395f}
.grade-5,.tier-5 {--catch-accent:#ffcd85;--catch-wash:#534337}
.grade-6,.tier-6 {--catch-accent:#f0b6ff;--catch-wash:#563859}
.grade-7,.tier-7 {--catch-accent:#8af7e0;--catch-wash:#1e504e}
#menu-layer .fm-card {min-height:109px;padding:0;display:grid;grid-template-columns:40% minmax(0,1fr);align-items:stretch;overflow:hidden;
  color:var(--fm-ink);background:#172d42;text-align:left;border:1px solid #526779;border-top:3px solid var(--catch-accent)}
#menu-layer .fm-card:hover {background:#213c51;border-color:var(--catch-accent)}
.fm-card-art,.fm-tray-portrait {display:flex;align-items:center;justify-content:center;position:relative;
  background:radial-gradient(ellipse at center,var(--catch-wash),#112539 85%)}
.fm-card-art img {width:85%;height:78px}
.fm-card-copy {display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:5px;padding:10px 12px;min-width:0}
.fm-card strong {font-size:clamp(16px,1.6vw,22px);line-height:1.15}
.fm-card small {font-size:12px;color:#b9c6cb}
.fm-tier {display:block;font-size:12px;font-weight:700;line-height:1.3;color:var(--catch-accent,#b4dacf)}
.fm-collection-filter {max-width:230px;margin-bottom:12px}
.fm-description {color:#ece4d1;border-left:3px solid var(--catch-accent);background:#112b3d;padding:9px 12px}
.fm-paging {display:flex;justify-content:space-between;align-items:center;gap:9px;margin-top:18px;color:var(--fm-muted);font-size:14px}
.fm-entry-sprite {position:absolute;top:24%;right:8%;bottom:10%;left:8%;display:grid;place-items:center}
.fm-entry-sprite img {width:100%;height:100%;filter:drop-shadow(2px 3px 1px #082c4577)}
#menu-layer .fm-entry-name {font-size:clamp(30px,3.8vw,50px);margin-top:6px}
.fm-metric {display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-top:1px solid var(--fm-line)}
.fm-metric dt {color:var(--fm-muted);font-size:14px}
.fm-metric dd {color:var(--fm-ink);font-weight:650;text-align:right}
.fm-workshop {height:clamp(130px,19vh,240px)}
.fm-workshop .fm-scenery {object-position:50% 46%}
.fm-gear {grid-template-columns:minmax(0,1.1fr) minmax(0,1fr)}
.fm-table {width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums;text-align:left}
.fm-table th,.fm-table td {padding:9px 5px;border-bottom:1px solid var(--fm-line);font-size:15px}
.fm-table thead th {color:var(--fm-muted);font-size:12px;font-weight:600;vertical-align:bottom}
.fm-table th:first-child {padding-left:0}
.fm-table tr>*:last-child {text-align:right;color:var(--fm-gold)}
.fm-table tbody th {font-family:var(--fm-pixel);font-weight:400}
.fm-table .equipped th {color:var(--fm-mint)}
.fm-done {color:var(--fm-mint);font-family:var(--fm-pixel);font-weight:normal}
.fm-empty {padding:clamp(24px,5vw,66px) 18px;text-align:center;color:var(--fm-muted);border:1px dashed var(--fm-edge);background:#102e3c}
.fm-empty img {width:48px;height:48px;object-fit:contain;image-rendering:pixelated;margin:0 auto 12px}
.fm-empty h3 {color:var(--fm-ink)}
#menu-layer .fm-empty p {margin:7px auto 14px;max-width:34ch}
.fm-empty .fm-button {margin-top:7px}
.fm-empty.compact {padding:22px 12px}
.fm-tray {grid-template-columns:minmax(0,1.75fr) minmax(275px,1fr)}
.fm-tray .fm-line-heading {align-items:flex-end}
.fm-tray .fm-tray-total {color:var(--fm-muted)}
.fm-tray-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.fm-inventory {border:1px solid #51697a;border-top:3px solid var(--catch-accent);background:#132a3b;
  display:flex;flex-direction:column;min-width:0;box-shadow:1px 2px 0 #0a1b2a}
.fm-inventory.selected {border-color:var(--catch-accent)}
#menu-layer .fm-inv-fish {border:0;background:transparent;color:var(--fm-ink);padding:0;display:grid;
  grid-template-columns:37% minmax(0,1fr);flex:1;align-items:stretch;text-align:left;width:100%;min-height:106px}
#menu-layer .fm-inv-fish:hover {background:#20394a}
.fm-tray-portrait {min-height:92px;margin:0}
.fm-tray-portrait img {width:94%;height:70px;margin-bottom:8px}
.fm-quantity {position:absolute;right:5px;bottom:5px;color:var(--fm-ink);padding:1px 4px;background:#0c2032;border:1px solid #4c687b;font:13px/1.2 var(--fm-pixel)}
.fm-inv-copy {align-self:center;min-width:0;display:grid;gap:3px;padding:9px}
.fm-inv-fish strong,.fm-sale-item strong {display:block;font:17px/1.15 var(--fm-pixel)}
#menu-layer .fm-inv-copy small {font-size:12px;line-height:1.2;color:#c7dcd8}
#menu-layer .fm-inv-copy .fm-record {color:#e8ca92}
.fm-inv-actions {display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:7px;border-top:1px solid #3b5261}
#menu-layer .fm-inv-actions .fm-button {font-size:14px;min-height:32px;padding:4px}
.fm-tray aside .fm-panel:last-child {border-top-color:#d6b46b}
.fm-setting {display:flex;align-items:flex-start;justify-content:space-between;gap:13px}
#menu-layer .fm-switch {display:flex;align-items:center;justify-content:center;gap:6px;flex:none;background:#0b2939;color:var(--fm-muted);font:15px var(--fm-pixel);padding:7px 11px;border:1px solid var(--fm-edge)}
.fm-switch i {width:8px;height:8px;background:#74919c}
#menu-layer .fm-switch[aria-checked=true] {color:#bbfae5;border-color:#75aa99;background:#1c514f}
.fm-switch[aria-checked=true] i {background:#8eebba}
.fm-switch:disabled {opacity:.55}
.fm-harbour-art {height:clamp(200px,33vh,330px)}
.fm-sale-item {padding:12px;display:flex;gap:15px;align-items:center;background:#0c2c3b;border:1px solid var(--fm-line)}
.fm-sale-item img {width:34%;height:85px}
.fm-sale-item strong {margin:3px 0}
.fm-order-clock {display:block;color:var(--fm-mint);margin-top:8px;font-variant-numeric:tabular-nums}
.fm-settings {max-width:760px;margin:0 auto}
@media(min-width:1600px) {
  .fm-body {padding-top:34px}
}
@media(max-width:850px) {
  .fm-columns {gap:12px}.fm-panel {padding:14px}
  .fm-ground {padding:8px}.fm-card-grid {gap:8px}.fm-card-copy {padding:7px}
  #menu-layer .fm-card {min-height:98px}.fm-tray-grid {grid-template-columns:1fr}
}
@media(max-width:680px) {
  .fm-body {padding:13px}
  .fm-header {height:57px;padding:0 13px}.fm-heading {gap:11px}
  .fm-coins {font-size:16px}.fm-coins img {width:21px;height:21px}
  .fm-columns {grid-template-columns:1fr}
  .fm-nav {justify-content:flex-start;gap:2px;padding-left:5px;padding-right:5px}
  #menu-layer .fm-nav button {font-size:13px;padding:9px 8px}.fm-nav img {display:none}
  .fm-tank,.fm-entry-art {min-height:0;height:clamp(195px,50vw,320px)}
  .fm-chart {max-height:265px}
  .fm-harbour-art {height:170px}
  .fm-harbour>section:first-child {display:contents}.fm-harbour>section:last-child {grid-row:2}
  .fm-card-grid {grid-template-columns:repeat(2,minmax(0,1fr))}
  .fm-filters {grid-template-columns:1fr 1fr;gap:8px}
  .fm-stack {gap:12px}.fm-roam span {font-size:12px}.fm-roam strong {font-size:14px}
  .fm-paging {align-items:center}.fm-notice {bottom:48px;width:max-content;max-width:90vw}
}
@media(max-width:400px) {
  .fm-card strong {font-size:14px}.fm-card small {font-size:11px}
  #menu-layer .fm-card {grid-template-columns:34% minmax(0,1fr)}
  .fm-paging {flex-wrap:wrap}
}


@supports not (aspect-ratio:16/9) {
  .fm-chart {height:0;padding-top:56.25%}
  .fm-stack>*+* {margin-top:14px}
  .fm-stack.fm-tight>*+* {margin-top:8px}
  .fm-actions>*+* {margin-left:7px}
  #menu-layer .fm-heading h1 {margin-left:14px}
  .fm-back span,.fm-nav img {margin-right:5px}
  .fm-coins strong,.fm-sale-item>span,.fm-slot>span,.fm-pick>span {margin-left:7px}
}
