/* ─────────────────────────────────────────────────────────────────────────────
   THE FAMILY CEO — Design System
   Dark · Gold · Mobile-first
───────────────────────────────────────────────────────────────────────────── */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

:root {
  --gold:          #C9A96E;
  --gold-light:    #E8D5A3;
  --gold-dark:     #9E7A45;
  --gold-subtle:   rgba(201,169,110,.12);
  --black:         #0D0D0D;
  --dark:          #1A1A1A;
  --dark2:         #242424;
  --dark3:         #2E2E2E;
  --dark4:         #3A3A3A;
  --text:          #F0EDE6;
  --text-muted:    #8A8178;
  --text-faint:    #5A534C;
  --success:       #4CAF7D;
  --success-bg:    rgba(76,175,125,.15);
  --error:         #E05C5C;
  --gold-tint:     #1F1A12;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.35);
  --shadow-md:     0 8px 32px rgba(0,0,0,.5);
  --shadow-lg:     0 12px 48px rgba(0,0,0,.6);

  --radius-sm:     0px;
  --radius:        0px;
  --radius-lg:     0px;
  --nav-h:         68px;
  --topbar-h:      52px;

  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 0; }
:focus:not(:focus-visible) { outline: none; }

html, body {
  height: 100%;
  background: var(--black);
  color: var(--text);
  overscroll-behavior: none;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

#fc-app {
  width: 100%;
  max-width: 430px;
  min-height: 100dvh;
  background: var(--black);
  position: relative;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────────────────────── */

h1 { font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
h2 { font-size: 20px; font-weight: 700; line-height: 1.3; letter-spacing: -.01em; }
h3 { font-size: 16px; font-weight: 600; letter-spacing: -.005em; }
p  { font-size: 14.5px; line-height: 1.65; color: var(--text-muted); font-weight: 400; }

.fc-label {
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold);
}

/* ── LAYOUT ──────────────────────────────────────────────────────────────── */

.fc-screen {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
}

.fc-screen--full {
  min-height: 100dvh;
  padding-bottom: 0;
}

.fc-page-header {
  padding: 56px 20px 20px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.fc-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 0;
  background: var(--gold-subtle);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.fc-scroll {
  padding: 0 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── AVATAR ──────────────────────────────────────────────────────────────── */

.fc-avatar {
  border-radius: 0;
  background: var(--gold-subtle);
  border: 1.5px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.fc-avatar--sm { width: 38px; height: 38px; font-size: 16px; border-width: 1px; }
.fc-avatar--md { width: 44px; height: 44px; font-size: 18px; }
.fc-avatar--lg { width: 48px; height: 48px; font-size: 20px; }

/* ── TOGGLE ──────────────────────────────────────────────────────────────── */

.fc-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  cursor: pointer;
}
.fc-toggle input { position: absolute; opacity: 0; width: 0; height: 0; }
.fc-toggle__track {
  position: absolute; top: 50%; right: 0; transform: translateY(-50%);
  width: 44px; height: 24px;
  background: var(--dark3);
  border-radius: 0;
  transition: background .2s;
}
.fc-toggle__thumb {
  position: absolute; top: 50%; left: 2px; transform: translateY(-50%);
  width: 20px; height: 20px;
  background: var(--text-muted);
  border-radius: 0;
  transition: transform .2s, background .2s;
}
.fc-toggle input:checked ~ .fc-toggle__track { background: var(--gold-subtle); }
.fc-toggle input:checked ~ .fc-toggle__thumb { transform: translateY(-50%) translateX(20px); background: var(--gold); }

/* ── TOP VIEW SWITCHER (Admin only) ─────────────────────────────────────── */

#fc-topbar {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  z-index: 110;
  padding: calc(env(safe-area-inset-top, 0px) + 8px) 16px 8px;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  justify-content: center;
}
#fc-topbar:empty { display: none; }

.fc-view-switch {
  display: flex;
  width: 100%;
  max-width: 240px;
  background: var(--dark2);
  border-radius: 0;
  padding: 3px;
  gap: 2px;
}

.fc-view-btn {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-radius: 0;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.15s, color 0.15s;
}

.fc-view-btn.active {
  background: var(--gold);
  color: var(--black);
}

body.fc-has-topbar .fc-page-header {
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--topbar-h) + 16px);
}
body.fc-has-topbar .fc-cockpit-header {
  padding-top: calc(env(safe-area-inset-top, 0px) + var(--topbar-h) + 16px);
}

