/* howto.css — How to Play screen + start screen additions              */

/* ── Start screen: compact difficulty picker ───────────────────────── */

.start-difficulty {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  width: 100%;
}

.start-difficulty__option {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.start-difficulty__option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.start-difficulty__label {
  display: block;
  padding: var(--space-2) var(--space-4);
  border: 1px solid rgba(212,168,67,0.3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: rgba(255,255,255,0.6);
  background: rgba(0,0,0,0.25);
  transition: color var(--transition-fast), border-color var(--transition-fast),
              background var(--transition-fast);
  user-select: none;
  letter-spacing: 0.03em;
}

.start-difficulty__option input[type="radio"]:checked + .start-difficulty__label {
  color: var(--color-accent);
  border-color: var(--color-accent);
  background: rgba(212,168,67,0.12);
}

.start-difficulty__option:hover .start-difficulty__label {
  color: rgba(255,255,255,0.9);
  border-color: rgba(212,168,67,0.55);
}

#screen-howto {
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--color-bg);
}

/* ── Sticky header ──────────────────────────────────────────────────── */

.howto-header {
  position: sticky;
  top: 0;
  z-index: var(--z-card);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border);
  flex-shrink: 0;
}

.howto-header__back {
  flex-shrink: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.howto-header__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  color: var(--color-accent);
  flex: 1;
  text-align: center;
  margin-right: 52px; /* balance the back button */
}

/* ── Intro banner ───────────────────────────────────────────────────── */

.howto-intro {
  padding: var(--space-6) var(--space-4) var(--space-5);
  background: radial-gradient(ellipse at 50% 0%,
    rgba(26,70,26,0.65) 0%, transparent 70%);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.howto-intro__lead {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-text);
  line-height: 1.4;
  max-width: 300px;
  margin-inline: auto;
}

.howto-intro__sub {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 310px;
  margin-inline: auto;
  line-height: 1.5;
}

/* ── Section shell ──────────────────────────────────────────────────── */

.howto-section {
  padding: var(--space-5) var(--space-4) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.howto-section:last-child {
  border-bottom: none;
  padding-bottom: max(var(--space-8), calc(var(--space-4) + env(safe-area-inset-bottom)));
}

.howto-section__title {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}

.howto-section__lead {
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.55;
  margin-bottom: var(--space-3);
}

/* ── Explorer expertise grid ────────────────────────────────────────── */

.howto-expl-grid {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.howto-expl-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-3) var(--space-1);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
}

.howto-expl-item svg {
  width: 26px;
  height: 26px;
}

.howto-expl-item strong {
  font-size: var(--text-xs);
  color: var(--color-text);
  display: block;
}

.howto-expl-item span {
  font-size: 10px;
  color: var(--color-text-muted);
}

/* ── Callout boxes ──────────────────────────────────────────────────── */

.howto-callout {
  padding: var(--space-3);
  background: rgba(212,168,67,0.08);
  border: 1px solid rgba(212,168,67,0.22);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
  line-height: 1.55;
  margin-block: var(--space-3);
}

/* ── Day phases ─────────────────────────────────────────────────────── */

.howto-phases {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.howto-phase {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.howto-phase__icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 2px;
}

.howto-phase strong {
  display: block;
  font-size: var(--text-md);
  color: var(--color-text);
  margin-bottom: 3px;
}

.howto-phase p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── Numbered step list ─────────────────────────────────────────────── */

.howto-steps {
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.howto-steps li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--text-base);
  color: var(--color-text);
  line-height: 1.5;
  list-style: none;
}

.howto-steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-accent);
  color: var(--color-bg);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

/* ── Card type strip ────────────────────────────────────────────────── */

