/* ============================================================
   BRO — Personal Development Platform
   Design System: Premium Dark / Violet
   ============================================================ */

@font-face {
  font-family: 'Bebas Neue';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/bebas-neue.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 100 900;
  font-display: block;
  src: url('../fonts/dmsans-var.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url('../fonts/dmmono-400.woff2') format('woff2');
}

/* ── Variables ── */
:root {
  --bg:          #0a0a0f;
  --bg-2:        #0e0e16;
  --card:        #111118;
  --card-hover:  #14141e;
  --border:      rgba(139,92,246,.18);
  --border-mid:  rgba(139,92,246,.35);
  --border-hi:   rgba(139,92,246,.6);

  --violet:      #8b5cf6;
  --violet-dim:  #6d28d9;
  --violet-glow: rgba(139,92,246,.25);
  --teal:        #4ecdc4;
  --teal-dim:    #2a9d94;
  --teal-glow:   rgba(78,205,196,.2);
  --green:       #22c55e;
  --amber:       #f59e0b;
  --red:         #ef4444;
  --red-glow:    rgba(239,68,68,.2);

  --txt:         #e2e8f0;
  --txt-muted:   #94a3b8;
  --txt-faint:   #475569;

  --font-body:   'DM Sans', sans-serif;
  --font-display:'Bebas Neue', sans-serif;
  --font-mono:   'DM Mono', monospace;

  --r-card:  12px;
  --r-input: 8px;
  --r-pill:  999px;

  --nav-h:   64px;
  --max-w:   480px;

  --ease-out-quart: cubic-bezier(.25, 1, .5, 1);
  --ease-spring:    cubic-bezier(.34, 1.56, .64, 1);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--txt);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.6;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* ── App shell ── */
#app {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100dvh;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ── Screens ── */
.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s var(--ease-out-quart),
              transform .25s var(--ease-out-quart);
  padding-bottom: 8px;
  padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 24px) + 8px);
}
.screen.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.screen.entering { animation: screenIn .3s var(--ease-out-quart) forwards; }

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

/* Login has no nav padding */
#screen-login { padding-top: 0; padding-bottom: 0; }

/* ── Top Nav ── */
#bottom-nav {
  position: fixed;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--max-w);
  height: calc(var(--nav-h) + env(safe-area-inset-top, 24px));
  padding-top: env(safe-area-inset-top, 24px);
  background: rgba(10,10,15,.92);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border-bottom: 1px solid var(--border);
  display: none;
  align-items: stretch;
  z-index: 100;
}
#bottom-nav.visible { display: flex; }

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  color: var(--txt-faint);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s;
  position: relative;
}
.nav-tab .nav-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform .2s var(--ease-spring);
}
.nav-tab.active { color: var(--violet); }
.nav-tab.active .nav-icon { transform: scale(1.15); }
.nav-tab::before {
  content: '';
  position: absolute;
  bottom: 0; left: 20%; right: 20%;
  height: 2px;
  background: var(--violet);
  border-radius: 2px 2px 0 0;
  opacity: 0;
  transition: opacity .2s;
}
.nav-tab.active::before { opacity: 1; }

/* ── Typography ── */
.display { font-family: var(--font-display); line-height: 1; }
.mono    { font-family: var(--font-mono); }

h1 { font-size: 1.75rem; font-weight: 600; }
h2 { font-size: 1.25rem; font-weight: 600; }
h3 { font-size: 1rem;    font-weight: 500; }

.label-xs {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--txt-faint);
}
.label-sm {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 20px;
  transition: border-color .2s, box-shadow .2s;
}
.card:hover { border-color: var(--border-mid); }
.card.glow  { box-shadow: 0 0 32px var(--violet-glow); }
.card.teal-glow { box-shadow: 0 0 32px var(--teal-glow); }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--r-input);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .04em;
  transition: all .2s var(--ease-out-quart);
  position: relative;
  overflow: hidden;
}
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background .15s;
}
.btn:active::after { background: rgba(255,255,255,.06); }

