/* daygate_app.css — DayGate v5.5 (D1b steel rebrand, cloned from mobile v3.1)
 *
 * D1b scope: conservative light-theme rebrand — accents and day-state colors
 * swap to DayGate's steel palette; page bg and card bg stay light so the
 * mobile clone layout doesn't need re-authoring. Full dark theme is TODO
 * for D3.
 */

:root {
  /* DayGate ocean palette (mirrors daygate/index.html + landing mockups). */
  --navy:    #0C2340;
  --navy-2:  #0F2C50;
  --navy-3:  #123457;
  --steel:   #185FA5;
  --blue:    #378ADD;
  --sky:     #85B7EB;
  --sky-2:   #B5D4F4;
  --sky-mut: #6D9BC9;

  /* Day-state colors — semantic mapping per approved D1b palette:
   *   high performance -> green   #1D9E75
   *   mid performance  -> amber   #EF9F27
   *   low performance  -> deep    #17436B
   */
  --fire:    #1D9E75;
  --up:      #1D9E75;
  --hold:    #EF9F27;
  --close:   #EF9F27;
  --down:    #17436B;
  --fire-bg: #E1F5EE;
  --up-bg:   #E1F5EE;
  --hold-bg: #FBEED8;
  --close-bg:#FBEED8;
  --down-bg: #E6F1FB;

  /* Brand accents (used across cards, chips, primary buttons). */
  --brand1:  #185FA5;
  --brand2:  #378ADD;

  /* D3 dark theme — full ocean look per approved D2c mockups.
   * Every token below is used semantically across the sheet; hardcoded
   * whites still exist in places (buttons, inputs, sticky cells) and are
   * overridden in the "D3 dark theme overrides" block at the end of this
   * file so we do not have to touch every historical rule. */
  --bg:       #0C2340;   /* page background */
  --card-bg:  #0F2C50;   /* section cards */
  --card-bg-2:#123457;   /* nested cards / rows */
  --border:   #185FA5;   /* card + input borders */
  --text:     #FFFFFF;
  --text-2:   #B5D4F4;   /* secondary / labels */
  --muted:    #6D9BC9;   /* hints, meta */
  --paper-2:  #123457;   /* replaces old light --paper-2 sublayer */
  --radius:  16px;
  --topbar-h:52px;
  --nav-h:   60px;

  /* Low-band on dark: pure #17436B blends into the navy page. Keep the
   * hue but lift it slightly and pair with a blue outline so the cell
   * still reads as "low performance" without turning invisible. */
  --band-low-bg:      #1E4E7A;
  --band-low-border:  #378ADD;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
  overflow-x: hidden;
}

/* ── Topbar ─────────────────────────────────────────────────────────────── */
.topbar {
  /* M1b.3 · v7.46: .topbar je jen legacy wrapper; layout řídí .dg-topbar.
   * Non-fixed, non-sticky. */
  position: static;
  width: 100%;
  height: auto;
  background: transparent;
  display: block;
  padding: 0;
  z-index: auto;
}
.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.03em;
  text-decoration: none;
}
.topbar-brand svg { display: block; flex: none; }
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.topbar-lang {
  font-size: 0.68rem;
  font-weight: 700;
  color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.05em;
  cursor: pointer;
}
.topbar-lang:hover { background: rgba(255,255,255,0.26); }
.iconbtn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 4px;
  color: #fff;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 3px 6px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.iconbtn:hover { background: rgba(255,255,255,0.26); }
.hamburger {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  padding: 6px;
  line-height: 1;
}

/* ── Lang dropdown ──────────────────────────────────────────────────────── */
.lang-dropdown {
  position: fixed;
  top: calc(var(--topbar-h) + 2px);
  right: 56px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  z-index: 150;
  overflow: hidden;
  min-width: 96px;
}
.lang-dropdown-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
}
.lang-dropdown-item:last-child { border-bottom: none; }
.lang-dropdown-item:hover { background: var(--bg); }

/* ── Drawer ─────────────────────────────────────────────────────────────── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100%;
  background: #fff;
  z-index: 300;
  padding: 0;
  transition: right 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0,0,0,0.12);
}
.drawer.open { right: 0; }
.drawer-header {
  background: var(--brand1);
  color: #fff;
  font-weight: 700;
  padding: 18px 20px;
  font-size: 1rem;
  letter-spacing: 0.06em;
}
.drawer-section {
  padding: 16px 20px 8px;
  border-bottom: 1px solid var(--border);
}
.drawer-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 8px;
}
.lang-pills {
  display: flex;
  gap: 8px;
}
.lang-pill {
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.lang-pill.active {
  background: var(--brand1);
  color: #fff;
  border-color: var(--brand1);
}
.drawer-item {
  display: block;
  padding: 14px 20px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.drawer-item:hover { background: var(--bg); }
button.drawer-item { background: none; border: none; cursor: pointer; width: 100%; text-align: left; }
.drawer-item-rich {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.drawer-item-icon { font-size: 1.1rem; padding-top: 1px; }
.drawer-item-content { display: flex; flex-direction: column; }
.drawer-item-label { font-weight: 500; }
.drawer-item-hint { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }
.drawer-version {
  padding: 12px 20px;
  font-size: 0.78rem;
  color: var(--muted);
}
.drawer-section-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 0 6px;
  border-bottom: 1px solid var(--border);
}
.drawer-section-scroll > .drawer-label { padding: 0 20px; margin-bottom: 6px; }
.drawer-sublabel {
  display: block;
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 8px 20px 3px;
}
.drawer-top-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 16px 10px;
}
.drawer-top-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  text-align: center;
  transition: background 0.15s;
}
.drawer-top-card:hover { background: #F4F3FE; }
.drawer-top-card-icon {
  font-size: 1.3rem;
  color: var(--brand1);
  line-height: 1;
}
.drawer-top-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
}
.drawer-top-card-hint {
  font-size: 0.69rem;
  color: var(--muted);
  line-height: 1.2;
}
.drawer-item-analysis { padding: 10px 16px; }
.drawer-item-icon-sq {
  width: 32px;
  min-width: 32px;
  height: 32px;
  background: #EEEDFE;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}
.drawer-item-icon-sq--amber { background: #FEF3E2; }
.drawer-ext {
  margin-left: auto;
  font-size: 0.8rem;
  color: var(--muted);
  padding-left: 4px;
  align-self: center;
}
.drawer-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  padding: 5px 16px 10px;
}
.drawer-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  background: #F8F8FB;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 500;
  text-align: center;
  transition: background 0.15s;
}
.drawer-tile:hover { background: #EEEDFE; }
.drawer-tile-icon { font-size: 1.2rem; }
.drawer-tile-lbl { line-height: 1.2; }
.drawer-item-cache {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: var(--text);
  font-size: 0.95rem;
}
.drawer-item-cache:hover { background: #FEF9EC; }
.drawer-open-hint {
  font-size: 0.7rem;
  color: var(--muted);
  padding: 5px 20px 2px;
  margin: 0;
}
.drawer-footer {
  padding: 10px 20px;
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  margin-top: auto;
}

/* ── Screens container ──────────────────────────────────────────────────── */
.screens {
  /* M1b.3: hlavička už není fixed, nepotřebuje padding-top. */
  padding-top: 0;
  padding-bottom: var(--nav-h);
  min-height: 100dvh;
}
.screen { display: block; }
.screen.hidden { display: none; }
.screen-pad { padding: 16px; }

/* ── Bottom nav ─────────────────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: var(--nav-h);
  background: #fff;
  border-top: 1px solid var(--border);
  display: flex;
  z-index: 100;
}
.nav-tab {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.18s;
}
.nav-tab.active { color: var(--brand1); }
.nav-icon { font-size: 1.25rem; line-height: 1; }
.nav-label { font-size: 0.7rem; font-weight: 500; }

/* ── Cards ──────────────────────────────────────────────────────────────── */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  overflow: hidden;
}
.section-card { padding: 16px; }
.card-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text);
}

/* ── Hero card ──────────────────────────────────────────────────────────── */
.hero-card {
  background: linear-gradient(135deg, var(--brand1) 0%, var(--brand2) 100%);
  color: #fff;
  border-radius: 0;
  padding: 0;
}
/* ── PG-N4 · Lišta lidí (.pb) — Dnes (hero), Plánovač, rozklik dne ──────
 * Vlevo iniciály oblíbených, vpravo „Jméno ▾"; rozbalení .pb-menu v <body>.
 * DayGate modrá (mockup pg_lide_lista_v1.html). RULE 20: kopie FireDay
 * mobile/static/mobile.css. */
.profile-switcher { padding: 12px 16px 0; }
.pb-host { display: block; overflow: visible; }
.planner-people-bar { margin-bottom: 14px; }
.pb { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.pb-favs {
  display: flex; gap: 6px; flex: 1; min-width: 0;
  overflow: hidden; padding: 1px 2px;
}
.pb-av {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-weight: 800; font-size: 0.68rem; line-height: 1; letter-spacing: .3px; cursor: pointer;
  border: 2px solid #2a4b7e; background: #15284a; color: #bcd4f2;
  transition: background .15s, border-color .15s, color .15s;
}
.pb-av[hidden] { display: none; }
.pb-av:hover { border-color: var(--sky); }
.pb-av.on { background: #2f8be8; color: #fff; border-color: #9fd0ff; }
.pb-hero .pb-av { background: rgba(12,35,64,.55); border-color: rgba(255,255,255,.35); color: #dfe8f5; }
.pb-hero .pb-av.on { background: #fff; color: var(--steel); border-color: #9fd0ff; }
.pb-pick {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  max-width: 220px; height: 30px; padding: 0 10px 0 12px; border-radius: 999px;
  font-family: inherit; font-weight: 600; font-size: 0.82rem; line-height: 1; cursor: pointer; white-space: nowrap;
  border: 1px solid #2a4b7e; background: #0f2a4d; color: #dfe8f5;
}
.pb-hero .pb-pick { background: rgba(12,35,64,.45); border-color: rgba(255,255,255,.4); color: #fff; }
.pb-pick-nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pb-pick-av { display: none; font-weight: 800; font-size: 0.7rem; }
.pb-car { opacity: .8; font-size: 0.7rem; }
.pb-div { flex: none; width: 1px; height: 24px; background: rgba(255,255,255,.3); }
.day-header .day-header-row1 { gap: 8px; }
.day-people-bar { flex: 1; min-width: 0; }
.day-header-row1 .back-btn { white-space: nowrap; }
@media (pointer: coarse), (max-width: 599px) {
  .pb-favs { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
  .pb-favs::-webkit-scrollbar { display: none; }
}
@media (max-width: 419px) {
  .pb-pick { padding: 0 9px; }
  .pb-pick-nm { display: none; }
  .pb-pick-av { display: inline; }
}
/* rozbalení — jeden prvek v <body>, nad všemi vrstvami */
.pb-menu {
  position: fixed; z-index: 9600; width: 320px; max-height: 420px;
  display: flex; flex-direction: column;
  background: #0f2a4d; color: #dfe8f5; border: 1px solid #2a4b7e;
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.45); padding: 8px;
}
.pb-menu.hidden { display: none; }
.pb-menu-head { display: flex; gap: 6px; align-items: center; }
.pb-search {
  flex: 1; min-width: 0; border: 1px solid #2a4b7e; border-radius: 8px;
  padding: 7px 10px; font: inherit; font-size: 0.85rem; outline: none;
  background: #0b1b33; color: #fff;
}
.pb-search:focus { border-color: var(--blue); }
.pb-x {
  flex: none; width: 30px; height: 30px; border: 0; border-radius: 8px;
  background: transparent; color: var(--sky-2); font-size: 18px; cursor: pointer;
}
.pb-x:hover { background: #163a66; color: #fff; }
.pb-hint { display: flex; justify-content: space-between; gap: 8px; font-size: 0.72rem; color: var(--sky-mut); padding: 6px 6px 4px; }
.pb-hint-empty { color: #9fd0ff; font-weight: 600; }
.pb-list { overflow-y: auto; min-height: 0; flex: 1; }
.pb-row {
  display: flex; align-items: center; gap: 8px; padding: 5px 6px;
  border-radius: 8px; cursor: pointer; color: inherit; text-decoration: none;
}
.pb-row:hover { background: #163a66; }
.pb-row.on { background: #1d4a82; }
.pb-av-sm { width: 26px; height: 26px; font-size: 0.62rem; border-width: 1.5px; cursor: inherit; }
.pb-nm { flex: 1; min-width: 0; font-size: 0.84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pb-star {
  flex: none; border: 0; background: transparent; font-size: 17px; line-height: 1;
  color: #3d5f8f; cursor: pointer; padding: 2px 4px;
}
.pb-star.on { color: #ffd166; }
.pb-star:disabled { opacity: .35; cursor: not-allowed; }
.pb-row-tier, .pb-locked { cursor: default; }
.pb-row-tier .pb-av, .pb-row-tier .pb-nm, .pb-locked .pb-av, .pb-locked .pb-nm { opacity: .5; }
.pb-locked { cursor: pointer; }
.pb-lock { flex: none; font-size: 0.7rem; color: #9fd0ff; font-weight: 600; white-space: nowrap; }
.pb-foot { border-top: 1px solid #2a4b7e; margin-top: 6px; padding: 8px 6px 2px; font-size: 0.8rem; }
.pb-foot a { color: #9fd0ff; text-decoration: none; font-weight: 600; }

.hero-body { padding: 12px 16px 10px; }
.hero-date {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 4px;
}
.hero-subtitle {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.hero-donut-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.donut {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}
.hero-score-block {}
.hero-score {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}
.hero-verdict {
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 4px;
}
.hero-sub {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-top: 3px;
  max-width: 220px;
}

/* ── 7-day strip — style B (inside hero) ────────────────────────────────── */
.strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  padding: 8px 12px 14px;
}
.strip-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.strip-day {
  height: 36px;
  width: 100%;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: opacity 0.15s;
}
.strip-wrapper.strip-past .strip-day { opacity: 0.55; }
.strip-wrapper.today-strip .strip-day {
  outline: 2.5px solid #fff;
  outline-offset: 2px;
}
.strip-abbr {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.85);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}
.strip-num {
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.strip-strong-dot {
  position: absolute;
  bottom: 3px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
}

/* ── Strong teaser ──────────────────────────────────────────────────────── */
/* L5 · E (D-d5): tmavý řádek ve stylu DayGate místo bílého pruhu (fork z mobile/) */
.strong-teaser {
  background: var(--navy-2);
  border-bottom: 1px solid rgba(133,183,235,0.15);
  padding: 10px 16px;
  font-size: 0.82rem;
  color: var(--sky-2);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.strong-teaser:empty { display: none; }
.strong-teaser[data-tier-strong="locked"] { cursor: default; }
.strong-teaser a.tier-strong-up { color: #9FC1FF; font-weight: 700; text-decoration: none; }
.strong-teaser a.tier-strong-up:hover { text-decoration: underline; }

/* ── A-cell shared component (people today, connections grid) ───────────── */
.today-people-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}
.a-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}
.a-cell-svg { display: block; overflow: visible; }
.a-cell-name {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.a-cell-score {
  font-size: 0.75rem;
  font-weight: 800;
  text-align: center;
}

/* ── Tip ────────────────────────────────────────────────────────────────── */
.tip-text { font-size: 0.9rem; line-height: 1.5; color: var(--text); }
.tip-duo-btn {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 14px;
  border-radius: 20px;
  background: #E4EEF7;
  color: #185FA5;
  font-size: 0.8rem;
  font-weight: 600;
  border: .5px solid #B8D1EC;
  cursor: pointer;
  text-decoration: none;
}

/* ── Section title ──────────────────────────────────────────────────────── */
.section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 10px;
}

/* ── Screen title ───────────────────────────────────────────────────────── */
.screen-title {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--text);
}

/* ── Month nav ──────────────────────────────────────────────────────────── */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.month-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--brand1);
}
.month-label {
  font-size: 1rem;
  font-weight: 700;
}

/* ── Calendar grid ──────────────────────────────────────────────────────── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.cal-day-header {
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 0;
}
.cal-day {
  aspect-ratio: 1;
  border-radius: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.15s;
  color: #fff;
  position: relative;
}
.cal-day.today-cal {
  outline: 2.5px solid var(--brand1);
  outline-offset: 2px;
  box-shadow: none;
}
.cal-day.outside { background: #e9eaf0 !important; color: var(--muted); pointer-events: none; }
.cal-day-num { line-height: 1; font-size: 15px; font-weight: 700; }

/* ── Calendar legend with toggle ────────────────────────────────────────── */
.cal-legend {
  margin-bottom: 12px;
}
.legend-toggle-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 8px;
}
.legend-toggle-btn:hover { background: var(--bg); }
.legend-items-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}
.cal-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* ── Go/slow card ───────────────────────────────────────────────────────── */
.go-slow-card { padding: 14px; }
.go-slow-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 8px 0 6px;
}
.go-slow-title:first-child { margin-top: 0; }
.chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}
.day-chip {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1.5px solid currentColor;
}
.day-chip.up   { color: var(--up);   background: var(--up-bg); }
.day-chip.fire { color: var(--fire); background: var(--fire-bg); }
.day-chip.down { color: var(--down); background: var(--down-bg); }
.day-chip.close{ color: var(--close);background: var(--close-bg); }

/* ── PRO teaser ─────────────────────────────────────────────────────────── */
.pro-teaser {
  background: linear-gradient(135deg, #f0eeff, #e8e4ff);
  border: 1.5px solid #c4bcf5;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 0.85rem;
  color: var(--brand1);
  margin-bottom: 12px;
}
.pro-teaser:empty { display: none; }

/* ── People card list (people screen) ───────────────────────────────────── */
.people-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.person-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.15s;
}
.person-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.person-card-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand1);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.person-card-body { flex: 1; min-width: 0; }
.person-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}
.person-card-sub {
  font-size: 0.75rem;
  color: var(--brand1);
  font-weight: 600;
  margin-bottom: 2px;
}
.person-card-bio {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.person-card-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.person-card-big-score {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}
.person-card-pill {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
}
.person-card-star {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--muted);
  padding: 2px;
  line-height: 1;
  align-self: flex-end;
}
.person-card-star.active { color: #F5A623; }

/* ── Signal ring variants for people grid ───────────────────────────────── */
.sig-ring-fire  { background: var(--fire-bg); border-color: var(--fire);  color: var(--fire);  }
.sig-ring-up    { background: var(--up-bg);   border-color: var(--up);    color: var(--up);    }
.sig-ring-hold  { background: var(--hold-bg); border-color: var(--hold);  color: var(--hold);  }
.sig-ring-close { background: var(--close-bg);border-color: var(--close); color: var(--close); }
.sig-ring-down  { background: var(--down-bg); border-color: var(--down);  color: var(--down);  }

/* .profile-card kept as a JS query-selector hook for smoke tests only — no visual rules */
.avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--brand1);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.profile-card-body { flex: 1; min-width: 0; }
.profile-card-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.role-chip {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: #f0eeff;
  color: var(--brand1);
  font-weight: 600;
}
.profile-card-sub {
  font-size: 0.8rem;
  color: var(--brand1);
  font-weight: 600;
  margin-top: 2px;
}
.profile-card-bio {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.score-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 6px 10px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.fav-star {
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.fav-star.active { color: #F5A623; }

/* ── Connections ────────────────────────────────────────────────────────── */
.conn-hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.conn-all-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.conn-avatars {
  margin-bottom: 4px;
}
.conn-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg);
  border: 2.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--muted);
  transition: all 0.18s;
}
.conn-avatar.selected {
  border-color: var(--brand1);
  background: #f0eeff;
  color: var(--brand1);
}
.conn-fav-avatar {
  border-style: solid;
}
.conn-result { }
.conn-pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.conn-big-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--brand1);
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.conn-vs { font-size: 1.2rem; color: var(--muted); }
.conn-dynamic { font-size: 1rem; font-weight: 700; text-align: center; margin-bottom: 8px; }
.conn-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}
.conn-row:last-child { border-bottom: none; }
.conn-row-label { color: var(--muted); font-weight: 600; }
.conn-row-value { font-weight: 700; }
.stars { color: #F5A623; letter-spacing: 2px; }

/* ── Duo 7-day table ────────────────────────────────────────────────────── */
.duo-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.duo-table-row {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  gap: 4px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.duo-table-row:last-child { border-bottom: none; }
.duo-table-row.duo-today { background: #f0eeff; border-radius: 6px; }
.duo-table-header {
  display: grid;
  grid-template-columns: 36px 1fr 1fr;
  gap: 4px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
.duo-table-cell { text-align: center; }
.duo-date { color: var(--muted); font-weight: 700; font-size: 0.75rem; }
.duo-score {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 8px;
  font-weight: 700;
  color: #fff;
  font-size: 0.78rem;
}

/* ── Detail header ──────────────────────────────────────────────────────── */
.brand-bg {
  background: linear-gradient(135deg, var(--brand1) 0%, var(--brand2) 100%);
  color: #fff;
  padding: 16px 16px 20px;
}
.back-btn {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  padding: 6px 12px;
  cursor: pointer;
  margin-bottom: 10px;
  font-weight: 600;
}
.detail-header-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 3px;
}
.detail-header-ctx {
  font-size: 0.8rem;
  opacity: 0.8;
  margin-bottom: 10px;
}
.detail-score-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.detail-big-score {
  font-size: 2.6rem;
  font-weight: 900;
  line-height: 1;
}
.signal-pill {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* ── D7 2.1: #day header layout ───────────────────────────────────────── */
.day-header .day-header-row1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.day-header .day-header-row1 .back-btn { margin-bottom: 0; flex-shrink: 0; }
.day-header-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.day-header-left { flex: 1; min-width: 0; }
.day-header-date {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.72);
  margin-bottom: 2px;
}
.day-header-person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.day-person-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: rgba(0,0,0,0.25);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.day-header-name {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.day-header-score-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.day-header-score-col .detail-big-score { font-size: 2.4rem; }
.verdict-box { margin-top: 8px; }

/* D3: date row inside person detail header — arrow ‹ › + label + optional today badge. */
.person-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  color: #fff;
  font-size: 13px;
}
.person-date-arrow {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  color: #fff;
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.person-date-arrow:hover { background: rgba(255,255,255,0.18); }
.person-date-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}
.person-date-today-badge {
  font-size: 10px;
  padding: 2px 6px;
  background: var(--blue, #378ADD);
  color: #fff;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.person-date-today-badge.hidden { display: none; }
.verdict-title { font-size: 0.95rem; font-weight: 700; }
.verdict-sub   { font-size: 0.78rem; opacity: 0.85; margin-top: 3px; }
.header-chips  { flex-wrap: wrap; gap: 6px; padding: 0; }
.header-chip {
  padding: 4px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ── Day nav ────────────────────────────────────────────────────────────── */
.day-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 10px 16px;
}
.day-nav-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--brand1);
}
.today-btn {
  background: var(--brand1);
  color: #fff;
  border-color: var(--brand1);
}

/* ── Areas grid ─────────────────────────────────────────────────────────── */
.areas-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.area-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 12px;
}
.area-icon { font-size: 1.3rem; margin-bottom: 6px; }
.area-name { font-size: 0.78rem; font-weight: 700; color: var(--muted); margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.05em; }
.area-text { font-size: 0.82rem; line-height: 1.45; color: var(--text); }
.astro-ctx-card { padding: 14px; }
.astro-ctx-text { font-size: 0.88rem; color: var(--text); line-height: 1.5; }
.transit-item { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.82rem; }
.transit-item:last-child { border-bottom: none; }

/* ── Person detail ──────────────────────────────────────────────────────── */
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.tag {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--up-bg);
  color: var(--up);
}
.tags-row.neg .tag {
  background: var(--down-bg);
  color: var(--down);
}
.axes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.axis-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px;
}
.axis-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 4px;
}
.axis-value { font-size: 0.85rem; font-weight: 600; color: var(--text); }

/* ── Pinnacle timeline (tappable) ───────────────────────────────────────── */
.pinnacle-timeline {
  display: flex;
  height: 36px;
  border-radius: 10px;
  overflow: hidden;
  gap: 2px;
  margin-bottom: 8px;
}
.pin-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: rgba(91,79,199,0.5);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.18s;
  overflow: hidden;
  white-space: nowrap;
}
.pin-seg:hover { background: rgba(91,79,199,0.75); }
.pin-seg.current { background: var(--brand1); }
.pin-seg.pin-selected { background: #3d329e; outline: 2px solid var(--brand2); }
.pinnacle-panel {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 8px;
  line-height: 1.45;
}
.pinnacle-now-label {
  font-size: 0.82rem;
  color: var(--brand1);
  font-weight: 600;
}

/* ── Accordions ─────────────────────────────────────────────────────────── */
.accordion {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  overflow: hidden;
}
.acc-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 14px 16px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.acc-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--muted);
  transition: transform 0.2s;
}
.acc-trigger.open .acc-arrow { transform: rotate(90deg); }
.acc-body { padding: 0 16px 14px; }
.acc-body.hidden { display: none; }
.pro-acc { color: var(--brand1); }
.pro-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--brand1);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.acc-locked-text {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 8px 0;
}

