:root {
  /* Palette Guy Don */
  --navy: #1b2b4b;
  --navy-light: #2d4270;
  --navy-dark: #0f1a2e;
  --sand: #e8dcca;
  --sand-light: #f5f0e8;
  --sand-dark: #c9b99a;
  --algae: #4a7b5f;
  --algae-light: #6a9b7f;
  --algae-dark: #2e5940;
  --ocean-mist: #e8eff5;
  --ocean-light: #b8cce0;

  --sea: var(--navy);
  --sea-deep: var(--navy-dark);
  --sky-top: #7a96b8;
  --sky-bot: var(--ocean-mist);
  --dune: var(--sand-dark);
  --ink: var(--navy-dark);
  --foam: var(--sand-light);
  --accent: var(--algae);
  --accent-deep: var(--algae-dark);
  --panel: var(--sand-light);
  --panel-deep: var(--sand);
  --font-display: "Playfair Display", Georgia, serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-sans: Lato, system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--sea-deep);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

a {
  user-select: auto;
}

#app,
.screen {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.screen[hidden],
.sheet[hidden] {
  display: none !important;
}

.screen-game-embed {
  z-index: 40;
}

/* ——— Home ——— */
.screen-home {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: var(--navy-dark);
  overflow: hidden;
}

.home-hero {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 70% 18%, rgba(106, 155, 127, 0.22), transparent 55%),
    linear-gradient(180deg, #15233f 0%, var(--navy-dark) 55%, #0a1220 100%);
}

.home-hero-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: 8%;
  top: 12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 220, 202, 0.18), transparent 68%);
  animation: bob 5s ease-in-out infinite;
}

.home-island {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 34%;
  width: 100%;
  height: 28%;
  opacity: 0.95;
}

.home-bike {
  position: absolute;
  left: 12%;
  bottom: 38%;
  width: min(132px, 34vw);
  height: auto;
  animation: bob 2.8s ease-in-out infinite;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.wind-line {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(245, 240, 232, 0.55), transparent);
  animation: wind 2.4s linear infinite;
}

.w1 { top: 18%; left: -40%; width: 120px; animation-duration: 2.1s; }
.w2 { top: 26%; left: -30%; width: 160px; animation-duration: 2.7s; animation-delay: 0.4s; }
.w3 { top: 34%; left: -50%; width: 100px; animation-duration: 1.9s; animation-delay: 0.9s; }

.home-content {
  position: relative;
  z-index: 2;
  padding: 28px 24px max(28px, env(safe-area-inset-bottom));
  max-width: 440px;
  background: linear-gradient(180deg, transparent, rgba(15, 26, 46, 0.55) 18%, var(--navy-dark) 38%);
}

.home-place,
.panel-kicker,
.sheet-kicker,
.over-eyebrow {
  margin: 0 0 8px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--algae-light);
  font-weight: 700;
}

.brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 12vw, 3.8rem);
  line-height: 0.95;
  font-weight: 700;
  color: var(--sand-light);
}

.home-lead,
.rides-intro {
  margin: 14px 0 22px;
  font-size: 1.05rem;
  line-height: 1.45;
  max-width: 30ch;
  color: rgba(245, 240, 232, 0.82);
}

.screen-home .btn-primary {
  background: var(--algae);
  border-color: var(--algae);
  color: var(--sand-light);
}

.screen-home .btn-primary:active {
  background: var(--algae-dark);
  border-color: var(--algae-dark);
}

.home-secondary {
  margin-top: 10px;
  width: 100%;
  border-color: rgba(245, 240, 232, 0.35);
  color: var(--sand-light);
  background: transparent;
}

.home-secondary:hover,
.home-secondary:active {
  background: rgba(245, 240, 232, 0.1);
  color: var(--sand-light);
}

.home-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 20px 0 0;
  font-size: 0.86rem;
  color: rgba(245, 240, 232, 0.62);
}

.home-meta strong {
  color: var(--sand-light);
  font-weight: 700;
}

.home-credit,
.finish-credit {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(245, 240, 232, 0.55);
}

