/* Scenario selection page — parchment manuscript style */

/* ── Parchment body ── */
body:has(.scenario-header) {
  background:
    repeating-conic-gradient(
      rgba(120, 90, 50, 0.03) 0% 25%,
      transparent 0% 50%
    ) 0 0 / 4px 4px,
    radial-gradient(ellipse at 0% 0%, rgba(90, 60, 30, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 0%, rgba(100, 65, 25, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 0% 100%, rgba(95, 60, 30, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 100% 100%, rgba(90, 55, 25, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 40%, #efe3cd 0%, #e2d3b8 40%, #d4c4a4 80%);
  color: #3a2a14;
}
body:has(.scenario-header)::before { display: none; }

/* ── Nav overrides ── */
body:has(.scenario-header) .app-nav { border-bottom: 1px solid rgba(138, 115, 84, 0.3); }
body:has(.scenario-header) .app-nav-home { color: #7a6548; }
body:has(.scenario-header) .app-nav-home:hover { color: #3a2a14; }
body:has(.scenario-header) .app-nav-user { color: #7a6548; }
body:has(.scenario-header) .app-nav-tokens { color: #9a8568; }
body:has(.scenario-header) .app-nav-signout { border-color: #b5a382; color: #7a6548; }
body:has(.scenario-header) .app-nav-signout:hover { color: #3a2a14; border-color: #8a7354; }
body:has(.scenario-header) .app-nav-locale { border-color: #b5a382; color: #7a6548; }
body:has(.scenario-header) .app-nav-locale:hover { color: #3a2a14; border-color: #8a7354; }

/* ── Flash overrides ── */
body:has(.scenario-header) .flash-notice {
  background: rgba(106, 138, 120, 0.12);
  border-color: #8a7354;
  color: #3a2a14;
}
body:has(.scenario-header) .flash-alert {
  background: rgba(138, 64, 64, 0.1);
  border-color: #9a6040;
  color: #6a3020;
}

/* ── Header ── */
.scenario-header {
  padding: 2.5rem 1rem 1.5rem;
  border-bottom: none;
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}
.scenario-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    #a0895e 20%,
    #8a7354 50%,
    #a0895e 80%,
    transparent 100%
  );
  opacity: 0.5;
}
.scenario-header h1 {
  font-family: 'Cinzel', 'Palatino Linotype', serif;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: #3a2a14;
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(255, 245, 220, 0.5);
}
.scenario-header p {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  color: #7a6548;
  font-size: 0.88rem;
  margin-top: 0.5rem;
  letter-spacing: 0.04em;
}

/* ── Grid ── */
.scenario-grid {
  display: grid;
  gap: 1rem;
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
  animation: scnReveal 0.8s ease-out both;
}
.scenario-grid > turbo-frame {
  display: contents;
}

@keyframes scnReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Cards ── */
.scenario-card {
  border: 1px solid rgba(138, 115, 84, 0.3);
  padding: 1.5rem;
  background: rgba(239, 227, 205, 0.35);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.scenario-card:hover {
  background: rgba(239, 227, 205, 0.55);
  border-color: rgba(138, 115, 84, 0.5);
}
.scenario-card--loading {
  text-align: center;
  color: #8a7354;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.86rem;
}
.scenario-card h2 {
  font-family: 'Playfair Display', 'Palatino Linotype', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.01em;
  color: #3a2a14;
}
.scenario-card > p {
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  color: #7a6548;
  font-size: 0.86rem;
  line-height: 1.65;
  margin-bottom: 1.1rem;
}

/* ── Form row ── */
.scenario-form {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(138, 115, 84, 0.2);
}
.scenario-form label {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: #9a8568;
  text-transform: uppercase;
}
.scenario-form select {
  background: rgba(239, 227, 205, 0.5);
  color: #5a4a30;
  border: 1px solid rgba(138, 115, 84, 0.35);
  padding: 0.3rem 0.5rem;
  font-family: 'Lora', Georgia, serif;
  font-style: italic;
  font-size: 0.82rem;
}

/* ── Button overrides ── */
body:has(.scenario-header) .btn {
  border-color: #b5a382;
  color: #5a4a30;
  background: transparent;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding: 0.45rem 1rem;
  transition: all 0.3s ease;
}
body:has(.scenario-header) .btn:hover {
  background: rgba(138, 115, 84, 0.12);
  border-color: #8a7354;
  color: #3a2a14;
}
body:has(.scenario-header) .btn-primary {
  background: rgba(90, 74, 48, 0.1);
  border-color: #8a7354;
  color: #3a2a14;
}
body:has(.scenario-header) .btn-primary:hover {
  background: rgba(90, 74, 48, 0.2);
}
