@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@500;700&family=Paytone+One&display=swap');

:root {
  --ink: #172238;
  --deep: #102638;
  --cream: #fff1c2;
  --paper: #f8efd7;
  --gold: #d6b75f;
  --gold-light: #ffe08a;
  --wood: #9b663d;
  --wood-dark: #563a28;
  --water: #247f9b;
  --water-light: #82d1cd;
  --pine: #2f6045;
  --danger: #c94845;
  --safe: #70bd72;
  --border: 3px solid var(--ink);
  --shadow: 0 5px 0 rgba(9, 21, 32, .78), 0 10px 22px rgba(3, 14, 24, .32);
}

* { box-sizing: border-box; }

html, body { width: 100%; min-height: 100%; margin: 0; overflow: hidden; background: var(--deep); }

body {
  color: var(--cream);
  font-family: 'DM Mono', Consolas, monospace;
  image-rendering: pixelated;
  overscroll-behavior: none;
  touch-action: none;
  user-select: none;
}

button, input { font: inherit; }
button { color: inherit; }
button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
[hidden] { display: none !important; }

.game-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #08141f;
}

#lakeCanvas {
  width: 100vw;
  height: 100vh;
  object-fit: contain;
  display: block;
  background: #17627e;
  image-rendering: pixelated;
}

.top-hud {
  position: absolute;
  z-index: 4;
  inset: 14px 16px auto;
  display: flex;
  align-items: start;
  gap: 10px;
  pointer-events: none;
}

.hud-card,
.activity-card,
.depth-picker,
.cast-status,
.fight-panel,
.dock-actions,
.message-ribbon {
  border: var(--border);
  background:
    linear-gradient(rgba(255,255,255,.025), rgba(255,255,255,0)),
    var(--ink);
  box-shadow: inset 0 0 0 2px rgba(214, 183, 95, .38), var(--shadow);
}

.hud-card {
  display: flex;
  align-items: center;
  min-height: 57px;
  gap: 9px;
  padding: 7px 12px;
  text-shadow: 2px 2px 0 #000;
}

