﻿/* ==========================================================================
   TABIFLOW LANDING v3 â€” Component Styles
   --------------------------------------------------------------------------
   File: styles/landing-v3.css
   Loads alongside styles.css. All selectors are scoped under tf-* prefix
   to avoid collision with planner styles. Touches no shared planner CSS.

   Default: Dark mode (.tf-mode-dark on body)
   Opt-in:  Light mode (.tf-mode-light on body)

   Day-color tokens are inherited from styles.css when present, otherwise
   fall back to the values defined here.
   ========================================================================== */


/* ==========================================================================
   1. TOKENS
   ========================================================================== */

.tf-landing {
  --tf-bg-page:        #0c0f17;
  --tf-bg-surface:     #141826;
  --tf-bg-elevated:    #21283c;
  --tf-text-primary:   #f4f3ee;
  --tf-text-secondary: #a8b0c0;
  --tf-text-muted:     #6b7388;
  --tf-border-soft:    #2a3148;

  --tf-day-1-pink:   #ec5e8a;
  --tf-day-2-gold:   #f5a623;
  --tf-day-3-teal:   #2bb8b8;
  --tf-day-4-blue:   #5e7fec;
  --tf-day-5-green:  #5eb87a;
  --tf-day-6-purple: #a25eec;

  --tf-primary:     #b9b6f0;
  --tf-primary-ink: #1a1730;
}

.tf-landing.tf-mode-light {
  --tf-bg-page:        #fafaf7;
  --tf-bg-surface:     #ffffff;
  --tf-bg-elevated:    #f0eee7;
  --tf-text-primary:   #1a1730;
  --tf-text-secondary: #4a4f5f;
  --tf-text-muted:     #8a8f9f;
  --tf-border-soft:    #d8d4c7;
  --tf-primary:        #1a1730;
  --tf-primary-ink:    #ffffff;
}


/* ==========================================================================
   2. BASE
   --------------------------------------------------------------------------
   Note on !important:
   The legacy `styles.css` applies a seasonal photo background to <body>
   for the deprecated "Photo mode." landing-v3 explicitly opts OUT of that
   visual treatment. Photo mode is gone â€” only Dark and Light remain.
   The override is intentional and tightly scoped to the landing surface.
   ========================================================================== */

body.tf-landing {
  background: var(--tf-bg-page) !important;
  background-image: none !important;
  background-color: var(--tf-bg-page) !important;
  color: var(--tf-text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  transition: background 0.2s, color 0.2s;
}

/* Defensive: legacy stylesheets sometimes attach background to html as well */
html:has(body.tf-landing) {
  background: var(--tf-bg-page);
}

/* Kill the legacy body::before seasonal photo + body::after radial gradients.
   These were the foundation of the deprecated "Photo mode." On v3 landing
   we own the background entirely via the body itself. */
body.tf-landing::before,
body.tf-landing::after {
  content: none !important;
  background: none !important;
  background-image: none !important;
  display: none !important;
}

.tf-landing * { box-sizing: border-box; }


/* ==========================================================================
   3. HEADER
   ========================================================================== */

.tf-site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  gap: 8px;
}

.tf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  flex: 1;
  min-width: 0;
}

.tf-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--tf-day-3-teal), #1a8c8c);
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #ffffff;
  font-weight: 600;
  flex-shrink: 0;
}

.tf-brand-text { display: flex; flex-direction: column; min-width: 0; }
.tf-brand-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.tf-brand-subtitle { font-size: 11px; color: var(--tf-text-secondary); margin-top: 1px; }

.tf-header-actions { display: flex; gap: 6px; flex-shrink: 0; }

.tf-icon-btn {
  background: none;
  border: 1px solid var(--tf-border-soft);
  color: var(--tf-text-primary);
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  transition: background 0.15s;
}
.tf-icon-btn:hover { background: var(--tf-bg-surface); }


/* ==========================================================================
   4. TAB NAV
   ========================================================================== */