.btn-primary {
  background: var(--violet);
  color: #fff;
}
.btn-primary:hover {
  background: #9d70f9;
  box-shadow: 0 4px 20px var(--violet-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--violet);
  border: 1px solid var(--border-mid);
}
.btn-secondary:hover {
  border-color: var(--violet);
  background: var(--violet-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--txt-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  color: var(--txt);
  border-color: var(--border-mid);
}

.btn-teal {
  background: var(--teal);
  color: #0a0a0f;
  font-weight: 700;
}
.btn-teal:hover {
  background: #5ed9d0;
  box-shadow: 0 4px 20px var(--teal-glow);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 16px;
  font-size: .8rem;
}
.btn-lg {
  padding: 16px 32px;
  font-size: 1rem;
  border-radius: var(--r-card);
}
.btn-full { width: 100%; }
.btn-icon {
  padding: 10px;
  border-radius: 8px;
  width: 40px; height: 40px;
  font-size: 18px;
}

/* ── Inputs ── */
.input-group { display: flex; flex-direction: column; gap: 6px; }
.input-label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--txt-muted);
}
.input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: var(--r-input);
  color: var(--txt);
  font-size: .95rem;
  transition: border-color .2s, box-shadow .2s, background .2s;
  outline: none;
}
.input:focus {
  border-color: var(--violet);
  background: rgba(139,92,246,.06);
  box-shadow: 0 0 0 3px rgba(139,92,246,.15);
}
.input::placeholder { color: var(--txt-faint); }

textarea.input {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

/* ── Sliders ── */
.slider-wrap { display: flex; flex-direction: column; gap: 8px; }
.slider-header { display: flex; justify-content: space-between; align-items: center; }
.slider-val {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--violet);
  min-width: 24px;
  text-align: right;
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 8px var(--violet-glow);
  transition: transform .15s var(--ease-spring);
}
input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.3); }
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border: none;
  border-radius: 50%;
  background: var(--violet);
  box-shadow: 0 0 8px var(--violet-glow);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.badge-green  { background: rgba(34,197,94,.15);  color: var(--green); }
.badge-violet { background: rgba(139,92,246,.15); color: var(--violet); }
.badge-amber  { background: rgba(245,158,11,.15);  color: var(--amber); }
.badge-teal   { background: rgba(78,205,196,.15);  color: var(--teal); }
.badge-red    { background: var(--red-glow);       color: var(--red); }

/* ── Section header ── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--txt-faint);
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 16px 0;
}

/* ── Toast ── */
#toast-container {
  position: fixed;
  top: 16px; left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: calc(var(--max-w) - 32px);
  max-width: calc(100vw - 32px);
  pointer-events: none;
}
.toast {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 500;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: toastIn .3s var(--ease-spring) forwards;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.toast.success {
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  color: #86efac;
}
.toast.error {
  background: rgba(239,68,68,.15);
  border: 1px solid rgba(239,68,68,.3);
  color: #fca5a5;
}
.toast.info {
  background: rgba(139,92,246,.15);
  border: 1px solid var(--border-mid);
  color: #c4b5fd;
}
.toast.out { animation: toastOut .25s ease forwards; }

@keyframes toastIn  { from { opacity:0; transform:translateY(-12px); } to { opacity:1; transform:translateY(0); } }
@keyframes toastOut { from { opacity:1; transform:translateY(0); }    to { opacity:0; transform:translateY(-12px); } }

/* ── Spinner ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border-mid);
  border-top-color: var(--violet);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 0 auto;
}
.spinner-sm {
  width: 18px; height: 18px;
  border-width: 2px;
  display: inline-block;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Loading overlay ── */
.loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,15,.8);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 50;
  border-radius: inherit;
}
.loading-overlay p { color: var(--txt-muted); font-size: .875rem; }

/* ── Skeleton ── */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Progress bar ── */
.progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--violet);
  border-radius: 2px;
  transition: width .3s var(--ease-out-quart);
}
.progress-fill.teal { background: var(--teal); }

/* ── Stat strip ── */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  overflow: hidden;
}
.stat-cell {
  background: var(--card);
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.stat-cell .val {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--violet);
  line-height: 1;
}
.stat-cell .val.teal { color: var(--teal); }
.stat-cell .lbl {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt-faint);
  line-height: 1.3;
}

