* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --bg: oklch(0.147 0.011 285);
  --surface: oklch(0.190 0.014 285);
  --surface2: oklch(0.232 0.023 284.5);
  --border: oklch(1 0 0 / 0.07);
  --accent: oklch(0.749 0.085 82.8);
  --accent2: oklch(0.621 0.213 283.8);
  --text: oklch(0.933 0.011 286.2);
  --muted: oklch(0.535 0.033 285.2);
  --danger: oklch(0.712 0.181 22.8);
  --green: oklch(0.898 0.176 154.6);
  --blue: oklch(0.762 0.128 248);
  --on-accent: oklch(0.147 0.011 285);
  --cat-vztahy: oklch(0.723 0.185 1.8);
  --cat-prace: oklch(0.762 0.128 248);
  --cat-finance: oklch(0.898 0.176 154.6);
  --cat-zdravi: oklch(0.790 0.133 48.5);
  --cat-rodic: oklch(0.715 0.226 316.6);
  --cat-bydleni: oklch(0.911 0.135 177);
  --cat-vzdelani: oklch(0.910 0.140 94.6);
  --cat-hodnoty: oklch(0.712 0.181 22.8);
  --cat-kariera: oklch(0.754 0.164 50.4);
  --cat-rodina: oklch(0.790 0.133 48.5);
  --cat-dusevni: oklch(0.690 0.150 300);
  --cat-pravo: oklch(0.720 0.120 250);
  --cat-cestovani: oklch(0.860 0.140 185);
  --reward-gold: oklch(0.912 0.126 92.8);
  --reward-points: oklch(0.907 0.153 159.5);
  --reward-badges: oklch(0.833 0.093 239.7);
  --toast-error-bg: oklch(0.187 0.028 20);
  --toast-success-bg: oklch(0.217 0.030 155.6);
  --notif-ping: oklch(0.687 0.215 4.5);
  --line-soft: oklch(1 0 0 / 0.10);
  --line-strong: oklch(1 0 0 / 0.20);
  --surface-soft: oklch(1 0 0 / 0.05);
  --surface-soft-2: oklch(1 0 0 / 0.08);
  --surface-soft-3: oklch(1 0 0 / 0.12);
  --text-soft: oklch(0.933 0.011 286.2 / 0.75);
  --text-softer: oklch(0.933 0.011 286.2 / 0.65);
  --overlay-strong: oklch(0 0 0 / 0.75);
  --overlay-soft: oklch(0 0 0 / 0.55);
  --shadow-soft: 0 1px 3px oklch(0 0 0 / 0.08);
  --shadow-card: 0 6px 20px oklch(0 0 0 / 0.18);
  --accent2-soft: oklch(0.621 0.213 283.8 / 0.08);
  --accent2-line: oklch(0.621 0.213 283.8 / 0.20);
  --green-soft: oklch(0.898 0.176 154.6 / 0.10);
  --green-line: oklch(0.898 0.176 154.6 / 0.30);
  --danger-soft: oklch(0.712 0.181 22.8 / 0.10);
  --danger-line: oklch(0.712 0.181 22.8 / 0.30);
  --bottom-bar-bg: color-mix(in oklch, var(--bg) 82%, transparent);
  --bottom-bar-edge: oklch(1 0 0 / 0.06);
  --bottom-bar-shadow: 0 -6px 22px oklch(0 0 0 / 0.10);
  --modal-shadow: 0 14px 34px oklch(0 0 0 / 0.16);
  --modal-close-bg: color-mix(in oklch, var(--surface2) 88%, var(--surface));
  --control-hover-bg: color-mix(in oklch, var(--surface2) 82%, var(--accent));
  --field-bg: color-mix(in oklch, var(--surface2) 92%, var(--surface));
  --field-hover-border: color-mix(in oklch, var(--border) 38%, var(--accent));
  --card-bg: color-mix(in oklch, var(--surface) 94%, transparent);
  --card-border: color-mix(in oklch, var(--border) 82%, white);
  --card-subtle: color-mix(in oklch, var(--surface2) 90%, var(--surface));
  --card-hover-border: color-mix(in oklch, var(--border) 48%, var(--accent));
  --chip-bg: color-mix(in oklch, var(--surface2) 88%, var(--surface));
  --chip-hover-bg: color-mix(in oklch, var(--surface2) 74%, var(--accent));
  --panel-bg: color-mix(in oklch, var(--surface) 94%, transparent);
  --panel-border: color-mix(in oklch, var(--border) 74%, white);
  --panel-shadow: 0 10px 24px oklch(0 0 0 / 0.09);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.phone {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.header {
  position: sticky; top: 0; z-index: 100;
  padding: 20px 24px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-shell {
  max-width: 1420px;
  margin: 0 auto;
  width: 100%;
  padding: 10px 0 16px;
}
.header-top {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px;
}
.header-tools {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 15px 17px 13px;
  border-radius: 22px;
  border: 1px solid color-mix(in oklch, var(--card-border) 88%, transparent);
  background:
    radial-gradient(circle at top right, color-mix(in oklch, var(--accent) 7%, transparent), transparent 34%),
    linear-gradient(180deg, color-mix(in oklch, var(--surface) 95%, transparent), color-mix(in oklch, var(--surface2) 84%, transparent));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.03),
    0 10px 26px oklch(0 0 0 / 0.08);
}
.header-right { display: flex; align-items: center; gap: 10px; }
.bell-wrap { position: relative; cursor: pointer; }
.search-icon,
.avatar,
.header-theme-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: var(--muted); cursor: pointer; transition: all 0.2s;
}
.search-icon:hover,
.avatar:hover,
.header-theme-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in oklch, var(--surface2) 82%, var(--accent));
}
.search-icon:active,
.avatar:active,
.header-theme-btn:active {
  transform: translateY(1px) scale(0.97);
}
.header-control-icon {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.header-avatar-icon {
  width: 17px;
  height: 17px;
}
.header-theme-btn {
  position: relative;
  flex-shrink: 0;
  padding: 0;
  margin-left: -2px;
}
.header-theme-icon {
  position: absolute;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s, transform 0.2s;
}
.header-theme-icon-light circle {
  fill: currentColor;
  stroke: none;
}
.header-theme-icon-light {
  opacity: 0;
  transform: scale(0.8);
}
.header-theme-btn.on {
  background: color-mix(in oklch, var(--accent) 18%, var(--surface2));
  border-color: color-mix(in oklch, var(--accent) 60%, var(--border));
  color: var(--accent);
}
.header-theme-btn.on .header-theme-icon-dark {
  opacity: 0;
  transform: scale(0.8);
}
.header-theme-btn.on .header-theme-icon-light {
  opacity: 1;
  transform: scale(1);
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  font-family: 'Playfair Display', serif;
  letter-spacing: 0.02em;
}
.logo-project {
  color: color-mix(in oklch, var(--muted) 88%, var(--text));
  font-style: italic;
  font-size: 20px;
}
.logo-fate {
  color: var(--accent);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.10em;
}

.avatar-wrap + .header-theme-btn {
  margin-left: -4px;
}

@media (max-width: 560px) {
  .header-right { gap: 8px; }
  .avatar-wrap + .header-theme-btn { margin-left: -2px; }
}

@media (min-width: 980px) {
  .header-right { gap: 10px; }
  .search-icon,
  .avatar,
  .header-theme-btn {
    width: 34px;
    height: 34px;
  }
  .header-theme-icon {
    width: 15px;
    height: 15px;
  }
  .header-control-icon,
  .header-avatar-icon {
    width: 15px;
    height: 15px;
  }
  .logo-project { font-size: 19px; }
  .logo-fate { font-size: 23px; }
  .avatar-wrap + .header-theme-btn { margin-left: -3px; }
}

/* ── Search bar ── */
.search-bar {
  width: 100%;
  display: none;
}
.search-bar.open { display: block; }
.search-input-wrap {
  position: relative;
}
.search-input-wrap::before {
  content: '';
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  border: 1.6px solid color-mix(in oklch, var(--muted) 84%, transparent);
  border-radius: 999px;
  opacity: 0.7;
  pointer-events: none;
}
.search-input-wrap::after {
  content: '';
  position: absolute;
  left: 28px;
  top: calc(50% + 5px);
  width: 7px;
  height: 1.6px;
  background: color-mix(in oklch, var(--muted) 84%, transparent);
  transform: rotate(45deg);
  border-radius: 999px;
  opacity: 0.7;
  pointer-events: none;
}
.search-input-wrap input {
  width: 100%; background: var(--field-bg); border: 1px solid var(--card-border);
  border-radius: 18px; padding: 13px 46px 13px 46px;
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.04);
}
.search-input-wrap input:hover {
  border-color: var(--field-hover-border);
  background: color-mix(in oklch, var(--field-bg) 88%, transparent);
}
.search-input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 12%, transparent);
}
.search-input-wrap input::placeholder { color: var(--muted); }
.search-clear {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  color: var(--muted); cursor: pointer; font-size: 15px; background: none; border: none;
  line-height: 1;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, background-color 0.2s;
}
.search-clear:hover {
  color: var(--text);
  background: color-mix(in oklch, var(--card-subtle) 82%, transparent);
}

/* ── Filter bar ── */
.filter-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.filter-bar-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  opacity: 0.72;
  padding-left: 3px;
}
.filter-bar {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 4px 0;
  width: 100%;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.filter-bar::-webkit-scrollbar {
  width: 0;
  height: 0;
}
@media (hover: hover) and (pointer: fine) {
  .filter-bar {
    flex-wrap: wrap;
    overflow-x: visible;
    justify-content: center;
    padding: 2px 2px 0 2px;
    cursor: default;
  }
  .filter-bar:active {
    cursor: default;
  }
}
.filter-chip {
  flex-shrink: 0; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--card-border); background: var(--chip-bg);
  color: var(--muted); font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: all 0.2s; white-space: nowrap;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.03);
}
.filter-chip.active {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
  font-weight: 600;
  box-shadow: 0 8px 18px color-mix(in oklch, var(--accent) 22%, transparent);
}
.filter-chip:not(.active):hover {
  border-color: var(--field-hover-border);
  color: var(--text);
  background: var(--chip-hover-bg);
  transform: translateY(-1px);
}

/* ── Feed — JS masonry ── */
.feed {
  flex: 1;
  padding: 18px 24px 100px;
  max-width: 1420px;
  margin: 0 auto;
  width: 100%;
  position: relative;
}
.feed::-webkit-scrollbar { width: 0; }

#masonry-grid {
  position: relative;
  width: 100%;
  padding-top: 4px;
}

@media (max-width: 560px) {
  .feed { padding: 12px 12px 120px; }
  .header { padding: 44px 16px 0; }
  .header-shell { padding: 8px 0 12px; }
  .filter-chip { padding: 8px 14px; font-size: 12px; }
  .bottom-bar { padding: 12px 16px 28px; }
  .empty-state,
  .search-empty {
    margin-top: 18px;
    padding: 44px 18px;
    border-radius: 20px;
  }
  .empty-icon {
    width: 66px;
    height: 66px;
    margin-bottom: 16px;
    border-radius: 20px;
    font-size: 29px;
  }
  .empty-title {
    font-size: 21px;
  }
  .empty-text {
    font-size: 14px;
    line-height: 1.66;
  }
  #feed-loader {
    max-width: none;
    margin-top: 14px;
    border-radius: 16px;
  }
}

/* Pull to refresh */
.ptr { text-align: center; padding: 0 0 8px; font-size: 12px; color: var(--muted); opacity: 0; transition: opacity 0.3s; height: 0; overflow: hidden; }
.ptr.visible { opacity: 1; height: 32px; }
.ptr-spinner { display: inline-block; width: 16px; height: 16px; border: 1.5px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 6px; vertical-align: middle; }

/* Skeleton */
.skeleton {
  background:
    radial-gradient(circle at top right, oklch(0.621 0.213 283.8 / 0.08), transparent 34%),
    linear-gradient(180deg, color-mix(in oklch, var(--surface) 94%, transparent), color-mix(in oklch, var(--surface2) 86%, transparent));
  border: 1px solid color-mix(in oklch, var(--border) 86%, transparent);
  border-radius: 22px;
  padding: 18px 20px;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.03);
}
.skeleton::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), color-mix(in oklch, var(--accent2) 68%, var(--accent)));
  opacity: 0.4;
}
.skel-line {
  background: color-mix(in oklch, var(--surface2) 88%, transparent);
  border-radius: 8px;
  margin-bottom: 10px;
  animation: shimmer 1.4s ease-in-out infinite;
}
@keyframes shimmer { 0%,100% { opacity:0.4; } 50% { opacity:0.8; } }

/* Empty state */
.empty-state,
.search-empty {
  text-align: center;
  padding: 56px 24px;
  display: none;
  margin: 26px auto 0;
  max-width: 540px;
  border-radius: 24px;
  border: 1px solid color-mix(in oklch, var(--card-border) 88%, transparent);
  background:
    radial-gradient(circle at top right, oklch(0.621 0.213 283.8 / 0.10), transparent 32%),
    linear-gradient(180deg, color-mix(in oklch, var(--surface) 95%, transparent), color-mix(in oklch, var(--surface2) 86%, transparent));
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.03);
}
.empty-state.show { display: block; }
.search-empty.show { display: block; }
.empty-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  background: color-mix(in oklch, var(--card-subtle) 82%, transparent);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.04);
}
.empty-title {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  line-height: 1.18;
  margin-bottom: 10px;
  color: var(--text);
  letter-spacing: -0.02em;
}
.empty-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.74;
  max-width: 380px;
  margin: 0 auto;
}

