/* ==========================================================================
   Quiet Protector · Field Skills: V8 White-Daylight Serious Duolingo PWA
   Palette: #FAF9F6 Ground · #FFFFFF Card · #E2E0D8 Border · #F3F1EA Inset
   #121712 Charcoal Ink · #2B3D24 Serious Olive · #8C6D2E Field Brass
   #1F7A38 Field Action Green · #B91C1C Alert Crimson
   Oswald (Compact Stencil Kickers) + Montserrat (Clean Sentence-Case UI)
   ========================================================================== */

:root {
  --bg: #FAF9F6;
  --card: #FFFFFF;
  --surface2: #F3F1EA;
  --line: #E2E0D8;
  --line-strong: #CCC8BC;

  --ink: #121712;
  --body: #2D352B;
  --muted: #5A6356;

  --olive: #2B3D24;
  --olive-mid: #3B5232;
  --olive-deep: #1D2A18;
  --olive-tint: #EEF3EB;
  --olive-border: #C5D3BE;

  --brass: #8C6D2E;
  --brass-deep: #6B511F;
  --brass-tint: #F7F3E6;
  --brass-border: #DFCFA8;

  --cta: #1F7A38;
  --cta-hv: #18622C;
  --cta-deep: #134D22;
  --cta-tint: #EAF6EE;
  --cta-border: #A8D8B7;

  --crimson: #B91C1C;
  --crimson-deep: #8A1313;
  --crimson-tint: #FEF2F2;
  --crimson-border: #FECACA;

  --amber: #B45309;
  --amber-tint: #FEF3C7;
  --amber-border: #FCD34D;

  --shadow-card: 0 8px 22px rgba(17, 22, 17, 0.055);
  --shadow-hover: 0 14px 30px rgba(17, 22, 17, 0.095);
  --shadow-pop: 0 20px 44px rgba(18, 23, 18, 0.14);

  --sidebar-w: 244px;
  --rail-w: 324px;
  --hud-h: 52px;
  --mobile-nav-h: 64px;

  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;

  --font-sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-stencil: "Oswald", "Arial Narrow", system-ui, -apple-system, sans-serif;
}

/* ==========================================================================
   Keyframes (60fps GPU-Composited, Reduced-Motion Safe)
   ========================================================================== */

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

@keyframes qpSlideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes qpPopIn {
  0% { opacity: 0; transform: scale(0.94) translateY(6px); }
  70% { opacity: 1; transform: scale(1.015) translateY(-1px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes qpPulseRing {
  0% { transform: scale(0.96); opacity: 0.7; }
  75% { transform: scale(1.24); opacity: 0; }
  100% { transform: scale(1.24); opacity: 0; }
}

@keyframes qpPinSonar {
  0% { transform: scale(1); opacity: 0.58; }
  75% { transform: scale(1.95); opacity: 0; }
  100% { transform: scale(1.95); opacity: 0; }
}

@keyframes qpDashFlow {
  from { stroke-dashoffset: 36; }
  to { stroke-dashoffset: 0; }
}

@keyframes qpSnapIn {
  0% { transform: scale(0.95); }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); }
}

@keyframes qpShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  45% { transform: translateX(6px); }
  70% { transform: translateX(-4px); }
  85% { transform: translateX(3px); }
}

@keyframes qpRingDrawFrom {
  from { stroke-dashoffset: 264; }
  to { stroke-dashoffset: 0; }
}

@keyframes qpCheckDrawFrom {
  from { stroke-dashoffset: 72; }
  to { stroke-dashoffset: 0; }
}

@keyframes qpFlamePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

@keyframes qpWaterDrop {
  0% { transform: translateY(-2px); opacity: 0; }
  25% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

@keyframes qpSpin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Base Reset & Typography
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg);
}

html,
body {
  margin: 0;
  padding: 0;
  background-color: var(--bg);
  color: var(--body);
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100vw;
}

body.is-modal-open {
  overflow: hidden;
}

img {
  max-width: 100%;
  display: block;
}

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

button,
input,
select,
textarea {
  font-family: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2.5px solid var(--cta);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.stencil-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-stencil);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--olive);
}

.stencil-kicker::before {
  content: "";
  width: 12px;
  height: 2px;
  background: var(--brass);
  flex-shrink: 0;
}

/* ==========================================================================
   Tactile 3D Daylight Buttons
   ========================================================================== */

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  border-bottom-width: 4px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 0.09s ease, border-bottom-width 0.09s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  user-select: none;
}

.btn:disabled {
  opacity: 0.44;
  cursor: not-allowed;
  transform: none !important;
  border-bottom-width: 4px !important;
}

.btn:active:not(:disabled) {
  transform: translateY(2px);
  border-bottom-width: 2px;
}

.btn-primary {
  background: var(--cta);
  color: #FFFFFF;
  border-color: var(--cta-hv);
  border-bottom-color: var(--cta-deep);
  box-shadow: 0 7px 18px rgba(31, 122, 56, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: var(--cta-hv);
  box-shadow: 0 10px 22px rgba(31, 122, 56, 0.28);
}

.btn-olive {
  background: var(--olive);
  color: #FFFFFF;
  border-color: var(--olive-mid);
  border-bottom-color: var(--olive-deep);
  box-shadow: 0 7px 18px rgba(43, 61, 36, 0.18);
}

.btn-olive:hover:not(:disabled) {
  background: var(--olive-mid);
}

.btn-danger {
  background: var(--crimson);
  color: #FFFFFF;
  border-color: var(--crimson-deep);
  border-bottom-color: #6B0E0E;
}

.btn-danger:hover:not(:disabled) {
  background: var(--crimson-deep);
}

.btn-secondary {
  background: var(--card);
  color: var(--ink);
  border-color: var(--line-strong);
  border-bottom-color: #B8B4A7;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--surface2);
  border-color: var(--olive-border);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
  border-bottom-width: 2px;
  padding: 8px 12px;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--surface2);
  color: var(--ink);
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12.5px;
  border-radius: 10px;
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   Pill Tags & Badges (Sentence Case by Default, Reserved Kicker Accent)
   ========================================================================== */

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 700;
  background: var(--surface2);
  color: var(--body);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.pill-tag--green {
  background: var(--cta-tint);
  color: var(--cta-deep);
  border-color: var(--cta-border);
}

.pill-tag--olive {
  background: var(--olive);
  color: #FFFFFF;
  border-color: var(--olive-deep);
}

.pill-tag--brass {
  background: var(--brass-tint);
  color: var(--brass-deep);
  border-color: var(--brass-border);
}

.pill-tag--amber {
  background: var(--amber-tint);
  color: var(--amber);
  border-color: var(--amber-border);
}

.pill-tag--red {
  background: var(--crimson-tint);
  color: var(--crimson);
  border-color: var(--crimson-border);
}

/* ==========================================================================
   Desktop 3-Column Daylight Console (>= 1060px)
   ========================================================================== */

.app-shell {
  min-height: 100vh;
  display: flex;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  background-color: var(--bg);
  background-image:
    radial-gradient(60% 45% at 52% 0%, rgba(43, 61, 36, 0.04) 0%, rgba(250, 249, 246, 0) 70%);
}

/* Left Sidebar */
.app-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 18px 14px 16px;
  z-index: 100;
  box-shadow: 4px 0 20px rgba(17, 22, 17, 0.025);
}