/* ── Bar chart ── */
.bar-chart { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: flex; flex-direction: column; gap: 4px; }
.bar-row-header { display: flex; justify-content: space-between; align-items: baseline; }
.bar-label { font-size: .8rem; color: var(--txt-muted); font-weight: 500; }
.bar-score {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--txt);
}
.bar-track {
  height: 6px;
  background: rgba(255,255,255,.06);
  border-radius: 3px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .6s var(--ease-out-quart);
}
.bar-fill.violet { background: linear-gradient(90deg, var(--violet-dim), var(--violet)); }
.bar-fill.teal   { background: linear-gradient(90deg, var(--teal-dim),   var(--teal)); }
.bar-fill.amber  { background: linear-gradient(90deg, #d97706,           var(--amber)); }

/* ── Modal / Overlay ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-sheet {
  width: 100%;
  max-width: var(--max-w);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px 20px 0 0;
  padding: 24px 20px 40px;
  transform: translateY(100%);
  transition: transform .3s var(--ease-out-quart);
  max-height: 90dvh;
  overflow-y: auto;
}
.modal-backdrop.open .modal-sheet { transform: translateY(0); }
.modal-handle {
  width: 36px; height: 4px;
  background: var(--border-mid);
  border-radius: 2px;
  margin: 0 auto 20px;
}

/* ── Full-screen overlay (test flow) ── */
.fullscreen-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 300;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  overflow: hidden;
}
.fullscreen-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* ── Login screen ── */
#screen-login {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(139,92,246,.2) 0%, transparent 60%),
    radial-gradient(ellipse 50% 30% at 80% 90%,  rgba(78,205,196,.1) 0%, transparent 50%);
  pointer-events: none;
}
.login-logo {
  font-family: var(--font-display);
  font-size: 6rem;
  letter-spacing: .12em;
  background: linear-gradient(135deg, #fff 30%, var(--violet) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}
.login-tagline {
  font-size: .95rem;
  color: var(--txt-muted);
  letter-spacing: .05em;
  margin-bottom: 40px;
  font-weight: 300;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  position: relative;
  z-index: 1;
}
.login-toggle {
  display: flex;
  background: rgba(255,255,255,.04);
  border-radius: 8px;
  padding: 3px;
  margin-bottom: 24px;
}
.login-toggle button {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--txt-muted);
  transition: all .2s;
}
.login-toggle button.active {
  background: var(--violet);
  color: #fff;
}
.login-form { display: flex; flex-direction: column; gap: 16px; }
.server-url-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.server-url-label {
  font-size: .75rem;
  color: var(--txt-faint);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.server-url-wrap .input {
  font-size: .8rem;
  padding: 8px 12px;
  color: var(--txt-faint);
}

/* ── Dashboard ── */
.dash-header {
  padding: 20px 20px 0;
}
.dash-greeting {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}
.dash-date {
  font-size: .85rem;
  color: var(--txt-muted);
  margin-top: 2px;
}
.dash-scroll {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
}

/* Exercise card */
.exercise-card-inner {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.exercise-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
}
.exercise-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--txt);
}
.exercise-meta {
  font-size: .82rem;
  color: var(--txt-muted);
}
.exercise-desc {
  font-size: .875rem;
  color: var(--txt-muted);
  line-height: 1.5;
}

/* Check-in card */
.checkin-sliders { display: flex; flex-direction: column; gap: 20px; }
.checkin-complete {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 4px;
  color: var(--green);
}
.checkin-complete .icon { font-size: 1.5rem; }
.checkin-complete p { font-weight: 500; }
.checkin-complete small { font-size: .82rem; color: var(--txt-muted); display: block; }

/* Weekly score card */
.weekly-score-inner { display: flex; gap: 16px; align-items: flex-start; }
.weekly-score-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  min-width: 80px;
  text-align: center;
}
.weekly-score-right { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.weekly-score-text { font-size: .875rem; color: var(--txt-muted); line-height: 1.5; }
.weekly-highlights { display: flex; flex-direction: column; gap: 6px; }
.highlight-item {
  font-size: .8rem;
  color: var(--txt-muted);
  padding-left: 12px;
  position: relative;
}
.highlight-item::before {
  content: '';
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--violet);
}

/* ── Tests screen ── */
.tests-header {
  padding: 20px 20px 16px;
}
.tests-grid {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.test-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: border-color .2s, transform .15s, box-shadow .2s;
}
.test-card:hover {
  border-color: var(--border-mid);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.test-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.test-card-title { font-size: 1rem; font-weight: 600; }
.test-card-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 2px;
}
.test-card-meta span { font-size: .78rem; color: var(--txt-faint); }
.test-card-desc { font-size: .82rem; color: var(--txt-muted); line-height: 1.5; }
.test-card-featured {
  border-color: var(--violet);
  background: linear-gradient(135deg, rgba(124,58,237,.08) 0%, var(--card) 60%);
  box-shadow: 0 0 0 1px rgba(124,58,237,.3), 0 4px 20px rgba(124,58,237,.1);
}
.test-card-featured:hover {
  border-color: var(--violet);
  box-shadow: 0 0 0 1px rgba(124,58,237,.5), 0 6px 28px rgba(124,58,237,.2);
}