/* ── BOTTOM NAV ──────────────────────────────────────────────────────────── */

.fc-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px));
  background: rgba(26,26,26,.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.fc-nav-logo { display: none; }

.fc-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 16px;
  cursor: pointer;
  border: none;
  background: none;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}

.fc-nav-item svg { width: 22px; height: 22px; }
.fc-nav-item span { white-space: nowrap; }

.fc-nav-item.active { color: var(--gold); }

.fc-nav-item.active svg path,
.fc-nav-item.active svg rect,
.fc-nav-item.active svg circle { stroke: var(--gold); }


/* ── CARDS ───────────────────────────────────────────────────────────────── */

.fc-card {
  background: var(--dark);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}

.fc-card--gold {
  background: linear-gradient(135deg, rgba(201,169,110,.18) 0%, rgba(201,169,110,.06) 100%);
  border-color: rgba(201,169,110,.25);
}

.fc-card--action {
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}

.fc-card--action:active { transform: scale(.98); }

/* ── STREAK HERO ─────────────────────────────────────────────────────────── */

.fc-streak-hero {
  background: linear-gradient(160deg, #1F1A12 0%, #0D0D0D 100%);
  border: 1px solid rgba(201,169,110,.2);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.fc-streak-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(201,169,110,.12) 0%, transparent 70%);
  pointer-events: none;
}

.fc-streak-number {
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
  color: var(--gold);
  letter-spacing: -.02em;
}

.fc-streak-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ── XP BAR ──────────────────────────────────────────────────────────────── */

.fc-xp-bar {
  height: 6px;
  background: var(--dark3);
  border-radius: 0;
  overflow: hidden;
  margin-top: 12px;
}

.fc-xp-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
  border-radius: 0;
  transition: width .4s cubic-bezier(.34,1.56,.64,1);
}

.fc-level-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.fc-level-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.fc-xp-text {
  font-size: 11px;
  color: var(--text-faint);
}

/* ── QUICK WINS ──────────────────────────────────────────────────────────── */

.fc-quick-wins {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fc-win-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 0;
  cursor: pointer;
  transition: background .12s;
  -webkit-tap-highlight-color: transparent;
}

.fc-win-item:active { background: var(--dark3); }

.fc-win-check {
  width: 22px; height: 22px;
  border-radius: 0;
  border: 2px solid var(--dark4);
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}

.fc-win-item.done .fc-win-check {
  background: var(--success-bg);
  border-color: var(--success);
  color: var(--success);
}

.fc-win-label {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}

.fc-win-item.done .fc-win-label {
  color: var(--text-faint);
  text-decoration: line-through;
  text-decoration-color: var(--text-faint);
}

.fc-win-xp {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

/* ── ACTION CARDS (Reflexion, Family Board) ──────────────────────────────── */

.fc-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fc-action-card {
  background: var(--dark2);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 18px 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .15s;
  -webkit-tap-highlight-color: transparent;
}

.fc-action-card:active { opacity: .85; }

.fc-action-card.done {
  border-color: rgba(76,175,125,.3);
  background: rgba(76,175,125,.06);
}

.fc-action-icon {
  font-size: 26px;
  line-height: 1;
  color: var(--gold);
}

.fc-action-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}

.fc-action-sub {
  font-size: 11.5px;
  color: var(--text-faint);
}

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */

.fc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 0;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
  text-align: center;
  line-height: 1;
}

.fc-btn:active { transform: scale(.97); opacity: .9; }

.fc-btn-primary {
  background: var(--gold);
  color: var(--black);
  width: 100%;
}

.fc-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--dark3);
  width: 100%;
}

.fc-btn-danger {
  background: rgba(224,92,92,.15);
  color: var(--error);
  border: 1.5px solid rgba(224,92,92,.25);
  width: 100%;
}

.fc-btn-secondary {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid rgba(201,169,110,.4);
  width: 100%;
}

.fc-btn:disabled {
  opacity: .4;
  pointer-events: none;
}

/* ── INPUTS ──────────────────────────────────────────────────────────────── */

.fc-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--dark2);
  border: 1.5px solid var(--dark4);
  border-radius: 0;
  font-size: 16px;
  color: var(--text);
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}

.fc-input:focus { border-color: var(--gold); }
.fc-input::placeholder { color: var(--text-faint); }

.fc-textarea {
  resize: none;
  min-height: 120px;
  line-height: 1.65;
}