.nav-brand {
  padding: 2px 6px 14px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.nav-brand-link {
  display: flex;
  flex-direction: column;
  gap: 5px;
  text-decoration: none;
  color: var(--ink);
}

.brand-logo {
  height: 40px;
  width: auto;
  max-width: 176px;
  object-fit: contain;
  object-position: left center;
}

.brand-subtag {
  font-size: 11px;
  font-weight: 700;
  color: var(--brass);
  letter-spacing: 0.03em;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  text-align: left;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.nav-item:hover {
  background: var(--surface2);
  color: var(--ink);
}

.nav-item.is-active {
  background: var(--olive);
  border-color: var(--olive-deep);
  color: #FFFFFF;
  box-shadow: 0 5px 14px rgba(43, 61, 36, 0.16);
}

.nav-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.nav-item:hover .nav-ico {
  color: var(--olive);
}

.nav-item.is-active .nav-ico {
  color: #C7E3B8;
}

.nav-label-mobile {
  display: none;
}

.nav-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-profile-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 3px;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--olive);
  color: #FFFFFF;
  font-family: var(--font-stencil);
  font-weight: 700;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--olive-deep);
}

.nav-profile-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.nav-profile-meta strong {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-profile-meta span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brass);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Main Stage Grid */
.app-stage {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--rail-w);
  gap: 24px;
  max-width: 1160px;
  margin-right: auto;
  padding: 0 24px;
  align-items: start;
}

.member-root {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  padding: 16px 0 64px;
  min-width: 0;
}

.path-view {
  max-width: 660px;
  margin: 0 auto;
}

.loading-shell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 64px 20px;
  color: var(--muted);
  font-weight: 600;
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--cta);
  animation: qpSpin 0.8s linear infinite;
}

/* Member Access Gate Banner (Non-Local Unauthenticated) */
.member-gate-banner {
  background: var(--card);
  border: 1.5px solid var(--brass-border);
  border-left: 4px solid var(--brass);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.member-gate-banner h2 {
  margin: 0;
  font-size: 17px;
}

.member-gate-banner p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.member-gate-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.member-gate-form .field-input {
  flex: 1;
  min-width: 200px;
}

/* Right Rail */
.right-rail {
  width: var(--rail-w);
  position: sticky;
  top: 0;
  max-height: 100vh;
  overflow-y: auto;
  padding: 16px 2px 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

/* Top HUD (Clean: Streak + XP + Real Offline Status) */
.app-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: transparent;
  padding: 2px 0;
}

.hud-brand {
  display: none;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.hud-qp-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.hud-stats {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  flex-wrap: nowrap;
}

.hud-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 5px rgba(17, 22, 17, 0.035);
  transition: transform 0.12s ease, background-color 0.14s ease, border-color 0.14s ease;
}

button.hud-pill:hover {
  background: var(--surface2);
  border-color: var(--olive-border);
  transform: translateY(-1px);
}

.hud-pill--streak {
  color: var(--amber);
  border-color: var(--amber-border);
  background: var(--amber-tint);
}

.hud-pill--xp {
  color: var(--brass-deep);
  border-color: var(--brass-border);
  background: var(--brass-tint);
}

.hud-pill--offline {
  color: var(--muted);
  background: var(--surface2);
  border-color: var(--line);
  font-size: 11.5px;
  font-weight: 700;
  padding: 0 9px;
}

.hud-pill--offline.is-ready {
  color: var(--cta-deep);
  background: var(--cta-tint);
  border-color: var(--cta-border);
}

.hud-pill--offline .offline-ico-air {
  display: none;
}

.hud-pill--offline.is-offline {
  color: var(--olive);
  background: var(--brass-tint);
  border-color: var(--brass-border);
}

.hud-pill--offline.is-offline .offline-ico-online {
  display: none;
}

.hud-pill--offline.is-offline .offline-ico-air {
  display: inline-block;
}

/* Right Rail Cards (Progressive Disclosure) */
.rail-widgets {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rail-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px;
  box-shadow: var(--shadow-card);
}

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

.rail-card-head h2 {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.rail-link-btn {
  background: none;
  border: none;
  padding: 2px 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--cta);
}

.rail-link-btn:hover {
  color: var(--cta-deep);
  text-decoration: underline;
}

.quest-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-ico {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--olive-tint);
  border: 1px solid var(--olive-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--olive);
}

.quest-ico.is-done {
  background: var(--cta-tint);
  border-color: var(--cta-border);
  color: var(--cta);
}

.quest-body {
  flex: 1;
  min-width: 0;
}

.quest-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 5px;
}

.quest-num {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.quest-bar-track,
.rank-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.quest-bar-fill,
.rank-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--olive-mid), var(--cta));
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.quest-bar-fill.is-done {
  background: var(--cta);
}

.rank-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.rank-insignia-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--olive-tint);
  border: 1px solid var(--olive-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rank-badge-kicker {
  font-family: var(--font-stencil);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.rank-badge-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--ink);
}

.rank-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}

.league-mini-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 8px;
}

.league-mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--surface2);
  font-size: 12px;
  font-weight: 700;
  color: var(--body);
}

.league-mini-row.is-me {
  background: var(--cta-tint);
  color: var(--cta-deep);
  border: 1px solid var(--cta-border);
}

.week-flames-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.flame-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.flame-orb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--line);
  color: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.flame-orb.is-lit {
  background: var(--amber-tint);
  border-color: var(--amber-border);
  color: var(--amber);
  animation: qpFlamePulse 2.4s ease-in-out infinite;
}

.flame-day-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.flame-day-lbl.is-today {
  color: var(--olive);
  font-weight: 800;
}

/* ==========================================================================
   TAB 1: LESSONS: SLIM PROGRESS BAR, SVG DOMAIN CHIPS & DUOLINGO PATH
   First Path Node Above y=380 Desktop / y=300 Mobile!
   ========================================================================== */