#feed-loader {
  margin: 18px auto 0;
  padding: 18px 20px !important;
  max-width: 260px;
  border-radius: 18px;
  border: 1px solid color-mix(in oklch, var(--card-border) 88%, transparent);
  background: color-mix(in oklch, var(--surface) 92%, transparent);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.03);
}

/* ── Bubliny ── */
.bubble {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 24px; padding: 19px 20px 18px;
  position: absolute;
  overflow: hidden;
  opacity: 0;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.35s ease, transform 0.35s ease;
  transform: translateY(12px);
  box-sizing: border-box;
  cursor: pointer;
  box-shadow: 0 4px 16px oklch(0 0 0 / 0.10);
}
.bubble.visible { opacity: 1; transform: translateY(0); }
.bubble:hover { border-color: var(--card-hover-border); box-shadow: var(--shadow-card); z-index: 2; }
.bubble::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--cat-color, var(--accent)); opacity: 0.6; }
.bubble::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, oklch(1 0 0 / 0.02), transparent 30%);
  pointer-events: none;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.bubble-meta {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 9px;
  margin-bottom: 15px;
}
.bubble-meta-top,
.bubble-meta-bottom {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bubble-meta-top {
  justify-content: space-between;
}
.bubble-meta-bottom {
  min-width: 0;
}
.cat-tag { font-size: 10px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; background: var(--chip-bg); color: var(--cat-color, var(--accent)); border: 1px solid color-mix(in oklch, var(--cat-color, var(--accent)) 66%, var(--border)); opacity: 0.9; }
.nickname {
  font-size: 12px;
  color: color-mix(in oklch, var(--muted) 84%, var(--text));
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 500;
  letter-spacing: 0.015em;
}
.reward-rail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-left: auto;
}
.reward-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 4px 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in oklch, var(--card-border) 86%, transparent);
  color: var(--muted);
  background: color-mix(in oklch, var(--card-subtle) 84%, transparent);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.04);
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.reward-pill-level {
  color: var(--reward-gold);
  border-color: oklch(0.912 0.126 92.8 / 0.28);
  background: oklch(0.912 0.126 92.8 / 0.09);
}
.reward-pill-badge {
  color: var(--reward-badges);
  border-color: color-mix(in oklch, var(--reward-badges) 34%, var(--card-border));
  background: color-mix(in oklch, var(--reward-badges) 12%, transparent);
}
.date { font-size: 11px; color: var(--muted); letter-spacing: 0.02em; opacity: 0.64; }

.bubble-main {
  position: relative;
  z-index: 1;
  margin-bottom: 17px;
  display: grid;
  gap: 11px;
}
.bubble-title {
  font-family: 'Playfair Display', serif;
  font-size: 19px;
  line-height: 1.28;
  color: var(--text);
  text-wrap: balance;
  letter-spacing: -0.015em;
}
.bubble-text {
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-soft);
}

.outcome {
  position: relative;
  z-index: 1;
  margin-top: 15px;
  padding: 15px 16px;
  background: linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 90%, transparent), color-mix(in oklch, var(--surface-soft-2) 78%, transparent));
  border-radius: 19px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-softer);
  border-left: 3px solid var(--cat-color, var(--accent));
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.02);
  text-align: left;
}
.outcome-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--cat-color, var(--accent));
  margin-bottom: 8px;
  opacity: 0.86;
}
.outcome-text {
  font-size: 13px;
  line-height: 1.62;
  color: var(--text-soft);
}

.bubble-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin-top: 17px;
  gap: 11px;
}
.bubble-signals {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.story-signal {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid color-mix(in oklch, var(--card-border) 86%, transparent);
  background: color-mix(in oklch, var(--card-subtle) 80%, transparent);
  color: var(--muted);
}
.story-signal-author {
  color: color-mix(in oklch, var(--text) 60%, var(--muted));
  font-style: italic;
}
.story-signal {
  opacity: 0.85;
}

.action-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
}

.action-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 41px;
  padding: 10px 13px;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 11.5px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: normal;
  text-align: center;
  width: 100%;
  letter-spacing: 0.015em;
}
.action-btn-helped {
  background: oklch(0.898 0.176 154.6 / 0.10);
  border: 1.5px solid oklch(0.898 0.176 154.6 / 0.35);
  color: var(--green);
}
.action-btn-helped.active {
  background: oklch(0.898 0.176 154.6 / 0.22);
  border-color: var(--green);
  box-shadow: 0 0 0 3px oklch(0.898 0.176 154.6 / 0.15);
}
.action-btn-same {
  background: oklch(0.621 0.213 283.8 / 0.10);
  border: 1.5px solid oklch(0.621 0.213 283.8 / 0.35);
  color: var(--accent2);
}
.action-btn-same.active {
  background: oklch(0.621 0.213 283.8 / 0.22);
  border-color: var(--accent2);
  box-shadow: 0 0 0 3px oklch(0.621 0.213 283.8 / 0.15);
}
.action-btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.action-btn:active { transform: translateY(1px) scale(0.97); }

/* Light mode – výraznější kontrast */
body.light-mode .action-btn-helped {
  background: oklch(0.898 0.176 154.6 / 0.12);
  border-color: oklch(0.6 0.2 154.6 / 0.5);
  color: oklch(0.38 0.15 154.6);
}
body.light-mode .action-btn-helped.active {
  background: oklch(0.898 0.176 154.6 / 0.22);
  border-color: oklch(0.5 0.18 154.6);
  color: oklch(0.32 0.14 154.6);
  box-shadow: 0 0 0 3px oklch(0.898 0.176 154.6 / 0.18);
}
body.light-mode .action-btn-same {
  background: oklch(0.621 0.213 283.8 / 0.10);
  border-color: oklch(0.5 0.2 283.8 / 0.5);
  color: oklch(0.35 0.18 283.8);
}
body.light-mode .action-btn-same.active {
  background: oklch(0.621 0.213 283.8 / 0.20);
  border-color: oklch(0.45 0.2 283.8);
  color: oklch(0.28 0.16 283.8);
  box-shadow: 0 0 0 3px oklch(0.621 0.213 283.8 / 0.15);
}

@media (max-width: 520px) {
  .bubble {
    padding: 17px 16px;
  }
  .bubble-title {
    font-size: 17px;
  }
  .action-row {
    grid-template-columns: 1fr;
  }
}

.req { color: var(--danger, oklch(0.679 0.213 14.7)); font-size: 13px; }
.field-hint { font-size: 11px; color: var(--muted); margin: -4px 0 8px; opacity: 0.7; }
.field input.error, .field textarea.error, .field select.error {
  border-color: var(--danger, oklch(0.679 0.213 14.7)) !important;
  background: oklch(0.679 0.213 14.7 / 0.06);
}
.field-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ── Bottom bar ── */
.bottom-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  padding: 14px 24px 28px;
  background: linear-gradient(to top, var(--bottom-bar-bg) 68%, transparent);
  display: flex; gap: 12px; justify-content: center; z-index: 100;
}
.bottom-bar-inner {
  display: flex; gap: 12px; width: 100%; max-width: 460px;
  padding: 10px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--bottom-bar-edge);
  box-shadow: var(--bottom-bar-shadow);
}
.btn {
  flex: 1; padding: 15px 20px; border-radius: 16px; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500;
  transition: all 0.2s; letter-spacing: 0.02em; white-space: nowrap;
}
.btn-share {
  background: color-mix(in oklch, var(--surface2) 88%, var(--surface));
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-fate {
  background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 94%, white), var(--accent));
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 6px 16px oklch(0.749 0.085 82.8 / 0.12);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-share:hover {
  border-color: var(--field-hover-border);
  background: color-mix(in oklch, var(--surface2) 74%, var(--accent));
}
.btn-fate:hover {
  filter: brightness(1.02);
  box-shadow: 0 8px 20px oklch(0.749 0.085 82.8 / 0.14);
}
.btn:active { transform: translateY(1px) scale(0.97); }

/* ── Modal ── */
.modal-overlay { position: fixed; inset: 0; background: oklch(0 0 0 / 0.75); z-index: 200; display: flex; align-items: flex-start; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.3s; overflow-y: auto; padding: 24px 16px 40px; }
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  width: calc(100% - 32px); max-width: 480px; background: var(--surface);
  border-radius: 30px; padding: 22px 24px 32px; transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  border: 1px solid color-mix(in oklch, var(--border) 74%, white);
  position: relative; margin: auto; box-shadow: var(--modal-shadow);
}
.modal-wide { max-width: 560px; }
.modal-overlay.open .modal { transform: translateY(0); }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; border-radius: 50%;
  background: var(--modal-close-bg); border: 1px solid var(--border); color: var(--muted); font-size: 16px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; line-height: 1;
}
.modal-close:hover { color: var(--accent); border-color: var(--field-hover-border); background: color-mix(in oklch, var(--modal-close-bg) 82%, var(--accent)); }
.modal-close:active { transform: translateY(1px) scale(0.97); }
.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-right: 40px;
}
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-foot {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.modal-foot .btn { flex: 1; }
.modal-title { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 6px; color: var(--text); padding-right: 36px; }
.modal-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }
.modal-intro { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; background: var(--field-bg); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 16px; color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px;
  outline: none; transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s; -webkit-appearance: none;
}
.field select { cursor: pointer; }
.field textarea { resize: none; height: 90px; line-height: 1.5; }
.field input:hover, .field textarea:hover, .field select:hover { border-color: var(--field-hover-border); }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.749 0.085 82.8 / 0.10);
}
.modal-btn {
  width: 100%; padding: 16px; border-radius: 16px; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; margin-top: 8px; transition: all 0.2s;
}
.modal-btn-primary {
  background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 94%, white), var(--accent));
  color: var(--on-accent);
  box-shadow: 0 7px 18px oklch(0.749 0.085 82.8 / 0.13);
}
.modal-btn-secondary {
  background: color-mix(in oklch, var(--surface2) 88%, var(--surface));
  color: var(--text); border: 1px solid var(--border); margin-top: 10px;
}
.modal-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 22px oklch(0.749 0.085 82.8 / 0.15);
}
.modal-btn-secondary:hover {
  transform: translateY(-1px);
  border-color: var(--field-hover-border);
  background: color-mix(in oklch, var(--surface2) 74%, var(--accent));
}
.modal-btn:active { transform: translateY(1px) scale(0.98); }
.modal-btn-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 8px; }
.modal-btn-row .modal-btn { margin-top: 0; }

/* ── Story detail modal ── */
.story-detail-root {
  --cat-color: var(--accent);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.story-detail-header {
  margin-bottom: 0;
  padding-bottom: 16px;
  border-bottom: 1px solid color-mix(in oklch, var(--card-border) 88%, transparent);
  text-align: center;
}
.story-detail-title {
  font-family: 'Playfair Display', serif;
  font-size: 27px;
  line-height: 1.2;
  margin: 12px 0 0;
  color: var(--text);
  padding: 0 16px;
  text-wrap: balance;
  letter-spacing: -0.018em;
  text-align: center;
}
.story-detail-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}
.story-detail-nick {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
  letter-spacing: 0.015em;
}
.story-detail-date-row {
  text-align: center;
  margin-top: 8px;
}
.story-detail-date-row .story-detail-date {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.story-detail-section {
  padding: 17px 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, color-mix(in oklch, var(--surface-soft-2) 78%, transparent), color-mix(in oklch, var(--card-subtle) 88%, transparent));
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025);
}
.story-detail-section-label,
.story-detail-outcome-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 9px;
  opacity: 0.85;
}
.story-detail-section-label {
  color: var(--muted);
}
.story-detail-body {
  font-size: 15px;
  line-height: 1.86;
  color: oklch(0.933 0.011 286.2 / 0.82);
}
.story-detail-outcome {
  padding: 18px 18px 17px;
  background: linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 92%, transparent), color-mix(in oklch, var(--surface-soft-2) 80%, transparent));
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.72;
  color: var(--text-soft);
  border-left: 3px solid var(--cat-color, var(--accent));
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025);
}
.story-detail-outcome-label { color: var(--cat-color, var(--accent)); }
.story-detail-outcome-text {
  font-size: 14px;
  line-height: 1.76;
  color: var(--text-soft);
}
.story-detail-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}
.story-detail-stat {
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 88%, transparent), color-mix(in oklch, var(--surface-soft-2) 82%, transparent));
  border-radius: 18px;
  padding: 15px 12px 14px;
  text-align: center;
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025);
}
.story-detail-stat-num { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--cat-color, var(--accent)); display: block; line-height: 1; }
.story-detail-stat-label { font-size: 10px; color: var(--muted); margin-top: 6px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.82; }
.story-detail-root { --cat-color: var(--accent); }
.story-detail-root.cat-vztahy  { --cat-color: var(--cat-vztahy); }
.story-detail-root.cat-prace   { --cat-color: var(--cat-prace); }
.story-detail-root.cat-finance { --cat-color: var(--cat-finance); }
.story-detail-root.cat-zdravi  { --cat-color: var(--cat-zdravi); }
.story-detail-root.cat-rodic   { --cat-color: var(--cat-rodic); }
.story-detail-root.cat-bydleni { --cat-color: var(--cat-bydleni); }
.story-detail-root.cat-vzdelani{ --cat-color: var(--cat-vzdelani); }
.story-detail-root.cat-hodnoty { --cat-color: var(--cat-hodnoty); }
.story-detail-root.cat-kariéra { --cat-color: var(--cat-kariera); }
.story-detail-root.cat-rodina  { --cat-color: var(--cat-rodina); }
.story-detail-root .cat-tag { color: var(--cat-color, var(--accent)); border-color: var(--cat-color, var(--accent)); }
.story-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border-radius: 20px;
  background: color-mix(in oklch, var(--card-subtle) 82%, transparent);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025);
}
/* Když actions obsahuje jen own-note, odstraň vnější rámeček */
.story-detail-actions:has(.story-detail-own-note) {
  background: none;
  border: none;
  box-shadow: none;
  padding: 0;
  grid-template-columns: 1fr;
}
.story-detail-actions .action-btn {
  font-size: 13px;
  padding: 10px 16px;
  min-height: 44px;
}
.story-detail-own-note {
  text-align: center;
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  padding: 12px 20px;
  margin: 0;
  background: oklch(0.621 0.213 283.8 / 0.06);
  border: 1px solid oklch(0.621 0.213 283.8 / 0.18);
  border-radius: 14px;
}
.story-detail-similar { margin-top: 4px; }
.story-detail-similar-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; opacity: 0.82; }
.similar-story { background: var(--card-subtle); border-radius: 16px; padding: 14px 15px; margin-bottom: 9px; border: 1px solid var(--card-border); cursor: pointer; transition: border-color 0.2s, transform 0.2s, background-color 0.2s; }
.similar-story:hover { border-color: var(--card-hover-border); transform: translateY(-1px); background: color-mix(in oklch, var(--card-subtle) 84%, var(--accent)); }
.similar-story-title { font-size: 13px; color: var(--text); line-height: 1.45; margin-bottom: 5px; }
.similar-story-meta { font-size: 11px; color: var(--muted); letter-spacing: 0.01em; }
@media (max-width: 520px) {
  .story-detail-title {
    font-size: 22px;
    max-width: none;
  }
  .story-detail-stats {
    grid-template-columns: 1fr;
  }
  .story-detail-actions {
    grid-template-columns: 1fr;
  }
}
.story-back-btn { display: flex; align-items: center; gap: 6px; background: none; border: none; color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 13px; cursor: pointer; padding: 0; margin-bottom: 16px; transition: color 0.2s; }
.story-back-btn:hover { color: var(--text); }

