/* Longship Run. Plain CSS, uses the page tokens. */
.ls { --rock: #66757F; --rock-edge: #4C5963; --wood: #8A5A2B; --wood-dark: #5E3B19; --gold: #C9971C; --sign: #F4E9CC; --sign-ink: #2A1E10;
  --sky-top: #DCE8EF; --water: #0B6A88; --mount1: #B7C5CE; --mount2: #9FB0BB; --bad: #B23A2E; --win: #1F7A4A;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 12px; margin: 14px 0 26px; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .ls { --rock: #3E4D58; --rock-edge: #2A363F; --wood: #A9713A; --wood-dark: #6E4520; --gold: #E9B949;
    --sky-top: #0B1218; --water: #2E8FB0; --mount1: #1C2A33; --mount2: #233540; --bad: #FF8A7A; --win: #5FD192; }
}
:root[data-theme="dark"] .ls { --rock: #3E4D58; --rock-edge: #2A363F; --wood: #A9713A; --wood-dark: #6E4520; --gold: #E9B949;
  --sky-top: #0B1218; --water: #2E8FB0; --mount1: #1C2A33; --mount2: #233540; --bad: #FF8A7A; --win: #5FD192; }

.ls-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ls-title { font-family: var(--display); font-weight: 700; font-size: 1.75rem; line-height: 1; margin: 0; }
.ls-stats { display: flex; gap: 12px; font-size: 0.9rem; color: var(--muted); }
.ls-stats b { color: var(--ink); font-family: var(--display); font-size: 1.2rem; }
.ls-sub { margin: 2px 0 10px; color: var(--muted); font-size: 0.93rem; }

.ls-stage { position: relative; height: clamp(340px, 60vh, 480px); border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.ls-stage canvas { display: block; width: 100%; height: 100%; touch-action: none; cursor: pointer; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.ls-stage canvas:focus { outline: none; }
.ls-stage canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }

.ls-pop { position: absolute; left: 10px; right: 10px; top: 54px; margin: 0 auto; max-width: 300px; padding: 7px 10px; border-radius: 8px;
  background: var(--surface); color: var(--ink); border: 2px solid var(--gold); font-style: italic; font-size: 0.92rem; line-height: 1.3;
  text-align: center; pointer-events: none; opacity: 0; transition: opacity .25s; }
.ls-pop.show { opacity: .95; }
.ls-pop b { display: block; font-style: normal; font-family: var(--display); font-size: 0.78rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }

.ls-over { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 10px;
  background: rgba(0,0,0,.25); background: color-mix(in srgb, var(--bg) 55%, transparent); overflow-y: auto; }
.ls-over[hidden] { display: none; }
.ls-panel { width: 100%; max-width: 380px; margin: auto; background: var(--surface); border: 2px solid var(--bad); border-radius: 12px; padding: 12px 14px; animation: ls-rise .25s ease-out; }
.ls-sunk { margin: 0; font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1.05; }
.ls-sunk b { color: var(--bad); }
.ls-typical { margin: 2px 0 0; font-size: 0.82rem; color: var(--muted); }
.ls-say { margin: 6px 0 0; font-style: italic; line-height: 1.35; font-size: 0.97rem; }
.ls-final { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.ls-final b { color: var(--ink); font-family: var(--display); font-size: 1.15rem; }
.ls-actions { display: flex; gap: 8px; margin: 8px 0 0; }
.ls-btn { font: inherit; font-family: var(--display); font-weight: 700; font-size: 1.2rem; border-radius: 8px; padding: 8px 16px; cursor: pointer;
  border: 2px solid var(--accent); background: var(--surface); color: var(--accent); }
.ls-btn.primary { flex: 1 1 auto; background: var(--accent); color: var(--surface); font-size: 1.4rem; }
.ls-btn:focus-visible, .ls-offer a:focus-visible, .ls-links a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ls-status { margin: 2px 0 0; min-height: 1.1em; font-size: 0.88rem; color: var(--win); }
.ls-offer { margin: 6px 0 0; padding: 10px 10px 8px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.ls-offer[hidden] { display: none; }
.ls-offer .ls-what { margin: 0 0 8px; font-size: 0.88rem; line-height: 1.35; }
.ls-offer .ls-go { display: inline-block; font-family: var(--display); font-weight: 700; font-size: 1.08rem; color: var(--surface); background: var(--accent);
  border-radius: 6px; padding: 5px 12px; text-decoration: none; }
.ls-offer .ls-note { margin: 5px 0 0; font-size: 0.78rem; color: var(--muted); }
.ls-offer .ls-note a { color: var(--accent); }
.ls-links { margin: 0 0 6px; font-size: 0.92rem; }
.ls-links a { color: var(--accent); font-weight: 600; }

@keyframes ls-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 380px) {
  .ls { padding: 10px 8px; }
  .ls-panel { padding: 10px 10px; }
  .ls-sunk { font-size: 1.3rem; }
  .ls-say { font-size: 0.9rem; }
  .ls-offer .ls-what { font-size: 0.83rem; }
  .ls-btn.primary { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ls *, .ls *::before, .ls *::after { animation: none !important; transition: none !important; }
}