.howto-card-strip {
  display: flex;
  gap: var(--space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: var(--space-2);
  padding-inline: 2px;
  margin-block: var(--space-3);
}

.howto-card-strip::-webkit-scrollbar { display: none; }

.howto-card-item {
  flex: 0 0 160px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* Override path-card fixed size for the howto examples */
.howto-card-item .path-card {
  width: 160px !important;
  height: 224px !important;
}

.howto-card-caption {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* Coloured type badges */
.howto-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-right: 4px;
}

.howto-badge--event  { background: var(--color-event);  color: #2a1a0a; }
.howto-badge--choice { background: var(--color-choice); color: #fff; }
.howto-badge--option { background: var(--color-option); color: #fff; }

/* ── Icon reference guide ───────────────────────────────────────────── */

.howto-icon-guide {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-block: var(--space-3);
}

.howto-icon-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.howto-icon-row svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  margin-top: 2px;
}

.howto-icon-row strong {
  display: block;
  font-size: var(--text-base);
  color: var(--color-text);
  margin-bottom: 2px;
}

.howto-icon-row span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.45;
}

/* ── Evening placement options ──────────────────────────────────────── */

.howto-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-block: var(--space-3);
}

.howto-choice-block {
  padding: var(--space-3);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.howto-choice-block strong {
  display: block;
  color: var(--color-accent);
  margin-bottom: var(--space-1);
}

.howto-choice-block p {
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ── Win / Lose outcomes ────────────────────────────────────────────── */

.howto-outcomes {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.howto-outcome {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid;
}

.howto-outcome--win  {
  background: rgba(74,154,74,0.10);
  border-color: rgba(74,154,74,0.32);
}

.howto-outcome--lose {
  background: rgba(192,57,43,0.10);
  border-color: rgba(192,57,43,0.32);
}

.howto-outcome__icon { font-size: 24px; flex-shrink: 0; }

.howto-outcome strong {
  display: block;
  font-size: var(--text-md);
  color: var(--color-text);
  margin-bottom: 3px;
}

.howto-outcome p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ── Scoring formula ────────────────────────────────────────────────── */

.howto-formula {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3) var(--space-2);
  padding: var(--space-4);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  margin-block: var(--space-4);
}

.howto-formula__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-align: center;
}

.howto-formula__group svg {
  width: 22px;
  height: 22px;
}

.howto-formula__op {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.howto-formula__hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: center;
  font-style: italic;
  line-height: 1.5;
}

/* ── Bottom CTA ─────────────────────────────────────────────────────── */

.howto-cta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-5);
}

/* ── Start screen explorer cards ────────────────────────────────────── */

.start__team {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  width: 100%;
  margin-block: var(--space-4) var(--space-3);
}

.start-expl-card {
  position: relative;
  width: 108px;
  height: 151px; /* 5:7 */
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid rgba(212,168,67,0.5);
  box-shadow: 0 6px 20px rgba(0,0,0,0.6), 0 0 0 1px rgba(212,168,67,0.12);
  flex-shrink: 0;
  background: var(--color-bg-raised);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.start-expl-card:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 14px 30px rgba(0,0,0,0.65), 0 0 0 1px rgba(212,168,67,0.3);
}

.start-expl-card__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

/* Top gradient — badge readability */
.start-expl-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 42%;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

/* Bottom gradient — name readability */
.start-expl-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 48%;
  background: linear-gradient(0deg, rgba(0,0,0,0.78) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.start-expl-card__badge {
  position: absolute;
  top: var(--space-1);
  left: var(--space-1);
  z-index: 2;
  width: 22px;
  height: 22px;
  background: rgba(0,0,0,0.55);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
}

.start-expl-card__footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 0 var(--space-2) var(--space-2);
  text-align: center;
}

.start-expl-card__name {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0,0,0,1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.start-expl-card__role {
  font-size: 9px;
  color: rgba(255,255,255,0.7);
  text-shadow: 0 1px 3px rgba(0,0,0,0.9);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 1px;
}

/* Scale up on wider screens */
@media (min-width: 440px) {
  .start-expl-card { width: 132px; height: 185px; }
  .start-expl-card__badge { width: 26px; height: 26px; }
  .start-expl-card__name { font-size: 12px; }
  .start-expl-card__role { font-size: 10px; }
}

@media (min-width: 640px) {
  .start-expl-card { width: 160px; height: 224px; }
  .start-expl-card__name { font-size: 14px; }
  .start-expl-card__role { font-size: 11px; }
  .start-expl-card__badge { width: 30px; height: 30px; }
}

/* ── Hand carousel — cards sized to match 30%-larger-area path cards ── */
/* 175 × √1.3 ≈ 200px  →  hand base was 155px, same ratio → 212px wide */

.hand-carousel__item { flex: 0 0 212px !important; }
.hand-card-btn { height: 296px !important; }
.hand-carousel__track {
  padding-inline: calc(50% - 106px) !important;
  padding-bottom: var(--space-5) !important;
}

/* ── Tablet (640px+): all cards visible, 2-wide wrap grid ────────────── */

@media (min-width: 640px) {
  .modal {
    max-width: min(90vw, 720px) !important;
    max-height: 90vh !important;
  }
  .hand-carousel { overflow: visible !important; }
  .hand-carousel__track {
    flex-wrap: wrap !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
    padding-inline: var(--space-4) !important;
    justify-content: center !important;
  }
}

/* ── Laptop / wide tablet (820px+): expand to fit 3 cards per row ─────── */

@media (min-width: 820px) {
  .modal {
    max-width: min(92vw, 880px) !important;
  }
}


/* ── Final polish: full-width mission board ─────────────────────────── */
.expedition-track {
  position: relative !important;
  width: 100% !important;
  height: clamp(82px, 16.666vw, 190px) !important;
  min-height: 64px !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: #06101c !important;
  border-bottom: 1px solid rgba(0, 207, 255, 0.22) !important;
  transition: height 220ms ease !important;
}

.expedition-track--minimized {
  height: 18px !important;
  min-height: 18px !important;
  cursor: pointer;
}

.expedition-board,
.expedition-board__image,
.expedition-board__markers {
  position: absolute;
  inset: 0;
}

.expedition-board__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.expedition-board::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(6, 12, 20, 0.05), rgba(6, 12, 20, 0.16));
  pointer-events: none;
}