/* Seal item inside accordion */
.seal-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.seal-item:last-child { border-bottom: none; }
.seal-name { font-weight: 700; font-size: 0.88rem; }
.seal-sub  { font-size: 0.8rem; color: var(--brand1); margin: 2px 0; }
.seal-text { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }
.num-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.num-row:last-child { border-bottom: none; }
.num-label { color: var(--muted); }
.num-value { font-weight: 700; }
.west-row, .east-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.west-row:last-child, .east-row:last-child { border-bottom: none; }
.west-label, .east-label { color: var(--muted); }
.west-value, .east-value { font-weight: 700; }

/* ── Signal colors ──────────────────────────────────────────────────────── */
.sig-fire  { background: var(--fire); }
.sig-up    { background: var(--up); }
.sig-hold  { background: var(--hold); }
.sig-close { background: var(--close); }
.sig-down  { background: var(--down); }

/* ── Toast ──────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: calc(var(--nav-h) + 10px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(26,26,46,0.9);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 0.88rem;
  z-index: 500;
  max-width: 320px;
  text-align: center;
  pointer-events: none;
}
.toast.hidden { display: none; }

/* ── Utility ────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.btn-outline {
  display: block;
  width: 100%;
  padding: 12px;
  border-radius: 6px;
  border: 1.5px dashed var(--border);
  background: transparent;
  color: var(--brand1);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  margin-bottom: 12px;
}
.btn-outline:hover { background: #E6F1FB; }

/* ── Loading skeleton ───────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #e8e9f0 25%, #f4f4f8 50%, #e8e9f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Connections A-cell grid ────────────────────────────────────────────── */
.conn-full-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.conn-grid-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  position: relative;
}
.conn-grid-name {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  max-width: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conn-check-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--brand1);
  color: #fff;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  border: 1.5px solid #fff;
}

/* ── Lang dropdown active item ──────────────────────────────────────────── */
.lang-dropdown-item.active-lang {
  color: var(--brand1);
  background: #f0eeff;
}
.lang-dropdown-item.active-lang::after {
  content: ' ✓';
  font-weight: 900;
}

/* ── Bottom nav active indicator bar ────────────────────────────────────── */
.nav-tab.active .nav-icon { color: var(--brand1); }
.nav-tab.active .nav-label { color: var(--brand1); font-weight: 700; }
.nav-tab.active::before {
  content: '';
  position: absolute;
  top: 0;
  width: 26px;
  height: 3px;
  background: var(--brand1);
  border-radius: 0 0 3px 3px;
}
.nav-tab { position: relative; }