.phase1-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 13px;
  margin-bottom: 10px;
  box-shadow: 0 3px 10px rgba(17, 22, 17, 0.035);
}

.phase1-banner-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
}

.phase1-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cta);
  box-shadow: 0 0 0 3px rgba(31, 122, 56, 0.18);
  flex-shrink: 0;
}

.phase1-bar-track {
  flex: 1;
  max-width: 180px;
  height: 7px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.phase1-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--olive-mid), var(--cta));
  transition: width 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Crisp SVG Icon Domain Selector Strip */
.world-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 10px;
}

.world-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 11px;
  border: 1.5px solid var(--line);
  background: var(--card);
  text-align: left;
  box-shadow: 0 2px 7px rgba(17, 22, 17, 0.03);
  transition: transform 0.13s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.world-chip:hover {
  transform: translateY(-1px);
  border-color: var(--olive-border);
}

.world-chip.is-active {
  background: var(--olive);
  border-color: var(--olive-deep);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(43, 61, 36, 0.18);
}

.world-chip-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--olive-tint);
  color: var(--olive);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.world-chip.is-active .world-chip-ico {
  background: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.world-chip-text {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.world-chip-name {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.world-chip.is-active .world-chip-name {
  color: #FFFFFF;
}

.world-chip-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.world-chip.is-active .world-chip-count {
  color: #C7E3B8;
}

/* Ultra-Compact Active Domain Header Strip (NO duplicate Launch button) */
.world-overview-card {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-card);
}

.world-overview-plate-wrap {
  width: 68px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
}

.world-overview-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.world-overview-body {
  min-width: 0;
  flex: 1;
}

.world-overview-title {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.world-overview-desc {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.38;
}

/* Serious Duolingo Stepping-Stone Medallion Winding Path */
.visual-path-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 10px 0 18px;
  margin-bottom: 20px;
}

.path-trail-svg {
  position: absolute;
  top: 32px;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: calc(100% - 64px);
  pointer-events: none;
  z-index: 0;
}

.path-trail-line {
  fill: none;
  stroke: var(--olive-border);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 8 10;
  animation: qpDashFlow 2.2s linear infinite;
}

.path-node-row {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 490px;
  transform: translateX(var(--curve-x, 0px));
  display: flex;
  justify-content: center;
}

.stone-node-btn {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: 22px;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-bottom: 4px solid var(--line-strong);
  text-align: left;
  box-shadow: var(--shadow-card);
  transition: transform 0.15s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.15s ease, border-color 0.15s ease;
}

.stone-node-btn:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--olive-border);
}

.stone-node-btn:active {
  transform: translateY(1px);
  border-bottom-width: 2px;
}

.stone-node-btn.is-current {
  border: 2px solid var(--cta);
  border-bottom: 5px solid var(--cta-deep);
  background: linear-gradient(135deg, #FFFFFF 0%, #F1FAF4 100%);
  box-shadow: 0 12px 28px rgba(31, 122, 56, 0.15);
}

.stone-node-btn.is-completed {
  border-color: var(--cta-border);
  border-bottom-color: var(--cta);
}

/* Circular 3D Duolingo Stepping-Stone Medallion */
.stone-medallion {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface2);
  border: 2.5px solid var(--line-strong);
  box-shadow: 0 5px 0 var(--line-strong);
  color: var(--olive);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.16s ease;
}

.stone-node-btn.is-current .stone-medallion {
  background: var(--cta);
  border-color: var(--cta-hv);
  box-shadow: 0 5px 0 var(--cta-deep);
  color: #FFFFFF;
}

.stone-node-btn.is-current .stone-medallion::before {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 2.5px solid rgba(31, 122, 56, 0.5);
  pointer-events: none;
  animation: qpPulseRing 2.1s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.stone-node-btn.is-completed .stone-medallion {
  background: var(--olive);
  border-color: var(--brass);
  box-shadow: 0 5px 0 var(--olive-deep);
  color: #FFFFFF;
}

.stone-step-num {
  font-family: var(--font-stencil);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.stone-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stone-kicker {
  font-family: var(--font-stencil);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.stone-node-btn.is-current .stone-kicker {
  color: var(--cta);
}

.stone-node-btn.is-completed .stone-kicker {
  color: var(--olive);
}

.stone-title {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.24;
}

.stone-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 2px;
}

.stone-meta {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.stone-thumb-mini {
  width: 66px;
  height: 50px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
  flex-shrink: 0;
}

.stone-thumb-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stone-cta-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 9px;
  background: var(--cta);
  color: #FFFFFF;
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  flex-shrink: 0;
}

.stone-node-btn:not(.is-current):not(.is-completed) .stone-cta-pill {
  background: var(--olive-tint);
  color: var(--olive);
  border: 1px solid var(--olive-border);
}

.stone-node-btn.is-completed .stone-cta-pill {
  background: var(--cta-tint);
  color: var(--cta-deep);
  border: 1px solid var(--cta-border);
}

/* Supply Checkpoint Node */
.cache-node-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--brass-tint);
  border: 1.5px solid var(--brass-border);
  border-bottom: 4px solid var(--brass);
  color: var(--brass-deep);
  font-size: 12.5px;
  font-weight: 800;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease;
}

.cache-node-btn:hover {
  transform: translateY(-2px);
}

.cache-node-btn.is-claimed {
  background: var(--cta-tint);
  border-color: var(--cta-border);
  border-bottom-color: var(--cta);
  color: var(--cta-deep);
}

.cache-node-btn.is-locked {
  background: var(--surface2);
  border-color: var(--line);
  border-bottom-color: var(--line-strong);
  color: var(--muted);
}

.cache-node-btn.is-shaking {
  animation: qpShake 0.4s ease;
}

/* Progressive Unlock Scheduled Procedures Grid */
.locked-section-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 15px;
  box-shadow: var(--shadow-card);
}

.locked-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.locked-section-head h3 {
  margin: 2px 0 0;
  font-size: 15px;
  color: var(--ink);
}

.locked-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.locked-skill-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px dashed var(--line-strong);
  background: var(--bg);
  text-align: left;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.locked-skill-tile:hover {
  border-color: var(--brass);
  background: var(--brass-tint);
}

.locked-tile-thumb {
  position: relative;
  width: 46px;
  height: 36px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.locked-tile-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(0.55) opacity(0.68);
}

.locked-tile-padlock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 23, 18, 0.35);
  color: #FFFFFF;
}

.locked-tile-meta {
  min-width: 0;
  flex: 1;
}