/* Potvrzení sdílení */
.success-screen { text-align: center; padding: 20px 0 10px; display: none; }
.success-screen.show { display: block; }
.success-icon { width: 64px; height: 64px; border-radius: 50%; background: oklch(0.898 0.176 154.6 / 0.12); border: 1.5px solid var(--green); display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 20px; animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08); }
.success-icon-alt { background: oklch(0.621 0.213 283.8 / 0.12); border-color: var(--accent2); }
@keyframes scaleIn { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.success-title { font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 8px; }
.success-text { font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 24px; }
.success-stat { background: color-mix(in oklch, var(--card-subtle) 86%, transparent); border-radius: 14px; padding: 14px; font-size: 13px; color: var(--muted); border: 1px solid var(--card-border); }
.success-stat strong { color: var(--accent); }
.success-stat-spaced { margin-bottom: 20px; }
.success-hidden { display: none; }
.modal-btn-spaced { margin-top: 20px; }

#modal-share .modal,
#modal-fate .modal {
  max-width: 500px;
}
/* Když se zobrazuje výsledek scénáře, rozšíř modal */
#modal-fate .modal:has(#fate-result.show) {
  max-width: 720px;
}
#modal-fate .modal:has(#fate-result.show) #fate-form {
  display: none;
}
#modal-share .modal-sub,
#modal-fate .modal-sub {
  max-width: 42ch;
  margin-bottom: 22px;
}
#share-form,
#fate-form {
  display: flex;
  flex-direction: column;
}
#modal-share .modal-title,
#modal-fate .modal-title {
  letter-spacing: -0.015em;
}
#modal-share .field,
#modal-fate .field {
  margin-bottom: 14px;
}
#modal-share .field input,
#modal-share .field textarea,
#modal-share .field select,
#modal-fate .field input,
#modal-fate .field textarea,
#modal-fate .field select {
  border-radius: 16px;
}
#share-story {
  min-height: 118px;
}
#share-outcome {
  min-height: 96px;
}
#fate-situation,
#fate-decision-b {
  min-height: 92px;
}
#fate-decision {
  min-height: 84px;
}
#fate-context {
  min-height: 52px;
}
#modal-share .field-hint,
#modal-fate .field-hint {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 2px 0 4px;
}
#share-success {
  padding: 10px 4px 4px;
}
#share-success .success-text {
  max-width: 28ch;
  margin-left: auto;
  margin-right: auto;
}

/* Výsledek scénáře */
.result { display: none; text-align: left; }
.result.show { display: block; }
.result-loading { text-align: center; padding: 40px 20px; }

/* ── FATE loading animation ── */
.fate-loader { position: relative; width: 80px; height: 80px; margin: 0 auto 28px; }
.fate-loader-ring {
  position: absolute; inset: 0;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  border-right-color: var(--accent);
  border-radius: 50%;
  animation: fate-spin 1.8s cubic-bezier(0.68, -0.15, 0.27, 1.15) infinite;
}
.fate-loader-ring::before {
  content: '';
  position: absolute; inset: 6px;
  border: 2px solid transparent;
  border-bottom-color: var(--accent);
  border-left-color: var(--accent);
  border-radius: 50%;
  animation: fate-spin-reverse 1.4s cubic-bezier(0.68, -0.15, 0.27, 1.15) infinite;
  opacity: 0.5;
}
.fate-loader-icon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  animation: fate-pulse 2s ease-in-out infinite;
}

/* ── Kroky (sekvenční zobrazení) ── */
.fate-loader-steps {
  text-align: left;
  max-width: 260px;
  margin: 0 auto 20px;
}
.fate-step {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--muted);
  padding: 5px 0;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.5s ease, transform 0.5s ease, color 0.4s ease;
}
.fate-step.visible {
  opacity: 1;
  transform: translateY(0);
}
.fate-step.active {
  color: var(--text);
  font-weight: 500;
}
.fate-step.done {
  color: var(--muted);
  opacity: 0.55;
}
.fate-step-dot {
  display: inline-block; width: 8px; height: 8px; min-width: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}
.fate-step.active .fate-step-dot {
  background: var(--accent);
  box-shadow: 0 0 6px var(--accent);
  animation: fate-dot-pulse 1.2s ease-in-out infinite;
}
.fate-step.done .fate-step-dot {
  background: var(--accent);
  opacity: 0.5;
}

.fate-progress-wrap {
  width: 100%; max-width: 220px; height: 4px;
  background: var(--border); border-radius: 4px;
  margin: 0 auto 12px; overflow: hidden;
}
.fate-progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 60%, white));
  border-radius: 4px;
  transition: width 0.6s ease-out;
}
.fate-loader-hint {
  font-size: 12px; color: var(--muted); opacity: 0;
  animation: fate-hint-appear 0.5s ease forwards 6s;
}
@keyframes fate-spin { to { transform: rotate(360deg); } }
@keyframes fate-spin-reverse { to { transform: rotate(-360deg); } }
@keyframes fate-pulse {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50% { transform: scale(1.15); opacity: 1; }
}
@keyframes fate-dot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.35); }
}
@keyframes fate-hint-appear { to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 14px; color: var(--muted); font-style: italic; }
.scenario-block { margin-bottom: 16px; padding: 18px; background: linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 90%, transparent), color-mix(in oklch, var(--surface-soft-2) 82%, transparent)); border-radius: 18px; border-left: 3px solid var(--accent2); border: 1px solid var(--card-border); opacity: 1; box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025); }
.scenario-block:nth-child(1) { animation-delay: 0.1s; border-left-color: var(--accent); }
.scenario-block:nth-child(2) { animation-delay: 0.2s; border-left-color: var(--accent2); }
.scenario-block:nth-child(3) { animation-delay: 0.3s; border-left-color: var(--green); }

/* A/B compare – dvousloupcový layout na desktopu */
.scenario-compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .scenario-compare-grid {
    grid-template-columns: 1fr 1fr;
  }
  .scenario-compare-grid > .scenario-block {
    margin-bottom: 0;
  }
}
.scenario-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 9px; opacity: 0.82; }
.scenario-text { font-size: 14px; line-height: 1.68; color: var(--text); }
.scenario-text-compact { margin-bottom: 10px; }
.scenario-header { margin-bottom: 22px; }
.scenario-actions { margin-top: 8px; }
.scenario-choice-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.scenario-choice-row .modal-btn { margin-top: 0; flex: 1; min-width: 120px; }
.scenario-error { text-align: center; padding: 20px 0; }
.stat-row { display: flex; gap: 10px; margin-bottom: 18px; }
.stat { flex: 1; background: linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 88%, transparent), color-mix(in oklch, var(--surface-soft-2) 80%, transparent)); border-radius: 16px; padding: 15px 14px; text-align: center; border: 1px solid var(--card-border); opacity: 1; box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025); }
.stat-num { font-family: 'Playfair Display', serif; font-size: 24px; color: var(--accent); display: block; }
.stat-label { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.35; }

/* ── Onboarding ── */
.onboarding { position: fixed; inset: 0; z-index: 500; background: var(--bg); display: flex; flex-direction: column; align-items: center; overflow: hidden; transition: opacity 0.4s ease; }
.onboarding.hidden { display: none; }
.ob-done .onboarding { display: none; }
.ob-done .onboarding { display: none; }
.ob-slides { flex: 1; display: flex; transition: transform 0.45s cubic-bezier(0.32, 0.72, 0, 1); width: 100%; max-width: 420px; overflow: hidden; }
.ob-slide { min-width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 32px 32px; text-align: center; }
.ob-visual { width: 180px; height: 180px; margin-bottom: 40px; position: relative; display: flex; align-items: center; justify-content: center; }
.ob-ring { position: absolute; border-radius: 50%; border: 1px solid var(--border); }
.ob-ring-1 { width: 180px; height: 180px; animation: pulse 3s ease-in-out infinite; }
.ob-ring-2 { width: 130px; height: 130px; animation: pulse 3s ease-in-out infinite 0.5s; }
.ob-ring-3 { width: 80px; height: 80px; background: var(--surface2); border-color: var(--accent); opacity: 0.6; }
@keyframes pulse { 0%,100%{opacity:0.15;transform:scale(1);} 50%{opacity:0.3;transform:scale(1.03);} }
.ob-icon {
  font-size: 36px;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fate-orb-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.fate-compass {
  display: inline-block;
  animation: fate-orb-drift 6.8s ease-in-out infinite;
  transform-origin: center;
  width: 1em;
  height: 1em;
}
.profile-avatar-guest .fate-compass {
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1;
}
@keyframes fate-orb-drift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  16% { transform: translate(-1.5px, 0.5px) rotate(-6deg); }
  33% { transform: translate(1.5px, -0.5px) rotate(6deg); }
  52% { transform: translate(0.75px, 1px) rotate(2deg); }
  74% { transform: translate(-1px, -0.75px) rotate(-4deg); }
}
.ob-slide-title { font-family: 'Playfair Display', serif; font-size: 28px; line-height: 1.25; margin-bottom: 16px; color: var(--text); }
.ob-slide-title em { color: var(--accent); font-style: italic; }
.ob-brand-title { font-size: 32px; }
.ob-brand-project { color: var(--text); font-style: italic; font-size: 22px; opacity: 0.78; }
.ob-brand-fate { color: var(--accent); }
.ob-slide-text { font-size: 15px; line-height: 1.7; color: oklch(0.933 0.011 286.2 / 0.6); max-width: 300px; }
.ob-cards { display: flex; gap: 10px; margin-bottom: 36px; flex-wrap: wrap; justify-content: center; }
.ob-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; font-size: 13px; color: var(--text); text-align: left; width: calc(50% - 5px); line-height: 1.4; }
.ob-card-icon { font-size: 20px; margin-bottom: 6px; display: block; }
.ob-lock { width: 80px; height: 80px; background: var(--surface2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 36px; margin-bottom: 36px; border: 1px solid var(--border); position: relative; }
.ob-lock::after { content: ''; position: absolute; inset: -8px; border-radius: 50%; border: 1px solid var(--accent); opacity: 0.3; animation: pulse 2s ease-in-out infinite; }
.ob-bottom { padding: 24px 32px 48px; display: flex; flex-direction: column; gap: 10px; width: 100%; max-width: 420px; }
.ob-dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 20px; }
.ob-dot { width: 6px; height: 6px; border-radius: 3px; background: var(--border); transition: all 0.3s; cursor: pointer; }
.ob-dot.active { width: 20px; background: var(--accent); }
.ob-btn-primary { width: 100%; padding: 16px; border-radius: 16px; border: none; background: var(--accent); color: var(--on-accent); font-family: 'DM Sans', sans-serif; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.ob-btn-secondary { width: 100%; padding: 14px; border-radius: 16px; border: 1px solid var(--border); background: transparent; color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 14px; cursor: pointer; transition: all 0.2s; }
.ob-btn-primary:active, .ob-btn-secondary:active { transform: scale(0.97); }
.ob-skip { position: absolute; top: 52px; right: 24px; font-size: 13px; color: var(--muted); cursor: pointer; z-index: 10; background: none; border: none; font-family: 'DM Sans', sans-serif; }

/* ── Auth modal ── */
.auth-modal { width: calc(100% - 32px); max-width: 420px; background: var(--surface); border-radius: 30px; padding: 22px 24px 32px; transform: translateY(20px); transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1); border: 1px solid color-mix(in oklch, var(--border) 74%, white); position: relative; margin: auto; box-shadow: var(--modal-shadow); }
.modal-overlay.open .auth-modal { transform: translateY(0); }
.auth-tabs { display: flex; gap: 0; margin-bottom: 28px; background: color-mix(in oklch, var(--card-subtle) 88%, transparent); border-radius: 14px; padding: 4px; border: 1px solid var(--card-border); }
.auth-tab { flex: 1; padding: 10px; border: none; background: none; color: var(--muted); font-family: 'DM Sans', sans-serif; font-size: 14px; font-weight: 500; border-radius: 9px; cursor: pointer; transition: all 0.2s; }
.auth-tab.active { background: color-mix(in oklch, var(--surface) 96%, transparent); color: var(--text); box-shadow: 0 1px 3px oklch(0 0 0 / 0.10); }
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-logo { font-family: 'Playfair Display', serif; font-size: 28px; text-align: center; margin-bottom: 6px; letter-spacing: 0.08em; }
.auth-logo .auth-logo-project { color: var(--muted); font-style: italic; font-size: 18px; }
.auth-logo .auth-logo-fate { color: var(--accent); }
.auth-tagline { font-size: 13px; color: var(--muted); text-align: center; margin-bottom: 28px; line-height: 1.5; }
.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: 12px; color: var(--muted); }
.social-btn { width: 100%; padding: 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface2); color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; transition: all 0.2s; }
.social-btn:active { transform: scale(0.97); }
.social-btn-soon { opacity: 0.6; border-style: dashed; }
.anon-note { font-size: 12px; color: var(--muted); text-align: center; margin-top: 16px; line-height: 1.5; padding: 12px; background: color-mix(in oklch, var(--card-subtle) 86%, transparent); border-radius: 12px; border: 1px solid var(--card-border); }
.anon-note strong { color: var(--accent); }
.forgot { text-align: right; margin-top: -8px; margin-bottom: 16px; }
.forgot a { font-size: 12px; color: var(--muted); text-decoration: none; cursor: pointer; }
.terms { font-size: 11px; color: var(--muted); text-align: center; margin-top: 14px; line-height: 1.6; }
.terms a { color: var(--accent); text-decoration: none; }