.home-credit a,
.finish-credit a {
  color: var(--algae-light);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  touch-action: manipulation;
}

.finish-credit {
  color: rgba(20, 40, 47, 0.62);
}

.finish-credit a {
  color: var(--sea-deep);
}

.finish-credit {
  margin-top: 18px;
  text-align: center;
}

.btn {
  appearance: none;
  border: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 22px;
  border-radius: 2px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--navy);
  color: var(--sand-light);
  width: 100%;
  border: 2px solid var(--navy);
  box-shadow: none;
}

.btn-primary:active {
  background: var(--navy-light);
  border-color: var(--navy-light);
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  width: 100%;
  margin-top: 10px;
  border: 2px solid var(--navy);
}

.btn-ghost:active {
  background: var(--navy);
  color: var(--sand-light);
}

.btn-icon {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: rgba(244, 250, 252, 0.92);
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.home-setup {
  margin: 14px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--algae-light);
  line-height: 1.35;
}

.btn-secondary {
  background: var(--algae);
  color: var(--sand-light);
  border: 2px solid var(--algae);
  box-shadow: none;
  width: auto;
  padding: 14px 18px;
  flex-shrink: 0;
}

.btn-secondary:active {
  background: var(--algae-dark);
  border-color: var(--algae-dark);
}

.btn-primary:disabled,
.btn-ghost:disabled,
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ——— Setup ——— */
.screen-setup,
.screen-rides {
  overflow: auto;
  background:
    linear-gradient(180deg, #d7eef6 0%, #eaf5f8 22%, var(--panel) 22%);
  padding: max(16px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.setup-block {
  margin: 0 0 22px;
}

.day-trip-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 12px;
  padding: 12px 12px;
  border-radius: 12px;
  background: rgba(27, 43, 75, 0.05);
  border: 1px solid rgba(27, 43, 75, 0.1);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}

.day-trip-check input {
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--algae);
  flex-shrink: 0;
}

.stay-fields.is-disabled {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.2);
}

.field-label {
  display: block;
  margin: 0 0 8px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--sea-deep);
}

.setup-help {
  margin: -2px 0 12px;
  font-size: 0.92rem;
  color: rgba(20, 40, 47, 0.72);
  line-height: 1.35;
}

.field-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.field-input {
  flex: 1;
  min-width: 0;
  border: 2px solid rgba(20, 40, 47, 0.12);
  border-radius: 14px;
  padding: 14px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fffdf8;
  color: var(--ink);
}

.field-input:focus {
  outline: none;
  border-color: rgba(27, 107, 122, 0.55);
}

.field-status {
  min-height: 1.2em;
  margin: 8px 2px 0;
  font-size: 0.88rem;
  color: rgba(20, 40, 47, 0.7);
}

.field-status.is-error {
  color: #a33b2f;
}

.geocode-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.geocode-item,
.rental-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 2px solid transparent;
  border-radius: 16px;
  padding: 14px 16px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
}

.geocode-item:active,
.rental-card:active {
  transform: scale(0.99);
}

.geocode-item strong,
.rental-card strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 4px;
}

.geocode-item span,
.rental-card .rental-meta {
  font-size: 0.88rem;
  color: rgba(20, 40, 47, 0.68);
  line-height: 1.35;
}

.rentals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rental-card.is-selected {
  border-color: var(--algae);
  background: rgba(74, 123, 95, 0.08);
}

.rental-card .rental-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 4px;
}

.rental-card .rental-dist {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--sea);
  white-space: nowrap;
}

.rental-card .rental-blurb {
  margin: 6px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
  color: rgba(20, 40, 47, 0.78);
}

.setup-checklist {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 2px;
  background: rgba(27, 43, 75, 0.06);
  color: var(--navy);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.setup-checklist.is-ready {
  background: rgba(74, 123, 95, 0.14);
  color: var(--algae-dark);
}

.choice-list,
.rentals-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.choice-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 2px solid transparent;
  border-radius: 2px;
  padding: 14px 16px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
}

.choice-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.choice-card.is-selected,
.rental-card.is-selected {
  border-color: var(--algae);
  background: rgba(74, 123, 95, 0.08);
}