.locked-tile-num {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

.locked-tile-name {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--body);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   FULL-SCREEN 5-STAGE INTERACTIVE VISUAL LAB OVERLAY (#lessonOverlay)
   ========================================================================== */

.lesson-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lesson-top {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 11px 18px;
  flex-shrink: 0;
}

.lesson-top-inner {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
}

.lesson-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface2);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.14s ease;
}

.lesson-close-btn:hover {
  background: var(--line);
}

.lesson-progress-track {
  flex: 1;
  height: 11px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid var(--line);
  overflow: hidden;
}

.lesson-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--olive-mid), var(--cta));
  transition: width 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}

.lesson-stage-pill {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 800;
  color: var(--olive);
  background: var(--olive-tint);
  border: 1px solid var(--olive-border);
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.lesson-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px 26px;
}

.lesson-stage-wrap {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.lesson-stage-wrap.is-entering {
  animation: qpSlideUp 0.25s ease both;
}

.lesson-kicker-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.lesson-headline {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.2;
}

.lesson-caption {
  margin: 3px 0 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
}

/* Stage 1: Hero Plate + Accurate Pins + Always-Visible 1-2-3 Legend */
.plate-stage-frame {
  position: relative;
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: #F6F3EA;
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 3;
  max-height: 360px;
}

.plate-stage-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #F6F3EA;
}

.plate-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2.5px solid #FFFFFF;
  background: var(--olive);
  color: #FFFFFF;
  font-family: var(--font-stencil);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(18, 23, 18, 0.28);
  transition: transform 0.15s ease, background-color 0.15s ease;
  z-index: 4;
}

.plate-pin::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(31, 122, 56, 0.55);
  pointer-events: none;
  animation: qpPinSonar 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}

.plate-pin:hover,
.plate-pin.is-active {
  transform: translate(-50%, -50%) scale(1.16);
  background: var(--cta);
  z-index: 6;
}

.plate-legend-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.plate-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  border: 1.5px solid var(--line);
  background: var(--card);
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: var(--body);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.plate-legend-item:hover,
.plate-legend-item.is-active {
  border-color: var(--cta);
  background: var(--cta-tint);
  color: var(--cta-deep);
}

.plate-legend-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--olive);
  color: #FFFFFF;
  font-family: var(--font-stencil);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plate-legend-item.is-active .plate-legend-num {
  background: var(--cta);
}

/* Complete Gear Checklist (Zero Ellipsis Truncation) */
.gear-tiles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mat-chip-btn {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  border: 1.5px solid var(--line);
  border-bottom: 3px solid var(--line-strong);
  background: var(--card);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  line-height: 1.35;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.mat-chip-btn:hover {
  border-color: var(--olive-border);
  background: var(--surface2);
}

.mat-chip-btn.is-checked {
  background: var(--cta-tint);
  border-color: var(--cta);
  border-bottom-color: var(--cta-deep);
  color: var(--cta-deep);
  animation: qpSnapIn 0.24s ease;
}

.mat-chip-tick {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1.5px solid var(--line-strong);
  color: transparent;
  font-weight: 900;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.mat-chip-btn.is-checked .mat-chip-tick {
  background: var(--cta);
  border-color: var(--cta-deep);
  color: #FFFFFF;
}

/* ==========================================================================
   STAGE 2: PLATE-OVERLAID INTERACTIVE SIMULATOR (SAME MUSEUM ART + FAIL STATES)
   ========================================================================== */

.sim-stage-card {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  padding: 13px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.sim-plate-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 350px;
  border-radius: 13px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: #F6F3EA;
}

.sim-plate-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: #F6F3EA;
  user-select: none;
  pointer-events: none;
}

.sim-fx-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.sim-telemetry-chip {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 6;
  background: rgba(255, 255, 255, 0.94);
  border: 1.5px solid var(--line-strong);
  border-radius: 11px;
  padding: 6px 11px;
  box-shadow: 0 6px 16px rgba(18, 23, 18, 0.14);
  backdrop-filter: blur(4px);
  text-align: right;
  min-width: 112px;
}

.sim-telemetry-chip--bl {
  top: auto;
  right: auto;
  bottom: 10px;
  left: 10px;
  text-align: left;
}

.sim-telemetry-k {
  display: block;
  font-family: var(--font-stencil);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.sim-telemetry-v {
  display: block;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sim-telemetry-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

/* Interactive Plate Hotspots: Plain unmarked neutral rings when pending; ✓ + step badge ONLY AFTER done */
.sim-hotspot-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 5;
  min-width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 2.5px solid var(--olive);
  background: rgba(255, 255, 255, 0.94);
  color: var(--olive);
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  box-shadow: 0 4px 12px rgba(18, 23, 18, 0.24);
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.sim-hotspot-pin:hover {
  transform: translate(-50%, -50%) scale(1.12);
}

.sim-pin-dot {
  font-size: 16px;
  line-height: 1;
}

.sim-hotspot-pin.is-done {
  padding: 0 8px;
  border-color: #FFFFFF;
  background: var(--cta);
  color: #FFFFFF;
}

.sim-pin-check {
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.sim-pin-step-badge {
  font-family: var(--font-stencil);
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0 5px;
  line-height: 1.45;
}

.sim-hotspot-pin.is-wrong-flash {
  border-color: #FFFFFF;
  background: var(--crimson);
  color: #FFFFFF;
  animation: qpShake 0.36s ease;
}

/* LS-003 Live Interactive Tank Controls directly on the engraved plate */
.tank-ctrl-btn {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1.5px solid var(--olive);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  box-shadow: 0 5px 14px rgba(18, 23, 18, 0.22);
  backdrop-filter: blur(4px);
  white-space: nowrap;
  transition: transform 0.14s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.tank-ctrl-btn:hover {
  transform: translate(-50%, -50%) scale(1.06);
  border-color: var(--cta);
  background: #FFFFFF;
}

.tank-ctrl-btn.is-done {
  background: var(--cta);
  border-color: #FFFFFF;
  color: #FFFFFF;
  animation: qpSnapIn 0.24s ease;
}

.tank-ctrl-btn.is-wrong-flash {
  background: var(--crimson);
  border-color: #FFFFFF;
  color: #FFFFFF;
  animation: qpShake 0.36s ease;
}

.tank-ctrl-check {
  font-family: var(--font-stencil);
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 6px;
  padding: 1px 5px;
}

.tank-ctrl-name {
  font-weight: 800;
}

.tank-ctrl-state {
  font-family: var(--font-stencil);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 5px;
  border-radius: 5px;
  background: var(--surface2);
  color: var(--muted);
}

.tank-ctrl-btn.is-done .tank-ctrl-state,
.tank-ctrl-btn.is-wrong-flash .tank-ctrl-state {
  background: rgba(255, 255, 255, 0.2);
  color: #FFFFFF;
}

.tank-switch-track {
  position: relative;
  width: 22px;
  height: 12px;
  border-radius: 999px;
  background: #DC2626;
  flex-shrink: 0;
  transition: background-color 0.18s ease;
}

.tank-switch-track.is-off {
  background: #1F7A38;
}

.tank-switch-thumb {
  position: absolute;
  top: 1.5px;
  left: 11px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: left 0.18s ease;
}

.tank-switch-track.is-off .tank-switch-thumb {
  left: 1.5px;
}

.tank-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  flex-shrink: 0;
}

.tank-led.is-hot {
  background: #DC2626;
  box-shadow: 0 0 0 2.5px rgba(220, 38, 38, 0.22);
}

.tank-led.is-cool {
  background: #0284C7;
  box-shadow: 0 0 0 2.5px rgba(2, 132, 199, 0.22);
}

.tank-valve-bar {
  width: 12px;
  height: 4px;
  border-radius: 2px;
  background: var(--brass);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tank-valve-bar.is-shut {
  transform: rotate(90deg);
}

.tank-valve-bar.is-flow {
  background: #0284C7;
}

/* LS-001 Interactive Move-The-Part Tarp Pitch Angle Slider Panel */
.sim-pitch-panel {
  background: var(--bg);
  border: 1.5px solid var(--olive-border);
  border-radius: 14px;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sim-pitch-panel.is-locked {
  background: var(--cta-tint);
  border-color: var(--cta-border);
}

.sim-pitch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.sim-pitch-status {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}

.sim-pitch-status.is-ok {
  background: var(--cta-tint);
  border-color: var(--cta-border);
}

.sim-pitch-status.is-warn {
  background: var(--crimson-tint);
  border-color: var(--crimson-border);
}

.sim-pitch-body {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.sim-pitch-svg-wrap {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #FAF9F6;
}

.sim-pitch-svg {
  width: 100%;
  height: auto;
  display: block;
}

.sim-pitch-controls {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.sim-pitch-val-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.sim-pitch-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--body);
}

.sim-pitch-deg {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.sim-pitch-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(
    90deg,
    #FECACA 0%,
    #FECACA 18.6%,
    #FDE68A 18.6%,
    #FDE68A 28.6%,
    #86EFAC 28.6%,
    #86EFAC 47.1%,
    #FDE68A 47.1%,
    #FDE68A 55.7%,
    #FECACA 55.7%,
    #FECACA 100%
  );
  outline: none;
  cursor: pointer;
}

.sim-pitch-slider:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.sim-pitch-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--olive);
  border: 3px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(18, 23, 18, 0.32);
  cursor: pointer;
  transition: transform 0.12s ease;
}

.sim-pitch-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
}

.sim-pitch-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--olive);
  border: 3px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(18, 23, 18, 0.32);
  cursor: pointer;
}

.sim-pitch-scale {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--muted);
}