/* ── Profil ── */
.profile-avatar-big { width: 72px; height: 72px; border-radius: 50%; background: var(--surface2); border: 2px solid var(--accent); display: flex; align-items: center; justify-content: center; font-size: 30px; margin: 0 auto 12px; }
.profile-avatar-guest {
  position: relative;
  overflow: hidden;
  background: color-mix(in oklch, var(--surface2) 86%, var(--accent));
  color: var(--accent);
  border-color: color-mix(in oklch, var(--accent) 62%, var(--border));
  box-shadow:
    inset 0 1px 0 oklch(1 0 0 / 0.05),
    0 10px 22px oklch(0 0 0 / 0.10);
}
body.light .profile-avatar-guest {
  color: var(--text);
}
.profile-avatar-guest::before {
  content: '';
  position: absolute;
  inset: -6% 10%;
  border-radius: 999px;
  background:
    radial-gradient(circle at 50% 50%, color-mix(in oklch, var(--accent) 20%, transparent), transparent 56%);
  pointer-events: none;
}
.profile-avatar-guest > span {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.profile-name { font-family: 'Playfair Display', serif; font-size: 20px; text-align: center; color: var(--text); margin-bottom: 4px; }
.profile-since { font-size: 12px; color: var(--muted); text-align: center; margin-bottom: 24px; }
.profile-stats { display: flex; gap: 10px; margin-bottom: 24px; }
.profile-stat { flex: 1; background: var(--surface2); border-radius: 14px; padding: 14px 10px; text-align: center; border: 1px solid var(--border); }
.profile-stat-num { font-family: 'Playfair Display', serif; font-size: 22px; color: var(--accent); display: block; }
.profile-stat-label { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.3; }
.profile-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 12px; }
.profile-story { background: var(--card-subtle); border-radius: 16px; padding: 14px 16px; margin-bottom: 10px; border: 1px solid var(--card-border); cursor: pointer; transition: border-color 0.2s, transform 0.2s, background-color 0.2s; }
.profile-story:hover { border-color: var(--card-hover-border); transform: translateY(-1px); background: color-mix(in oklch, var(--card-subtle) 86%, var(--accent)); }
.profile-story-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.profile-story-title { font-size: 14px; color: var(--text); line-height: 1.4; margin-bottom: 6px; }
.profile-story-likes { font-size: 12px; color: var(--muted); }
.profile-divider { height: 1px; background: var(--border); margin: 20px 0; }
.profile-rewards {
  margin: 10px 0 4px;
  padding: 14px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, oklch(0.621 0.213 283.8 / 0.08), transparent 34%),
    linear-gradient(180deg, color-mix(in oklch, var(--surface2) 92%, transparent), color-mix(in oklch, var(--surface) 88%, transparent));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-soft);
}
.profile-reward-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.profile-rewards-title {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.profile-rewards-subtitle {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.profile-reward-status {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent2);
  border: 1px solid color-mix(in oklch, var(--accent2) 36%, var(--card-border));
  background: color-mix(in oklch, var(--accent2) 10%, transparent);
  border-radius: 999px;
  padding: 7px 10px;
}
.profile-reward-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.profile-reward-card {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  background: color-mix(in oklch, var(--card-subtle) 86%, transparent);
}
.profile-reward-card-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}
.profile-reward-card-value {
  font-size: 14px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}
.profile-reward-card-level .profile-reward-card-value {
  color: var(--reward-gold);
}
.profile-reward-card-points .profile-reward-card-value {
  color: var(--reward-points);
}
.profile-reward-card-badges .profile-reward-card-value {
  color: var(--reward-badges);
}
.profile-reward-progress-wrap {
  margin-top: 12px;
  padding: 12px;
  border-radius: 14px;
  background: color-mix(in oklch, var(--surface-soft-2) 82%, transparent);
  border: 1px solid var(--card-border);
}
.profile-reward-progress-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.profile-reward-progress-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.profile-reward-progress {
  width: 100%;
  height: 8px;
  background: oklch(1 0 0 / 0.08);
  border: 1px solid oklch(1 0 0 / 0.12);
  border-radius: 999px;
  margin: 10px 0 6px;
  overflow: hidden;
}
.profile-reward-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, oklch(0.907 0.153 159.5 / 0.9), oklch(0.912 0.126 92.8 / 0.9));
  transition: width 0.25s ease;
}
.profile-reward-progress-label {
  font-size: 11px;
  color: var(--muted);
}
.profile-reward-block {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.profile-reward-block-muted {
  margin-top: 14px;
}
.profile-reward-block-title {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}
.profile-reward-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.profile-badge-pill {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: oklch(1 0 0 / 0.05);
  color: var(--text);
}
.profile-badge-empty {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 2px;
  font-size: 11px;
  color: var(--muted);
}
.profile-reward-legend {
  display: grid;
  gap: 6px;
}
.profile-reward-legend-item {
  font-size: 12px;
  color: var(--text);
  line-height: 1.45;
}
.profile-reward-legend-note {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}
.profile-anon-note {
  display: block;
  width: 100%;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}
.profile-anon-list {
  margin: 6px 0 0 0;
  padding-left: 16px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-anon-list li::before {
  content: '–';
  margin-right: 6px;
  color: var(--accent);
  opacity: 0.7;
}
/* ── Premium card ── */
#profile-premium-card { margin: 10px 0 4px; }
.profile-premium-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 16px;
  background:
    radial-gradient(circle at top right, oklch(0.749 0.085 82.8 / 0.10), transparent 40%),
    linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 92%, transparent), color-mix(in oklch, var(--surface-soft-2) 82%, transparent));
  border: 1px solid var(--card-border);
}
.profile-premium-active {
  border-color: oklch(0.749 0.085 82.8 / 0.35);
  background:
    radial-gradient(circle at top right, oklch(0.749 0.085 82.8 / 0.14), transparent 50%),
    linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 92%, transparent), color-mix(in oklch, var(--surface-soft-2) 82%, transparent));
}
.profile-premium-icon { font-size: 22px; flex-shrink: 0; }
.profile-premium-info { flex: 1; min-width: 0; }
.profile-premium-title { font-size: 13px; font-weight: 600; color: var(--text); }
.profile-premium-sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.profile-premium-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 3px;
}
.profile-premium-perks span { font-size: 11px; color: var(--muted); }
.profile-premium-perks span::before { content: '✓ '; color: var(--accent); opacity: 0.8; }
.profile-premium-price {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.profile-premium-price span { font-size: 11px; font-weight: 400; color: var(--muted); }
.profile-premium-badge {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: oklch(0.749 0.085 82.8);
  background: oklch(0.749 0.085 82.8 / 0.12);
  border: 1px solid oklch(0.749 0.085 82.8 / 0.25);
  border-radius: 20px;
  padding: 3px 9px;
}
.profile-premium-btn { margin-top: 8px !important; }

.profile-guest-card {
  margin: 6px 0 18px;
  padding: 16px 16px 15px;
  border-radius: 18px;
  background:
    radial-gradient(circle at top right, oklch(0.749 0.085 82.8 / 0.08), transparent 34%),
    linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 92%, transparent), color-mix(in oklch, var(--surface-soft-2) 82%, transparent));
  border: 1px solid var(--card-border);
  text-align: center;
}
.profile-guest-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.profile-settings {
  padding: 4px 16px;
  border-radius: 18px;
  background: color-mix(in oklch, var(--card-subtle) 82%, transparent);
  border: 1px solid var(--card-border);
}

@media (max-width: 560px) {
  .profile-reward-head,
  .profile-reward-progress-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .profile-reward-grid {
    grid-template-columns: 1fr;
  }
}
.settings-item { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); cursor: pointer; transition: opacity 0.2s, transform 0.2s; }
.settings-item:last-child { border-bottom: none; }
.settings-item:hover { transform: translateX(2px); }
.settings-item:active { opacity: 0.6; }
.settings-label { font-size: 14px; color: var(--text); }
.settings-arrow { color: var(--muted); font-size: 16px; }
.settings-item.danger .settings-label { color: var(--danger); }

/* ── Notifikace ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 12px;
  margin-bottom: 8px;
  border: 1px solid color-mix(in oklch, var(--card-border) 86%, transparent);
  border-radius: 18px;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 88%, transparent), color-mix(in oklch, var(--surface-soft-2) 80%, transparent));
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025);
}
.notif-item:last-of-type { border-bottom: none; }
.notif-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border: 1px solid color-mix(in oklch, var(--card-border) 84%, transparent);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.04);
}
.notif-icon.helped { background: oklch(0.898 0.176 154.6 / 0.12); color: var(--green); font-size: 17px; }
.notif-icon.same { background: oklch(0.621 0.213 283.8 / 0.12); color: var(--accent2); font-size: 17px; }
.notif-icon.match { background: oklch(0.621 0.213 283.8 / 0.12); color: var(--accent2); }
.notif-icon.milestone { background: oklch(0.749 0.085 82.8 / 0.12); color: var(--accent); }
.notif-icon.approved { background: oklch(0.898 0.176 154.6 / 0.10); color: var(--green); }
.notif-body { flex: 1; }
.notif-text { font-size: 14px; color: var(--text); line-height: 1.55; margin-bottom: 5px; }
.notif-text strong { color: var(--accent); }
.notif-time { font-size: 11px; color: var(--muted); letter-spacing: 0.01em; }
.notif-unread {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  margin-top: 8px;
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 12%, transparent);
}
.notif-empty {
  font-size: 13px;
  color: var(--muted);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 90%, transparent), color-mix(in oklch, var(--surface-soft-2) 82%, transparent));
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 14px 15px;
  margin-bottom: 6px;
  line-height: 1.55;
}
.notif-divider { height: 1px; background: var(--border); margin: 20px 0; }
.notif-section-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); opacity: 0.8; margin-bottom: 14px; }

/* Toggle přepínač */
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 14px; border: 1px solid var(--card-border); background: color-mix(in oklch, var(--card-subtle) 84%, transparent); border-radius: 16px; margin-bottom: 9px; box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.025); }
.toggle-row:last-child { margin-bottom: 0; }
.toggle-label { font-size: 14px; color: var(--text); }
.toggle-sub { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.toggle { width: 44px; height: 26px; border-radius: 13px; background: var(--card-subtle); border: 1px solid var(--card-border); position: relative; cursor: pointer; transition: background 0.2s, border-color 0.2s; flex-shrink: 0; }
.toggle.on { background: var(--accent); border-color: var(--accent); }
.toggle::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); top: 2px; left: 2px; transition: all 0.2s; }
.toggle.on::after { background: var(--on-accent); left: 20px; }
.toggle:hover { border-color: var(--field-hover-border); }

/* ── Kategorie ── */
.cat-vztahy  { --cat-color: var(--cat-vztahy); }
.cat-prace   { --cat-color: var(--cat-prace); }
.cat-finance { --cat-color: var(--cat-finance); }
.cat-zdravi  { --cat-color: var(--cat-zdravi); }
.cat-rodic   { --cat-color: var(--cat-rodic); }
.cat-bydleni { --cat-color: var(--cat-bydleni); }
.cat-vzdelani{ --cat-color: var(--cat-vzdelani); }
.cat-hodnoty { --cat-color: var(--cat-hodnoty); }
.cat-kariéra { --cat-color: var(--cat-kariera); }
.cat-rodina  { --cat-color: var(--cat-rodina); }

