/* stitch.css
   The "Soft-Modernist" platform design system, adopted wholesale from the Stitch
   redesign. This is the fresh, modern look for the PLATFORM front door and chrome:
   warm off-white surfaces, one confident amber primary, Plus Jakarta Sans display +
   Be Vietnam Pro body, oversized 24px cards, fully-rounded pill buttons and a gentle
   "soft lift" depth. Loaded LAST so it takes priority over the older platform theme.

   Scope: the platform surfaces only, keyed on the ".platform-screen" wrapper that the
   landing, storefront and account pickers all carry. In-game screens never carry that
   class, so each adventure keeps its own in-world theme, fonts and art untouched. The
   shared app header and the page background are reached with :has(.platform-screen).
   No em/en dashes. */

/* ===== 1. Design tokens: remap the app's themed variables to the Stitch palette
   inside the platform scope, so every existing component restyles automatically. ===== */
.platform-screen {
  /* Surfaces: every white is slightly sun-kissed to avoid a clinical feel. */
  --parchment: #f9f9f7;
  --cream: #ffffff;
  --panel: #ffffff;
  --surface: #f9f9f7;

  /* Ink: a warm near-black anchor plus a readable muted tone. */
  --ink: #1a1c1b;
  --on-surface: #1a1c1b;
  --ink-soft: #6b5d4a;
  --muted: #6b5d4a;

  /* Primary: amber is the spark of discovery. The strong tone is for text/links that
     need contrast on white; the bright tone fills the primary buttons. */
  --amber: #f59e0b;
  --accent: #f59e0b;
  --accent-strong: #8a5a00;
  --accent-soft: #fdf1dd;
  --accent-grad: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  --gold: #f59e0b;
  --gold-bright: #8a5a00;
  --gold-dim: #e7e2da;
  --forest: #8a5a00;
  --rune-red: #ba1a1a;

  /* Shapes + soft-lift depth. */
  --radius: 24px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow: 0 1px 3px rgba(26, 28, 27, 0.05), 0 14px 34px rgba(26, 28, 27, 0.08);

  /* Typography: characterful display + humanist body. */
  --font-head: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* The platform surface is always a warm, light stage (over the app's dark default),
     so the front door reads the same whatever pack theme is ambient. Hero art, when a
     pack has it, still shows via the higher-specificity .has-hero rule in platform.css. */
  background: #f9f9f7;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
}
/* Fill the whole page warm whenever a platform surface is on screen, so there is no
   dark strip around the card column. In-game screens have no .platform-screen. */
html:has(.platform-screen),
body:has(.platform-screen),
#app:has(.platform-screen),
#app:has(.platform-screen) .app-screen { background: #f9f9f7; }

/* ===== 2. Type: Plus Jakarta Sans display, tighter tracking, contained feel. ===== */
.platform-screen h1:not(.platform-wordmark),
.platform-screen h2,
.platform-screen h3,
.platform-screen .panel-title {
  font-family: var(--font-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-transform: none;
}
.platform-screen .panel-note,
.platform-screen p { color: var(--ink); }
.platform-wordmark {
  font-family: var(--font-head) !important;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.platform-screen .platform-tagline { color: var(--muted); }
.platform-screen .platform-acronym .pa-letter { color: var(--accent-strong); }

/* ===== 3. Buttons: fully-rounded pills. Primary is bright amber with dark ink text
   (as in the mock); secondary is white with a hairline. ===== */
.platform-screen .btn-amber {
  background: var(--amber);
  color: #4a2e00;
  border: none;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0;
  min-height: 52px;
  padding: 0.85rem 1.4rem;
  box-shadow: 0 1px 2px rgba(133, 83, 0, 0.18), 0 12px 26px rgba(245, 158, 11, 0.28);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}
.platform-screen .btn-amber:hover { filter: brightness(1.03); box-shadow: 0 1px 2px rgba(133, 83, 0, 0.2), 0 16px 32px rgba(245, 158, 11, 0.34); }
.platform-screen .btn-amber:active { transform: translateY(1px) scale(0.99); }

.platform-screen .btn-small {
  background: #ffffff;
  color: #1a1c1b;
  border: 1.5px solid var(--gold-dim);
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  box-shadow: 0 1px 2px rgba(26, 28, 27, 0.04);
}
.platform-screen .btn-small:hover { border-color: var(--accent); background: var(--accent-soft); }

/* ===== 4. Cards + surfaces: oversized radius, pure white, gentle cloud lift. ===== */
.platform-screen .xp-card,
.platform-screen .landing-door,
.platform-screen .org-card,
.platform-screen .org-game,
.platform-screen .account-game,
.platform-screen .sample-panel,
.platform-screen .quicknav-card {
  border-radius: 24px;
  background: #ffffff;
  border: 1px solid #efece6;
  box-shadow: 0 1px 3px rgba(26, 28, 27, 0.04), 0 16px 36px rgba(26, 28, 27, 0.07);
}
.platform-screen .landing-door:hover,
.platform-screen .account-game:hover:not([disabled]) {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(26, 28, 27, 0.06), 0 22px 44px rgba(245, 158, 11, 0.16);
}

/* The prominent player "door" becomes a warm amber hero. */
.platform-screen .landing-door-play {
  background: var(--accent-grad);
  color: #4a2e00;
  border: none;
  box-shadow: 0 2px 4px rgba(133, 83, 0, 0.2), 0 18px 40px rgba(245, 158, 11, 0.3);
}
.platform-screen .landing-door-play .landing-door-title { color: #3a2400; }
.platform-screen .landing-door-play .landing-door-note { color: #5a3a00; }
.platform-screen .landing-door-play::after { color: #5a3a00; }
.platform-screen .landing-door-continue { border-color: var(--accent); background: var(--accent-soft); }
.platform-screen .landing-door-continue .landing-door-title { color: var(--accent-strong); }
.platform-screen .landing-door-title,
.platform-screen .account-game-name { font-family: var(--font-head); color: var(--ink); font-weight: 700; }
.platform-screen .landing-door-note,
.platform-screen .account-game-sub { color: var(--muted); }

/* Marketing steps + role/step accents shift to amber. */
.platform-screen .marketing-step-num { background: var(--accent); color: #4a2e00; }
.platform-screen .marketing-headline { color: var(--ink); font-family: var(--font-head); }
.platform-screen .role-badge.role-owner,
.platform-screen .gw-step.active { background: var(--accent-strong); color: #fff; }
.platform-screen .sample-speaker,
.platform-screen .quicknav-section .menu-section-title,
.platform-screen .org-game-name { color: var(--accent-strong); }

/* Inputs: crisp white fields, generous radius, amber focus ring. */
.platform-screen .f-input,
.platform-screen input[type='text'],
.platform-screen input[type='password'],
.platform-screen input[type='email'],
.platform-screen input[type='number'],
.platform-screen input[type='search'],
.platform-screen select,
.platform-screen textarea {
  background: #ffffff;
  color: #1a1c1b;
  border: 1.5px solid var(--gold-dim);
  border-radius: 14px;
}
.platform-screen .f-input:focus,
.platform-screen input:focus,
.platform-screen select:focus,
.platform-screen textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

/* Clear amber focus rings on the platform's interactive surfaces. */
.platform-screen .landing-door:focus-visible,
.platform-screen .btn-amber:focus-visible,
.platform-screen .btn-small:focus-visible,
.platform-screen .xp-card-pick:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ===== 5. Storefront cards, Soft-Modernist. Cover art carries the title + place as
   an overlay (as in the mock); the white body holds the story blurb and one pill CTA. ===== */
.platform-screen .xp-grid { gap: 1.1rem; }
.platform-screen .xp-card { overflow: hidden; transition: transform 0.18s ease, box-shadow 0.18s ease; }
.platform-screen .xp-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 8px rgba(26, 28, 27, 0.07), 0 26px 50px rgba(26, 28, 27, 0.12);
}
.platform-screen .xp-card-cover {
  position: relative;
  height: 180px;
  display: flex;
  align-items: flex-end;
}
/* A soft dark scrim at the foot of the cover keeps the overlaid title readable. */
.platform-screen .xp-card-cover-scrim {
  width: 100%;
  padding: 0.9rem 1.1rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.16) 45%, rgba(0, 0, 0, 0.62) 100%);
}
.platform-screen .xp-card-cover-loc {
  margin: 0 0 0.15rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}
.platform-screen .xp-card-cover-name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
.platform-screen .xp-card-accent { height: 8px; }
/* Art-less packs (no generated cover yet) get a themed placeholder banner instead of a
   bare thin line: the pack accent colour with a soft depth gradient and a faint map-pin
   watermark, so every card reads as a proper cover with its name and place. */
.platform-screen .xp-card-cover-placeholder {
  background-image:
    radial-gradient(120% 90% at 85% 15%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 60%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.10), rgba(0, 0, 0, 0.28));
}
.platform-screen .xp-card-cover-placeholder::before {
  content: "📍";
  position: absolute;
  top: 12px; right: 14px;
  font-size: 1.4rem;
  opacity: 0.35;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}
.platform-screen .xp-card-body { padding: 1.1rem 1.2rem 1.25rem; gap: 0.6rem; }
.platform-screen .xp-card-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.platform-screen .xp-card-place { color: var(--accent-strong); opacity: 1; font-weight: 600; }
.platform-screen .xp-card-sub { color: var(--muted); font-style: normal; opacity: 1; }
.platform-screen .xp-card-desc { color: #3f3a33; opacity: 1; }

/* Chips + badges become soft, fully-rounded pills. */
.platform-screen .xp-card-meta > span,
.platform-screen .xp-badge,
.platform-screen .xp-theme-chip {
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.platform-screen .xp-card-meta { opacity: 1; }
.platform-screen .xp-card-meta > span { background: var(--accent-soft); color: var(--accent-strong); opacity: 1; }
.platform-screen .xp-badge-ages { background: #eef0ee; color: #4a4a44; border: none; }
.platform-screen .xp-badge-kid { background: #e3f4ec; color: #0b6b48; }
.platform-screen .xp-badge-adult { background: #fde7e9; color: #a81e2f; }
.platform-screen .xp-card-pick { border-radius: 999px; min-height: 52px; font-weight: 700; }

/* Filter + sort controls: pill toggles, amber when active. */
.platform-screen .xp-filter-btn {
  border-radius: 999px;
  border: 1.5px solid var(--gold-dim);
  background: #ffffff;
  color: #3f3a33;
  font-weight: 600;
}
.platform-screen .xp-filter-btn.on { background: var(--accent); color: #4a2e00; border-color: var(--accent); }
.platform-screen .xp-filter-label { color: var(--muted); }

/* ===== 6. Shared app header on platform surfaces: warm bar, Plus Jakarta wordmark. ===== */
#app:has(.platform-screen) .app-header {
  background: rgba(249, 249, 247, 0.86);
  backdrop-filter: saturate(1.1) blur(14px);
  -webkit-backdrop-filter: saturate(1.1) blur(14px);
  border-bottom: 1px solid #eceae4;
}
#app:has(.platform-screen) .app-header .app-title,
#app:has(.platform-screen) .app-header .brand {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #8a5a00;
}
.platform-screen .app-switcher,
.platform-screen .app-role-toggle { border-radius: 999px; font-family: 'Be Vietnam Pro', system-ui, sans-serif; }

@media (prefers-reduced-motion: reduce) {
  .platform-screen .xp-card,
  .platform-screen .landing-door,
  .platform-screen .btn-amber { transition: none !important; }
  .platform-screen .xp-card:hover,
  .platform-screen .landing-door:hover { transform: none !important; }
}