.sim-pitch-scale-ok {
  color: var(--cta-deep);
  font-weight: 800;
}

/* Subtle Muted Skip Link in Stage 2 Footer (P1-1) */
.lesson-footer-actions--sim-pending {
  justify-content: space-between;
  gap: 10px;
}

.sim-footer-hint {
  flex: 1;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.sim-skip-link {
  background: none;
  border: none;
  padding: 6px 4px;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: color 0.14s ease;
}

.sim-skip-link:hover {
  color: var(--ink);
}

.sim-prompt-line {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.sim-fail-callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--crimson-tint);
  border: 1.5px solid var(--crimson-border);
  border-left: 4px solid var(--crimson);
  color: var(--crimson-deep);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  animation: qpShake 0.36s ease;
}

.sim-ok-callout {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border-radius: 12px;
  background: var(--cta-tint);
  border: 1.5px solid var(--cta-border);
  color: var(--cta-deep);
  font-size: 13px;
  font-weight: 800;
  animation: qpPopIn 0.25s ease both;
}

/* Interactive Control Switch Deck (No redundant "STEP DONE" clutter) */
.sim-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sim-ctrl-btn,
.sim-trap-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  border-bottom: 3.5px solid #B5B0A2;
  background: var(--card);
  text-align: left;
  transition: transform 0.12s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.sim-ctrl-btn:hover:not(.is-done),
.sim-trap-btn:hover {
  border-color: var(--olive);
  background: var(--olive-tint);
}

.sim-ctrl-btn.is-done {
  background: var(--cta-tint);
  border-color: var(--cta);
  border-bottom-color: var(--cta-deep);
  color: var(--cta-deep);
  animation: qpSnapIn 0.24s ease;
}

.sim-ctrl-btn.is-wrong-flash,
.sim-trap-btn.is-wrong-flash {
  background: var(--crimson-tint);
  border-color: var(--crimson);
  border-bottom-color: var(--crimson-deep);
  color: var(--crimson-deep);
  animation: qpShake 0.36s ease;
}

.sim-ctrl-badge {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface2);
  border: 1px solid var(--line-strong);
  color: var(--olive);
  font-family: var(--font-stencil);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sim-ctrl-btn.is-done .sim-ctrl-badge {
  background: var(--cta);
  border-color: var(--cta-deep);
  color: #FFFFFF;
}

.sim-trap-btn.is-wrong-flash .sim-ctrl-badge,
.sim-ctrl-btn.is-wrong-flash .sim-ctrl-badge {
  background: var(--crimson);
  border-color: var(--crimson-deep);
  color: #FFFFFF;
}

.sim-ctrl-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.sim-ctrl-btn.is-done .sim-ctrl-label {
  color: var(--cta-deep);
}

/* ==========================================================================
   STAGE 3: REAL FIELD JUDGMENT SCENARIO CHECK
   ========================================================================== */

.lesson-instructor-row {
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 14px;
  box-shadow: var(--shadow-card);
}

.lesson-instructor-img {
  width: 66px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  flex-shrink: 0;
}