.tf-tabs {
  display: flex;
  border-bottom: 1px solid var(--tf-border-soft);
  padding: 0 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tf-tab {
  background: none;
  border: none;
  color: var(--tf-text-secondary);
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

.tf-tab.is-active {
  color: var(--tf-text-primary);
  border-bottom-color: var(--tf-day-3-teal);
  font-weight: 600;
}

.tf-tab-panel { display: none; }
.tf-tab-panel.is-active { display: block; }


/* ==========================================================================
   5. HERO
   ========================================================================== */

.tf-hero {
  padding: 28px 22px 22px;
  text-align: center;
}

.tf-hero-mascot {
  width: 240px;
  height: 240px;
  margin: 0 auto 16px;
  background: transparent;
  border-radius: 24px;
  display: grid;
  place-items: center;
  overflow: visible;
}
/* Mascot now floats on whatever the page background is â€” no frame tint needed
   since BG-removed PNGs handle the framing themselves. */

.tf-hero-mascot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Fade the bottom 5% to transparent â€” kills the small cream/peach sliver
     that remove.bg keeps as "feet contact" on duo/scene images. */
  -webkit-mask-image: linear-gradient(to top, transparent 0%, black 5%, black 100%);
          mask-image: linear-gradient(to top, transparent 0%, black 5%, black 100%);
}

.tf-hero-title {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.tf-hero-subtitle {
  font-size: 15px;
  color: var(--tf-text-secondary);
  margin: 0 0 22px;
  line-height: 1.55;
}

.tf-hero-scope {
  margin-top: 12px;
  font-size: 12px;
  color: var(--tf-text-muted);
  letter-spacing: 0.02em;
}


/* ==========================================================================
   6. BUTTONS
   ========================================================================== */

.tf-btn {
  display: inline-block;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 20px;
  border-radius: 999px;
  text-decoration: none;
  text-align: center;
  border: none;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s;
}
.tf-btn:active { transform: scale(0.98); }

.tf-btn-primary {
  display: block;
  width: 100%;
  background: var(--tf-primary);
  color: var(--tf-primary-ink);
}

.tf-btn-secondary {
  background: transparent;
  color: var(--tf-day-3-teal);
  border: 1px solid var(--tf-day-3-teal);
  font-size: 13px;
  padding: 8px 16px;
}


/* ==========================================================================
   7. TRUST STRIP
   ========================================================================== */

.tf-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  justify-content: center;
  font-size: 11.5px;
  color: var(--tf-text-secondary);
  border-top: 1px dashed var(--tf-border-soft);
  border-bottom: 1px dashed var(--tf-border-soft);
  padding: 10px 18px;
  margin: 0 18px 24px;
}
.tf-trust-strip span { white-space: nowrap; }
.tf-trust-strip span + span::before {
  content: "-";
  color: var(--tf-text-muted);
  margin-right: 14px;
}


/* ==========================================================================
   8. CONTINUE TRIP CARD
   ========================================================================== */

.tf-continue-card {
  margin: 0 18px 28px;
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
}

.tf-continue-eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tf-day-3-teal);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.tf-continue-stat {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.tf-continue-saved {
  font-size: 12.5px;
  color: var(--tf-text-muted);
  margin-bottom: 4px;
}
.tf-continue-saved-detail {
  font-size: 11px;
  color: var(--tf-text-muted);
  opacity: 0.8;
  margin-bottom: 12px;
}

.tf-continue-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--tf-day-3-teal);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.tf-continue-dismiss {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: var(--tf-text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  line-height: 1;
}


/* ==========================================================================
   9. HOW TABIFLOW WORKS
   ========================================================================== */

.tf-how {
  padding: 8px 22px 30px;
}

.tf-how-eyebrow {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--tf-text-muted);
  text-transform: uppercase;
  margin-bottom: 18px;
}

.tf-how-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
}
.tf-how-step + .tf-how-step {
  border-top: 1px solid var(--tf-border-soft);
}

.tf-how-step.is-thesis {
  background: rgba(43,184,184,0.06);
  margin: 8px -22px 0;
  padding: 16px 22px 14px;
  border-top: 1px solid rgba(43,184,184,0.18);
  border-bottom: 1px solid rgba(43,184,184,0.18);
}

.tf-how-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #ffffff;
}
.tf-how-num-1 { background: var(--tf-day-1-pink); }
.tf-how-num-2 { background: var(--tf-day-2-gold); }
.tf-how-num-3 { background: var(--tf-day-3-teal); }

.tf-how-step-title { font-size: 15px; font-weight: 600; margin: 4px 0; }
.tf-how-step-title.is-thesis { font-size: 16px; }
.tf-how-step-sub { font-size: 13px; color: var(--tf-text-secondary); }
.tf-how-step-sub.is-thesis { color: var(--tf-text-primary); font-weight: 500; }


/* ==========================================================================
   10. JAPAN TAB
   ========================================================================== */

.tf-japan-now-card {
  margin: 22px 18px 18px;
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 14px;
  padding: 18px;
}

.tf-japan-now-kicker {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tf-day-3-teal);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
}

.tf-japan-now-city { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.tf-japan-now-context { font-size: 12.5px; color: var(--tf-text-muted); }


/* ==========================================================================
   11. SECTION EYEBROW (shared)
   ========================================================================== */

.tf-section-eyebrow {
  padding: 4px 22px 4px;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--tf-text-muted);
  text-transform: uppercase;
  margin-top: 8px;
  margin-bottom: 10px;
}


/* ==========================================================================
   12. AFFILIATE DISCLOSURE
   ========================================================================== */

.tf-affiliate-disc {
  font-size: 11px;
  color: var(--tf-text-muted);
  margin: 0 22px 14px;
  line-height: 1.5;
}


/* ==========================================================================
   13. TOOL CARDS (Travel Tools on Japan tab)
   ========================================================================== */

.tf-tool-list {
  display: grid;
  gap: 10px;
  padding: 0 18px 24px;
}

.tf-tool-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.tf-tool-card:hover { background: var(--tf-bg-elevated); }

.tf-ui-icon,
.tf-chip-icon,
.tf-tab-icon,
.tf-card-icon {
  display: block;
  object-fit: contain;
}

.tf-ui-icon {
  height: 30px;
  width: 30px;
}

.tf-tool-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--tf-bg-elevated);
  display: grid;
  place-items: center;
  color: var(--tf-day-3-teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.tf-tool-content { flex: 1; min-width: 0; }
.tf-tool-title { font-size: 14.5px; font-weight: 600; }
.tf-tool-sub { font-size: 12px; color: var(--tf-text-secondary); margin-top: 2px; line-height: 1.4; }
.tf-tool-note {
  color: var(--tf-text-muted);
  font-size: 11.5px;
  line-height: 1.45;
  margin-top: 5px;
}
.tf-tool-arrow {
  color: var(--tf-text-muted);
  font-size: 14px;
  font-weight: 800;
  max-width: 92px;
  text-align: right;
}

.tf-tool-badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  background: rgba(245,166,35,0.18);
  color: var(--tf-day-2-gold);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  margin-bottom: 4px;
  font-weight: 700;
}
.tf-mode-light .tf-tool-badge { color: #8a5a00; }


/* ==========================================================================
   14. V2.5 TRAVEL ESSENTIALS PREVIEW
   ========================================================================== */

.tf-v25-preview {
  margin: 0 18px 28px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    rgba(162,94,236,0.055);
  border: 1px dashed rgba(162,94,236,0.32);
  border-radius: 12px;
}

.tf-v25-head {
  margin-bottom: 14px;
}

.tf-coming-soon-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--tf-day-6-purple);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
}