/* ── Decision Tracker: Timeline strip na kartě ── */
.timeline-strip { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; padding: 0 2px; }
.ts-track { position: relative; display: flex; align-items: flex-start; width: 100%; flex-direction: column; }
.ts-dots-row { display: flex; justify-content: space-between; align-items: center; width: 100%; position: relative; }
.ts-line-bg {
  position: absolute; top: 4px; left: 4px; right: 4px; height: 2px; transform: translateY(0); z-index: 0;
  background: var(--border);
  border-radius: 2px;
}
.ts-line-fill {
  position: absolute; top: 4px; left: 4px; height: 2px; z-index: 0;
  width: 0;
  background: var(--cat-color, var(--accent));
  border-radius: 2px; transition: width 0.5s ease;
}
.timeline-strip.ts-fill-0 .ts-line-fill { width: 0; }
.timeline-strip.ts-fill-1 .ts-line-fill { width: 33.333%; }
.timeline-strip.ts-fill-2 .ts-line-fill { width: 66.667%; }
.timeline-strip.ts-fill-3 .ts-line-fill { width: 100%; }
.ts-dot-wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 1; }
.ts-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--surface2); border: 2px solid var(--border); transition: all 0.3s; }
.ts-dot.filled { background: var(--cat-color, var(--accent)); border-color: var(--cat-color, var(--accent)); }
.ts-dot-label { font-size: 9px; color: var(--muted); white-space: nowrap; }
.ts-dot-wrap.filled .ts-dot-label { color: var(--cat-color, var(--accent)); }
.ts-badge { font-size: 10px; color: var(--muted); white-space: nowrap; flex-shrink: 0; }
.ts-badge strong { color: var(--cat-color, var(--accent)); }
.timeline-strip-locked {
  position: relative;
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  padding: 8px 10px;
  cursor: not-allowed;
  background: var(--card-subtle);
}
.timeline-strip-lock { font-size: 11px; color: var(--muted); }
.timeline-strip-locked:hover::after,
.story-timeline-locked:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  z-index: 4;
  pointer-events: none;
}

/* ── Decision Tracker: Plná timeline v story modalu ── */
.story-timeline { padding: 20px 20px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.story-timeline-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 18px; }
.story-timeline-locked { position: relative; }
.story-timeline-lock {
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  cursor: not-allowed;
  background: var(--card-subtle);
}
.tl-entry { display: flex; gap: 12px; position: relative; padding-bottom: 20px; }
.tl-entry:last-child { padding-bottom: 8px; }
.tl-left { display: flex; flex-direction: column; align-items: center; flex-shrink: 0; width: 20px; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--cat-color, var(--accent)); border: 2px solid var(--cat-color, var(--accent)); flex-shrink: 0; }
.tl-dot-orig { background: transparent; border-color: var(--muted); }
.tl-connector { flex: 1; width: 2px; background: var(--border); margin-top: 5px; min-height: 20px; }
.tl-right { flex: 1; }
.tl-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.tl-period { font-size: 11px; font-weight: 500; color: var(--cat-color, var(--accent)); }
.tl-period-orig { color: var(--muted); }
.tl-date { font-size: 11px; color: var(--muted); }
.tl-sentiment { font-size: 14px; margin-left: auto; }
.tl-text { font-size: 13px; color: var(--text); line-height: 1.6; }
.tl-text-orig { font-size: 13px; color: var(--muted); line-height: 1.6; font-style: italic; }

/* ── Decision Tracker: Pending update banner ── */
.update-banner { margin: 0 20px 16px; padding: 14px 16px; background: var(--card-subtle); border: 1px solid var(--card-border); border-left: 3px solid var(--cat-color, var(--accent)); border-radius: 14px; display: flex; align-items: center; gap: 12px; }
.update-banner.is-pending { opacity: 0.55; }
.update-banner-icon { font-size: 20px; flex-shrink: 0; }
.update-banner-text { flex: 1; min-width: 0; }
.update-banner-title { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 2px; }
.update-banner-sub { font-size: 12px; color: var(--muted); }
.update-banner-btn { font-size: 12px; font-weight: 500; color: var(--cat-color, var(--accent)); background: color-mix(in oklch, var(--card-subtle) 82%, var(--cat-color, var(--accent))); border: 1px solid color-mix(in oklch, var(--cat-color, var(--accent)) 56%, var(--border)); border-radius: 10px; padding: 7px 12px; cursor: pointer; white-space: nowrap; flex-shrink: 0; transition: all 0.2s; }
.update-banner-btn:hover { transform: translateY(-1px); }
.update-banner-btn.is-locked {
  color: var(--muted);
  border-color: var(--border);
  opacity: 0.6;
  cursor: not-allowed;
  position: relative;
}
.update-banner-btn.is-locked:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  white-space: nowrap;
  font-size: 11px;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  z-index: 5;
  pointer-events: none;
}

/* ── Decision Tracker: Update modal — sentiment selector ── */
.sentiment-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.sentiment-row { display: flex; gap: 6px; margin-bottom: 20px; }
.sentiment-opt { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 11px 4px; border-radius: 14px; border: 1px solid var(--card-border); background: var(--card-subtle); cursor: pointer; transition: all 0.18s; }
.sentiment-opt:hover { border-color: var(--accent); transform: translateY(-1px); }
.sentiment-opt.selected { border-color: var(--accent); background: oklch(0.621 0.213 283.8 / 0.12); }
.sentiment-emoji { font-size: 18px; }
.sentiment-opt-label { font-size: 9px; color: var(--muted); text-align: center; line-height: 1.3; }
.sentiment-opt.selected .sentiment-opt-label { color: var(--accent); }
.modal-input-plain { resize: none; font-family: inherit; }
.modal-copy-soft { font-size: 12px; margin-top: 6px; }

/* ── Fate prediction: dynamický výsledek ── */
.scenario-cat-badge { display: inline-block; font-size: 11px; padding: 3px 12px; border-radius: 20px; background: oklch(1 0 0 / 0.06); border: 1px solid var(--cat-color, var(--accent)); color: var(--cat-color, var(--accent)); margin-bottom: 14px; letter-spacing: 0.03em; }
.scenario-related { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.scenario-related-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 14px; }
.scenario-story-link { padding: 13px 14px; border-radius: 12px; background: var(--card-subtle); border: 1px solid var(--card-border); margin-bottom: 10px; cursor: pointer; transition: border-color 0.18s, transform 0.18s, background-color 0.18s; }
.scenario-story-link:hover { border-color: var(--accent); transform: translateY(-1px); background: color-mix(in oklch, var(--card-subtle) 86%, var(--accent)); }
.scenario-story-link-title { font-size: 13px; color: var(--text); margin-bottom: 4px; line-height: 1.4; }
.scenario-story-link-meta { font-size: 11px; color: var(--muted); }
.loading-text { transition: opacity 0.3s; }
.scenario-key-insight { margin: 20px 0; padding: 16px 18px; border-radius: 14px; background: oklch(0.621 0.213 283.8 / 0.08); border: 1px solid oklch(0.621 0.213 283.8 / 0.25); opacity: 1; }

@media (max-width: 520px) {
  .modal-foot,
  .modal-btn-row {
    display: grid;
    grid-template-columns: 1fr;
  }
  .modal {
    border-radius: 26px;
    padding: 20px 18px 26px;
  }
  .auth-modal {
    border-radius: 26px;
    padding: 20px 18px 26px;
  }
}
.scenario-key-insight-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent2); margin-bottom: 8px; }
.scenario-key-insight-text { font-size: 14px; color: var(--text); line-height: 1.6; }

/* ── Confirm dialog ── */
.confirm-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: oklch(0 0 0 / 0.6);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease;
}
.confirm-overlay.open { opacity: 1; pointer-events: all; }
.confirm-box {
  background: var(--surface); border: 1px solid var(--panel-border);
  border-radius: 24px; padding: 28px 24px;
  max-width: 320px; width: calc(100% - 48px);
  transform: translateY(10px);
  transition: transform 0.2s ease;
  box-shadow: var(--panel-shadow);
}
.confirm-overlay.open .confirm-box { transform: translateY(0); }
.confirm-title {
  font-family: 'Playfair Display', serif;
  font-size: 18px; color: var(--text); margin-bottom: 10px;
}
.confirm-msg {
  font-size: 14px; color: var(--muted); line-height: 1.6; margin-bottom: 24px;
}
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-btn-cancel {
  background: var(--chip-bg); border: 1px solid var(--card-border);
  color: var(--muted); border-radius: 12px;
  padding: 10px 18px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; cursor: pointer; transition: all 0.2s;
}
.confirm-btn-cancel:hover { border-color: var(--field-hover-border); color: var(--text); transform: translateY(-1px); }
.confirm-btn-ok {
  border: none; border-radius: 12px;
  padding: 10px 20px; font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
  background: linear-gradient(180deg, color-mix(in oklch, var(--accent) 94%, white), var(--accent)); color: var(--on-accent);
}
.confirm-btn-ok.confirm-btn-danger { background: var(--danger); color: oklch(1 0 0); }
.confirm-btn-ok:disabled { opacity: 0.55; cursor: default; }
.confirm-btn-ok:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.03); }
#confirm-loading { text-align: center; padding: 8px 0 4px; }
#confirm-loading .spinner { margin-bottom: 14px; }
#confirm-loading .loading-text { font-size: 14px; color: var(--muted); font-style: italic; transition: opacity 0.3s; }

/* ── Avatar notification dot ── */
.avatar-wrap { position: relative; cursor: pointer; }
.avatar-notif,
.bell-notif {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--notif-ping);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px oklch(0.687 0.215 4.5 / 0.14), 0 0 10px oklch(0.687 0.215 4.5 / 0.32);
  animation: pulse 1.5s infinite;
}

/* ── Situační matching — banner ve feedu ── */
/* ── User-submitted story — pending badge ── */
.bubble-featured {
  border-color: oklch(0.78 0.12 85 / 0.45) !important;
  box-shadow: 0 0 0 1px oklch(0.78 0.12 85 / 0.20);
}

.bubble-featured-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.04em;
  color: oklch(0.68 0.14 80);
  background: oklch(0.78 0.12 85 / 0.10);
  border: 1px solid oklch(0.78 0.12 85 / 0.30);
  border-radius: 6px; padding: 3px 8px;
  margin-bottom: 10px;
}

body.light .bubble-featured {
  border-color: oklch(0.65 0.14 80 / 0.35) !important;
}

body.light .bubble-featured-badge {
  color: oklch(0.52 0.13 75);
  background: oklch(0.78 0.12 85 / 0.08);
}

.bubble-pending-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; color: var(--muted);
  background: oklch(1 0 0 / 0.04);
  border: 1px solid var(--border);
  border-radius: 6px; padding: 3px 8px;
  margin-bottom: 10px; letter-spacing: 0.03em;
}

/* ══════════ SVĚTLÝ REŽIM ══════════ */
body.light {
  --bg:      oklch(0.892 0.010 92);
  --surface: oklch(0.918 0.008 95);
  --surface2:oklch(0.862 0.015 88);
  --border:  oklch(0.219 0.031 289.3 / 0.20);
  --text:    oklch(0.180 0.028 289);
  --muted:   oklch(0.420 0.022 286);
  --line-soft: oklch(0.219 0.031 289.3 / 0.12);
  --line-strong: oklch(0.219 0.031 289.3 / 0.24);
  --surface-soft: oklch(0.219 0.031 289.3 / 0.04);
  --surface-soft-2: oklch(0.219 0.031 289.3 / 0.07);
  --surface-soft-3: oklch(0.219 0.031 289.3 / 0.11);
  --text-soft: oklch(0.180 0.028 289 / 0.78);
  --text-softer: oklch(0.180 0.028 289 / 0.62);
  --overlay-strong: oklch(0.180 0.028 289 / 0.26);
  --overlay-soft: oklch(0.180 0.028 289 / 0.18);
  --shadow-soft: 0 4px 12px oklch(0.180 0.028 289 / 0.08);
  --shadow-card: 0 10px 24px oklch(0.180 0.028 289 / 0.12);
  --accent2-soft: oklch(0.621 0.213 283.8 / 0.10);
  --accent2-line: oklch(0.621 0.213 283.8 / 0.22);
  --green: oklch(0.380 0.160 154.6);
  --green-soft: oklch(0.380 0.160 154.6 / 0.12);
  --green-line: oklch(0.380 0.160 154.6 / 0.30);
  --danger-soft: oklch(0.712 0.181 22.8 / 0.10);
  --danger-line: oklch(0.712 0.181 22.8 / 0.24);
  --bottom-bar-bg: color-mix(in oklch, var(--bg) 78%, transparent);
  --bottom-bar-edge: oklch(0.219 0.031 289.3 / 0.08);
  --bottom-bar-shadow: 0 -6px 18px oklch(0.235 0.028 289 / 0.05);
  --modal-shadow: 0 12px 28px oklch(0.235 0.028 289 / 0.08);
  --modal-close-bg: color-mix(in oklch, var(--surface2) 72%, white);
  --control-hover-bg: color-mix(in oklch, var(--surface2) 84%, var(--accent));
  --field-bg: color-mix(in oklch, var(--surface2) 78%, white);
  --field-hover-border: color-mix(in oklch, var(--border) 48%, var(--accent));
  --card-bg: color-mix(in oklch, var(--surface) 94%, white);
  --card-border: color-mix(in oklch, var(--border) 88%, white);
  --card-subtle: color-mix(in oklch, var(--surface2) 76%, white);
  --card-hover-border: color-mix(in oklch, var(--border) 38%, var(--accent));
  --chip-bg: color-mix(in oklch, var(--surface2) 72%, white);
  --chip-hover-bg: color-mix(in oklch, var(--surface2) 72%, var(--accent));
  --panel-bg: color-mix(in oklch, var(--surface) 92%, white);
  --panel-border: color-mix(in oklch, var(--border) 82%, white);
  --panel-shadow: 0 10px 22px oklch(0.235 0.028 289 / 0.07);
}