.lesson-instructor-meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lesson-advisor-tag {
  font-family: var(--font-stencil);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.quiz-question-title {
  margin: 0;
  font-size: 16.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.32;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.quiz-opt-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 13px;
  border: 1.5px solid var(--line);
  border-bottom: 4px solid var(--line-strong);
  background: var(--card);
  text-align: left;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
  transition: transform 0.12s ease, border-color 0.14s ease, background-color 0.14s ease;
}

.quiz-opt-btn:hover:not(:disabled) {
  border-color: var(--olive);
  background: var(--olive-tint);
}

.quiz-opt-btn.is-selected {
  border-color: var(--olive);
  border-bottom-color: var(--olive-deep);
  background: var(--olive-tint);
}

.quiz-opt-btn.is-right {
  border-color: var(--cta);
  border-bottom-color: var(--cta-deep);
  background: var(--cta-tint);
  color: var(--cta-deep);
}

.quiz-opt-btn.is-wrong {
  border-color: var(--crimson);
  border-bottom-color: var(--crimson-deep);
  background: var(--crimson-tint);
  color: var(--crimson);
  animation: qpShake 0.34s ease;
}

.quiz-opt-key {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--surface2);
  border: 1px solid var(--line-strong);
  font-family: var(--font-stencil);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   STAGE 4: TAP-TO-ORDER SEQUENCE BUILDER
   ========================================================================== */

.sequence-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sequence-slots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.sequence-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 2px dashed var(--line-strong);
  background: var(--surface2);
  text-align: left;
  transition: all 0.16s ease;
}

.sequence-slot.is-filled {
  border-style: solid;
  border-color: var(--olive);
  background: var(--card);
  box-shadow: var(--shadow-card);
  animation: qpSnapIn 0.22s ease;
}

.sequence-slot.is-right {
  border-style: solid;
  border-color: var(--cta);
  background: var(--cta-tint);
}

.sequence-slot.is-wrong {
  border-style: solid;
  border-color: var(--crimson);
  background: var(--crimson-tint);
}

.slot-num {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--olive);
  color: #FFFFFF;
  font-family: var(--font-stencil);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sequence-slot.is-right .slot-num { background: var(--cta); }
.sequence-slot.is-wrong .slot-num { background: var(--crimson); }

.slot-placeholder {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.slot-text strong {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.28;
}

.word-bank-label {
  font-family: var(--font-stencil);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass);
}

.word-bank-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.word-tile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--line-strong);
  border-bottom: 4px solid #B5B0A2;
  background: var(--card);
  text-align: left;
  transition: transform 0.13s ease, border-color 0.14s ease, opacity 0.16s ease;
}

.word-tile-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  border-color: var(--olive);
  background: var(--olive-tint);
}

.word-tile-btn.is-used {
  opacity: 0.34;
  transform: scale(0.97);
  border-bottom-width: 2px;
}

.word-tile-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--olive-tint);
  color: var(--olive);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.word-tile-btn strong {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.28;
}

/* ==========================================================================
   STAGE 5: HIGH-PAYOFF DEBRIEF (ALWAYS-VISIBLE CHECK + VERIFIED PLATE + NEXT)
   ========================================================================== */

.debrief-wrap {
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 13px;
  box-shadow: var(--shadow-card);
  animation: qpPopIn 0.32s ease both;
}

.debrief-ring-svg {
  width: 82px;
  height: 82px;
}

.debrief-ring-bg {
  fill: var(--brass-tint);
  stroke: var(--brass-border);
  stroke-width: 4;
}

/* Closed 360-degree gold ring with zero 11-o'clock gap in live or static captures (P1-6) */
.debrief-ring-arc {
  fill: none;
  stroke: var(--brass);
  stroke-width: 5.5;
  stroke-linecap: round;
  stroke-dasharray: 264;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: 48px 48px;
}

.debrief-check-path {
  fill: none;
  stroke: var(--cta);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 72;
  stroke-dashoffset: 0;
}

.debrief-plate-proof {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px;
  border-radius: 14px;
  background: var(--bg);
  border: 1.5px solid var(--cta-border);
  text-align: left;
}

.debrief-plate-proof.is-skipped {
  border-color: var(--brass-border);
}

.debrief-plate-thumb {
  position: relative;
  width: 118px;
  height: 88px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #F6F3EA;
  flex-shrink: 0;
}

.debrief-plate-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.debrief-verified-stamp {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--cta);
  color: #FFFFFF;
  font-family: var(--font-stencil);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 2px 8px rgba(19, 77, 34, 0.35);
}

.debrief-verified-stamp.is-skipped {
  right: 6px;
  background: #475569;
  font-size: 8.5px;
  letter-spacing: 0.06em;
  line-height: 1.2;
  padding: 3px 6px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(18, 23, 18, 0.25);
}

.debrief-capability {
  margin: 4px 0 0;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.38;
}

.debrief-stats {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.stat-tile {
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: 13px;
  padding: 11px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.stat-tile--xp { background: var(--cta-tint); border-color: var(--cta-border); }
.stat-tile--streak { background: var(--amber-tint); border-color: var(--amber-border); }
.stat-tile--acc { background: var(--brass-tint); border-color: var(--brass-border); }

.stat-tile-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}

.stat-tile-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.stat-tile--xp .stat-tile-val { color: var(--cta-deep); }

.stat-tile-flame {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--amber);
}

.stat-tile-sub {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--amber);
}

.debrief-next-card {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 14px;
  background: var(--olive-tint);
  border: 1.5px solid var(--olive-border);
  text-align: left;
}

.debrief-next-thumb {
  width: 64px;
  height: 48px;
  border-radius: 9px;
  object-fit: cover;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.debrief-actions {
  width: 100%;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 2px;
}

/* Lesson Footer Coaching Drawer */
.lesson-footer {
  background: var(--card);
  border-top: 1.5px solid var(--line);
  padding: 13px 18px calc(13px + env(safe-area-inset-bottom));
  flex-shrink: 0;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lesson-footer.is-correct {
  background: var(--cta-tint);
  border-top-color: var(--cta);
  animation: qpSlideUp 0.22s ease both;
}

.lesson-footer.is-wrong {
  background: var(--crimson-tint);
  border-top-color: var(--crimson);
  animation: qpSlideUp 0.22s ease both;
}

.lesson-footer-inner {
  max-width: 740px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lesson-footer-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.feedback-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.feedback-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--cta);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lesson-footer.is-wrong .feedback-icon-badge {
  background: var(--crimson);
}

.feedback-head {
  font-size: 14px;
  font-weight: 800;
  color: var(--cta-deep);
}

.lesson-footer.is-wrong .feedback-head {
  color: var(--crimson);
}

.feedback-explain {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--body);
}

/* ==========================================================================
   COMMON SECTION HEADERS, CARDS, CALLOUTS, MANUAL, DRILL, PROGRESS, GUIDES, ACCOUNT
   ========================================================================== */

.section-header {
  margin-bottom: 16px;
}

.section-title {
  margin: 4px 0 5px;
  font-size: 24px;
  font-weight: 800;
  color: var(--ink);
}

.section-sub {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
}

.surface-card,
.vault-module-card,
.drill-hero,
.league-hero {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
}

.callout-box {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.callout-box h3 {
  margin: 0 0 4px;
  font-size: 13.5px;
  color: var(--olive);
}

.callout-box p {
  margin: 0;
  font-size: 13px;
  color: var(--body);
}

.callout-box--amber {
  background: var(--amber-tint);
  border-color: var(--amber-border);
}

.callout-box--amber h3 { color: var(--amber); }

.callout-box--safety {
  background: var(--cta-tint);
  border-color: var(--cta-border);
}

.callout-box--safety h3 { color: var(--cta-deep); }

/* Practice Drill */
.drill-hero {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drill-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.drill-plate-img {
  width: 96px;
  height: 74px;
  border-radius: 12px;
  object-fit: cover;
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  flex-shrink: 0;
}

.drill-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.drill-metric-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  text-align: center;
}

.drill-metric-card strong {
  display: block;
  font-size: 20px;
  color: var(--ink);
}

.drill-metric-card span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
}

.drill-world-grid,
.chip-scroll-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.filter-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--body);
  font-size: 12px;
  font-weight: 700;
  transition: all 0.14s ease;
}

