/* Bob Fisher Story: the Skiff kit for the web.
   The same parts the app draws (hull panels, the outboard pull-cord button, the oar,
   decal tags, sign lettering, the life ring, the water with its bands and glints),
   in the same colours and type. Tokens mirror lib/theme/app_colors.dart. */

@font-face {
  font-family: "Carter One";
  src: url("../fonts/CarterOne-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/PlusJakartaSans-Variable.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #231109;
  --soot: #130805;
  --cocoa: #482b1b;
  --bark: #5e402d;
  --driftwood: #7f6651;
  --stone: #aa9c8c;
  --pebble: #c9bba9;
  --paper: #fefaee;
  --cream: #faf1d8;
  --parchment: #f1e0ba;
  --kraft: #e2c591;
  --foam: #e6fdf7;
  --mist: #c2f6eb;
  --shallows: #8aebda;
  --lagoon: #42dfcd;
  --lake: #07bdb2;
  --reef: #009792;
  --deep: #006f70;
  --trench: #004c51;
  --night: #002e33;
  --sun: #ffe508;
  --sun-lit: #fff8a2;
  --sun-tint: #fef3a8;
  --sun-deep: #e9b600;
  --coin: #ffc047;
  --coin-deep: #e68100;
  --buoy: #d90820;
  --buoy-lit: #ff655a;
  --lily: #5cdd47;
  --lily-dark: #06571e;
  --lantern: #ea6e00;
  --sky: #1a8dd6;
  --air-top: #8dd0ea;
  --air-bot: #ceeef6;
  --birch: #eedcb9;
  --rope: #debb81;
  --plank-light: #d09859;
  --plank: #b36d32;
  --plank-shade: #814622;
  --uncommon: #00995f;
  --epic: #9c40bf;

  --key: 3px;                                   /* every keyline */
  --drop: rgba(0, 76, 81, 0.5);                 /* a hard shadow on water */
  --drop-page: rgba(72, 43, 27, 0.28);          /* a hard shadow on paper */
  --font-display: "Carter One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 150ms;
  --normal: 320ms;
}

/* In the components layer, so these beat Tailwind's reset and a utility can still override them. */
@layer components {
  html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
  body {
    background: var(--cream);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 600;
    line-height: 1.6;
    overflow-x: hidden;
    min-width: 250px;
  }
  h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.08; letter-spacing: 0.005em; }
  :focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); border-radius: 4px; }
  ::selection { background: var(--sun); color: var(--soot); }
}