/* ── Test flow overlay ── */
.test-overlay-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.test-overlay-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.test-title-small {
  font-size: .9rem;
  font-weight: 600;
  color: var(--txt-muted);
}
.test-counter {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--txt-faint);
}
.test-question-area {
  flex: 1;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}
.test-question-text {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--txt);
  animation: fadeSlide .25s var(--ease-out-quart);
}
@keyframes fadeSlide {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* Likert answers */
.likert-wrap { display: flex; flex-direction: column; gap: 12px; }
.likert-labels {
  display: flex;
  justify-content: space-between;
  font-size: .75rem;
  color: var(--txt-faint);
}
.likert-circles {
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.likert-btn {
  flex: 1;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid var(--border-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--txt-muted);
  transition: all .15s var(--ease-spring);
  max-width: 52px;
}
.likert-btn:hover {
  border-color: var(--violet);
  color: var(--violet);
  transform: scale(1.05);
}
.likert-btn.selected {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  transform: scale(1.1);
  box-shadow: 0 0 16px var(--violet-glow);
}

/* Scenario answers */
.scenario-answers { display: flex; flex-direction: column; gap: 10px; }
.scenario-btn {
  padding: 14px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--txt);
  font-size: .9rem;
  text-align: left;
  line-height: 1.45;
  transition: all .15s;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.scenario-btn:hover {
  border-color: var(--border-mid);
  background: rgba(139,92,246,.04);
}
.scenario-btn.selected {
  border-color: var(--violet);
  background: rgba(139,92,246,.1);
  color: var(--txt);
}
.scenario-letter {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--violet);
  min-width: 20px;
}

/* Test nav footer */
.test-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
}
.test-footer .btn { flex: 1; }

/* Test result screen */
.test-result {
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
  overflow-y: auto;
}
.result-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--violet);
  letter-spacing: .06em;
}
.result-summary {
  font-size: .9rem;
  color: var(--txt-muted);
  line-height: 1.6;
  background: rgba(139,92,246,.05);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
}

/* ── Profile screen ── */
.profile-scroll {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}
.profile-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
}
.profile-empty-icon {
  font-size: 3rem;
  color: var(--txt-faint);
}
.profile-empty h3 { color: var(--txt-muted); }
.profile-empty p  { font-size: .875rem; color: var(--txt-faint); line-height: 1.5; }

.profile-summary {
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--txt);
  padding: 20px;
  background: linear-gradient(135deg, rgba(139,92,246,.08), rgba(78,205,196,.05));
  border: 1px solid var(--border-mid);
  border-radius: var(--r-card);
}
.profile-tabs {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,.03);
  border-radius: 10px;
  padding: 4px;
}
.profile-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--txt-faint);
  border-radius: 7px;
  transition: all .2s;
}
.profile-tab.active {
  background: var(--violet);
  color: #fff;
}
.profile-tab-content { display: none; }
.profile-tab-content.active { display: block; }

.path-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.path-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--teal);
}
.path-card-why {
  font-size: .82rem;
  color: var(--txt-muted);
  line-height: 1.5;
}

.plan-mode-card {
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: all .18s;
  user-select: none;
}
.plan-mode-card:hover {
  border-color: var(--accent);
  background: rgba(139,92,246,.08);
}
.plan-mode-card.active {
  border-color: var(--accent);
  background: rgba(139,92,246,.15);
  box-shadow: 0 0 0 1px rgba(139,92,246,.3);
}
.blind-spot-card {
  background: rgba(239,68,68,.05);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.blind-spot-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--red);
}
.blind-spot-desc {
  font-size: .82rem;
  color: var(--txt-muted);
  line-height: 1.5;
}