.fc-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8178' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}

/* ── BADGE ───────────────────────────────────────────────────────────────── */

.fc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fc-badge--gold {
  background: var(--gold-subtle);
  color: var(--gold);
  border: 1px solid rgba(201,169,110,.3);
}

.fc-badge--success {
  background: var(--success-bg);
  color: var(--success);
}

/* ── PROGRESS RING ───────────────────────────────────────────────────────── */

.fc-ring {
  transform: rotate(-90deg);
}

/* ── ONBOARDING ──────────────────────────────────────────────────────────── */

.fc-onboarding {
  min-height: 100dvh;
  padding: 56px 24px 40px;
  display: flex;
  flex-direction: column;
}

.fc-ob-step-dots {
  display: flex;
  gap: 6px;
  margin-bottom: 40px;
}

.fc-ob-step-dot {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--dark3);
  transition: background .3s;
}

.fc-ob-step-dot.active { background: var(--gold); }
.fc-ob-step-dot.done { background: var(--gold-dark); }

.fc-ob-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fc-ob-nav {
  display: flex;
  gap: 10px;
  margin-top: 32px;
}

/* ── BRAND VALUE CHIPS ───────────────────────────────────────────────────── */

.fc-value-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.fc-value-verantwortung { background: rgba(201,169,110,.15); color: #D4AA62; }
.fc-value-ehrlichkeit   { background: rgba(76,175,125,.12);  color: #5DC991; }
.fc-value-klarheit      { background: rgba(100,160,220,.12); color: #7BB8E8; }
.fc-value-fuehrung      { background: rgba(200,100,100,.12); color: #E08080; }
.fc-value-uebergreifend { background: rgba(160,120,220,.12); color: #B490E0; }

/* ── REFLECTION SCREEN ───────────────────────────────────────────────────── */

.fc-reflection-card {
  background: linear-gradient(160deg, #1A1810 0%, #0D0D0D 100%);
  border: 1px solid rgba(201,169,110,.2);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
}

.fc-question-text {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.55;
}

/* ── PROGRESS SCREEN — HEATMAP ───────────────────────────────────────────── */

.fc-heatmap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(13px, 1fr));
  gap: 3px;
}

.fc-heatmap-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  background: var(--dark3);
}

.fc-heatmap-cell.active { background: var(--gold); }
.fc-heatmap-cell.today  { background: var(--gold-light); }

/* ── BADGE GRID ──────────────────────────────────────────────────────────── */

.fc-badge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.fc-badge-item {
  background: var(--dark2);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.fc-badge-item.earned { border-color: rgba(201,169,110,.3); }
.fc-badge-item.locked { opacity: .35; }

.fc-badge-icon { font-size: 28px; color: var(--gold); }

.fc-badge-name {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ── AUTH SCREEN ─────────────────────────────────────────────────────────── */

.fc-auth {
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 28px 44px;
  text-align: center;
  overflow: hidden;
  background: var(--black);
}

/* Dramatisches Licht + angedeutete Saeulen, langsam animiert */
.fc-auth::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 42% at 50% 30%, rgba(232,213,163,.20) 0%, rgba(201,169,110,.08) 35%, transparent 62%),
    radial-gradient(ellipse 140% 60% at 50% 112%, rgba(212,170,98,.38) 0%, rgba(201,169,110,.15) 28%, transparent 60%),
    linear-gradient(90deg, rgba(201,169,110,.11) 0%, transparent 18%, transparent 82%, rgba(201,169,110,.11) 100%);
  pointer-events: none;
  animation: fc-auth-glow 13s ease-in-out infinite alternate;
}
/* Heller Kern-Glow hinter dem Logo — deutlich sichtbarer Lichtpunkt */
.fc-auth::after {
  content: '';
  position: absolute;
  left: 50%; top: 34%;
  width: 460px; height: 460px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(232,213,163,.13) 0%, rgba(201,169,110,.05) 40%, transparent 70%);
  pointer-events: none;
  animation: fc-auth-pulse 13s ease-in-out infinite alternate;
}
.fc-auth > * { position: relative; z-index: 1; }

.fc-auth-topbar {
  position: absolute;
  top: 0; right: 0;
  padding: 22px 26px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold); font-weight: 500;
  z-index: 2;
}
.fc-auth-topbar svg { width: 13px; height: 13px; }

.fc-auth-mark {
  width: 148px;
  height: auto;
  margin-bottom: 22px;
  flex-shrink: 0;
  object-fit: contain;
}

.fc-auth-divider {
  width: 38px; height: 1px;
  background: var(--gold);
  opacity: .55;
  margin: 2px 0 26px;
}

.fc-auth-tagline {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 2;
  color: var(--text);
  margin-bottom: 22px;
}

.fc-auth-eyebrow {
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 40px;
}

.fc-auth-form {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fc-auth-formlabel {
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 2px;
}

.fc-auth .fc-input {
  background: rgba(22,22,22,.55);
  border-color: rgba(201,169,110,.28);
  text-align: left;
}
.fc-auth .fc-input:focus { border-color: var(--gold); }

.fc-auth-secure {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
}
.fc-auth-secure svg { width: 14px; height: 14px; color: var(--text-faint); }
.fc-auth-secure p {
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-faint);
  line-height: 1.8;
  max-width: 290px;
}

.fc-auth-legal {
  margin-top: 26px;
  display: flex;
  gap: 24px;
  justify-content: center;
}
.fc-auth-legal button {
  background: none; border: none;
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-faint); cursor: pointer; padding: 4px;
}

