/* ============================================================
   AI kouč – Nekonečná síla
   Design tokeny + styly — Fáze 1 (kostra appky)
   ============================================================ */

:root{
  /* barvy */
  --bg: #14121f;
  --bg-elevated: #1e1b30;
  --bg-elevated-2: #262140;
  --border: rgba(255,255,255,0.09);
  --border-strong: rgba(255,255,255,0.16);
  --text-primary: #f6f4fb;
  --text-muted: #a79fc4;
  --text-faint: #726a92;

  --flame: #ff6a4d;
  --flame-dim: rgba(255,106,77,0.16);
  --violet: #7c6bf0;
  --violet-dim: rgba(124,107,240,0.16);
  --gold: #ffc94a;
  --gold-dim: rgba(255,201,74,0.18);

  --gradient-signature: linear-gradient(135deg, var(--flame) 0%, var(--violet) 100%);

  /* typografie */
  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Manrope", -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  /* rozestupy */
  --space-xs: 0.5rem;
  --space-sm: 0.875rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;

  --nav-width: 264px;
  --bottomnav-height: 68px;
}

*{ box-sizing: border-box; }

html{ color-scheme: dark; }

body{
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(124,107,240,0.20), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(255,106,77,0.14), transparent 55%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

p{ margin: 0; }

button{
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a{ color: inherit; }

/* focus visibility — přístupnost */
:focus-visible{
  outline: 2px solid var(--flame);
  outline-offset: 2px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================================
   Přihlašovací brána (Fáze 2a)
   ============================================================ */

.auth-gate{
  display: none;
  position: fixed; inset: 0;
  z-index: 100;
  align-items: center; justify-content: center;
  padding: var(--space-md);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 900px 500px at 15% -10%, rgba(124,107,240,0.20), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(255,106,77,0.14), transparent 55%);
}

body.is-locked .auth-gate{ display: flex; }
body.is-locked .app{ display: none; }
body.is-locked .bottomnav{ display: none; }

.auth-gate__panel{
  max-width: 380px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl) var(--space-lg);
}

.auth-gate__spark{
  width: 40px; height: 40px;
  color: var(--flame);
  margin: 0 auto var(--space-md);
  display: block;
}

.auth-gate__panel h1{
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 0.8rem;
}

.auth-gate__panel p{
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.auth-gate__panel .btn{ width: 100%; justify-content: center; }

.auth-gate__note{
  font-size: 0.76rem !important;
  color: var(--text-faint) !important;
  margin-top: var(--space-sm) !important;
  margin-bottom: 0 !important;
}

.auth-gate #auth-gate-denied strong{ color: var(--text-primary); word-break: break-all; }

/* ============================================================
   User chip (postranní menu)
   ============================================================ */

.user-chip{
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem;
  padding: 0.7rem 0.8rem;
  background: var(--bg-elevated-2);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-sm);
  font-size: 0.82rem;
}

#user-chip{
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-muted);
}

.user-chip__logout{
  font-size: 0.72rem;
  color: var(--flame);
  font-weight: 700;
  flex-shrink: 0;
}

/* ============================================================
   Formuláře (cíle, hodnoty)
   ============================================================ */

.form-card{ margin-bottom: var(--space-md); }

.field-label{
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.8rem 0 0.35rem;
}

.field-label:first-of-type{ margin-top: 0.4rem; }

.text-input{
  width: 100%;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.92rem;
}

.text-input:focus{ outline: none; border-color: var(--flame); }

textarea.text-input{ resize: vertical; }

select.text-input{ appearance: none; }

.form-actions{
  display: flex; gap: 0.6rem;
  margin-top: var(--space-sm);
}

.goal-card{ margin-bottom: var(--space-sm); }

.goal-card__head{
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem;
  flex-wrap: wrap;
}

.goal-card__actions{ display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; }

.goal-card__date{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  margin-top: 0.4rem;
}

.goal-card__coach-note{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--gold);
  margin-top: 0.4rem;
}

.goal-card--completed{ opacity: 0.6; }

.goal-card--completed .card__title{ text-decoration: line-through; }

.value-area{ cursor: default; }

.value-group{
  margin-top: var(--space-md);
}

.value-group__title{
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.value-item{
  display: flex; justify-content: space-between; align-items: flex-start; gap: 0.6rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--border);
}

.value-item:last-child{ border-bottom: none; }

.value-item__name{ font-weight: 700; font-size: 0.92rem; }

.value-item__desc{ color: var(--text-muted); font-size: 0.85rem; margin-top: 0.15rem; }

.value-item__delete{ font-size: 0.76rem; color: var(--text-faint); flex-shrink: 0; }

.value-item__delete:hover{ color: var(--flame); }

.app{
  display: flex;
  min-height: 100vh;
}