/* ── Connections sticky bar ─────────────────────────────────────────────── */
.conn-sticky-bar {
  position: sticky;
  top: var(--topbar-h);
  z-index: 90;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.conn-sticky-pair {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}
.conn-sticky-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  flex-shrink: 0;
}
.conn-sticky-names {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conn-change-btn {
  background: none;
  border: 1.5px solid var(--brand1);
  border-radius: 8px;
  color: var(--brand1);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
.conn-change-btn:hover { background: #f0eeff; }

/* ── Person header redesign ─────────────────────────────────────────────── */
.person-header-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.person-zodiac-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.person-header-info {
  flex: 1;
  min-width: 0;
}
.person-birth-weekday {
  font-size: 0.72rem;
  opacity: 0.75;
  margin-top: 2px;
  font-style: italic;
}
.person-header-score {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* ── Energy mini donut (62px) ───────────────────────────────────────────── */
.energy-donut-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.energy-donut-wrap {
  position: relative;
  flex-shrink: 0;
}
.energy-donut {
  width: 62px;
  height: 62px;
}
.energy-info {}
.energy-verdict { font-size: 0.88rem; font-weight: 700; color: var(--text); }
.energy-sub     { font-size: 0.78rem; color: var(--muted); margin-top: 3px; line-height: 1.4; }

/* ── Colored number cards ───────────────────────────────────────────────── */
.num-cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.num-card {
  border-radius: 12px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.num-card-lp    { background: #E3EDF8; }
.num-card-phase { background: #FBF0DC; }
.num-card-year  { background: #EBE7FA; }
.num-card-icon  { font-size: 1rem; line-height: 1; }
.num-card-big   { font-size: 1.6rem; font-weight: 900; line-height: 1.1; }
.num-card-lp    .num-card-big  { color: #17456E; }
.num-card-phase .num-card-big  { color: #8A5E10; }
.num-card-year  .num-card-big  { color: #4A3FA8; }
.num-card-label { font-size: 0.58rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.num-card-name  { font-size: 0.62rem; font-weight: 700; text-align: center; color: var(--muted); margin-top: 1px; }
.personal-month-box {
  background: #EBE7FA;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.pm-box-num  { font-size: 1.4rem; font-weight: 900; color: #4A3FA8; }
.pm-box-info { font-size: 0.8rem; color: #4A3FA8; line-height: 1.3; }

/* ── 2×2 West / East grids ──────────────────────────────────────────────── */
.west-grid, .east-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.west-cell, .east-cell {
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.west-cell.elem-fire,  .east-cell.elem-fire  { background: #FBEAE3; }
.west-cell.elem-earth, .east-cell.elem-earth { background: #E8F0E4; }
.west-cell.elem-air,   .east-cell.elem-air   { background: #EBE7FA; }
.west-cell.elem-water, .east-cell.elem-water { background: #E4EEF7; }
.west-cell.elem-metal  { background: #F0F0F0; }
.west-cell.elem-wood   { background: #E8F5E9; }
.west-cell-label, .east-cell-label {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.west-cell-val, .east-cell-val {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Seal emoji tiles ───────────────────────────────────────────────────── */
.seal-tile {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.seal-tile:last-child { border-bottom: none; }
.seal-tile-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #F0EEFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.seal-tile-body {}
.seal-tile-name { font-weight: 700; font-size: 0.88rem; margin-bottom: 2px; }
.seal-tile-sub  { font-size: 0.78rem; color: var(--brand1); margin-bottom: 4px; }
.seal-tile-text { font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

/* ── Personality chips (colored) ────────────────────────────────────────── */
.tag-pos {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #E7F2EA;
  color: #2E6B45;
}
.tag-neg {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  background: #FBF0DC;
  color: #9A6A12;
}
.axis-emoji { margin-right: 2px; }

/* ── Element contrast card ──────────────────────────────────────────────── */
.elem-contrast-card {
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
}
.elem-contrast-title { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.elem-contrast-sub   { font-size: 0.82rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.elem-contrast-text  { font-size: 0.85rem; line-height: 1.5; color: var(--text); }

/* ── Composite character card ───────────────────────────────────────────── */
.composite-char-card {
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--brand1);
  padding: 12px 14px;
  margin-bottom: 12px;
}
.composite-char-card.elem-fire  { border-left-color: var(--fire); }
.composite-char-card.elem-earth { border-left-color: #5A8A3A; }
.composite-char-card.elem-air   { border-left-color: var(--brand1); }
.composite-char-card.elem-water { border-left-color: var(--up); }
.composite-char-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 4px; }
.composite-char-val   { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.composite-char-text  { font-size: 0.83rem; line-height: 1.5; color: var(--muted); }

/* ── Duo table with composite K1 column ─────────────────────────────────── */
.duo-table-row-4 {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 1fr;
  gap: 4px;
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.duo-table-row-4:last-child { border-bottom: none; }
.duo-table-row-4.duo-today { background: #f0eeff; border-radius: 6px; }
.duo-table-header-4 {
  display: grid;
  grid-template-columns: 36px 1fr 1fr 1fr;
  gap: 4px;
  padding-bottom: 5px;
  border-bottom: 2px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2px;
}
/* K1 composite column (4th child) highlight */
.duo-table-row-4 > div:nth-child(4),
.duo-table-header-4 > div:nth-child(4) {
  background: #EFEDFB;
  border-left: 2px solid #D9D4F4;
  border-radius: 0 4px 4px 0;
  padding: 2px 4px;
}
.duo-table-row-4.duo-today > div:nth-child(4) {
  background: #E4E0F8;
}
.duo-comp-score {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.78rem;
  color: #fff !important;
}

/* ── Past rows opacity ──────────────────────────────────────────────────── */
.duo-table-row-4.past,
.duo-table-row.past { opacity: 0.55; }

/* ── Duo table title row with legend button ─────────────────────────────── */
.duo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.legbtn {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--brand1);
  background: #F1EFFC;
  border: none;
  border-radius: 8px;
  padding: 5px 10px;
  cursor: pointer;
}
.duo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 8px;
  font-size: 0.75rem;
}
.duo-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.duo-legend.hidden { display: none; }

/* ── Duo K1 column explicit class ───────────────────────────────────────── */
.duo-kom {
  background: #EFEDFB;
  border-left: 2px solid #D9D4F4;
  border-radius: 0 4px 4px 0;
  padding: 2px 4px;
}
.duo-table-row-4.duo-today .duo-kom { background: #E4E0F8; }

/* ── Seal emoji tile ─────────────────────────────────────────────────────── */
.d2-seal-head {
  display: flex;
  align-items: center;
  gap: 8px;
}
.d2-seal-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.d2-seal-name {
  font-size: 12.5px;
  font-weight: 700;
}
.d2-seal-sub {
  font-size: 10px;
  color: var(--muted);
  font-weight: 600;
  margin-top: 1px;
}

/* ── Number card second label line ──────────────────────────────────────── */
.d2-num-l {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2px;
}
.d2-num-l2 {
  font-size: 9px;
  font-weight: 700;
  color: var(--muted);
  margin-top: 1px;
  word-break: break-word;
}

/* ── Month VHODNÉ PRO / POZOR NA headers ────────────────────────────────── */
.d2-mes-hdr {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.4px;
  margin-top: 8px;
}
.d2-mes-hdr-g { color: #2E7D52; }
.d2-mes-hdr-r { color: var(--down); }

/* ── Planner segmented control ──────────────────────────────────────────── */
.planner-seg {
  display: flex;
  gap: 4px;
  background: #e9eaf2;
  border-radius: 12px;
  padding: 3px;
  margin-bottom: 10px;
}
.planner-seg-btn {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  background: none;
  cursor: pointer;
  transition: all 0.18s;
}
.planner-seg-btn.active {
  background: #fff;
  color: var(--brand1);
  box-shadow: 0 2px 6px rgba(40,30,90,.1);
}

/* ── Planner ribbon (Rhythm mode sparkline) ─────────────────────────────── */
.planner-ribbon-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 12px 6px;
  margin-bottom: 10px;
}
.planner-ribbon-label {
  font-size: 10px;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ── Calendar signal glyph (heat mode — centered in flex column) ─────────── */
.cal-glyph {
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
  line-height: 1;
  color: #fff;
  opacity: 0.95;
}

/* ── Calendar signal glyph (rhythm mode — colored, replaces dot) ─────────── */
.cal-rhythm-glyph {
  font-size: 13px;
  font-weight: 800;
  margin-top: 2px;
  line-height: 1;
}

/* ── Calendar heat mode: pásma D6 (soft gradient + shadow) ───────────────
 * D7 1.2: řízeno pásmovou třídou (_mxBandClass), NE engine signálem. Tři
 * pásma pro 3-mode a pět pro 5-mode; body.band-mode-5 přepíná paletu
 * band-low do světlejší modré. */
.cal-grid-heat .cal-day.band-high { background: linear-gradient(160deg,#2fb98a,#1D9E75); box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #0C2340; }
.cal-grid-heat .cal-day.band-mid  { background: linear-gradient(160deg,#f3b64a,#EF9F27); box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #4A2F04; }
.cal-grid-heat .cal-day.band-low  { background: linear-gradient(160deg,#22548A,#17436B); box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #fff; }
.cal-grid-heat .cal-day.band-peak { background: linear-gradient(160deg,#5FE0AE,#3ED598); box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #0C2340; }
.cal-grid-heat .cal-day.band-up   { background: linear-gradient(160deg,#2fb98a,#1D9E75); box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #0C2340; }
.cal-grid-heat .cal-day.band-weak { background: linear-gradient(160deg,#2B5E8E,#1E4E7A); box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #B5D4F4; }
body.band-mode-5 .cal-grid-heat .cal-day.band-low { background: linear-gradient(160deg,#8AB0D7,#6D95C4); color: #0C2340; }
.cal-grid-heat .cal-day.outside   { background: #e9eaf0 !important; box-shadow: none; }

/* ── Calendar rhythm mode cell overrides ────────────────────────────────── */
.cal-grid-rhythm .cal-day {
  aspect-ratio: 1/.9;
  border-radius: 11px;
  background: #fff !important;
  color: #26262f;
  border: 1px solid #e7e8ef;
  box-shadow: none;
}
.cal-grid-rhythm .cal-day.outside {
  background: #e9eaf0 !important;
}
.cal-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 4px;
  flex-shrink: 0;
}

/* ── Legend expanded ────────────────────────────────────────────────────── */
.legend-expanded {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 6px 14px 12px;
  margin-bottom: 12px;
}
.legend-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  cursor: pointer;
}
.legend-header-title { font-size: 13px; font-weight: 700; color: var(--text); }
.legend-header-arrow { font-size: 11px; color: var(--muted); }
.legend-row {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  align-items: flex-start;
}
.legend-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0C2340;
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
/* D7 1.2: planner legend swatches use the pásmo palette. */
.legend-icon.band-peak { background: #3ED598; color: #0C2340; }
.legend-icon.band-up   { background: #1D9E75; color: #0C2340; }
.legend-icon.band-high { background: #1D9E75; color: #0C2340; }
.legend-icon.band-mid  { background: #EF9F27; color: #0C2340; }
.legend-icon.band-weak { background: #1E4E7A; color: #B5D4F4; }
.legend-icon.band-low  { background: #1E4E7A; color: #B5D4F4; }
body.band-mode-5 .legend-icon.band-low { background: #6D95C4; color: #0C2340; }
.legend-text b { display: block; font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.legend-text span { font-size: 11.5px; color: var(--muted); line-height: 1.4; }

/* ── Day rail (horizontal scroll strip) ─────────────────────────────────── */
.day-rail {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 10px 14px 4px;
  background: var(--bg);
  scrollbar-width: none;
}
.day-rail::-webkit-scrollbar { display: none; }
.rail-day {
  flex: 0 0 auto;
  width: 40px;
  text-align: center;
  cursor: pointer;
}
.rail-day-dw {
  font-size: 9px;
  color: var(--muted);
  margin-bottom: 3px;
  text-transform: uppercase;
}
.rail-day-pip {
  height: 32px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
}
.rail-day-pip.sig-hold-rail { background: #dcdde6; color: #9a9aa8; }
.rail-day.cur .rail-day-pip {
  outline: 3px solid var(--brand1);
  outline-offset: 1px;
}

/* ── DS1 (v7.60): day-detail strip — two-part tile, band-colored ─────────
   Scoped to #day-rail so other rail reuses (e.g. #person-day-strip via
   _renderStripInto) keep the legacy pip look. */
#day-rail .rail-day { width: 38px; }
#day-rail .rail-day-pip.ds-tile {
  height: auto;
  border-radius: 8px;
  overflow: hidden;
  padding: 0;
  background: transparent;
  color: #0C2340;
  display: block;
}
#day-rail .ds-tile-date {
  height: 16px;
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #DBE9F8;
}
#day-rail .ds-tile-value {
  height: 28px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
}
/* Band bg on the value slot (full band color, per mockup varianta C). The
   date slot gets a pre-mixed darker tone equivalent to
   `rgba(12,35,64,.55)` overlaying the band — expressed as a solid color
   so the automated contrast audit (which does not walk ::before pseudos)
   still sees the true text-on-bg pair. */
#day-rail .rail-day-pip.ds-tile.b75 .ds-tile-value { background: #3ED598; }
#day-rail .rail-day-pip.ds-tile.b67 .ds-tile-value { background: #1D9E75; }
#day-rail .rail-day-pip.ds-tile.b48 .ds-tile-value { background: #EF9F27; }
#day-rail .rail-day-pip.ds-tile.b40 .ds-tile-value { background: #1E4E7A; color: #B5D4F4; }
#day-rail .rail-day-pip.ds-tile.b0  .ds-tile-value { background: #6D95C4; }
#day-rail .rail-day-pip.ds-tile.b75 .ds-tile-date { background: #237364; }
#day-rail .rail-day-pip.ds-tile.b67 .ds-tile-date { background: #135A58; }
#day-rail .rail-day-pip.ds-tile.b48 .ds-tile-date { background: #725B35; }
#day-rail .rail-day-pip.ds-tile.b40 .ds-tile-date { background: #14365A; }
#day-rail .rail-day-pip.ds-tile.b0  .ds-tile-date { background: #37567B; }
/* Selected day outline (R1) — overrides the legacy .cur brand outline. */
#day-rail .rail-day.cur .rail-day-pip,
#day-rail .rail-day[data-ds-selected="1"] .rail-day-pip {
  outline: 2px solid #83CDF5;
  outline-offset: 1px;
}
/* Today, when NOT selected: sky-blue weekday label + a 4-px dot below tile. */
#day-rail .rail-day[data-ds-today="1"] .rail-day-dw { color: #83CDF5; }
#day-rail .rail-day-today-dot {
  display: block;
  width: 4px;
  height: 4px;
  margin: 4px auto 0;
  border-radius: 50%;
  background: #83CDF5;
}
/* Day-detail legend — same swatch component as matrix, own left/top spacing. */
#screen-day #day-legend.matrix-legend {
  display: inline-flex;
  align-items: center;
  margin: 14px 14px 0;
}

/* ── Day nav leaf buttons (prev/next with signal preview) ───────────────── */
.day-nav {
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.day-nav-btn {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 10px;
  cursor: pointer;
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.day-nav-btn.today-btn {
  flex: 0 0 auto;
  background: var(--brand1);
  color: #fff;
  border-color: var(--brand1);
  font-weight: 700;
  font-size: 12px;
  padding: 9px 14px;
}
.day-nav-btn.next-btn { justify-content: flex-end; text-align: right; }
.leaf-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

/* ── Area card signal accent ────────────────────────────────────────────── */
.area-accent {
  height: 3px;
  border-radius: 3px;
  width: 26px;
  margin-top: 8px;
}

/* ── D2b: Teams management ─────────────────────────────────────────────── */
.teams-card {
  padding: 14px 14px 10px;
  margin-bottom: 16px;
  /* .card sets overflow: hidden to clip rounded corners; here we need the
     '+ add member' dropdown to escape the card, so override. Nothing inside
     .teams-card relies on being clipped. */
  overflow: visible;
}
.team-new-row {
  display: flex;
  gap: 6px;
  margin: 10px 0 12px;
}
.team-input {
  flex: 1;
  font: inherit;
  font-size: 14px;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}
.team-input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 0;
  border-color: var(--blue);
}
.btn-square {
  padding: 9px 14px;
  border-radius: 6px;
  border: none;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--steel); }
.btn-primary:disabled { opacity: 0.55; cursor: default; }
.team-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.team-row {
  padding: 10px 12px;
  background: var(--paper-2, #F1F4F7);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.team-row-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.team-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.team-count {
  font-size: 12px;
  color: var(--muted);
}
.team-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.team-btn-mini {
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
}
.team-btn-mini:hover { background: rgba(0,0,0,0.06); color: var(--text); }
.team-btn-mini.danger:hover { color: #A32D2D; }
.team-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}
.team-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 0.5px solid var(--border);
  border-radius: 999px;
  padding: 3px 4px 3px 10px;
  font-size: 12px;
  color: var(--text);
}
.team-chip-x {
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  padding: 0 4px;
  line-height: 1;
}
.team-chip-x:hover { color: #A32D2D; }
.team-add-wrap { position: relative; display: inline-block; margin-top: 6px; }
.team-add-btn {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.team-add-btn:hover { color: var(--blue); border-color: var(--blue); }
.team-add-menu {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 180px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  padding: 4px 0;
  /* Above bottom-nav (100) and drawer overlay (150) so the menu of the
     bottommost team is not covered by the fixed nav at mobile width. */
  z-index: 210;
  max-height: 240px;
  overflow-y: auto;
}
.team-add-menu.hidden { display: none; }
.team-add-item {
  display: block;
  width: 100%;
  padding: 7px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.team-add-item:hover { background: var(--paper-2, #F1F4F7); }
.team-add-item.disabled { color: var(--muted); cursor: default; white-space: nowrap; }
.team-list-empty {
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  padding: 12px 0 4px;
}

/* ── D2c: Matrix screen ─────────────────────────────────────────────── */
#screen-matrix .screen-pad { padding-bottom: 96px; }

.matrix-teams-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: none;
}
.matrix-teams-row::-webkit-scrollbar { display: none; }

.matrix-team-chip {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  font-size: 13px;
  color: var(--navy);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.matrix-team-chip:hover { border-color: var(--blue); }
.matrix-team-chip.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}
.matrix-team-chip-plus {
  color: var(--steel);
  border-style: dashed;
}

.matrix-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.matrix-segment {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.matrix-seg-btn {
  padding: 6px 10px;
  border: 0;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
  font-size: 13px;
  border-right: 1px solid var(--border);
}
.matrix-seg-btn:last-child { border-right: 0; }
.matrix-seg-btn.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.matrix-select-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.matrix-select-lbl {
  font-size: 12px;
  color: var(--muted);
}
.matrix-select {
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
}

.matrix-shell {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 12px;
}
.matrix-loading {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.matrix-table {
  display: grid;
  overflow-x: auto;
  grid-auto-flow: row;
}
.matrix-head, .matrix-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: stretch;
}
.matrix-head-name {
  padding: 8px 10px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  position: sticky;
  left: 0;
  z-index: 3;
}
.matrix-head-days {
  display: grid;
  background: var(--navy);
}
.matrix-head-day {
  padding: 8px 6px;
  color: #fff;
  font-size: 11px;
  text-align: center;
  border-left: 1px solid rgba(255,255,255,0.10);
  line-height: 1.2;
}
.matrix-head-day-abbr {
  display: block;
  font-weight: 600;
}
.matrix-head-day-date {
  display: block;
  opacity: 0.75;
}
.matrix-head-day.today {
  outline: 2px solid #85B7EB;
  outline-offset: -2px;
  background: rgba(133, 183, 235, 0.15);
}
.matrix-row {
  border-top: 1px solid var(--border);
}
.matrix-row-cells {
  display: grid;
}
.matrix-row-name {
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  position: sticky;
  left: 0;
  z-index: 2;
  border-right: 1px solid var(--border);
}
.matrix-row.team-avg-row {
  background: #F1F4F7;
}
.matrix-row.team-avg-row .matrix-row-name {
  background: #F1F4F7;
  font-weight: 700;
  color: var(--navy);
}
.matrix-row-check {
  cursor: pointer;
}
.matrix-row-name-btn {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--navy);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  font-weight: 500;
}
.matrix-row-name-btn:hover { text-decoration: underline; }
.matrix-cell {
  padding: 10px 4px;
  text-align: center;
  font-size: 13px;
  border-left: 1px solid var(--border);
  cursor: pointer;
  font-weight: 500;
}
.matrix-cell.band-high { background: #1D9E75; color: var(--navy); }
.matrix-cell.band-mid  { background: #EF9F27; color: var(--navy); }
.matrix-cell.band-low  { background: #17436B; color: #F1F4F7; }
.matrix-cell.person-best { font-weight: 800; }
.matrix-cell.today {
  outline: 2px solid #85B7EB;
  outline-offset: -2px;
}
.matrix-empty {
  padding: 24px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.matrix-paging {
  padding: 8px 12px;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--paper-2, #F1F4F7);
}
.matrix-paging-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 6px;
  color: var(--steel);
  cursor: pointer;
  font-size: 13px;
}
.matrix-paging-btn:hover { border-color: var(--blue); color: var(--blue); }

.matrix-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 16px;
}
.matrix-legend-swatch {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  vertical-align: middle;
  margin-right: 4px;
}
.matrix-legend-swatch.band-high { background: #1D9E75; }
.matrix-legend-swatch.band-mid  { background: #EF9F27; }
.matrix-legend-swatch.band-low  { background: #17436B; }

/* ── D2c: Recommendation panel ────────────────────────────────────── */
.rec-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  margin-top: 12px;
}
.rec-card .section-title {
  font-size: 15px;
  color: var(--navy);
  margin: 0 0 12px;
  font-weight: 700;
}
.rec-people-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rec-people-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-height: 26px;
}
.rec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 10px;
  background: var(--blue);
  color: #fff;
  border-radius: 4px;
  font-size: 12px;
}
.rec-chip-x {
  background: transparent;
  color: #fff;
  border: 0;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0 2px;
}
.rec-people-empty {
  color: var(--muted);
  font-size: 12px;
  padding: 4px 0;
}
.rec-people-add-wrap { position: relative; }
.rec-add-btn {
  background: #fff;
  border: 1px dashed var(--steel);
  color: var(--steel);
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}
.rec-add-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(12,35,64,0.10);
  z-index: 20;
  min-width: 180px;
  max-height: 240px;
  overflow-y: auto;
}
.rec-add-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: 0;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--navy);
  border-bottom: 1px solid var(--border);
}
.rec-add-item:last-child { border-bottom: 0; }
.rec-add-item:hover { background: var(--paper-2, #F1F4F7); }
.rec-add-item.disabled { color: var(--muted); cursor: default; }

.rec-controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rec-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--navy);
  cursor: pointer;
}

.rec-output { min-height: 40px; }
.rec-output-empty {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  padding: 12px 0;
}
.rec-result-card {
  background: var(--paper-2, #F1F4F7);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
}
.rec-result-best {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.rec-result-best-date {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
}
.rec-result-best-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}
.rec-result-best-score {
  font-size: 22px;
  font-weight: 800;
  padding: 6px 12px;
  border-radius: 6px;
  background: #1D9E75;
  color: var(--navy);
}
.rec-result-best-score.band-mid { background: #EF9F27; color: var(--navy); }
.rec-result-best-score.band-low { background: #17436B; color: #F1F4F7; }
.rec-result-dynamics {
  margin: 8px 0 12px;
}
.rec-result-dynamic-item {
  font-size: 13px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  color: var(--navy);
}
.rec-result-dynamic-item:first-child { border-top: 0; }
.rec-result-dynamic-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.rec-result-alts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.rec-result-alt {
  padding: 6px 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  color: var(--navy);
}
.rec-result-alt-score { color: var(--muted); margin-left: 6px; }
.rec-ics-btn {
  background: var(--steel);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.rec-ics-btn:hover { background: var(--blue); }

/* ═════════════════════════════════════════════════════════════════════════
 * D3 dark theme overrides
 * The earlier D1a/D1b/D2b/D2c blocks were written against a white page and
 * carry hardcoded #fff / #F1F4F7 / #F2F3F8 backgrounds on inputs, sticky
 * cells, dropdowns and buttons. Rather than touch every rule, we override
 * them here so historical selectors keep working.
 * ═════════════════════════════════════════════════════════════════════════ */
body { background: var(--bg); color: var(--text); }

/* Cards & surfaces (drop white / paper-light backgrounds). */
.card                   { background: var(--card-bg); border-color: var(--border); }
.section-card           { background: var(--card-bg); }
.people-grid .person-card,
.profile-card,
.person-card            { background: var(--card-bg-2); border-color: var(--border); color: var(--text); }
.person-card-name,
.person-card-sub,
.person-card-bio        { color: var(--text); }
.person-card-sub,
.person-card-bio        { color: var(--muted); }

/* Bottom nav — was a fixed white bar. */
.bottom-nav             { background: var(--card-bg); border-top-color: var(--border); }
.nav-tab                { color: var(--muted); }
.nav-tab.active         { color: var(--blue); }

/* Topbar / drawer. */
.topbar                 { background: var(--navy); color: var(--text); }
.drawer                 { background: var(--card-bg); color: var(--text); border-right-color: var(--border); }
.drawer-item            { color: var(--text); border-bottom-color: var(--border); }
.drawer-item-hint       { color: var(--muted); }
.drawer-section-title   { color: var(--muted); }

/* Inputs, selects, dropdowns. */
input, select, textarea { color-scheme: dark; }
.team-input,
.matrix-select,
input[type="text"], input[type="search"], input[type="email"],
input[type="date"], input[type="time"], input[type="number"] {
  background: var(--card-bg-2);
  color: var(--text);
  border-color: var(--border);
}
.team-input:focus,
.matrix-select:focus,
input:focus, textarea:focus {
  outline-color: var(--blue);
  border-color: var(--blue);
}
.matrix-select-lbl      { color: var(--muted); }

/* Team management surfaces. */
.teams-card             { background: var(--card-bg); }
.team-row               { background: var(--card-bg-2); border-color: var(--border); }
.team-name              { color: var(--text); }
.team-count             { color: var(--muted); }
.team-btn-mini          { color: var(--text-2); }
.team-btn-mini:hover    { background: rgba(255,255,255,0.06); color: var(--text); }
.team-chip              { background: var(--card-bg); color: var(--text); border-color: var(--border); }
.team-chip-x            { color: var(--muted); }
.team-add-btn           { background: transparent; color: var(--sky-2); border-color: var(--steel); }
.team-add-btn:hover     { color: var(--blue); border-color: var(--blue); }
.team-add-menu          { background: var(--card-bg-2); border-color: var(--border); color: var(--text); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.team-add-item          { color: var(--text); }
.team-add-item:hover    { background: rgba(255,255,255,0.06); }
.team-list-empty        { color: var(--muted); }

/* Matrix screen. */
#screen-matrix          { color: var(--text); }
.matrix-team-chip       { background: var(--card-bg-2); color: var(--text); border-color: var(--border); }
.matrix-team-chip:hover { border-color: var(--blue); }
.matrix-seg-btn         { background: var(--card-bg-2); color: var(--text); border-color: var(--border); }
.matrix-seg-btn.active  { background: var(--blue); color: #fff; }
.matrix-shell           { background: var(--card-bg); border-color: var(--border); }
.matrix-loading         { color: var(--muted); }
.matrix-head-name       { background: var(--navy); color: var(--text); }
.matrix-head-days       { background: var(--navy); }
.matrix-head-day        { color: var(--text); border-left-color: rgba(255,255,255,0.10); }
.matrix-row             { border-top-color: var(--border); }
.matrix-row.team-avg-row              { background: var(--card-bg-2); }
.matrix-row.team-avg-row .matrix-row-name { background: var(--card-bg-2); color: var(--text); }
.matrix-row-name        { background: var(--card-bg); color: var(--text); border-right-color: var(--border); }
.matrix-row-name-btn    { color: var(--text); }
.matrix-cell            { border-left-color: var(--border); }
.matrix-cell.band-low   { background: var(--band-low-bg); color: var(--sky-2); box-shadow: inset 0 0 0 1px var(--band-low-border); }
.matrix-empty           { color: var(--muted); }
.matrix-paging          { background: var(--card-bg-2); border-top-color: var(--border); }
.matrix-paging-btn      { background: transparent; color: var(--sky-2); border-color: var(--border); }
.matrix-paging-btn:hover{ color: var(--blue); border-color: var(--blue); }
.matrix-legend          { color: var(--muted); }

/* Recommendation panel. */
.rec-card               { background: var(--card-bg); border-color: var(--border); }
.rec-card .section-title{ color: var(--text); }
.rec-people-empty       { color: var(--muted); }
.rec-add-btn            { background: transparent; color: var(--sky-2); border-color: var(--steel); }
.rec-add-menu           { background: var(--card-bg-2); border-color: var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.35); }
.rec-add-item           { background: transparent; color: var(--text); border-bottom-color: var(--border); }
.rec-add-item:hover     { background: rgba(255,255,255,0.06); }
.rec-add-item.disabled  { color: var(--muted); }
.rec-check              { color: var(--text); }
.rec-output-empty       { color: var(--muted); }
.rec-result-card        { background: var(--card-bg-2); border-color: var(--border); }
.rec-result-best-date   { color: var(--text); }
.rec-result-best-sub    { color: var(--muted); }
.rec-result-best-score.band-low { background: var(--band-low-bg); color: var(--sky-2); box-shadow: inset 0 0 0 1px var(--band-low-border); }
.rec-result-dynamic-item{ border-top-color: var(--border); color: var(--text); }
.rec-result-dynamic-label{ color: var(--muted); }
.rec-result-alt         { background: var(--card-bg); border-color: var(--border); color: var(--text); }
.rec-result-alt-score   { color: var(--muted); }

/* Legend swatch has to match the actual lifted band-low cell so users
 * do not see a "different blue" between the key and the grid. */
.matrix-legend-swatch.band-low  { background: var(--band-low-bg); border: 1px solid var(--band-low-border); }
.matrix-legend-swatch.band-high { background: #1D9E75; }
.matrix-legend-swatch.band-mid  { background: #EF9F27; }

/* Connections screen. */
.conn-sticky-bar        { background: var(--card-bg); border-bottom-color: var(--border); }
.conn-title             { color: var(--text); }
.conn-hint              { color: var(--muted); }

/* Person detail already lives on a navy header; body cards need refresh. */
.detail-header          { color: var(--text); }
.detail-header-title    { color: var(--text); }
.detail-header-ctx      { color: var(--sky-2); }
.verdict-title          { color: var(--text); }
.verdict-sub            { color: var(--sky-2); }
.section-title          { color: var(--text-2); }
.btn-outline            { background: transparent; color: var(--sky-2); border-color: var(--border); }
.btn-outline:hover      { color: var(--blue); border-color: var(--blue); }

/* Selection ("Vyber alespoň 2 lidi") empty-panel labels. */
.rec-people-chips .rec-people-empty { color: var(--muted); }

/* Toast on dark. */
.toast                  { background: var(--card-bg); color: var(--text); border-color: var(--border); box-shadow: 0 6px 20px rgba(0,0,0,0.5); }

/* ═════════════════════════════════════════════════════════════════════════
 * D3 KROK 5: Desktop layout (min-width: 900px)
 *  - body opens to ~1160 px so the shell isn't a 480 px column on 4k monitors
 *  - matrix + rec panel become a 2-column grid on ≥ 900 px
 *  - matrix cells stretch (no horizontal scroll) when the shell is wide enough
 *  - bottom nav stays at the bottom (kept — cheapest per D3 directive)
 * ═════════════════════════════════════════════════════════════════════════ */
.matrix-card-wrap { position: relative; }

/* Fullscreen button (top-right of the matrix card). Only visible when the
 * Fullscreen API is available; JS removes .hidden then. */
.matrix-fullscreen-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  background: rgba(15, 44, 80, 0.85);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  width: 32px;
  height: 32px;
  padding: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.matrix-fullscreen-btn:hover { border-color: var(--blue); color: var(--blue); }
.matrix-fullscreen-btn.hidden { display: none; }
.matrix-fullscreen-btn .fs-exit.hidden,
.matrix-fullscreen-btn .fs-enter.hidden { display: none; }

/* When the matrix card is fullscreen we paint the whole viewport navy
 * (the browser normally paints the background BLACK behind :fullscreen). */
#matrix-card-wrap:fullscreen,
#matrix-card-wrap:-webkit-full-screen {
  background: var(--bg);
  padding: 24px;
  width: 100vw;
  height: 100vh;
  overflow: auto;
}

@media (min-width: 900px) {
  body { max-width: 1160px; }
  .topbar,
  .bottom-nav { max-width: 1160px; }
  #screen-matrix .screen-pad {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    grid-template-areas:
      "title  title"
      "teams  teams"
      "ctrl   ctrl"
      "grid   rec"
      "legend rec";
    column-gap: 20px;
    row-gap: 12px;
    align-items: start;
  }
  #screen-matrix .screen-pad > .screen-title    { grid-area: title; }
  #screen-matrix .screen-pad > .matrix-teams-row{ grid-area: teams; }
  #screen-matrix .screen-pad > .matrix-controls { grid-area: ctrl;  }
  #screen-matrix .screen-pad > .matrix-card-wrap{ grid-area: grid;  }
  #screen-matrix .screen-pad > .matrix-legend   { grid-area: legend; }
  #screen-matrix .screen-pad > .rec-card        { grid-area: rec; margin-top: 0; }

  /* Other screens: centre the content but keep them single-column (no re-design). */
  #screen-today .screen-pad,
  #screen-people .screen-pad,
  #screen-planner .screen-pad,
  #screen-connections .screen-pad,
  #screen-person .screen-pad {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ≥ 1100 px: give each day cell enough horizontal room so a full-month view
 * fits without needing a horizontal scroll. */
@media (min-width: 1100px) {
  .matrix-head, .matrix-row {
    grid-template-columns: 160px 1fr;
  }
  .matrix-table { overflow-x: visible; }
}

/* ═════════════════════════════════════════════════════════════════════════
 * D3.1 dark-theme readability pass
 * Every rule below was added after a mechanical contrast audit of every
 * screen at 400×800. Selectors are grouped by screen so the sweep is
 * reviewable. Nothing here re-writes existing rules — we only override
 * hardcoded whites / light-theme colours that the earlier "D3 dark theme
 * overrides" block did not cover.
 * ═════════════════════════════════════════════════════════════════════════ */

/* ── Bottom nav active state — the D3 override at line 2737 targets .nav-tab
 *    only, but the rule at line 1485/1486 uses .nav-tab.active .nav-icon,
 *    which is more specific and pins the colour to steel (#185FA5 ≈ 2.15:1
 *    on navy). Force the accent to the D3 blue and lift the indicator to
 *    2 px so it reads at 400 px. */
.nav-tab .nav-icon,
.nav-tab .nav-label       { color: var(--muted); }
.nav-tab.active .nav-icon,
.nav-tab.active .nav-label { color: var(--blue); }
.nav-tab.active .nav-label { font-weight: 700; }
.nav-tab.active::before   { background: var(--blue); height: 3px; }
.nav-tab.active           { background: rgba(55, 138, 221, 0.10); }

/* ── Signal-tinted text on amber/green cells: white on #EF9F27 / #1D9E75 is
 *    ≈ 2.17:1 / 2.9:1. Switch to the same dark navy the matrix cells use.
 *    Note: .sig-hold-rail (rail placeholder, no data) is NOT amber-backed;
 *    excluded so its text stays --muted on card-bg-2. */
.strip-day span,
.person-card-pill.sig-hold,
.person-card-pill.sig-close,
.person-card-pill.sig-fire,
.person-card-pill.sig-up,
.duo-score.sig-hold,
.duo-score.sig-close,
.duo-score.sig-fire,
.duo-score.sig-up,
.duo-comp-score.sig-hold,
.duo-comp-score.sig-close,
.duo-comp-score.sig-fire,
.duo-comp-score.sig-up,
.rail-day-pip.sig-hold,
.rail-day-pip.sig-close,
.rail-day-pip.sig-fire,
.rail-day-pip.sig-up      { color: #0C2340 !important; }

/* ── Drawer (side panel) still had white cards & sky-mut hints. */
.drawer-top-card         { background: var(--card-bg-2); color: var(--text); }
.drawer-top-card:hover   { background: rgba(55,138,221,0.10); }
.drawer-top-card-title   { color: var(--text); }
.drawer-top-card-hint    { color: var(--muted); }
.drawer-item-icon-sq     { background: var(--card-bg); color: var(--text); }
.drawer-item-icon-sq--amber { background: rgba(239,159,39,0.25); color: #FCEED2; }
.drawer-top-card-icon    { color: var(--sky); }
.drawer-tile             { background: var(--card-bg-2); color: var(--text); border-color: var(--border); }
.drawer-tile:hover       { background: rgba(55,138,221,0.10); }
.drawer-item:hover       { background: rgba(55,138,221,0.10); }
.drawer-item-cache:hover { background: rgba(239,159,39,0.15); }
.drawer-open-hint,
.drawer-footer           { color: var(--muted); }

/* ── Today screen: a-cell composite grid + tip card. */
.a-cell-name             { color: var(--text); }
.tip-text                { color: var(--text); }
.tip-duo-btn             { background: rgba(55,138,221,0.15); color: var(--blue); }
.tip-duo-btn:hover       { background: rgba(55,138,221,0.25); }

/* ── Day screen (day detail): rail + navigation buttons. */
.day-rail                { background: var(--card-bg); }
.rail-day-pip            { background: var(--card-bg-2); color: var(--text); border-color: var(--border); }
.rail-day-pip.sig-hold-rail { background: var(--card-bg-2); color: var(--muted); }
.day-nav                 { background: var(--card-bg); border-top-color: var(--border); border-bottom-color: var(--border); }
.day-nav-btn             { background: transparent; color: var(--text); border-color: var(--border); }
.day-nav-btn:hover       { color: var(--blue); border-color: var(--blue); }
.day-nav-btn.today-btn   { color: #fff; background: var(--blue); border-color: var(--blue); }
.day-nav-btn.today-btn:hover { background: var(--steel); }

/* ── Planner: segmented control, ribbon, calendar. */
.planner-seg             { background: var(--card-bg-2); border: 1px solid var(--border); }
.planner-seg-btn         { color: var(--muted); }
.planner-seg-btn.active  { background: var(--blue); color: #fff; box-shadow: none; }
.planner-ribbon-wrap     { background: var(--card-bg); border-color: var(--border); color: var(--text); }
.planner-ribbon-label    { color: var(--muted); }

/* Calendar cells: hardcoded #e9eaf0 (light gray) on outside days and white
 * bg on rhythm-mode cells were the biggest offenders in the audit. */
.cal-day                 { color: var(--text); }
.cal-day-header          { color: var(--muted); }
.cal-day.outside         { background: var(--card-bg-2) !important; color: var(--muted); opacity: 0.4; }
.cal-grid-heat .cal-day.outside   { background: var(--card-bg-2) !important; box-shadow: none; }
.cal-grid-rhythm .cal-day         { background: var(--card-bg-2) !important; color: var(--text); border-color: var(--border); }
.cal-grid-rhythm .cal-day.outside { background: rgba(18,52,87,0.5) !important; color: var(--muted); }
.cal-day-num             { color: inherit; font-size: 15px; }
.cal-glyph               { font-size: 14px; opacity: 1; }
.cal-rhythm-glyph        { font-size: 14px; }
.cal-day.today-cal       { outline-color: var(--sky); outline-width: 2px; }

/* Legend + expanded legend on planner. */
.legend-toggle-btn       { background: transparent; color: var(--muted); border-color: var(--border); }
.legend-toggle-btn:hover { background: rgba(55,138,221,0.10); color: var(--blue); }
.legend-expanded         { background: var(--card-bg); color: var(--text); border-color: var(--border); }
.legend-header-title     { color: var(--text); }
.legend-header-arrow     { color: var(--muted); }
.cal-legend-item         { color: var(--muted); }

/* Day chips (upcoming best/rest days). */
.day-chip.up   { color: #1D9E75; background: rgba(29,158,117,0.20); border-color: rgba(29,158,117,0.55); }
.day-chip.fire { color: #1D9E75; background: rgba(29,158,117,0.20); border-color: rgba(29,158,117,0.55); }
.day-chip.down { color: var(--sky-2); background: rgba(55,138,221,0.15); border-color: rgba(55,138,221,0.55); }
.day-chip.close{ color: #EF9F27; background: rgba(239,159,39,0.15); border-color: rgba(239,159,39,0.55); }

/* Go/slow card titles (planner + duo). */
.go-slow-title           { color: var(--muted); }

/* ── Connections: duo tables, composite cards, sticky bar avatars. */
.duo-table               { color: var(--text); }
.duo-table-row.duo-today { background: rgba(55,138,221,0.15); }
.duo-date                { color: var(--muted); background: transparent; }
.duo-table-cell          { color: var(--text); background: transparent; }
.duo-table-header        { color: var(--muted); }
.composite-char-label    { color: var(--muted); }
.composite-char-text     { color: var(--text); }
.composite-char-val      { color: var(--text); }
.conn-sticky-av          { background: var(--card-bg-2); color: var(--text); }
.conn-change-btn         { background: transparent; color: var(--blue); border-color: var(--border); }
.conn-change-btn:hover   { border-color: var(--blue); }
.elem-contrast-card      { color: var(--text); }

/* ── Signal pill (person card + hero) forced dark text on amber/green. */
.person-card-pill.sig-hold,
.person-card-pill.sig-close   { background: #EF9F27; color: #0C2340; }
.person-card-pill.sig-fire,
.person-card-pill.sig-up      { background: #1D9E75; color: #0C2340; }
.person-card-pill.sig-down    { background: var(--band-low-bg); color: var(--sky-2); box-shadow: inset 0 0 0 1px var(--band-low-border); }

/* Person-card big score for sig-down: JS inlines color: #17436B which vanishes
 * on card-bg-2 (#123457). !important beats the inline style. */
.person-card.sig-down .person-card-big-score,
.person-card-big-score[data-tier="low"] { color: var(--sky-2) !important; }

/* ── Signal chip ring around avatar (used by conn sticky). */
.sig-ring-hold, .sig-ring-close  { border-color: #EF9F27 !important; }
.sig-ring-fire, .sig-ring-up     { border-color: #1D9E75 !important; }
.sig-ring-down                   { border-color: var(--band-low-border) !important; }

/* D7 1.2: glyph inherits cell text color driven by band-* class; no per-signal
 * override needed. */
.cal-glyph, .cal-rhythm-glyph { font-size: 14px; font-weight: 800; color: inherit; }

/* Connections composite / duo cards were light-theme cards that carry
 * text unaffected by the earlier .card override because they use their
 * own class + hardcoded #fff. Force them to a dark surface. */
.composite-char-card    { background: var(--card-bg); border-color: var(--border); }
.composite-char-card.elem-fire  { border-left-color: #1D9E75; }
.composite-char-card.elem-earth { border-left-color: #5A8A3A; }
.composite-char-card.elem-air   { border-left-color: var(--blue); }
.composite-char-card.elem-water { border-left-color: #85B7EB; }
.composite-char-label   { color: var(--muted); }
.composite-char-val     { color: var(--text); }
.composite-char-text    { color: var(--sky-2); }

/* Duo table rows: today highlight was #f0eeff (light purple). Switch to
 * a blue-tinted overlay that reads on the dark card. */
.duo-table-row.duo-today,
.duo-table-row-4.duo-today { background: rgba(55,138,221,0.18); }
.duo-table-row.duo-today .duo-date,
.duo-table-row-4.duo-today .duo-date { color: var(--sky-2); }
.duo-table-row.duo-today > div,
.duo-table-row-4.duo-today > div { color: var(--text); }

/* Element-contrast card: JS inlines a pastel gradient for the pair. On
 * dark theme the pastel drowns white text (1.17:1). Force a dark backdrop
 * with the same border tint so the "element mix" cue survives via border. */
.elem-contrast-card {
  background: var(--card-bg-2) !important;
  color: var(--text);
}
.elem-contrast-title    { color: var(--text); }
.elem-contrast-sub      { color: var(--muted); }
.elem-contrast-text     { color: var(--sky-2); }

/* Duo table HEADER row (light purple bg) — invisible on dark. Force dark bg
 * and lift the text so the "Skóre" heading reads. */
.duo-table-header,
.duo-table-header-4,
.duo-table-header .duo-table-cell,
.duo-table-header-4 .duo-table-cell,
.duo-table-header .duo-date,
.duo-table-header-4 .duo-date { color: var(--text) !important; background: transparent; }
/* Composite column highlight (4th cell) — the light purple #EFEDFB doesn't
 * survive a dark theme. Tint it blue-ish to keep the "special column" cue. */
.duo-table-row-4 > div:nth-child(4),
.duo-table-header-4 > div:nth-child(4) {
  background: rgba(55, 138, 221, 0.15);
  border-left-color: var(--blue);
}

/* D3.2 A1: #day "Oblasti dne" cards — hardcoded #fff bg with --text (white)
 * inside made them white-on-white. Cover on the dark theme. */
.area-card              { background: var(--card-bg); border-color: var(--border); color: var(--text); }
.area-name              { color: var(--muted); }
.area-text              { color: var(--text); }

/* D4 A2: duo metric rows. The D3.2 .conn-row selector became a grid for the
 * picker rows (28px 36px 1fr auto) — the duo's earlier .conn-row .row-label /
 * .row-value grid collapsed and the label + value stacked on top of each other.
 * Dedicated selector rebuilds the label vlevo / hodnota vpravo layout used
 * by the trio edge list. */
.duo-metric-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
}
.duo-metric-row:last-child { border-bottom: none; }
.duo-metric-label { color: var(--muted); font-weight: 600; }
.duo-metric-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text);
}
.duo-metric-num {
  padding: 2px 8px;
  background: var(--card-bg-2);
  border-radius: 6px;
  font-weight: 800;
}

/* D6 3.3: profile card action buttons (edit / delete). */
.person-card { position: relative; }
.person-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
}
.pc-act {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--sky-2);
  border-radius: 5px;
  padding: 3px 8px;
  cursor: pointer;
  font-size: 12px;
}
.pc-act:hover { border-color: var(--blue); color: var(--blue); }
.pc-act-delete:hover { border-color: #E56666; color: #E56666; }

/* D6 3.3: profile editor modal. */
.profile-editor {
  position: fixed;
  inset: 0;
  background: rgba(12, 35, 64, 0.75);
  z-index: 310;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 50px;
  overflow-y: auto;
}
.profile-editor.hidden { display: none; }
.profile-editor-inner {
  background: var(--card-bg);
  color: var(--text);
  width: min(480px, 94vw);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 40px;
}
.profile-editor-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.profile-editor-title { font-weight: 700; color: var(--text); font-size: 15px; }
.profile-editor-close {
  background: transparent;
  border: 0;
  color: var(--sky-2);
  cursor: pointer;
  font-size: 20px;
  padding: 0 4px;
}
.profile-editor-close:hover { color: var(--blue); }
.profile-editor-body { display: flex; flex-direction: column; gap: 10px; }
.profile-editor-body label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--sky-2);
  font-size: 11px;
}
.profile-editor-body input,
.profile-editor-body select {
  background: var(--card-bg-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  color-scheme: dark;
  font-size: 14px;
}
.profile-editor-body input:focus,
.profile-editor-body select:focus {
  outline: 2px solid var(--blue);
  border-color: var(--blue);
}
/* D7 3.2: UTC field + Pomocník button share a row; birthplace + Mapa button
   share a row. Text input flexes, button sits on the right. */
/* L12b (v7.92): dlouhé popisky „🕐 Pomocník UTC — převést místní čas" /
   „📍 Mapa — klikni na své město" → tlačítko pod polem na celou šířku. */
.pf-utc-row, .pf-place-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}
/* L12c · A (orákulum onb_buttons_v3): Pomocník UTC + Mapa = modrá značky;
 * hover/stisk o stupeň sytější, jen barvy (150 ms). */
.pf-utc-btn, .pf-map-btn {
  background: #16305c;
  border: 1px solid #3b7be0;
  color: #cfe0ff;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s;
}
.pf-utc-btn:hover, .pf-map-btn:hover, .pf-utc-btn:active, .pf-map-btn:active {
  background: #1c3d72; border-color: #5a94ec; color: #e8f0ff;
}

/* D8.1: city lookup status feedback — daygate steel palette.
 * Green ✓ for found; amber ⚠ + map link for unknown; neutral for idle. */
.pf-city-status {
  font-size: 12px;
  min-height: 16px;
  margin-top: 4px;
  padding-left: 2px;
  line-height: 1.35;
}
.pf-city-status[data-state="idle"] { color: var(--muted); }
.pf-city-status[data-state="found"] {
  color: #3ED598; /* daygate D6 peak green */
  font-weight: 600;
}
.pf-city-status[data-state="not_found"] {
  color: #EF9F27; /* daygate D3 amber */
}
.pf-city-status .pf-city-map-link {
  color: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.pf-city-status .pf-city-map-link:hover { color: #F7C15B; }
input#pf-birthplace[data-city-state="found"] {
  border-color: #3ED598 !important;
  box-shadow: inset 0 0 0 1px rgba(62, 213, 152, 0.35);
}
input#pf-birthplace[data-city-state="not_found"] {
  border-color: #EF9F27 !important;
  box-shadow: inset 0 0 0 1px rgba(239, 159, 39, 0.35);
}

.pf-utc-row .pf-utc-btn, .pf-place-row .pf-map-btn { width: 100%; white-space: normal; }
#pf-birthtime-utc[readonly] { cursor: default; }
.onb-q { margin: 2px 0; }
.onb-q-btn { display: flex; gap: 5px; align-items: flex-start; background: transparent; border: 0; padding: 0;
  color: inherit; opacity: .8; font: inherit; font-size: 0.75rem; line-height: 1.4; text-align: left; cursor: pointer; }
.onb-q-btn:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }
.onb-q-btn .onb-q-i { flex: none; font-style: normal; }
.onb-q-a { margin-top: 5px; font-size: 0.75rem; line-height: 1.5; }
.onb-q-a[hidden] { display: none; }
.pf-latlon-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pf-err {
  color: #EF9F27;
  font-size: 12px;
  padding: 6px 8px;
  background: rgba(239, 159, 39, 0.10);
  border-radius: 4px;
}
.pf-err.hidden { display: none; }
.pf-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 6px;
}
.pf-btn {
  padding: 8px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  transition: background-color .15s, border-color .15s, color .15s;  /* L12c · A */
}
.pf-btn-primary {
  background: var(--blue);
  color: #fff;
}
.pf-btn-primary:hover, .pf-btn-primary:active { background: var(--steel); }
.pf-btn-outline {
  background: transparent;
  color: var(--sky-2);
  border-color: var(--border);
}
.pf-btn-outline:hover, .pf-btn-outline:active { border-color: var(--blue); color: var(--blue); }

/* D5 2.2: Denní souhra CTA card on #day. */
.souhra-card {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: linear-gradient(135deg, var(--card-bg) 0%, var(--card-bg-2) 100%);
  border: 1px solid var(--blue);
  border-radius: 12px;
  padding: 14px;
  margin: 14px 0;
  overflow: hidden;
}
.souhra-card::before {
  content: "";
  position: absolute;
  inset: -30% -30% auto auto;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle at 30% 30%, rgba(55,138,221,0.28), transparent 62%);
  pointer-events: none;
}
.souhra-icon {
  flex: 0 0 auto;
  color: var(--sky);
  padding: 4px;
  background: rgba(55,138,221,0.15);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.souhra-body { flex: 1 1 auto; z-index: 1; }
.souhra-title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 4px;
}
.souhra-lead {
  color: var(--sky-2);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 10px;
}
.souhra-btn {
  display: inline-block;
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
}
.souhra-btn:hover { background: var(--steel); }
.souhra-hint {
  color: var(--muted);
  font-size: 11px;
  margin-top: 6px;
}

/* D5 2.2: seed-day score line inside the connections result. */
.conn-seed-day-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  margin: 8px 0;
  color: var(--text);
  font-size: 13px;
}
.conn-seed-day-lbl { color: var(--sky-2); }
.conn-seed-day-score {
  padding: 4px 12px;
  border-radius: 6px;
  font-weight: 800;
  font-size: 14px;
}

/* D5 2.2: locked chip in the connections tray — the seed person from #day. */
.conn-tray-chip.locked .conn-tray-chip-x {
  opacity: 0.3;
  pointer-events: none;
  cursor: not-allowed;
}
.conn-tray-chip.locked { background: var(--steel); }

/* D5 1.2: global band-mode toggle in the topbar. */
.topbar-band-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.10);
  color: var(--sky-2);
  border: 1px solid transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  height: 26px;
}
.topbar-band-toggle:hover { border-color: rgba(255,255,255,0.30); }
.topbar-band-toggle .sep { color: rgba(255,255,255,0.3); font-weight: 500; }
.topbar-band-toggle span[data-mode].active { color: #fff; }

/* D6 1.2: five-tier band palette with MIRRORED zeleň/modrá logic.
 *   ŠPIČKA #3ED598 (light green)  — inner extreme high (brightest positive)
 *   OKNO   #1D9E75 (dark green)   — the 3-mode "high" tone reused
 *   STABILNÍ #EF9F27 (amber)      — mid, unchanged
 *   SLABÝ  #1E4E7A (dark blue)    — the 3-mode "low" tone reused, dark end
 *   ÚTLUM  #6D95C4 (muted sky)    — softer extreme, "faded" — must NOT
 *                                   shout; contrast with #FFF is 4.90:1
 *                                   at cy 40 which passes AA.
 * The reddish #B4530A of D5 was retired — negatives should fade, not shout.
 * Text foreground: dark navy on the 3 top tiers (amber-adjacent), sky-2 on
 * the two blue tiers so the WCAG contrast holds on the dark card. */
.matrix-cell.band-peak,
.rec-result-best-score.band-peak,
.strip-day.band-peak,
.report-cell.band-peak,
.person-card-pill.band-peak,
.rail-day-pip.band-peak,
.trio-edge-score.band-peak { background: #3ED598; color: #0C2340; }
.matrix-cell.band-up,
.rec-result-best-score.band-up,
.strip-day.band-up,
.report-cell.band-up,
.person-card-pill.band-up,
.rail-day-pip.band-up,
.trio-edge-score.band-up { background: #1D9E75; color: #0C2340; }
.matrix-cell.band-weak,
.rec-result-best-score.band-weak,
.strip-day.band-weak,
.report-cell.band-weak,
.person-card-pill.band-weak,
.rail-day-pip.band-weak,
.trio-edge-score.band-weak { background: #1E4E7A; color: #B5D4F4; box-shadow: inset 0 0 0 1px #378ADD; }
/* D6: 5-mode ÚTLUM (lowest) is a lighter, muted blue — signals "fade out"
 * rather than "alarm". Sky-2 text keeps ≥ 4.5:1 on this bg. The 3-mode
 * .band-low keeps its D3 blue (#1E4E7A + blue inset). Discrimination via
 * a body-level .band-mode-5 flag flipped by _wireBandToggle. */
body.band-mode-5 .matrix-cell.band-low,
body.band-mode-5 .rec-result-best-score.band-low,
body.band-mode-5 .strip-day.band-low,
body.band-mode-5 .report-cell.band-low,
body.band-mode-5 .person-card-pill.band-low,
body.band-mode-5 .rail-day-pip.band-low,
body.band-mode-5 .trio-edge-score.band-low { background: #6D95C4; color: #0C2340; box-shadow: none; }
/* Legend swatches for the 5-band mode. */
.matrix-legend-swatch.band-peak { background: #3ED598; }
.matrix-legend-swatch.band-up   { background: #1D9E75; }
.matrix-legend-swatch.band-weak { background: #1E4E7A; }
body.band-mode-5 .matrix-legend-swatch.band-low { background: #6D95C4; }

/* D6 1.3: calendar cells + strip cells adopt the same band tone the
 * matrix uses, so the topbar toggle repaints them in place. */
.strip-day.band-high, .cal-day.band-high { background: #1D9E75; color: #0C2340; }
.strip-day.band-mid,  .cal-day.band-mid  { background: #EF9F27; color: #0C2340; }
.strip-day.band-low,  .cal-day.band-low  { background: #1E4E7A; color: #B5D4F4; }
body.band-mode-5 .strip-day.band-low,
body.band-mode-5 .cal-day.band-low       { background: #6D95C4; color: #0C2340; }
.strip-day.band-peak, .cal-day.band-peak { background: #3ED598; color: #0C2340; }
.strip-day.band-up,   .cal-day.band-up   { background: #1D9E75; color: #0C2340; }
.strip-day.band-weak, .cal-day.band-weak { background: #1E4E7A; color: #B5D4F4; }
.strip-day span, .cal-day span { color: inherit; }
/* PR1 (v7.61): Rytmus reuses Heatmapa palette 1:1 (gradient hex, text color,
 * shadow) — no more rgba() dimming. Gradients and colors are byte-identical
 * to `.cal-grid-heat .cal-day.band-*` (mobile.css line ~2067). */
.cal-grid-rhythm .cal-day { position: relative; background: transparent !important; color: var(--text); border: none; }
.cal-grid-rhythm .cal-day.band-high { background: linear-gradient(160deg,#2fb98a,#1D9E75) !important; box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #0C2340; }
.cal-grid-rhythm .cal-day.band-mid  { background: linear-gradient(160deg,#f3b64a,#EF9F27) !important; box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #4A2F04; }
.cal-grid-rhythm .cal-day.band-low  { background: linear-gradient(160deg,#22548A,#17436B) !important; box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #fff; }
.cal-grid-rhythm .cal-day.band-peak { background: linear-gradient(160deg,#5FE0AE,#3ED598) !important; box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #0C2340; }
.cal-grid-rhythm .cal-day.band-up   { background: linear-gradient(160deg,#2fb98a,#1D9E75) !important; box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #0C2340; }
.cal-grid-rhythm .cal-day.band-weak { background: linear-gradient(160deg,#2B5E8E,#1E4E7A) !important; box-shadow: 0 3px 8px rgba(12,35,64,.14); color: #B5D4F4; }
body.band-mode-5 .cal-grid-rhythm .cal-day.band-low { background: linear-gradient(160deg,#8AB0D7,#6D95C4) !important; color: #0C2340; }

/* PR1 (v7.61): K1 hodnota v pravem dolnim rohu Rytmus bunky. */
.cal-grid-rhythm .cal-day .cal-day-val {
  position: absolute;
  right: 7px;
  bottom: 5px;
  font-size: 11px;
  font-weight: 700;
  opacity: .75;
  color: inherit;
  line-height: 1;
  pointer-events: none;
}

/* PR1 (v7.61): chart -> calendar hover sync. */
.cal-grid-rhythm .cal-day[data-pr-hover="1"] {
  box-shadow: inset 0 0 0 3px #fff, 0 3px 8px rgba(12,35,64,.14);
}

/* RM1 (v7.64): Rytmus mobile M2 cell (<=480 px). Date big on top,
   glyph + K1 value inline row at bottom (.sub layout per orakulum).
   Desktop cell (K1 in corner) unchanged. Heatmapa unchanged. */
@media (max-width: 480px) {
  .cal-grid-rhythm .cal-day {
    aspect-ratio: auto;
    height: 46px;
    border-radius: 9px;
    padding: 4px 4px 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }
  .cal-grid-rhythm .cal-day .cal-day-num {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.05;
    margin-top: 0;
  }
  /* Glyph absolute at bottom-left of the .sub row area; value adjacent.
     Both anchored via bottom + horizontal offset to form a visual row. */
  .cal-grid-rhythm .cal-day .cal-rhythm-glyph {
    position: absolute;
    left: 50%;
    bottom: 2px;
    transform: translateX(calc(-50% - 8px));
    font-size: 9px;
    line-height: 1;
    margin-top: 0;
    opacity: .9;
  }
  .cal-grid-rhythm .cal-day .cal-day-val {
    position: absolute;
    right: auto;
    left: 50%;
    bottom: 2px;
    transform: translateX(calc(-50% + 6px));
    font-size: 10.5px;
    font-weight: 800;
    opacity: .9;
    line-height: 1;
  }
  /* When glyph missing (stable), center the value alone. */
  .cal-grid-rhythm .cal-day:not(:has(.cal-rhythm-glyph)) .cal-day-val {
    transform: translateX(-50%);
  }
}

/* PR1 (v7.61): chart card hover bubble + guide. */
#planner-ribbon { position: relative; }
#planner-ribbon .pr-tip {
  position: absolute;
  pointer-events: none;
  background: #0B1F3A;
  border: 1px solid #5B8CCC;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.3;
  white-space: nowrap;
  color: #E9F1FB;
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
  transform: translate(-50%, -100%);
  z-index: 5;
  display: none;
}
#planner-ribbon .pr-tip[data-pr-tip="open"] { display: block; }
#planner-ribbon .pr-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 10px;
  height: 10px;
  background: #0B1F3A;
  border-right: 1px solid #5B8CCC;
  border-bottom: 1px solid #5B8CCC;
  transform: translateX(-50%) rotate(45deg);
}
#planner-ribbon .pr-tip-swatch {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: -1px;
}
#planner-ribbon .pr-tip-val {
  font-size: 15px;
  font-weight: 800;
  margin-right: 4px;
}

/* D5 1.1: matrix period controls — week/14 fixed, sliding 6-month pager
 * with arrows, and a custom from-to popover. */
.matrix-period {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 4px 0 8px;
  flex: 1 1 auto;
}
.matrix-period-fixed {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.matrix-period-fixed .matrix-seg-btn {
  border: 0;
  border-right: 1px solid var(--border);
  padding: 6px 10px;
  background: var(--card-bg-2);
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
}
.matrix-period-fixed .matrix-seg-btn:last-child { border-right: 0; }
.matrix-period-fixed .matrix-seg-btn.active,
.matrix-period .matrix-seg-btn.active,
.matrix-period-months .matrix-month-chip.active {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
}
.matrix-period-months {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
}
.matrix-month-shift {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--sky-2);
  padding: 5px 8px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
}
.matrix-month-shift:hover { border-color: var(--blue); color: var(--blue); }
.matrix-month-chips {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px;
  scroll-behavior: smooth;
  flex: 1 1 auto;
  position: relative;
}
.matrix-month-chips::-webkit-scrollbar { display: none; }
.matrix-month-chip {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg-2);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
  white-space: nowrap;
}
.matrix-month-chip:hover { border-color: var(--blue); }
.matrix-month-chip.today-hint {
  border-style: dashed;
  border-color: var(--sky);
}
.matrix-period-custom { position: relative; }
.matrix-custom-popover {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 6px;
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 220;
  min-width: 220px;
}
.matrix-custom-popover.hidden { display: none; }
.matrix-custom-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--sky-2);
  font-size: 11px;
  margin-bottom: 8px;
}
.matrix-custom-label input {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px;
  color-scheme: dark;
}
.matrix-custom-err {
  color: #EF9F27;
  font-size: 11px;
  margin: 4px 0 8px;
}
.matrix-custom-err.hidden { display: none; }
.matrix-custom-apply {
  width: 100%;
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

@media (max-width: 899px) {
  /* Mobile: line 1 = week/14/custom, line 2 = month chips with fade. */
  .matrix-period { flex-direction: column; align-items: stretch; }
  .matrix-period-fixed, .matrix-period-months, .matrix-period-custom { width: 100%; }
  .matrix-period-months {
    position: relative;
  }
  .matrix-period-months::after {
    content: "";
    position: absolute;
    right: 32px; top: 0; bottom: 0; width: 24px;
    background: linear-gradient(90deg, transparent, var(--bg));
    pointer-events: none;
  }
}

/* D4 B2: CSV export button on the matrix controls. */
.matrix-csv-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--sky-2);
  padding: 5px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.matrix-csv-btn:hover { color: var(--blue); border-color: var(--blue); }

/* D4 A1: language dropdown was #fff bg + var(--text) items — white on white
 * on dark theme. Active item on light-purple (#f0eeff) with steel text was
 * fine but visually unbranded. */
.lang-dropdown              { background: var(--card-bg-2); border-color: var(--border); box-shadow: 0 4px 16px rgba(0,0,0,0.45); }
.lang-dropdown-item         { color: var(--sky-2); border-bottom-color: var(--border); }
.lang-dropdown-item:hover   { background: rgba(55,138,221,0.15); color: #fff; }
.lang-dropdown-item.active-lang { background: var(--blue); color: #fff; }

/* Signal pill inside #day / #person header — .sig-hold/close paint amber
 * via .sig-hold and .signal-pill defaults color: #fff → 2.17:1. Match the
 * treatment already used for person-card-pill. */
.signal-pill.sig-hold, .signal-pill.sig-close { color: #0C2340; }
.signal-pill.sig-fire, .signal-pill.sig-up    { color: #0C2340; }
.signal-pill.sig-down                         { color: var(--sky-2); box-shadow: inset 0 0 0 1px var(--band-low-border); }
.astro-ctx-card         { background: var(--card-bg); border-color: var(--border); }
.astro-ctx-text         { color: var(--text); }
.transit-item           { color: var(--text); border-bottom-color: var(--border); }

/* D3.2 A2: duo legend toggle content on the Connections duo view. */
.duo-legend             { color: var(--text); font-size: 0.82rem; padding: 8px 0 4px; }
.duo-legend.hidden      { display: none; }
.duo-legend-item        { display: inline-flex; align-items: center; gap: 6px; margin: 0 12px 6px 0; }
.duo-title-row          { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.legbtn                 { background: transparent; border: 1px solid var(--border); color: var(--sky-2); padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.legbtn:hover           { border-color: var(--blue); color: var(--blue); }
/* Duo-table wrapper itself was inheriting a light purple bg. */
.duo-table               { background: transparent; }

/* Month navigation buttons — arrows near-invisible in steel #185FA5 on navy. */
.month-btn               { color: var(--sky-2); border-color: var(--border); }
.month-btn:hover         { color: var(--blue); border-color: var(--blue); }
.month-label             { color: var(--text); }

/* Legend icon in expanded legend rows: white on amber → dark. */
.legend-icon             { color: #0C2340; }

/* Calendar heat cells — green (#1D9E75) with white text is 2.9:1. Dark text
 * is much stronger and matches the treatment on amber. */
.cal-grid-heat .cal-day.sig-fire,
.cal-grid-heat .cal-day.sig-up   { color: #0C2340; }
.cal-grid-heat .cal-day.sig-fire .cal-day-num,
.cal-grid-heat .cal-day.sig-up   .cal-day-num,
.cal-grid-heat .cal-day.sig-hold  .cal-day-num,
.cal-grid-heat .cal-day.sig-close .cal-day-num { color: #0C2340; }
.cal-grid-heat .cal-day.sig-down .cal-day-num  { color: #fff; }

/* ═════════════════════════════════════════════════════════════════════════
 * D3.2 Connections redesign — selection tray, row list, trio triangle
 * ═════════════════════════════════════════════════════════════════════════ */

/* Sticky selection tray under the screen header. */
.conn-tray {
  position: sticky;
  top: var(--topbar-h);
  z-index: 40;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  transition: background 0.22s ease;
}
.conn-tray.hidden { display: none; }
.conn-tray.flash  { background: rgba(55, 138, 221, 0.28); }
.conn-tray-chips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-height: 30px;
}
.conn-tray-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--blue);
  color: #fff;
  padding: 4px 4px 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.conn-tray-chip-name {
  background: transparent;
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
  padding: 0;
}
.conn-tray-chip-x {
  background: rgba(255,255,255,0.15);
  border: 0;
  color: #fff;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.conn-tray-chip-x:hover { background: rgba(255,255,255,0.25); }
.conn-tray-placeholder {
  color: var(--muted);
  font-size: 12px;
  font-style: italic;
}
.conn-tray-cta {
  background: var(--blue);
  color: #fff;
  border: 0;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
  flex: 0 0 auto;
  transition: transform 0.18s, background 0.18s;
}
.conn-tray-cta:disabled {
  background: transparent;
  border: 1px dashed var(--border);
  color: var(--muted);
  cursor: not-allowed;
}
.conn-tray-cta:hover:not(:disabled) { background: var(--steel); }
@keyframes conn-cta-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(55,138,221,0.55); }
  100% { box-shadow: 0 0 0 12px rgba(55,138,221,0); }
}
.conn-tray-cta.pulse:not(:disabled) {
  animation: conn-cta-pulse 0.7s ease 1;
}
@media (prefers-reduced-motion: reduce) {
  .conn-tray-cta.pulse { animation: none; }
  .conn-tray           { transition: none; }
}

/* Row list (replaces the a-cell grid). Each row: check + avatar + name + score */
.conn-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.conn-row {
  display: grid;
  grid-template-columns: 28px 36px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: var(--card-bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  transition: border-color 0.15s, background 0.15s;
}
.conn-row:hover { border-color: var(--blue); }
.conn-row.selected {
  border-color: var(--blue);
  background: rgba(55,138,221,0.12);
}
.conn-row-check {
  width: 24px;
  height: 24px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.conn-row.selected .conn-row-check {
  background: var(--blue);
  border-color: var(--blue);
}
.conn-row-avatar {
  width: 32px;
  height: 32px;
  background: var(--navy);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}
.conn-row-name {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.conn-row-score {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  min-width: 40px;
  text-align: center;
}

/* Result view — top back button. */
.conn-result-topbar {
  padding: 8px 0 12px;
}
.conn-back-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--sky-2);
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}
.conn-back-btn:hover { color: var(--blue); border-color: var(--blue); }
.conn-result-loading { color: var(--muted); text-align: center; padding: 24px; }

/* Trio card + triangle. */
.trio-card { border-radius: var(--radius); }
.trio-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.trio-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.trio-tier-pill {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.trio-tier-pill.sig-fire, .trio-tier-pill.sig-up   { background: #1D9E75; color: #0C2340; }
.trio-tier-pill.sig-hold, .trio-tier-pill.sig-close{ background: #EF9F27; color: #0C2340; }
.trio-tier-pill.sig-down                           { background: var(--band-low-bg); color: var(--sky-2); box-shadow: inset 0 0 0 1px var(--band-low-border); }
.trio-svg {
  width: 100%;
  max-width: 340px;
  display: block;
  margin: 0 auto 12px;
  height: auto;
}
.trio-sentence {
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
  margin: 6px 0 12px;
}
.trio-edge-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.trio-edge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text);
  padding: 6px 10px;
  background: var(--card-bg-2);
  border-radius: 6px;
  font-size: 13px;
}
.trio-edge-score {
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 700;
}
.trio-edge-score.sig-up   { background: #1D9E75; color: #0C2340; }
.trio-edge-score.sig-hold { background: #EF9F27; color: #0C2340; }
.trio-edge-score.sig-down { background: var(--band-low-bg); color: var(--sky-2); box-shadow: inset 0 0 0 1px var(--band-low-border); }

.trio-best-hdr {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}
.trio-best-title { color: var(--text); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.trio-best-sub   { color: var(--muted); font-size: 11px; }

/* ── T1: dev tier preview bar (only when tierpreview flag is on).
 * M1b.1: dvouřádkový layout pod ~560 px (label + ✕ v ř.1, badges v ř.2). */
.tier-preview-bar {
  /* M1b.3 · v7.46: NE-sticky (mobil i desktop), full-width přes celou
   * šířku viewportu, scrolluje s obsahem. */
  position: relative;
  width: 100%;
  z-index: auto;
  background: #0C1225;
  border-bottom: 2px solid #EF9F27;
  color: #F1D89A;
  padding: 5px 16px 7px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  box-sizing: border-box;
}
.tier-preview-row1 { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.tier-preview-row2 { display: flex; gap: 4px; flex-wrap: wrap; }
@media (min-width: 560px) {
  .tier-preview-bar {
    flex-direction: row;
    align-items: center;
    padding: 6px 12px;
    gap: 12px;
    font-size: 12px;
  }
  .tier-preview-row1 { flex: 0 0 auto; gap: 12px; }
  .tier-preview-row2 { flex: 1; justify-content: flex-start; flex-wrap: nowrap; }
}
.tier-preview-label {
  flex-shrink: 0;
  color: #EF9F27;
}
.tier-preview-btns {
  display: flex;
  gap: 6px;
  flex: 1;
}
.tier-preview-btn {
  background: transparent;
  border: 1px solid rgba(239, 159, 39, 0.45);
  color: #F1D89A;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.tier-preview-btn:hover { background: rgba(239, 159, 39, 0.15); }
.tier-preview-btn.active {
  background: #EF9F27;
  color: #0C1225;
  border-color: #EF9F27;
}
/* v7.15: anonymous-tier UI trims — read-only sandbox, no CRUD affordances
 * anywhere in the SPA. Hides the "+ Add profile" button on the People
 * screen and the small edit/delete affordances that would otherwise be
 * dead-ends. The `.tier-preview-anon` body class is toggled by
 * `_renderTierBar()` on every tier flip. */
/* L4: „+ Přidat" (#btn-add-profile) a ✎ / ✕ na kartách lidí (.pc-act-edit /
 * .pc-act-delete) zůstávají anonymovi vidět — kánon D9 (B2.1h, potvrzený
 * v L3 D-b5): klik otevře popup ukázky „S vlastním účtem…", server 403.
 * Do L3 byl skutečný anonym tier `admin`, takže tento seznam platil jen
 * v náhledu; od L3 je anonym `anon` a skryl by D9 tlačítka. */
body.tier-preview-anon .pill-add-team,
body.tier-preview-anon .team-edit-btn,
body.tier-preview-anon .team-delete-btn,
/* v7.16: also hide the People-screen team new-row (input + button) and
 * per-team rename/delete affordances. Server 403's these on CRUD
 * attempt, but Petr's UX rule is "no dead affordances for anon". */
body.tier-preview-anon .team-new-row,
body.tier-preview-anon .team-item-rename,
body.tier-preview-anon .team-item-delete,
body.tier-preview-anon .team-add-member-btn,
body.tier-preview-anon .team-member-remove {
  display: none !important;
}

/* v7.16: [Bez účtu] anonymous button — 2nd pill, sits between the
 * `admin` (staff) and the customer tiers (free/pro/founder). Left
 * divider paints the split "staff · prospective visitor · account
 * holder". Dashed border marks the "temporary" nature of anon. */
.tier-preview-btn.tier-preview-btn-anon {
  margin-left: 8px;
  border-style: dashed;
  position: relative;
}
.tier-preview-btn.tier-preview-btn-anon::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 15%;
  bottom: 15%;
  width: 1px;
  background: rgba(239, 159, 39, 0.35);
}
.tier-preview-close {
  background: transparent;
  border: none;
  color: #EF9F27;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
}
.tier-preview-close:hover { color: #F7C15B; }
/* When bar is active, push the sticky topbar down by its height. */
/* M1b.3: tier pruh + hlavička jsou v flow (non-sticky), takže
 * .tier-preview-on body class už nic nemusí posouvat. Drawer zůstává
 * position:fixed full-viewport (top:0). */

/* B1: restore badge — vlevo dole nad tab-barem, viditelný jen při skryté
 * liště. DayGate paleta: tmavě modré pozadí + světle modrý text + okraj. */
#tier-preview-restore-badge {
  position: fixed;
  left: 12px;
  bottom: calc(var(--dg-tabbar-h, 56px) + 10px + env(safe-area-inset-bottom, 0px));
  z-index: 9400;
  display: none;
  align-items: center;
  gap: 6px;
  background: #122A4C;
  color: #83CDF5;
  border: 1px solid #2A4470;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
  font-family: inherit;
}
#tier-preview-restore-badge .tp-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #83CDF5;
}
body[data-tier-preview-state="closed"] #tier-preview-restore-badge { display: inline-flex; }
#tier-preview-restore-badge:hover { filter: brightness(1.12); }

/* B1: drawer menu „Tier preview" — admin ladicí styl (DayGate paleta). */
.dg-ric-tier { background: #83CDF5 !important; color: #0B1A33; font-weight: 800; font-size: 10px; letter-spacing: 0.04em; }
.dg-rich-admin { background: #1B2A3A; border-top: 1px dashed #3B4A2E; border-bottom: 1px dashed #3B4A2E; }
.dg-rich-admin:hover { background: #223449; }
.dg-tag { margin-left: auto; font-size: 10px; border-radius: 999px; padding: 2px 8px; background: #16294A; color: #8FA3C4; font-weight: 700; letter-spacing: 0.04em; }
.dg-tag-on { background: #1E3A2E; color: #83E0A5; }
.dg-tag-off { background: #3A1E1E; color: #E09090; }

/* ── T1: upsell lock bubble — daygate steel look ──────────────────── */
/* v7.14: fully opaque steel background — pre-v7.14 alpha 0.55/0.75
 * let the underlying calendar cell colours bleed through, making the
 * white-on-navy body text unreadable at ±2M boundary.
 * background-color + background-image split — see the mobile twin. */
.tier-lock {
  background-color: #163C68;
  background-image: linear-gradient(180deg, #1E4E7A 0%, #123457 100%);
  border: 1px solid rgba(239, 159, 39, 0.50);
  border-radius: 12px;
  padding: 12px 14px;
  color: #E6F0FA;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 8px 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.tier-lock-icon {
  font-size: 18px;
  line-height: 1;
  flex-shrink: 0;
  filter: grayscale(0.2);
}
.tier-lock-text { flex: 1; }
.tier-lock-title {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #EF9F27;
  margin-bottom: 3px;
}
.tier-lock-body { font-size: 13px; line-height: 1.4; color: #E6F0FA; }
.tier-lock-cta {
  align-self: center;
  flex-shrink: 0;
  background: #EF9F27;
  color: #0C2340;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tier-lock-cta:hover { background: #F7C15B; }
/* Inline variant sits inside a control row without the outer padding. */
.tier-lock.tier-lock-inline {
  margin: 4px 0;
  padding: 6px 10px;
  gap: 8px;
  font-size: 11px;
}
.tier-lock.tier-lock-inline .tier-lock-title { font-size: 10px; margin-bottom: 0; }
.tier-lock.tier-lock-inline .tier-lock-cta { padding: 4px 8px; font-size: 10px; }
/* Row-styled bubble for the matrix "+N more" summary line. */
.tier-lock.tier-lock-row {
  border-radius: 6px;
  padding: 8px 12px;
  margin: 2px 0;
}
/* L4 · karta „Další lidé" pod mřížkou / seznamem lidí (host = sourozenec,
   přes celou šířku): desktop tlačítko vpravo vedle textu, mobil pod textem
   (odsazené pod text, ne pod ikonu). Vzhled karty beze změny. */
.tier-lock-host .tier-lock { margin: 10px 0 0; }
@media (max-width: 640px) {
  .tier-lock-host .tier-lock { flex-wrap: wrap; }
  .tier-lock-host .tier-lock-text { flex: 1 1 calc(100% - 46px); min-width: 0; }
  .tier-lock-host .tier-lock-cta { margin-left: 30px; }
}
/* Full-page bubble for report/trio deep-links. */
.tier-lock.tier-lock-page {
  margin: 24px auto;
  max-width: 520px;
  padding: 24px 22px;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  align-items: center;
}
.tier-lock.tier-lock-page .tier-lock-icon { font-size: 34px; }
.tier-lock.tier-lock-page .tier-lock-title { font-size: 14px; }
.tier-lock.tier-lock-page .tier-lock-body { font-size: 14px; }
.tier-lock.tier-lock-page .tier-lock-cta { padding: 10px 22px; font-size: 13px; }

/* Locked controls: greyed with a lock affordance. Click is dead-ended in JS. */
.tier-locked {
  opacity: 0.42;
  filter: grayscale(0.65);
  cursor: not-allowed;
  position: relative;
}
.tier-locked::after {
  content: "🔒";
  position: absolute;
  top: -4px;
  right: -6px;
  font-size: 10px;
  line-height: 1;
  background: rgba(239, 159, 39, 0.9);
  color: #0C2340;
  border-radius: 50%;
  padding: 2px 3px;
  pointer-events: none;
}

/* Floating inline bubble host for FIFO/no-op click hints. */
.tier-bubble-host {
  position: fixed;
  bottom: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 940;
  width: min(90vw, 420px);
  pointer-events: auto;
}

/* v7.17: quiet informational note appended to the People screen for
 * anonymous visitors. Not a bubble, not a CTA — a small-print line that
 * tells the visitor what's on the other side of a sign-up. Sits below
 * the card grid, no border, no elevation. */
.people-anon-pro-note {
  margin: 10px 4px 0;
  padding: 8px 6px 4px;
  font-size: 11px;
  color: rgba(181, 212, 244, 0.55);
  line-height: 1.4;
  text-align: center;
}

/* v7.16: DayGate #person — astro-free personal profile screen.
 * RULE 20 clone of the mobile detail layout, painted in the daygate
 * steel palette. Sections stack vertically inside `.dg-person-body`.
 * The mobile #person section boundaries (zodiac chip row, seals,
 * transits, natal chart) are deliberately absent — the whole point of
 * this screen is that a DayGate visitor sees only numerology +
 * personality + phases, no astrology. */
.dg-person-loading {
  padding: 40px 16px;
  text-align: center;
  color: #A5C5E4;
  font-size: 14px;
}
.dg-p-sec {
  background: #123457;
  border: 1px solid #1E4E7A;
  border-radius: 12px;
  padding: 14px 14px 12px;
  margin: 12px 0;
  color: #E6F0FA;
}
.dg-p-sec-h {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F1D89A;
  margin-bottom: 8px;
}
/* v7.18: Daily overview card — the #today hero donut + verdict pattern
 * re-hosted on #person, painted with the OPENED MEMBER's today score,
 * signal band and verdict. Replaces the flat "ENERGIE DNE <score> <band>"
 * body block from v7.17 and the redundant header score/signal/verdict
 * (now retired from the template). The donut arc offset is computed in
 * JS from `p.today.score`; text uses `sig_title_<band>` / `sig_sub_<band>`
 * so the copy stays inside the DayGate business tone. */
.dg-p-overview {
  background: linear-gradient(180deg, #123457 0%, #0C2340 100%);
  border: 1px solid #1E4E7A;
}
.dg-p-overview-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #F1D89A;
  margin-bottom: 10px;
}
.dg-p-overview-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.dg-p-donut {
  width: 92px;
  height: 92px;
  flex-shrink: 0;
}
.dg-p-overview-txt {
  flex: 1;
  min-width: 0;
}
.dg-p-overview-verdict {
  font-size: 16px;
  font-weight: 800;
  color: #FFEDCF;
  line-height: 1.25;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.dg-p-overview-sub {
  font-size: 12.5px;
  color: #B5D4F4;
  line-height: 1.45;
}
.dg-p-arch {
  font-size: 14px;
  font-weight: 700;
  color: #F1D89A;
  margin: 4px 0 8px;
}
/* v7.19: archetype promoted to a dominant headline (Petr's mockup).
 * Font ~30 px, weight 500, amber #FAC775 on the #12294A steel card
 * (contrast ≈ 9.5:1 — comfortably AA on text ≥ 14 px). Short accent
 * underline (56 × 3, deeper amber #EF9F27, 2 px radius) sits below
 * with a 14 px gap before the tag row. Replaces the retired
 * `.dg-p-sec-h` on the portrait section — the archetype name IS
 * the section identity now. */
.dg-p-arch-head {
  margin: 4px 0 14px;
}
.dg-p-arch-name {
  font-size: 30px;
  font-weight: 500;
  color: #FAC775;
  line-height: 1.1;
  letter-spacing: 0.005em;
  margin: 0;
}
.dg-p-arch-underline {
  width: 56px;
  height: 3px;
  background: #EF9F27;
  border-radius: 2px;
  margin-top: 10px;
}
.dg-p-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}
.dg-p-tag {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.dg-p-tag-pos { background: rgba(15, 110, 86, 0.35); color: #C9F0DD; }
.dg-p-tag-neg { background: rgba(197, 82, 82, 0.35); color: #FBD3D3; }
/* v7.18: A2 — Personality tiles (2×2 grid). Each tile is a compact
 * card in the steel palette with an emoji icon on top, an uppercase
 * gold label, and the axis text below. Grid on mobile is 2 columns
 * (12px gap), which drops to 1 column under 340px viewport. */
.dg-p-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.dg-p-tile {
  background: #0E2A47;
  border: 1px solid #1E4E7A;
  border-radius: 10px;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100px;
}
.dg-p-tile-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 2px;
}
.dg-p-tile-lbl {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #F1D89A;
}
.dg-p-tile-val {
  font-size: 12.5px;
  color: #E6F0FA;
  line-height: 1.4;
}
@media (max-width: 340px) {
  .dg-p-tiles { grid-template-columns: 1fr; }
}
.dg-p-empty {
  font-size: 12px;
  color: #A5C5E4;
  padding: 6px 0;
}

/* v7.18: A3 — Visual phase axis. A horizontal bar split into
 * proportional segments (one per pinnacle). Boundary ages sit above
 * the bar (positioned absolutely by cumulative width), each segment
 * shows its number + name inside, the "teď · věk N" marker sits
 * under the bar and is horizontally positioned inside the active
 * segment. Bigger fonts than the retired vertical pinnacle list —
 * Petr's spec: "větší fonty a výraznější provedení". */
.dg-p-axis-frame {
  position: relative;
  padding: 22px 0 34px;
  margin-top: 10px;
}
.dg-p-axis-ticks {
  position: relative;
  height: 16px;
  margin-bottom: 4px;
}
.dg-p-axis-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 700;
  color: #B5D4F4;
  letter-spacing: 0.02em;
  top: 0;
  white-space: nowrap;
}
.dg-p-axis-tick.dg-p-axis-tick-first { transform: translateX(0); }
.dg-p-axis-tick.dg-p-axis-tick-last  { transform: translateX(-100%); }
.dg-p-axis-bar {
  display: flex;
  width: 100%;
  height: 68px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #1E4E7A;
  background: #0E2A47;
}
.dg-p-axis-seg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 6px;
  min-width: 0;
  color: #E6F0FA;
  background: #123457;
  border-right: 1px solid rgba(30, 78, 122, 0.7);
  text-align: center;
  overflow: hidden;
}
.dg-p-axis-seg:last-child { border-right: none; }
/* v7.19: segment number removed — only the laic name renders inside.
 * `.dg-p-axis-seg-num` retained as an unused rule for backward-compat
 * so any third-party override that targets it (there are none in the
 * daygate tree) doesn't 404 the selector. Safe to drop later. */
.dg-p-axis-seg-num { display: none; }
.dg-p-axis-seg-name {
  font-size: 14px;
  font-weight: 700;
  color: #FFEDCF;
  line-height: 1.2;
  letter-spacing: 0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  padding: 0 2px;
}
/* Narrow segments (< 14 % of the bar, roughly ≤ 11-year pinnacles)
 * scale the label down so a single-word essence like "Tvůrce" or
 * "Analytik" fits WITHOUT ellipsis. Petr's spec: "preferuj fit;
 * u extrémně úzkého segmentu povol zalomení či zmenšení, nikdy
 * přetečení přes hranice segmentu." */
.dg-p-axis-seg-narrow {
  padding: 4px 2px;
}
.dg-p-axis-seg-narrow .dg-p-axis-seg-name {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0;
  /* Clip rather than ellipsis — narrower fonts should fit the whole
   * word; if two words collide we prefer a visible clip on the last
   * character to a "…" that hides the essence. */
  text-overflow: clip;
}
.dg-p-axis-seg.dg-p-axis-seg-active {
  background: linear-gradient(180deg, #EF9F27 0%, #C67F17 100%);
  color: #0C2340;
}
.dg-p-axis-seg.dg-p-axis-seg-active .dg-p-axis-seg-name { color: #0C2340; }
.dg-p-axis-marker-wrap {
  position: relative;
  height: 30px;
  margin-top: 4px;
}
.dg-p-axis-marker {
  position: absolute;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  top: 0;
}
.dg-p-axis-marker-arrow {
  font-size: 12px;
  color: #EF9F27;
  line-height: 1;
}
.dg-p-axis-marker-lbl {
  font-size: 11.5px;
  font-weight: 800;
  color: #FFEDCF;
  letter-spacing: 0.03em;
  white-space: nowrap;
  background: rgba(12, 35, 64, 0.85);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #EF9F27;
}
/* Tier-aware bridge card at the bottom of the person screen. Two
 * variants — upsell (anon/free → #plans) and personal (pro+ → mobile
 * personal edition). Same rectangle, different palette. */
.dg-person-bridge {
  display: block;
  padding: 14px 16px;
  border-radius: 14px;
  text-decoration: none;
  margin: 14px 0 12px;
  border: 1.5px solid #EF9F27;
  background-color: #0E2A47;
  background-image: linear-gradient(180deg, #123457 0%, #0C2340 100%);
  color: #FFEDCF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}
.dg-person-bridge:hover { border-color: #F7C15B; }
.dg-person-bridge-title {
  font-size: 14px;
  font-weight: 800;
  color: #F7C15B;
  margin-bottom: 4px;
  line-height: 1.35;
}
.dg-person-bridge-body {
  font-size: 12px;
  color: #E6F0FA;
  line-height: 1.4;
}
.dg-person-bridge-upsell   { border-color: #EF9F27; }
.dg-person-bridge-personal { border-color: #7EC49B; }
.dg-person-bridge-personal .dg-person-bridge-title { color: #A6E3C1; }

/* v7.15: anonymous-tier DEMO badge — sits inside the active matrix team
 * chip so the visitor knows the underlying data is a fictitious "Demo
 * tým" (10 fictitious CZ profiles). Gold pill on dark navy chip. */
.matrix-demo-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  font-size: 9.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #0C2340;
  background: #EF9F27;
  border-radius: 999px;
  vertical-align: middle;
  text-transform: uppercase;
}

/* v7.15: anonymous-tier register CTA card — opaque steel-navy card
 * with a gold CTA button. Rendered by `_registerCtaCard()` on locked
 * features (report, CSV export, ICS export, editor CRUD, admin
 * clear-cache). Fully opaque so it never blends into the matrix or
 * calendar underneath (v7.14 background-safety pattern). */
.register-cta-card {
  background-color: #0E2A47;
  background-image: linear-gradient(180deg, #123457 0%, #0C2340 100%);
  border: 1.5px solid #EF9F27;
  border-radius: 14px;
  padding: 14px 16px;
  color: #E6F0FA;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.register-cta-title {
  font-weight: 800;
  font-size: 13px;
  color: #F7C15B;
  margin-bottom: 4px;
  line-height: 1.35;
}
.register-cta-body {
  font-size: 11.5px;
  color: #E6F0FA;
  margin-bottom: 10px;
  line-height: 1.4;
}
.register-cta-btn {
  display: inline-block;
  padding: 8px 14px;
  background: #EF9F27;
  color: #0C2340;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
}
.register-cta-btn:hover { background: #F7C15B; }

/* v7.14: founder ceiling card (RULE 20 clone of mobile T2.2 KROK 6b,
 * repainted in the daygate steel-and-gold palette). Distinct from the
 * upsell tier-lock: no lock icon, no ladder — a direct contact
 * affordance for founder-tier users hitting the ±3M range wall. Fully
 * opaque background so calendar cells never bleed through. */
.founder-cap-card {
  background-color: #0E2A47;
  background-image: linear-gradient(180deg, #123457 0%, #0C2340 100%);
  border: 1.5px solid #EF9F27;
  border-radius: 14px;
  padding: 14px 16px;
  color: #FFEDCF;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  text-align: center;
}
.founder-cap-title {
  font-weight: 800;
  font-size: 13px;
  color: #F7C15B;
  margin-bottom: 4px;
  line-height: 1.35;
}
.founder-cap-body {
  font-size: 11px;
  color: #FFEDCF;
  margin-bottom: 10px;
  line-height: 1.4;
}
.founder-cap-cta {
  display: inline-block;
  padding: 8px 14px;
  background: #EF9F27;
  color: #0C2340;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
}
.founder-cap-cta:hover { background: #F7C15B; }

/* Matrix summary row lock: sits below the trimmed rows, keeps grid width. */
.matrix-row.matrix-row-locked {
  grid-template-columns: 1fr;
  padding: 4px 8px;
}
.matrix-row.matrix-row-locked .tier-lock { margin: 0; }

/* T1.1: ghost cells in planner calendar and day strip. */
.cal-day.cal-day-ghost {
  background: rgba(30, 78, 122, 0.18) !important;
  color: rgba(181, 212, 244, 0.55) !important;
  cursor: not-allowed;
  position: relative;
}
.cal-day.cal-day-ghost .cal-day-num { opacity: 0.6; }
.cal-day.cal-day-ghost .cal-ghost-lock {
  position: absolute;
  bottom: 4px;
  right: 4px;
  font-size: 10px;
  opacity: 0.8;
}
.strip-wrapper.strip-ghost { opacity: 0.55; cursor: not-allowed; }
.strip-day.strip-day-ghost {
  background: rgba(30, 78, 122, 0.35);
  color: #B5D4F4;
  box-shadow: inset 0 0 0 1px rgba(239, 159, 39, 0.35);
}
.month-btn.tier-locked { opacity: 0.42; cursor: not-allowed; }

/* T1.1: matrix ghost columns (locked future). */
.matrix-head-day.matrix-head-day-ghost { opacity: 0.55; }
.matrix-cell.matrix-cell-ghost {
  background: rgba(30, 78, 122, 0.18) !important;
  color: rgba(181, 212, 244, 0.55);
  box-shadow: inset 0 0 0 1px rgba(239, 159, 39, 0.20);
  cursor: not-allowed;
  display: flex;
  align-items: center;
  justify-content: center;
}
.matrix-cell.matrix-cell-ghost .matrix-ghost-lock { font-size: 11px; opacity: 0.75; }

/* T1.3: #day rail ghost pills. */
.rail-day.rail-day-ghost { opacity: 0.55; cursor: not-allowed; }
.rail-day-pip.rail-day-pip-ghost {
  background: rgba(30, 78, 122, 0.35) !important;
  color: #B5D4F4;
  box-shadow: inset 0 0 0 1px rgba(239, 159, 39, 0.30);
  font-size: 11px;
}

/* T1.1: #plans screen — steel cards generated from the tier matrix. */
#plans-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 12px;
}
.plans-card {
  background: linear-gradient(180deg, rgba(30, 78, 122, 0.35) 0%, rgba(18, 52, 87, 0.55) 100%);
  border: 1px solid rgba(239, 159, 39, 0.25);
  border-radius: 14px;
  padding: 16px 16px 12px;
  color: #B5D4F4;
}
.plans-card.plans-card-current {
  border-color: #EF9F27;
  box-shadow: 0 0 0 2px rgba(239, 159, 39, 0.20);
}
.plans-card-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 6px;
}
.plans-card-name {
  font-size: 16px; font-weight: 800; color: #EF9F27;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.plans-current-badge {
  font-size: 10px; font-weight: 700;
  color: #0C2340; background: #EF9F27;
  padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.plans-card-price {
  font-size: 11px; color: rgba(181, 212, 244, 0.55);
  margin-bottom: 10px;
  font-style: italic;
}
.plans-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0;
  border-top: 1px solid rgba(181, 212, 244, 0.10);
  font-size: 13px;
}
.plans-row-label { color: rgba(181, 212, 244, 0.80); }
.plans-row-value { color: #F1F4F7; font-weight: 600; }
.plans-pilot-line {
  margin-top: 18px;
  padding: 10px 14px;
  background: rgba(239, 159, 39, 0.10);
  border: 1px solid rgba(239, 159, 39, 0.35);
  border-radius: 10px;
  font-size: 13px;
  color: #F1F4F7;
  text-align: center;
}
.plans-pilot-cta {
  color: #EF9F27;
  font-weight: 800;
  text-decoration: none;
  padding-left: 4px;
}
.plans-pricing-placeholder { display: none; }

/* Drawer #plans link label */
@media (min-width: 481px) { #screen-plans .screen-pad { max-width: 720px; } }

/* ── T1.3: Plans v2 — hero, toggles, 3 pricing cards, comparison ─── */
#screen-plans .plans-wrap {
  padding: 20px 16px 40px;
  max-width: 1180px;
  margin: 0 auto;
}
.plans-hero { text-align: center; padding: 8px 4px 24px; }
.plans-hero-title {
  font-size: 32px; font-weight: 800;
  color: #F1D89A; letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.plans-hero-sub { color: #B5D4F4; font-size: 15px; line-height: 1.45; max-width: 640px; margin: 0 auto; }

.plans-toggles {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; flex-wrap: wrap;
  margin: 12px 0 22px;
}
.plans-toggle {
  display: inline-flex;
  background: rgba(30, 78, 122, 0.35);
  border: 1px solid rgba(239, 159, 39, 0.25);
  border-radius: 999px;
  padding: 3px;
}
.plans-toggle-btn {
  background: transparent; border: none;
  color: #B5D4F4;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 6px;
}
.plans-toggle-btn.active { background: #EF9F27; color: #0C2340; }
.plans-toggle-btn:hover:not(.active) { background: rgba(239, 159, 39, 0.15); color: #F1D89A; }
.plans-toggle-saved {
  background: #3ED598; color: #0C2340;
  border-radius: 8px; padding: 1px 6px; font-size: 10px; font-weight: 800;
}

.plans-cards-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 22px;
}
@media (min-width: 900px) {
  .plans-cards-row { grid-template-columns: 1fr 1.15fr 1fr; align-items: stretch; }
  .plans-cards-row .plans-card-pro { transform: translateY(-6px); }
}

.plans-card {
  background: linear-gradient(180deg, rgba(30, 78, 122, 0.35) 0%, rgba(18, 52, 87, 0.55) 100%);
  border: 1px solid rgba(239, 159, 39, 0.25);
  border-radius: 16px;
  padding: 22px 20px 20px;
  color: #B5D4F4;
  display: flex; flex-direction: column;
  position: relative;
}
.plans-card.plans-card-pro { border-color: #EF9F27; box-shadow: 0 12px 26px rgba(0,0,0,0.25); }
.plans-card.plans-card-current { border-color: #EF9F27; box-shadow: 0 0 0 2px rgba(239, 159, 39, 0.20); }
.plans-card-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  background: #EF9F27; color: #0C2340;
  padding: 3px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.plans-card-badge.plans-card-badge-limited { background: #3ED598; white-space: nowrap; }  /* PG-R1: „★ 2,000 seats · lifetime“ na jeden řádek */
.plans-card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
.plans-card-name {
  font-size: 15px; font-weight: 800; color: #EF9F27;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.plans-current-badge {
  font-size: 10px; font-weight: 700;
  color: #0C2340; background: #EF9F27;
  padding: 2px 8px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.plans-card-tagline { font-size: 12px; color: rgba(181, 212, 244, 0.75); margin-bottom: 14px; font-style: italic; }
.plans-card-price-wrap {
  display: flex; align-items: baseline; gap: 6px;
  margin-bottom: 16px;
}
.plans-card-price-big {
  font-size: 34px; font-weight: 800; color: #F1F4F7;
  letter-spacing: -0.01em;
}
.plans-card-price-unit { color: rgba(181, 212, 244, 0.65); font-size: 13px; }
.plans-founder-bar { margin: 4px 0 12px; }
.plans-founder-bar-track {
  height: 6px; background: rgba(181, 212, 244, 0.15);
  border-radius: 999px; overflow: hidden;
}
.plans-founder-bar-fill { display: block; height: 100%; background: #3ED598; }
.plans-founder-bar-line { color: rgba(181, 212, 244, 0.72); font-size: 11px; margin-top: 4px; }
.plans-card-lines {
  list-style: none; padding: 0; margin: 0 0 18px;
  flex: 1;
}
.plans-card-lines li {
  padding: 4px 0; font-size: 13px; line-height: 1.5;
  color: #F1F4F7;
}
/* T3 v7.9 — bundle benefit line: green accent + inline ⓘ tooltip. */
.plans-card-lines li.plans-line-bundle {
  color: #6ED9A0;
  padding-top: 6px;
  border-top: 1px dashed rgba(110,217,160,0.35);
  margin-top: 6px;
  font-weight: 600;
}
.plans-line-tip {
  display: inline-block;
  margin-left: 6px;
  width: 14px; height: 14px; line-height: 12px;
  font-size: 10.5px;
  color: rgba(110,217,160,0.85);
  border: 1px solid rgba(110,217,160,0.55);
  border-radius: 999px;
  text-align: center;
  cursor: help;
  vertical-align: middle;
}
.plans-card-cta {
  display: block; width: 100%;
  background: transparent;
  border: 1.5px solid #EF9F27;
  color: #EF9F27;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  cursor: pointer;
}
.plans-card-cta:hover { background: rgba(239, 159, 39, 0.15); }
a.plans-card-cta { box-sizing: border-box; text-align: center; text-decoration: none; }  /* PG-E */
.plans-card-cta.plans-card-cta-current { cursor: default; opacity: .75; text-align: center; }
.plans-card-cta.plans-card-cta-current:hover { background: transparent; }
button.plans-card-cta.plans-card-cta-current[disabled] { border-color: rgba(255,255,255,.18); color: rgba(255,255,255,.55); background: rgba(255,255,255,.06); opacity: 1; }  /* FIX1b · A: šedé neaktivní */
.plans-card-cta.plans-card-cta-primary { background: #EF9F27; color: #0C2340; }
.plans-card-cta.plans-card-cta-primary:hover { background: #F7C15B; border-color: #F7C15B; }

.plans-pilot-banner {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  margin: 24px 0;
  background: linear-gradient(90deg, rgba(239,159,39,0.16), rgba(239,159,39,0.06));
  border: 1px solid rgba(239, 159, 39, 0.45);
  border-radius: 14px;
  text-decoration: none;
  color: #F1F4F7;
}
.plans-pilot-banner:hover { background: linear-gradient(90deg, rgba(239,159,39,0.22), rgba(239,159,39,0.08)); }
.plans-pilot-banner-icon { font-size: 22px; }
.plans-pilot-banner-body { flex: 1; }
.plans-pilot-banner-title { font-weight: 800; font-size: 14px; color: #F1D89A; }
.plans-pilot-banner-sub { font-size: 12px; color: rgba(181, 212, 244, 0.80); margin-top: 2px; }
.plans-pilot-banner-cta {
  background: #EF9F27; color: #0C2340;
  padding: 8px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}

.plans-compare-wrap { margin-top: 22px; overflow-x: auto; }
/* L2 · B3: sloupec „Ukázka" (bez účtu · jen čtení) — žlutý nádech na tmavém */
.plans-compare .plans-compare-demo { background: rgba(228,179,65,.13); }
.plans-compare thead th.plans-compare-demo small { display: block; font-weight: 400; font-size: 10px; text-transform: none; letter-spacing: 0; opacity: .8; }
#plans-wrap .pc-strip { margin: 12px 0 16px; }
.plans-compare-title { color: #F1D89A; font-size: 18px; font-weight: 800; margin-bottom: 10px; }
.plans-compare {
  width: 100%; border-collapse: collapse; font-size: 13px;
  color: #F1F4F7;
  min-width: 520px;
}
.plans-compare thead th {
  padding: 10px 8px; text-align: center;
  color: #EF9F27; text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 11px;
  background: rgba(30, 78, 122, 0.30);
  border-bottom: 1px solid rgba(239, 159, 39, 0.30);
}
.plans-compare tbody th.plans-compare-label {
  text-align: left; padding: 8px 10px;
  color: rgba(181, 212, 244, 0.80);
  background: rgba(30, 78, 122, 0.20);
  font-weight: 600;
  width: 40%;
}
.plans-compare tbody td { text-align: center; padding: 8px 8px; }
.plans-compare tbody tr:nth-child(odd) td, .plans-compare tbody tr:nth-child(odd) th.plans-compare-label {
  background: rgba(30, 78, 122, 0.08);
}

.plans-trust {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 22px;
}
@media (min-width: 720px) { .plans-trust { grid-template-columns: repeat(3, 1fr); } }
.plans-trust-tile {
  padding: 14px 16px;
  background: rgba(30, 78, 122, 0.20);
  border: 1px solid rgba(181, 212, 244, 0.10);
  border-radius: 12px;
}
.plans-trust-t { font-weight: 800; font-size: 13px; color: #F1D89A; margin-bottom: 4px; }
.plans-trust-s { font-size: 12px; color: rgba(181, 212, 244, 0.80); line-height: 1.4; }

/* PG-R1 (v8.14) · R1-7: řádek polohy pod přepínačem, DPH pod cenou, pás důvěry, dovětek */
.plans-geo { text-align: center; font-size: 12px; color: rgba(181, 212, 244, 0.70); margin: -6px 0 14px; }
.plans-vat { font-size: 11.5px; color: #8FD3A8; margin: 2px 0 6px; }
.plans-r1-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 12px; margin: 18px 0 4px; font-size: 12.5px; }
.plans-r1-trust span { display: inline-flex; align-items: center; gap: 5px; background: rgba(30, 78, 122, 0.25);
  border: 1px solid rgba(181, 212, 244, 0.18); border-radius: 999px; padding: 5px 12px; color: #DCE9F7; max-width: 100%; line-height: 1.35; }
.plans-note { text-align: center; font-size: 12.5px; color: rgba(181, 212, 244, 0.75); max-width: 820px; margin: 8px auto 0; line-height: 1.5; }

.plans-footer {
  margin-top: 26px; text-align: center;
  color: rgba(181, 212, 244, 0.55);
  font-size: 11px;
}

/* ══════════════════════════════════════════════════════════════════════
   M1b.2 DayGate velka znacka + FULL-WIDTH hlavička (v7.45).
   Levá polovina = velký matice + název + by AstraDecision + claim.
   Pravý sloupec dvouřádkově: ř.1 = 3|5 + vlajka + ★ Plány + ☰,
   ř.2 = World + switcher. Pod ~560 px sbíhá do stacked shell v2.
   Container queries + ResizeObserver fallback.
   Navy palette + blue accent + gold ★ Plans.
   ══════════════════════════════════════════════════════════════════════ */
/* M1b.3 · v7.46: DG shell nově NE-sticky (mobil i desktop). */
.dg-shell{ container-type:inline-size; container-name:dgshell;
  position:relative; width:100%; z-index:auto; }
.dg-topbar{
  background:#0C2340;
  color:#fff;
  padding:9px 12px; margin:0;
  /* M1c mobile default (< 560): grid, r.1 = brand + burger, r.2 = World
   * + switcher + ★ Plány. 3|5 a langpill jsou v hlavičce SKRYTÉ na mobilu
   * (jsou dostupné v menu Rychlé nastavení). Grid override na ≥560 níže. */
  display:grid;
  grid-template-columns:auto 1fr auto;
  grid-template-rows:auto auto;
  grid-template-areas:
    "brand brand burger"
    "r2 r2 plans";
  gap:5px 8px;
  align-items:center;
  position:static; transform:none; width:100%; max-width:none; left:auto; top:auto;
  height:auto; min-width:0;
}
.dg-r1{ display:contents; }
.dg-r2{ display:flex; align-items:center; gap:8px; min-width:0;
  border-top:none; padding-top:0; justify-content:flex-start;
  grid-area:r2; }
.dg-plansbtn{ grid-area:plans; justify-self:end; }
/* M1b.3a: pravá hrana ☰ líce s pravou hranou ★ Plány (mobil). */
.dg-burger{ grid-area:burger; justify-self:end; }
/* M1c mobile: 3|5 + langpill v hlavičce SKRYTÉ (žijí v menu). */
.dg-topbar > .dg-r1 .dg-band-toggle,
.dg-topbar > .dg-r1 .dg-langpill{ display:none; }
.dg-brand{
  display:flex; align-items:center; gap:10px;
  text-decoration:none; color:#fff; min-width:0; flex:0 1 auto;
  grid-area:brand;
}
.dg-brand-mark{ width:26px; height:26px; flex:none; }
.dg-brand-text{ display:flex; flex-direction:column; line-height:1.1; min-width:0;}
.dg-brand-row{ display:flex; align-items:center; gap:6px; min-width:0; }
.dg-word{ font-weight:800; font-size:16px; color:#fff; letter-spacing:.01em; white-space:nowrap;}
.dg-word .dg-dot, .dg-menu-head-title .dg-dot{ color:#378ADD; }
.dg-brand-by{ font-size:10px; opacity:.85; color:#fff; margin-top:1px; white-space:nowrap; }
.dg-brand-claim{ font-size:10.5px; opacity:.92; color:#fff; font-style:italic; margin-top:1px; font-weight:600; white-space:nowrap; }
.dg-spacer{ flex:1; min-width:0; }
.dg-worldbtn{
  display:flex; align-items:center; gap:5px;
  background: rgba(0,0,0,.35); border:1px solid rgba(227,184,76,.5); color:#E3B84C;
  border-radius:9px; padding:4px 9px; font-size:11.5px; font-weight:700;
  text-decoration:none; white-space:nowrap; flex:none;
}
.dg-world-label{ display:none; }
.dg-switcher{
  display:flex; gap:3px; background:rgba(255,255,255,.12); border-radius:9px; padding:3px;
  flex:1; min-width:0;
}
.dg-sw{
  display:flex; align-items:center; justify-content:center; gap:4px;
  padding:4px 8px; border-radius:7px; font-size:10.5px;
  color:rgba(255,255,255,.85); text-decoration:none; white-space:nowrap;
  flex:1; min-width:0;
}
.dg-sw.on{ background:rgba(255,255,255,.94); font-weight:700; color:#0C2340; }
.dg-band-toggle{ height:auto; padding:3px 8px; flex:none; }
.dg-langpill{
  display:inline-flex; align-items:center; gap:4px;
  font-size:11px; font-weight:700; color:#fff;
  background:transparent; border:1px solid rgba(255,255,255,.35);
  border-radius:14px; padding:3px 9px 3px 4px; letter-spacing:.02em;
  flex:none;
}
.dg-langpill .dg-flag{ width:15px; height:15px; }
.dg-plansbtn{
  display:flex; align-items:center; gap:5px;
  background:linear-gradient(160deg,#FFF3D6,#FFE9B8);
  border:1.5px solid #E3B84C; color:#7A5A00;
  border-radius:14px; padding:4px 10px;
  font-size:11px; font-weight:800; white-space:nowrap;
  box-shadow:0 1px 6px rgba(200,150,20,.25);
  text-decoration:none; flex:none;
}
.dg-plans-star{ color:#7A5A00; font-weight:900; }
.dg-flag{ width:16px; height:16px; border-radius:50%; overflow:hidden; flex:none; display:inline-block; }
.dg-flag svg{ display:block; width:100%; height:100%; }
.dg-burger{ width:29px; height:27px; border:1px solid rgba(255,255,255,.4);
  border-radius:6px; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:3px; background:transparent; color:#fff; font-size:16px; padding:0; flex:none;
}
/* Container-query polish: pod ~410 px switcher zkrátí neaktivní na ikony
 * aby ACTIVE segment vždycky viditelně nesl celý label. */
@container dgshell (max-width:410px){
  .dg-sw:not(.on) .dg-sw-label{ display:none; }
  .dg-sw:not(.on){ padding:4px 5px; flex:0 0 auto; }
  .dg-sw.on{ flex:1; }
}
.dg-shell.hdr-lt-410 .dg-sw:not(.on) .dg-sw-label{ display:none; }
.dg-shell.hdr-lt-410 .dg-sw:not(.on){ padding:4px 5px; flex:0 0 auto; }
.dg-shell.hdr-lt-410 .dg-sw.on{ flex:1; }
/* M1b.1: KROK 5c aktivní 3|5 segment vyplněný #E8F1FA + navy text. */
.dg-band-toggle span[data-mode].active,
.dg-menu-band-toggle span[data-mode].active{
  background:#E8F1FA; color:#0C2340; border-radius:5px; padding:2px 6px;
}

/* Drawer — DayGate navy theme */
.dg-drawer{
  background:#0D2440;
  color:#DCE8F5;
  right:-360px;
  width:340px;
}
.dg-drawer.open{ right:0; }
.dg-menu-head{
  background: linear-gradient(120deg,#0C2340,#17406E);
  padding:14px 17px; font-weight:700; font-size:14px; color:#fff;
  display:flex; justify-content:space-between; align-items:center; flex:none;
}

/* M3-B2.1 · karta účtu v DayGate draweru */
.dg-acct-card,.dg-acct-logincard{
  margin:10px 12px 0; border-radius:12px; padding:10px 12px;
  display:flex; align-items:center; gap:10px; color:#DCE7F6; text-decoration:none;
  background:#16294A;
}
.dg-acct-logincard{background:transparent;border:1.5px dashed #83CDF5;cursor:pointer}
.dg-acct-av{
  width:34px;height:34px;border-radius:50%;background:#83CDF5;color:#0C2340;
  display:grid;place-items:center;font-weight:700;font-size:12px;flex:none;
}
.dg-acct-logincard .dg-acct-av{background:#16294A;color:#83CDF5;border:1px solid #83CDF5}
.dg-acct-tx b{display:block;font-size:13px;color:#DCE7F6}
.dg-acct-tx span{font-size:11px;color:#8FA3C4}
.dg-acct-pill{
  display:inline-block;border-radius:999px;padding:1px 7px;
  font-size:10px;font-weight:700;background:transparent;color:#83CDF5;
  border:1px solid #83CDF5;margin-left:6px;vertical-align:middle;
}
.dg-acct-pill.dg-acct-tier-founder{background:#E4B341;color:#1B1B1B;border-color:#E4B341}
.dg-acct-pill.dg-acct-tier-admin{background:#DCE7F6;color:#0C2340;border-color:#DCE7F6}
.dg-acct-logout{margin-left:auto}
.dg-acct-link{background:none;border:0;color:#8FA3C4;text-decoration:underline;cursor:pointer;font-size:11px;padding:0}
.dg-acct-go{
  margin-left:auto;background:#83CDF5;color:#0C2340;border-radius:999px;
  padding:5px 12px;font-size:12px;font-weight:600;
}
.dg-menu-head-title{ display:flex; align-items:center; gap:9px; }
.dg-menu-head-title svg{ width:20px; height:20px; }
.dg-menu-close{
  opacity:.85; font-weight:400; background:transparent; border:none;
  color:#fff; font-size:20px; line-height:1; cursor:pointer; padding:2px 6px;
}
.dg-menu-scroll{ overflow-y:auto; overflow-x:hidden; flex:1; -webkit-overflow-scrolling:touch; }   /* FIX1 · E1 */
.dg-sec{ padding:9px 15px 11px; border-bottom:1px solid #17395F; }
.dg-sec-nolabel{ padding-top:11px; }
.dg-sec:last-child{ border-bottom:none; }
.dg-lbl{ font-size:10px; letter-spacing:.16em; text-transform:uppercase;
  font-weight:700; margin-bottom:7px; color:#7FA3C8; }
.dg-mini-lbl{ font-size:9px; letter-spacing:.1em; margin-bottom:4px; color:#7FA3C8;
  font-weight:700; text-transform:uppercase; }
.dg-quick-row{ display:flex; justify-content:space-between; align-items:flex-start; gap:12px;}
.dg-quick-right{ text-align:right; }
.dg-menu-band-toggle{ margin-left:auto; }
.dg-langrow{ display:flex; gap:5px; flex-wrap:wrap; }
.dg-lp{ display:flex; align-items:center; gap:5px; border-radius:14px;
  padding:3px 8px 3px 4px; font-size:10.5px; font-weight:700;
  border:1px solid #2C567F; color:#CDE0F2; background:transparent; text-decoration:none; }
.dg-lp.on{ background:#E8F1FA; color:#0C2340; border-color:#E8F1FA; }
.dg-ws{ display:flex; align-items:center; gap:9px; padding:6px 9px; border-radius:8px;
  font-size:12.5px; margin-bottom:2px; color:#DCE8F5; text-decoration:none; }
.dg-ws:hover:not(.active){ background:#15355B; }
.dg-ws.active{ background:#17406E; font-weight:700; color:#fff; }
.dg-ws .dg-arrow{ margin-left:auto; font-size:12px; opacity:.6; }
.dg-ws .dg-sub{ font-size:9.5px; color:#7FA3C8; font-weight:400; }
.dg-swdot{ width:8px; height:8px; border-radius:50%; display:inline-block; flex:none; }
/* L2 · B4: hvězdička značky místo tečky (Hlavní stránka) — stejná šířka slotu */
.dg-swstar{height:auto;border-radius:0;background:none;color:#7C6AE8;font-size:13px;line-height:1;display:inline-flex;justify-content:center;overflow:visible}
.dg-rich{ display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:9px;
  margin-bottom:2px; text-decoration:none; color:#EAF2FA; cursor:pointer;
  border:none; background:transparent; width:100%; text-align:left; font-family:inherit; }
.dg-rich:hover:not(.dg-rich-disabled){ background:#15355B; }
.dg-rich-hl{ background:#15355B; }
.dg-rich-hl:hover{ background:#1A426D; }
.dg-rich-disabled{ cursor:not-allowed; opacity:.7; }
.dg-ric{ width:28px; height:28px; border-radius:8px; display:flex;
  align-items:center; justify-content:center; font-size:14px; flex:none;
  background:#123156; color:#EAF2FA; }
.dg-rich-hl .dg-ric{ background:#1E4471; }
.dg-ric-dark{ background:#141225 !important; }
.dg-ric-light{ background:#123156 !important; }
.dg-rbody{ display:flex; flex-direction:column; min-width:0; flex:1; }
.dg-rt{ font-size:12.5px; font-weight:600; line-height:1.2; color:#EAF2FA; }
.dg-rs{ font-size:10px; color:#8FB0CF; margin-top:2px; }
.dg-badge2{ margin-left:auto; font-size:8.5px; padding:2px 6px; border-radius:8px;
  white-space:nowrap; background:#1B3E66; color:#9FC0E0; font-weight:600; }
.dg-goldbadge{ margin-left:auto; font-size:8.5px; background:#FDF3D7; color:#7A5A00;
  border:1px solid #EBD9A0; padding:2px 6px; border-radius:9px; font-weight:700; white-space:nowrap; }
.dg-foot{ padding:11px 15px 13px; font-size:10px; line-height:1.55;
  background:#0A1D36; border-top:1px solid #17395F; color:#8FB0CF; flex:none; }
.dg-foot-m{ font-style:italic; color:#A9C4DE; }
.dg-foot-small{ font-size:9px; }
.dg-foot-ver{ margin-top:4px; opacity:.85; }

/* M1b.1: World s textem jen ≥ ~560 px container. Pod ~360 vlajkový pill
 * mizí do menu (jen aktivní vlajka+kód zůstává). */
@container dgshell (min-width:560px){
  .dg-world-label{ display:inline; }
}
.dg-shell:not(.hdr-lt-560) .dg-world-label{ display:inline; }
.dg-shell.hdr-lt-560 .dg-worldbtn{ width:30px; height:26px; padding:0; justify-content:center; gap:0; }
.dg-shell.hdr-lt-560 .dg-langpill{ display:none; }

/* --- M1b.2 velka znacka: ≥560 grid s brand vlevo (span 2 řádky) a
 * r1/r2 vpravo. Matice 42, název 20, claim 12. UNCHANGED z 7a826e5.
 * 3|5 + langpill se ≥560 znovu ukazují uvnitř .dg-r1. */
@container dgshell (min-width:560px){
  .dg-topbar{ display:grid; grid-template-columns:auto 1fr;
    grid-template-areas:"brand r1" "brand r2"; gap:6px 16px;
    padding:12px 20px; align-items:center; }
  .dg-brand{ grid-area:brand; align-self:center; gap:12px; }
  .dg-brand-mark{ width:42px; height:42px; }
  .dg-word{ font-size:20px; }
  .dg-brand-by{ font-size:11px; }
  .dg-brand-claim{ font-size:12px; margin-top:2px; }
  /* Reset M1c mobile overrides: r1 = flex row with band + lang + Plans +
   * burger, r2 = flex row with World + switcher. */
  .dg-r1{ display:flex; align-items:center; gap:8px;
    justify-content:flex-end; grid-area:r1; border-top:none; padding-top:0; }
  .dg-r2{ grid-area:r2; border-top:none; padding-top:0;
    justify-content:flex-end; }
  .dg-plansbtn{ grid-area:auto; justify-self:auto; }
  .dg-burger{ grid-area:auto; }
  .dg-topbar > .dg-r1 .dg-band-toggle,
  .dg-topbar > .dg-r1 .dg-langpill{ display:inline-flex; }
  .dg-switcher{ flex:0 0 auto; }
}
.dg-shell.hdr-ge-560 .dg-topbar{ display:grid; grid-template-columns:auto 1fr;
  grid-template-areas:"brand r1" "brand r2"; gap:6px 16px;
  padding:12px 20px; align-items:center; }
.dg-shell.hdr-ge-560 .dg-brand{ grid-area:brand; align-self:center; gap:12px; }
.dg-shell.hdr-ge-560 .dg-brand-mark{ width:42px; height:42px; }
.dg-shell.hdr-ge-560 .dg-word{ font-size:20px; }
.dg-shell.hdr-ge-560 .dg-brand-by{ font-size:11px; }
.dg-shell.hdr-ge-560 .dg-brand-claim{ font-size:12px; margin-top:2px; }
.dg-shell.hdr-ge-560 .dg-r1{ display:flex; align-items:center; gap:8px;
  justify-content:flex-end; grid-area:r1; border-top:none; padding-top:0; }
.dg-shell.hdr-ge-560 .dg-r2{ grid-area:r2; border-top:none; padding-top:0;
  justify-content:flex-end; }
.dg-shell.hdr-ge-560 .dg-plansbtn{ grid-area:auto; justify-self:auto; }
.dg-shell.hdr-ge-560 .dg-burger{ grid-area:auto; }
.dg-shell.hdr-ge-560 .dg-topbar > .dg-r1 .dg-band-toggle,
.dg-shell.hdr-ge-560 .dg-topbar > .dg-r1 .dg-langpill{ display:inline-flex; }
.dg-shell.hdr-ge-560 .dg-switcher{ flex:0 0 auto; }

/* L5 · D: „skutečný: PRO" vedle chipů lišty Tier preview */
.tier-preview-real{font-size:10px;opacity:.75;margin-left:6px;white-space:nowrap;align-self:center}
/* L5 · D: s „skutečný: …" v prvním řádku se chipy v úzkém sloupci appky (≥560 px viewport,
   jednořádková lišta) zalomí pod něj místo přetečení za okraj. */
@media (min-width: 560px) {
  .tier-preview-bar { flex-wrap: wrap; row-gap: 4px; }
  .tier-preview-row2 { flex: 1 1 auto; }
}

/* L7 · A: stránka nesmí být širší než viewport v žádném stavu lišty Tier preview.
   Příčina (měřeno S140): `.matrix-period` jako flex položka `.matrix-controls`
   s výchozím `min-width:auto` = součet šířek měsíčních chipů; zamčené měsíce
   nesou štítek „🔒 FOUNDER" (Bez účtu/FREE/PRO) → řádek 741 px, mobilní
   prohlížeč roztáhl layout viewport a spodní menu (left:50%) odjelo doprava.
   Třída: každá flex/grid položka v řetězci kontejnerů smí zúžit pod obsah,
   dlouhé řádky (záložky, měsíce, týmy) se posouvají jen uvnitř sebe. */
.screens, .screen, .screen-pad, .screen-pad > *,
.matrix-controls > *, .matrix-period > *, .matrix-month-chips,
.matrix-teams-row { min-width: 0; }
.matrix-period, .matrix-period > * { max-width: 100%; }
.matrix-month-chips { overflow-x: auto; }
.matrix-month-chip .tier-tag, .matrix-seg-btn .tier-tag { white-space: nowrap; }
/* Pojistka (nesmí zakrýt příčinu — S140 měří prvky, ne scrollWidth stránky):
   `clip` neudělá z html/body scroll kontejner (sticky + window.scrollY beze změny). */
html { overflow-x: clip; }
/* L7 · A (stejná třída): souhrnný řádek „Další lidé" v matici má šířku celé
   mřížky (širší než telefon) → tlačítko „Podívat se na PRO" bylo až za
   pravým okrajem posuvné tabulky. Na telefonu karta drží vlevo, má nejvýš
   viditelnou šířku a tlačítko se zalomí pod text (jako L4 karty „Další lidé"). */
@media (max-width: 640px) {
  .matrix-row.matrix-row-locked .tier-lock {
    position: sticky; left: 0; box-sizing: border-box;
    max-width: calc(100vw - 50px); flex-wrap: wrap;
  }
  .matrix-row.matrix-row-locked .tier-lock-text { flex: 1 1 calc(100% - 46px); min-width: 0; }
  .matrix-row.matrix-row-locked .tier-lock-cta { margin-left: 30px; }
}

/* PG-N3 · zámek lidí nad limit (šedá karta, šedý člen týmu, dlaždice „+N 🔒", žlutý box) */
.person-card.is-locked { cursor: default; border-style: dashed; }
.person-card.is-locked .person-card-avatar, .person-card.is-locked .person-card-name, .person-card.is-locked .person-card-sub { opacity: .6; filter: grayscale(1); }
.person-card.is-locked:hover { box-shadow: none; }
.person-card.is-locked .person-card-avatar { font-size: 18px; }
.pc-act.pl-unlock { width: auto; height: auto; font-size: 12px; text-decoration: none; font-weight: 700; padding: 5px 11px; border-radius: 999px;
  background: #FFF6D6; border: 1px solid #F2D27A; color: #5A4300; filter: none; white-space: nowrap; }
.team-chip.is-locked { opacity: .55; filter: grayscale(1); border-style: dashed; }
.a-cell.pl-tile { text-decoration: none; color: inherit; opacity: .8; justify-content: center; }
.a-cell.pl-tile .pl-tile-ic { width: 46px; height: 46px; border-radius: 50%; border: 2px dashed rgba(180,190,210,.7);
  display: grid; place-items: center; font-size: 18px; margin: 0 auto 4px; }
.pl-lock-box { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 4px 0 12px; padding: 10px 12px;
  border-radius: 12px; background: #FFF6D6; border: 1px solid #F2D27A; color: #5A4300; font-size: 13px; line-height: 1.4; }
.pl-lock-box [data-people-lock-count] { flex-basis: 100%; font-weight: 700; }
.pl-lock-box a { margin-left: auto; font-weight: 700; color: #5A4300; white-space: nowrap; }
.a-cell.pl-tile .a-name { font-size: 11px; white-space: nowrap; font-weight: 700; }

/* CACHE-W · A6 · člověk, jehož karta se teprve počítá */
.a-cell-pending, .person-card-pending { color: #8A8FA3; font-size: 11px; font-weight: 600; font-style: italic; }
.person-card-big-score.person-card-pending { font-size: 12px; line-height: 1.2; }