.expedition-board__dot {
  position: absolute;
  width: clamp(16px, 2.35vw, 31px);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(216, 238, 255, 0.14);
  border: 1px solid rgba(216, 238, 255, 0.28);
  box-shadow: inset 0 0 10px rgba(255,255,255,0.15);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.expedition-board__dot--passed,
.expedition-board__dot--current {
  background: radial-gradient(circle at 35% 30%, #d8f6ff 0 10%, #00cfff 42%, #0a6394 100%);
  border-color: rgba(216, 246, 255, 0.9);
  box-shadow: 0 0 18px rgba(0, 207, 255, 0.75), inset 0 0 9px rgba(255,255,255,0.35);
}

.expedition-board__dot--current {
  transform: translate(-50%, -50%) scale(1.08);
  animation: exp-board-pulse 1.6s ease-in-out infinite;
}

.expedition-board__toggle {
  position: absolute;
  top: max(6px, env(safe-area-inset-top));
  right: max(8px, env(safe-area-inset-right));
  z-index: 6;
  width: 34px;
  height: 30px;
  border: 1px solid rgba(216, 238, 255, 0.42);
  border-radius: 7px;
  background: rgba(4, 10, 20, 0.62);
  color: #d8eeff;
  display: grid;
  place-items: center;
  box-shadow: 0 0 14px rgba(0, 207, 255, 0.22);
}

.expedition-board__chevron {
  width: 11px;
  height: 11px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: translateY(3px) rotate(45deg);
}

.expedition-track--minimized .expedition-board__image,
.expedition-track--minimized .expedition-board__markers,
.expedition-track--minimized .expedition-board::after {
  opacity: 0;
}

.expedition-track--minimized .expedition-board {
  background: linear-gradient(90deg, #082236, #00cfff 18%, #f5c319 50%, #1b7fc4 82%, #082236);
  opacity: 0.88;
}

.expedition-track--minimized .expedition-board__toggle {
  top: 50%;
  transform: translateY(-50%);
  height: 16px;
  width: 32px;
  border-radius: 0 0 6px 6px;
}

.expedition-track--minimized .expedition-board__chevron {
  transform: translateY(-2px) rotate(225deg);
}

@keyframes exp-board-pulse {
  0%, 100% { box-shadow: 0 0 18px rgba(0, 207, 255, 0.75), inset 0 0 9px rgba(255,255,255,0.35); }
  50% { box-shadow: 0 0 28px rgba(0, 207, 255, 1), inset 0 0 14px rgba(255,255,255,0.55); }
}

/* ── Final polish: action-color card edges and artwork button ───────── */
.path-card--edged,
.hand-card-btn.path-card--edged {
  --edge-left: rgba(0, 207, 255, 0.2);
  --edge-right: rgba(0, 207, 255, 0.2);
  --edge-bottom-left: var(--edge-left);
  --edge-bottom-right: var(--edge-right);
  --edge-top: linear-gradient(90deg, var(--edge-left), var(--edge-right));
}

.path-card--types-event { --edge-left: var(--color-event); --edge-right: var(--color-event); --edge-bottom-left: var(--color-event); --edge-bottom-right: var(--color-event); --edge-top: linear-gradient(90deg, var(--color-event), var(--color-event)); }
.path-card--types-choice { --edge-left: var(--color-choice); --edge-right: var(--color-choice); --edge-bottom-left: var(--color-choice); --edge-bottom-right: var(--color-choice); --edge-top: linear-gradient(90deg, var(--color-choice), var(--color-choice)); }
.path-card--types-option { --edge-left: var(--color-option); --edge-right: var(--color-option); --edge-bottom-left: var(--color-option); --edge-bottom-right: var(--color-option); --edge-top: linear-gradient(90deg, var(--color-option), var(--color-option)); }
.path-card--types-event-choice { --edge-left: var(--color-event); --edge-right: var(--color-choice); --edge-bottom-left: var(--color-event); --edge-bottom-right: var(--color-choice); --edge-top: linear-gradient(90deg, var(--color-event) 0 50%, var(--color-choice) 50% 100%); }
.path-card--types-event-option { --edge-left: var(--color-event); --edge-right: var(--color-option); --edge-bottom-left: var(--color-event); --edge-bottom-right: var(--color-option); --edge-top: linear-gradient(90deg, var(--color-event) 0 50%, var(--color-option) 50% 100%); }
.path-card--types-choice-option { --edge-left: var(--color-choice); --edge-right: var(--color-option); --edge-bottom-left: var(--color-choice); --edge-bottom-right: var(--color-option); --edge-top: linear-gradient(90deg, var(--color-choice) 0 50%, var(--color-option) 50% 100%); }
.path-card--types-event-choice-option { --edge-left: var(--color-event); --edge-right: var(--color-option); --edge-bottom-left: var(--color-choice); --edge-bottom-right: var(--color-choice); --edge-top: linear-gradient(90deg, var(--color-event) 0 33.333%, var(--color-choice) 33.333% 66.666%, var(--color-option) 66.666% 100%); }

.path-card--types-choice-event { --edge-left: var(--color-choice); --edge-right: var(--color-event); --edge-bottom-left: var(--color-choice); --edge-bottom-right: var(--color-event); --edge-top: linear-gradient(90deg, var(--color-choice) 0 50%, var(--color-event) 50% 100%); }
.path-card--types-option-event { --edge-left: var(--color-option); --edge-right: var(--color-event); --edge-bottom-left: var(--color-option); --edge-bottom-right: var(--color-event); --edge-top: linear-gradient(90deg, var(--color-option) 0 50%, var(--color-event) 50% 100%); }
.path-card--types-option-choice { --edge-left: var(--color-option); --edge-right: var(--color-choice); --edge-bottom-left: var(--color-option); --edge-bottom-right: var(--color-choice); --edge-top: linear-gradient(90deg, var(--color-option) 0 50%, var(--color-choice) 50% 100%); }
.path-card--types-choice-event-option { --edge-left: var(--color-choice); --edge-right: var(--color-option); --edge-bottom-left: var(--color-event); --edge-bottom-right: var(--color-event); --edge-top: linear-gradient(90deg, var(--color-choice) 0 33.333%, var(--color-event) 33.333% 66.666%, var(--color-option) 66.666% 100%); }
.path-card--types-choice-option-event { --edge-left: var(--color-choice); --edge-right: var(--color-event); --edge-bottom-left: var(--color-option); --edge-bottom-right: var(--color-option); --edge-top: linear-gradient(90deg, var(--color-choice) 0 33.333%, var(--color-option) 33.333% 66.666%, var(--color-event) 66.666% 100%); }
.path-card--types-event-option-choice { --edge-left: var(--color-event); --edge-right: var(--color-choice); --edge-bottom-left: var(--color-option); --edge-bottom-right: var(--color-option); --edge-top: linear-gradient(90deg, var(--color-event) 0 33.333%, var(--color-option) 33.333% 66.666%, var(--color-choice) 66.666% 100%); }
.path-card--types-option-event-choice { --edge-left: var(--color-option); --edge-right: var(--color-choice); --edge-bottom-left: var(--color-event); --edge-bottom-right: var(--color-event); --edge-top: linear-gradient(90deg, var(--color-option) 0 33.333%, var(--color-event) 33.333% 66.666%, var(--color-choice) 66.666% 100%); }
.path-card--types-option-choice-event { --edge-left: var(--color-option); --edge-right: var(--color-event); --edge-bottom-left: var(--color-choice); --edge-bottom-right: var(--color-choice); --edge-top: linear-gradient(90deg, var(--color-option) 0 33.333%, var(--color-choice) 33.333% 66.666%, var(--color-event) 66.666% 100%); }

.path-card--edged::after,
.hand-card-btn.path-card--edged::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  border-radius: inherit;
  background:
    var(--edge-top) left top / 100% 3px no-repeat,
    linear-gradient(var(--edge-left), var(--edge-left)) left top / 3px 100% no-repeat,
    linear-gradient(var(--edge-right), var(--edge-right)) right top / 3px 100% no-repeat,
    linear-gradient(90deg, var(--edge-bottom-left) 0 50%, var(--edge-bottom-right) 50% 100%) left bottom / 100% 3px no-repeat;
}

.path-card__art-toggle {
  top: 8px !important;
  right: 8px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(245, 195, 25, 0.75) !important;
  background: rgba(4, 10, 20, 0.78) !important;
  color: var(--color-event) !important;
  box-shadow: 0 0 10px rgba(224, 120, 37, 0.28) !important;
}

.path-card__art-toggle:hover,
.path-card--art-only .path-card__art-toggle {
  color: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
}

.path-card__art-icon {
  width: 17px;
  height: 17px;
}

/* ── Final polish: readable/intuitive modal choices ─────────────────── */
.btn--choice {
  color: var(--color-text) !important;
  background: rgba(13, 24, 37, 0.96) !important;
  border-color: rgba(0, 207, 255, 0.26) !important;
  box-shadow: inset 3px 0 0 var(--color-choice);
}

.btn--choice strong {
  color: #ffffff;
  font-size: var(--text-base);
}

.btn--choice .effect-list,
.btn--choice .effect {
  color: var(--color-text) !important;
  font-size: var(--text-md);
}

.btn--choice:hover,
.btn--choice:focus-visible {
  border-color: var(--color-accent) !important;
  background: rgba(20, 32, 48, 0.98) !important;
}

.btn-view-table--primary,
.btn-view-table-action {
  text-decoration: none !important;
  color: var(--color-accent) !important;
  border: 1px solid rgba(0, 207, 255, 0.32) !important;
  background: rgba(0, 207, 255, 0.08) !important;
  border-radius: var(--radius-md) !important;
  padding: var(--space-2) var(--space-4) !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
}

.btn-view-table-action {
  margin-top: var(--space-2);
}

/* ── Final polish: crew cards in briefing ───────────────────────────── */
.howto-crew-grid {
  display: grid;
  gap: var(--space-3);
  margin-block: var(--space-3) var(--space-4);
}

.howto-crew-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.howto-crew-card .start-expl-card {
  width: 108px;
  height: 151px;
  margin: 0;
}

.howto-crew-card__copy strong,
.howto-crew-card__copy span {
  display: block;
}

.howto-crew-card__copy strong {
  color: var(--color-text);
  font-size: var(--text-md);
}

.howto-crew-card__copy span {
  color: var(--color-accent);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin-block: 2px var(--space-2);
}

.howto-crew-card__copy p {
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  line-height: 1.5;
  margin: 0;
}

@media (min-width: 760px) {
  .howto-crew-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .howto-crew-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .howto-crew-card .start-expl-card {
    justify-self: center;
  }
}


.start-expl-card__badge svg {
  width: 70%;
  height: 70%;
}


/* Grouped optional-effect picker */
.option-select-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-block: var(--space-2) var(--space-3);
}

.option-select-btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-3);
  text-align: left;
  color: var(--color-text);
  background: rgba(13, 24, 37, 0.92);
  border: 1px solid rgba(0, 207, 255, 0.2);
  border-radius: var(--radius-md);
  box-shadow: inset 3px 0 0 rgba(27, 127, 196, 0.5);
}