@layer components {
  /* ---------- lettering ---------- */
  .sign {
    font-family: var(--font-display);
    color: var(--paper);
    -webkit-text-stroke: 0.17em var(--ink);
    paint-order: stroke fill;
    text-shadow: 0 0.085em 0 var(--ink);
    line-height: 1.04;
    letter-spacing: 0.012em;
  }
  .sign--sun { color: var(--sun); }
  .hull-number { flex: none; font-family: var(--font-display); color: var(--lake); -webkit-text-stroke: 0.08em var(--ink); paint-order: stroke fill; line-height: 1; }
  .eyebrow { font-family: var(--font-display); letter-spacing: 0.14em; text-transform: uppercase; font-size: 0.78rem; color: var(--bark); }
  .on-water .eyebrow { color: var(--trench); }
  .lede { font-size: clamp(1rem, 0.94rem + 0.35vw, 1.2rem); font-weight: 700; color: var(--cocoa); }
  .on-water .lede { color: var(--night); }
  .prose-skiff p { margin: 0 0 1em; }

  /* ---------- hull panel ---------- */
  .hull { position: relative; filter: drop-shadow(0 8px 0 var(--drop-page)); }
  .on-water .hull, .hull--afloat { filter: drop-shadow(0 8px 0 var(--drop)); }
  .hull__edge { height: 100%; background: var(--ink); padding: var(--key); clip-path: polygon(0 0, 100% 0, calc(100% - var(--rake, 0px)) 100%, 0 100%); }
  .hull__in {
    position: relative;
    height: 100%;
    padding: calc(13px + var(--pad, 1.25rem)) var(--pad, 1.25rem) calc(11px + var(--pad, 1.25rem));
    background:
      linear-gradient(to bottom, var(--plank-light) 0 3px, var(--plank) 3px 10px, var(--ink) 10px 13px, transparent 13px),
      linear-gradient(to top, var(--buoy) 0 8px, var(--ink) 8px 11px, transparent 11px),
      var(--paper);
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--rake, 0px)) 100%, 0 100%);
  }
  .hull--raked { --rake: clamp(10px, 4vw, 28px); }
  .hull--raked .hull__in { padding-right: calc(var(--pad, 1.25rem) + var(--rake)); }
  .hull--gold .hull__in { background:
      linear-gradient(to bottom, var(--plank-light) 0 3px, var(--plank) 3px 10px, var(--ink) 10px 13px, transparent 13px),
      linear-gradient(to top, var(--coin) 0 8px, var(--ink) 8px 11px, transparent 11px),
      var(--sun-tint); }
  .hull--walnut .hull__in { color: var(--paper); background:
      linear-gradient(to bottom, var(--plank-light) 0 3px, var(--plank) 3px 10px, var(--ink) 10px 13px, transparent 13px),
      linear-gradient(to top, var(--coin) 0 8px, var(--ink) 8px 11px, transparent 11px),
      var(--cocoa); }
  /* plank seams: short ticks down the left side, the way a lapstrake hull shows its strakes */
  .hull__in::before {
    content: "";
    position: absolute;
    left: 0; top: 30px; bottom: 26px; width: 11px;
    background: repeating-linear-gradient(to bottom, transparent 0 28px, var(--ink) 28px 31px, var(--parchment) 31px 34px);
    pointer-events: none;
  }
  .hull--plain .hull__in::before { display: none; }

  /* a strake: one plank of a list (chapters, rows) */
  .strake { position: relative; filter: drop-shadow(0 5px 0 var(--drop)); }
  .strake__edge { background: var(--ink); padding: var(--key); clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); }
  .strake__in { display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 2rem 0.95rem 1rem; background: linear-gradient(to top, var(--buoy) 0 5px, var(--ink) 5px 7px, var(--paper) 7px); clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); }

  /* ---------- the outboard: the one thing to tap ---------- */
  .outboard {
    position: relative; display: inline-flex; align-items: stretch; max-width: 100%;
    font-family: var(--font-display); color: var(--soot); text-decoration: none; cursor: pointer;
    border: 0; background: none; padding: 0;
    filter: drop-shadow(0 6px 0 var(--drop));
    transition: transform var(--fast) var(--ease-out), filter var(--fast) var(--ease-out);
    -webkit-tap-highlight-color: transparent;
  }
  .outboard__cowl {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 0.7em;
    min-height: 60px; min-width: 0; padding: 6px 1.5em 16px 3.4em;
    border: var(--key) solid var(--ink); border-radius: 30px 12px 5px 5px;
    background:
      linear-gradient(to top, var(--sun) 0 3px, var(--ink) 3px 6px, var(--paper) 6px 12px, var(--ink) 12px 15px, transparent 15px),
      var(--sun);
    font-size: 1.15rem; line-height: 1.1; text-align: left;
  }
  .outboard__cowl::before { content: ""; position: absolute; top: 6px; left: 24%; right: 9%; height: 5px; border-radius: 3px; background: var(--sun-lit); }
  .outboard__vents { position: absolute; left: 1.05em; top: 50%; width: 30px; height: 22px; margin-top: -16px; transform: skewX(-14deg);
    background: repeating-linear-gradient(to right, var(--ink) 0 5px, transparent 5px 11px); }
  .outboard__cord { position: relative; align-self: center; flex: none; width: 30px; height: 30px; margin: 0 16px 8px -3px;
    background: linear-gradient(to bottom, var(--sun-lit) 0 5px, var(--sun-deep) 5px); border: var(--key) solid var(--ink); border-left-width: 0; border-radius: 0 9px 9px 0;
    transition: transform var(--normal) var(--ease-spring); }
  .outboard__cord::after { content: ""; position: absolute; right: -16px; top: 50%; width: 14px; height: 34px; margin-top: -17px;
    background: linear-gradient(to right, var(--plank-light) 0 4px, var(--plank) 4px); border: var(--key) solid var(--ink); border-radius: 7px; }
  .outboard:hover { transform: translateY(-2px); filter: drop-shadow(0 8px 0 var(--drop)); }
  .outboard:hover .outboard__cord { transform: translateX(7px); }
  .outboard:active { transform: translateY(4px); filter: drop-shadow(0 2px 0 var(--drop)); }
  .outboard:active .outboard__cord { transform: translateX(12px); }
  .outboard--sm .outboard__cowl { min-height: 46px; font-size: 0.95rem; padding: 4px 1em 13px 2.6em; border-radius: 23px 10px 5px 5px; }
  .outboard--sm .outboard__vents { width: 22px; height: 16px; margin-top: -13px; left: 0.8em; }
  .outboard--sm .outboard__cord { width: 22px; height: 24px; }
  .outboard--sm .outboard__cord::after { height: 28px; margin-top: -14px; }
  .outboard--wide { display: flex; }
  .outboard--wide .outboard__cowl { flex: 1; }
  .outboard small { display: block; font-size: 0.66em; letter-spacing: 0.04em; opacity: 0.9; white-space: nowrap; }
  .outboard__cowl > span:last-child { white-space: nowrap; }
  .outboard[disabled], .outboard[aria-disabled="true"] { cursor: default; filter: none; }
  .outboard[disabled] .outboard__cowl { background: linear-gradient(to top, #e4dab1 0 3px, var(--ink) 3px 6px, var(--paper) 6px 12px, var(--ink) 12px 15px, transparent 15px), #e4dab1; color: var(--driftwood); }

  /* ---------- the oar: the second choice ---------- */
  .oar { display: inline-flex; align-items: center; max-width: 100%; font-family: var(--font-display); color: var(--ink); text-decoration: none; cursor: pointer;
    border: 0; background: none; padding: 0; filter: drop-shadow(0 5px 0 var(--drop)); transition: transform var(--fast) var(--ease-out); -webkit-tap-highlight-color: transparent; }
  .on-page .oar { filter: drop-shadow(0 5px 0 var(--drop-page)); }
  .oar__shaft { flex: none; width: 34px; height: 12px; margin-right: -3px; background: linear-gradient(to bottom, var(--plank-light) 0 3px, var(--plank) 3px); border: var(--key) solid var(--ink); border-radius: 6px 0 0 6px; position: relative; }
  .oar__shaft::after { content: ""; position: absolute; right: 2px; top: -9px; width: 11px; height: 26px; background: var(--stone); border: var(--key) solid var(--ink); border-radius: 4px; }
  .oar__blade { min-width: 0; background: var(--ink); padding: var(--key); clip-path: polygon(16px 0, calc(100% - 24px) 0, 100% 50%, calc(100% - 24px) 100%, 16px 100%, 0 50%); }
  .oar__face { display: flex; align-items: center; gap: 0.55em; min-height: 44px; padding: 0.35em 2.9em 0.35em 1.5em; font-size: 1.02rem; line-height: 1.1;
    background: linear-gradient(to right, var(--paper) calc(100% - 34px), var(--ink) calc(100% - 34px) calc(100% - 31px), var(--lake) calc(100% - 31px));
    clip-path: polygon(14.6px 0, calc(100% - 22.8px) 0, 100% 50%, calc(100% - 22.8px) 100%, 14.6px 100%, 0 50%); }
  .oar:hover { transform: translateX(5px); }
  .oar:active { transform: translateX(9px); }

  /* a rope end: the third choice, a text link with a whipped end */
  .rope { display: inline-flex; align-items: center; gap: 0.5em; font-family: var(--font-display); color: var(--ink); text-decoration: none; }
  .rope::after { content: ""; flex: none; width: 34px; height: 12px; border: var(--key) solid var(--ink); border-radius: 3px;
    background: linear-gradient(to right, transparent calc(100% - 9px), var(--ink) calc(100% - 9px) calc(100% - 7px), var(--buoy) calc(100% - 7px)),
      repeating-linear-gradient(60deg, var(--rope) 0 5px, var(--plank-light) 5px 8px);
    transition: transform var(--normal) var(--ease-spring); }
  .rope:hover::after { transform: translateX(6px); }
  .on-deep .rope { color: var(--paper); }

  /* ---------- decal tag ---------- */
  .decal { display: inline-block; vertical-align: middle; background: var(--ink); padding: 2.5px; clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 11px, 100% 100%, 0 100%); }
  .decal > span { display: inline-flex; align-items: center; gap: 0.45em; padding: 0.22em 0.95em 0.2em 0.7em; font-family: var(--font-display); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.5; white-space: nowrap;
    color: var(--ink); background: var(--paper); clip-path: polygon(0 0, calc(100% - 9.8px) 0, 100% 9.8px, 100% 100%, 0 100%); }
  .decal--sun > span { background: var(--sun); }
  .decal--lake > span { background: var(--lagoon); }
  .decal--coin > span { background: var(--coin); }
  .decal--stone > span { background: var(--stone); }
  .decal--uncommon > span { background: var(--uncommon); color: var(--paper); }
  .decal--rare > span { background: var(--sky); color: var(--paper); }
  .decal--epic > span { background: var(--epic); color: var(--paper); }
  .decal--buoy > span { background: var(--buoy); color: var(--paper); }
  .decal--wrap > span { white-space: normal; }

  /* ---------- life ring ---------- */
  .ring { position: relative; display: inline-block; border-radius: 50%; border: var(--key) solid var(--ink); padding: 11%; box-shadow: 0 8px 0 var(--drop);
    background: conic-gradient(from 26deg, var(--buoy) 0 38deg, var(--ink) 38deg 40.5deg, var(--paper) 40.5deg 87.5deg, var(--ink) 87.5deg 90deg,
      var(--buoy) 90deg 128deg, var(--ink) 128deg 130.5deg, var(--paper) 130.5deg 177.5deg, var(--ink) 177.5deg 180deg,
      var(--buoy) 180deg 218deg, var(--ink) 218deg 220.5deg, var(--paper) 220.5deg 267.5deg, var(--ink) 267.5deg 270deg,
      var(--buoy) 270deg 308deg, var(--ink) 308deg 310.5deg, var(--paper) 310.5deg 357.5deg, var(--ink) 357.5deg 360deg); }
  .ring > img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: var(--key) solid var(--ink); background: var(--lake); }

  /* ---------- the transom board (header) ---------- */
  .transom { position: sticky; top: 0; z-index: 60; background: var(--paper); border-bottom: var(--key) solid var(--ink); }
  .transom::after { content: ""; position: absolute; left: 0; right: 0; bottom: -13px; height: 10px; pointer-events: none;
    background: linear-gradient(to bottom, var(--plank-light) 0 3px, var(--plank) 3px 7px, var(--ink) 7px); }
  .transom__link { position: relative; display: inline-flex; align-items: center; font-family: var(--font-display); font-size: 0.98rem; padding: 0.45em 0.8em; color: var(--bark); text-decoration: none; white-space: nowrap; transition: color var(--fast); }
  .transom__link:hover { color: var(--ink); }
  .transom__link[aria-current="page"] { color: var(--soot); background: var(--ink); padding: 0; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%); }
  .transom__link[aria-current="page"] > span { display: block; margin: 3px; padding: calc(0.45em - 3px) calc(0.8em - 3px); background: var(--sun); clip-path: polygon(0 0, calc(100% - 8.8px) 0, 100% 8.8px, 100% 100%, 0 100%); }
  .prop-btn { display: inline-grid; place-items: center; width: 46px; height: 46px; border: var(--key) solid var(--ink); border-radius: 50%; background: var(--birch); color: var(--ink); cursor: pointer; transition: transform var(--normal) var(--ease-spring); }
  .prop-btn[aria-expanded="true"] { transform: rotate(120deg); background: var(--sun); }
  .menu-plank { display: block; font-family: var(--font-display); font-size: 1.12rem; padding: 0.7em 1em; color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--parchment); }
  .menu-plank[aria-current="page"] { background: var(--sun); }

  /* ---------- water ---------- */
  .air { background: linear-gradient(to bottom, var(--air-top), var(--air-bot)); }
  .water { position: relative; background: var(--lake); }
  .water--bands { background: linear-gradient(to bottom, var(--lake) 0 66%, var(--reef) 66%); }
  .water--deep { background: linear-gradient(to bottom, var(--deep), var(--trench) 60%, var(--night)); color: var(--paper); }
  .page { position: relative; background: var(--cream); }
  /* the surface: scalloped swells with a foam line, drawn above the section's top edge */
  .swell::before { content: ""; position: absolute; left: 0; right: 0; top: -27px; height: 28px; pointer-events: none; z-index: 2;
    background: var(--swell-img) repeat-x left bottom / 168px 28px; }
  .swell--lake { --swell-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 168 28'%3E%3Cpath d='M0 28V15Q42 -5 84 15Q126 -5 168 15V28Z' fill='%2307bdb2'/%3E%3Cpath d='M0 15Q42 -5 84 15Q126 -5 168 15' fill='none' stroke='%23e6fdf7' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E"); }
  .swell--deep { --swell-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 168 28'%3E%3Cpath d='M0 28V15Q42 -5 84 15Q126 -5 168 15V28Z' fill='%23006f70'/%3E%3C/svg%3E"); }
  .swell--page { --swell-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 168 28'%3E%3Cpath d='M0 28V15Q42 -5 84 15Q126 -5 168 15V28Z' fill='%23faf1d8'/%3E%3Cpath d='M0 15Q42 -5 84 15Q126 -5 168 15' fill='none' stroke='%23231109' stroke-width='3'/%3E%3C/svg%3E"); }
  .glint { position: absolute; width: 54px; height: 7px; border-radius: 4px; background: var(--foam); opacity: 0.9; pointer-events: none; }
  .glint::after { content: ""; position: absolute; left: 42%; top: 15px; width: 60%; height: 7px; border-radius: 4px; background: var(--foam); }
  .reed { position: absolute; bottom: -6px; pointer-events: none; }

  /* the sun, on the horizon */
  .sun-disc { position: absolute; border-radius: 50%; border: 6px solid var(--ink); background: radial-gradient(circle, var(--sun) 0 59%, var(--sun-lit) 59% 73%, var(--sun) 73%); pointer-events: none; }
  .cloud { position: absolute; pointer-events: none; }

  /* ---------- the gunwale (footer) ---------- */
  .gunwale { position: relative; background: linear-gradient(to bottom, var(--deep), var(--trench)); color: var(--paper); }
  .gunwale__rail { position: relative; height: 16px; background: linear-gradient(to bottom, var(--ink) 0 3px, var(--plank-light) 3px 7px, var(--plank) 7px 13px, var(--ink) 13px); }
  .gunwale__cleats { position: absolute; left: 0; right: 0; top: -22px; height: 24px; display: flex; justify-content: space-around; pointer-events: none; }
  .gunwale a:not(.outboard) { color: var(--paper); text-decoration: none; }
  .gunwale a:not(.outboard):hover { color: var(--sun); }
  .gunwale h2 { font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--shallows); }

  /* ---------- phone ---------- */
  .phone { display: block; filter: drop-shadow(0 26px 22px rgba(0, 46, 51, 0.38)) drop-shadow(0 4px 5px rgba(0, 46, 51, 0.3)); }

  /* ---------- speech (Bob talking, as on the catch screen) ---------- */
  .speech { position: relative; background: var(--ink); padding: var(--key); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
  .speech > div { background: var(--paper); color: var(--ink); padding: 0.85rem 1.1rem; font-weight: 700; clip-path: polygon(0 0, calc(100% - 12.8px) 0, 100% 12.8px, 100% 100%, 0 100%); }

  /* ---------- forms ---------- */
  .slip { display: block; width: 100%; font: inherit; font-weight: 700; color: var(--ink); background: var(--paper); border: var(--key) solid var(--ink); border-radius: 4px 14px 4px 4px; padding: 0.7rem 0.9rem; box-shadow: inset 0 4px 0 var(--parchment); transition: box-shadow var(--fast), background var(--fast); }
  .slip::placeholder { color: var(--stone); font-weight: 600; }
  .slip:focus { outline: none; background: #fff; box-shadow: inset 0 4px 0 var(--sun-tint), 0 0 0 4px var(--sun); }
  .slip[aria-invalid="true"] { box-shadow: inset 0 4px 0 #ffe9e6, 0 0 0 4px var(--buoy); }
  .slip-label { display: block; font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 0.35rem; }
  .slip-error { color: #a70416; font-size: 0.86rem; font-weight: 800; min-height: 1.3em; margin-top: 0.25rem; }

  /* ---------- details (FAQ) ---------- */
  .plank-q { filter: drop-shadow(0 5px 0 var(--drop-page)); }
  .plank-q > details { background: var(--ink); padding: var(--key); clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%); }
  .plank-q summary { list-style: none; display: flex; align-items: center; gap: 0.8rem; cursor: pointer; padding: 0.95rem 2.2rem 0.95rem 1.1rem; background: var(--paper); font-family: var(--font-display); font-size: 1.05rem; line-height: 1.25;
    clip-path: polygon(0 0, calc(100% - 12.8px) 0, 100% 12.8px, 100% 100%, 0 100%); }
  .plank-q summary::-webkit-details-marker { display: none; }
  .plank-q summary i { flex: none; color: var(--reef); transition: transform var(--normal) var(--ease-spring); }
  .plank-q details[open] summary { background: var(--sun-tint); clip-path: polygon(0 0, calc(100% - 12.8px) 0, 100% 12.8px, 100% 100%, 0 100%); }
  .plank-q details[open] summary i { transform: rotate(90deg); }
  .plank-q .answer { background: var(--paper); border-top: var(--key) solid var(--ink); padding: 1rem 1.2rem 1.1rem; color: var(--cocoa); }

  /* ---------- legal pages ---------- */
  .legal h2 { font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.6rem); margin: 2.2rem 0 0.7rem; scroll-margin-top: 110px; }
  .legal h3 { font-size: 1.08rem; margin: 1.4rem 0 0.4rem; font-family: var(--font-body); font-weight: 800; }
  .legal p, .legal li { color: var(--cocoa); font-weight: 600; overflow-wrap: anywhere; }
  .legal table p, .legal td, .legal th { overflow-wrap: normal; }
  .legal p { margin: 0 0 0.95rem; }
  .legal ul { list-style: none; margin: 0 0 1rem; padding: 0; }
  .legal ul li { position: relative; padding-left: 1.5rem; margin-bottom: 0.45rem; }
  .legal ul li::before { content: ""; position: absolute; left: 0.1rem; top: 0.52em; width: 10px; height: 10px; border-radius: 50%; background: var(--lake); border: 2px solid var(--ink); }
  .legal a { color: var(--deep); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
  .legal a:hover { color: var(--ink); }
  .legal table { width: 100%; min-width: 34rem; border-collapse: collapse; margin: 0.6rem 0 1.2rem; font-size: 0.92rem; }
  .legal th, .legal td { border: 2px solid var(--ink); padding: 0.55rem 0.7rem; text-align: left; vertical-align: top; }
  .legal th { background: var(--birch); font-family: var(--font-display); font-weight: 400; }
  .legal td { background: var(--paper); color: var(--cocoa); }
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--plank) transparent; }

  /* ---------- screenshots rail ---------- */
  .rail { display: flex; gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.5rem 1rem 1.6rem; scrollbar-width: thin; scrollbar-color: var(--plank) transparent; }
  .rail > * { flex: none; scroll-snap-align: center; }
  .shot { width: min(62vw, 250px); border: var(--key) solid var(--ink); border-radius: 22px; overflow: hidden; background: var(--lake); box-shadow: 0 8px 0 var(--drop-page); }
  .shot img { display: block; width: 100%; }

  /* ---------- the winch toy ---------- */
  .gauge-zone { fill: none; stroke-width: 26; }
  .gauge-ball { transition: transform 90ms linear; }
  .winch { position: relative; width: 104px; height: 104px; border-radius: 50%; border: var(--key) solid var(--ink); cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none;
    background: radial-gradient(circle at 34% 30%, var(--sun-lit) 0 9%, transparent 10%), var(--sun); box-shadow: 0 7px 0 var(--drop-page); transition: transform var(--fast) var(--ease-out), box-shadow var(--fast) var(--ease-out); }
  .winch:active, .winch.is-held { transform: translateY(4px); box-shadow: 0 3px 0 var(--drop-page); }
  .winch__crank { position: absolute; inset: 22%; border-radius: 50%; border: var(--key) solid var(--ink); background: var(--stone); }
  .winch__crank::before, .winch__crank::after { content: ""; position: absolute; left: 50%; top: 50%; width: 150%; height: 12px; margin: -6px 0 0 -75%; border-radius: 6px; background: var(--plank-light); border: var(--key) solid var(--ink); }
  .winch__crank::after { transform: rotate(90deg); }
  .winch.is-held .winch__crank { animation: crank 0.7s linear infinite; }
  .meter { height: 18px; border: var(--key) solid var(--ink); border-radius: 9px; background: var(--parchment); overflow: hidden; }
  .meter > span { display: block; height: 100%; width: 100%; background: var(--lake); transform-origin: left; transition: transform 120ms linear; }

  /* ---------- small parts ---------- */
  .coin { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: -0.24em; }
  .cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; padding: 0.75rem; pointer-events: none; }
  .cookie-bar > div { pointer-events: auto; }
  .fish-sway { animation: sway 5.5s ease-in-out infinite; transform-origin: 30% 50%; }
  .bob-float { animation: bobbing 4.6s ease-in-out infinite; }
}

/* a name board, as on the trip screen: sign lettering on a lagoon plank */
@layer components {
  .nameboard { display: inline-block; max-width: 100%; background: var(--ink); padding: var(--key); clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%); filter: none; }
  .nameboard > span { display: block; padding: 0.2em 1.35em 0.5em 0.65em; background: linear-gradient(to top, var(--buoy) 0 6px, var(--ink) 6px 8px, var(--lagoon) 8px); clip-path: polygon(0 0, 100% 0, calc(100% - 13px) 100%, 0 100%); }
  .tile { position: relative; display: block; overflow: hidden; border: var(--key) solid var(--ink); border-radius: 4px 24px 4px 4px; box-shadow: 0 8px 0 var(--drop-page); background: var(--lake); text-decoration: none; }
  .tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
  .tile:hover img { transform: scale(1.05); }
}
[hidden] { display: none !important; }
/* reveals that slide in from the side must never widen the page while they wait */
html, body, main { overflow-x: clip; }
/* a grid or flex child may always shrink: nothing with a long word or a select can push a page wider than the screen */
main :where(.grid) > * { min-width: 0; }
.slip { min-width: 0; max-width: 100%; }
.no-aos [data-aos] { opacity: 1 !important; transform: none !important; }

@keyframes sway { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-2deg); } 50% { transform: translate3d(10px, -8px, 0) rotate(2.5deg); } }
@keyframes bobbing { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.6deg); } 50% { transform: translate3d(0, -9px, 0) rotate(0.6deg); } }
@keyframes crank { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
@media (max-width: 380px) {
  .outboard__cowl { font-size: 1rem; padding-left: 0.9em; padding-right: 0.8em; gap: 0.5em; }
  .outboard__vents { display: none; }
  .outboard--sm .outboard__cowl { padding-left: 0.8em; }
  .oar__face { font-size: 0.94rem; padding-left: 1.2em; padding-right: 2.7em; }
  .hull--raked { --rake: 8px; }
  .decal > span { font-size: 0.66rem; letter-spacing: 0.06em; }
}