@keyframes fc-auth-glow {
  from { opacity: .6; }
  to   { opacity: .9; }
}
@keyframes fc-auth-pulse {
  from { opacity: .55; transform: translate(-50%, -50%) scale(.96); }
  to   { opacity: .85; transform: translate(-50%, -50%) scale(1.04); }
}

/* ── COCKPIT LAYOUT ──────────────────────────────────────────────────────── */

.fc-cockpit {
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom, 0px));
}

.fc-cockpit-header {
  padding: 56px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  margin-bottom: 4px;
}

.fc-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.fc-kpi-tile {
  background: var(--dark);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.fc-kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.fc-kpi-label {
  font-size: 12px;
  color: var(--text-muted);
}

/* ── ATTENTION LIST ──────────────────────────────────────────────────────── */

.fc-attention-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--dark);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 0;
}

.fc-attention-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}

.fc-attention-dot.high   { background: var(--error); }
.fc-attention-dot.medium { background: var(--gold); }
.fc-attention-dot.low    { background: var(--success); }

/* ── MEMBER GRID (Basis = Mobil: 1 Spalte mit Abstand; Media-Queries -> mehr Spalten) ── */
.fc-members-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* ── UTILS ───────────────────────────────────────────────────────────────── */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

.text-gold  { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-faint { color: var(--text-faint); }
.text-sm { font-size: 12.5px; }
.text-xs { font-size: 11px; }
.font-bold { font-weight: 700; }

.divider {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 4px 0;
}

/* ── TOAST ───────────────────────────────────────────────────────────────── */

#fc-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-80px);
  max-width: 390px;
  width: calc(100% - 40px);
  background: var(--dark2);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 0;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  z-index: 9999;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  text-align: center;
  box-shadow: var(--shadow-md);
}

#fc-toast.show { transform: translateX(-50%) translateY(0); }
#fc-toast.success { border-color: rgba(76,175,125,.4); color: var(--success); }
#fc-toast.error   { border-color: rgba(224,92,92,.4);  color: var(--error); }

/* ── SPINNER ─────────────────────────────────────────────────────────────── */

.fc-spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--dark3);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: fc-spin .6s linear infinite;
  margin: 40px auto;
}

@keyframes fc-spin { to { transform: rotate(360deg); } }

/* ── FAMILY BOARD ────────────────────────────────────────────────────────── */

.fc-board-step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 0;
  background: var(--dark);
  border: 1px solid rgba(255,255,255,.06);
  cursor: pointer;
  transition: border-color .15s;
}

.fc-board-step:active { opacity: .85; }

.fc-board-step.active { border-color: rgba(201,169,110,.4); }
.fc-board-step.done   { border-color: rgba(76,175,125,.3); background: rgba(76,175,125,.05); }