.hud-card > span:first-child { font-size: 25px; }
.hud-card small { display: block; color: #ebdcae; font-size: 9px; letter-spacing: .08em; }
.hud-card strong { display: block; color: #fff8d6; font-family: 'Paytone One', sans-serif; font-size: 15px; letter-spacing: .03em; }

.energy-card { position: relative; min-width: 147px; padding-bottom: 15px; }
.energy-card > i { position: absolute; left: 11px; right: 11px; bottom: 7px; height: 6px; border: 1px solid #07111b; background: #344353; }
.energy-card > i b { display: block; width: 100%; height: 100%; background: linear-gradient(90deg, #8dd45f, #d6df65); transition: width .25s ease; }
.level-card { position: relative; min-width: 170px; padding-bottom: 15px; }
.level-card > span:first-child { color: var(--gold-light); }
.level-card > i { position: absolute; left: 11px; right: 11px; bottom: 7px; height: 6px; border: 1px solid #07111b; background: #344353; }
.level-card > i b { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #6bd0ca, #c59cf4, #ffe08a); transition: width .35s ease; }

.coin-card { margin-left: auto; min-width: 98px; justify-content: center; }
.journal-card { min-width: 110px; justify-content: center; }
.coin {
  display: inline-grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 3px solid #8f6422;
  border-radius: 50%;
  background: #f5c84c;
  color: #8f4b21;
  font: 700 14px 'DM Mono', monospace;
  text-shadow: none;
}

.icon-button {
  width: 57px;
  height: 57px;
  border: var(--border);
  background: var(--ink);
  box-shadow: inset 0 0 0 2px rgba(214,183,95,.38), var(--shadow);
  cursor: pointer;
  font-size: 23px;
  pointer-events: auto;
}

.activity-card {
  position: absolute;
  z-index: 4;
  top: 85px;
  right: 16px;
  width: 164px;
  padding: 9px 11px;
}

.activity-card > small { display: block; margin-bottom: 7px; color: #d7c898; font-size: 8px; letter-spacing: .12em; }
.activity-card > span { display: block; margin-top: 6px; color: #82d1cd; font-size: 7px; letter-spacing: .08em; }
#activityFish { display: flex; gap: 4px; min-height: 20px; }
#activityFish i { position: relative; display: block; width: 25px; height: 12px; margin: 3px 2px; border-radius: 60% 45% 45% 60%; background: var(--water-light); filter: drop-shadow(1px 2px #071723); }
#activityFish i::after { position: absolute; content: ''; right: -6px; top: 2px; border-top: 4px solid transparent; border-bottom: 4px solid transparent; border-right: 0; border-left: 7px solid currentColor; color: inherit; }
#activityFish i.dim { opacity: .28; }

.depth-picker {
  position: absolute;
  z-index: 4;
  left: 16px;
  top: 86px;
  width: 175px;
  padding: 9px;
}

.depth-picker > small { display: block; margin: 0 3px 7px; color: #d7c898; font-size: 8px; letter-spacing: .1em; }
.depth-picker > div { display: grid; gap: 5px; }
.depth-button {
  display: grid;
  grid-template-columns: 38px 1fr;
  grid-template-rows: 1fr 1fr;
  min-height: 44px;
  align-items: center;
  padding: 5px 7px;
  border: 2px solid #435267;
  background: #25364a;
  cursor: pointer;
  text-align: left;
}
.depth-button:hover, .depth-button.active { border-color: var(--gold-light); background: #365166; }
.depth-button strong { align-self: end; font-size: 9px; }
.depth-button small { align-self: start; color: #83d5d1; font-size: 7px; }
.depth-bars { grid-row: 1 / 3; display: flex; align-items: end; gap: 2px; height: 24px; }
.depth-bars i { width: 9px; border: 1px solid #0c3544; background: #43b5c4; }
.depth-bars i:nth-child(1) { height: 9px; }
.depth-bars i:nth-child(2) { height: 15px; }
.depth-bars i:nth-child(3) { height: 21px; }
.depth-bars.one i:nth-child(n+2) { opacity: .18; }
.depth-bars.two i:nth-child(3) { opacity: .18; }

.cast-status {
  position: absolute;
  z-index: 5;
  top: 88px;
  left: 50%;
  width: min(360px, 58vw);
  padding: 9px 12px 11px;
  transform: translateX(-50%);
  text-align: center;
}
.cast-status small { display: block; margin-bottom: 8px; color: #fff8d6; font-size: 10px; letter-spacing: .1em; }
.cast-status > div { height: 10px; border: 2px solid #07111b; background: #344353; }
.cast-status i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #70bd72, #ffe08a); }

.fight-panel {
  position: absolute;
  z-index: 5;
  right: 18px;
  bottom: 88px;
  width: min(360px, 37vw);
  padding: 13px;
}
.fight-panel header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.fight-panel header small { display: block; color: #e7c966; font-size: 8px; letter-spacing: .12em; }
.fight-panel header strong { display: block; margin-top: 2px; font-family: 'Paytone One', sans-serif; font-size: 18px; letter-spacing: .03em; }
#burstBadge { padding: 7px 8px; border: 2px solid #ffdb7b; background: var(--danger); color: white; font-size: 8px; animation: warning .45s steps(2) infinite; }
.fight-panel label { display: block; margin-top: 8px; }
.fight-panel label > span { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 8px; }
.fight-panel label small { color: #d7c898; letter-spacing: .08em; }
.meter { display: block; height: 15px; padding: 2px; border: 2px solid #07111b; background: #334252; }
.meter b { display: block; width: 0; height: 100%; transition: width .08s linear, background .15s ease; }
.progress-meter b { background: linear-gradient(90deg, #43aeb5, #85dfc5); }
.tension-meter b { background: linear-gradient(90deg, #70bd72 0 45%, #e4c75f 68%, #c94845 90%); }
.fight-technique { display: grid; grid-template-columns: 114px 1fr; align-items: center; gap: 9px; margin-top: 9px; }
.fight-technique span small, .fight-technique span b { display: block; }
.fight-technique span small { color: #d7c898; font-size: 6px; letter-spacing: .08em; }
.fight-technique span b { margin-top: 2px; color: var(--gold-light); font-size: 8px; }
#rhythmTrack { position: relative; display: block; height: 18px; overflow: hidden; border: 2px solid #07111b; background: #334252; }
#rhythmTrack em { position: absolute; left: 42%; top: 0; width: 16%; height: 100%; background: rgba(255,224,138,.8); box-shadow: 0 0 8px #ffe08a; }
#rhythmTrack b { position: absolute; left: 0; top: 0; width: 4px; height: 100%; background: #fff; box-shadow: 0 0 5px #fff; transform: translateX(-50%); }
.fight-panel.mode-hold #rhythmTrack em { left: 0; width: 100%; opacity: .2; }
.fight-panel.mode-pump #rhythmTrack em { left: 0; width: 50%; background: rgba(112,189,114,.72); box-shadow: none; }
.fight-panel.mode-pump.pump-rest #rhythmTrack em { left: 50%; background: rgba(130,209,205,.72); }
#reelButton {
  display: grid;
  grid-template-columns: 42px 1fr;
  grid-template-rows: 1fr 1fr;
  width: 100%;
  min-height: 53px;
  margin-top: 12px;
  align-items: center;
  border: 2px solid #07111b;
  background: #f4df9b;
  box-shadow: inset 0 -4px #b3843b;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
#reelButton:active, #reelButton.pulling { transform: translateY(2px); box-shadow: inset 0 -2px #b3843b; background: #fff1c2; }
#reelButton .mouse-glyph { grid-row: 1 / 3; display: grid; place-items: center; font-size: 29px; }
#reelButton strong { align-self: end; font-size: 11px; }
#reelButton small { align-self: start; font-size: 6px; }

.dock-actions {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 12px;
  display: flex;
  transform: translateX(-50%);
  pointer-events: auto;
}
.dock-actions button {
  position: relative;
  display: grid;
  width: 84px;
  min-height: 67px;
  place-items: center;
  padding: 5px;
  border: 0;
  border-right: 2px solid #526075;
  background: transparent;
  cursor: pointer;
}
.dock-actions button:last-child { border-right: 0; }
.dock-actions button:hover { background: #293c51; }
.dock-actions button:disabled { opacity: .42; cursor: not-allowed; }
.dock-actions button > span { font-size: 22px; line-height: 1; filter: drop-shadow(2px 2px #000); }
.dock-actions button strong { font-size: 8px; letter-spacing: .06em; }
.dock-actions button small { color: #7fd0cd; font-size: 6px; }
.dock-actions .cast-button { width: 120px; background: linear-gradient(#cf6b48, #9f4637); }
.dock-actions .cast-button:hover { background: linear-gradient(#df7951, #b8523e); }
.dock-actions .cast-button > span { font-size: 28px; color: #ffe08a; }
.dock-actions .cast-button strong { font-size: 11px; }

.message-ribbon {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: 94px;
  width: min(480px, 55vw);
  padding: 9px 13px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}
.message-ribbon strong { display: block; color: #ffe08a; font-size: 9px; letter-spacing: .1em; }
.message-ribbon span { display: block; margin-top: 3px; font-size: 8px; }

.title-screen {
  position: absolute;
  z-index: 10;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background:
    linear-gradient(90deg, rgba(5,17,24,.72), rgba(5,17,24,.1) 45%, rgba(5,17,24,.12)),
    linear-gradient(0deg, rgba(4,16,23,.6), transparent 58%);
  text-align: center;
}
.brand-chip {
  position: absolute;
  top: 25px;
  left: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 2px solid #e4c75f;
  background: rgba(19,34,50,.86);
  font-size: 8px;
  letter-spacing: .14em;
}
.brand-chip i { width: 9px; height: 9px; transform: rotate(45deg); background: #e4c75f; }
.title-copy { transform: translateY(-20px); text-shadow: 4px 5px 0 #172238, 0 8px 24px #07111b; }
.title-copy p { margin: 0 0 2px; color: #ffe08a; font-size: clamp(9px, 1.2vw, 13px); letter-spacing: .22em; }
  .title-copy h1 { margin: 0; font: 400 clamp(48px, 8.7vw, 106px)/.82 'Paytone One', sans-serif; letter-spacing: -.045em; }
.title-copy h1 em { color: #ffe08a; font-style: normal; }
.title-copy > span { display: block; margin-top: 23px; font-size: 10px; letter-spacing: .28em; }

.primary-button {
  min-width: 260px;
  padding: 12px 20px;
  border: var(--border);
  background: linear-gradient(#e9c862, #b98934);
  box-shadow: inset 0 0 0 2px #fff0a5, 0 5px 0 #172238, 0 12px 25px rgba(0,0,0,.32);
  color: var(--ink);
  cursor: pointer;
  text-transform: uppercase;
}
.primary-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
.primary-button:active { transform: translateY(3px); box-shadow: inset 0 0 0 2px #fff0a5, 0 2px 0 #172238; }
.primary-button strong, .primary-button span { display: block; }
.primary-button strong { font: 18px 'Paytone One', sans-serif; }
.primary-button span { margin-top: 3px; font-size: 7px; letter-spacing: .04em; }
.title-controls { position: absolute; bottom: 22px; margin: 0; font-size: 8px; letter-spacing: .16em; text-shadow: 2px 2px #172238; }

.tutorial-card,
.catch-card {
  position: absolute;
  z-index: 11;
  left: 50%;
  top: 50%;
  width: min(620px, calc(100vw - 30px));
  transform: translate(-50%, -50%);
  border: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--gold), 0 9px 0 rgba(8,17,27,.8), 0 20px 50px rgba(0,0,0,.45);
  color: var(--ink);
  text-align: center;
}
.tutorial-card { padding: 25px 28px 22px; }
.eyebrow { margin: 0; color: #7a5a2b; font-size: 8px; letter-spacing: .14em; }
.tutorial-card h2, .dialog-shell h2, .catch-card h2 { margin: 5px 0 18px; font: 24px 'Paytone One', sans-serif; }
.tutorial-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 20px; }
.tutorial-steps article { display: grid; grid-template-columns: 34px 1fr; gap: 7px; min-height: 88px; align-items: start; padding: 10px; border: 2px solid var(--ink); background: #fff9e9; text-align: left; }
.tutorial-steps article > b { display: grid; width: 30px; height: 30px; place-items: center; border: 2px solid var(--ink); border-radius: 50%; background: var(--gold-light); }
.tutorial-steps strong { display: block; margin: 2px 0 5px; font-size: 9px; }
.tutorial-steps small { display: block; color: #54606b; font-size: 7px; line-height: 1.5; }
.close-x {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 2px solid var(--ink);
  background: #fff9e9;
  color: var(--ink);
  cursor: pointer;
  font: 23px/1 sans-serif;
}
.tutorial-card > .close-x { position: absolute; top: 10px; right: 10px; }

.catch-card { width: min(430px, calc(100vw - 30px)); padding: 18px 25px 22px; }
.catch-card > p:first-child { margin: 0; color: #a34a35; font-size: 9px; letter-spacing: .17em; }
.catch-card h2 { margin: 2px 0 5px; font-size: 30px; }
.catch-card > p:nth-of-type(2) { margin: 0 auto 14px; max-width: 320px; color: #56636b; font-size: 8px; line-height: 1.5; }
.catch-fish-art { display: block; width: 240px; height: 120px; margin: -5px auto -2px; image-rendering: pixelated; filter: drop-shadow(5px 6px rgba(23,34,56,.24)); animation: catch-fish-arrive .55s cubic-bezier(.2,.9,.2,1) both; }
@keyframes catch-fish-arrive { from { opacity: 0; transform: translateY(22px) rotate(-7deg) scale(.72); } 70% { transform: translateY(-5px) rotate(2deg) scale(1.04); } to { opacity: 1; transform: none; } }
.catch-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 0 15px; border: 2px solid var(--ink); }
.catch-stats span { display: grid; padding: 8px; border-right: 2px solid var(--ink); background: #fff9e9; }
.catch-stats span:last-child { border-right: 0; }
.catch-stats small { color: #7a5a2b; font-size: 7px; }
.catch-stats strong { margin-top: 3px; font-size: 11px; }

.panel-dialog {
  width: min(910px, calc(100vw - 30px));
  max-height: min(670px, calc(100vh - 28px));
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
  color: var(--ink);
}
.panel-dialog::backdrop { background: rgba(7,17,27,.75); backdrop-filter: blur(2px); }
.dialog-shell {
  max-height: min(670px, calc(100vh - 28px));
  overflow: auto;
  border: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: inset 0 0 0 3px var(--gold), 0 9px 0 rgba(8,17,27,.8);
}
.dialog-shell > header { position: sticky; z-index: 2; top: 0; display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 18px 12px; border-bottom: 3px solid var(--ink); background: #e0bf61; }
.dialog-shell h2 { margin: 2px 0 0; font-size: 24px; }

.journal-progress { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 15px; padding: 13px 18px; border-bottom: 2px solid var(--ink); background: #e8e0c9; }
.journal-progress small { display: block; color: #7a5a2b; font-size: 7px; }
.journal-progress strong { font-size: 16px; }
.journal-progress > i { height: 14px; padding: 2px; border: 2px solid var(--ink); background: #fff9e9; }
.journal-progress > i b { display: block; width: 0; height: 100%; background: var(--pine); }
.journal-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 0; background: #e8e0c9; }
.journal-tabs button { flex: 0 0 auto; padding: 7px 9px; border: 2px solid var(--ink); background: #fff9e9; color: var(--ink); cursor: pointer; font-size: 7px; }
.journal-tabs button.active { background: var(--pine); color: #fff; box-shadow: inset 0 0 0 2px var(--gold); }
.fish-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; padding: 16px; }
.fish-entry { position: relative; min-height: 222px; overflow: hidden; border: 2px solid var(--ink); background: #fff9e9; box-shadow: 3px 3px 0 #b8a57b; }
.fish-entry.locked { background: #d5d0c3; color: #73777a; }
.fish-entry .mini-fish { position: relative; height: 72px; overflow: hidden; background: linear-gradient(#9fd9cf, #5eaaa9); }
.fish-entry.locked .mini-fish { filter: grayscale(1) brightness(.55); }
.fish-entry .mini-fish canvas { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.fish-entry section { padding: 8px; }
.fish-entry strong { display: block; min-height: 25px; font-size: 9px; }
.fish-entry small { display: block; margin-top: 3px; color: #5d6970; font-size: 6px; line-height: 1.45; }
.fish-entry .legendary-mark { position: absolute; z-index: 2; top: 4px; right: 4px; padding: 3px 4px; border: 1px solid var(--ink); background: #ffe08a; font-size: 6px; }
.fish-entry .rarity-mark { display: inline-block; min-height: 0; margin: 0 0 3px; color: #9a512d; font-size: 7px; }
.fish-record-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; margin-top: 7px; }
.fish-record-grid span { padding: 4px 2px; border: 1px solid #b4a27f; background: #f1ead7; text-align: center; }
.fish-record-grid b, .fish-record-grid small { display: block; }
.fish-record-grid b { color: #7a5a2b; font-size: 5px; }
.fish-record-grid small { margin-top: 1px; color: var(--ink); font-size: 6px; }

.shop-balance { display: grid; grid-template-columns: 34px auto 1fr; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 2px solid var(--ink); background: #e8e0c9; }
.shop-balance strong { font: 21px 'Paytone One', sans-serif; }
.shop-balance small { color: #7a5a2b; font-size: 7px; }
.shop-columns { display: grid; grid-template-columns: .9fr 1.1fr; }
.shop-columns > section { padding: 20px; }
.shop-columns > section + section { border-left: 3px solid var(--ink); }
.shop-columns h3 { margin: 5px 0; font: 18px 'Paytone One', sans-serif; }
.shop-columns p:not(.eyebrow) { min-height: 32px; margin: 0 0 15px; color: #58646b; font-size: 8px; line-height: 1.5; }
.level-pips { display: flex; gap: 6px; margin: 19px 0; }
.level-pips i { width: 36px; height: 13px; border: 2px solid var(--ink); background: #d5d0c3; }
.level-pips i.active { background: var(--gold); }
#rodUpgradeButton, .basket-shell footer button {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 11px;
  border: 2px solid var(--ink);
  background: var(--gold-light);
  box-shadow: 3px 3px 0 var(--ink);
  color: var(--ink);
  cursor: pointer;
  font-size: 9px;
}
#rodUpgradeButton:disabled { opacity: .45; cursor: not-allowed; }
.bait-list { display: grid; gap: 7px; }
.bait-choice { display: grid; grid-template-columns: 58px 1fr auto; align-items: center; gap: 8px; padding: 7px; border: 2px solid var(--ink); background: #fff9e9; cursor: pointer; text-align: left; }
.bait-choice:hover, .bait-choice.active { background: #d4ebcf; box-shadow: inset 0 0 0 2px var(--pine); }
.bait-choice.locked { opacity: .45; cursor: not-allowed; }
.bait-choice > canvas { display: block; width: 58px; height: 40px; image-rendering: pixelated; filter: drop-shadow(2px 2px rgba(23,34,56,.28)); }
.bait-choice strong, .bait-choice small { display: block; }
.bait-choice strong { font-size: 8px; }
.bait-choice small { margin-top: 2px; color: #657077; font-size: 6px; }
.bait-choice b { font-size: 8px; }

.basket-list { display: grid; gap: 7px; min-height: 170px; max-height: 370px; overflow: auto; padding: 16px; }
.basket-empty { display: grid; min-height: 140px; place-items: center; color: #657077; font-size: 10px; }
.basket-row { display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 10px; padding: 7px 11px; border: 2px solid var(--ink); background: #fff9e9; }
.basket-fish { display: block; width: 74px; height: 40px; image-rendering: pixelated; }
.basket-row strong, .basket-row small { display: block; }
.basket-row strong { font-size: 9px; }
.basket-row small { margin-top: 3px; color: #657077; font-size: 7px; }
.basket-row > b { font-size: 12px; }
.basket-shell footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 17px; border-top: 3px solid var(--ink); background: #e0bf61; }
.basket-shell footer span small, .basket-shell footer span strong { display: block; }
.basket-shell footer small { font-size: 7px; }
.basket-shell footer strong { font: 22px 'Paytone One', sans-serif; }
.basket-shell footer button { width: auto; gap: 25px; background: var(--pine); color: white; }
.basket-shell footer button:disabled { opacity: .45; cursor: not-allowed; }

.settings-shell { width: min(520px, calc(100vw - 30px)); margin: auto; }
.settings-shell > label { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px; border-bottom: 1px solid #baa987; }
.settings-shell label strong, .settings-shell label small { display: block; }
.settings-shell label strong { font-size: 9px; }
.settings-shell label small { margin-top: 3px; color: #657077; font-size: 7px; }
.settings-shell input { width: 43px; height: 23px; accent-color: var(--pine); }
.danger-button { margin: 16px 18px 20px; padding: 9px 12px; border: 2px solid var(--ink); background: #efd6cd; color: #873b36; cursor: pointer; font-size: 8px; }

.location-level-summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; border-bottom: 2px solid var(--ink); background: #e8e0c9; }
.location-level-summary span { display: block; }
.location-level-summary small, .location-level-summary strong { display: block; }
.location-level-summary small { color: #7a5a2b; font-size: 7px; }
.location-level-summary strong { margin-top: 3px; font-size: 11px; }
.location-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding: 16px; }
.location-option { position: relative; min-height: 285px; overflow: hidden; padding: 0; border: 3px solid var(--ink); background: #fff9e9; color: var(--ink); cursor: pointer; text-align: left; box-shadow: 4px 4px 0 #ad9b75; }
.location-option.active { border-color: #fff; outline: 4px solid var(--pine); }
.location-option.locked { filter: grayscale(.85) brightness(.7); cursor: not-allowed; }
.location-option img { display: block; width: 100%; height: 112px; object-fit: cover; image-rendering: pixelated; }
.location-option section { padding: 10px; }
.location-option h3 { margin: 0; font: 15px 'Paytone One', sans-serif; }
.location-option section > small { display: block; margin-top: 2px; color: #8b5c2b; font-size: 6px; }
.location-option p { min-height: 48px; margin: 8px 0; color: #5b666c; font-size: 6px; line-height: 1.5; }
.location-option b { display: block; padding-top: 7px; border-top: 1px solid #b9aa8c; font-size: 7px; }

.day-card-overlay,
.level-up-overlay {
  position: absolute;
  z-index: 14;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  background: rgba(6,16,27,.82);
  text-align: center;
  animation: day-fade 2.8s ease both;
}
.day-card-overlay p, .level-up-overlay p { margin: 0; color: #ffe08a; font-size: 11px; letter-spacing: .23em; }
.day-card-overlay h2, .level-up-overlay h2 { margin: 5px; font: clamp(58px, 12vw, 128px)/1 'Paytone One', sans-serif; text-shadow: 5px 6px #07111b; }
.day-card-overlay span, .level-up-overlay span { font-size: 9px; letter-spacing: .14em; }
.level-up-overlay { background: radial-gradient(circle, rgba(55,84,100,.85), rgba(6,16,27,.94)); animation: level-fade 2.6s ease both; }

.rotate-notice {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  background: var(--deep);
  text-align: center;
}
.rotate-notice span { font-size: 60px; }
.rotate-notice strong { margin-top: 10px; font: 25px 'Paytone One', sans-serif; }
.rotate-notice small { margin-top: 5px; color: #82d1cd; }

@keyframes warning { 50% { transform: translateY(-2px); filter: brightness(1.25); } }
@keyframes day-fade { 0% { opacity: 0; } 18%, 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes level-fade { 0% { opacity: 0; transform: scale(.8); } 18%, 72% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.08); } }

@media (max-width: 900px) {
  .top-hud { inset: 8px 8px auto; gap: 5px; }
  .hud-card { min-height: 45px; padding: 5px 7px; }
  .hud-card > span:first-child { font-size: 18px; }
  .hud-card small { font-size: 6px; }
  .hud-card strong { font-size: 10px; }
  .energy-card { min-width: 105px; }
  .level-card { min-width: 125px; }
  .day-card { min-width: 95px; }
  .coin-card { min-width: 70px; }
  .journal-card { min-width: 80px; }
  .icon-button { width: 45px; height: 45px; }
  .activity-card { top: 60px; right: 8px; transform: scale(.82); transform-origin: top right; }
  .depth-picker { top: 60px; left: 8px; transform: scale(.82); transform-origin: top left; }
  .dock-actions { bottom: 5px; }
  .dock-actions button { width: 65px; min-height: 54px; }
  .dock-actions .cast-button { width: 98px; }
  .dock-actions button > span { font-size: 16px; }
  .dock-actions button strong { font-size: 6px; }
  .dock-actions button small { font-size: 5px; }
  .fight-panel { right: 8px; bottom: 64px; transform: scale(.84); transform-origin: bottom right; width: 350px; }
  .message-ribbon { bottom: 66px; }
  .fish-grid { grid-template-columns: repeat(3, 1fr); }
  .location-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (orientation: portrait) and (max-width: 720px) {
  .rotate-notice { display: grid !important; }
}

@media (max-height: 520px) {
  .title-copy h1 { font-size: 70px; }
  .title-copy > span { margin-top: 13px; }
  .primary-button { padding: 8px 16px; }
  .tutorial-card { transform: translate(-50%, -50%) scale(.8); }
  .catch-card { transform: translate(-50%, -50%) scale(.76); }
  .panel-dialog { max-height: calc(100vh - 10px); }
  .dialog-shell { max-height: calc(100vh - 10px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