.filter-chip:hover {
  background: var(--surface2);
  border-color: var(--olive);
}

.filter-chip.is-active {
  background: var(--olive);
  border-color: var(--olive-deep);
  color: #FFFFFF;
}

/* Manual (200) */
.library-controls {
  display: flex;
  flex-direction: column;
  gap: 9px;
  margin-bottom: 13px;
}

.search-row {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-input-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input,
.field-input,
.select-control {
  width: 100%;
  height: 41px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1.5px solid var(--line-strong);
  background: var(--card);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
}

.search-input {
  padding-left: 36px;
}

.select-control {
  width: auto;
  min-width: 140px;
}

.results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 11px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted);
}

.skill-cards-grid,
.bonus-grid,
.vault-card-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.skill-card,
.bonus-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.skill-card:hover,
.bonus-card:hover {
  transform: translateY(-2px);
  border-color: var(--olive-border);
}

.skill-card.is-locked-card {
  background: #FCFBFA;
  border-style: dashed;
}

.skill-card-plate {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}

.skill-card-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.skill-card.is-locked-card .skill-card-plate img {
  filter: grayscale(0.45) opacity(0.75);
}

.skill-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.world-dot-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--olive);
}

.world-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.skill-card-title,
.bonus-card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.28;
}

.skill-card-desc,
.bonus-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.44;
  flex: 1;
}

.skill-card-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.bookmark-btn.is-saved {
  background: var(--brass-tint);
  border-color: var(--brass-border);
  color: var(--brass-deep);
}

/* Household Progress & Roster (Tab 4) */
.league-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.league-board {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  margin-bottom: 16px;
}

.league-row {
  display: grid;
  grid-template-columns: 32px 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
}

.league-row:last-child { border-bottom: none; }
.league-row.is-me { background: var(--cta-tint); }

.league-rank-num {
  font-family: var(--font-stencil);
  font-size: 14px;
  font-weight: 700;
  color: var(--olive);
}

.league-xp {
  font-size: 13px;
  font-weight: 800;
  color: var(--brass-deep);
  font-variant-numeric: tabular-nums;
}

.vault-section {
  margin-bottom: 24px;
}

.vault-section--hardware {
  padding-top: 20px;
  border-top: 1.5px solid var(--line);
}

.vault-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.vault-section-head h2 {
  margin: 0;
  font-size: 17.5px;
}

.vault-modules-stack,
.account-stack {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.vault-module-head,
.account-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.vault-module-head h3,
.account-card-head h2 {
  margin: 3px 0 2px;
  font-size: 16.5px;
}

.vault-module-head p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.disclaimer-banner {
  background: var(--brass-tint);
  border: 1px solid var(--brass-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--body);
  margin-bottom: 11px;
}

.badges-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.badge-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  opacity: 0.72;
}

.badge-tile.is-earned {
  opacity: 1;
  border-color: var(--cta-border);
  background: var(--cta-tint);
}

.badge-tile-ico {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--olive-tint);
  color: var(--olive);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.badge-tile.is-earned .badge-tile-ico {
  background: var(--cta);
  color: #FFFFFF;
}

.family-profiles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 11px;
}

.family-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.family-card.is-active-member {
  border-color: var(--cta);
  background: var(--cta-tint);
}

.family-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.family-form .field-input {
  flex: 1;
  min-width: 150px;
}

/* Optional Member Hardware Strip */
.hardware-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hardware-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 13px;
  box-shadow: var(--shadow-card);
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.hardware-card:hover {
  transform: translateY(-2px);
  border-color: var(--olive-border);
}

.hardware-thumb-wrap {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}

.hardware-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hardware-card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.25;
}

.hardware-card p {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.42;
  flex: 1;
}

/* Account */
.plan-details-grid,
.install-steps-grid,
.prefs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 11px;
}

.install-steps-grid,
.prefs-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-detail-item,
.install-os-box,
.order-row,
.plan-option-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
}

.plan-detail-item span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 2px;
}

.plan-detail-item strong {
  font-size: 13.5px;
  color: var(--ink);
}

.order-row,
.plan-option-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
}

.plan-option-card.is-selected {
  border-color: var(--cta);
  background: var(--cta-tint);
}

.account-actions-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.install-os-box h3 { margin: 0 0 5px; font-size: 13.5px; }
.install-os-box ol { margin: 0; padding-left: 18px; font-size: 12.5px; color: var(--body); }

.form-group label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 4px;
}

.sound-pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--bg);
  border: 1px solid var(--line);
  margin-bottom: 12px;
}

/* ==========================================================================
   MODALS & TOP-UNDER-HUD TOASTS (NEVER COVER BOTTOM BUTTONS)
   ========================================================================== */

.mem-modal-root {
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(18, 23, 18, 0.54);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.mem-modal-card {
  width: 100%;
  max-width: 540px;
  max-height: 86vh;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-pop);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: qpPopIn 0.22s ease both;
}

.mem-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.mem-modal-head h2 {
  margin: 0;
  font-size: 16.5px;
  color: var(--ink);
}

.mem-modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mem-modal-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.locked-modal-plate {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
}

.locked-modal-plate img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.locked-modal-ribbon {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 7px;
  background: rgba(43, 61, 36, 0.92);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
}