.fc-board-step-num {
  width: 28px; height: 28px;
  border-radius: 0;
  background: var(--dark3);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.fc-board-step.active .fc-board-step-num { background: var(--gold); color: var(--black); }
.fc-board-step.done   .fc-board-step-num { background: var(--success-bg); color: var(--success); }

/* ── STAR RATING ─────────────────────────────────────────────────────────── */

.fc-stars {
  display: flex;
  gap: 6px;
}

.fc-star {
  cursor: pointer;
  transition: transform .1s, color .15s;
  color: var(--dark4);
  display: inline-flex;
  padding: 4px;
  -webkit-tap-highlight-color: transparent;
}
.fc-star svg { width: 30px; height: 30px; display: block; }

.fc-star.active {
  color: var(--gold);
  transform: scale(1.12);
}

/* ── SAFE AREA ───────────────────────────────────────────────────────────── */

.fc-screen { padding-top: env(safe-area-inset-top, 0px); }

/* ── 2-COLUMN LAYOUT (mobile = stack, desktop = side-by-side) ────────────── */

.fc-2col-layout {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fc-2col-layout > div {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── KI-ANALYSE TIMELINE ─────────────────────────────────────────────────── */

.fc-analyses-card { border-color: rgba(201,169,110,.35) !important; }

.fc-btn-analyse-new {
  background: none;
  border: 1px solid rgba(201,169,110,.3);
  border-radius: 0;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background .15s, border-color .15s;
}
.fc-btn-analyse-new:hover { background: rgba(201,169,110,.08); border-color: var(--gold); }
.fc-btn-analyse-new:disabled { opacity: .5; cursor: default; }

.fc-analyse-generating {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-faint);
  padding: 6px 0 8px;
}

.fc-analyse-entry {
  position: relative;
  padding: 10px 0 10px 16px;
  border-left: 2px solid var(--dark3);
}
.fc-analyse-entry + .fc-analyse-entry { margin-top: 2px; }
.fc-analyse-entry--latest { border-left-color: var(--gold); }

.fc-analyse-entry-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.fc-analyse-entry-date {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .05em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.fc-analyse-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201,169,110,.12);
  border: 1px solid rgba(201,169,110,.25);
  border-radius: 0;
  padding: 1px 6px;
}

.fc-analyse-entry-text {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--text);
}
.fc-analyse-entry-text--old {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── RESPONSIVE — TABLET (≥640px) ────────────────────────────────────────── */

@media (min-width: 640px) {
  #fc-app,
  #fc-topbar,
  .fc-nav              { max-width: 720px; }

  .fc-kpi-grid         { grid-template-columns: repeat(3, 1fr); }
  .fc-badge-grid       { grid-template-columns: repeat(4, 1fr); }
  .fc-heatmap          { grid-template-columns: repeat(auto-fill, minmax(15px, 1fr)); }
  .fc-members-grid     { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ── RESPONSIVE — DESKTOP (≥1024px) ─────────────────────────────────────── */

@media (min-width: 1024px) {
  :root { --sidebar-w: 220px; }

  body   { justify-content: flex-start; }
  #fc-app { max-width: 100%; }

  /* Sidebar navigation */
  .fc-nav {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    max-width: none;
    height: auto;
    transform: none;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    gap: 2px;
    padding: 28px 12px 32px;
    border-right: 1px solid rgba(255,255,255,.06);
    border-top: none;
    background: var(--black);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow-y: auto;
  }

  .fc-nav-logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 24px;
    flex-shrink: 0;
  }
  .fc-nav-logo-img {
    width: 100%;
    max-width: 150px;
    height: auto;
  }

  .fc-nav-item {
    flex-direction: row;
    justify-content: flex-start;
    padding: 11px 12px;
    gap: 12px;
    font-size: 13px;
    letter-spacing: .02em;
    border-radius: 0;
    text-align: left;
    width: 100%;
  }

  .fc-nav-item svg { width: 20px; height: 20px; }

  .fc-nav-item.active {
    background: var(--gold-subtle);
  }

  /* Shift all content right of sidebar */
  .fc-screen,
  .fc-cockpit { padding-left: var(--sidebar-w); padding-bottom: 48px; }

  .fc-onboarding { padding-left: calc(var(--sidebar-w) + 24px); }

  /* Stufen-Karussell → Grid: Desktop hat kein Touch-Wischen, alle Stufen zeigen */
  .fc-level-track      { flex-wrap: wrap; overflow-x: visible; margin: 0; padding: 0; }
  .fc-level-slide      { flex: 1 1 calc(33.333% - 8px); }
  .fc-level-slide__name { font-size: 22px; }
  .fc-level-swipe-hint { display: none; }

  /* Reduce top padding (no mobile status bar on desktop) */
  .fc-cockpit-header { padding-top: 40px; }
  .fc-page-header    { padding-top: 40px; }

  body.fc-has-topbar .fc-cockpit-header,
  body.fc-has-topbar .fc-page-header {
    padding-top: calc(var(--topbar-h) + 24px);
  }

  /* Topbar: right of sidebar */
  #fc-topbar {
    left: var(--sidebar-w);
    right: 0;
    max-width: none;
    transform: none;
    width: auto;
  }

  /* Cockpit scroll: generous padding */
  .fc-cockpit .fc-scroll {
    padding-left: 28px;
    padding-right: 40px;
  }

  /* Member screens: readable column width */
  .fc-screen .fc-scroll { max-width: 680px; }

  /* Grid overrides */
  .fc-kpi-grid     { grid-template-columns: repeat(4, 1fr); }
  .fc-badge-grid   { grid-template-columns: repeat(5, 1fr); }
  .fc-heatmap      { grid-template-columns: repeat(auto-fill, minmax(15px, 1fr)); }
  .fc-members-grid { grid-template-columns: repeat(3, 1fr); }

  /* 2-col activates on desktop */
  .fc-2col-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
  }

  /* Inhaltsbreiten begrenzen — kein Vollbreiten-Stretch auf Desktop */
  .fc-onboarding .fc-ob-step-dots,
  .fc-onboarding .fc-ob-content,
  .fc-onboarding .fc-ob-nav { max-width: 600px; margin-left: auto; margin-right: auto; width: 100%; }
  .fc-screen--full > div { max-width: 600px; margin-left: auto; margin-right: auto; }
  .fc-cockpit .fc-scroll { max-width: 1100px; }

  /* Toast rechts der Sidebar zentrieren */
  #fc-toast { left: calc(50% + var(--sidebar-w) / 2); }
}