/* --- Postranní menu (tablet/desktop) --- */

.sidenav{
  width: var(--nav-width);
  flex-shrink: 0;
  padding: var(--space-lg) var(--space-md);
  display: none;
  flex-direction: column;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidenav__brand{
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-lg);
}

.sidenav__brand .spark-icon{
  width: 26px; height: 26px;
  color: var(--flame);
}

.sidenav__brand-text{
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.15;
}

.sidenav__brand-text small{
  display: block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: var(--text-faint);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 2px;
}

.sidenav__list{
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.navlink{
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease;
}

.navlink:hover{
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.navlink[aria-current="page"]{
  background: var(--gradient-signature);
  color: #14121f;
}

.navlink svg{ width: 18px; height: 18px; flex-shrink: 0; }

.sidenav__footer{
  font-size: 0.72rem;
  color: var(--text-faint);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.sidenav__footer .spark-icon{
  width: 12px; height: 12px;
  color: var(--flame);
}

/* --- Hlavní obsah --- */

.main{
  flex: 1;
  min-width: 0;
  padding: var(--space-lg) var(--space-md) calc(var(--bottomnav-height) + var(--space-lg));
}

@media (min-width: 768px){
  .sidenav{ display: flex; }
  .main{ padding: var(--space-xl) var(--space-xl); }
  .bottomnav{ display: none !important; }
}

.view{ display: none; max-width: 880px; margin: 0 auto; }
.view.is-active{ display: block; animation: view-in 0.35s ease; }

@keyframes view-in{
  from{ opacity: 0; transform: translateY(6px); }
  to{ opacity: 1; transform: translateY(0); }
}

.view__header{ margin-bottom: var(--space-lg); }

.eyebrow{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--flame);
  display: block;
  margin-bottom: 0.5rem;
}

.view__header h1{ font-size: 2rem; }

.view__lede{
  color: var(--text-muted);
  margin-top: 0.6rem;
  font-size: 1rem;
  max-width: 58ch;
}

/* --- Karty --- */

.card{
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.card + .card{ margin-top: var(--space-sm); }

.card__title{ font-size: 1.05rem; margin-bottom: 0.4rem; }

.card__body{ color: var(--text-muted); font-size: 0.92rem; }

.badge{
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--flame-dim), var(--violet-dim));
  color: var(--text-primary);
}

.badge--done{ background: var(--gold-dim); color: var(--gold); }

.btn{
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
}

.btn--primary{
  background: var(--gradient-signature);
  color: #14121f;
}

.btn--ghost{
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
}

/* ============================================================
   Hledání cíle — dvě dlaždice, dělítko, mapa cesty
   ============================================================ */

.discovery-tiles{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

@media (max-width: 640px){
  .discovery-tiles{ grid-template-columns: 1fr; }
}

.discovery-tile{ display: flex; flex-direction: column; }

.discovery-tile__num{ font-size: 1.3rem; margin-bottom: 0.3rem; }

.discovery-tile__btn{ margin-top: auto; align-self: flex-start; }

.section-divider{
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: var(--space-md) 0;
  color: var(--text-faint);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.section-divider::before,
.section-divider::after{
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.steps-diagram{
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0;
  position: relative;
}

.steps-diagram__node{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 16.6%;
  min-width: 92px;
  padding: 0.3rem;
  position: relative;
}

.steps-diagram__node::after{
  content: "";
  position: absolute;
  top: 16px;
  left: calc(50% + 20px);
  width: calc(100% - 40px);
  height: 2px;
  background: var(--gradient-signature);
  opacity: 0.4;
}

.steps-diagram__node:nth-child(6n)::after{ display: none; }

.steps-diagram__num{
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-signature);
  color: #14121f;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
  position: relative;
  z-index: 1;
}

.steps-diagram__node--final .steps-diagram__num{ background: var(--gold); }

.steps-diagram__label{
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.25;
}

/* ============================================================
   Krok-po-kroku vedení v chatu — progress dots + sbalitelné kroky
   ============================================================ */

.step-progress{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.step-progress__label{
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.step-progress__dots{ display: flex; gap: 0.3rem; flex-wrap: wrap; }

.step-progress__dot{
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
}

.step-progress__dot.is-done{ background: var(--gold); }
.step-progress__dot.is-active{
  background: var(--flame);
  box-shadow: 0 0 0 3px var(--flame-dim);
}

.step-group{
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 0.6rem 0;
  overflow: hidden;
  background: var(--bg-elevated);
}

.step-group summary{
  padding: 0.55rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
}

.step-group summary::-webkit-details-marker{ display: none; }

.step-group summary::before{ content: "▸ "; color: var(--flame); }
.step-group[open] summary::before{ content: "▾ "; }

.step-group .chat-bubble{ margin: 0.4rem 0.8rem; }
.step-group .chat-bubble:last-child{ margin-bottom: 0.7rem; }

.goal-summary-card{
  border: 1px solid var(--gold-dim);
  background: linear-gradient(160deg, var(--bg-elevated-2), var(--bg-elevated));
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin: 0.8rem 0;
}

.goal-summary-card__eyebrow{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.4rem;
}

.goal-summary-card__title{ font-size: 1.15rem; margin-bottom: 0.4rem; }

.goal-summary-card__desc{ color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0.9rem; }

/* ============================================================
   Dnes — hero banner: generovaná vlnící se struktura na pozadí,
   text přímo na ní (canvas animace, ne statický obrázek)
   ============================================================ */

.hero-banner{
  position: relative;
  min-height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  background: var(--bg-elevated);
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--border);
}

#hero-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-banner__scrim{
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(20,18,31,0.93) 0%, rgba(20,18,31,0.8) 38%, rgba(20,18,31,0.42) 62%, rgba(20,18,31,0.05) 85%);
  pointer-events: none;
}

.hero-banner__content{
  position: relative;
  z-index: 2;
  padding: var(--space-lg);
  max-width: 560px;
  text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}

.hero-banner__content h1{ font-size: 2rem; margin: 0.3rem 0 0.7rem; }

.hero-banner__motto{
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.02rem;
  color: var(--flame);
  margin: 0 0 var(--space-md);
  line-height: 1.4;
  text-wrap: balance;
}

.hero-banner__motto-label{
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  white-space: nowrap;
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
  margin-right: 0.4em;
}

.hero-banner__motto-label .spark-icon{
  width: 0.85em;
  height: 0.85em;
  color: var(--gold);
}

@media (max-width: 640px){
  .hero-banner{ min-height: 340px; }
  .hero-banner__content{ max-width: 100%; }
}

/* ============================================================
   Dnes — jiskrový kruh
   ============================================================ */

.today-hero{
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-wrap: wrap;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
}

.spark-ring{ position: relative; width: 132px; height: 132px; flex-shrink: 0; }

.spark-ring svg{ width: 100%; height: 100%; transform: rotate(-90deg); }

.spark-ring circle{
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
}

.spark-ring .track{ stroke: var(--bg-elevated-2); }

.spark-ring .progress{
  stroke: url(#ring-gradient);
  stroke-dasharray: 345;
  stroke-dashoffset: 230;
  transition: stroke-dashoffset 1s cubic-bezier(.22,1,.36,1);
}

.spark-ring__label{
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.spark-ring__count{ font-family: var(--font-mono); font-size: 1.3rem; font-weight: 600; }
.spark-ring__count small{ display: block; font-size: 0.6rem; color: var(--text-faint); text-align: center; }

.today-hero__text{ flex: 1; min-width: 220px; }

.today-hero__theme{ font-size: 1.4rem; margin: 0.3rem 0 0.7rem; }

.today-hero__actions{ display: flex; gap: 0.6rem; margin-top: var(--space-sm); flex-wrap: wrap; }

.streak-strip{
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.streak-chip{
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  text-align: center;
}

.streak-chip__num{
  font-family: var(--font-mono); font-size: 1.4rem;
  background: var(--gradient-signature);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.streak-chip__label{ font-size: 0.72rem; color: var(--text-faint); margin-top: 2px; }

/* ============================================================
   Techniky — koncept karty
   ============================================================ */

.concept-grid{ display: grid; gap: var(--space-sm); grid-template-columns: 1fr; }

@media (min-width: 640px){
  .concept-grid{ grid-template-columns: 1fr 1fr; }
}

.concept-card{
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.concept-card__num{
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--gradient-signature);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  opacity: 0.8;
}

.concept-card h3{ font-size: 1.15rem; margin: 0.4rem 0 0.5rem; }

.concept-card p{ color: var(--text-muted); font-size: 0.88rem; }

.concept-card--locked{ opacity: 0.55; }

.concept-card__footer{
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.6rem;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.btn--sm{
  padding: 0.45rem 0.75rem;
  font-size: 0.78rem;
}

.btn--sm:disabled{ opacity: 0.5; cursor: default; }

.module-note{
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-top: var(--space-md);
}

/* ============================================================
   Cíle
   ============================================================ */

.steps{ counter-reset: step; }

.step-row{
  display: flex; align-items: flex-start; gap: 0.8rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
}

.step-row:last-child{ border-bottom: none; }

.step-row__num{
  counter-increment: step;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--violet);
  background: var(--violet-dim);
  border-radius: 50%;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.step-row__num::before{ content: counter(step); }

.step-row__text{ font-size: 0.92rem; color: var(--text-muted); padding-top: 3px; }

.empty-state{
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--text-muted);
}

.empty-state h3{ color: var(--text-primary); margin-bottom: 0.4rem; }

.empty-state p{ font-size: 0.9rem; max-width: 40ch; margin: 0 auto; }

/* ============================================================
   Hodnoty
   ============================================================ */

.value-areas{ display: grid; gap: var(--space-sm); grid-template-columns: repeat(2, 1fr); }

@media (min-width: 640px){
  .value-areas{ grid-template-columns: repeat(3, 1fr); }
}

.value-area{
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-sm) var(--space-md);
}

.value-area__count{ font-family: var(--font-mono); font-size: 1.5rem; color: var(--gold); }

.value-area__label{ font-size: 0.82rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ============================================================
   Časová schránka
   ============================================================ */

.capsule-card{
  background: linear-gradient(160deg, var(--violet-dim), transparent 60%), var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
}

.capsule-card h3{ font-size: 1.2rem; margin-bottom: 0.5rem; }

.capsule-card p{ color: var(--text-muted); font-size: 0.92rem; max-width: 55ch; }

/* ============================================================
   AI Kouč — placeholder chat
   ============================================================ */

.goal-coach-banner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  background: var(--gold-dim);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-sm);
  font-size: 0.85rem;
}

.goal-coach-banner__text strong{ color: var(--gold); }

.goal-coach-banner__actions{ display: flex; gap: 0.4rem; flex-wrap: wrap; }

.chat-shell{
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
}

.chat-bubble{
  max-width: 80%;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  margin-bottom: 0.6rem;
}

.chat-bubble--coach{
  background: var(--bg-elevated-2);
  border-bottom-left-radius: 4px;
}

.chat-bubble--user{
  background: var(--gradient-signature);
  color: #14121f;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-input-row{
  margin-top: auto;
  display: flex; gap: 0.6rem;
  padding-top: var(--space-sm);
}

.chat-input-row input{
  flex: 1;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.7rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
}

#chat-messages{
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.chat-bubble--typing{
  display: flex; gap: 4px; align-items: center;
  padding: 0.9rem 1rem;
}

.chat-bubble--typing span{
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--text-faint);
  animation: typing-bounce 1s infinite ease-in-out;
}

.chat-bubble--typing span:nth-child(2){ animation-delay: 0.15s; }
.chat-bubble--typing span:nth-child(3){ animation-delay: 0.3s; }

@keyframes typing-bounce{
  0%, 60%, 100%{ transform: translateY(0); opacity: 0.5; }
  30%{ transform: translateY(-4px); opacity: 1; }
}

.chat-input-row input:disabled{ opacity: 0.6; }
.chat-input-row input::placeholder{ color: var(--text-faint); }

/* ============================================================
   Notifikace
   ============================================================ */

.toggle-row{
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border);
}

.toggle-row:last-child{ border-bottom: none; }

.toggle-row__text strong{ display: block; font-size: 0.92rem; }
.toggle-row__text span{ font-size: 0.8rem; color: var(--text-faint); }

.toggle{
  width: 42px; height: 24px;
  background: var(--bg-elevated-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  position: relative;
  flex-shrink: 0;
}

.toggle::after{
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--text-faint);
  transition: transform 0.2s ease, background 0.2s ease;
}

.toggle.is-on{ background: var(--flame-dim); border-color: var(--flame); }
.toggle.is-on::after{ transform: translateX(18px); background: var(--flame); }

/* ============================================================
   Spodní navigace (mobil)
   ============================================================ */

.bottomnav{
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-height);
  background: rgba(20,18,31,0.92);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 20;
}

.bottomnav__item{
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px;
  font-size: 0.62rem;
  color: var(--text-faint);
  font-weight: 700;
}

.bottomnav__item svg{ width: 20px; height: 20px; }

.bottomnav__item[aria-current="page"]{ color: var(--flame); }

/* --- "Více" sheet --- */

.more-sheet{
  position: fixed; inset: 0;
  background: rgba(10,9,16,0.6);
  display: none;
  align-items: flex-end;
  z-index: 30;
}

.more-sheet.is-open{ display: flex; }

.more-sheet__panel{
  width: 100%;
  background: var(--bg-elevated);
  border-radius: 22px 22px 0 0;
  padding: var(--space-md);
  padding-bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
  border: 1px solid var(--border);
}

.more-sheet__grip{
  width: 36px; height: 4px;
  background: var(--border-strong);
  border-radius: 999px;
  margin: 0 auto var(--space-md);
}

.more-sheet__list{ display: flex; flex-direction: column; gap: 2px; }

.more-sheet__footer{
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  justify-content: center;
}

@media (min-width: 768px){
  .more-sheet{ display: none !important; }
}
