/* WO?! shared stylesheet — :root vars, body baseline, hamburger menu, toast.
   Loaded by every page; each page also loads its own <page>.css for specifics. */

:root {
  --ink: #0F0F12;
  --cream: #F5E2C7;
  --coral: #D96A3A;
  --gold: #E8A654;
  --blue: #2B3F6B;
  --teal: #3CA39E;
  --sage: #7FA968;
  --grey: #2E2A55;
}

* { box-sizing: border-box; }

/* Kill the grey flash iOS/Android paint over tapped elements — we provide our
   own :active feedback instead. */
a, button, input, label, .tab, .chip { -webkit-tap-highlight-color: transparent; }

/* Visible focus ring for keyboard users only (mouse/touch taps stay clean). */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: -apple-system, "Segoe UI", system-ui, sans-serif;
  color: var(--cream);
}

body {
  background: linear-gradient(180deg, #0A1430 0%, var(--blue) 30%, #7A6A7E 55%, var(--gold) 80%, var(--coral) 100%);
  background-attachment: fixed;
  /* iOS safe-area: extra ruimte voor de notch/status bar + home indicator. */
  padding-top:    max(24px, env(safe-area-inset-top));
  padding-bottom: max(24px, env(safe-area-inset-bottom));
  padding-left:   max(24px, env(safe-area-inset-left));
  padding-right:  max(24px, env(safe-area-inset-right));
}

h1 { font-weight: 900; letter-spacing: 2px; font-size: 28px; margin: 4px 0 0; }
h1 .q { color: var(--coral); }
.sub { opacity: 0.75; font-size: 13px; letter-spacing: 1px; margin-bottom: 24px; }

.card {
  background: rgba(15,15,18,0.55);
  border: 2px solid rgba(245,226,199,0.15);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 18px;
  backdrop-filter: blur(6px);
}
.card h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: 1px; color: var(--cream); }
.card .hint, .hint { opacity: 0.6; font-size: 12px; margin-bottom: 14px; }

/* In-content links pick up the brand coral instead of browser-default blue.
   Scoped to text content (cards, hints) so styled nav/menu anchors are untouched. */
.card a, .hint a, p a {
  color: var(--gold);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: rgba(232,166,84,0.5);
}
.card a:hover, .hint a:hover, p a:hover { color: var(--coral); text-decoration-color: var(--coral); }

/* Hamburger menu (used by every page) */
.menu-wrap { position: relative; margin-left: auto; flex-shrink: 0; }
.menu-btn {
  background: rgba(15,15,18,0.6);
  border: 1px solid rgba(245,226,199,0.2);
  width: 42px; height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: var(--cream);
  padding: 0;
}
.menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: rgba(15,15,18,0.95);
  border: 1px solid rgba(245,226,199,0.2);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  display: none;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.menu-dropdown.open { display: block; }
.menu-dropdown a,
.menu-dropdown button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  background: transparent;
  border: none;
  color: var(--cream);
  text-decoration: none;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
}
.menu-dropdown a:hover,
.menu-dropdown button:hover { background: rgba(245,226,199,0.1); }
.menu-version { padding: 8px 14px; font-size: 11px; opacity: 0.5; letter-spacing: 1px; }

/* Toast */
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,15,18,0.95);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(245,226,199,0.2);
  display: none;
  z-index: 200;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
}
.toast.show {
  display: block;
  opacity: 1;
  transform: translateX(-50%) translateY(-8px);
}

.container { max-width: 920px; margin: 0 auto; }

/* ---- Shared modal scaffolding (wo-user.js: onboarding / first-run / profile)
   Only the repeated chrome lives here; per-modal spacing stays inline. ---- */
.wo-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(13,16,28,0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(8px);
}
.wo-modal {
  background: rgba(15,15,18,0.9);
  border: 2px solid var(--coral);
  border-radius: 20px;
  padding: 24px;
  max-width: 420px;
  width: 100%;
  color: var(--cream);
  font-family: -apple-system, "Segoe UI", sans-serif;
}
.wo-modal.wide   { max-width: 440px; }
.wo-modal.scroll { max-height: 90vh; overflow-y: auto; }
.wo-modal-head   { text-align: center; margin-bottom: 18px; }