/* ── HOVER (nur Zeigergeräte) ─────────────────────────────────────────────── */
@media (hover: hover) {
  .fc-card--action:hover    { border-color: rgba(201,169,110,.3); background: var(--dark2); }
  .fc-action-card:hover     { border-color: rgba(201,169,110,.25); }
  .fc-board-step:hover      { border-color: rgba(201,169,110,.3); }
  .fc-win-item:hover        { background: var(--dark2); }
  .fc-nav-item:hover        { color: var(--text-muted); }
  .fc-nav-item.active:hover { color: var(--gold); }
  .fc-btn:hover             { opacity: .92; }
  .fc-avatar-btn:hover      { background: rgba(201,169,110,.2); }
  .fc-star:hover            { color: var(--gold-dark); }
}


/* ── ANIMATIONEN (Runde 5) ────────────────────────────────────────────────── */

@keyframes fc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fc-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fc-pop  { 0% { transform: scale(0); opacity: 0; } 60% { transform: scale(1.1); } 100% { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .fc-enter { animation: fc-fade .22s ease-out; }
  .fc-enter .fc-page-header,
  .fc-enter .fc-cockpit-header,
  .fc-enter .fc-scroll,
  .fc-enter .fc-ob-content,
  .fc-enter .fc-auth { animation: fc-rise .32s cubic-bezier(.22,.61,.36,1); }
  .fc-seal__check { animation: fc-pop .5s cubic-bezier(.34,1.56,.64,1); }
}

/* Abschluss-Moment (Reflexion/Board versiegelt) */
.fc-seal {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(13,13,13,.94);
  display: flex; align-items: center; justify-content: center;
  animation: fc-fade .2s ease-out;
}
.fc-seal__inner { text-align: center; padding: 24px; }
.fc-seal__check {
  width: 88px; height: 88px; margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--gold-subtle);
  border: 2px solid var(--gold);
  color: var(--gold);
  display: flex; align-items: center; justify-content: center;
}
.fc-seal__check svg { width: 44px; height: 44px; }
.fc-seal__text { color: var(--text); font-size: 17px; font-weight: 600; }


/* ── LUCIDE-ICONS ─────────────────────────────────────────────────────────── */
.lucide { width: 1em; height: 1em; display: inline-block; vertical-align: -0.15em; flex-shrink: 0; }
.fc-star-on  { color: var(--gold); fill: var(--gold); }
.fc-star-off { color: var(--dark4); }
.fc-star.active svg { fill: var(--gold); }


/* ── ICON-BUTTON (quadratisch, Gold-Outline) ──────────────────────────────── */
.fc-icon-btn {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid rgba(201,169,110,.3);
  color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s, border-color .15s;
}
.fc-icon-btn .lucide { width: 20px; height: 20px; }
@media (hover: hover) { .fc-icon-btn:hover { background: var(--gold-subtle); border-color: var(--gold); } }


