/* HR Core MK v2 · Stripe A foundation
   Design tokens + components · mobile-first 480px */

:root {
  /* Cores · base CardioZone navy */
  --bg:        #0a0a0f;
  --bg-2:      #12121a;
  --bg-3:      #1a1a26;
  --surface:   #1e1e2e;
  --surface-2: #252538;
  --border:    #2a2a40;
  --border-2:  #3a3a55;

  --text:      #e8e8f0;
  --text-2:    #9898b0;
  --text-3:    #686880;

  --accent:     #00e5a0;
  --accent-2:   #00c889;
  --accent-dim: rgba(0,229,160,0.12);
  --accent-glow:rgba(0,229,160,0.30);

  --red:    #ff4060;
  --orange: #ff8c40;
  --yellow: #ffd040;
  --blue:   #4080ff;

  --zone1: #888888;
  --zone2: #40d0ff;
  --zone3: #ffd040;
  --zone4: #ff8c40;
  --zone5: #ff4060;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
  --shadow:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);

  --max-w: 480px;
  --tab-h: 64px;
  --header-h: 56px;

  --font-sans: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, "SF Mono", Menlo, monospace;

  --t-fast: .15s ease;
  --t-base: .25s ease;
  --t-slow: .4s ease;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { font-size:16px; -webkit-text-size-adjust:100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:active { opacity: .7; }
button { font-family: inherit; cursor: pointer; }

.hidden { display: none !important; }

/* ---------- SPLASH ---------- */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-logo {
  width: 88px; height: 88px;
  border-radius: 22px;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  animation: pulse-logo 1.6s ease infinite;
  box-shadow: 0 0 40px var(--accent-glow);
}
.splash-glyph {
  font-family: var(--font-mono);
  font-size: 32px; font-weight: 800;
  color: var(--bg);
  letter-spacing: -.02em;
}
@keyframes pulse-logo {
  0%,100% { transform: scale(1); box-shadow: 0 0 40px var(--accent-glow); }
  50%     { transform: scale(1.06); box-shadow: 0 0 60px var(--accent-glow); }
}
.splash-title {
  font-family: var(--font-mono);
  font-size: 26px; font-weight: 700;
  letter-spacing: .04em;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.splash-title em { font-style: normal; }
.splash-tag {
  color: var(--text-3);
  margin-top: 8px;
  font-size: 13px;
}

/* ---------- ONBOARDING ---------- */
.onb {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg);
  overflow-y: auto;
  padding: 32px 20px 100px;
  -webkit-overflow-scrolling: touch;
}
.onb-step {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-top: 16px;
  animation: fadeUp .35s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.onb-step h2 {
  font-family: var(--font-mono);
  font-size: 24px; font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}
.onb-lead {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.55;
  margin-bottom: 20px;
}

/* welcome art */
.onb-art {
  position: relative;
  width: 140px; height: 140px;
  margin: 12px auto 24px;
}
.onb-art-circle {
  position: absolute; inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  opacity: .9;
  animation: pulse-logo 2.2s ease infinite;
}
.onb-art-pulse {
  position: absolute; inset: -16px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: .3;
  animation: ring 2.2s ease infinite;
}
@keyframes ring {
  0%   { transform: scale(.85); opacity: .5; }
  100% { transform: scale(1.15); opacity: 0; }
}

.onb-icon {
  font-size: 56px;
  text-align: center;
  margin-bottom: 16px;
}

.onb-feat-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.onb-feat {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.onb-feat span:first-child { font-size: 24px; }
.onb-feat strong { display: block; font-size: 14px; }
.onb-feat small { display: block; color: var(--text-3); font-size: 12px; margin-top: 2px; }

.onb-terms { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.onb-term {
  background: var(--bg-3);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.onb-term strong { color: var(--text); }

.onb-checkbox {
  display: flex; align-items: center; gap: 10px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  cursor: pointer;
  font-size: 14px;
}
.onb-checkbox input { width: 20px; height: 20px; accent-color: var(--accent); }

.onb-form { display: flex; flex-direction: column; gap: 14px; }

.onb-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.onb-google-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.onb-google-feats { display: flex; flex-direction: column; gap: 10px; }
.onb-google-feats > div { color: var(--text-2); font-size: 14px; }

.btn-google {
  background: white !important;
  color: #1f2937 !important;
  display: flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-google svg { color: #4285F4; }

.onb-progress {
  position: fixed; bottom: 24px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 8px;
  pointer-events: none;
}
.onb-progress .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-2);
  transition: all var(--t-base);
}
.onb-progress .dot.active {
  width: 24px;
  background: var(--accent);
  border-radius: 4px;
}
.onb-progress .dot.done { background: var(--accent-2); }

/* PAR-Q */
.onb-parq { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.parq-q {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.parq-q-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  margin-bottom: 10px;
}
.parq-q-actions { display: flex; gap: 8px; }
.parq-btn {
  flex: 1;
  padding: 10px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  color: var(--text-2);
  font-weight: 600;
  font-size: 13px;
  transition: all var(--t-fast);
}
.parq-btn.no.selected  { background: var(--accent-dim); color: var(--accent); border-color: var(--accent); }
.parq-btn.yes.selected { background: rgba(255,140,64,.15); color: var(--orange); border-color: var(--orange); }

.btn-link {
  background: none;
  border: none;
  color: var(--text-3);
  font-size: 13px;
  text-decoration: underline;
  margin-top: 12px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- COMPONENTS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  transition: transform var(--t-fast), background var(--t-fast), opacity var(--t-fast);
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--bg);
}
.btn-primary:hover { box-shadow: 0 0 24px var(--accent-glow); }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-danger {
  background: rgba(255,64,96,.1);
  color: var(--red);
  border: 1px solid rgba(255,64,96,.3);
}

.btn-sm { padding: 9px 14px; font-size: 13px; width: auto; }

.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-group label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}
.input-group label small { color: var(--text-3); font-weight: 400; margin-left: 6px; }
.input-group input,
.input-group select {
  width: 100%;
  padding: 13px 14px;
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  outline: none;
  transition: border-color var(--t-fast);
}
.input-group input:focus,
.input-group select:focus { border-color: var(--accent); }
.input-group .hint { font-size: 12px; color: var(--text-3); margin-top: 2px; }

.input-row { display: flex; gap: 10px; }
.input-row .input-group { flex: 1; }

.chip {
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font-sans);
  transition: all var(--t-fast);
}
.chip.selected {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-dim);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin: 16px 0 8px;
  padding: 0 4px;
}

/* ---------- APP SHELL ---------- */
.app {
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + env(safe-area-inset-bottom, 0));
}

.page {
  display: block;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 16px 16px 20px;
  animation: fadeIn var(--t-base);
}
.page.hidden { display: none; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 4px 4px 14px;
}
.page-title {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.01em;
}
.page-lead {
  color: var(--text-2);
  font-size: 14px;
  margin: 0 4px 16px;
  line-height: 1.5;
}

.icon-btn {
  background: none;
  border: none;
  color: var(--text);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  transition: background var(--t-fast);
}
.icon-btn:active { background: var(--surface-2); }

.avatar {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: var(--bg);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }

.link { color: var(--accent); }

/* HOJE */
.card-hero {
  background: linear-gradient(135deg, var(--surface), var(--bg-3));
  border: 1px solid var(--border-2);
}
.hero-greeting {
  font-size: 14px;
  color: var(--text-3);
}
.hero-name {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 700;
  margin: 4px 0 14px;
}
.hero-recovery {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.hero-recovery-label { font-size: 12px; color: var(--text-3); }
.hero-recovery-value { font-family: var(--font-mono); font-weight: 600; color: var(--accent); }

.card-suggestion {
  display: flex; align-items: center; gap: 14px;
}
.suggestion-icon { font-size: 28px; flex-shrink: 0; }
.suggestion-body { flex: 1; min-width: 0; }
.suggestion-title { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.suggestion-desc { font-size: 13px; color: var(--text-2); }

.empty-state {
  text-align: center;
  padding: 24px 12px;
  color: var(--text-3);
}
.empty-state span { display: block; font-size: 36px; margin-bottom: 8px; opacity: .5; }
.empty-state p { font-size: 14px; }
.empty-large { padding: 48px 16px; }
.empty-large .btn { margin-top: 16px; max-width: 200px; margin-left: auto; margin-right: auto; }

.card-streak { text-align: center; }
.streak-num {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 700;
  color: var(--accent);
}
.streak-label { font-size: 13px; color: var(--text-3); }
.streak-bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-top: 14px;
  height: 12px;
}
.streak-bar > div {
  background: var(--bg-3);
  border-radius: 3px;
}
.streak-bar > div.done { background: var(--accent); }

/* TREINAR */
.train-cards { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.train-card {
  display: flex; align-items: stretch; gap: 14px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid;
  border-radius: var(--radius);
  padding: 18px;
  color: var(--text);
  transition: all var(--t-fast);
  font-family: inherit;
}
.train-card:active { transform: scale(.99); background: var(--surface-2); }
.train-livre { border-left-color: var(--accent); }
.train-incremental { border-left-color: var(--blue); }
.train-hiit { border-left-color: var(--red); }
.train-card-icon {
  font-size: 32px;
  flex-shrink: 0;
  display: flex; align-items: center;
}
.train-card-body { flex: 1; min-width: 0; }
.train-card-title {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: .02em;
}
.train-card-desc { font-size: 13px; color: var(--text-2); line-height: 1.45; margin-bottom: 8px; }
.train-card-meta { font-size: 11px; color: var(--text-3); font-family: var(--font-mono); }

.card-info {
  background: var(--bg-3);
  border-color: var(--border);
}
.card-info strong { display: block; margin-bottom: 8px; font-size: 14px; }
.card-info ul { list-style: none; }
.card-info li {
  font-size: 13px;
  color: var(--text-2);
  padding: 5px 0 5px 20px;
  position: relative;
}
.card-info li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--accent);
  font-weight: 700;
}

/* HISTÓRICO */
.history-filters {
  display: flex; gap: 8px;
  overflow-x: auto;
  padding: 4px 4px 12px;
  -webkit-overflow-scrolling: touch;
}
.history-filters::-webkit-scrollbar { display: none; }
.history-filters .chip { flex-shrink: 0; }

.history-list { display: flex; flex-direction: column; gap: 10px; }

/* EDUCAÇÃO */
.edu-list { display: flex; flex-direction: column; gap: 10px; }
.edu-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.edu-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.edu-header .edu-emoji { font-size: 22px; flex-shrink: 0; }
.edu-header .edu-title { flex: 1; }
.edu-header .arrow {
  color: var(--text-3);
  transition: transform var(--t-base);
}
.edu-item.open .arrow { transform: rotate(180deg); }
.edu-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--t-slow);
}
.edu-item.open .edu-body { max-height: 1500px; }
.edu-content {
  padding: 0 18px 18px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
}
.edu-content strong { color: var(--text); }
.edu-content .formula {
  display: block;
  margin: 10px 0;
  padding: 12px 14px;
  background: var(--bg-3);
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  text-align: center;
  border: 1px solid var(--border);
}
.edu-content .doi {
  display: inline-block;
  font-size: 11px;
  color: var(--accent);
  font-family: var(--font-mono);
  margin-top: 4px;
}

