:root {
  color-scheme: dark;
  --ground: #10201f;
  --paper: #f2efdc;
  --muted: #afc3b5;
  --line: #51655a;
  --accent: #ebc791;
  --hud-shadow: 0 6px 24px #050e0c64, inset 0 1px #ffffff0b;
  --hud-surface: linear-gradient(152deg, #20322ef7, #11211fee);
  --hud-inset: clamp(10px, 1.65vw, 26px);
  --card-radius: 10px;
  --font-ui: "Source Sans 3", "PT Sans", system-ui, sans-serif;
  --font-display: "Pixelify Sans", var(--font-ui);
  font-family: var(--font-ui);
}
* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: var(--ground); color: var(--paper); }
.game { position: relative; width: 100%; height: 100vh; height: 100dvh; isolation: isolate; }
.scene { position: absolute; inset: 0; overflow: hidden; background: #182a2a; }
#water { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; touch-action: manipulation; }
#water[data-target="true"] { cursor: crosshair; }
#water[data-lure-aim="true"] { touch-action: none; }
#water:focus-visible { outline: 2px solid var(--pond-on-pine); outline-offset: -3px; box-shadow: inset 0 0 0 4px var(--pond-water); }
button { font-family: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid #ffdea4; outline-offset: 3px; }
button:disabled { cursor: default; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
kbd { font-family: inherit; font-size: 11px; line-height: 1.2; font-weight: 600;
  padding: 3px 5px; border: 1px solid currentColor; border-radius: 4px; opacity: .78; white-space: nowrap; }
dialog { padding: 0; border: 1px solid #617469; border-radius: 5px; background: #1c302e; color: var(--paper);
  width: min(94vw, 960px, calc((100svh - 152px) * 1.74)); max-width: 100%; max-height: 96svh; box-shadow: 0 16px 80px #08100db3; }
dialog::backdrop { background: #09110fbc; }
#catch-dialog { width: min(94vw, 665px); border-color: #62796a; border-radius: 9px; }
.catch-sheet { padding: 12px 21px 19px; background: linear-gradient(155deg, #243b35, #172b28 77%); }
.catch-sheet .map-heading { padding: 7px 0 10px; }
.catch-tackle { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tackle-choice { min-height: 34px; border: 1px solid #5b7268; border-radius: 3px; background: #142724;
  color: #c9d9ca; padding: 4px 10px; font-size: 14px; }
.tackle-choice[aria-pressed="true"] { background: #594b36; color: #ffe3af; border-color: #b59464; }
.tackle-choice:disabled { opacity: .6; cursor: default; }
.catch-hint { color: var(--muted); font-size: 13px; line-height: 1.35; margin: 9px 0 12px; }
.outing { margin: 0; padding: 8px 9px; border-left: 2px solid #c19c62; background: #182925; font-size: 14px; color: #f0ce96; }
.catch-list { list-style: none; padding: 0; margin: 10px 0 0; }
.catch-list li { border-top: 1px solid #465d55; padding: 8px 0; }
.bag-views { display: flex; gap: 17px; border-bottom: 1px solid #465d55; margin-bottom: 12px; }
.bag-view { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #b9c9bb;
  padding: 9px 3px 10px; font-size: 14px; cursor: pointer; }
.bag-view[aria-pressed="true"] { border-bottom-color: #d9af75; color: #ffdfae; }
.outfit-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; max-width: 320px; }
.outfit-choice { display: grid; justify-items: center; align-content: start; gap: 5px; padding: 7px 6px 10px;
  border: 1px solid #526b60; border-radius: 5px; background: #142724; color: #d7e2d5; font-size: 13px; cursor: pointer; }
.outfit-choice canvas { width: 96px; max-width: 100%; height: auto; image-rendering: pixelated;
  background: radial-gradient(ellipse at 50% 62%, #4d6660, transparent 72%); }
.outfit-choice[aria-pressed="true"] { border-color: #d9af75; background: #3b382a; color: #ffdfae; }
.outfit-choice:focus-visible { outline: 2px solid #ffe4ad; outline-offset: 1px; }
.outfit-choice:disabled { cursor: default; }
.outfit-choice:disabled[aria-pressed="false"] { opacity: .65; }
.bag-items { display: grid; grid-template-columns: minmax(267px, 1.15fr) minmax(180px, 1fr); gap: 15px; margin-top: 13px; }
.bag-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; align-content: start; }
.bag-slot { aspect-ratio: 1; min-width: 0; border-radius: 5px; background: #0e201e; border: 1px solid #466058; }
.slot-empty { background: #122421; border-color: #37504a; box-shadow: inset 0 1px 3px #081814; }
.bag-item { position: relative; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 4px; display: grid;
  place-items: center; background: radial-gradient(ellipse at 50% 45%, #436360, #172e2a 77%); cursor: pointer; }
.bag-item[data-theme="material"] { background: radial-gradient(ellipse at 50% 45%, #645b43, #28332a 80%); }
.bag-item[data-theme="bait"] { background: radial-gradient(ellipse at 50% 45%, #6d5742, #28332a 80%); }
.bag-item[data-rare] {
  background: radial-gradient(ellipse at 50% 45%, #544d6c, #272a3e 80%);
  box-shadow: inset 0 0 0 1px #ae92c1;
}
.bag-item[aria-pressed="true"] { outline: 1px solid #eed7a0; outline-offset: -1px; }
.bag-item:focus-visible { outline: 2px solid #ffe4ad; outline-offset: 0; }
.stack-count { position: absolute; right: 3px; bottom: 2px; color: #fff1d7; background: #102220ed;
  min-width: 15px; border-radius: 3px; padding: 1px 3px; font-size: 12px; line-height: 1.05; text-align: center;
  font-weight: 700; font-variant-numeric: tabular-nums; }
.item-art { display: grid; place-items: center; width: min(100%, 120px); aspect-ratio: 1; line-height: 0; }
.item-art > span { display: block; background-repeat: no-repeat; }
.item-art > .item-pixels {
  width: 100%; aspect-ratio: 1; background-image: url('/art/sprites/item-icons.png');
  image-rendering: pixelated;
}
.item-detail { min-width: 0; background: #122925; border: 1px solid #456057; border-radius: 6px; padding: 12px 14px; }
.detail-icon { display: grid; place-items: center; height: 66px; }
.detail-icon .item-art { width: 104px; margin-block: -20px; }
.item-description h3 { margin: 0 0 5px; color: #f1d9a8; font: 650 19px/1.14 var(--font-ui); }
.item-description p { margin: 0 0 8px; font-size: 14px; color: #c1cec0; line-height: 1.36; }
.item-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.item-description button:enabled { border-color: #a6895e; color: #f1d9a8; }
.item-description .crafted-effect { color: #eac58c; font-weight: 650; }
#item-status { color: var(--muted); font-size: 12px; }
.catch-list .fish-record { display: grid; grid-template-columns: 48px 1fr; gap: 12px; align-items: center; }
.record-icon { display: grid; place-items: center; width: 48px; height: 44px;
  border: 1px solid #486459; border-radius: 5px; background: radial-gradient(ellipse, #405950, #182e29 76%); }
.record-info { display: grid; gap: 3px; }
.record-info span, .record-info small { color: #c3d0c3; font-size: 12px; }
.record-info small { color: #e6c990; }
.message-head { display: flex; gap: 7px; align-items: center; }
#catch-portrait { flex: none; width: 48px; height: 26px; display: grid; place-items: center; }
#catch-portrait .item-art { margin-block: -11px; }
.catch-count kbd { padding: 1px 4px; }
#water[data-gather="true"], #water[data-keeper="true"] { cursor: pointer; }
@media (max-width: 630px) {
  .catch-sheet { padding: 8px 13px 13px; }
  .bag-items { grid-template-columns: 1fr; gap: 10px; }
  .item-detail { display: flex; gap: 10px; align-items: center; min-height: 76px; padding: 8px 10px; }
  .detail-icon { flex: 0 0 53px; height: 50px; }
  .detail-icon .item-art { width: 53px; }
  .catch-count kbd { display: none; }
}
@media (pointer: coarse) {
  .item-actions button { min-height: 44px; }
}
.map-sheet { padding: 0 14px; }
.map-heading, .map-legend, .map-footer, .world-switch { display: flex; align-items: center; }
.map-heading { justify-content: space-between; padding: 13px 9px 8px; }
.map-heading > div { display: flex; align-items: baseline; gap: 16px; }
.map-heading h2 { margin: 0; font: 600 28px/1.1 var(--font-display); }
.map-heading p, .map-footer p { margin: 0; font-size: 13px; color: #b5c3b5; }
.map-close { border: 1px solid #73857866; border-radius: 3px; background: transparent; color: #dbe4d3; width: 34px; height: 32px; font-size: 24px; line-height: 1; }
#ladder-dialog { width: min(94vw, 620px); max-height: 92svh; border-radius: 8px; }
.ladder-sheet { padding: 8px 18px 16px; background: linear-gradient(155deg, #243a33, #162a26 76%); }
.ladder-sheet .map-heading { gap: 10px; padding: 6px 0 12px; }
.ladder-sheet .map-heading > div { flex-wrap: wrap; gap: 2px 13px; }
.ladder-sheet .map-close { flex: 0 0 auto; }
.ladder-filters { display: flex; flex-wrap: wrap; gap: 7px; padding-bottom: 12px; }
.ladder-filters select, .ladder-filters button {
  min-height: 36px; padding: 5px 8px; border: 1px solid #667c6c; border-radius: 4px;
  color: #e9ebd7; background: #162925; font: inherit; font-size: 13px;
}
.ladder-filters button { margin-inline-start: auto; color: #ecd09a; border-color: #8b7655; }
.ladder-filters button:disabled { opacity: .55; }
.ladder-target {
  display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: center; gap: 12px;
  border: 1px solid #66745d; border-radius: 5px; padding: 10px 12px;
  background: linear-gradient(110deg, #405549, #263b30 62%, #26372d);
}
.ladder-art { display: grid; place-items: center; min-width: 0; }
.ladder-art .item-art { width: 100%; max-height: 75px; }
.ladder-target h3 { margin: 0 0 3px; color: #f1d49c; font: 600 22px/1.1 var(--font-display); }
.ladder-target p { margin: 0; font-size: 13px; line-height: 1.28; color: #e0e9d5; }
.ladder-target #ladder-next { margin-top: 5px; color: #ced9be; font-size: 12px; }
.ladder-status, .ladder-personal, .ladder-rule { margin: 10px 0 0; font-size: 13px; line-height: 1.35; }
.ladder-status:empty, .ladder-personal:empty { display: none; }
.ladder-personal { padding: 7px 9px; border: 1px solid #65785f; border-radius: 4px; color: #eee0b7; background: #23392d; }
.ladder-rule { color: #bbc9bb; font-size: 12px; }
.ladder-table { width: 100%; border-collapse: collapse; margin-top: 10px; text-align: left; font-size: 14px; }
.ladder-table th, .ladder-table td { padding: 7px 8px; border-bottom: 1px solid #54726378; }
.ladder-table th { font-size: 12px; font-weight: 600; color: #c9d4c1; }
.ladder-table th:first-child, .ladder-table td:first-child { width: 55px; text-align: center; font-variant-numeric: tabular-nums; }
.ladder-table th:last-child, .ladder-table td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ladder-table td small { display: block; color: #c1d2c3; line-height: 1.25; }
.ladder-table [data-place="1"] td:first-child { color: #f5c675; font-weight: 700; }
.ladder-me { background: #41533d; }
@media (max-width: 420px) {
  .ladder-sheet { padding-inline: 11px; }
  .ladder-target { grid-template-columns: 60px minmax(0, 1fr); gap: 8px; padding: 7px 8px; }
  .ladder-table th, .ladder-table td { padding-inline: 5px; }
}
@media (pointer: coarse) {
  .ladder-filters select, .ladder-filters button, .ladder-sheet .map-close { min-height: 44px; }
}
#map-dialog .map-heading { gap: 8px; }
#map-dialog .map-heading-actions { flex: none; flex-wrap: nowrap; }
.map-keeper { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px 14px;
  padding: 5px 8px; margin: 0 0 5px; border-block: 1px solid #86745080; background: #28392d; }
.map-keeper p { margin: 0; color: #f3dec0; font-size: 14px; line-height: 1.25; }
#map-keeper:not([hidden]) + #chart { --map-keeper-height: 83px; }
#chart { width: 100%; max-width: max(240px, calc((100dvh - 232px - var(--map-keeper-height, 0px)) * 1.736)); height: auto; margin-inline: auto; display: block; cursor: crosshair; touch-action: manipulation; }
#chart:focus-visible { outline: 1px solid #dec190; }
#map-water-habitat { color: #e5ca98; }
.map-legend { gap: 18px; justify-content: center; padding: 2px 0 11px; font-size: 12px; color: #d1d7c6; flex-wrap: wrap; }
.map-legend span { display: flex; align-items: center; gap: 6px; }
.map-legend i { display: inline-block; width: 10px; height: 10px; }
.key-self { background: #eebf6f; border: 2px solid #445746; outline: 1px solid #e9c78d; border-radius: 50%; }
.key-peer { border-radius: 50%; background: #ccded5; border: 1px solid #477269; }
.map-legend .key-trail { width: 14px; height: 2px; background: #c3b283; transform: rotate(-18deg); }
.map-legend .key-bridge { width: 13px; height: 5px; border-block: 1px solid #d3c19a; background: repeating-linear-gradient(90deg,#685d4c 0 2px,#c9b48d 2px 3px); transform: rotate(-18deg); }
.map-legend .key-camp { width: 11px; height: 9px; background: #eea765; clip-path: polygon(0 100%, 52% 0, 100% 100%); }
.map-legend .key-flag { width: 13px; height: 12px; background: #91d1db; clip-path: polygon(0 0, 100% 20%, 18% 61%, 18% 100%, 0 100%); }
.map-legend .key-hunt { width: 14px; height: 7px; border: 1px solid #dbf5e1; border-radius: 50%; background: #4d8e8a; }
#map-hunts-count { font-weight: inherit; }
.key-water { background: #609da0; border: 1px solid #c1d4c5; border-radius: 50% 35%; }
.map-resources { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; padding: 5px 8px 11px; color: #e4e4cc; font-size: 13px; }
.map-resource-habitat { flex-basis: 100%; margin: 0; color: #bfcfc5; font-size: 12px; }
.map-resources select, .map-resources button { min-height: 34px; padding: 4px 8px; color: #eae5cf;
  background: #152522; border: 1px solid #61786b; border-radius: 4px; font: inherit; }
.map-resources button:enabled { color: #f2d096; border-color: #92754d; }
#map-materials-count { color: #b5c3b5; font-size: 12px; }
@media (pointer: coarse) {
  .map-resources select, .map-resources button { min-height: 44px; }
  #shore-action { min-height: 44px; }
}
.map-footer { border-top: 1px solid #65786c66; justify-content: space-between; gap: 12px; padding: 10px 8px 13px; }
.world-switch { gap: 12px; color: #a0b3a7; font-size: 11px; white-space: nowrap; }
.world-switch b { font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: .045em; color: #c2cdba; }
.map-footer button { color: #e2c89c; background: none; border: 0; padding: 4px; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 620px) and (orientation: portrait) {
  dialog { width: 97vw; }
  .map-sheet { padding-inline: 4px; }
  .map-heading h2 { font-size: 23px; }
  .map-heading > div { gap: 8px; flex-wrap: wrap; }
  .map-legend { gap: 8px 13px; }
  .map-footer { align-items: start; flex-direction: column; gap: 3px; }
}
@media (max-width: 340px) {
  .map-keeper { grid-template-columns: 1fr; gap: 4px; }
  .map-keeper .keeper-button { justify-self: start; }
}
@media (max-height: 490px) and (orientation: landscape) {
  dialog { width: min(94vw, calc((100svh - 100px) * 1.74)); }
  .map-heading { padding-block: 3px; } .map-heading h2 { font-size: 18px; }
  .map-close { height: 26px; } .map-legend { padding-bottom: 3px; }
  .map-footer { padding-block: 3px; }
}

dialog {
  max-height: min(92dvh, 900px); overscroll-behavior: contain;
  border-color: #829282a0; border-radius: 13px;
}
dialog::backdrop { background: #07110f9c; backdrop-filter: blur(3px); }
#help-dialog { width: min(92vw, 460px); }
.help-sheet { padding: 12px 17px 17px; background: linear-gradient(150deg, #294039, #172a27 76%); }
.help-sheet .map-heading { padding: 0 0 8px; }
.controls-guide { display: grid; gap: 0; margin: 0 0 11px; }
.controls-guide > div { display: grid; grid-template-columns: 8.8rem 1fr; gap: 9px; padding: 8px 0; border-top: 1px solid #617669; }
.controls-guide dt { color: #e4d3ad; font-weight: 650; font-size: 13px; }
.controls-guide dd { margin: 0; color: #d4e0d5; font-size: 13px; line-height: 1.35; }
.controls-guide dd span { display: block; margin-top: 4px; }
#atlas-link { display: inline-flex; align-items: center; gap: 5px; min-height: 36px; color: #f1d09b; font-size: 13px; text-underline-offset: 3px; }
.map-close { min-height: 40px; min-width: 40px; border-radius: 6px; }
.bag-views { gap: clamp(3px, 1.5vw, 14px); margin-bottom: 10px; }
.bag-view { min-height: 43px; flex: 1 1 auto; padding-inline: 4px; }
.bag-view:focus-visible { outline-offset: 0; }
@media (pointer: coarse) {
  .map-close { min-height: 44px; min-width: 44px; }
}
@media (max-width: 520px) {
  #catch-dialog, #ladder-dialog, #map-dialog, #help-dialog {
    position: fixed; inset: auto 0 0; width: 100%; max-width: 100%; margin: 0; padding-bottom: env(safe-area-inset-bottom);
    border-radius: 14px 14px 0 0;
  }
  .help-sheet { padding-inline: 12px; }
  .controls-guide > div { grid-template-columns: 6.5rem 1fr; gap: 5px; }
}

#craft-dialog {
  width: min(95vw, 930px); height: min(88dvh, 668px); max-height: none; overflow: hidden;
  border-color: #7a8874; border-radius: 14px; background: #172925;
}
.craft-shell { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }
.craft-header {
  display: flex; align-items: center; gap: 12px; padding: 9px 17px 9px 20px;
  background: linear-gradient(120deg, #35463a, #20332c 84%); border-bottom: 1px solid #74877570;
}
.craft-header h2 { flex: 1; margin: 0; color: #f4e7cb; font: 600 28px/1 var(--font-display); }
.craft-close { flex: none; }
.craft-close:hover, .craft-back:hover { background: #4c5542; color: #ffdfaa; }
.craft-back {
  display: none; align-items: center; justify-content: center; gap: 4px; min-height: 40px;
  padding: 0 8px; border: 1px solid #88947768; border-radius: 6px; background: #192b2570; color: #dfdfca;
  font-size: 13px; font-weight: 650;
}
.craft-back svg { width: 17px; height: 17px; }
#craft-dialog[data-history="true"] .craft-back { display: inline-flex; }
.craft-layout { display: grid; grid-template-columns: minmax(316px, .86fr) minmax(0, 1.14fr); min-height: 0; }
.craft-catalog {
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); min-height: 0;
  border-inline-end: 1px solid #6c7e6a80; background: #132521;
}
.craft-categories {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px;
  padding: 10px 10px 8px; border-bottom: 1px solid #5e74634d;
}
.craft-categories button {
  min-width: 0; min-height: 42px; padding: 3px 1px; border: 1px solid transparent; border-radius: 6px;
  background: #243831; color: #d5e0d3; font: 650 clamp(12px, 1.75vw, 14px)/1.03 var(--font-ui);
  letter-spacing: -.02em;
}
.craft-categories button:hover { background: #39473a; }
.craft-categories button[aria-pressed="true"] { border-color: #ac8c62; background: #51442f; color: #ffe1aa; }
.craft-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px 8px 16px; border-bottom: 1px solid #5e74634d;
}
.craft-filter div, .craft-station div { display: grid; gap: 2px; min-width: 0; }
.craft-filter span, .craft-section-label {
  margin: 0; color: #b7cabc; font-size: 13px; font-weight: 600; line-height: 1.15;
}
.craft-filter strong, .craft-station strong { color: #f1ead5; font-size: 15px; line-height: 1.2; }
.craft-link {
  min-height: 36px; padding: 4px 7px; border: 1px solid #81917b72; border-radius: 6px;
  background: #263a31; color: #f1d3a0; font: 650 13px/1.12 var(--font-ui); text-align: center;
}
.craft-link:hover { border-color: #c1a778; background: #3c4635; color: #ffe6b9; }
.craft-bait-options { grid-row: 2; padding: 6px 10px 0; }
.craft-list, .craft-ingredients { list-style: none; margin: 0; padding: 0; }
.craft-list, .craft-detail-body { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-color: #647867 transparent; }
.craft-list { display: grid; grid-row: 3; align-content: start; gap: 3px; padding: 8px 10px 12px; }
.craft-row {
  display: grid; width: 100%; min-height: 47px; grid-template-columns: 36px minmax(0, 1fr) 114px;
  align-items: center; gap: 7px; padding: 4px 7px 4px 5px; border: 1px solid #63786345; border-radius: 6px;
  color: #f1ebd7; background: #21352e; text-align: start;
}
.craft-row:hover { background: #314439; border-color: #788a72; }
.craft-row[aria-current="true"] { background: #434331; border-color: #bc9f70; }
.craft-row:focus-visible { outline-offset: -2px; }
.craft-row-copy { display: grid; gap: 2px; min-width: 0; }
.craft-row-name { font: 650 15px/1.1 var(--font-ui); overflow-wrap: anywhere; }
.craft-row-summary { color: #d0ddcc; font: 500 12px/1.12 var(--font-ui); }
.craft-row-status {
  justify-self: end; border: 1px solid #a9b8a154; border-radius: 4px; padding: 3px 5px;
  color: #d0ddcc; font: 650 12px/1.05 var(--font-ui); white-space: nowrap;
}
.craft-row-status[data-tone="ready"] { border-color: #98b9897d; background: #2c462e; color: #e1edc6; }
.craft-row-status[data-tone="missing"] { border-color: #c382685f; background: #4b342c; color: #ffd0bd; }
.craft-row-status[data-tone="station"] { border-color: #b998687d; background: #493d2c; color: #f4d8a5; }
.craft-row-art, .craft-product-art, .craft-ingredient-art {
  display: grid; place-items: center; border: 1px solid #7d8d7259; border-radius: 6px;
  background: radial-gradient(ellipse at 52% 46%, #566650, #243830 76%);
}
.craft-row-art, .craft-ingredient-art { width: 36px; height: 36px; }
.craft-row-art[data-rare], .craft-product-art[data-rare], .craft-ingredient-art[data-rare] {
  border-color: #ab94ac85; background: radial-gradient(ellipse, #635774, #333047 76%);
}
.craft-detail {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; min-width: 0; min-height: 0;
  background: linear-gradient(149deg, #2c3e35, #1b2c26 66%);
}
.craft-detail-body { padding: 18px; }
.craft-product { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 13px; }
.craft-product-art { width: 90px; height: 90px; }
.craft-product h3 { margin: 0 0 4px; color: #fbecd0; font: 650 27px/1.04 var(--font-ui); overflow-wrap: anywhere; }
.craft-effect, .craft-tip, .craft-stock { margin: 0; line-height: 1.3; }
.craft-effect { color: #f0ca8e; font-size: 16px; font-weight: 700; }
.craft-tip { margin-top: 4px; color: #d0ddcf; font-size: 14px; }
.craft-stock { margin-top: 6px; color: #bfd2b7; font-size: 13px; }
.craft-station {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 54px;
  margin: 16px 0; padding: 6px 8px 6px 11px;
  border: 1px solid #74867470; border-radius: 7px; background: #22362d;
}
.craft-station[data-available="false"] { border-color: #b48c607d; background: #42392a; }
.craft-station[data-available="false"] strong { color: #f4d7a7; }
.craft-material-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin: 0 2px 7px; }
.craft-material-heading span { color: #bdcbbc; font-size: 12px; }
.craft-ingredients { display: grid; gap: 5px; }
.craft-ingredient {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto auto; align-items: center;
  gap: 7px; min-height: 49px; padding: 4px 8px 4px 5px;
  border: 1px solid #77907560; border-radius: 7px; background: #162b24;
}
.craft-ingredient[data-missing="true"] { border-color: #c5886a77; background: #2c2921; }
.craft-ingredient-copy { display: grid; gap: 2px; min-width: 0; }
.craft-ingredient-copy strong { color: #f1ebd7; font: 650 15px/1.13 var(--font-ui); overflow-wrap: anywhere; }
.craft-ingredient-copy span { color: #c0cbbd; font-size: 12px; line-height: 1.2; }
.craft-ingredient-copy span:empty { display: none; }
.craft-ingredient .craft-link { grid-column: 3; }
.craft-ratio {
  grid-column: 4; min-width: 45px; text-align: end; color: #c9ddbb; white-space: nowrap;
  font: 700 15px/1 var(--font-ui); font-variant-numeric: tabular-nums;
}
.craft-ingredient[data-missing="true"] .craft-ratio { color: #ffc4a9; }
.craft-footer { padding: 11px 18px 16px; border-top: 1px solid #6b816e85; background: #253930; }
.craft-action-copy p, .craft-use-note { margin: 0; font-size: 14px; line-height: 1.25; color: #d6e0d2; }
#craft-guidance { color: #edd7ac; }
#craft-feedback { margin-top: 4px; color: #e4eec7; }
#craft-feedback:empty { margin: 0; }
#craft-feedback[data-error="true"] { color: #ffceba; }
.craft-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 9px; }
.craft-actions button { min-height: 44px; padding: 6px 13px; border-radius: 7px; font: 700 16px/1.1 var(--font-ui); }
.craft-submit { min-width: 132px; background: #ebc590; color: #30281c; border: 1px solid #f3d6a2; }
.craft-submit:enabled:hover { background: #ffe0ad; }
.craft-use { border: 1px solid #ac9d6e; background: #38473a; color: #f8e2ac; }
.craft-use:enabled:hover { background: #4a5842; }
.craft-actions button:disabled { border-color: #748776; background: #34463c; color: #cfdbca; }
.craft-use-note { margin-top: 6px; color: #ead4b2; text-align: end; font-size: 13px; }
@media (pointer: coarse) {
  .craft-categories button, .craft-link, .craft-back { min-height: 44px; }
}
@media (max-width: 620px) {
  #craft-dialog {
    position: fixed; inset: auto 0 0; width: 100%; height: min(94dvh, 710px); margin: 0;
    padding-bottom: env(safe-area-inset-bottom); border-radius: 14px 14px 0 0;
  }
  .craft-header { padding: 7px 11px 7px 14px; gap: 9px; }
  .craft-header h2 { font-size: 23px; }
  .craft-layout { display: block; height: 100%; }
  .craft-catalog, .craft-detail { height: 100%; }
  .craft-catalog { border-inline-end: 0; }
  #craft-dialog[data-view="catalog"] .craft-detail, #craft-dialog[data-view="detail"] .craft-catalog { display: none; }
  #craft-dialog[data-view="detail"] .craft-back { display: inline-flex; }
  .craft-categories { padding-inline: 9px; }
  .craft-categories button { font-size: 14px; }
  .craft-list { padding-inline: 9px; }
  .craft-row { min-height: 50px; }
  .craft-detail-body, .craft-footer { padding: 12px; }
  .craft-product { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
  .craft-product-art { width: 72px; height: 72px; }
  .craft-product h3 { font-size: 23px; }
  .craft-station { margin: 12px 0; }
  .craft-actions button { flex: 1 1 auto; min-width: 0; padding-inline: 8px; }
}
@media (max-width: 360px) {
  .craft-categories button { font-size: 12px; }
  .craft-detail-body, .craft-footer { padding-inline: 8px; }
  .craft-ingredient { gap: 5px; }
  .craft-ingredient .craft-link { padding-inline: 4px; }
}

#keeper-dialog { width: min(94vw, 630px); max-height: min(90dvh, calc(var(--keeper-visible-height, 100dvh) * .9), 840px); overflow: hidden; }
.keeper-sheet {
  display: flex; flex-direction: column; max-height: min(89dvh, calc(var(--keeper-visible-height, 100dvh) * .89), 839px);
  background: linear-gradient(152deg, #2d4339, #172a27 73%);
}
.keeper-heading, .keeper-views { display: flex; align-items: center; gap: 8px; padding-inline: clamp(12px, 4vw, 22px); }
.keeper-heading { justify-content: space-between; padding-block: 9px; }
.keeper-heading h2 { margin: 0; font: 650 clamp(22px, 5vw, 29px)/1.05 var(--font-display); color: #f4e7c8; }
.keeper-heading .map-close { flex: none; }
.keeper-views { padding-bottom: 9px; border-bottom: 1px solid #71847780; }
.keeper-content {
  display: grid; gap: 9px; overflow-y: auto; overscroll-behavior: contain; min-height: 0;
  padding: 10px clamp(12px, 4vw, 22px) 16px; scrollbar-color: #718477 transparent;
}
.keeper-card {
  display: grid; gap: 6px; min-width: 0; padding: 10px 12px;
  border: 1px solid #607467a6; border-radius: 7px; background: #152924;
}
.keeper-card h3 { display: flex; align-items: center; gap: 6px; margin: 0; overflow-wrap: anywhere; color: #f7e6c5; font: 700 18px/1.15 var(--font-ui); }
.keeper-card h3 .item-art { flex: 0 0 42px; height: 25px; padding: 0; }
.keeper-card p { margin: 0; color: #d1ded1; font-size: 14px; line-height: 1.32; overflow-wrap: anywhere; }
.keeper-card .keeper-stock { color: #ebcb95; }
.keeper-lesson {
  gap: 9px; padding: clamp(12px, 3vw, 18px); border-color: #8a88667d; border-radius: 9px;
  background: linear-gradient(123deg, #293e32, #192e28 70%);
}
.keeper-lesson h3 { font: 650 clamp(21px, 5vw, 27px)/1.12 var(--font-display); }
.keeper-lesson .keeper-benefit {
  border-inline-start: 2px solid #c5a675; padding: 2px 0 2px 9px; color: #f4dba8;
}
.keeper-progress {
  display: grid; grid-template-columns: minmax(0, auto) 1fr; align-items: center; gap: 8px 12px;
  color: #d8e3cb; font-size: 13px; line-height: 1.2; font-variant-numeric: tabular-nums;
}
.keeper-progress progress {
  display: block; appearance: none; width: 100%; min-width: 38px; max-width: 140px; height: 5px;
  color: #ebca8f; background: #536555; border: none; border-radius: 8px; overflow: hidden;
}
.keeper-progress progress::-webkit-progress-bar { background: #536555; }
.keeper-progress progress::-webkit-progress-value { background: #ebca8f; }
.keeper-progress progress::-moz-progress-bar { background: #ebca8f; }
.keeper-materials { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 0; margin: 0; list-style: none; }
.keeper-materials li { display: flex; gap: 4px; align-items: center; color: #d8e3cb; font-size: 13px; }
.keeper-materials .item-art { flex: 0 0 21px; width: 21px; height: 21px; }
.keeper-lesson .keeper-actions { margin-block-start: 2px; }
.keeper-lesson .keeper-button[data-primary="true"], .keeper-card[data-keeper-offer] .keeper-button[data-primary="true"] {
  min-height: 44px; padding-inline: 13px; border-color: #eaca94; background: #dabc85; color: #212c22; font-size: 15px;
}
.keeper-lesson .keeper-button[data-primary="true"]:enabled:hover,
.keeper-card[data-keeper-offer] .keeper-button[data-primary="true"]:enabled:hover { background: #efd6a3; }
.keeper-heading h2:focus-visible, .keeper-lesson h3:focus-visible,
.keeper-lesson .keeper-button:focus-visible, .keeper-disclosure :is(summary, .keeper-button):focus-visible {
  outline: 2px solid #f5e1b0; outline-offset: 2px;
}
.keeper-trade { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-align: start; }
.keeper-trade .item-art { flex: 0 0 30px; width: 30px; height: 28px; }
.keeper-trade small { display: block; font-size: 11px; font-weight: 550; }
.keeper-lesson .keeper-recipe-link {
  justify-self: start; min-height: 44px; padding-inline: 2px; border-color: transparent;
  background: transparent; color: #e7d4ad; font-size: 13px; text-align: start; text-decoration: underline;
  text-underline-offset: 3px;
}
.keeper-lesson .keeper-recipe-link:enabled:hover { border-color: transparent; background: none; color: #fff0c5; }
.keeper-disclosure { display: block; padding-block: 0; }
.keeper-disclosure summary { padding-block: 9px; color: #f0d7a7; font-weight: 650; line-height: 1.25; cursor: pointer; }
.keeper-disclosure[open] { padding-bottom: 10px; }
.keeper-disclosure[open] > :not(summary) { margin-block: 0 6px; }
.keeper-disclosure[open] > :last-child { margin-bottom: 0; }
.keeper-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.keeper-button, .keeper-actions :is(select, input), #cut-ingredient {
  min-height: 34px; max-width: 100%; padding: 5px 9px; border: 1px solid #768c79; border-radius: 5px;
  background: #263a31; color: #f6e4bc; font: 650 14px/1.18 var(--font-ui);
}
.keeper-actions :is(select, input) { min-width: 0; }
.keeper-actions input { flex: 1 1 12rem; }
.cut-ingredient { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 7px; color: #dfd7bd; font-size: 14px; }
.keeper-button:enabled:hover { border-color: #e3c18a; background: #3d4c38; }
.keeper-button[data-primary="true"] { border-color: #e4ba81; background: #564832; }
.keeper-button:disabled { opacity: .58; cursor: default; }
.keeper-barter-link {
  width: 100%; padding: 8px 12px; text-align: start; border-color: #908064; color: #f4dba8;
}
.keeper-barter-fish, .keeper-barter-rewards { display: grid; gap: 6px; min-width: 0; }
.keeper-barter-fish { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.keeper-barter-field { min-width: 0; display: grid; gap: 4px; color: #e9d9b5; font-size: 13px; }
.keeper-barter-field select {
  width: 100%; min-width: 0; min-height: 44px; padding: 5px 7px; border: 1px solid #819483; border-radius: 5px;
  background: #172a25; color: #f6e4bc; font: 600 16px/1.2 var(--font-ui); color-scheme: dark;
}
.keeper-barter-choices { min-width: 0; border: 0; margin: 0; padding: 0; }
.keeper-barter-choices legend { padding: 0; margin-bottom: 4px; color: #e9d9b5; font-size: 13px; }
.keeper-barter-rewards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.keeper-barter-reward {
  display: grid; grid-template-columns: auto 24px minmax(0, 1fr) auto; align-items: center; gap: 5px;
  min-height: 52px; padding: 5px 7px; border: 1px solid #768c79; border-radius: 5px;
  background: #20352c; color: #f6e4bc; line-height: 1.1; cursor: pointer;
}
.keeper-barter-reward:has(:checked) { background: #574a32; border-color: #eaca94; }
.keeper-barter-reward input { width: 14px; height: 14px; margin: 0; accent-color: #eaca94; }
.keeper-barter-reward .item-art { width: 100%; }
.keeper-barter-reward-copy { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.keeper-barter-reward-copy small { display: block; margin-top: 3px; color: #e6ddc1; font-size: 12px; font-weight: 500; }
.keeper-barter-count { color: #f4dba8; font-size: 13px; }
.keeper-barter-summary {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); align-items: baseline; gap: 3px 12px;
  margin: 0; padding: 8px; border-inline-start: 2px solid #c5a675; background: #162923;
  color: #e9d9b5; font-size: 14px;
}
.keeper-barter-summary dd { margin: 0; color: #f6e4bc; }
.keeper-barter-field select:focus-visible, .keeper-barter-reward:has(:focus-visible), .keeper-barter-link:focus-visible {
  outline: 2px solid #f5e1b0; outline-offset: 2px;
}
.keeper-feedback { margin: 0; padding: 8px clamp(12px, 4vw, 22px); border-top: 1px solid #71847780; color: #e4edbe; font-size: 14px; }
.keeper-feedback:empty { display: none; }
.keeper-feedback[data-error="true"] { color: #ffcbb2; }
.map-heading .map-heading-actions { align-items: center; flex: 0 1 auto; justify-content: end; gap: 5px; }
.map-heading-actions .map-close { flex: none; }
#walk-to-bank { margin-inline-start: 4px; }
@media (pointer: coarse) {
  .keeper-button, .keeper-views .tackle-choice, .keeper-actions :is(select, input), #cut-ingredient, #walk-to-bank { min-height: 44px; }
  .keeper-disclosure summary { min-height: 44px; padding-block: 13px; }
  .keeper-actions :is(select, input), #cut-ingredient { font-size: 16px; }
}
@media (max-width: 600px) {
  .keeper-barter-rewards { grid-template-columns: minmax(0, 1fr); }
  .keeper-barter-reward { min-height: 44px; gap: 8px; padding-inline: 9px; }
}
@media (max-width: 520px) {
  #keeper-dialog {
    position: fixed; inset: auto 0 var(--keeper-bottom-inset, 0px); width: 100%; max-width: 100%; margin: 0; border-radius: 14px 14px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .map-heading-actions #open-shore-journal { font-size: 12px; }
  .keeper-card { padding-inline: 9px; }
  .keeper-lesson { padding-inline: 12px; }
  .keeper-lesson .keeper-actions > [data-primary="true"], .keeper-card[data-keeper-offer] .keeper-actions > [data-primary="true"] { width: 100%; }
  .keeper-trade { justify-content: center; }
}