/* Přechod při přepnutí tématu — jen body, aby se nerozbiły existující animace */
body { transition: background-color 0.3s ease; }

/* Hardcoded rgba barvy textu — přepis pro světlý režim */
body.light .bubble-text          { color: var(--text-soft); }
body.light .outcome              { color: var(--text-softer); }
body.light .story-detail-body    { color: oklch(0.219 0.031 289.3 / 0.82); }
body.light .story-detail-outcome { color: oklch(0.219 0.031 289.3 / 0.70); }
body.light .ob-slide-text        { color: oklch(0.219 0.031 289.3 / 0.60); }
body.light .tl-text              { color: oklch(0.219 0.031 289.3 / 0.85); }
body.light .tl-text-orig         { color: oklch(0.219 0.031 289.3 / 0.55); font-style: italic; }

/* Pending badge — tmavší rámeček ve světlém režimu */
body.light .bubble-pending-badge { background: oklch(0 0 0 / 0.04); }

/* Bottom bar gradient — světlý podklad */
body.light .bottom-bar {
  background: linear-gradient(to top, var(--bg) 60%, transparent);
}
body.light .bottom-bar-inner {
  background: color-mix(in oklch, var(--surface) 84%, transparent);
}
body.light .header {
  background: color-mix(in oklch, var(--bg) 90%, white);
  border-bottom-color: var(--line-soft);
}
body.light .bubble,
body.light .modal,
body.light .auth-modal,
body.light .profile-story,
body.light .similar-story,
body.light .admin-stat-card,
body.light .admin-tab.active {
  box-shadow: var(--shadow-soft);
}
body.light .search-icon,
body.light .avatar,
body.light .header-theme-btn {
  background: color-mix(in oklch, var(--surface2) 82%, white);
}
body.light .filter-chip:not(.active),
body.light .admin-filter-btn:not(.active),
body.light .chip-pill,
body.light .profile-reward-pill {
  border-color: var(--line-soft);
  background: var(--surface-soft);
}
body.light .avatar-notif,
body.light .bell-notif {
  border-color: var(--bg);
  box-shadow: 0 0 0 2px oklch(0.687 0.215 4.5 / 0.16), 0 0 10px oklch(0.687 0.215 4.5 / 0.24);
}
body.light .profile-reward-pill-level {
  background: oklch(0.807 0.163 77.3 / 0.15);
  border-color: oklch(0.807 0.163 77.3 / 0.45);
  color: oklch(0.515 0.113 68.2);
}
body.light .reward-pill-level {
  background: oklch(0.807 0.163 77.3 / 0.14);
  border-color: oklch(0.807 0.163 77.3 / 0.38);
  color: oklch(0.515 0.113 68.2);
}
body.light .profile-reward-pill-points {
  background: oklch(0.723 0.192 149.6 / 0.14);
  border-color: oklch(0.723 0.192 149.6 / 0.45);
  color: oklch(0.448 0.108 151.3);
}
body.light .profile-reward-pill-badges {
  background: oklch(0.623 0.188 259.8 / 0.14);
  border-color: oklch(0.623 0.188 259.8 / 0.45);
  color: oklch(0.424 0.181 265.6);
}
body.light .reward-pill-badge {
  background: oklch(0.623 0.188 259.8 / 0.13);
  border-color: oklch(0.623 0.188 259.8 / 0.34);
  color: oklch(0.424 0.181 265.6);
}

/* ── Mobile branch ──
   Desktop zůstává bohatší a efektnější.
   Mobil je záměrně lehčí, stabilnější a přímočařejší. */
@media (pointer: coarse), (max-width: 560px) {
  body {
    transition: none;
  }
  .phone {
    background: var(--bg);
  }
  .header {
    position: relative;
    top: auto;
    padding: max(12px, env(safe-area-inset-top, 0px)) 14px 0;
    background: var(--bg);
    border-bottom: none;
    backdrop-filter: none;
  }
  .header-shell {
    padding: 10px 12px 12px;
    border-radius: 24px;
    background:
      linear-gradient(180deg, color-mix(in oklch, var(--surface) 96%, transparent), color-mix(in oklch, var(--surface2) 88%, transparent));
    border: 1px solid color-mix(in oklch, var(--border) 84%, white);
  }
  .header-top {
    margin-bottom: 12px;
  }
  .header-right {
    gap: 6px;
  }
  .search-icon,
  .avatar,
  .header-theme-btn {
    width: 38px;
    height: 38px;
  }
  .header-control-icon,
  .header-avatar-icon,
  .header-theme-icon {
    width: 16px;
    height: 16px;
  }
  .logo {
    gap: 6px;
  }
  .logo-project {
    font-size: 18px;
  }
  .logo-fate {
    font-size: 21px;
    letter-spacing: 0.08em;
  }
  .header-tools {
    gap: 8px;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
  }
  .search-bar {
    width: 100%;
  }
  .search-input-wrap {
    position: relative;
  }
  .search-input-wrap::before {
    left: 15px;
    width: 13px;
    height: 13px;
  }
  .search-input-wrap::after {
    left: 26px;
    top: calc(50% + 5px);
    width: 6px;
  }
  .search-input-wrap input {
    border-radius: 14px;
    min-height: 44px;
    padding: 11px 42px 11px 40px;
    transition: none;
    box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.04);
  }
  .search-clear {
    right: 14px;
  }
  .filter-bar-wrap {
    gap: 7px;
  }
  .filter-bar-label {
    font-size: 9px;
    letter-spacing: 0.08em;
    padding-left: 2px;
  }
  .filter-bar {
    gap: 7px;
    margin: 0 -2px;
    padding: 2px 2px 2px 2px;
    scroll-snap-type: x proximity;
  }
  .filter-chip {
    min-height: 36px;
    padding: 8px 13px;
    font-size: 12px;
    scroll-snap-align: start;
  }
  .feed {
    padding: 12px 12px calc(112px + env(safe-area-inset-bottom, 0px));
  }
  #masonry-grid {
    padding-top: 0;
  }
  .skeleton {
    border-radius: 18px;
    padding: 16px 15px;
  }
  .bubble,
  .bubble.visible {
    position: relative !important;
    width: 100% !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 0 14px 0 !important;
    padding: 16px 15px 15px;
    border-radius: 21px;
    opacity: 1 !important;
    transform: none !important;
  }
  .bubble-meta {
    gap: 7px;
    margin-bottom: 11px;
  }
  .bubble-meta-top,
  .bubble-meta-bottom {
    gap: 7px;
  }
  .bubble-meta-bottom {
    align-items: flex-start;
  }
  .nickname,
  .date {
    font-size: 11px;
  }
  .reward-rail {
    margin-left: 0;
    justify-content: flex-start;
  }
  .bubble-title {
    font-size: 17px;
    line-height: 1.3;
    max-width: none;
  }
  .bubble-text {
    font-size: 14px;
    line-height: 1.66;
    max-width: none;
  }
  .outcome {
    margin-top: 12px;
    padding: 13px 14px;
    border-radius: 15px;
  }
  .outcome-text {
    line-height: 1.6;
    max-width: none;
  }
  .bubble-footer {
    gap: 8px;
    margin-top: 12px;
  }
  .action-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .action-btn {
    min-height: 40px;
    padding: 10px 11px;
    font-size: 11px;
  }
  .bottom-bar {
    position: sticky;
    bottom: 0;
    padding: 12px 12px calc(14px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, transparent, color-mix(in oklch, var(--bg) 92%, transparent) 22%, var(--bg) 54%);
    z-index: 90;
  }
  .bottom-bar-inner {
    max-width: none;
    padding: 8px;
    border-radius: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
  }
  .btn {
    min-height: 48px;
    padding: 13px 14px;
    font-size: 13px;
    border-radius: 14px;
  }
  .btn-fate {
    box-shadow: none;
  }
  .modal-overlay {
    align-items: flex-start;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: max(12px, env(safe-area-inset-top, 0px)) 0 calc(12px + env(safe-area-inset-bottom, 0px));
    background: oklch(0 0 0 / 0.72);
  }
  .modal,
  .auth-modal {
    width: calc(100% - 10px);
    max-width: none;
    border-radius: 24px;
    padding: 18px 16px calc(22px + env(safe-area-inset-bottom, 0px));
    background: var(--surface);
    border: 1px solid var(--border);
    margin: 0 auto;
    overflow: visible;
  }
  .modal-close {
    top: 12px;
    right: 12px;
  }
  .modal-head {
    margin-bottom: 14px;
    padding-right: 34px;
  }
  .modal-title {
    font-size: 19px;
    padding-right: 28px;
    line-height: 1.22;
  }
  .modal > .modal-title:first-of-type {
    padding-top: 10px;
    padding-right: 52px;
  }
  .modal > .modal-title:first-of-type + .modal-sub {
    padding-right: 18px;
  }
  .modal-sub {
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.55;
  }
  .field {
    margin-bottom: 14px;
  }
  .field label {
    margin-bottom: 7px;
    font-size: 10px;
    letter-spacing: 0.08em;
  }
  .field input,
  .field textarea,
  .field select {
    border-radius: 13px;
    padding: 12px 14px;
    font-size: 14px;
  }
  .field textarea {
    min-height: 104px;
  }
  .field-hint {
    margin: -2px 0 10px;
    line-height: 1.45;
  }
  .modal-btn {
    min-height: 46px;
    padding: 14px 16px;
    border-radius: 14px;
    font-size: 14px;
  }
  .modal-btn-row,
  .modal-foot {
    display: grid;
    grid-template-columns: 1fr;
  }
  .story-detail-root {
    gap: 14px;
  }
  .story-detail-header {
    padding-bottom: 13px;
  }
  .story-detail-title {
    font-size: 21px;
    line-height: 1.22;
    margin-top: 10px;
    padding: 0 26px;
  }
  .story-detail-meta {
    gap: 8px;
  }
  .story-detail-section,
  .story-detail-outcome {
    padding: 14px;
    border-radius: 17px;
  }
  .story-detail-body,
  .story-detail-outcome-text {
    font-size: 14px;
    line-height: 1.68;
  }
  .story-detail-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }
  .story-detail-stat {
    padding: 12px 10px;
    border-radius: 15px;
  }
  .story-detail-stat-num {
    font-size: 19px;
  }
  .story-detail-stat-label {
    font-size: 9px;
  }
  .story-detail-actions {
    padding: 10px;
    border-radius: 17px;
  }
  .story-detail-actions .action-btn {
    font-size: 12px;
    min-height: 40px;
  }
  .profile-stats {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
  }
  .profile-reward-grid {
    grid-template-columns: 1fr;
  }
  .profile-story,
  .similar-story {
    border-radius: 15px;
    padding: 12px 13px;
  }
  .profile-settings,
  .profile-guest-card {
    border-radius: 16px;
  }
  .profile-story-title,
  .similar-story-title {
    font-size: 13px;
    line-height: 1.42;
  }
  .profile-story-meta,
  .similar-story-meta {
    font-size: 11px;
  }
  .success-screen {
    padding: 10px 0 4px;
  }
  .success-icon {
    width: 58px;
    height: 58px;
    font-size: 24px;
    margin-bottom: 16px;
  }
  .success-title {
    font-size: 18px;
  }
  .success-text {
    margin-bottom: 18px;
  }
  #modal-share .modal-sub,
  #modal-fate .modal-sub {
    margin-bottom: 18px;
    max-width: none;
  }
  #share-story,
  #share-outcome,
  #fate-situation,
  #fate-decision,
  #fate-decision-b {
    min-height: 86px;
  }
  .result-loading {
    padding: 12px 0 6px;
  }
  .scenario-block {
    margin-bottom: 12px;
    padding: 14px;
    border-radius: 15px;
  }
  .scenario-header {
    margin-bottom: 16px;
  }
  .scenario-text {
    line-height: 1.55;
  }
  .stat-row {
    flex-direction: column;
    gap: 8px;
  }
  .stat {
    padding: 12px;
    border-radius: 14px;
  }
  .toggle-row {
    padding: 12px;
    align-items: flex-start;
  }
  .notif-item {
    gap: 12px;
    padding: 12px 11px;
    border-radius: 16px;
    margin-bottom: 7px;
  }
  .notif-icon {
    width: 38px;
    height: 38px;
    font-size: 16px;
  }
  .notif-text {
    font-size: 13px;
    line-height: 1.5;
  }
  .notif-time {
    font-size: 10px;
  }
  .notif-unread {
    margin-top: 7px;
  }
  .toggle-label {
    font-size: 13px;
    line-height: 1.35;
  }
  .toggle-sub {
    font-size: 11px;
    line-height: 1.45;
  }
  .auth-logo {
    font-size: 25px;
  }
  .auth-logo .auth-logo-project {
    font-size: 16px;
  }
  .auth-tagline {
    margin-bottom: 20px;
  }
  .auth-tabs {
    margin-bottom: 16px;
  }
  .auth-tab {
    min-height: 40px;
    font-size: 13px;
  }
  .anon-note,
  .success-stat,
  .profile-rewards,
  .notif-empty {
    border-radius: 14px;
  }
  .empty-state,
  .search-empty {
    padding: 38px 14px calc(118px + env(safe-area-inset-bottom, 0px));
  }
  .bubble,
  .modal,
  .auth-modal,
  .bottom-bar-inner,
  .confirm-dialog,
  .header,
  .modal-overlay,
  .confirm-overlay {
    backdrop-filter: none !important;
  }
  .bubble,
  .modal,
  .auth-modal,
  .bottom-bar-inner,
  .confirm-dialog,
  .header-shell,
  .profile-rewards,
  .admin-card-shell {
    box-shadow: none !important;
  }
  .bubble,
  .bubble.visible,
  .scenario-block,
  .stat,
  .modal,
  .auth-modal,
  .modal-overlay,
  .search-icon,
  .avatar,
  .header-theme-btn,
  .filter-chip,
  .btn,
  .modal-btn,
  .action-btn,
  .similar-story,
  .profile-story,
  .scenario-story-link,
  .social-btn,
  .toggle,
  .toggle::after {
    transition: none !important;
    animation: none !important;
  }
  .scenario-block,
  .stat,
  .scenario-key-insight {
    opacity: 1 !important;
  }
  .ptr-spinner,
  .spinner,
  .ob-ring-1,
  .ob-ring-2,
  .ob-lock::after,
  .skel-line,
  .avatar-notif,
  .bell-notif {
    animation: none !important;
  }
}