/* ── FORTSCHRITT: Wochenstreifen + Auszeichnungs-Fortschritt ──────────────── */
.fc-week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.fc-weekday { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fc-weekday-lbl { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.fc-weekday-dot {
  width: 100%; aspect-ratio: 1; max-width: 36px;
  display: flex; align-items: center; justify-content: center;
  background: var(--dark3);
  border: 1px solid transparent;
  color: var(--black);
}
.fc-weekday.active .fc-weekday-dot { background: var(--gold); }
.fc-weekday.today .fc-weekday-dot  { border-color: var(--gold); }
.fc-weekday.future .fc-weekday-dot { background: var(--dark2); opacity: .45; }
.fc-weekday-dot .lucide { width: 16px; height: 16px; }

.fc-badge-cond { font-size: 9.5px; line-height: 1.3; color: var(--text-faint); margin-top: 3px; }
.fc-badge-item.earned .fc-badge-cond { color: var(--success); }
.fc-badge-prog { height: 3px; width: 100%; background: var(--dark3); margin-top: 6px; }
.fc-badge-prog__fill { height: 100%; background: var(--gold); }


/* ── INSTALL-BANNER (Android-Prompt + iOS-Hinweis) ────────────────────────── */
.fc-install {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  width: calc(100% - 32px); max-width: 400px;
  background: var(--gold-tint);
  border: 1px solid rgba(201,169,110,.35);
  box-shadow: var(--shadow-md);
  padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 200;
}
.fc-install__icon { color: var(--gold); flex-shrink: 0; display: flex; }
.fc-install__icon .lucide { width: 26px; height: 26px; }
.fc-install__body { flex: 1; min-width: 0; }
.fc-install__title { font-size: 13px; font-weight: 700; color: var(--text); margin: 0 0 2px; }
.fc-install__sub { font-size: 12px; color: var(--text-muted); margin: 0; line-height: 1.45; }
.fc-install__add {
  background: var(--gold); color: var(--black); border: none;
  padding: 9px 14px; font-size: 12px; font-weight: 700; cursor: pointer; flex-shrink: 0;
  text-transform: uppercase; letter-spacing: .04em;
}
.fc-install__close { background: none; border: none; color: var(--text-faint); cursor: pointer; padding: 4px; flex-shrink: 0; display: flex; }
.fc-install__close .lucide { width: 18px; height: 18px; }
@media (min-width: 1024px) { .fc-install { left: auto; right: 24px; transform: none; bottom: 24px; } }

/* ── STUFEN-LEITER (Fortschritt) ──────────────────────────────────────────── */
.fc-level-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; margin-bottom: 6px;
  background: var(--dark); border: 1px solid rgba(255,255,255,.06);
}
.fc-level-row.current { border-color: rgba(201,169,110,.4); background: var(--gold-subtle); }
.fc-level-row__icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; color: var(--text-faint); flex-shrink: 0; }
.fc-level-row.reached .fc-level-row__icon { color: var(--gold); }
.fc-level-row__icon .lucide { width: 18px; height: 18px; }
.fc-level-row__name { font-size: 13.5px; font-weight: 600; color: var(--text); margin: 0; }
.fc-level-row:not(.reached) .fc-level-row__name { color: var(--text-muted); }
.fc-level-row__xp { font-size: 11px; color: var(--text-faint); margin: 2px 0 0; }