/* PERFIL */
.card-profile-summary {
  display: flex; align-items: center; gap: 14px;
}
.profile-name-block { flex: 1; min-width: 0; }
.profile-name {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}
.profile-meta {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

.fcmax-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.fcmax-row:last-child { border-bottom: none; }
.fcmax-label { font-size: 13px; color: var(--text-2); }
.fcmax-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}
.fcmax-val.accent { color: var(--accent); }

.zones-empty { color: var(--text-3); font-size: 13px; padding: 8px 0; }

.about-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.about-row:last-child { border-bottom: none; }
.about-row span:last-child { color: var(--text-3); font-family: var(--font-mono); font-size: 12px; }

/* ---------- BOTTOM NAV ---------- */
.tab-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--tab-h);
  background: rgba(18,18,26,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-3);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  transition: color var(--t-fast);
  padding: 6px 0 4px;
}
.tab svg {
  width: 22px; height: 22px;
  stroke: currentColor;
}
.tab.active { color: var(--accent); }
.tab.active svg { filter: drop-shadow(0 0 4px var(--accent-glow)); }

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: calc(var(--tab-h) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  max-width: calc(100% - 40px);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  opacity: 0;
  transition: all var(--t-base);
  pointer-events: none;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-error { border-color: var(--red); }
.toast.toast-success { border-color: var(--accent); }

/* ---------- TV MODE / FULLSCREEN MIRROR ---------- */
.tv-mode {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 24px;
  gap: 16px;
}
.tv-mode.hidden { display: none; }

.tv-close {
  position: fixed; top: 16px; right: 16px;
  width: 48px; height: 48px;
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  border-radius: 50%;
  color: var(--text);
  font-size: 24px;
  font-weight: 300;
  display: flex; align-items: center; justify-content: center;
  z-index: 1010;
  transition: transform var(--t-fast);
}
.tv-close:active { transform: scale(.9); }

.tv-orientation-hint {
  position: absolute;
  top: 20px; left: 50%; transform: translateX(-50%);
  font-size: 12px; color: var(--text-3);
  text-align: center;
  display: none;
}
@media (orientation: portrait) and (max-width: 900px) {
  .tv-orientation-hint { display: block; }
}

.tv-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px;
  border-radius: 24px;
  font-size: 14px; font-weight: 500;
  font-family: var(--font-mono);
}
.tv-status.connected    { background: var(--accent-dim); color: var(--accent); }
.tv-status.disconnected { background: rgba(255,64,96,.12); color: var(--red); }
.tv-status .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.tv-status.connected .dot { animation: blink 1s infinite; }
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: .3; } }

