/* Lakeside UI — floats over the full-screen canvas.
   The overlay ignores pointer events except on its own controls, so
   drags on empty space still orbit the camera. */

:root {
  --ink: #fdfaf2;
  --dim: #cfe0e6;
  --panel: rgba(18, 52, 66, 0.78);
  --panel-solid: #15394a;
  --edge: rgba(255, 255, 255, 0.14);
  --gold: #ffd447;
  --leaf: #7fcf5a;
  --leaf-dark: #3f8f3a;
  --bad: #ff7a66;
  --r: 14px;
  --shadow: 0 8px 24px rgba(0, 20, 30, 0.35);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #2c6f8f; touch-action: manipulation; } /* no double-tap zoom anywhere */
body {
  font-family: ui-rounded, 'Nunito', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}
#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
/* The game's own cursor (owner, 2026-10-05): a cream arrow, and a pointing hand over
   anything that can be pressed or used. Drawn here; never the system's. */
:root {
  --cur-arrow-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><path d='M6 3v15.4l4-3.5 2.5 5.9 2.6-1.1-2.5-5.9h5.3z' fill='%23fdfaf2' stroke='%232b3a44' stroke-width='0.9' stroke-linejoin='round'/></svg>");
  --cur-hand-img: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><path d='M9 3a1.6 1.6 0 0 1 3.2 0v7h1V7.5a1.5 1.5 0 0 1 3 0V11h1V9a1.5 1.5 0 0 1 3 0v6.5A5.5 5.5 0 0 1 14.7 21H12a5 5 0 0 1-4.3-2.4L4.5 13a1.6 1.6 0 0 1 2.7-1.7L9 13.8z' fill='%23fdfaf2' stroke='%232b3a44' stroke-width='0.9' stroke-linejoin='round'/></svg>");
  --cur-arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><path d='M6 3v15.4l4-3.5 2.5 5.9 2.6-1.1-2.5-5.9h5.3z' fill='%23fdfaf2' stroke='%232b3a44' stroke-width='0.9' stroke-linejoin='round'/></svg>") 8 4, auto;
  --cur-hand: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'><path d='M9 3a1.6 1.6 0 0 1 3.2 0v7h1V7.5a1.5 1.5 0 0 1 3 0V11h1V9a1.5 1.5 0 0 1 3 0v6.5A5.5 5.5 0 0 1 14.7 21H12a5 5 0 0 1-4.3-2.4L4.5 13a1.6 1.6 0 0 1 2.7-1.7L9 13.8z' fill='%23fdfaf2' stroke='%232b3a44' stroke-width='0.9' stroke-linejoin='round'/></svg>") 14 4, pointer;
}
body, #scene { cursor: var(--cur-arrow); }
#ui button, .seed, .tab, a, .hud__level, #scene.canvas--use { cursor: var(--cur-hand); }
/* On foot with a mouse the cursor is locked to the middle and drawn there (the arrow, or
   the hand over something usable); it comes free whenever a panel is open. */
.aim.aim--mouse { display: none; width: 32px; height: 32px; margin: -4px 0 0 -8px; border: 0; box-shadow: none; background: var(--cur-arrow-img) no-repeat center / 32px 32px; transform: none; }
.aim.aim--mouse.aim--on { background-image: var(--cur-hand-img); margin: -4px 0 0 -14px; transform: none; }
body.fp-locked .aim.aim--mouse { display: block; }
body.fp-locked #scene { cursor: none; } /* looking with the mouse: the cursor is the one drawn in the middle */
#ui { position: fixed; inset: 0; pointer-events: none; }
/* Undo a phone's "Desktop site" shrink (set by src/viewport.js; 1 normally). */
#ui, body > .fakead { zoom: var(--page-zoom, 1); }
#ui button, .sheet, .modal, .pouch, .hud { pointer-events: auto; }

/* ---------- HUD ---------- */
.hud {
  position: absolute;
  top: calc(10px + var(--safe-t));
  left: 10px; right: 10px;
  display: flex; align-items: center; gap: 12px;
  padding: 8px 14px;
  background: var(--panel);
  border: 1px solid var(--edge);
  border-radius: var(--r);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  max-width: 560px;
}
.hud__coins { display: flex; align-items: center; gap: 7px; font-size: 22px; font-variant-numeric: tabular-nums; color: var(--gold); min-width: 84px; }
.coin { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff2a8, var(--gold) 55%, #c08a10); box-shadow: 0 0 0 2px rgba(0,0,0,.15); }
.hud__level { flex: 1; min-width: 0; }
.hud__row { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; }
.dim { color: var(--dim); font-weight: 500; }
.xpbar { height: 8px; margin-top: 4px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.xpbar__fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--leaf-dark), var(--leaf)); transition: width .25s ease-out; }
.hud__boosts { display: flex; gap: 6px; }
/* Settings (music and sound), always at the right end of the top bar. */
.hud__set { flex: none; width: 38px; height: 38px; margin-right: -6px; padding: 0; border-radius: 50%; display: grid; place-items: center; font-size: 21px; background: rgba(255,255,255,.08); }
.chip { font-size: 12px; padding: 3px 8px; border-radius: 99px; background: rgba(255, 212, 71, .2); border: 1px solid rgba(255, 212, 71, .5); white-space: nowrap; }