/* ── Plan screen ── */
.plan-scroll {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}
.plan-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
  text-align: center;
  color: var(--txt-muted);
}
.week-highlight {
  background: linear-gradient(135deg, rgba(139,92,246,.12), rgba(78,205,196,.06));
  border: 1px solid var(--border-mid);
  border-radius: var(--r-card);
  padding: 20px;
  position: relative;
  overflow: hidden;
}
.week-highlight::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(139,92,246,.15), transparent 70%);
  pointer-events: none;
}
.week-num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  color: rgba(139,92,246,.3);
  line-height: 1;
  position: absolute;
  top: 12px; right: 16px;
}
.week-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: 6px;
}
.week-topic {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.week-theory {
  font-size: .85rem;
  color: var(--txt-muted);
  line-height: 1.55;
}

.week-calendar { display: flex; gap: 6px; }
.day-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 4px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: all .15s;
  min-width: 0;
}
.day-col:hover { background: rgba(255,255,255,.03); border-color: var(--border); }
.day-col.today { border-color: var(--violet); background: rgba(139,92,246,.06); }
.day-col.done  { opacity: .7; }
.day-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--txt-faint);
}
.day-num {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--txt);
  line-height: 1;
}
.day-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--border-mid);
}
.day-dot.done { background: var(--green); }
.day-dot.today { background: var(--violet); box-shadow: 0 0 6px var(--violet-glow); }

.day-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.day-detail-section { display: flex; flex-direction: column; gap: 6px; }
.day-detail-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--txt-faint);
}
.day-detail-value {
  font-size: .875rem;
  color: var(--txt);
  line-height: 1.5;
}

/* ── Progress screen ── */
.progress-scroll {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

/* SVG trend chart */
.trend-chart-wrap {
  position: relative;
  overflow: visible;
}
.trend-chart {
  width: 100%;
  height: 120px;
  overflow: visible;
}
.trend-labels-x {
  display: flex;
  justify-content: space-between;
  padding: 4px 0 0;
}
.trend-label {
  font-size: 9px;
  color: var(--txt-faint);
  font-weight: 500;
}

.trend-legend {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  color: var(--txt-muted);
}
.legend-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
}

/* Weekly review history */
.review-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.review-score-badge {
  font-family: var(--font-display);
  font-size: 2rem;
  min-width: 48px;
  text-align: center;
  line-height: 1;
}
.review-content { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.review-week-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--txt-faint);
}
.review-text { font-size: .82rem; color: var(--txt-muted); line-height: 1.45; }

/* ── Exercise modal ── */
.exercise-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.exercise-modal-title {
  font-size: 1.2rem;
  font-weight: 600;
}
.step-indicator {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--txt-faint);
}
.exercise-step {
  background: rgba(139,92,246,.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: .9rem;
  line-height: 1.55;
  color: var(--txt);
}
.exercise-timer {
  text-align: center;
  margin: 16px 0;
}
.timer-display {
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--teal);
  letter-spacing: .06em;
  line-height: 1;
}
.timer-label {
  font-size: .78rem;
  color: var(--txt-faint);
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-top: 4px;
}
.timer-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }

/* ── Glow background effects ── */
.bg-glow {
  position: fixed;
  pointer-events: none;
  z-index: -1;
}
.bg-glow-1 {
  top: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,.08) 0%, transparent 70%);
}
.bg-glow-2 {
  bottom: 0; right: -100px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(78,205,196,.06) 0%, transparent 70%);
}

/* ── Utilities ── */
.flex  { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.p-0 { padding: 0 !important; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-center { text-align: center; }
.text-muted  { color: var(--txt-muted); }
.text-faint  { color: var(--txt-faint); }
.text-violet { color: var(--violet); }
.text-teal   { color: var(--teal); }
.text-green  { color: var(--green); }
.text-red    { color: var(--red); }
.font-sm { font-size: .875rem; }
.font-xs { font-size: .78rem; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.relative { position: relative; }

/* ── Responsive tweaks ── */
@media (max-width: 360px) {
  .likert-btn { max-width: 42px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 481px) {
  #app { border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

/* ═══ GLOBÁLNÍ MINIMUM FONTU 16px [2026-06-15] ═══
   Marek: NIKDY font pod 16px (platí pro WhiteMachine I BRO). Přebíjí drobné
   inline fonty i malé třídy. Doplněk k WebView setTextZoom(100) v MainActivity. */
[style*="font-size:6px"],  [style*="font-size:7px"],  [style*="font-size:8px"],
[style*="font-size:9px"],  [style*="font-size:10px"], [style*="font-size:11px"],
[style*="font-size:12px"], [style*="font-size:13px"], [style*="font-size:14px"],
[style*="font-size:15px"],
[style*="font-size: 6px"],  [style*="font-size: 7px"],  [style*="font-size: 8px"],
[style*="font-size: 9px"],  [style*="font-size: 10px"], [style*="font-size: 11px"],
[style*="font-size: 12px"], [style*="font-size: 13px"], [style*="font-size: 14px"],
[style*="font-size: 15px"],
.font-sm, .font-xs {
  font-size: 16px !important;
}