/* ── Admin controls ── */
.admin-panel-badge {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  background: oklch(0.621 0.213 283.8 / 0.1); color: var(--accent2);
  border: 1px solid oklch(0.621 0.213 283.8 / 0.3);
  white-space: nowrap;
}

.ban-badge {
  background: oklch(0.712 0.181 22.8 / 0.1); color: var(--danger);
  border-color: oklch(0.712 0.181 22.8 / 0.3);
}

.admin-item-banned {
  opacity: 0.6;
}

.premium-badge {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 12px; border-radius: 20px;
  background: oklch(0.749 0.085 82.8 / 0.12); color: oklch(0.749 0.085 82.8);
  border: 1px solid oklch(0.749 0.085 82.8 / 0.30);
  text-align: center; margin: 4px auto 20px; display: block; width: fit-content;
}
.admin-badge {
  font-size: 11px; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; padding: 3px 12px; border-radius: 20px;
  background: oklch(0.712 0.181 22.8 / 0.1); color: var(--danger);
  border: 1px solid oklch(0.712 0.181 22.8 / 0.3);
  text-align: center; margin: 4px auto 20px; display: block; width: fit-content;
}

.admin-bar {
  display: flex; gap: 6px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.admin-btn {
  flex: 1; min-width: 80px; padding: 7px 11px; border-radius: 10px;
  cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 500;
  transition: transform 0.18s, border-color 0.18s, background-color 0.18s, color 0.18s, box-shadow 0.18s;
  white-space: nowrap;
  background: color-mix(in oklch, var(--chip-bg) 88%, var(--surface) 12%);
  color: var(--muted);
  border: 1px solid color-mix(in oklch, var(--card-border) 86%, transparent);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.04);
}
.admin-btn:active { transform: translateY(1px) scale(0.98); }
.admin-btn:hover {
  color: var(--text);
  border-color: var(--field-hover-border);
  background: color-mix(in oklch, var(--chip-hover-bg) 74%, var(--surface) 26%);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px oklch(0 0 0 / 0.08);
}
.admin-btn:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px oklch(0.749 0.085 82.8 / 0.10);
}

.admin-btn-approve {
  background: linear-gradient(180deg, oklch(0.898 0.176 154.6 / 0.18), oklch(0.898 0.176 154.6 / 0.10));
  color: var(--green);
  border-color: oklch(0.898 0.176 154.6 / 0.34);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.10);
}
.admin-btn-approve:hover {
  background: linear-gradient(180deg, oklch(0.898 0.176 154.6 / 0.26), oklch(0.898 0.176 154.6 / 0.16));
  color: var(--green);
}

.admin-btn-reject, .admin-btn-delete {
  background: linear-gradient(180deg, oklch(0.712 0.181 22.8 / 0.16), oklch(0.712 0.181 22.8 / 0.10));
  color: var(--danger);
  border-color: oklch(0.712 0.181 22.8 / 0.34);
}
.admin-btn-reject:hover, .admin-btn-delete:hover {
  background: linear-gradient(180deg, oklch(0.712 0.181 22.8 / 0.24), oklch(0.712 0.181 22.8 / 0.15));
  color: var(--danger);
}
.admin-btn-quiet {
  background: color-mix(in oklch, var(--surface2) 72%, transparent);
  color: var(--text-soft);
  border-color: color-mix(in oklch, var(--card-border) 78%, transparent);
}

.admin-panel-list {
  margin-top: 8px;
  margin-bottom: 8px;
  display: grid;
  gap: 8px;
}

.admin-panel-item {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px;
  border: 1px solid color-mix(in oklch, var(--card-border) 74%, transparent);
  border-radius: 14px;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--surface) 95%, transparent), color-mix(in oklch, var(--card-subtle) 78%, transparent));
  transition: transform 0.18s, border-color 0.18s, background-color 0.18s, box-shadow 0.18s;
}
.admin-panel-item:last-child { border-bottom: 1px solid color-mix(in oklch, var(--card-border) 74%, transparent); }
.admin-panel-item:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklch, var(--field-hover-border) 76%, transparent);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--surface) 92%, transparent), color-mix(in oklch, var(--chip-hover-bg) 40%, transparent));
  box-shadow: 0 10px 24px oklch(0 0 0 / 0.06);
}

.admin-panel-item-info { flex: 1; min-width: 0; }
.admin-panel-item-title {
  font-size: 13px; color: var(--text); line-height: 1.42; margin-bottom: 4px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-panel-item-meta {
  font-size: 11px;
  color: color-mix(in oklch, var(--muted) 88%, var(--text) 12%);
  line-height: 1.5;
}

.admin-panel-item-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.admin-busy {
  opacity: 0.7;
  pointer-events: none;
}
.admin-action-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.modal-admin-action {
  max-width: 520px;
}
.modal-btn-danger {
  background: oklch(0.712 0.181 22.8 / 0.14);
  color: var(--danger);
  border: 1px solid oklch(0.712 0.181 22.8 / 0.30);
}

.admin-section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted); margin-bottom: 4px; margin-top: 20px;
}
.admin-section-title:first-child { margin-top: 0; }

/* ── Admin panel: záložky ── */
.admin-tabs {
  display: flex; gap: 3px; margin-bottom: 16px;
  background: var(--card-subtle); border-radius: 12px; padding: 4px; border: 1px solid var(--card-border);
}
.admin-tab {
  flex: 1; padding: 7px 6px; border-radius: 8px; border: none; cursor: pointer;
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  color: var(--muted); background: transparent; transition: all 0.18s;
}
.admin-tab:hover {
  color: var(--text);
  background: color-mix(in oklch, var(--surface) 62%, transparent);
}
.admin-tab.active {
  background: var(--surface); color: var(--text);
  box-shadow: 0 4px 12px oklch(0 0 0 / 0.06);
}

/* ── Admin panel: stat karty (Přehled) ── */
.admin-overview-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px;
}
.admin-stat-card {
  background: var(--card-subtle); border-radius: 14px;
  padding: 14px 10px; text-align: center; border: 1px solid var(--card-border);
  position: relative;
  overflow: hidden;
}
.admin-stat-card-warn {
  border-color: oklch(0.790 0.133 48.5 / 0.5); background: oklch(0.790 0.133 48.5 / 0.07);
}
.admin-stat-card-warn::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, oklch(0.790 0.133 48.5), oklch(0.712 0.181 22.8));
}
.admin-stat-num { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1; margin-bottom: 3px; }
.admin-stat-card-warn .admin-stat-num { color: var(--cat-zdravi); }
.admin-stat-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Admin panel: nástroje (Přehled) ── */
.admin-tools {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 0 0 16px 0;
}
.admin-tools-tight { margin-bottom: 0; }
.admin-tools-tight + .admin-overview-stats {
  margin-top: 14px;
}
.admin-tools .admin-btn {
  flex: 1 1 auto;
  min-width: 148px;
  white-space: normal;
  line-height: 1.2;
  padding: 8px 12px;
  text-align: center;
}
.admin-tools .admin-btn.admin-btn-approve,
.admin-tools .admin-btn.admin-btn-reject,
.admin-tools .admin-btn.admin-btn-delete {
  min-width: 140px;
}
.admin-warning {
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
  margin: -4px 0 12px 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid oklch(0.712 0.181 22.8 / 0.24);
  background: linear-gradient(180deg, oklch(0.712 0.181 22.8 / 0.12), oklch(0.712 0.181 22.8 / 0.06));
}
.admin-data-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 12px 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  background: var(--card-subtle);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.admin-data-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: color-mix(in oklch, var(--accent) 68%, white 32%);
  box-shadow: 0 0 0 4px color-mix(in oklch, var(--accent) 18%, transparent);
}

.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 16px 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background:
    radial-gradient(circle at top right, oklch(0.621 0.213 283.8 / 0.10), transparent 34%),
    linear-gradient(180deg, var(--card-subtle), color-mix(in oklch, var(--surface) 90%, transparent));
}
.admin-hero-copy { min-width: 0; }
.admin-hero-title {
  font-size: 20px;
  line-height: 1.05;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
}
.admin-hero-subtitle {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 62ch;
}
.admin-hero-actions,
.admin-card-head-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.admin-card-shell {
  margin: 0 0 16px 0;
  padding: 16px 18px 18px;
  border-radius: 18px;
  border: 1px solid var(--card-border);
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--surface) 94%, transparent), color-mix(in oklch, var(--card-subtle) 84%, transparent));
  box-shadow: var(--shadow-soft);
}
.admin-card-shell-warn {
  border-color: oklch(0.790 0.133 48.5 / 0.42);
  background:
    linear-gradient(180deg, oklch(0.790 0.133 48.5 / 0.08), transparent 22%),
    color-mix(in oklch, var(--surface) 92%, transparent);
}
.admin-card-shell-warn .admin-card-head {
  padding-bottom: 10px;
  border-bottom: 1px solid oklch(0.790 0.133 48.5 / 0.18);
}
.admin-card-shell-warn .admin-tools {
  padding: 12px;
  border-radius: 14px;
  border: 1px solid oklch(0.790 0.133 48.5 / 0.20);
  background:
    linear-gradient(180deg, oklch(0.790 0.133 48.5 / 0.08), oklch(0.712 0.181 22.8 / 0.04));
}
.admin-card-shell-warn .admin-tools .admin-btn-quiet {
  background: color-mix(in oklch, var(--surface) 78%, oklch(0.790 0.133 48.5 / 0.12));
}
.admin-card-shell-warn .admin-tools .admin-btn-reject,
.admin-card-shell-warn .admin-tools .admin-btn-delete {
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.08), 0 8px 20px oklch(0.712 0.181 22.8 / 0.10);
}
.admin-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.admin-section-subtitle {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
.admin-card-body > *:first-child { margin-top: 0; }
.admin-card-body > *:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .admin-hero,
  .admin-card-head {
    flex-direction: column;
  }
  .admin-hero-actions,
  .admin-card-head-actions {
    width: 100%;
    justify-content: stretch;
  }
  .admin-hero-actions .admin-btn,
  .admin-card-head-actions .admin-btn {
    flex: 1 1 100%;
  }
  .admin-tools .admin-btn {
    flex: 1 1 100%;
    min-width: 0;
  }
  .admin-overview-stats {
    grid-template-columns: 1fr;
  }
}

/* ── Admin panel: filter bar (Příběhy) ── */
.admin-filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.admin-filter-btn {
  padding: 7px 12px; border-radius: 999px; border: 1px solid var(--border);
  cursor: pointer; font-family: 'DM Sans', sans-serif; font-size: 11px; font-weight: 500;
  color: var(--muted); background: var(--chip-bg); transition: all 0.15s; white-space: nowrap;
}
.admin-filter-btn:not(.active):hover { border-color: var(--field-hover-border); color: var(--text); background: var(--chip-hover-bg); }
.admin-filter-btn.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 600; }

/* ── Admin panel: barevná tečka kategorie ── */
.admin-story-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 3px; }
.admin-multi-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  flex: 0 0 24px;
  margin-right: 6px;
  cursor: pointer;
}
.admin-multi-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}
.admin-multi-check.disabled,
.admin-multi-check.disabled input {
  cursor: not-allowed;
  opacity: 0.45;
}

/* ── Admin panel: search & sort ── */
.admin-search-wrap { display: flex; gap: 8px; margin-bottom: 10px; }
.admin-search-input {
  flex: 1; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--card-border); background: var(--field-bg);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 13px;
  outline: none; transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}
.admin-search-input::placeholder { color: var(--muted); }
.admin-search-input:hover { border-color: var(--field-hover-border); }
.admin-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.749 0.085 82.8 / 0.08); }
.admin-sort-select {
  flex: 0 0 auto;
  min-width: 148px;
  box-sizing: border-box;
  padding: 10px 28px 10px 10px; border-radius: 12px;
  border: 1px solid var(--card-border); background: var(--field-bg);
  color: var(--text); font-family: 'DM Sans', sans-serif; font-size: 12px;
  cursor: pointer; outline: none;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='oklch(0.535 0.033 285.2)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.admin-sort-select:hover { border-color: var(--field-hover-border); }
.admin-sort-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px oklch(0.749 0.085 82.8 / 0.08); }
.admin-sort-select option { background: var(--surface2); color: var(--text); }