/* ── LEVEL-CAROUSEL (swipebar) ────────────────────────────────────────────── */
.fc-level-track {
  display: flex; gap: 12px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin: 0 -20px; padding: 0 20px;
}
.fc-level-track::-webkit-scrollbar { display: none; }
.fc-level-slide {
  scroll-snap-align: center;
  flex: 0 0 100%; box-sizing: border-box;
  background: linear-gradient(160deg, var(--gold-tint) 0%, var(--black) 100%);
  border: 1px solid rgba(201,169,110,.18);
  padding: 22px 20px; text-align: center;
  opacity: .45; transition: opacity .25s, border-color .25s;
}
.fc-level-slide.reached:not(.current) { opacity: .85; }
.fc-level-slide.current { opacity: 1; border-color: rgba(201,169,110,.45); }
.fc-level-slide__icon { color: var(--text-faint); margin-bottom: 8px; display: flex; justify-content: center; }
.fc-level-slide.reached .fc-level-slide__icon { color: var(--gold); }
.fc-level-slide__icon .lucide { width: 22px; height: 22px; }
.fc-level-slide__name { font-size: 30px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.fc-level-slide__xp { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ── MEMBER-TAGS (Coaching / App) ─────────────────────────────────────────── */
.fc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fc-tag { display: inline-flex; align-items: center; font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; font-weight: 700; padding: 3px 8px; border: 1px solid; }
.fc-tag--coaching { color: var(--gold); border-color: rgba(201,169,110,.4); background: var(--gold-subtle); }
.fc-tag--app { color: #7BB8E8; border-color: rgba(123,184,232,.35); background: rgba(123,184,232,.12); }
.fc-tag-toggles { display: flex; gap: 8px; }
.fc-tag-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; letter-spacing: .04em;
  padding: 8px 14px; cursor: pointer;
  background: transparent; border: 1px solid var(--dark4); color: var(--text-muted);
  -webkit-tap-highlight-color: transparent; transition: background .15s, border-color .15s, color .15s;
}
.fc-tag-toggle.on { background: var(--gold-subtle); border-color: var(--gold); color: var(--gold); }
.fc-tag-toggle .lucide { width: 14px; height: 14px; }

/* ── TRANSKRIPT EINKLAPPEN ────────────────────────────────────────────────── */
.fc-transcript-body { font-size: 13px; color: var(--text); line-height: 1.6; white-space: pre-wrap; }
.fc-transcript-det summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--gold);
  -webkit-tap-highlight-color: transparent;
}
.fc-transcript-det summary::-webkit-details-marker { display: none; }
.fc-transcript-det summary .lucide { width: 15px; height: 15px; transition: transform .2s; }
.fc-transcript-det[open] summary .lucide { transform: rotate(180deg); }
.fc-transcript-det .fc-transcript-body { margin-top: 8px; }


/* ── ANMELDEN-BUTTON: dezenter Premium-Shine ──────────────────────────────── */
.fc-auth .fc-btn-primary { position: relative; overflow: hidden; }
.fc-auth .fc-btn-primary::after {
  content: '';
  position: absolute; top: 0; left: -60%;
  width: 55%; height: 100%;
  background: linear-gradient(100deg, transparent 0%, rgba(255,255,255,.38) 50%, transparent 100%);
  transform: skewX(-20deg);
  pointer-events: none;
}
.fc-auth .fc-btn-primary .lucide { transition: transform .2s; }
@media (prefers-reduced-motion: no-preference) {
  .fc-auth .fc-btn-primary::after { animation: fc-shine 4.5s ease-in-out infinite; }
}
@keyframes fc-shine {
  0%   { left: -60%; }
  18%  { left: 130%; }
  100% { left: 130%; }
}
@media (hover: hover) {
  .fc-auth .fc-btn-primary:hover { box-shadow: 0 6px 22px rgba(201,169,110,.35); }
  .fc-auth .fc-btn-primary:hover .lucide { transform: translateX(3px); }
}

/* ── ANDROID EDGE-TO-EDGE (Chrome): stabiler Safe-Area-Platz ──────────────────
   env(safe-area-inset-bottom) ist auf Android Chrome DYNAMISCH: 0 solange die
   Browser-UI sichtbar ist, Systemleisten-Höhe (Gesten-Pill 24px / 3-Button 48px)
   sobald sie beim Scrollen wegklappt. Alles, was daran gekoppelt ist, springt
   deshalb bei jedem Scroll (Leiste wird höher, Buttons rücken hoch).
   safe-area-max-inset-bottom ist der STATISCHE Maximalwert: Platz wird konstant
   reserviert, nichts bewegt sich. iOS Safari kennt max-inset nicht (@supports
   greift nicht) und behält das dort ohnehin statische env(). Mobile-only, damit
   die Desktop-Sidebar-Regeln (≥1024px) nicht überschrieben werden. */
@supports (padding: env(safe-area-max-inset-bottom)) {
  @media (max-width: 1023.98px) {
    .fc-screen  { padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-max-inset-bottom, 0px)); }
    .fc-cockpit { padding-bottom: calc(var(--nav-h) + 16px + env(safe-area-max-inset-bottom, 0px)); }
    .fc-nav {
      height: calc(var(--nav-h) + env(safe-area-max-inset-bottom, 0px));
      padding-bottom: env(safe-area-max-inset-bottom, 0px);
    }
    .fc-install { bottom: calc(var(--nav-h) + 12px + env(safe-area-max-inset-bottom, 0px)); }
  }
}