.option-select-btn::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid rgba(216, 238, 255, 0.5);
  background: rgba(4, 10, 20, 0.6);
}

.option-select-btn--selected {
  border-color: var(--color-accent);
  background: rgba(20, 32, 48, 0.98);
  box-shadow: inset 3px 0 0 var(--color-option), 0 0 16px rgba(0, 207, 255, 0.12);
}

.option-select-btn--selected::before {
  background: var(--color-accent);
  border-color: var(--color-accent);
  box-shadow: inset 0 0 0 4px rgba(4, 10, 20, 0.9);
}

.option-select-btn strong {
  color: #ffffff;
  font-size: var(--text-base);
}

.option-select-btn .effect-list {
  grid-column: 2;
  color: var(--color-text);
  font-size: var(--text-md);
}


/* ── Final player-area polish: earned expertise summary ─────────────── */
.btn-view-table--primary {
  margin-block-end: var(--space-5) !important;
}

.earned-expertise {
  flex: 1.4 1 160px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: flex-end;
}

.earned-expertise__label {
  flex: 0 0 auto;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.earned-expertise__chips {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
}

.earned-expertise__chips::-webkit-scrollbar {
  display: none;
}

.earned-expertise__empty {
  color: rgba(94, 128, 160, 0.62);
  font-size: var(--text-xs);
  font-style: italic;
  white-space: nowrap;
}

.earned-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-width: 34px;
  min-height: 28px;
  padding: 4px 6px;
  border: 1px solid rgba(0, 207, 255, 0.22);
  border-radius: var(--radius-md);
  background: rgba(4, 10, 20, 0.62);
  color: var(--color-text);
  box-shadow: inset 0 0 12px rgba(0, 207, 255, 0.04);
}