@media (max-width: 720px) {
  .admin-search-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .admin-search-input,
  .admin-sort-select {
    width: 100%;
    min-width: 0;
  }
}

/* ── Admin panel: stránkování ── */
.admin-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 14px 0 2px;
  border-top: 1px solid var(--border); margin-top: 4px;
}
.admin-page-btn {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
  color: var(--muted); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; line-height: 1;
}
.admin-page-btn:not([disabled]):hover { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.admin-page-btn[disabled] { opacity: 0.28; cursor: not-allowed; }
.admin-page-info { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Admin panel: prázdný stav ── */
.admin-empty {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  padding: 24px 18px;
  text-align: center;
  background:
    linear-gradient(180deg, color-mix(in oklch, var(--card-subtle) 90%, transparent), color-mix(in oklch, var(--surface-soft-2) 82%, transparent));
  border: 1px dashed var(--card-border);
  border-radius: 16px;
}

/* ── Admin modal: min výška ── */
#modal-admin .modal { min-height: 400px; }

@media (min-width: 980px) {
  #modal-admin {
    padding: 32px 24px 48px;
  }

  #modal-admin .modal {
    width: min(calc(100vw - 64px), 1120px);
    max-width: 1120px;
    padding: 24px 28px 36px;
  }

  #modal-admin .admin-overview-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
  }

  #modal-admin .admin-stat-card {
    padding: 16px 12px;
  }
}

@media (pointer: coarse), (max-width: 560px) {
  #modal-profile .modal {
    width: calc(100% - 10px);
    border-radius: 20px;
    border-bottom: 1px solid var(--border);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  #modal-profile #profile-modal-inner {
    display: grid;
    gap: 14px;
  }

  #modal-profile .profile-avatar-big {
    width: 64px;
    height: 64px;
    font-size: 26px;
    margin-bottom: 10px;
  }

  #modal-profile .profile-name {
    font-size: 19px;
  }

  #modal-profile .profile-divider {
    margin: 2px 0;
  }

  #modal-profile .profile-rewards {
    margin: 0;
    padding: 13px;
    border-radius: 16px;
  }

  #modal-profile .profile-reward-head {
    gap: 10px;
    margin-bottom: 10px;
  }

  #modal-profile .profile-reward-status {
    width: 100%;
    text-align: center;
    padding: 8px 10px;
  }

  #modal-profile .profile-reward-card,
  #modal-profile .profile-reward-progress-wrap {
    border-radius: 13px;
  }

  #modal-profile .profile-reward-card-value {
    font-size: 13px;
  }

  #modal-profile .profile-reward-block {
    margin-top: 10px;
    padding-top: 10px;
  }

  #modal-profile .settings-item {
    padding: 13px 0;
    gap: 10px;
    align-items: center;
  }

  #modal-profile .settings-label {
    flex: 1;
    line-height: 1.4;
  }

  #modal-profile .settings-arrow {
    flex: 0 0 auto;
  }

  #modal-admin {
    align-items: flex-start;
    padding: max(8px, env(safe-area-inset-top, 0px)) 0 calc(16px + env(safe-area-inset-bottom, 0px));
  }

  #modal-admin .modal {
    width: calc(100% - 10px);
    min-height: auto;
    margin: 0 auto;
    border-radius: 22px;
    border-bottom: 1px solid var(--border);
    padding: 16px 14px calc(18px + env(safe-area-inset-bottom, 0px));
  }

  #modal-admin .modal-close,
  #modal-admin-edit .modal-close {
    top: 10px;
    right: 10px;
  }

  #modal-admin-edit {
    align-items: flex-start;
    padding: max(12px, env(safe-area-inset-top, 0px)) 0 calc(12px + env(safe-area-inset-bottom, 0px));
  }

  #modal-admin-edit .modal {
    width: calc(100% - 10px);
    border-radius: 20px;
    border-bottom: 1px solid var(--border);
  }

  #modal-admin .modal-title,
  #modal-admin-edit .modal-title {
    min-height: 34px;
    margin-bottom: 10px;
    padding-right: 34px;
    display: flex;
    align-items: center;
  }

  #modal-admin #admin-panel-inner {
    padding-bottom: 4px;
  }

  #modal-admin .admin-tabs {
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 14px;
  }

  #modal-admin .admin-tab {
    min-height: 38px;
    font-size: 11px;
    padding: 8px 5px;
  }

  #modal-admin .admin-tab-content {
    display: grid;
    gap: 12px;
  }

  #modal-admin .admin-hero {
    padding: 14px;
    border-radius: 16px;
  }

  #modal-admin .admin-hero-title {
    font-size: 18px;
    line-height: 1.22;
  }

  #modal-admin .admin-hero-subtitle,
  #modal-admin .admin-section-subtitle {
    font-size: 12px;
    line-height: 1.5;
  }

  #modal-admin .admin-card-shell {
    padding: 14px;
    border-radius: 16px;
  }

  #modal-admin .admin-hero {
    padding: 14px 14px 13px;
  }

  #modal-admin .admin-card-head {
    gap: 8px;
    margin-bottom: 10px;
  }

  #modal-admin .admin-overview-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #modal-admin .admin-stat-card {
    min-height: 84px;
    padding: 12px 10px;
    border-radius: 14px;
  }

  #modal-admin .admin-stat-num {
    font-size: 20px;
  }

  #modal-admin .admin-tools,
  #modal-admin .admin-hero-actions,
  #modal-admin .admin-card-head-actions {
    gap: 7px;
  }

  #modal-admin .admin-tools .admin-btn,
  #modal-admin .admin-hero-actions .admin-btn,
  #modal-admin .admin-card-head-actions .admin-btn {
    min-height: 38px;
    border-radius: 12px;
    font-size: 12px;
  }

  #modal-admin .admin-filter-bar {
    gap: 7px;
    flex-wrap: nowrap;
    overflow-x: auto;
    margin: 0 -2px 10px;
    padding: 2px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  #modal-admin .admin-filter-bar::-webkit-scrollbar {
    display: none;
  }

  #modal-admin .admin-filter-btn {
    flex-shrink: 0;
    min-height: 36px;
    padding: 8px 12px;
    scroll-snap-align: start;
  }

  #modal-admin .admin-search-wrap {
    gap: 7px;
    margin-bottom: 10px;
  }

  #modal-admin .admin-search-input,
  #modal-admin .admin-sort-select {
    min-height: 42px;
    border-radius: 12px;
    padding: 10px 12px;
  }

  #modal-admin .admin-panel-item {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    column-gap: 9px;
    row-gap: 8px;
    padding: 12px 0;
  }

  #modal-admin .admin-story-dot {
    grid-column: 1;
    grid-row: 1;
    margin-top: 7px;
  }

  #modal-admin .admin-panel-item-info {
    grid-column: 2;
  }

  #modal-admin .admin-panel-item-title {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    line-height: 1.42;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  #modal-admin .admin-panel-item-actions {
    grid-column: 1 / -1;
    width: 100%;
    flex-wrap: wrap;
    margin-top: 2px;
  }

  #modal-admin .admin-panel-item-actions .admin-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    min-height: 36px;
  }

  #modal-admin .admin-user-item {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    column-gap: 10px;
    row-gap: 6px;
  }

  #modal-admin .admin-user-item .admin-multi-check {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 2px 0 0;
  }

  #modal-admin .admin-user-item .admin-panel-item-info {
    grid-column: 2;
  }

  #modal-admin .admin-user-item .admin-panel-item-meta {
    line-height: 1.45;
  }

  #modal-admin .admin-user-item .admin-panel-item-actions {
    grid-column: 2;
    width: 100%;
    margin-top: 4px;
    align-items: stretch;
  }

  #modal-admin .admin-user-item .admin-panel-item-actions .admin-panel-badge {
    flex: 1 1 100%;
    width: 100%;
    min-height: 34px;
    margin: 0;
    justify-content: center;
    text-align: center;
  }

  #modal-admin .admin-user-item .admin-panel-badge {
    flex: 0 0 auto;
    width: auto;
    min-height: 22px;
    padding: 4px 8px;
    margin: 0;
    font-size: 9px;
    letter-spacing: 0.08em;
    vertical-align: middle;
  }

  #modal-admin .admin-pagination {
    gap: 8px;
    padding-top: 2px;
  }

  #modal-admin .admin-page-btn {
    min-height: 34px;
  }

  #modal-admin .admin-empty {
    padding: 20px 14px;
    border-radius: 14px;
  }
}


/* ── Toast notifikace ── */
.ui-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-12px);
  padding: 14px 22px;
  border-radius: 16px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-width: calc(100vw - 48px);
  width: max-content;
  text-align: center;
  pointer-events: none;
  white-space: pre-wrap;
  background: var(--surface);
  border: 1px solid color-mix(in oklch, var(--border) 74%, white);
  box-shadow: var(--modal-shadow);
}
.ui-toast.ui-toast-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.ui-toast-error   { border-color: oklch(0.712 0.181 22.8 / 0.45); color: var(--danger); }
.ui-toast-success { border-color: oklch(0.898 0.176 154.6 / 0.45); color: var(--green); }

/* ── Outcome validation chips ── */
.chip-block { margin: 14px 0; }
.chip-label { font-weight: 600; font-size: 13px; opacity: .85; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.field .chips { margin-top: 2px; min-height: 32px; }
.chip-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  /* default / mixed */
  background: oklch(0.75 0.06 240 / 0.10);
  color: oklch(0.75 0.06 240);
  border: 1px solid oklch(0.75 0.06 240 / 0.30);
}
.chip-pill[data-polarity="positive"] {
  background: oklch(0.72 0.14 145 / 0.10);
  color: oklch(0.72 0.14 145);
  border-color: oklch(0.72 0.14 145 / 0.30);
}
.chip-pill[data-polarity="negative"] {
  background: oklch(0.712 0.181 22.8 / 0.10);
  color: var(--danger);
  border-color: oklch(0.712 0.181 22.8 / 0.30);
}
.chip-pill:hover { opacity: 0.75; transform: translateY(-1px); }
.chip-pill .x { opacity: .65; font-size: 11px; }
.chip-add { margin-top: 10px; }
.chip-suggest {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}
.chip-suggest .suggest-item{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid oklch(1 0 0 / 0.10);
  background: oklch(1 0 0 / 0.05);
  cursor: pointer;
  font-size: 13px;
}
.chip-suggest .suggest-item:hover{ background: oklch(1 0 0 / 0.08); }

/* ── Draft banner ── */
.draft-banner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 10px 14px; margin-bottom: 16px;
  border-radius: 12px; font-size: 12px;
  background: color-mix(in oklch, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--accent) 30%, transparent);
  color: var(--text);
}
.draft-banner-clear {
  background: none; border: none; cursor: pointer;
  font-size: 11px; color: var(--muted); white-space: nowrap;
  padding: 2px 6px; border-radius: 6px;
  transition: color 0.15s;
}
.draft-banner-clear:hover { color: var(--danger); }

/* Katalog dopadů */
.catalog-section { margin-bottom: 14px; }
.catalog-cat-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 8px;
}
#outcome-catalog { max-height: 260px; overflow-y: auto; padding-right: 4px; }
#outcome-catalog::-webkit-scrollbar { width: 3px; }
#outcome-catalog::-webkit-scrollbar-thumb { background: oklch(1 0 0 / 0.15); border-radius: 99px; }
/* Catalog chips jsou průhledné dokud se nepřidají */
.chip-pill-add {
  opacity: 0.55;
}
.chip-pill-add:hover {
  opacity: 1;
}





/* ── Email verificace ── */
.auth-verify-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1rem;
  gap: 0.75rem;
}
.auth-verify-icon { font-size: 3rem; }
.auth-verify-msg h3 { font-size: 1.25rem; font-weight: 700; margin: 0; }
.auth-verify-msg p { margin: 0; color: var(--text-secondary, #6b7280); font-size: 0.95rem; }
.auth-verify-hint { font-size: 0.85rem !important; }
.auth-verify-msg .btn-primary { margin-top: 0.5rem; }

/* ── Legal modaly ── */
.modal-legal {
  max-width: 640px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-legal-meta {
  font-size: 0.8rem;
  color: var(--text-secondary, #9ca3af);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #374151);
}
.modal-legal-meta a {
  color: var(--accent, #d4a94a);
  text-decoration: none;
}
.modal-legal-body {
  overflow-y: auto;
  flex: 1;
  padding-right: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary, #d1d5db);
}
.modal-legal-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary, #f9fafb);
  margin: 1.25rem 0 0.4rem;
}
.modal-legal-body h3:first-child { margin-top: 0; }
.modal-legal-body p { margin: 0 0 0.5rem; }
.modal-legal-body a { color: var(--accent, #d4a94a); }
.modal-legal-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border, #374151);
  display: flex;
  justify-content: flex-end;
}

/* Follow-up modal */
.fu-note-input {
  margin-top: 16px; width: 100%; min-height: 80px;
  background: var(--field-bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 12px 14px; color: var(--text);
  font-size: 13px; font-family: inherit; resize: vertical;
  transition: border-color 0.2s;
}
.fu-note-input:focus { outline: none; border-color: var(--accent); }
.fu-note-input::placeholder { color: var(--muted); }

#modal-followup .modal {
  background: var(--surface);
  border: 1px solid color-mix(in oklch, var(--border) 74%, white);
  box-shadow: var(--modal-shadow);
  border-radius: 30px;
  padding: 22px 24px 32px;
}
#modal-followup .modal-head {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
#modal-followup .modal-body {
  padding-top: 16px;
}
#modal-followup .modal-foot {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