/* Toasts placed strictly at TOP under HUD, auto-hiding in 2000ms */
.toast-stack {
  position: fixed;
  top: calc(var(--hud-h) + 10px);
  right: 18px;
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-width: 330px;
  pointer-events: none;
}

.toast-item {
  background: var(--ink);
  color: #FFFFFF;
  padding: 9px 14px;
  border-radius: 11px;
  font-size: 12.5px;
  font-weight: 700;
  box-shadow: var(--shadow-pop);
  animation: qpSlideDown 0.2s ease both;
}

.toast-item--green { background: var(--cta); }
.toast-item--gold { background: var(--brass); }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (1440x900 Desktop & 390x844 Mobile: Zero Overflow!)
   ========================================================================== */

@media (max-width: 1059px) {
  .app-nav {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom));
    flex-direction: row;
    align-items: center;
    padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
    border-right: none;
    border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(17, 22, 17, 0.055);
  }

  .nav-brand,
  .nav-footer {
    display: none;
  }

  .nav-list {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    gap: 2px;
    width: 100%;
  }

  .nav-item {
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    border-radius: 10px;
    font-size: 10px;
    text-align: center;
  }

  .nav-label-desktop { display: none; }
  .nav-label-mobile { display: block; font-weight: 700; }

  .app-stage {
    margin-left: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
    padding: 0 0 calc(var(--mobile-nav-h) + env(safe-area-inset-bottom) + 12px);
  }

  .right-rail { display: contents; }

  .app-hud {
    order: -1;
    position: sticky;
    top: 0;
    z-index: 95;
    width: 100%;
    height: var(--hud-h);
    padding: 0 12px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
  }

  .hud-brand { display: inline-flex; }

  .hud-stats {
    width: auto;
    justify-content: flex-end;
    gap: 5px;
    flex-wrap: nowrap;
  }

  .member-root {
    order: 0;
    padding: 10px 12px 18px;
  }

  .rail-widgets {
    order: 1;
    padding: 0 12px 22px;
    max-width: 660px;
    width: 100%;
    margin: 0 auto;
  }

  .toast-stack {
    top: calc(var(--hud-h) + 8px);
    left: 12px;
    right: 12px;
    max-width: none;
  }
}

/* Mobile Compact Path Strip (<= 768px): Single Horizontal Scrollable Row! */
@media (max-width: 768px) {
  .phase1-banner {
    padding: 7px 11px;
    margin-bottom: 8px;
  }

  .phase1-banner-label {
    font-size: 12px;
  }

  .world-strip {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 7px;
    margin-bottom: 8px;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .world-strip::-webkit-scrollbar {
    display: none;
  }

  .world-chip {
    flex: 0 0 auto;
    padding: 6px 10px;
    gap: 6px;
  }

  .world-chip-ico {
    width: 24px;
    height: 24px;
  }

  .world-overview-card {
    padding: 9px 11px;
    gap: 10px;
    margin-bottom: 10px;
  }

  .world-overview-plate-wrap {
    width: 54px;
    height: 42px;
  }

  .world-overview-title {
    font-size: 15.5px;
  }

  .world-overview-desc {
    font-size: 11.5px;
  }

  .path-node-row {
    max-width: calc(100% - 22px);
    transform: translateX(calc(var(--curve-x, 0px) * 0.24));
  }

  .stone-node-btn {
    padding: 9px 11px 9px 9px;
    gap: 10px;
  }

  .stone-medallion {
    width: 54px;
    height: 54px;
  }

  .stone-thumb-mini {
    width: 54px;
    height: 42px;
  }

  .plate-legend-grid,
  .locked-preview-grid,
  .skill-cards-grid,
  .bonus-grid,
  .hardware-grid,
  .vault-card-list,
  .plan-details-grid,
  .install-steps-grid,
  .prefs-grid,
  .badges-grid,
  .family-profiles-grid,
  .gear-tiles-grid,
  .sequence-slots,
  .word-bank-grid,
  .sim-controls-grid,
  .sim-pitch-body {
    grid-template-columns: 1fr;
  }

  .debrief-plate-proof,
  .debrief-next-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .debrief-plate-thumb {
    width: 100%;
    height: 150px;
  }

  .league-hero,
  .drill-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 520px) {
  .hud-qp-logo { height: 24px; }
  .hud-unit { display: none; }
  .hud-pill { padding: 0 7px; font-size: 11.5px; height: 30px; }
  .lesson-headline { font-size: 18.5px; }
  .quiz-question-title { font-size: 15px; }
  .debrief-stats { gap: 7px; }
  .stat-tile-val { font-size: 17px; }
  .tank-ctrl-btn { padding: 3px 6px; font-size: 9.5px; gap: 3px; border-radius: 8px; }
  .tank-ctrl-state { display: none; }
  .sim-telemetry-chip { padding: 4px 8px; min-width: 92px; }
  .sim-telemetry-v { font-size: 13px; }
  .sim-telemetry-sub { font-size: 9.5px; }
  .sim-footer-hint { display: none; }
}

/* ==========================================================================
   DEDICATED 16PT LARGE-PRINT BLACK-ON-WHITE PRINTABLE FIELD CARD
   ========================================================================== */

.print-skill-sheet {
  display: none;
}

@media print {
  @page { margin: 0.6in; }

  body, html {
    background: white !important;
    color: black !important;
    overflow: visible !important;
  }

  body > *:not(#printSkillSheet) { display: none !important; }

  #printSkillSheet {
    display: block !important;
    color: black;
    background: white;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16pt;
    line-height: 1.5;
  }

  .print-doc-header {
    border-bottom: 2px solid black;
    padding-bottom: 10pt;
    margin-bottom: 16pt;
  }

  .print-doc-brand {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 11pt;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 4pt;
  }

  .print-doc-title {
    font-size: 22pt;
    line-height: 1.2;
    margin: 0 0 6pt;
    color: black;
  }

  .print-doc-meta {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 12pt;
    margin: 0;
  }

  .print-section { margin-bottom: 16pt; break-inside: avoid; }

  .print-section h2 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    font-size: 15pt;
    color: black;
    margin: 0 0 8pt;
    border-bottom: 1px solid black;
    padding-bottom: 3pt;
  }

  .print-checklist { list-style: none; padding: 0; margin: 0; }
  .print-checklist li { margin-bottom: 6pt; }
  .print-steps { padding-left: 22pt; margin: 0; }
  .print-steps li { margin-bottom: 10pt; }

  .print-safety {
    border: 1.5px solid black;
    padding: 10pt 12pt;
    margin-top: 14pt;
    font-size: 14pt;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