.earned-chip__icons {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 16px;
  line-height: 1;
}

.earned-chip__either {
  color: var(--color-text-muted);
  font-size: 8px;
  font-style: italic;
  line-height: 1;
}

@media (max-width: 520px) {
  .resource-bar {
    gap: var(--space-2) !important;
    padding-inline: var(--space-3) !important;
  }

  .resource {
    flex: 0 0 auto;
  }

  .earned-expertise {
    flex: 1 1 auto;
    gap: var(--space-1);
  }

  .earned-expertise__label {
    display: none;
  }
}


/* ── Final polish: earned label typography + unclipped hand-card edges ── */
.earned-expertise__label,
.earned-expertise__empty {
  font-size: var(--text-xs) !important;
  color: var(--color-text-muted) !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  font-style: normal !important;
  line-height: 1.2;
}

.hand-carousel {
  overflow: visible !important;
}

.hand-carousel__track {
  padding-top: 5px !important;
}

.hand-carousel__item {
  padding: 3px !important;
}

.hand-card-btn.path-card--edged {
  outline: 2px solid rgba(0, 207, 255, 0.12);
  outline-offset: -2px;
}

.hand-card-btn.path-card--has-event { outline-color: var(--color-event); }
.hand-card-btn.path-card--has-choice { outline-color: var(--color-choice); }
.hand-card-btn.path-card--has-option { outline-color: var(--color-option); }
.hand-card-btn.path-card--types-event-choice,
.hand-card-btn.path-card--types-event-option,
.hand-card-btn.path-card--types-choice-option,
.hand-card-btn.path-card--types-event-choice-option,
.hand-card-btn.path-card--types-choice-event,
.hand-card-btn.path-card--types-option-event,
.hand-card-btn.path-card--types-option-choice,
.hand-card-btn.path-card--types-choice-event-option,
.hand-card-btn.path-card--types-choice-option-event,
.hand-card-btn.path-card--types-event-option-choice,
.hand-card-btn.path-card--types-option-event-choice,
.hand-card-btn.path-card--types-option-choice-event {
  outline-color: rgba(0, 207, 255, 0.28);
}