.tv-bpm-wrap { text-align: center; }
.tv-bpm {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(120px, 32vmin, 280px);
  line-height: 1;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 60px var(--accent-glow);
  transition: all var(--t-base);
}
.tv-bpm[data-zone="1"] { background: linear-gradient(135deg, var(--zone1), var(--text-2)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tv-bpm[data-zone="2"] { background: linear-gradient(135deg, var(--zone2), var(--blue));   -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tv-bpm[data-zone="3"] { background: linear-gradient(135deg, var(--zone3), var(--orange));-webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tv-bpm[data-zone="4"] { background: linear-gradient(135deg, var(--zone4), var(--red));   -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.tv-bpm[data-zone="5"] { background: linear-gradient(135deg, var(--zone5), #ff2040);      -webkit-background-clip: text; -webkit-text-fill-color: transparent; animation: pulse-strong 1.2s ease infinite; }
@keyframes pulse-strong {
  0%,100% { transform: scale(1); }
  50%     { transform: scale(1.04); }
}

.tv-label {
  font-family: var(--font-mono);
  font-size: clamp(18px, 3.5vmin, 28px);
  color: var(--text-3);
  letter-spacing: .15em;
  margin-top: 8px;
}

.tv-zone-indicator {
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.5vmin, 22px);
  font-weight: 700;
  padding: 10px 28px;
  border-radius: 12px;
  border: 2px solid var(--border-2);
  color: var(--text-2);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.tv-zone-indicator[data-zone="1"] { border-color: var(--zone1); color: var(--zone1); }
.tv-zone-indicator[data-zone="2"] { border-color: var(--zone2); color: var(--zone2); }
.tv-zone-indicator[data-zone="3"] { border-color: var(--zone3); color: var(--zone3); }
.tv-zone-indicator[data-zone="4"] { border-color: var(--zone4); color: var(--zone4); }
.tv-zone-indicator[data-zone="5"] { border-color: var(--zone5); color: var(--zone5); }

.tv-stats {
  display: flex; gap: clamp(20px, 5vmin, 60px);
  margin-top: 8px;
}
.tv-stat { text-align: center; }
.tv-stat-label {
  font-size: clamp(11px, 1.6vmin, 14px);
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.tv-stat-value {
  font-family: var(--font-mono);
  font-size: clamp(28px, 5vmin, 48px);
  font-weight: 700;
  color: var(--text);
}

.tv-chart {
  width: min(95%, 1000px);
  height: clamp(80px, 18vmin, 220px);
  background: var(--bg-3);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-top: 8px;
}

/* hide app shell when tv-mode active (set by JS via body class) */
body.tv-active .app,
body.tv-active .tab-bar,
body.tv-active .splash,
body.tv-active .onb { display: none !important; }

/* ---------- DESKTOP RESPONSIVE ---------- */
@media (min-width: 600px) {
  .app { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%); }
}

@media (min-width: 800px) {
  /* Desktop: full-width layout, side rail with brand, content centered + nav repositioned */
  :root { --max-w: 720px; }

  .tab-bar {
    width: 480px;
    left: 50%; transform: translateX(-50%);
    bottom: 16px;
    border-radius: 999px;
    border: 1px solid var(--border-2);
    box-shadow: var(--shadow-lg);
  }

  .page { padding: 32px 24px 40px; }
  .page-title { font-size: 28px; }

  /* Hojepage 2-col cards layout */
  #page-home .card-suggestion,
  #page-home .card-streak {
    /* mantém single col por simplicidade */
  }

  /* Train cards keep single col but bigger */
  .train-card { padding: 24px; }
  .train-card-title { font-size: 22px; }
  .train-card-desc { font-size: 14px; }

  /* Edu list 2-col em desktop large */
}

@media (min-width: 1100px) {
  :root { --max-w: 880px; }
  .edu-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
}

/* Fullscreen API styling */
:fullscreen, :-webkit-full-screen {
  background: var(--bg);
}
:fullscreen .tab-bar, :-webkit-full-screen .tab-bar { display: none; }