.tf-v25-title {
  color: var(--tf-text-primary);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 4px;
}

.tf-v25-subtitle {
  color: var(--tf-text-secondary);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
}

.tf-v25-grid {
  display: grid;
  gap: 10px;
}

.tf-v25-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  padding: 12px;
}

.tf-mode-light .tf-v25-card {
  background: rgba(0,0,0,0.025);
  border-color: rgba(0,0,0,0.075);
}

.tf-v25-card-top {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tf-v25-card-title {
  color: var(--tf-text-primary);
  font-size: 13.5px;
  font-weight: 750;
  line-height: 1.25;
  margin: 0;
  min-width: 0;
}

.tf-v25-status {
  background: rgba(162,94,236,0.16);
  border: 1px solid rgba(162,94,236,0.26);
  border-radius: 999px;
  color: var(--tf-primary);
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  max-width: 48%;
  padding: 4px 8px;
  text-align: center;
}

.tf-mode-light .tf-v25-status {
  color: #6c42a1;
}

.tf-v25-card p {
  font-size: 12px;
  line-height: 1.5;
  margin: 0;
}

.tf-v25-card p + p {
  margin-top: 8px;
}

.tf-tool-control {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.tf-tool-control label {
  color: var(--tf-text-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tf-tool-control input,
.tf-tool-control select {
  background: var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 8px;
  color: var(--tf-text-primary);
  font: inherit;
  font-size: 13px;
  min-height: 38px;
  min-width: 0;
  padding: 8px 10px;
  width: 100%;
}

.tf-exchange-controls {
  display: grid;
  gap: 8px;
}

.tf-mini-action,
.tf-copy-btn,
.tf-official-link {
  align-items: center;
  background: rgba(43,184,184,0.12);
  border: 1px solid rgba(43,184,184,0.34);
  border-radius: 999px;
  color: var(--tf-text-primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  min-height: 32px;
  padding: 7px 10px;
  text-decoration: none;
}

.tf-result-box {
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  font-size: 12px;
  line-height: 1.5;
  margin: 10px 0;
  min-height: 44px;
  padding: 11px 12px;
}

.tf-mode-light .tf-result-box {
  background: rgba(0,0,0,0.025);
  border-color: rgba(0,0,0,0.075);
}

.tf-result-title {
  color: var(--tf-text-primary);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 6px;
}

.tf-result-grid {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tf-result-grid div {
  min-width: 0;
}

.tf-result-grid span,
.tf-result-meta,
.tf-source-line {
  color: var(--tf-text-muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.tf-result-grid span {
  display: block;
  margin-bottom: 2px;
}

.tf-result-grid strong {
  color: var(--tf-text-primary);
  display: block;
  font-size: 12.5px;
  line-height: 1.3;
}

.tf-source-line {
  margin-top: 8px;
}

.tf-compact-list {
  color: var(--tf-text-secondary);
  font-size: 12px;
  line-height: 1.45;
  margin: 8px 0 0;
  padding-left: 18px;
}

.tf-station-framing {
  margin-bottom: 10px;
}

.tf-station-grid {
  display: grid;
  gap: 10px;
  margin: 10px 0;
}

.tf-station-card {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 10px;
  display: grid;
  gap: 9px;
  min-width: 0;
  padding: 11px;
}

.tf-mode-light .tf-station-card {
  background: rgba(0,0,0,0.025);
  border-color: rgba(0,0,0,0.075);
}

.tf-station-top {
  align-items: flex-start;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.tf-station-top h4 {
  color: var(--tf-text-primary);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  margin: 0 0 3px;
}

.tf-station-top p,
.tf-station-card p {
  color: var(--tf-text-secondary);
  font-size: 11.5px;
  line-height: 1.45;
  margin: 0;
}

.tf-station-top span {
  background: rgba(43,184,184,0.12);
  border: 1px solid rgba(43,184,184,0.32);
  border-radius: 999px;
  color: var(--tf-day-3-teal);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  max-width: 42%;
  padding: 4px 7px;
  text-align: center;
}

.tf-station-card a {
  color: var(--tf-text-primary);
  font-size: 11.5px;
  font-weight: 800;
  text-decoration-color: rgba(43,184,184,0.55);
  text-underline-offset: 3px;
  width: fit-content;
}

.tf-v25-note {
  color: var(--tf-text-muted);
}

.tf-v25-number-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
}

.tf-v25-number-list div {
  align-items: center;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-width: 0;
  padding: 7px 9px;
}

.tf-mode-light .tf-v25-number-list div {
  background: rgba(0,0,0,0.025);
  border-color: rgba(0,0,0,0.065);
}

.tf-v25-number-list dt,
.tf-v25-number-list dd {
  font-size: 11.5px;
  line-height: 1.25;
  margin: 0;
}

.tf-v25-number-list dt {
  color: var(--tf-text-secondary);
  min-width: 0;
}

.tf-v25-number-list dd {
  align-items: center;
  color: var(--tf-text-primary);
  display: flex;
  flex-wrap: wrap;
  flex: 0 0 auto;
  gap: 6px;
  font-weight: 800;
  justify-content: flex-end;
  min-width: 0;
  text-align: right;
}

.tf-v25-number-list a {
  color: var(--tf-text-primary);
  text-decoration: none;
}

.tf-copy-btn {
  min-height: 28px;
  padding: 5px 8px;
}

.tf-copy-status {
  color: var(--tf-day-3-teal);
  font-size: 11.5px;
  min-height: 18px;
  margin-top: 8px;
}

.tf-say-helper {
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.065);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
  padding: 10px;
}

.tf-say-helper strong {
  color: var(--tf-text-primary);
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.tf-say-list {
  display: grid;
  gap: 8px;
}

.tf-say-list div {
  display: grid;
  gap: 2px;
}

.tf-say-list strong {
  margin: 0;
}

.tf-say-list span {
  color: var(--tf-text-muted);
  font-size: 11.5px;
}

.tf-say-list em {
  color: var(--tf-text-secondary);
  font-size: 11.5px;
  font-style: normal;
}

@media (min-width: 720px) {
  .tf-station-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.tf-vjw-list {
  display: grid;
  gap: 7px;
  margin-top: 10px;
}

.tf-vjw-list label {
  align-items: flex-start;
  color: var(--tf-text-secondary);
  display: grid;
  font-size: 12px;
  gap: 8px;
  grid-template-columns: 16px 1fr;
  line-height: 1.4;
}

.tf-vjw-list input {
  accent-color: var(--tf-day-3-teal);
  height: 15px;
  margin: 2px 0 0;
  width: 15px;
}

.tf-v25-disclaimer {
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  font-size: 11.5px;
  line-height: 1.55;
  margin: 12px 0 0;
  padding: 11px 12px;
}

.tf-mode-light .tf-v25-disclaimer {
  background: rgba(255,255,255,0.68);
  border-color: rgba(0,0,0,0.075);
}

.tf-essentials-pager {
  min-width: 0;
  overflow: hidden;
}

.tf-essentials-nav {
  display: flex;
  gap: 7px;
  margin: 0 0 12px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.tf-essentials-nav-chip,
.tf-essentials-page-btn {
  align-items: center;
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--tf-border-soft);
  border-radius: 999px;
  color: var(--tf-text-secondary);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  min-height: 32px;
  padding: 7px 10px;
  white-space: nowrap;
}

.tf-essentials-nav-chip.is-active {
  background: rgba(43,184,184,0.13);
  border-color: rgba(43,184,184,0.44);
  color: var(--tf-text-primary);
}

.tf-essentials-track {
  display: block;
  margin: 0;
  min-width: 0;
  overflow: visible;
  padding: 0;
}

.tf-essentials-panel {
  display: none;
  min-width: 0;
}

.tf-essentials-panel.is-active {
  display: block;
}

.tf-essentials-pager-controls {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}

.tf-essentials-page-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

.tf-essentials-page-count {
  color: var(--tf-text-muted);
  flex: 0 0 auto;
  font-size: 11.5px;
  font-weight: 800;
}

.tf-checklist {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  margin-top: 0;
  padding: 14px;
}

.tf-checklist-head {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.tf-checklist-title {
  color: var(--tf-text-primary);
  font-size: 17px;
  font-weight: 750;
  line-height: 1.25;
  margin: 0 0 4px;
}

.tf-checklist-subtitle {
  color: var(--tf-text-secondary);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
}

.tf-checklist-progress {
  align-self: start;
  background: rgba(43,184,184,0.12);
  border: 1px solid rgba(43,184,184,0.3);
  border-radius: 999px;
  color: var(--tf-text-primary);
  font-size: 11.5px;
  font-weight: 800;
  justify-self: start;
  line-height: 1.25;
  padding: 6px 10px;
  white-space: nowrap;
}

.tf-checklist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 12px;
}

.tf-checklist-filter,
.tf-checklist-reset,
.tf-checklist-confirm button {
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1.2;
  min-height: 32px;
  padding: 7px 10px;
}

.tf-checklist-filter {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--tf-border-soft);
  color: var(--tf-text-secondary);
}

.tf-checklist-filter.is-active {
  background: rgba(43,184,184,0.13);
  border-color: rgba(43,184,184,0.44);
  color: var(--tf-text-primary);
}

.tf-checklist-groups {
  display: grid;
  gap: 8px;
}

.tf-checklist-group {
  background: var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  overflow: hidden;
}

.tf-checklist-group summary {
  color: var(--tf-text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  list-style-position: inside;
  padding: 11px 12px;
}

.tf-checklist-items {
  border-top: 1px solid var(--tf-border-soft);
  display: grid;
  gap: 0;
  padding: 4px 0;
}

.tf-checklist-item {
  align-items: flex-start;
  color: var(--tf-text-secondary);
  cursor: pointer;
  display: grid;
  font-size: 12.5px;
  gap: 9px;
  grid-template-columns: 18px 1fr;
  line-height: 1.4;
  min-width: 0;
  padding: 8px 12px;
}

.tf-checklist-item:hover {
  background: rgba(255,255,255,0.035);
}

.tf-checklist-item input {
  accent-color: var(--tf-day-3-teal);
  height: 16px;
  margin: 1px 0 0;
  width: 16px;
}

.tf-checklist-item span {
  min-width: 0;
}

.tf-checklist-item.is-done span {
  color: var(--tf-text-muted);
  text-decoration: line-through;
}

.tf-checklist-empty,
.tf-checklist-callout,
.tf-checklist-weather-note {
  border-radius: 10px;
  color: var(--tf-text-secondary);
  font-size: 11.5px;
  line-height: 1.55;
  margin-top: 10px;
  padding: 11px 12px;
}

.tf-checklist-empty {
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--tf-border-soft);
}

.tf-checklist-callout {
  background: rgba(43,184,184,0.08);
  border: 1px solid rgba(43,184,184,0.22);
}

.tf-checklist-weather-note {
  background: rgba(245,166,35,0.08);
  border: 1px solid rgba(245,166,35,0.22);
}

.tf-checklist-weather-note p {
  margin: 0;
}

.tf-checklist-weather-note p + p {
  margin-top: 7px;
}

.tf-checklist-reset-row {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}

.tf-checklist-reset {
  background: transparent;
  border: 1px solid var(--tf-border-soft);
  color: var(--tf-text-secondary);
}

.tf-checklist-confirm {
  align-items: center;
  background: rgba(236,94,138,0.08);
  border: 1px solid rgba(236,94,138,0.22);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  display: flex;
  flex-wrap: wrap;
  font-size: 11.5px;
  gap: 7px;
  line-height: 1.35;
  padding: 7px;
}

.tf-checklist-confirm button {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  color: var(--tf-text-primary);
}


/* ==========================================================================
   15. LEARN TAB
   ========================================================================== */

.tf-learn-section { padding: 22px 18px 28px; }
.tf-learn-heading { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.tf-learn-sub { font-size: 13px; color: var(--tf-text-secondary); margin: 0 0 18px; line-height: 1.5; }

.tf-learn-subtabs {
  display: flex;
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 22px;
  gap: 4px;
}

.tf-learn-subtab {
  align-items: center;
  flex: 1;
  background: none;
  border: none;
  color: var(--tf-text-secondary);
  padding: 10px 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  gap: 7px;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.tf-tab-icon {
  height: 22px;
  width: 22px;
}

.tf-learn-subtab.is-active {
  background: var(--tf-primary);
  color: var(--tf-primary-ink);
  font-weight: 600;
}

/* Horizontal slide viewport â€” no scroll-of-doom on mobile */
.tf-learn-subviewport {
  overflow: hidden;
  position: relative;
}
.tf-learn-subtrack {
  display: flex;
  width: 300%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.tf-learn-subpanel {
  width: 33.3333%;
  flex-shrink: 0;
  padding: 0 2px;
}

.tf-learn-categories-eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tf-text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
}

.tf-learn-level-controls {
  margin-bottom: 14px;
}

.tf-learn-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.tf-learn-filter-row-scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.tf-learn-filter-chip {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 999px;
  color: var(--tf-text-secondary);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 36px;
  padding: 8px 12px;
}

.tf-learn-filter-chip.is-active {
  background: rgba(43,184,184,0.12);
  border-color: rgba(43,184,184,0.44);
  color: var(--tf-text-primary);
}

.tf-phrase-category-row {
  margin-bottom: 14px;
}

.tf-phrase-category-chip {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  max-width: 230px;
}

.tf-phrase-category-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tf-essentials-nav-chip {
  display: inline-flex;
  gap: 6px;
}

.tf-chip-icon {
  height: 20px;
  width: 20px;
}

.tf-phrase-category-chip small {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--tf-border-soft);
  border-radius: 999px;
  color: var(--tf-text-muted);
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  min-width: 22px;
  padding: 4px 6px;
  text-align: center;
}

.tf-phrase-category-chip.is-active small {
  color: var(--tf-text-primary);
}

.tf-learn-filter-summary {
  color: var(--tf-text-secondary);
  font-size: 12.5px;
  line-height: 1.45;
}

.tf-category-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}

.tf-category-card {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  padding: 14px 12px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: transform 0.1s, background 0.15s;
}
.tf-category-card:hover { background: var(--tf-bg-elevated); }
.tf-category-card:active { transform: scale(0.98); }
.tf-category-card.is-active { box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }

.tf-category-emoji { font-size: 22px; margin-bottom: 6px; }
.tf-category-name { font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.tf-category-count { font-size: 11.5px; color: var(--tf-text-muted); }

.tf-cat-d1 { background: rgba(236,94,138,0.06); border-color: rgba(236,94,138,0.34); }
.tf-cat-d2 { background: rgba(245,166,35,0.06); border-color: rgba(245,166,35,0.34); }
.tf-cat-d3 { background: rgba(43,184,184,0.06); border-color: rgba(43,184,184,0.34); }
.tf-cat-d4 { background: rgba(94,127,236,0.06); border-color: rgba(94,127,236,0.34); }
.tf-cat-d5 { background: rgba(94,184,122,0.06); border-color: rgba(94,184,122,0.34); }
.tf-cat-d6 { background: rgba(162,94,236,0.06); border-color: rgba(162,94,236,0.34); }

.tf-sample-phrase {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  padding: 16px;
}

.tf-sample-eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--tf-day-2-gold);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.tf-mode-light .tf-sample-eyebrow { color: #b87a00; }

.tf-sample-ja { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.tf-sample-romaji { font-size: 13px; color: var(--tf-text-muted); font-style: italic; margin-bottom: 6px; }
.tf-sample-en { font-size: 13px; color: var(--tf-text-secondary); }
.tf-audio-icon { color: var(--tf-day-2-gold); font-size: 14px; }

.tf-sample-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.tf-sample-counter {
  color: var(--tf-text-muted);
  font-size: 11.5px;
  font-weight: 700;
}

.tf-sample-nav {
  display: inline-flex;
  gap: 8px;
}

.tf-sample-nav-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--tf-border-soft);
  border-radius: 999px;
  color: var(--tf-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  min-height: 32px;
  padding: 6px 11px;
}

.tf-sample-nav-btn:focus-visible {
  outline: 2px solid rgba(43,184,184,0.7);
  outline-offset: 2px;
}

.tf-sample-audio-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.tf-audio-btn {
  align-items: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--tf-border-soft);
  border-radius: 999px;
  color: var(--tf-text-primary);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  min-height: 34px;
  padding: 7px 12px;
}

.tf-audio-btn:hover {
  background: rgba(255,255,255,0.07);
}

.tf-audio-btn:focus-visible {
  outline: 2px solid rgba(43,184,184,0.7);
  outline-offset: 2px;
}

.tf-audio-btn-icon {
  color: var(--tf-day-2-gold);
  display: block;
  font-size: 13px;
  flex: 0 0 auto;
  height: 14px;
  line-height: 1;
  width: 14px;
}

.tf-audio-status {
  color: var(--tf-text-muted);
  font-size: 11.5px;
  line-height: 1.45;
  min-height: 1.45em;
}

.tf-road-sign-audio-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.tf-road-sign-audio-btn {
  font-size: 11px;
  min-height: 30px;
  padding: 5px 9px;
}

.tf-road-sign-audio-btn .tf-audio-btn-icon {
  height: 13px;
  width: 13px;
}

.tf-road-sign-audio-status {
  flex: 1 1 120px;
  min-width: 0;
}

/* Road signs */
.tf-sign-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
.tf-sign-tile {
  background: var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 72px 1fr;
  min-width: 0;
  overflow: hidden;
  padding: 10px;
}

.tf-sign-grid.is-all-signs .tf-sign-tile {
  grid-template-columns: 68px 1fr;
}

.tf-sign-image-wrap {
  align-items: center;
  aspect-ratio: 1;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 8px;
}

.tf-sign-tile img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.tf-sign-copy { min-width: 0; }

.tf-sign-label {
  color: var(--tf-text-primary);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 4px;
}

.tf-sign-ja {
  color: var(--tf-text-secondary);
  font-size: 12px;
  margin-bottom: 2px;
}

.tf-sign-romaji {
  color: var(--tf-text-muted);
  font-size: 11px;
  font-style: italic;
  margin-bottom: 6px;
}

.tf-sign-detail {
  color: var(--tf-text-secondary);
  font-size: 11.5px;
  line-height: 1.45;
}

.tf-disclaimer {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  font-size: 12px;
  line-height: 1.55;
  margin: 10px 0 0;
  padding: 12px;
}

/* Quiz */
.tf-quiz-card {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: left;
}
.tf-quiz-card-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.tf-quiz-card-sub { font-size: 12px; color: var(--tf-text-secondary); margin: 0 0 14px; line-height: 1.5; }

.tf-quiz-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.tf-quiz-score {
  flex: 0 0 auto;
  border: 1px solid var(--tf-border-soft);
  border-radius: 999px;
  color: var(--tf-text-secondary);
  font-size: 11.5px;
  font-weight: 700;
  padding: 6px 9px;
  white-space: nowrap;
}

.tf-quiz-mode-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.tf-quiz-mode {
  background: var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 8px;
  color: var(--tf-text-secondary);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  min-height: 38px;
  padding: 8px 10px;
}

.tf-quiz-mode.is-active {
  background: rgba(43,184,184,0.12);
  border-color: rgba(43,184,184,0.44);
  color: var(--tf-text-primary);
}

.tf-quiz-coaches {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0)),
    var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  display: grid;
  gap: 0;
  margin-bottom: 14px;
  overflow: hidden;
  padding: 4px;
}

.tf-quiz-coach {
  align-items: start;
  background: transparent;
  border: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: 46px 1fr;
  padding: 12px 12px;
  position: relative;
}

.tf-quiz-coach p {
  color: var(--tf-text-secondary);
  font-size: 12.5px;
  line-height: 1.45;
  margin: 0;
}

.tf-quiz-coach + .tf-quiz-coach {
  border-top: 1px solid rgba(255,255,255,0.05);
}

.tf-quiz-coach strong {
  color: var(--tf-text-primary);
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.tf-quiz-coach-img {
  align-self: center;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  height: 46px;
  object-fit: contain;
  padding: 4px;
  width: 46px;
}

.tf-quiz-coach p span {
  display: block;
  margin-top: 2px;
  min-width: 0;
}

.tf-quiz-stage {
  border-top: 1px solid var(--tf-border-soft);
  padding-top: 14px;
}

.tf-quiz-ready {
  color: var(--tf-text-secondary);
  font-size: 12.5px;
  line-height: 1.5;
  margin: 0 0 12px;
  text-align: center;
}

.tf-quiz-question-layout {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(110px, 0.42fr) 1fr;
}

.tf-quiz-sign-frame {
  align-items: center;
  aspect-ratio: 1;
  background: var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 16px;
}

.tf-quiz-sign-frame img {
  display: block;
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.tf-quiz-question-body { min-width: 0; }
.tf-quiz-question-body-full { width: 100%; }

.tf-quiz-kicker {
  color: var(--tf-text-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.tf-quiz-question {
  color: var(--tf-text-primary);
  font-size: 16px;
  line-height: 1.35;
  margin: 0 0 10px;
}

.tf-quiz-prompt {
  color: var(--tf-text-primary);
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 4px;
}

.tf-quiz-prompt-sub {
  color: var(--tf-text-muted);
  font-size: 12px;
  line-height: 1.4;
  margin: 0 0 12px;
}

.tf-quiz-answers {
  display: grid;
  gap: 8px;
}

.tf-quiz-answer {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 8px;
  color: var(--tf-text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.35;
  min-height: 40px;
  padding: 9px 10px;
  text-align: left;
}

.tf-quiz-answer:hover:not(:disabled) {
  background: var(--tf-bg-elevated);
}

.tf-quiz-answer.is-correct {
  background: rgba(94,184,122,0.14);
  border-color: rgba(94,184,122,0.54);
}

.tf-quiz-answer.is-wrong {
  background: rgba(236,94,138,0.12);
  border-color: rgba(236,94,138,0.48);
}

.tf-quiz-feedback { margin-top: 12px; }

.tf-quiz-status,
.tf-quiz-result {
  background: var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  font-size: 12.5px;
  line-height: 1.5;
  padding: 12px;
}

.tf-quiz-result.is-correct { border-color: rgba(94,184,122,0.46); }
.tf-quiz-result.is-wrong { border-color: rgba(245,166,35,0.46); }

.tf-quiz-result-title {
  color: var(--tf-text-primary);
  font-size: 13.5px;
  font-weight: 800;
  margin-bottom: 8px;
}

.tf-quiz-explain {
  display: grid;
  gap: 7px;
  margin: 0 0 8px;
}

.tf-quiz-explain div {
  display: grid;
  gap: 6px;
  grid-template-columns: 68px 1fr;
}

.tf-quiz-explain dt {
  color: var(--tf-text-muted);
  font-size: 11px;
  font-weight: 800;
}

.tf-quiz-explain dd { margin: 0; }
.tf-quiz-result p { margin: 0 0 10px; }
.tf-quiz-result .tf-sample-audio-row { margin: 0 0 10px; }
.tf-quiz-next { margin-top: 2px; }

@media (min-width: 760px) {
  .tf-quiz-coaches {
    gap: 1px;
    grid-template-columns: 1fr 1fr;
  }

  .tf-quiz-coach + .tf-quiz-coach {
    border-left: 1px solid rgba(255,255,255,0.05);
    border-top: 0;
  }
}

@media (max-width: 520px) {
  .tf-result-grid {
    grid-template-columns: 1fr;
  }

  .tf-v25-number-list div {
    align-items: flex-start;
    flex-direction: column;
  }

  .tf-v25-number-list dd {
    justify-content: flex-start;
    text-align: left;
  }

  .tf-learn-filter-row {
    gap: 6px;
  }

  .tf-learn-filter-chip {
    font-size: 11.5px;
    min-height: 34px;
    padding: 7px 10px;
  }

  .tf-learn-filter-summary {
    font-size: 12px;
  }

  .tf-category-grid {
    grid-template-columns: 1fr;
  }

  .tf-category-card {
    padding: 12px 11px;
  }

  .tf-sample-audio-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tf-sample-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .tf-sample-nav {
    flex-wrap: wrap;
  }

  .tf-audio-btn {
    min-height: 32px;
    padding: 7px 11px;
  }

  .tf-sign-grid {
    grid-template-columns: 1fr;
  }

  .tf-sign-tile,
  .tf-sign-grid.is-all-signs .tf-sign-tile {
    gap: 9px;
    grid-template-columns: 64px 1fr;
    padding: 9px;
  }

  .tf-sign-image-wrap {
    padding: 7px;
  }

  .tf-sign-label {
    font-size: 12px;
  }

  .tf-sign-detail {
    font-size: 11px;
  }

  .tf-disclaimer {
    font-size: 11.5px;
    padding: 10px;
  }

  .tf-quiz-card { padding: 16px 12px; }

  .tf-quiz-card-head {
    display: grid;
    gap: 8px;
  }

  .tf-quiz-score {
    justify-self: start;
  }

  .tf-quiz-coaches {
    padding: 3px;
  }

  .tf-quiz-coach {
    gap: 10px;
    grid-template-columns: 40px 1fr;
    padding: 10px 9px;
  }

  .tf-quiz-coach-img {
    height: 40px;
    width: 40px;
  }

  .tf-quiz-question-layout {
    grid-template-columns: 1fr;
  }

  .tf-quiz-sign-frame {
    justify-self: center;
    max-width: 168px;
    width: 62%;
  }

  .tf-quiz-mode-row {
    grid-template-columns: 1fr;
  }

  .tf-quiz-explain div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}


/* ==========================================================================
   16. COMMUNITY TAB
   ========================================================================== */

.tf-community-section { padding: 24px 22px 28px; }

.tf-community-panel {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 12px;
  padding: 18px 16px;
}

.tf-community-head {
  margin-bottom: 16px;
}

.tf-community-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 8px;
}

.tf-community-subtitle {
  color: var(--tf-text-primary);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 8px;
}

.tf-community-copy {
  color: var(--tf-text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.tf-community-grid {
  display: grid;
  gap: 12px;
}

.tf-community-card {
  background: var(--tf-bg-elevated);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
}

.tf-community-card-head {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.tf-community-card-eyebrow {
  color: var(--tf-day-3-teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.2;
  margin-bottom: 5px;
}

.tf-community-card-title {
  align-items: center;
  color: var(--tf-text-primary);
  display: flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  line-height: 1.35;
  margin: 0;
}

.tf-card-icon {
  flex: 0 0 auto;
  height: 26px;
  width: 26px;
}

.tf-community-card-copy {
  color: var(--tf-text-secondary);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 0;
}

.tf-community-action {
  align-items: center;
  background: rgba(43,184,184,0.13);
  border: 1px solid rgba(43,184,184,0.34);
  border-radius: 999px;
  color: var(--tf-text-primary);
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 800;
  justify-content: center;
  line-height: 1.2;
  min-height: 34px;
  padding: 7px 12px;
  text-decoration: none;
  width: fit-content;
}

.tf-community-status {
  background: rgba(162,94,236,0.16);
  border: 1px solid rgba(162,94,236,0.28);
  border-radius: 8px;
  color: var(--tf-primary);
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
  max-width: 120px;
  padding: 5px 8px;
  text-align: center;
  white-space: nowrap;
}

.tf-mode-light .tf-community-status {
  color: #6c42a1;
}

.tf-community-status-note {
  color: var(--tf-text-muted);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.4;
}

.tf-community-note {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  color: var(--tf-text-secondary);
  font-size: 11.5px;
  line-height: 1.55;
  margin: 14px 0 0;
  padding: 12px;
}

@media (min-width: 900px) {
  .tf-community-section { padding: 28px 24px 32px; }

  .tf-community-panel {
    padding: 20px;
  }

  .tf-community-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .tf-community-card {
    align-content: start;
    padding: 12px;
  }

  .tf-community-card-head {
    display: grid;
    gap: 10px;
  }

  .tf-community-status,
  .tf-community-action {
    width: 100%;
  }
}


/* ==========================================================================
   17. HAMBURGER DRAWER
   ========================================================================== */

.tf-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 100;
}
.tf-drawer-backdrop.is-open {
  opacity: 1;
  pointer-events: auto;
}

.tf-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: var(--tf-bg-page);
  border-left: 1px solid var(--tf-border-soft);
  padding: 22px 18px 24px;
  z-index: 101;
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
.tf-drawer.is-open { transform: translateX(0); }

.tf-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
}

.tf-drawer-title { font-size: 20px; font-weight: 700; }
.tf-drawer-close {
  background: none;
  border: none;
  color: var(--tf-text-muted);
  font-size: 22px;
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.tf-drawer-close:hover { background: var(--tf-bg-surface); }

.tf-drawer-section-label {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--tf-text-muted);
  text-transform: uppercase;
  margin-bottom: 10px;
  margin-top: 18px;
}

.tf-drawer-row {
  background: var(--tf-bg-surface);
  border: 1px solid var(--tf-border-soft);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.tf-drawer-row:hover { background: var(--tf-bg-elevated); }
.tf-drawer-row strong { font-size: 14px; font-weight: 500; }
.tf-drawer-row span { color: var(--tf-text-muted); font-size: 12px; }

.tf-drawer-row.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.tf-drawer-coming-badge {
  font-size: 11px;
  background: rgba(162,94,236,0.18);
  color: var(--tf-day-6-purple);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 600;
}

.tf-drawer-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--tf-border-soft);
  font-size: 12px;
  color: var(--tf-text-muted);
}


/* ==========================================================================
   18. FOOTER
   ========================================================================== */

.tf-site-footer {
  padding: 22px 18px 28px;
  border-top: 1px solid var(--tf-border-soft);
}

.tf-footer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-bottom: 14px;
}

.tf-footer-pill {
  font-size: 11px;
  color: var(--tf-text-secondary);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--tf-border-soft);
  padding: 4px 10px;
  border-radius: 999px;
}
.tf-mode-light .tf-footer-pill { background: rgba(0,0,0,0.04); }

.tf-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  font-size: 12px;
  color: var(--tf-text-secondary);
  margin-bottom: 12px;
}
.tf-footer-links a { color: var(--tf-text-secondary); text-decoration: none; }
.tf-footer-links a:hover { color: var(--tf-text-primary); }

.tf-footer-legal {
  text-align: center;
  font-size: 11px;
  color: var(--tf-text-muted);
  line-height: 1.6;
  margin: 0;
}


/* ==========================================================================
   19. DESKTOP TUNING â€” light touch, mobile-first stays primary
   ========================================================================== */

@media (min-width: 720px) {
  .tf-hero { padding: 48px 22px 32px; }
  .tf-hero-mascot { width: 280px; height: 280px; }
  .tf-hero-title { font-size: 40px; }
  .tf-hero-subtitle { font-size: 16px; max-width: 420px; margin-left: auto; margin-right: auto; }
  .tf-btn-primary { max-width: 320px; margin: 0 auto; }
  .tf-v25-preview { padding: 18px; }
  .tf-v25-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tf-v25-card:last-child { grid-column: 1 / -1; }
  .tf-exchange-controls {
    align-items: end;
    grid-template-columns: 1fr 0.8fr 0.8fr auto;
  }
  .tf-checklist-head {
    align-items: start;
    grid-template-columns: 1fr auto;
  }
  .tf-checklist-progress { justify-self: end; }
}


/* ==========================================================================
   20. ACCESSIBILITY
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .tf-landing *,
  .tf-landing *::before,
  .tf-landing *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Auto-detect higher contrast preference within whichever mode is active */
@media (prefers-contrast: more) {
  .tf-landing.tf-mode-dark { --tf-text-secondary: #d8dde8; --tf-border-soft: #4a5170; }
  .tf-landing.tf-mode-light { --tf-text-secondary: #2a2640; --tf-border-soft: #a0a4b3; }
}


/* ==========================================================================
   END OF FILE
   ========================================================================== */