.btn-inline {
  width: auto;
  margin-top: 10px;
  padding: 10px 14px;
  font-size: 0.9rem;
}

.setup-footer {
  position: sticky;
  bottom: 0;
  z-index: 5;
  padding: 12px 0 max(8px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(245, 240, 232, 0), var(--panel) 28%);
  pointer-events: auto;
}

.setup-footer .btn {
  pointer-events: auto;
}

.setup-footer .btn.is-ready {
  box-shadow: inset 0 0 0 1px rgba(74, 123, 95, 0.35);
}

/* ——— Rides list ——— */

.panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.9rem;
  line-height: 1.05;
}

.rides-intro {
  margin: 8px 4px 18px;
}

.rides-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.depart-sheet .btn {
  width: 100%;
  margin-top: 8px;
}

.depart-sheet .btn-primary {
  margin-top: 14px;
}

.depart-status {
  margin: 12px 0 0;
  min-height: 1.2em;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.depart-status.is-error {
  color: #a0452f;
}

.ride-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 18px;
  padding: 18px 18px 16px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(20, 40, 47, 0.08);
  transition: transform 0.15s ease;
}

.ride-card:active {
  transform: scale(0.99);
}

.ride-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ride-tag {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--algae-dark);
  background: rgba(74, 123, 95, 0.14);
  padding: 6px 10px;
  border-radius: 2px;
}

.ride-meta {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(20, 40, 47, 0.62);
}

.ride-card h3 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 1.45rem;
  line-height: 1.1;
}

.ride-card .ride-sub {
  margin: 0 0 10px;
  font-weight: 600;
  color: var(--sea-deep);
}

.ride-card .ride-blurb {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  color: rgba(20, 40, 47, 0.78);
}

/* ——— Map ——— */
.screen-map {
  background: #c9dde4;
}

.map {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-hud {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  left: 12px;
  right: 12px;
  z-index: 5;
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  align-items: start;
  pointer-events: none;
}

.map-hud .btn-icon,
.map-hud .hud-wind {
  pointer-events: auto;
}

.hud-card {
  background: rgba(247, 241, 230, 0.94);
  border-radius: 14px;
  padding: 10px 12px;
  min-width: 0;
}

.hud-ride {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-meta {
  margin-top: 2px;
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(20, 40, 47, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-dot {
  margin: 0 4px;
}

.hud-wind {
  background: rgba(247, 241, 230, 0.94);
  border-radius: 14px;
  padding: 8px 10px;
  min-width: 78px;
}

.wind-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(20, 40, 47, 0.65);
  margin-bottom: 4px;
}

.wind-bar {
  height: 7px;
  border-radius: 999px;
  background: rgba(20, 40, 47, 0.12);
  overflow: hidden;
}

.wind-fill {
  height: 100%;
  width: 25%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7ec8b3, #e7c15a, #e36a2c);
  transition: width 0.15s linear;
}

.map-hint {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(96px, calc(env(safe-area-inset-bottom) + 84px));
  z-index: 5;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(20, 40, 47, 0.55);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.map-hint.hide {
  opacity: 0;
}

.btn-pedal {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: max(22px, env(safe-area-inset-bottom));
  z-index: 5;
  min-width: 180px;
  border: 2px solid var(--navy);
  border-radius: 2px;
  padding: 18px 28px;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--sand-light);
  background: var(--navy);
  box-shadow: none;
  cursor: pointer;
  touch-action: none;
}

.btn-pedal:active {
  transform: translateX(-50%) scale(0.98);
  background: var(--navy-light);
}

.btn-pedal.is-paused {
  background: var(--algae);
  border-color: var(--algae);
}

/* Bike marker */
.bike-marker,
.walk-marker {
  width: 44px;
  height: 44px;
  margin-left: -22px;
  margin-top: -22px;
  filter: drop-shadow(0 2px 3px rgba(15, 26, 46, 0.35));
}

.walk-marker {
  width: 40px;
  height: 40px;
  margin-left: -20px;
  margin-top: -20px;
}

.poi-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--sand-light);
  border: 3px solid var(--navy);
  box-shadow: 0 1px 4px rgba(15, 26, 46, 0.3);
}

.poi-marker.done {
  background: var(--algae);
  border-color: var(--algae-dark);
}

.poi-marker.stay-marker {
  background: var(--navy);
  border-color: var(--navy-dark);
}

.poi-marker.rental-marker {
  background: var(--algae);
  border-color: var(--algae-dark);
  width: 18px;
  height: 18px;
}

/* ——— Sheet ——— */
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 10px 20px max(24px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 0 0;
  background: linear-gradient(180deg, #fffdf8, var(--panel-deep));
  box-shadow: 0 -10px 40px rgba(15, 63, 74, 0.25);
  animation: sheet-up 0.3s ease;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: rgba(20, 40, 47, 0.18);
  margin: 0 auto 14px;
}

.sheet-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 1.7rem;
  line-height: 1.1;
}

.sheet-text {
  margin: 0 0 10px;
  line-height: 1.45;
  color: rgba(20, 40, 47, 0.82);
}

.sheet-tip {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(27, 107, 122, 0.1);
  color: var(--sea-deep);
  font-size: 0.92rem;
  line-height: 1.4;
  font-weight: 600;
}

.sheet-tip::before {
  content: "Astuce — ";
  color: var(--sea);
}

/* ——— Finish ——— */
.screen-overlay {
  z-index: 25;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgba(15, 63, 74, 0.25), rgba(15, 63, 74, 0.72));
  padding: 24px;
}