.wo-field-label {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  letter-spacing: 1px;
}

.wo-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid rgba(245,226,199,0.2);
  background: rgba(15,15,18,0.6);
  color: inherit;
  font-family: inherit;
  font-size: 14px;
  box-sizing: border-box;
}
.wo-input.big {
  padding: 14px 16px;
  font-size: 18px;
  border-radius: 12px;
  background: rgba(15,15,18,0.7);
}

.wo-btn-primary {
  background: var(--coral);
  color: var(--cream);
  border: none;
  border-radius: 12px;
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  /* Sensible defaults so the class is usable without per-page sizing.
     Inline styles (e.g. modal buttons) still override these. */
  padding: 13px 20px;
  min-height: 46px;
  font-size: 15px;
  line-height: 1.1;
  transition: filter 0.15s, transform 0.05s;
}
.wo-btn-primary:hover { filter: brightness(1.08); }
.wo-btn-primary:active { transform: translateY(1px); }
.wo-btn-primary:disabled { opacity: 0.5; cursor: default; filter: none; transform: none; }
.wo-btn-ghost {
  background: transparent;
  border: 2px solid rgba(245,226,199,0.25);
  color: inherit;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  padding: 11px 18px;
  min-height: 46px;
  font-size: 15px;
  line-height: 1.1;
  transition: background 0.15s, transform 0.05s;
}
.wo-btn-ghost:hover { background: rgba(245,226,199,0.1); }
.wo-btn-ghost:active { transform: translateY(1px); }
.wo-btn-ghost:disabled { opacity: 0.5; cursor: default; }

/* ---- Confirm / prompt dialog (woConfirm / woPrompt in wo-util.js) ---- */
.wo-dialog-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(10,20,48,0.6); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.wo-dialog {
  background: linear-gradient(180deg, var(--blue) 0%, var(--grey) 100%);
  border: 2px solid rgba(245,226,199,0.2);
  border-radius: 18px; padding: 22px 24px; max-width: 420px; width: 100%;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.wo-dialog-msg { font-size: 15px; line-height: 1.4; margin-bottom: 16px; }
.wo-dialog-input {
  width: 100%; box-sizing: border-box;
  background: rgba(15,15,18,0.6); color: var(--cream);
  border: 1px solid rgba(245,226,199,0.25); border-radius: 10px;
  padding: 10px 12px; font-family: "SF Mono", Menlo, monospace; font-size: 14px;
  letter-spacing: 1px; margin-bottom: 16px;
}
.wo-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; }
.wo-dialog-actions button {
  border: none; padding: 10px 16px; border-radius: 10px; font-weight: 700;
  font-family: inherit; font-size: 13px; cursor: pointer; letter-spacing: 0.5px;
}
.wo-dialog-ok { background: var(--coral); color: var(--cream); }
.wo-dialog-cancel { background: rgba(245,226,199,0.12); color: var(--cream); border: 1px solid rgba(245,226,199,0.2); }

/* ---- "powered by outrunworld.com" attribution (OutRun platform tie-in) ----
   The WO?! app stays WO?! for EuroTrip; this badge signals the platform behind
   it. Drop <a class="powered-by" href="https://outrunworld.com">…</a> on any page. */
.powered-by {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  width: max-content; margin: 26px auto 4px; padding: 7px 14px;
  font-size: 12px; letter-spacing: 0.4px; opacity: 0.6;
  color: var(--cream); text-decoration: none;
  border: 1px solid rgba(245,226,199,0.14); border-radius: 999px;
  background: rgba(15,15,18,0.3); transition: opacity .15s ease;
}
.powered-by:hover { opacity: 0.95; }
.powered-by b { font-weight: 800; color: var(--gold); }
.powered-by .pb-mark { width: 15px; height: 15px; flex-shrink: 0; }