/* ---------- toasts ---------- */
.toasts {
  position: absolute;
  top: calc(72px + var(--safe-t));
  left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: min(calc(92vw / var(--page-zoom, 1)), 420px);
}
.toast {
  padding: 8px 14px; border-radius: 99px;
  font-size: 14px; font-weight: 700;
  background: var(--panel); border: 1px solid var(--edge);
  box-shadow: var(--shadow);
  animation: pop .22s ease-out;
  transition: opacity .35s, transform .35s;
}
.toast--good { color: #e2ffc9; border-color: rgba(127, 207, 90, .6); }
.toast--bad { color: #ffd9d2; border-color: rgba(255, 122, 102, .6); }
.toast--level { color: #2a1d00; background: var(--gold); }
.toast--out { opacity: 0; transform: translateY(-6px); }
@keyframes pop { from { opacity: 0; transform: scale(.85); } }

/* ---------- bottom dock ---------- */
.dock {
  position: absolute;
  left: 0; right: 0;
  bottom: calc(10px + var(--safe-b));
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 0 10px;
}
.pouch {
  display: flex; gap: 6px;
  max-width: min(100%, 640px);
  overflow-x: auto;
  padding: 2px;
  scrollbar-width: none;
}
.pouch::-webkit-scrollbar { display: none; }
.pouch__empty { font-size: 13px; padding: 7px 12px; border-radius: 99px; background: var(--panel); }
.seed {
  display: flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 11px;
  font: inherit; font-size: 13px; font-weight: 700; color: var(--ink);
  background: var(--panel); border: 2px solid transparent; border-radius: 99px;
  cursor: pointer;
}
.seed b { color: var(--dim); font-weight: 600; }
.seed--on { border-color: var(--gold); background: rgba(70, 60, 10, .75); }
.seed--focus { border-color: var(--ink); box-shadow: 0 0 0 2px rgba(253, 250, 242, 0.9), 0 0 12px rgba(255, 212, 71, 0.5); background: rgba(40, 70, 85, 0.95); } /* where the mouse wheel is; Space or Enter presses it */
.dot { width: 13px; height: 13px; border-radius: 50%; flex: none; box-shadow: inset 0 -2px 3px rgba(0,0,0,.3); }
.dock__row { display: flex; align-items: center; gap: 14px; }
/* The big button stays in the middle; the free boost (an optional ad) sits small and quiet
   in the bottom right corner (owner, 2026-10-06). */
.dock__spacer { width: 54px; flex: none; }
.btn--corner { position: absolute; right: 10px; bottom: 0; width: 44px; height: 44px; font-size: 19px; opacity: .88; }
/* Settings rows: a picture, the name and a slider, an On / Off button. */
.setrow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--edge); text-align: left; }
.setrow:first-child { border-top: 0; }
.setrow .icon { font-size: 24px; flex: none; width: 28px; text-align: center; }
.setrow__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.setrow__body small { color: var(--dim); font-size: 12px; }
.setrow__body input[type=range] { width: 100%; margin: 6px 0 0; accent-color: var(--gold); touch-action: pan-x; }
.setrow--off .setrow__body, .setrow--off .icon { opacity: .45; }
.styles { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.setrow .chipbtn { padding: 6px 11px; font-size: 13px; border-radius: 99px; background: transparent; }
.setrow .chipbtn--on { background: rgba(255, 212, 71, .22); border-color: var(--gold); color: #fff3c4; }
.setrow .toggle { flex: none; min-width: 58px; margin: 0; padding: 9px 0; background: transparent; }
.setrow .toggle--on { background: var(--leaf-dark); border-color: transparent; }

.btn {
  font: inherit; font-weight: 800; color: var(--ink);
  border: 1px solid var(--edge); border-radius: 12px;
  background: rgba(255,255,255,.1);
  padding: 9px 14px; cursor: pointer;
  transition: transform .08s, background .15s, opacity .15s;
}
.btn:active:not(:disabled) { transform: scale(.95); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--round { width: 54px; height: 54px; border-radius: 50%; font-size: 24px; padding: 0; background: var(--panel); box-shadow: var(--shadow); }
.views { position: absolute; top: 42%; right: 10px; transform: translateY(-50%); display: flex; flex-direction: column; gap: 8px; }
.btn--view { width: 42px; height: 42px; font-size: 20px; }
/* First person (src/firstperson.js): the thumb stick under the left thumb, the ring in
   the middle that lights when something is in reach. Neither takes pointer events: the
   canvas has them all. */
/* The walking stick, fixed at the bottom left in first person on a phone: a soft ring with
   four little arrows and a knob; brighter while a thumb is on it. */
.stick { position: absolute; width: 104px; height: 104px; margin: -52px 0 0 -52px; border-radius: 50%; pointer-events: none; opacity: .62; transition: opacity .15s;
  background: radial-gradient(circle, rgba(18, 52, 66, 0.18) 0 55%, rgba(18, 52, 66, 0.42) 56% 100%); border: 2px solid rgba(253, 250, 242, 0.45); box-shadow: 0 4px 14px rgba(0, 20, 30, 0.25); backdrop-filter: blur(3px); }
.stick[hidden] { display: none; }
.stick::before { content: ''; position: absolute; inset: 0; border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 46%, rgba(253, 250, 242, 0.7) 46% 54%, transparent 54%) top 7px center / 9px 9px no-repeat,
    linear-gradient(45deg, transparent 46%, rgba(253, 250, 242, 0.7) 46% 54%, transparent 54%) bottom 7px center / 9px 9px no-repeat,
    linear-gradient(45deg, transparent 46%, rgba(253, 250, 242, 0.7) 46% 54%, transparent 54%) left 7px center / 9px 9px no-repeat,
    linear-gradient(45deg, transparent 46%, rgba(253, 250, 242, 0.7) 46% 54%, transparent 54%) right 7px center / 9px 9px no-repeat; }
.stick--on { opacity: 1; }
/* What you hold on foot (job 5): a small column of slots under the view buttons, the one in
   hand ringed in gold. On a computer the number keys pick them (the small figure). */
.tools { position: absolute; right: 12px; top: calc(34% + 54px); display: flex; flex-direction: column; gap: 4px; pointer-events: auto; }
body.fp .views { top: 34%; } /* on foot the column sits higher, clear of the jump button */
.tools[hidden] { display: none; }
.tool { position: relative; width: 38px; height: 38px; padding: 0; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
  background: rgba(18, 52, 66, 0.5); border: 2px solid rgba(253, 250, 242, 0.35); box-shadow: 0 3px 10px rgba(0, 20, 30, 0.25); backdrop-filter: blur(3px);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.tool .ic { width: 24px; height: 24px; }
.tool i { position: absolute; right: 3px; bottom: 2px; font-style: normal; font-size: 9px; line-height: 1; font-weight: 700; color: rgba(253, 250, 242, 0.7); }
.tool--on { border-color: #e8b931; background: rgba(18, 52, 66, 0.78); box-shadow: 0 0 0 3px rgba(255, 228, 120, 0.4); }
.btn--off { opacity: .62; }
/* The cast's charge on foot: a small bar under the middle of the screen that fills as you hold. */
.charge { position: absolute; left: 50%; top: calc(50% + 34px); width: 120px; height: 10px; margin-left: -60px; border-radius: 6px; pointer-events: none;
  background: rgba(18, 52, 66, 0.45); border: 2px solid rgba(253, 250, 242, 0.6); box-shadow: 0 2px 8px rgba(0, 20, 30, 0.3); overflow: hidden; }
.charge[hidden] { display: none; }
.charge__fill { height: 100%; width: 0; background: linear-gradient(90deg, #ffd447, #ff9a3c); }
/* The jump button, bottom right across from the stick, on a phone on foot. */
.jumpbtn { position: absolute; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; pointer-events: auto; display: grid; place-items: center; opacity: .7;
  background: rgba(18, 52, 66, 0.42); border: 2px solid rgba(253, 250, 242, 0.45); box-shadow: 0 4px 14px rgba(0, 20, 30, 0.25); backdrop-filter: blur(3px);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; transition: transform .08s, opacity .15s; }
.jumpbtn[hidden] { display: none; }
.jumpbtn .ic { width: 38px; height: 38px; }
.jumpbtn--on { opacity: 1; transform: scale(0.92); }
.stick__knob { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #ffffff, #e9e2d0 70%); box-shadow: 0 3px 8px rgba(0, 20, 30, 0.35); transition: transform .08s; }
.stick--on .stick__knob { transition: none; }
.aim { position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; border: 2px solid rgba(253, 250, 242, 0.75); box-shadow: 0 0 4px rgba(0, 20, 30, 0.5); transition: transform .15s, border-color .15s, background .15s; }
.aim--on { border-color: var(--gold); background: rgba(255, 212, 71, 0.35); transform: scale(1.35); }
.aim--locked { border-width: 3px; }
/* Food in your hand over the campfire: name, how it is doing, worth; a heat bar. */
.handcard { display: flex; align-items: center; gap: 10px; padding: 7px 14px; border-radius: 99px; background: var(--panel); border: 1px solid var(--edge); box-shadow: var(--shadow); font-size: 14px; font-weight: 700; }
.handcard[hidden] { display: none; }
.handcard span { color: var(--dim); font-weight: 600; }
.handcard__bar { width: 90px; height: 8px; border-radius: 99px; background: rgba(255,255,255,.14); overflow: hidden; }
.handcard__bar i { display: block; height: 100%; width: 0; background: #e8b931; transition: width .2s linear; }
.handcard[data-stage="perfect"] { border-color: rgba(255, 212, 71, .8); }
.handcard[data-stage="perfect"] .handcard__bar i { background: var(--gold); }
.handcard[data-stage="burning"] .handcard__bar i, .handcard[data-stage="lost"] .handcard__bar i { background: var(--bad); }
.handcard[data-stage="cooked"] .handcard__bar i { background: var(--leaf); }
body.fp .btn--walk { background: #e8b931; }
.btn--fish {
  min-width: 160px; height: 64px; border-radius: 32px;
  font-size: 22px; letter-spacing: .02em;
  background: linear-gradient(180deg, #4fb0d6, #2b7fa3);
  border: 2px solid rgba(255,255,255,.4);
  box-shadow: var(--shadow);
}
.btn--fish small { display: block; font-size: 11px; letter-spacing: 0; opacity: .8; margin-top: -2px; }
/* Holding the farm's Water button: it fills from the left, then the rain opens. */
.btn--holding { background-image: linear-gradient(90deg, rgba(255,255,255,.35) 0 50%, transparent 50% 100%), linear-gradient(180deg, #4fb0d6, #2b7fa3); background-size: 200% 100%, 100% 100%; background-position: 100% 0, 0 0; animation: holdFill .6s linear forwards; }
@keyframes holdFill { to { background-position: 0 0, 0 0; } }
.btn--fish { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.rainpick { display: flex; align-items: center; gap: 12px; margin: 12px 0 6px; }
.rainpick input { flex: 1; min-width: 0; }
.rainpick b { flex: 0 0 64px; text-align: right; font-variant-numeric: tabular-nums; }
.btn--waiting { background: linear-gradient(180deg, #3b7d96, #285e73); color: var(--dim); }
.btn--mine { background: linear-gradient(180deg, #b48a5a, #7d5a36); }
.btn--sail { margin-top: 6px; }
.btn--sail.btn--ready { box-shadow: 0 0 0 2px #ffd447, 0 0 14px rgba(255, 212, 71, 0.6); animation: ferryReady 2.4s ease-in-out infinite; }
@keyframes ferryReady { 50% { box-shadow: 0 0 0 2px #ffd447, 0 0 4px rgba(255, 212, 71, 0.25); } }
.btn--bite { background: linear-gradient(180deg, #ffd447, #f08a24); color: #3a1d00; animation: shake .25s infinite; }
@keyframes shake { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-3deg) scale(1.06); } 75% { transform: rotate(3deg) scale(1.06); } }
.btn--buy { min-width: 54px; background: var(--leaf-dark); border-color: transparent; font-variant-numeric: tabular-nums; }
.btn--ghost { background: transparent; }
.btn--wide { display: block; width: 100%; margin-top: 10px; padding: 13px; font-size: 16px; background: var(--leaf-dark); }
.btn--wide.btn--ghost { background: transparent; }

/* ---------- shop sheet ---------- */
.sheet {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(5, 20, 28, .35);
}
.sheet[hidden], .modal[hidden] { display: none; }
.sheet__card {
  width: min(100%, 520px);
  /* vh is measured on the un-zoomed page: divide by the Desktop-site zoom or the sheet grows taller than the screen. */
  max-height: calc(72vh / var(--page-zoom, 1));
  display: flex; flex-direction: column;
  background: var(--panel-solid);
  border: 1px solid var(--edge);
  border-radius: 20px 20px 0 0;
  padding: 12px 12px calc(12px + var(--safe-b));
  box-shadow: var(--shadow);
  animation: slideup .22s ease-out;
}
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tabs { display: flex; gap: 4px; padding: 3px; background: rgba(0,0,0,.25); border-radius: 12px; }
.tab { font: inherit; font-weight: 700; font-size: 14px; color: var(--dim); background: none; border: 0; padding: 7px 12px; border-radius: 9px; cursor: pointer; }
.tab--on { background: rgba(255,255,255,.14); color: var(--ink); }
.sheet__body { overflow-y: auto; display: flex; flex-direction: column; gap: 6px; padding-bottom: 4px; }
.account { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; padding: 10px; border-radius: 12px; background: rgba(79, 159, 184, .18); border: 1px solid rgba(79, 159, 184, .35); }
.account__save { margin-top: 0; background: linear-gradient(180deg, #4fb0d6, #2b7fa3); }
.account__hint, .account__note { font-size: 13px; color: var(--dim); }
.account__note { flex: 1; color: var(--ink); }
.account__btn { font-size: 13px; padding: 6px 10px; }
.feedback__text { display: block; box-sizing: border-box; width: 100%; margin-top: 8px; padding: 10px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .2); color: inherit; font: inherit; font-size: 16px; resize: vertical; }
.feedback__error { color: #ffb4a8; font-size: 14px; }
.modal__card .btn--wide small { display: block; font-weight: 500; opacity: .8; font-size: 12px; margin-top: 2px; }
.row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: rgba(255,255,255,.06); }
.row--locked { opacity: .55; }
.row--done { opacity: .7; background: rgba(255, 212, 71, .08); }
.note--looks { margin-top: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.12); color: var(--ink); }
.row__body .xpbar { margin-top: 5px; height: 6px; }
@media (max-width: 420px) { .tab { padding: 7px 8px; font-size: 13px; } }
.row__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row__body small { color: var(--dim); font-size: 12px; }
.have { color: var(--gold); font-size: 12px; font-weight: 800; }
.lock { font-size: 12px; color: var(--dim); white-space: nowrap; }
.icon { font-size: 22px; width: 26px; text-align: center; }
.note { margin: 0 4px 6px; color: var(--dim); font-size: 13px; }

/* ---------- icons (src/icons.js): our own drawings, never emoji ---------- */
.ic { width: 1.15em; height: 1.15em; vertical-align: -0.22em; display: inline-block; flex: none; }

/* ---------- orders, mastery, cart ---------- */
.tabs { overflow-x: auto; scrollbar-width: none; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; }
.sheet__head { gap: 8px; }
.order__lines { display: flex; flex-wrap: wrap; gap: 2px 12px; font-weight: 700; }
.order__line { display: inline-flex; align-items: center; gap: 5px; }
.order__swap { font-size: 12px; padding: 6px 10px; line-height: 1.2; }
.order__swap small { display: block; color: var(--gold); }
.stars .ic { width: .95em; height: .95em; }
.seed--bars { cursor: default; }
.seed--haul { border-color: var(--gold); background: rgba(70, 60, 10, .75); }
.seed .ic { width: 1.1em; height: 1.1em; }
@media (hover: hover) and (pointer: fine) {
  .pouch { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.35) transparent; padding-bottom: 6px; }
  .pouch::-webkit-scrollbar { display: block; height: 6px; }
  .pouch::-webkit-scrollbar-thumb { background: rgba(255,255,255,.35); border-radius: 99px; }
}
@media (max-width: 420px) { .tab { padding: 7px 6px; font-size: 12px; } }
/* ---------- testing mode: impossible to miss ---------- */
.testbar {
  position: absolute; top: calc(66px + var(--safe-t)); left: 10px; right: 10px; max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: 12px;
  background: #ffd447; color: #3a2a00; font-size: 13px; font-weight: 800;
  box-shadow: var(--shadow); pointer-events: auto;
}
.testbar[hidden] { display: none; }
.testbar span { flex: 1; }
.testbar .btn { color: #3a2a00; background: rgba(0,0,0,.14); border-color: rgba(0,0,0,.2); padding: 6px 12px; }
.testing .toasts { top: calc(122px + var(--safe-t)); }
/* ---------- ferry ---------- */
.ferry { display: flex; flex-direction: column; gap: 6px; text-align: left; margin-top: 10px; }
.ferry .row__body small { white-space: normal; }
.sail {
  position: fixed; inset: 0; z-index: 30;
  pointer-events: auto;
  display: grid; place-items: center; align-content: center; gap: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, #3f86cf 0%, #8cc3ec 42%, #eadcc4 55%, #3c8db0 56%, #2c6f8f 100%);
  opacity: 0;
  transition: opacity .35s ease-out;
}
.sail[hidden] { display: none; }
.sail--on { opacity: 1; }
.sail--out { opacity: 0; transition: opacity .45s ease-in; }
.sail__sea {
  position: absolute; left: -10%; right: -10%; top: 56%; height: 44%;
  background:
    radial-gradient(ellipse 60px 10px at 20% 20%, rgba(255,255,255,.35), transparent 70%),
    radial-gradient(ellipse 80px 12px at 60% 45%, rgba(255,255,255,.3), transparent 70%),
    radial-gradient(ellipse 50px 9px at 85% 30%, rgba(255,255,255,.35), transparent 70%),
    radial-gradient(ellipse 70px 10px at 40% 70%, rgba(255,255,255,.25), transparent 70%);
  animation: waves 1.6s linear infinite;
}
@keyframes waves { from { transform: translateX(0); } to { transform: translateX(-60px); } }
.sail__boat {
  position: relative; font-size: 72px; line-height: 1;
  animation: bob 1.1s ease-in-out infinite, cross 1.5s ease-in-out;
  filter: drop-shadow(0 8px 10px rgba(0, 20, 30, .35));
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-8px) rotate(3deg); } }
@keyframes cross { from { left: -40vw; } to { left: 0; } }
.sail__text { position: relative; font-size: 20px; font-weight: 800; text-shadow: 0 2px 8px rgba(0, 20, 30, .4); }

/* ---------- modal & fake ad ---------- */
.modal, .fakead {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: rgba(5, 20, 28, .55);
  backdrop-filter: blur(3px);
  pointer-events: auto;
  z-index: 10;
}
.modal__card, .fakead__card {
  width: min(calc(88vw / var(--page-zoom, 1)), 380px);
  padding: 20px;
  background: var(--panel-solid);
  border: 1px solid var(--edge);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
  color: var(--ink);
  font-family: inherit;
}
.modal__card { max-height: calc(88vh / var(--page-zoom, 1)); overflow-y: auto; overscroll-behavior: contain; } /* a long card scrolls (2026-10-17) */
.modal__card h2 { margin: 0 0 8px; font-size: 22px; }
.modal__card p { margin: 6px 0; }
.fakead__tag { font-size: 11px; letter-spacing: .12em; color: var(--gold); font-weight: 800; }
.fakead__bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.15); overflow: hidden; margin: 14px 0 4px; }
.fakead__fill { width: 0; height: 100%; background: var(--gold); }
.fakead .btn { font-family: inherit; }

@media (max-width: 420px) {
  .hud { gap: 8px; padding: 7px 10px; }
  .hud__coins { font-size: 19px; min-width: 70px; }
  .hud__boosts { position: absolute; top: calc(100% + 6px); left: 0; }
  .btn--fish { min-width: 140px; height: 58px; font-size: 20px; }
}

/* Store tab: a heading per kind of thing, with its own sell-all. */
.store__head { display: flex; align-items: center; gap: 8px; margin: 14px 4px 6px; font-size: 15px; }
.store__head svg { width: 22px; height: 22px; flex: none; }
.store__head .dim { font-size: 12px; }
.store__head .btn { margin-left: auto; }
/* View buttons can be held (to reset a view): no text selection or callout menu. */
.btn--view { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }

/* The level bar opens the skills list; the skill's icon sits before its name. */
.hud__level { cursor: pointer; }
#lvl { display: inline-flex; align-items: center; gap: 4px; }
#lvl svg { width: 15px; height: 15px; }
.row.skill .xpbar { margin: 5px 0 3px; }
.row.skill .row__body { text-align: left; }
.row.skill small { display: block; }

/* The farm's Move plots button while plots are being moved. */
.btn--view.btn--on { background: #e8b931; box-shadow: 0 0 0 3px rgba(255, 228, 120, 0.55); }

/* Testing mode's "Change anything" list. */
.tedit { max-height: 44vh; overflow-y: auto; text-align: left; margin: 8px 0; display: grid; gap: 6px; }
.tedit h3 { margin: 8px 2px 0; font-size: 13px; color: var(--dim); }
.tedit .row { padding: 7px 10px; }
.tedit .row.changed { outline: 2px solid #ffd447; }
.tedit input[type=number], .tedit select, .tedit__search { font: inherit; color: inherit; background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.2); border-radius: 9px; padding: 6px 8px; }
.tedit input[type=number] { width: 96px; }
.tedit select { max-width: 150px; }
.tedit input[type=checkbox] { width: 22px; height: 22px; }
.tedit__search { width: 100%; box-sizing: border-box; margin: 4px 0 6px; }
.tedit__only { display: block; text-align: left; font-size: 13px; color: var(--dim); }

/* Testing mode: the locks list, and the buttons only a tester sees. */
.locks { text-align: left; margin: 10px 0 14px; display: grid; gap: 6px; }
.locks > small { color: var(--dim); font-size: 12px; }
.locks .row { padding: 7px 10px; }
.locks .btn--off { background: rgba(255,255,255,.14); }
.locks__all { display: flex; gap: 8px; }
.locks__all .btn { flex: 1; padding: 9px; }
.btn--tester { background: transparent; border: 2px dashed #b9a6ff; color: #e2d9ff; }
.btn--wide.btn--tester { background: transparent; }

/* The cooking menu (Hearth Cove): a long list that scrolls inside the card on a phone. */
.menu__rows { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; margin: 8px 0; }

/* ---------- arrange mode (2026-10-14): the usual buttons step aside; a strip on top, a panel below ---------- */
body.arranging .dock, body.arranging .views, body.arranging .tools, body.arranging .pouch, body.arranging .hud { display: none !important; }
#arrange { position: fixed; inset: 0; pointer-events: none; z-index: 20; color: var(--ink); }
#arrange .arr__top {
  pointer-events: auto; position: absolute; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; max-width: 560px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 16px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r); backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
#arrange .arr__hint { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
#arrange .arr__hint small { color: var(--dim); font-size: 13px; }
#arrange .arr__done, #arrange .arr__add { flex: none; min-width: 72px; min-height: 44px; }
/* The dock (2026-10-17): the tools along the bottom, the panel for what is in hand stacked above them. */
#arrange .arr__dock {
  position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
#arrange .arr__tools {
  pointer-events: auto; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding: 7px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r); backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
#arrange .arr__tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 58px; padding: 6px 2px; font-size: 12.5px; background: transparent; border-color: transparent; }
#arrange .arr__tool .ic { width: 26px; height: 26px; }
#arrange .arr__tool.btn--on { background: rgba(255, 255, 255, .16); border-color: var(--gold); }
#arrange .arr__panel {
  pointer-events: auto;
  display: flex; flex-direction: column; gap: 12px; padding: 14px 16px;
  background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r); backdrop-filter: blur(10px); box-shadow: var(--shadow);
}
#arrange .arr__panel[hidden] { display: none; }
#arrange .arr__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 17px; }
#arrange .arr__why { color: var(--leaf); font-weight: 700; font-size: 14px; text-align: right; }
#arrange .arr__why--bad { color: var(--bad); }
#arrange .arr__turn { display: flex; align-items: center; gap: 12px; font-weight: 700; }
#arrange .arr__turn input { flex: 1; height: 44px; accent-color: var(--gold); touch-action: none; }
#arrange .arr__turn input::-webkit-slider-thumb { width: 30px; height: 30px; }
#arrange .arr__deg { width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
#arrange .arr__btns { display: flex; gap: 10px; }
#arrange .arr__btns .btn { flex: 1; min-height: 50px; font-size: 17px; }
#arrange .arr__btns .btn[hidden] { display: none; }
/* The Add sheet (2026-10-17): the lower part of the screen, the island in view above it; tiles with pictures. */
#arrange.arr--adding .arr__tools, #arrange.arr--adding .arr__panel { display: none; }
#arrange .arr__sheet {
  pointer-events: auto; display: flex; flex-direction: column; max-height: min(52vh, 520px);
  background: var(--panel-solid, var(--panel)); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden;
}
#arrange .arr__sheet[hidden] { display: none; }
#arrange .arr__sheethead { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--edge); }
#arrange .arr__sheethead small { flex: 1; color: var(--dim); font-size: 13px; }
#arrange .arr__x { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; }
#arrange .arr__x .ic { width: 22px; height: 22px; }
#arrange .arr__sheetbody { overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch; padding: 4px 10px 12px; }
#arrange .arr__sect { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 4px 6px; font-size: 14px; color: var(--dim); }
#arrange .arr__back { min-height: 36px; padding: 6px 12px; font-size: 13px; }
#arrange .arr__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
#arrange .arr__tile {
  font: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 7px; min-height: 96px;
  background: rgba(255,255,255,.07); border: 1px solid var(--edge); border-radius: 12px; cursor: pointer; transition: transform .08s, background .15s;
}
#arrange .arr__tile:active:not(:disabled) { transform: scale(.95); background: rgba(255,255,255,.16); }
#arrange .arr__tile:disabled { opacity: .5; cursor: not-allowed; }
#arrange .arr__pic { position: relative; width: 60px; height: 60px; display: grid; place-items: center; }
#arrange .arr__pic img { width: 60px; height: 60px; object-fit: contain; pointer-events: none; }
#arrange .arr__pic > .ic { width: 34px; height: 34px; }
#arrange .arr__count { position: absolute; right: -4px; top: -4px; min-width: 20px; padding: 1px 5px; border-radius: 99px; background: var(--gold); color: #2a2208; font-style: normal; font-weight: 800; font-size: 12px; }
#arrange .arr__lock { position: absolute; right: 0; bottom: 0; }
#arrange .arr__lock .ic { width: 20px; height: 20px; }
#arrange .arr__label { font-size: 12.5px; font-weight: 700; line-height: 1.15; text-align: center; }
#arrange .arr__tile small { font-size: 10.5px; color: var(--dim); }

#arrange .arr__btns .btn--on { background: var(--leaf-dark); color: var(--ink); }