.overlay-panel {
  width: min(100%, 420px);
  padding: 28px 24px max(28px, env(safe-area-inset-bottom));
  border-radius: 24px 24px 18px 18px;
  background: linear-gradient(180deg, #f7f1e6, #efe3cb);
  animation: sheet-up 0.35s ease;
}

.overlay-panel h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.05;
}

.over-summary {
  margin: 0 0 14px;
  color: rgba(20, 40, 47, 0.78);
  line-height: 1.4;
}

/* ——— Wait mini-game ——— */
.screen-wait {
  overflow: auto;
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 40%, var(--sand-light) 40%);
  padding: max(16px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom));
}

.wait-header .panel-title,
.wait-header .panel-kicker {
  color: var(--sand-light);
}

.wait-header .panel-kicker {
  color: var(--algae-light);
}

.wait-lead {
  margin: 8px 0 16px;
  color: rgba(245, 240, 232, 0.88);
  font-size: 1rem;
  line-height: 1.4;
  max-width: 36ch;
}

.wait-score-row {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--sand-light);
  margin-bottom: 8px;
}

.wait-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(245, 240, 232, 0.2);
  overflow: hidden;
  margin-bottom: 14px;
}

.wait-fill {
  height: 100%;
  width: 0%;
  background: var(--algae);
  transition: width 0.15s linear;
}

.wait-canvas {
  display: block;
  width: 100%;
  max-width: 420px;
  height: min(52vh, 420px);
  margin: 0 auto;
  border-radius: 2px;
  border: 2px solid rgba(232, 220, 202, 0.35);
  touch-action: none;
  background: var(--navy);
}

.wait-hint {
  margin: 12px 0 0;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--navy);
  font-weight: 600;
}

.screen-games {
  background: linear-gradient(180deg, var(--navy-dark) 0%, var(--navy) 100%);
}

.screen-games .wait-lead {
  max-width: 40ch;
}

.screen-games .wait-hint {
  color: rgba(245, 240, 232, 0.7);
}

.screen-games .btn-primary {
  background: var(--algae);
  border-color: var(--algae);
  color: var(--sand-light);
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 18px;
}

.game-tile {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid rgba(27, 43, 75, 0.1);
  background: var(--sand-light);
  color: var(--navy);
  border-radius: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-family: var(--font-sans);
  transition: background 0.12s ease, transform 0.12s ease;
  box-shadow: 0 1px 0 rgba(15, 26, 46, 0.08);
}

.game-tile:active {
  transform: scale(0.99);
  background: #fffdf8;
}

.game-tile-emoji {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--navy);
  color: var(--sand-light);
  display: grid;
  place-items: center;
  font-size: 1.35rem;
}

.game-tile-text {
  flex: 1;
  min-width: 0;
}

.game-tile-name {
  margin: 0 0 2px;
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--navy);
}

.game-tile-desc {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(27, 43, 75, 0.68);
  line-height: 1.3;
}

.game-tile-arrow {
  color: rgba(27, 43, 75, 0.4);
  font-size: 1.2rem;
}

#btn-crossing-arrive {
  width: 100%;
}

.screen-game-embed {
  padding: 0;
  background: #0c0a1a;
  display: flex;
  flex-direction: column;
}

.game-embed-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px;
  background: var(--navy-dark);
  border-bottom: 1px solid rgba(245, 240, 232, 0.12);
  z-index: 2;
}

.game-embed-bar .btn-icon {
  color: var(--sand-light);
  border-color: rgba(245, 240, 232, 0.25);
}

.game-embed-title {
  flex: 1;
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  color: var(--sand-light);
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-embed-arrive {
  flex: 0 0 auto;
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--algae);
  color: var(--sand-light);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}

.game-frame {
  flex: 1;
  width: 100%;
  border: 0;
  background: #0c0a1a;
  min-height: 0;
}

.screen-checklist .wait-lead {
  color: rgba(245, 240, 232, 0.88);
}

.return-checklist {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 16px;
}

.check-section {
  background: var(--sand-light);
  border-radius: 14px;
  padding: 12px 12px 10px;
  border: 1px solid rgba(27, 43, 75, 0.12);
}

.check-section h3 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  font-weight: 600;
}

.check-section .check-blurb {
  margin: 0 0 10px;
  font-size: 0.88rem;
  color: rgba(27, 43, 75, 0.7);
  line-height: 1.35;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid rgba(27, 43, 75, 0.14);
  background: #fffdf8;
  border-radius: 10px;
  padding: 10px 12px;
  margin: 0 0 6px;
  cursor: pointer;
  font-family: var(--font-sans);
  color: var(--navy);
  transition: border-color 0.12s ease, background 0.12s ease;
}

.check-item:last-child {
  margin-bottom: 0;
}

.check-item .check-box {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--navy);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 1px;
  background: transparent;
  color: transparent;
}

.check-item .check-label {
  flex: 1;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.3;
}

.check-item .check-sub {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: rgba(27, 43, 75, 0.62);
  margin-top: 2px;
}

.check-item.is-checked {
  border-color: var(--algae);
  background: rgba(74, 123, 95, 0.12);
}

.check-item.is-checked .check-box {
  background: var(--algae);
  border-color: var(--algae);
  color: var(--sand-light);
}

.check-item.is-wrong {
  border-color: #a0452f;
  animation: check-shake 0.35s ease;
}

@keyframes check-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  30% {
    transform: translateX(-4px);
  }
  60% {
    transform: translateX(4px);
  }
}

.ferry-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#btn-wait-validate {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  display: block;
}

#btn-wait-validate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.finish-pois {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.finish-pois li {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 253, 248, 0.8);
  font-weight: 600;
  font-size: 0.95rem;
}

/* Leaflet tweaks */
.leaflet-control-attribution {
  font-size: 10px !important;
  background: rgba(255, 255, 255, 0.75) !important;
  max-width: 55vw;
}

.leaflet-bottom.leaflet-right {
  margin-bottom: 78px;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes wind {
  from { transform: translateX(0); opacity: 0; }
  15% { opacity: 1; }
  to { transform: translateX(120vw); opacity: 0; }
}

@keyframes drift {
  from { transform: translateX(0); }
  to { transform: translateX(-40px); }
}

@keyframes sheet-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 720px) {
  .home-content {
    margin: 0 auto 4vh;
    text-align: center;
    align-self: center;
  }

  .home-lead {
    margin-left: auto;
    margin-right: auto;
  }

  .home-bike {
    left: 50%;
    bottom: 48%;
    margin-left: calc(min(120px, 28vw) / -2);
  }

  .rides-list {
    max-width: 560px;
    margin: 0 auto;
  }

  .rides-intro {
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
  }
}
