:root {
  color-scheme: dark;
  --bg: #090b18;
  --surface: #14172d;
  --surface-hover: #1f2340;
  --ink: #f2f3fa;
  --muted: #a7adc8;
  --line: #2a2e4d;
  --accent: #6d4ff2;
  --accent-hover: #7f64f5;
  --accent-soft: rgb(109 79 242 / .28);
  --accent-text: #b3a4ff;
  --on-accent: #ffffff;
  --gold: #f5b83d;
  --silver: #aeb8d0;
  --bronze: #e0975a;
  --on-medal: #0b0d1c;
  --track: #2a2e4d;
  --plus: #5be5b4;
  --plus-bg: #123a32;
  --minus: #ff8e97;
  --minus-bg: #3f1d2a;
  --font-display: "Inter", "Segoe UI Variable Display", "Segoe UI", sans-serif;
  --font-body: "Inter", "Segoe UI Variable Text", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
  background-color: var(--bg);
  background-image: var(--glow-bg, radial-gradient(900px 500px at 75% -100px, rgb(109 79 242 / .28), transparent 75%));
  color: var(--ink);
  font: 15px/1.45 var(--font-body);
  overflow: hidden;
  user-select: none;
}

h1, h2, h3, p { margin: 0; }

input, select, textarea { font: inherit; color: inherit; }
input, textarea { user-select: text; }

button { font: inherit; color: inherit; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.app {
  display: grid;
  grid-template-columns: 208px 390px minmax(0, 1fr);
  height: 100vh;
}
.app[data-section="full"] { grid-template-columns: 208px minmax(0, 1fr); }
.app[data-section="full"] .board { display: none; }

/* Domov: souhrn všech záložek */

.detail-inner.wide { max-width: 1040px; }

.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.stat-tile {
  display: grid;
  gap: 4px;
  min-height: 84px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
}
.stat-tile:hover { background: var(--surface-hover); }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-value { overflow-wrap: anywhere; font: 800 22px/1.15 var(--font-display); letter-spacing: -.02em; }

.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; align-items: start; }
.home-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.home-card h3 { font: 700 17px var(--font-display); }
.home-card-rows { display: grid; gap: 2px; }
.home-card-link { justify-self: start; min-height: 32px; color: var(--accent-text); }
.home-rank {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
}
.home-rank:hover { background: var(--surface-hover); }
.home-rank .friend-rank { flex: none; }
.home-rank .birthday-name { flex: 1; min-width: 0; font-weight: 600; }
.home-rank-points { font: 700 15px var(--font-display); font-variant-numeric: tabular-nums; }

/* Žebříček */

.ranking-tabs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.ranking-tab {
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--soft, #c3c8de);
  font-weight: 500;
}
.ranking-tab:hover { color: var(--ink); }
.ranking-tab[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }

.rank-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: center; }
.rank-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 18px 12px 20px;
  border: 1px solid #6b7285;
  border-radius: 16px;
  background: linear-gradient(180deg, #3a3f4d, #23262f);
  color: var(--ink);
  text-align: center;
}
.rank-card:hover { filter: brightness(1.1); }
.rank-card.place-1 {
  padding-block: 26px 28px;
  border-color: #d9a32e;
  background: linear-gradient(180deg, #6b5216, #33280f);
  box-shadow: 0 0 28px rgb(245 184 61 / .18);
}
.rank-card.place-3 { border-color: #b5622f; background: linear-gradient(180deg, #5f3522, #2d1c14); }
.rank-card-place { color: var(--soft, #d5d8e6); font: 600 14px var(--font-display); }
.rank-card-avatar { position: relative; display: block; margin-block: 4px; }
.rank-card .avatar.large { box-shadow: 0 0 0 3px rgb(255 255 255 / .22); }
.rank-medal {
  position: absolute;
  right: -2px;
  bottom: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--silver);
  color: var(--on-medal);
}
.place-1 .rank-medal { background: var(--gold); }
.place-3 .rank-medal { background: var(--bronze); }
.rank-medal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linejoin: round; }
.rank-card-name { max-width: 100%; overflow-wrap: anywhere; font: 700 19px/1.2 var(--font-display); }
.rank-card-sub { color: var(--soft, #d5d8e6); font-size: 13px; }
.rank-card-points { font: 800 26px/1.2 var(--font-display); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.rank-card-points small, .rank-row-points small { color: var(--soft, #d5d8e6); font-size: 13px; font-weight: 500; letter-spacing: 0; }
.rank-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; }
.rank-chip {
  padding: 3px 9px;
  border: 1px solid rgb(255 255 255 / .22);
  border-radius: 8px;
  background: rgb(9 11 24 / .45);
  color: var(--soft, #e3e5f2);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.ranking-search { min-height: 44px; }
.rank-list { display: grid; margin: 0; padding: 0; list-style: none; }
.rank-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 8px 6px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.rank-row:hover { background: var(--surface-hover); }
.rank-row-place {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--soft, #c3c8de);
  font-size: 13px;
  font-weight: 700;
}
.rank-row-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.rank-row-points { flex: none; font: 700 17px var(--font-display); font-variant-numeric: tabular-nums; }

/* Kalendář */

.cal-legend { display: flex; gap: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-weekday { padding: 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.cal-cell {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  min-width: 0;
  min-height: 84px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
}
.cal-cell:hover { background: var(--surface-hover); }
.cal-cell[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); }
.cal-number { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-medal);
  font-weight: 800;
}
.cal-chip {
  overflow: hidden;
  padding: 1px 5px;
  border-radius: 5px;
  color: var(--on-medal);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-chip.event { background: var(--accent-text); }
.cal-chip.birthday { background: var(--gold); }
.cal-legend .cal-chip { padding: 2px 8px; font-size: 12px; }
.cal-more { color: var(--muted); font-size: 11px; }

/* Profil */

.profile-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.profile-form { display: flex; flex: 1 1 260px; align-items: flex-end; gap: 8px; }
.profile-form .field { flex: 1; min-width: 0; }

/* Nastavení */

.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.settings-row > div { flex: 1 1 260px; min-width: 0; }
.settings-row .language-select { flex: 0 1 240px; width: auto; }
.settings-row h3 { font: 700 17px var(--font-display); }
.push-kinds { flex: 1 1 100%; display: grid; gap: 8px; }
.push-kinds:empty { display: none; }
.sound-controls { display: grid; gap: 10px; flex: 0 1 300px; min-width: 0; }
.sound-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.sound-toggle input { width: 18px; height: 18px; accent-color: var(--accent); }
.sound-volume { display: grid; gap: 4px; }
.sound-samples { display: flex; flex-wrap: wrap; gap: 8px; }

/* Hlavní navigace: na počítači svislý pruh, na telefonu spodní lišta */

.rail {
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: 0;
  padding: 24px 14px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: var(--rail-bg, rgb(20 23 45 / .7));
}
.rail-links { display: flex; flex: 1; flex-direction: column; gap: 4px; }
#nav-more { display: none; }
.rail-avatar { display: grid; flex: none; place-items: center; width: 28px; height: 28px; }
.rail-avatar .avatar { width: 28px; height: 28px; }
#nav-profile-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-bottom { margin-top: auto; }
.rail-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--soft, #c3c8de);
  font-weight: 500;
  text-align: left;
}
.rail-link svg {
  flex: none;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rail-link:hover { background: var(--surface-hover); color: var(--ink); }
.rail-link[aria-current="page"] { background: var(--accent); color: var(--on-accent); font-weight: 700; }

.crown {
  flex: none;
  width: 38px;
  height: 32px;
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.8;
  stroke-linejoin: round;
}

/* Tlačítka */

.button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 7px 14px;
  font-weight: 600;
  white-space: nowrap;
}
.button:hover { background: var(--surface-hover); }
.button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}
.button.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.button.ghost { background: transparent; border-color: transparent; color: var(--muted); font-weight: 500; }
.button.ghost:hover { background: var(--surface-hover); color: var(--ink); }
.button.danger { color: var(--minus); }
.button.danger-solid { background: var(--minus); border-color: var(--minus); color: var(--surface); }
.button.danger-solid:hover { background: var(--minus); opacity: .88; }

.icon-button {
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.icon-button:hover { background: var(--minus-bg); color: var(--minus); }

/* Žebříček */

.board {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 24px 14px 12px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand h1 { font: italic 800 23px/1.05 var(--font-display); letter-spacing: -.02em; }

.board-brand { display: none; }

.board-head { display: grid; gap: 12px; padding: 0 4px; }
.board-head h2 { font: 800 27px/1.15 var(--font-display); letter-spacing: -.02em; }
.board-head p { margin-top: 2px; color: var(--muted); font-size: 14px; }
.board-head .button { justify-self: start; min-height: 42px; }

.friend-list {
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  list-style: none;
}
.friend-list:empty { display: none; }

/* Narozeniny */

.birthdays {
  flex: none;
  display: grid;
  gap: 2px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.birthdays[hidden] { display: none; }
.birthdays-title { padding: 0 6px 4px; color: var(--ink); font: 700 14px var(--font-body); }

.birthday-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 36px;
  align-items: center;
  padding: 4px 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-size: 14px;
}
.birthday-row:hover { background: var(--surface-hover); }
.birthday-row.today { background: var(--track); font-weight: 600; }
.birthday-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.birthday-when { flex: none; color: var(--muted); }
.birthday-row.today .birthday-when { color: var(--ink); }

.birthday-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px 10px 16px;
  border-radius: 10px;
  background: var(--track);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.birthday-banner .button { flex: none; }
.birthday-banner.done { background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-weight: 500; }

.hero-birthday { margin-top: 2px; color: var(--muted); font-size: 14px; }

.link-button {
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.link-button:hover { color: var(--ink); }

/* Avatary */

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--track);
  color: var(--ink);
  font: 600 15px var(--font-display);
  object-fit: cover;
}
.avatar[hidden] { display: none; }
.avatar.large { width: 88px; height: 88px; font-size: 32px; }
.avatar.small { flex: none; width: 28px; height: 28px; font-size: 11px; }

.avatar-button {
  position: relative;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  overflow: hidden;
}
.avatar-hint {
  position: absolute;
  inset: auto 0 0;
  padding: 2px 0 6px;
  background: rgb(0 0 0 / .6);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  transition: opacity .15s;
}
.avatar-button:hover .avatar-hint,
.avatar-button:focus-visible .avatar-hint { opacity: 1; }

.friend {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0 10px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
}
.friend:hover { background: var(--surface-hover); }
.friend[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }

.friend-rank {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: var(--soft, #c3c8de);
  font: 800 14px var(--font-display);
}
.friend-rank.place-1 { background: var(--gold); color: var(--on-medal); }
.friend-rank.place-2 { background: var(--silver); color: var(--on-medal); }
.friend-rank.place-3 { background: var(--bronze); color: var(--on-medal); }
.friend .avatar { grid-column: 1; grid-row: 1 / span 2; width: 42px; height: 42px; }
.friend-name { grid-column: 2; grid-row: 1; display: flex; gap: 5px; min-width: 0; font-weight: 600; }
.friend-name-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.friend-emojis { flex: 0 1 auto; max-width: 55%; overflow: hidden; white-space: nowrap; }
.friend-tier { grid-column: 2; grid-row: 2; min-width: 0; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.friend-rating {
  grid-column: 3;
  grid-row: 1 / span 2;
  font: 700 17px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
}

.board-footer { display: grid; gap: 6px; margin-top: auto; padding-top: 4px; }
.board-footer .button { width: 100%; }
.nav-button[aria-current="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* Ukazatel ratingu */

.meter { height: 10px; border-radius: 4px; background: var(--track); overflow: hidden; }
.meter-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--accent);
  transition: width .45s cubic-bezier(.2, .8, .2, 1);
}

/* Detail kámoše */

.detail { container-type: inline-size; min-width: 0; overflow-y: auto; padding: 24px 28px 40px; }

.back-button {
  display: none;
  justify-self: start;
  min-height: 44px;
  padding: 0 4px;
  border: 0;
  background: transparent;
  color: var(--accent-text);
  font-weight: 600;
}

/* Přátelé */

.online-card {
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.online-card h3 { font: 700 20px var(--font-display); }
.online-card p { max-width: 60ch; color: var(--muted); }
.account-form { display: grid; gap: 12px; width: min(100%, 420px); }
.account-form .button { justify-self: start; min-height: 44px; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.online-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.online-person { display: flex; align-items: center; gap: 10px; min-height: 48px; }
.online-person .birthday-name { flex: 1; min-width: 0; font-weight: 600; }
.online-person-actions { display: flex; flex: none; align-items: center; gap: 6px; }
.group-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px; }
.group-card {
  display: grid;
  gap: 4px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
}
.group-card:hover { background: var(--surface-hover); }
.group-card-name { font: 800 19px/1.2 var(--font-display); overflow-wrap: anywhere; }
.group-card-next { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 14px; }
.response-tabs { justify-self: start; }
.online-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; width: min(100%, 460px); }
.button:disabled { cursor: not-allowed; opacity: .5; }
/* Ukládá se: tlačítko nezešedne, jen jemně pulzuje, ať je hned vidět, že ťuknutí zabralo. */
[data-busy]:disabled { cursor: progress; opacity: 1; animation: busy-pulse 1s ease-in-out infinite; }
@keyframes busy-pulse { 50% { opacity: .6; } }
@media (prefers-reduced-motion: reduce) { [data-busy]:disabled { animation: none; opacity: .75; } }

/* Achievementy */

.title-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border: 1px solid var(--gold);
  border-radius: 18px;
  background: var(--surface);
}
.title-card-label { color: var(--soft, #c3c8de); font-size: 14px; }
.title-card h3 { font: 800 28px/1.15 var(--font-display); letter-spacing: -.02em; }
.title-card-next { color: var(--soft, #c3c8de); font-size: 14px; }

.detail-inner { display: grid; gap: 26px; max-width: 900px; margin: 0 auto; }

.hero-top { display: flex; align-items: flex-start; gap: 16px; }
.hero-name { flex: 1; min-width: 0; }
.hero h2 {
  overflow-wrap: anywhere;
  font: 800 28px/1.15 var(--font-display);
  letter-spacing: -.02em;
}
.hero-tier { margin-top: 2px; color: var(--muted); }
.hero-progress {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 16px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 14px;
}
.hero-tools { display: flex; flex: none; gap: 6px; }

.score { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 10px; }
.score-value {
  font: 800 64px/1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.score-max { color: var(--muted); font: 500 20px var(--font-display); }

.section-title { margin-bottom: 10px; font: 600 17px var(--font-display); }

.action-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }

.action-list { display: grid; gap: 6px; }

.action {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 12px 7px 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  text-align: left;
}
.action:hover { background: var(--surface-hover); }
.action:active { transform: translateY(1px); }

.points {
  flex: none;
  min-width: 44px;
  padding: 3px 7px;
  border-radius: 6px;
  font: 600 15px/1.3 var(--font-display);
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.points.plus { background: var(--plus-bg); color: var(--plus); }
.points.minus { background: var(--minus-bg); color: var(--minus); }
.points.neutral { background: var(--surface-hover); color: var(--muted); }

.empty-note { color: var(--muted); font-size: 14px; }

.field-input {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.field-input::placeholder { color: var(--muted); }

.custom-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px auto;
  gap: 8px;
}

/* Historie */

.history { display: grid; margin: 0; padding: 0; list-style: none; }

.history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}
.history-main { flex: 1; min-width: 0; }
.history-label { overflow-wrap: anywhere; font-weight: 500; }
.history-meta { color: var(--muted); font-size: 13px; }
.history-after {
  flex: none;
  color: var(--muted);
  font: 500 15px var(--font-display);
  font-variant-numeric: tabular-nums;
}

/* Společné eventy */

.events-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.events-head h2 { font: 800 30px/1.15 var(--font-display); letter-spacing: -.02em; }

.event-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  scroll-margin-top: 8px;
}
.event-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.event-card-title { min-width: 0; }
.event-card-title h3 { font: 600 19px/1.2 var(--font-display); overflow-wrap: anywhere; }
.event-card .photo-strip { margin-top: 0; }

.event-people { display: flex; flex-wrap: wrap; gap: 6px; }
.event-person {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 3px 5px 3px 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
}
.event-person:hover { background: var(--surface-hover); }
.event-person .points { min-width: 34px; padding: 1px 6px; border-radius: 999px; font-size: 14px; }
.event-person-name { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

.shared-link { display: block; margin-top: 10px; }
.history-main .link-button { display: block; margin-top: 1px; font-size: 13px; text-align: left; overflow-wrap: anywhere; }

.event-section { display: grid; gap: 12px; }
.event-section .section-title { margin-bottom: 0; }

.countdown {
  font: 700 34px/1.1 var(--font-display);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.01em;
}
.event-card-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.events-head .hero-tools { flex-wrap: wrap; justify-content: flex-end; }

.planned-row { justify-content: space-between; padding: 9px 12px; }
.planned-row-title { min-width: 0; overflow-wrap: anywhere; }
.planned-row .birthday-when { font-size: 14px; }

.event-fields { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 10px; }
.event-fields.planning { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.event-fields.planning .event-title-field { grid-column: 1 / -1; }
.person-row.invited { grid-template-columns: minmax(0, 1fr) 160px; }
.event-fields .event-wide-field { grid-column: 1 / -1; }
.people-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.people-common { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.people-common .field-input { width: 82px; }
.people-list {
  display: grid;
  gap: 2px;
  max-height: 34vh;
  padding: 2px;
  overflow-y: auto;
}
.person-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px 82px;
  gap: 8px;
  align-items: center;
}
.person-label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 3px 6px;
}
.field-input:disabled { opacity: .45; }

.event-person.away { opacity: .72; }
.person-status { color: var(--muted); font-size: 13px; white-space: nowrap; }

.event-subtitle { margin: 0 0 8px; font: 600 15px var(--font-display); }

.event-comments, .event-vote { padding-top: 12px; border-top: 1px solid var(--line); }
.comment-list { display: grid; gap: 4px; margin: 0 0 8px; padding: 0; list-style: none; }
.comment { display: flex; align-items: flex-start; gap: 8px; }
.comment-main { flex: 1; min-width: 0; }
.comment-meta { color: var(--muted); font-size: 13px; }
.comment-meta strong { color: var(--ink); }
.comment-text { overflow-wrap: anywhere; user-select: text; }
.comment-form { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 8px; }
.event-comments .empty-note { margin-top: 6px; font-size: 13px; }

.vote-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.vote-title { margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.vote-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.vote-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 8px; border-radius: 6px; font-size: 14px; }
.vote-row.winner { background: var(--track); font-weight: 600; }
.vote-count { flex: none; color: var(--muted); }
.vote-row.winner .vote-count { color: var(--ink); }
.vote-ballots { margin-top: 10px; }
.vote-ballots summary { color: var(--muted); font-size: 14px; cursor: pointer; }
.vote-ballots .empty-note { margin: 6px 0; font-size: 13px; }
.ballot-head, .ballot-row {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) minmax(0, 1.2fr) minmax(0, 1.2fr);
  gap: 8px;
  align-items: center;
  margin-top: 4px;
}
.ballot-head { color: var(--muted); font-size: 13px; }
.ballot-voter { min-width: 0; overflow: hidden; font-size: 14px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }

/* Měsíční žebříček */

.month-nav { display: flex; align-items: center; gap: 4px; }
.month-label { min-width: 150px; font: 600 17px var(--font-display); text-align: center; }
.icon-nav {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 20px;
  line-height: 1;
}
.icon-nav:hover:not(:disabled) { background: var(--surface-hover); }
.icon-nav:disabled { cursor: default; opacity: .4; }


.monthly-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.monthly-row {
  display: grid;
  grid-template-columns: 26px 40px minmax(0, 1fr) minmax(90px, 170px) 48px 56px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  text-align: left;
}
.monthly-row:hover { background: var(--surface-hover); }
.monthly-rank { color: var(--muted); font: 500 14px var(--font-display); }
.monthly-name { min-width: 0; overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.monthly-limit { display: grid; gap: 3px; }
.monthly-limit .meter { height: 4px; }
.monthly-limit-text { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.monthly-lost { color: var(--minus); font-size: 14px; font-variant-numeric: tabular-nums; text-align: right; }

/* Achievementy */

.achievement-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; align-items: start; }
.achievement {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.achievement.locked .achievement-icon { filter: grayscale(1); opacity: .55; }
.achievement.locked .achievement-name { color: var(--muted); font-weight: 500; }
.achievement summary {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  list-style: none;
}
.achievement summary::-webkit-details-marker { display: none; }
.achievement summary:hover { background: var(--surface-hover); border-radius: 10px; }
.achievement-icon { flex: none; font-size: 24px; line-height: 1.3; }
.achievement-main { flex: 1; display: grid; gap: 3px; min-width: 0; }
.achievement-kind { color: var(--muted); font-size: 12px; }
.achievement-name { overflow-wrap: anywhere; font-weight: 600; }
.achievement .meter { height: 4px; margin-top: 2px; }
.achievement-next { overflow-wrap: anywhere; color: var(--muted); font-size: 12px; }
.achievement-level { flex: none; color: var(--muted); font: 600 14px var(--font-display); }
.achievement-tiers { display: grid; gap: 2px; margin: 0; padding: 0 12px 10px 46px; list-style: none; font-size: 13px; }
.achievement-tiers li { display: flex; gap: 6px; color: var(--muted); }
.achievement-tiers li.done { color: var(--ink); }
.tier-mark { flex: none; width: 12px; }
.tier-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tier-threshold { flex: none; font-variant-numeric: tabular-nums; }

/* Pod lištou s tlačítkem Vrátit zpět, aby se dalo vrátit i záznam, který achievement přinesl. */
.achievement-popup {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  background: rgb(5 6 16 / .6);
  cursor: pointer;
  animation: popup-fade .2s ease-out;
}
.achievement-popup[hidden] { display: none; }
.achievement-card {
  --glow: var(--gold);
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(440px, 100%);
  padding: 26px 28px 18px;
  border: 1px solid var(--glow);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 0 70px color-mix(in srgb, var(--glow) 40%, transparent), 0 18px 50px rgb(0 0 0 / .5);
  text-align: center;
  overflow-wrap: anywhere;
  animation: popup-in .55s cubic-bezier(.2, 1.5, .4, 1);
}
.achievement-popup.shame .achievement-card { --glow: var(--minus); animation-name: popup-sag; }
.achievement-card-title { color: var(--glow); font: 700 15px var(--font-display); }
.achievement-card-icon { font-size: 72px; line-height: 1.2; }
.achievement-card-name { font: 700 26px/1.2 var(--font-display); }
.achievement-card-who { color: var(--muted); }
.achievement-card-hint { margin-top: 8px; color: var(--muted); font-size: 12px; }
.achievement-card-list { display: grid; gap: 8px; width: 100%; margin: 6px 0 0; padding: 0; list-style: none; text-align: left; }
.achievement-card-list li { display: flex; gap: 10px; font-size: 15px; }
.achievement-card-list li > span:first-child { flex: none; font-size: 20px; line-height: 1.2; }
.confetti-piece {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 9px;
  height: 14px;
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  animation: confetti-burst 1.5s cubic-bezier(.15, .7, .3, 1);
}
@keyframes popup-fade { from { opacity: 0; } }
@keyframes popup-in { from { opacity: 0; transform: scale(.6); } }
@keyframes popup-sag { from { opacity: 0; transform: translateY(-30px) rotate(-2deg); } }
@keyframes confetti-burst {
  from { opacity: 1; transform: translate(0, 0) rotate(0); }
  70% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--x), calc(var(--y) + 60px)) rotate(var(--turn)); }
}
@media (prefers-reduced-motion: reduce) {
  .achievement-popup, .achievement-card { animation: none; }
}

/* Vizitka */

.vizitka {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.vizitka-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 20px;
  margin: 0;
}
.vizitka-item { min-width: 0; }
.vizitka dt { color: var(--muted); font-size: 12px; }
.vizitka dd { margin: 0; overflow-wrap: anywhere; font-weight: 500; user-select: text; }
.vizitka-notes { padding-top: 10px; border-top: 1px solid var(--line); }
.vizitka-notes h4 { margin: 0 0 2px; color: var(--muted); font-size: 12px; font-weight: 400; }
.vizitka-notes p { overflow-wrap: anywhere; white-space: pre-wrap; user-select: text; }

.song-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  padding: 3px 12px 3px 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  font-size: 14px;
}
.song-button:hover { background: var(--surface-hover); }
.spotify-logo { display: block; flex: none; width: 26px; height: 26px; }
.spotify-logo svg { display: block; width: 100%; height: 100%; }

.place-link {
  display: block;
  margin-top: 2px;
  padding: 0;
  border: 0;
  background: transparent;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.place-link:hover { color: var(--accent); }

.friend-wide { grid-column: 1 / -1; }
.notes-input { display: block; min-height: 66px; resize: vertical; }

/* Výřez fotky */

.crop-stage {
  position: relative;
  justify-self: center;
  width: min(100%, 360px, 50vh);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  cursor: grab;
  touch-action: none;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-image {
  position: absolute;
  top: 0;
  left: 0;
  max-width: none;
  opacity: 0;
  transform-origin: 0 0;
  pointer-events: none;
}
.crop-image.ready { opacity: 1; }
.crop-circle {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 1000px rgb(0 0 0 / .6);
  outline: 2px solid rgb(255 255 255 / .9);
  outline-offset: -2px;
  pointer-events: none;
}
.crop-zoom { display: flex; align-items: center; gap: 10px; }
.crop-other { justify-self: start; }

/* Dialog kámoše */

.friend-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.emoji-chosen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-height: 28px; font-weight: 400; }
.emoji-chip {
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-hover);
  font-size: 15px;
}
.emoji-grid { display: flex; flex-wrap: wrap; gap: 2px; font-weight: 400; }
.emoji-choice {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font-size: 18px;
  line-height: 1;
}
.emoji-choice:hover { background: var(--surface-hover); }
.emoji-choice[aria-pressed="true"] { border-color: var(--accent); background: var(--track); }
.emoji-custom-row { display: grid; grid-template-columns: minmax(0, 220px) auto; justify-content: start; gap: 8px; font-weight: 400; }

/* Fotky u záznamů */

.photo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; }

.play-badge {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / .25);
  color: #fff;
  font-size: 20px;
  text-shadow: 0 1px 4px rgb(0 0 0 / .7);
}

.photo-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface-hover);
  overflow: hidden;
}
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-thumb:hover img { opacity: .85; }

.photo-add {
  padding: 2px 8px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.photo-add:hover { background: var(--surface-hover); color: var(--ink); }
.photo-thumb + .photo-add { align-self: stretch; }

.photo-choice { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.photo-status { font-size: 14px; overflow-wrap: anywhere; }

dialog.lightbox {
  width: min(1100px, calc(100vw - 48px));
  max-width: none;
  padding: 12px;
}
.lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 200px;
}
.lightbox-holder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 200px;
}
.lightbox-notice {
  display: grid;
  gap: 12px;
  justify-items: center;
  max-width: 44ch;
  padding: 24px;
  text-align: center;
}
.lightbox-image {
  display: block;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100vh - 130px);
  border-radius: 8px;
  object-fit: contain;
}
.lightbox-nav {
  flex: none;
  width: 40px;
  height: 64px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 32px;
  line-height: 1;
}
.lightbox-nav:hover { background: var(--surface-hover); color: var(--ink); }
.lightbox-nav[hidden] { display: none; }
.lightbox-bar { display: flex; align-items: center; gap: 8px; padding-top: 10px; }
.lightbox-caption { flex: 1; min-width: 0; color: var(--muted); overflow-wrap: anywhere; }

/* Prázdný stav */

.empty {
  display: grid;
  gap: 12px;
  justify-items: center;
  height: 100%;
  align-content: center;
  text-align: center;
}
.empty h2 { font: 600 26px var(--font-display); }
.empty p { color: var(--muted); max-width: 40ch; }

/* Dialogy */

dialog {
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
}
dialog.wide { width: min(620px, calc(100vw - 32px)); }
body.web dialog:not(.lightbox) { overflow-x: hidden; box-sizing: border-box; }
dialog::backdrop { background: rgb(0 0 0 / .45); }

.dialog-form { display: grid; gap: 14px; }
.dialog-form h2 { font: 600 21px var(--font-display); overflow-wrap: anywhere; }
/* Tlačítka zůstávají vidět i v dlouhém dialogu, který se musí posouvat. */
.dialog-buttons {
  position: sticky;
  bottom: -22px;
  z-index: 1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 4px -22px -22px;
  padding: 12px 22px 22px;
  background: var(--surface);
}
.dialog-error { color: var(--minus); font-size: 14px; }
.dialog-text { color: var(--muted); }

.field { display: grid; gap: 5px; font-weight: 600; font-size: 14px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-value { color: var(--muted); font-weight: 500; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.catalog { display: grid; gap: 6px; max-height: 50vh; overflow-y: auto; padding: 2px; }
.catalog-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px 30px;
  gap: 8px;
  align-items: center;
}
.catalog-add { padding-top: 12px; border-top: 1px solid var(--line); }
.catalog-add.catalog-row { grid-template-columns: minmax(0, 1fr) 82px auto; }

/* Oznámení */

.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(640px, calc(100vw - 32px));
  padding: 9px 12px 9px 16px;
  transform: translateX(-50%);
  border-radius: 10px;
  background: var(--ink);
  color: var(--bg);
  box-shadow: 0 6px 24px rgb(0 0 0 / .28);
}
.toast[hidden] { display: none; }
.toast-text { overflow-wrap: anywhere; }
.toast-action {
  flex: none;
  padding: 3px 9px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font-weight: 600;
}

/* Eventy s online přáteli */

.event-cover { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; background: var(--surface-hover); }
.event-cover.missing { display: none; }
.event-photo { position: relative; display: inline-flex; }
.event-photo-remove { position: absolute; top: 2px; right: 2px; }
.event-photo-large { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto; border-radius: 12px; }
.attendance-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; }
.invite-list { display: grid; gap: 6px; max-height: 200px; overflow-y: auto; padding: 4px 2px; font-weight: 400; }
.check-row { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.field[hidden] { display: none; }
.rail-link { position: relative; }
.rail-link[data-badge]::after {
  content: attr(data-badge);
  position: absolute;
  top: 4px;
  right: 8px;
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--gold);
  color: #16120a;
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
  box-sizing: border-box;
}

.guide-list { display: grid; gap: 10px; max-height: 58vh; margin: 0 0 12px; padding: 0 4px 0 0; overflow-y: auto; list-style: none; }
.guide-list li { display: flex; gap: 10px; align-items: flex-start; }
.guide-icon { flex: none; width: 24px; font-size: 18px; text-align: center; }
.guide-text { display: block; color: var(--soft, #c3c8de); font-size: 14px; }

.public-profile-head { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 12px; }
/* Platí všude, kde se fotka profilu vkládá do kolečka. */
.avatar > img { display: block; width: 100%; aspect-ratio: 1; border-radius: inherit; object-fit: cover; }
.person-link { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.person-link:hover { text-decoration: underline; }
.rating-rules summary { cursor: pointer; }
.rating-rules p { margin-top: 6px; }

.archive-note { padding: 10px 14px; border: 1px solid var(--gold); border-radius: 12px; color: var(--ink); }
.group-card.archived { opacity: .75; }

/* Web bez přihlášení */

.app[data-gate] { display: block; height: 100%; }
.app[data-gate] .rail, .app[data-gate] .board { display: none !important; }
.app[data-gate] .detail { display: block !important; height: 100%; padding: 24px 16px; }
.sign-in-gate { display: grid; gap: 16px; justify-items: center; width: min(100%, 460px); margin: 0 auto; padding-top: 4vh; }
.sign-in-gate .online-card { width: 100%; box-sizing: border-box; }
.sign-in-gate .language-select { flex: none; width: min(100%, 240px); }
.gate-brand { font: italic 800 42px/1.1 var(--font-display); letter-spacing: -.03em; }
.gate-brand span { color: var(--gold); }
.gate-tagline { color: var(--soft, #c3c8de); text-align: center; }
.profile-nickname { font: 800 22px var(--font-display); }
body.web .rail { padding-bottom: max(10px, env(safe-area-inset-bottom)); }

/* Web: pět záložek, úvodní obrazovka a první kroky. */
body.web #nav-more { display: none; }
.switch-tabs { align-self: stretch; }
.switch-tabs .ranking-tab { flex: 1; min-height: 40px; }
.group-danger { margin-top: 8px; }
.invite-tools { display: flex; flex-wrap: wrap; gap: 8px; }
dialog .field-input[readonly] { box-sizing: border-box; width: 100%; }

.sign-in-gate.welcome { gap: 14px; justify-items: stretch; padding: 3vh 0 24px; }
.sign-in-gate.welcome .gate-brand, .sign-in-gate.welcome .language-select { justify-self: center; }
.welcome-title { font: 800 34px/1.12 var(--font-display); letter-spacing: -.02em; text-wrap: balance; }
.sign-in-gate.welcome .gate-tagline { text-align: left; font-size: 15px; }
.welcome-invite { padding: 12px 14px; border: 1px solid var(--accent); border-radius: 12px; background: var(--accent-soft); font-weight: 600; }
.welcome-pillars { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.welcome-pillar { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.welcome-pillar strong { display: block; font-size: 15px; }
.welcome-icon { flex: none; width: 24px; height: 24px; color: var(--accent-text); }
.welcome-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.welcome-actions { display: grid; gap: 8px; margin-top: 4px; }
.welcome-actions .button { min-height: 48px; justify-content: center; }

.start-steps { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.start-step { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.start-mark { display: grid; flex: none; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 50%; font-weight: 700; color: var(--muted); }
.start-step.done .start-mark { border-color: var(--plus-bg); background: var(--plus-bg); color: var(--plus); }
.start-step.now .start-mark { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.start-text { display: grid; flex: 1 1 180px; gap: 1px; min-width: 0; }
.start-step.done .start-text strong { color: var(--muted); }
.family-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 6px; border: 0; border-radius: 12px; background: transparent; text-align: left; }
.family-row:hover { background: var(--surface-hover); }

/* Hodnocení, profil člověka, check-in a ocenění. */
.score { font: 800 18px var(--font-display); font-variant-numeric: tabular-nums; white-space: nowrap; }
.score small { font-size: .62em; font-weight: 600; color: var(--muted); }
.score.large { font-size: 30px; }
.home-card { min-width: 0; }
.home-card .hero-tools, .event-vote .hero-tools { flex-wrap: wrap; }
.score-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.score-link { min-height: 40px; padding: 0 8px; border: 0; border-radius: 10px; background: transparent; color: var(--accent-text); font-weight: 600; }
.score-link:hover { background: var(--surface-hover); }
.score-control { display: flex; flex: 1 1 170px; align-items: center; gap: 10px; min-width: 0; }
.score-slider { flex: 1; min-width: 0; min-height: 32px; accent-color: var(--accent); }
.score-field { flex: none; width: 64px; text-align: center; font-weight: 700; }
.rating-rows { display: grid; gap: 8px; }
.rating-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rating-row .birthday-name { flex: 0 1 110px; min-width: 70px; overflow-wrap: anywhere; }
.info-chip { justify-self: start; width: fit-content; padding: 3px 9px; border: 1px solid currentColor; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .03em; }
.info-chip.private { color: #7cb8ff; }
.info-chip.group { color: var(--plus); }
.info-chip.public { color: var(--muted); }
.info-chip.gold { color: var(--gold); }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 5px 11px; border-radius: 99px; background: var(--surface-hover); font-size: 13px; }
.award-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.award-list li { display: grid; gap: 1px; }
.note-text { white-space: pre-wrap; }
.person-head { display: grid; justify-items: center; gap: 6px; text-align: center; }
.person-head h2 { margin: 0; font: 800 24px var(--font-display); overflow-wrap: anywhere; }
.squad-rank { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.squad-rank li.mine { border-radius: 12px; background: var(--surface-hover); }
.squad-rank-row { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 56px; padding: 6px; border: 0; border-radius: 12px; background: transparent; text-align: left; }
.squad-rank-row:hover { background: var(--surface-hover); }
.squad-rank-row .friend-rank { flex: none; width: 24px; }
.wide-button { justify-content: center; width: 100%; min-height: 48px; }
.info-table { display: grid; gap: 8px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; font-size: 13px; color: var(--muted); }
.info-table p { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px; }
.info-table strong { color: var(--ink); }
.stage-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 11px; font-weight: 600; color: var(--muted); }
.stage-bar li { padding-top: 7px; border-top: 4px solid var(--line); overflow-wrap: anywhere; }
.stage-bar li.reached { border-top-color: var(--accent); }
.stage-bar li.now { color: var(--ink); }
.checked-note { color: var(--plus); font-weight: 600; }
.ballot-card { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: 8px; }
.pick-button { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 12px; background: transparent; font-weight: 600; text-align: left; overflow-wrap: anywhere; }
.pick-button:hover { background: var(--surface-hover); }
.pick-button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.award-winner { font: 800 20px var(--font-display); overflow-wrap: anywhere; }
.award-value { color: var(--gold); font-weight: 600; }
.category-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.category-add .field-input { flex: 1 1 140px; min-width: 0; }

/* Kámoši: velké karty a pruh Teď u kámošů */
.presence { font-size: 13px; color: var(--muted); }
.presence.today { color: var(--plus); font-weight: 600; }
.friend-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.friend-card { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 112px; padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); text-align: left; }
.friend-card:hover { background: var(--surface-hover); }
.friend-card > .avatar { flex: none; }
.friend-card-text { display: grid; flex: 1; gap: 3px; min-width: 0; }
.friend-card-text strong { font: 800 18px var(--font-display); overflow-wrap: anywhere; }
.friend-card-rate { flex: none; color: var(--accent-text); font-size: 13px; font-weight: 600; }
.friend-cards.partner-pinned { margin-bottom: 10px; }
.friend-card.partner-pin { border-color: var(--accent-text); }
.friend-card-partner { flex: none; color: var(--accent-text); font-size: 13px; font-weight: 700; white-space: nowrap; }
.now-strip { display: grid; gap: 10px; min-width: 0; }
.now-strip h3 { margin: 0; font-size: 14px; }
.now-strip ul { display: flex; gap: 8px; margin: 0; padding: 2px 2px 8px; overflow-x: auto; list-style: none; }
.now-strip li { flex: none; }
.now-item { display: grid; justify-items: center; gap: 3px; width: 112px; min-height: 148px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); text-align: center; }
.now-item:hover { background: var(--surface-hover); }
.now-item strong { max-width: 100%; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.now-item .empty-note { font-size: 12px; line-height: 1.25; }
.now-photo { position: relative; display: block; width: 72px; height: 72px; }
.now-photo .avatar { width: 72px; height: 72px; }
.now-icon { position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 28px; height: 28px; border: 2px solid var(--surface); border-radius: 50%; background: var(--surface-hover); font-size: 14px; }

/* My Rating: kvíz a zápisy */
.quiz-question { display: grid; gap: 4px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
.quiz-question legend { padding: 0 4px; font-weight: 700; }
.quiz-result { display: grid; gap: 6px; text-align: center; }
.quiz-result strong { font: 800 26px var(--font-display); color: var(--gold); }
.quick-reasons { display: grid; gap: 6px; }
.quick-reason { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 12px; background: transparent; text-align: left; }
.quick-reason:hover { background: var(--surface-hover); }
.quick-reason.plus strong, .rating-history .plus { color: var(--plus); }
.quick-reason.minus strong, .rating-history .minus { color: var(--minus); }
.rating-history { display: grid; gap: 8px; margin: 4px 0 0; padding: 0; list-style: none; }
.rating-history li { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 0 8px; }
.rating-history li .empty-note { grid-column: 2; font-size: 12px; }
.rating-history li.big { padding: 8px; border: 1px solid var(--gold); border-radius: 10px; }
.friend-card-score { flex: none; }

/* Kalendář na Domově */
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.week-day { display: grid; justify-items: center; gap: 2px; min-height: 68px; padding: 6px 2px; border: 1px solid var(--line); border-radius: 12px; background: transparent; }
.week-day:hover { background: var(--surface-hover); }
.week-day.today { border-color: var(--accent); background: var(--accent-soft); }
.week-day-name { font-size: 11px; color: var(--muted); }
.week-day strong { font-size: 17px; }
.week-dots { display: flex; gap: 3px; min-height: 7px; }
.week-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-text); }
.week-dot.birthday { background: var(--gold); }

/* Živější vzhled */
.greeting { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.greeting h2 { margin: 0; font: 800 26px/1.15 var(--font-display); overflow-wrap: anywhere; }
.hero-event { display: block; width: 100%; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: inherit; text-align: left; }
.hero-event:hover { background: var(--surface-hover); }
.hero-event.empty { display: grid; gap: 10px; padding-bottom: 12px; background: var(--surface); }
.hero-event.empty .wide-button { width: calc(100% - 24px); justify-self: center; }
.hero-cover { position: relative; display: flex; align-items: flex-end; box-sizing: border-box; width: 100%; min-height: 200px; overflow: hidden; }
.hero-event.empty .hero-cover { justify-self: stretch; }
.hero-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-cover-text { position: relative; display: grid; gap: 3px; width: 100%; padding: 40px 14px 14px; background: linear-gradient(transparent, rgb(9 11 24 / .78)); color: #fff; }
.hero-cover-text strong { font: 800 26px/1.15 var(--font-display); overflow-wrap: anywhere; }
.hero-count { justify-self: start; padding: 4px 10px; border-radius: 99px; background: rgb(0 0 0 / .55); font-size: 12px; font-weight: 700; }
.hero-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hero-event > .hero-foot { padding: 12px 14px; }
.face-stack { display: inline-flex; }
.face-stack .avatar { width: 32px; height: 32px; margin-left: -8px; border: 2px solid var(--bg); box-sizing: content-box; }
.face-stack .avatar:first-child { margin-left: 0; }
.moments { display: grid; gap: 10px; min-width: 0; }
.moments h3 { margin: 0; font: 800 18px var(--font-display); }
.moments-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.moment { flex: none; width: 112px; height: 112px; padding: 0; overflow: hidden; border: 0; border-radius: 14px; background: var(--surface-hover); }
.moment-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: 6px; padding: 6px 0; }
.podium-item { display: grid; flex: 1 1 0; justify-items: center; gap: 4px; min-width: 0; padding: 4px 2px; border: 0; border-radius: 12px; background: transparent; }
.podium-item:hover { background: var(--surface-hover); }
.podium-item strong { max-width: 100%; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.podium-item .avatar { width: 56px; height: 56px; }
.podium-item.place-1 .avatar { width: 76px; height: 76px; box-shadow: 0 0 0 3px var(--gold); }
.podium-crown { font-size: 20px; line-height: 1; }
.podium-place { font-size: 13px; font-weight: 800; }
.podium-item.place-2 .podium-place { color: var(--silver); }
.podium-item.place-3 .podium-place { color: var(--bronze); }
.collapsible { border: 1px solid var(--line); border-radius: 14px; }
.collapsible > summary { display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 14px; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible > summary::after { content: '›'; font-size: 18px; transition: transform .15s; }
.collapsible[open] > summary::after { transform: rotate(90deg); }
.collapsible-body { display: grid; gap: 10px; padding: 0 12px 12px; }
.friend-cards { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.friend-card { background: var(--surface); }
.friend-card-photo { position: relative; flex: none; display: block; width: 78px; height: 78px; }
.friend-card-photo .avatar { width: 78px; height: 78px; }
.friend-medal { position: absolute; left: -3px; top: -3px; display: grid; place-items: center; width: 26px; height: 26px; border: 2px solid var(--surface); border-radius: 50%; box-sizing: border-box; color: var(--on-medal); font-size: 12px; font-weight: 800; }
.friend-medal.place-1 { background: var(--gold); }
.friend-medal.place-2 { background: var(--silver); }
.friend-medal.place-3 { background: var(--bronze); }
.friend-title { color: var(--gold); font-size: 13px; font-weight: 700; }
.friend-type-row { display: flex; align-items: baseline; gap: 10px; margin: 4px 0 0; overflow-wrap: anywhere; }
.friend-type-row .friend-title { font-size: 15px; }
.friend-card-numbers { display: grid; flex: none; justify-items: end; gap: 2px; }
.friend-trend { font-size: 12px; font-weight: 700; }
.friend-trend.plus { color: var(--plus); }
.friend-trend.minus { color: var(--minus); }
.squad-hero { position: relative; display: flex; align-items: flex-end; min-height: 220px; overflow: hidden; border-radius: 18px; }
.squad-hero h2 { margin: 0; font: 800 30px/1.1 var(--font-display); overflow-wrap: anywhere; }
.squad-photo-button { position: absolute; top: 10px; right: 10px; z-index: 1; min-height: 36px; padding: 0 12px; border: 0; border-radius: 99px; background: rgb(0 0 0 / .55); color: #fff; font-size: 12px; font-weight: 700; }
.squad-actions .hero-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.squad-actions .button { justify-content: center; min-height: 44px; }
.next-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); text-align: left; }
.next-row:hover { background: var(--surface-hover); }
.squad-card { display: block; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; color: inherit; text-align: left; }
.squad-card.archived { opacity: .75; }
.squad-card .hero-cover { min-height: 160px; }
.squad-card .hero-cover-text strong { font-size: 22px; }

/* Výzvy */
.info-chip.danger { color: var(--minus); }
.challenge-stake { color: var(--gold); font-weight: 600; }
.challenge-people { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.challenge-person { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.challenge-person .start-text { justify-items: start; gap: 4px; }
.challenge-card { background: var(--surface); }
.event-section .challenge-card { margin-bottom: 10px; }

/* Úzký detail: stejná pravidla platí pro telefon i pro užší okno na počítači. */

@container (max-width: 560px) {
  .hero-top { flex-wrap: wrap; }
  .hero-name { flex-basis: calc(100% - 104px); }
  .hero-top .hero-tools { flex-basis: 100%; }
  .score-value { font-size: 52px; }
  .action-columns, .vote-columns, .achievement-grid { grid-template-columns: minmax(0, 1fr); }
  .custom-form { grid-template-columns: minmax(0, 1fr) 110px; }
  .custom-form .button { grid-column: 1 / -1; }
  .comment-form { grid-template-columns: minmax(0, 1fr); }
  .events-head, .event-card-head { flex-wrap: wrap; }
  .events-head .hero-tools { justify-content: flex-start; }
  .monthly-row { grid-template-columns: 26px 40px minmax(0, 1fr) auto; }
  .monthly-limit { grid-column: 3 / -1; grid-row: 2; }
  .monthly-lost { display: none; }
  .rank-cards { grid-template-columns: minmax(0, 1fr); }
  .rank-card.place-1 { order: -1; }
  .rank-row .rank-chip { display: none; }
  .cal-grid { gap: 3px; }
  .cal-cell { align-items: center; min-height: 54px; padding: 4px 2px; }
  .cal-cell .cal-chip { width: 7px; height: 7px; padding: 0; border-radius: 50%; color: transparent; font-size: 0; }
}

@media (max-width: 1100px) {
  .app { grid-template-columns: 84px 320px minmax(0, 1fr); }
  .app[data-section="full"] { grid-template-columns: 84px minmax(0, 1fr); }
  .rail { align-items: center; padding: 20px 8px; }
  .brand h1 { display: none; }
  .rail-link { flex-direction: column; justify-content: center; gap: 3px; width: 72px; min-height: 58px; padding: 0; font-size: 10.5px; }
}

/* Telefon: jeden sloupec a navigace dole */

@media (max-width: 760px) {
  .app, .app[data-section="full"] { display: flex; flex-direction: column; height: 100%; }
  .board, .detail { flex: 1; min-height: 0; border-right: 0; }
  .app[data-pane="list"] .detail, .app[data-pane="detail"] .board { display: none; }
  .board { padding: 18px 14px 12px; }
  .detail { padding: 14px 16px 24px; }
  .detail-inner { gap: 20px; }
  .back-button { display: block; }

  .board-brand { display: flex; align-items: center; justify-content: center; gap: 8px; font: italic 800 26px/1.1 var(--font-display); letter-spacing: -.02em; }
  .board-head { grid-template-columns: minmax(0, 1fr); }
  .board-head .button { justify-self: stretch; min-height: 50px; }

  .rail {
    order: 1;
    flex: none;
    display: block;
    padding: 6px 10px 10px;
    border-top: 1px solid var(--line);
    border-right: 0;
    background: var(--surface);
  }
  .brand { display: none; }
  .rail-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .rail-bottom { margin-top: 0; }
  .rail-link { width: 100%; min-height: 54px; font-size: 11px; }
  .rail-link:not(.phone-main) { display: none; }
  #nav-more { display: flex; }
  .rail.more-open .rail-links { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .rail.more-open .rail-link:not(.phone-main) { display: flex; }

  .toast { bottom: 86px; width: calc(100vw - 32px); flex-wrap: wrap; }
  .friend-fields, .event-fields, .event-fields.planning { grid-template-columns: minmax(0, 1fr); }
  .person-row { grid-template-columns: minmax(0, 1fr) 134px 56px; }
  .person-row.invited { grid-template-columns: minmax(0, 1fr) 130px; }
  .ballot-head, .ballot-row { grid-template-columns: minmax(60px, 1fr) minmax(0, 1fr) minmax(0, 1fr); }
  dialog { padding: 18px; }
  dialog.lightbox { width: calc(100vw - 16px); }
}

@media (prefers-reduced-motion: reduce) {
  .meter-fill { transition: none; }
}

/* ---------- Web: teplá paleta C1, tmavý a světlý režim ---------- */

body.web {
  --bg: #14151c;
  --surface: #1e2029;
  --surface-hover: #282a35;
  --ink: #f5f2ea;
  --muted: #aaa69c;
  --soft: #d6d2c8;
  --line: #2e303b;
  --accent: #ff7a45;
  --accent-hover: #ff8c5c;
  --accent-soft: rgb(255 122 69 / .18);
  --accent-text: #ff9a70;
  --on-accent: #1d1209;
  --gold: #ffc94d;
  --silver: #c9cbd3;
  --bronze: #e39a62;
  --on-medal: #14151c;
  --track: #2e303b;
  --plus: #4fd1a5;
  --plus-bg: #133a2f;
  --minus: #ff7b7b;
  --minus-bg: #3d1f22;
  --glow-bg: radial-gradient(900px 500px at 80% -120px, rgb(255 122 69 / .16), transparent 75%);
  --rail-bg: rgb(30 32 41 / .85);
  color-scheme: dark;
}
body.web.theme-light {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-hover: #f3eee6;
  --ink: #1d1b26;
  --muted: #6e6a73;
  --soft: #4a4651;
  --line: #e8e1d6;
  --accent: #e8602c;
  --accent-hover: #d4521f;
  --accent-soft: rgb(232 96 44 / .12);
  --accent-text: #c4501f;
  --on-accent: #ffffff;
  --gold: #d4940a;
  --silver: #8d909a;
  --bronze: #b8692f;
  --on-medal: #ffffff;
  --track: #ece5da;
  --plus: #1f9e74;
  --plus-bg: #def5ec;
  --minus: #d9473f;
  --minus-bg: #fbe5e3;
  --glow-bg: radial-gradient(900px 500px at 80% -120px, rgb(232 96 44 / .10), transparent 75%);
  --rail-bg: rgb(255 255 255 / .9);
  color-scheme: light;
}
body.web.theme-light dialog, body.web.theme-light .field-input { color: var(--ink); }

.brand .logo { width: 34px; height: 34px; flex: none; }
.gate-logo { width: 120px; height: 120px; justify-self: center; }
body.web .gate-brand span { color: var(--accent); }

/* Profil je fotka vpravo nahoře. */
.top-profile {
  position: fixed;
  top: max(10px, env(safe-area-inset-top));
  right: 14px;
  z-index: 20;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 4px 14px rgb(0 0 0 / .25);
}
.top-profile[aria-current="page"], .top-profile:hover { border-color: var(--accent); }
.top-profile #nav-profile-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.top-profile .rail-avatar, .top-profile .avatar { width: 100%; height: 100%; }
.app[data-gate] .top-profile { display: none; }
body.web .detail-inner > :first-child { padding-right: 106px; }

/* Výzvy */
.choice-row { display: flex; flex-wrap: wrap; gap: 6px; }
.choice { min-height: 38px; padding: 0 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--ink); font-weight: 600; }
.choice[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.new-challenge { display: grid; gap: 12px; }
.check-list, .challenge-list, .week-board, .fame-list, .activity-list, .home-squads { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; background: var(--bg); }
.check-item.done .check-text strong { color: var(--muted); text-decoration: line-through; }
.check-mark { flex: none; width: 34px; height: 34px; border: 2px solid var(--accent); border-radius: 50%; background: transparent; color: var(--on-accent); font-size: 18px; font-weight: 800; }
.check-item.done .check-mark { background: var(--plus); border-color: var(--plus); }
.check-mark:disabled { opacity: .45; }
.check-text { display: grid; flex: 1; min-width: 0; gap: 2px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--ink); text-align: left; }
.check-xp { flex: none; color: var(--gold); font-size: 12px; font-weight: 800; }
.challenge-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); text-align: left; }
.challenge-row:hover { background: var(--surface-hover); }
.challenge-row .start-text, .fame-card .start-text { display: grid; flex: 1; min-width: 0; gap: 2px; }
.challenge-head { display: flex; align-items: center; gap: 14px; }
.challenge-head .start-text { display: grid; gap: 4px; min-width: 0; }
.challenge-head h2 { font: 800 24px/1.15 var(--font-display); overflow-wrap: anywhere; }
.challenge-actions { display: grid; gap: 8px; }
.next-step { padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.checkoff-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.checkoff-day { display: grid; place-items: center; aspect-ratio: 1; border: 2px solid var(--line); border-radius: 10px; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; }
.checkoff-day.done { border-color: var(--plus); background: var(--plus-bg); color: var(--plus); }
.checkoff-day.today { border-color: var(--accent); }
.proof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.proof-thumb img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; }
.streak-chip { padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 800; }

/* XP a úrovně */
.xp-card { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, var(--gold) 10%, var(--surface))); }
.xp-level { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.xp-total { color: var(--gold); font: 800 22px var(--font-display); white-space: nowrap; }
.xp-amount { color: var(--gold); font-weight: 800; white-space: nowrap; }
.xp-bar { height: 10px; overflow: hidden; border-radius: 99px; background: var(--track); }
.xp-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); }
.xp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; text-align: center; }
.xp-stats > span { display: grid; gap: 2px; padding: 8px 4px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: 12px; }
.xp-stats strong { color: var(--ink); font-size: 18px; }
.xp-rules { width: 100%; border-collapse: collapse; font-size: 14px; }
.xp-rules td { padding: 6px 4px; border-top: 1px solid var(--line); }
.week-board li { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 10px; }
.week-board li.mine { background: var(--accent-soft); }
.week-board .start-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.score-head select.field-input { width: auto; max-width: 55%; }

/* Síň slávy */
.podium-score { color: var(--gold); font-size: 12px; font-weight: 800; }
.fame-card { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 0; border-radius: 12px; background: var(--bg); color: var(--ink); text-align: left; }
.fame-card:hover { background: var(--surface-hover); }
.fame-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.fame-chip { padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); font-size: 12px; font-weight: 700; }
.fame-chip.shame, .tag.shame { background: var(--minus-bg); color: var(--minus); }
.award-card.shame { border-color: var(--minus); }
.award-list strong.shame, .check-row.shame { color: var(--minus); }

/* Nástěnka */
.wall { display: grid; gap: 12px; }
.post { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.post.pinned { border-color: var(--gold); }
.post-head { display: flex; align-items: center; gap: 10px; }
.post-head .start-text { display: grid; flex: 1; min-width: 0; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; user-select: text; }
.post-photo { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--bg); }
.post-photo.tall { aspect-ratio: 4 / 5; object-fit: cover; }
.post-photo-button { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.post-preview { max-width: 260px; margin-bottom: 8px; }
.poll { display: grid; gap: 6px; }
.poll-option { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 42px; padding: 0 12px; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); text-align: left; }
.poll-option.mine { border-color: var(--accent); }
.poll-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); }
.poll-label, .poll-count { position: relative; font-weight: 600; }
.poll-fields { display: grid; gap: 6px; }
.reaction-bar { display: flex; flex-wrap: wrap; gap: 6px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; min-height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--bg); font-size: 15px; }
.reaction span { color: var(--muted); font-size: 13px; font-weight: 700; }
.reaction.mine { border-color: var(--accent); background: var(--accent-soft); }
.activity { background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.activity-list li { display: flex; gap: 8px; font-size: 14px; }

/* Domov: squady */
.home-squad { display: flex; align-items: center; gap: 12px; width: 100%; padding: 6px; border: 0; border-radius: 12px; background: transparent; color: var(--ink); text-align: left; }
.home-squad:hover { background: var(--surface-hover); }
.home-squad .start-text { display: grid; flex: 1; min-width: 0; }
.home-squad-cover { position: relative; flex: none; width: 56px; height: 56px; overflow: hidden; border-radius: 12px; }
.home-squad-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Upravit profil: kdo co uvidí */
.field-with-see { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 8px; align-items: end; }

/* Přidat na plochu a vzhled */
.install-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: 16px; background: var(--accent-soft); }
.install-banner .logo { width: 44px; height: 44px; flex: none; }
.install-banner .start-text { display: grid; flex: 1 1 180px; gap: 2px; min-width: 0; }
.theme-choice { display: flex; flex-wrap: wrap; gap: 6px; }
body.web .rail { overflow-x: hidden; }
/* Krémové stupně loga by na světlém pozadí zmizely, proto dostane tmavou dlaždici. */
body.web.theme-light .brand .logo, body.web.theme-light .gate-logo, body.web.theme-light .install-banner .logo { padding: 8%; border-radius: 22%; background: #1d1b26; }
.checkoff-days { max-width: 460px; }

/* Opakované eventy a minimum lidí */
.series-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.series-chip { padding: 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.event-card.cancelled { opacity: .75; }
.event-card.cancelled h3 { text-decoration: line-through; }
.cancelled-note { padding: 10px 12px; border-radius: 10px; background: var(--minus-bg); color: var(--minus); font-weight: 700; }
.min-people { padding: 8px 12px; border-radius: 10px; background: var(--accent-soft); font-weight: 700; }
.min-people.enough { background: var(--plus-bg); color: var(--plus); }

/* ---------- Tlačítko + vpravo dole ---------- */
.fab {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 30;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 58px;
  height: 58px;
  padding: 0;
  border: 0;
  border-radius: 99px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 10px 28px rgb(0 0 0 / .35);
}
.fab.labelled { padding: 0 20px 0 16px; }
.fab-plus { font-size: 30px; font-weight: 400; line-height: 1; }
.fab[aria-expanded="true"] { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.fab-menu { position: fixed; inset: 0; z-index: 29; background: rgb(0 0 0 / .55); }
.fab-list { position: absolute; right: 20px; bottom: 96px; width: min(320px, calc(100vw - 40px)); padding: 4px 0; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: 0 12px 40px rgb(0 0 0 / .45); }
.fab-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 0 14px; border: 0; background: transparent; color: var(--ink); text-align: left; }
.fab-item + .fab-item { border-top: 1px solid var(--line); }
.fab-item:hover { background: var(--surface-hover); }
.fab-item .start-text { display: grid; gap: 2px; }
.fab-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: var(--bg); font-size: 19px; }
body.web .detail-inner { padding-bottom: 96px; }
@media (max-width: 760px) {
  .fab { bottom: calc(86px + env(safe-area-inset-bottom)); right: 16px; }
  .fab-list { right: 16px; bottom: calc(156px + env(safe-area-inset-bottom)); }
}

/* ---------- Eventy: nejbližší a kompaktní řádky ---------- */
.event-card.nearest { gap: 12px; }
.nearest-cover { position: relative; display: flex; align-items: flex-end; min-height: 170px; overflow: hidden; padding: 0; border: 0; border-radius: 14px; color: #fff; text-align: left; }
.nearest-cover .hero-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compact-events { display: grid; gap: 8px; }
.compact-event { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }
.compact-event:hover { background: var(--surface-hover); }
.compact-event.cancelled { opacity: .7; }
.compact-event.cancelled strong { text-decoration: line-through; }
.compact-event .start-text { display: grid; flex: 1; gap: 3px; min-width: 0; }
.compact-event .start-text > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact-event .face-stack .avatar { width: 22px; height: 22px; font-size: 10px; }
.date-block { display: grid; flex: none; justify-items: center; width: 48px; padding: 5px 0; border-radius: 12px; background: var(--bg); line-height: 1.1; }
.date-block small { color: var(--muted); font-size: 10px; text-transform: uppercase; }
.date-block strong { font-size: 18px; }
.compact-go { flex: none; min-height: 36px; padding: 0 12px; }
.compact-answer { flex: none; display: inline-flex; gap: 4px; color: var(--plus); font-size: 13px; font-weight: 800; }

/* ---------- Domov ---------- */
.todo-card { border-color: var(--accent); }
.todo-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.todo-head .start-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.todo-head .empty-note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.todo-icon { font-size: 20px; }
.home-calendar .hero-event { margin-top: 4px; }
.news-list { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.news-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 4px; border: 0; border-radius: 10px; background: transparent; color: var(--ink); text-align: left; }
.news-row:hover { background: var(--surface-hover); }
.news-row .start-text { display: grid; gap: 2px; min-width: 0; }
.news-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px; background: var(--bg); font-size: 18px; }
.wall-composer { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); color: var(--muted); font-size: 14px; text-align: left; }

/* ---------- Výzvy: barevný proužek a souboj ---------- */
.challenge-row { border-left: 4px solid var(--line); }
.challenge-row.kind-self { border-left-color: var(--gold); }
.challenge-row.kind-personal { border-left-color: var(--accent); }
.challenge-row.kind-event { border-left-color: var(--plus); }
.challenge-row.kind-duel { border-left-color: var(--minus); }
.duel-list { display: grid; gap: 12px; }
.duel-card { display: grid; gap: 10px; padding: 14px; border: 1px solid color-mix(in srgb, var(--gold) 45%, var(--line)); border-radius: 16px; background: var(--surface); }
.home-card .duel-card { background: var(--bg); }
.duel-head { display: grid; gap: 2px; padding: 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.duel-head strong { font: 800 18px/1.2 var(--font-display); }
.duel-label { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.duel-board { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.duel-board li { display: flex; align-items: center; gap: 10px; }
.duel-board li.mine strong { color: var(--accent-text); }
.duel-board .start-text { display: grid; flex: 1; gap: 4px; min-width: 0; }
.duel-name { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.duel-bar { height: 7px; overflow: hidden; border-radius: 99px; background: var(--track); }
.duel-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--gold)); }

/* ---------- Partner ---------- */
.partner-card { border-color: color-mix(in srgb, #ff6b8a 45%, var(--line)); }
.partner-card.empty { border-style: dashed; }
.partner-head, .couple-header { display: flex; align-items: center; gap: 14px; }
.partner-head .start-text, .couple-header .start-text { display: grid; gap: 2px; min-width: 0; }
.partner-label { color: #ff6b8a; font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.couple-faces { display: flex; flex: none; }
.couple-faces > :last-child { margin-left: -16px; box-shadow: 0 0 0 3px var(--surface); border-radius: 50%; }
.partner-request { display: flex; align-items: center; gap: 10px; }
.partner-request .start-text { flex: 1; }
.anniversary { background: linear-gradient(135deg, var(--surface), color-mix(in srgb, #ff6b8a 14%, var(--surface))); }
.anniversary .start-text { display: grid; flex: 1; gap: 2px; }
.anniversary-heart { font-size: 30px; }
.guest-row { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--bg); }
.guest-row .start-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.guest-note { padding: 8px 12px; border-radius: 10px; background: color-mix(in srgb, #ff6b8a 14%, var(--surface)); font-size: 14px; }
.danger-link { justify-self: start; color: var(--minus); }
.avatar-zoom { padding: 0; border: 0; border-radius: 50%; background: none; cursor: zoom-in; }

/* Na telefonu fotka profilu při scrollování odjede nahoru, ať nepřekrývá obsah. */
.top-profile { transition: transform .2s ease, opacity .2s ease; }
@media (max-width: 760px) {
  body.web.scrolled .top-profile, body.web.scrolled .bell { opacity: 0; transform: translateY(-70px); pointer-events: none; }
}
.empty-start { display: grid; justify-items: center; gap: 10px; padding: 32px 16px; text-align: center; }
.empty-start strong { font: 800 20px var(--font-display); }

/* Kalendář: dnešek má obrys v barvě textu, vybraný den korálový obrys. Události a narozeniny si nechávají své barvy. */
body.web .cal-cell.today { border: 2px solid var(--ink); background: var(--surface); }
body.web .cal-cell.today .cal-number {
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
body.web .cal-cell[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
body.web .week-day.today { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
body.web .week-day.today .week-day-name { color: var(--on-accent); }
body.web .week-dot { background: var(--accent); }
body.web .week-day.today .week-dot { background: var(--on-accent); }
body.web .week-dot.birthday, body.web .cal-chip.birthday { background: var(--gold); color: var(--on-medal); }
body.web .cal-chip.event { background: var(--accent); color: var(--on-accent); }

/* Koruna týdne */
.avatar { position: relative; }
.avatar[data-crown]::after { content: '👑'; position: absolute; top: -.62em; left: 50%; transform: translateX(-50%) rotate(-12deg); font-size: .72em; line-height: 1; }
.avatar.small[data-crown]::after { font-size: 14px; top: -11px; }
.king-card { display: flex; align-items: center; gap: 16px; padding-top: 22px; border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.king-card .start-text { display: grid; gap: 2px; min-width: 0; }
.king-card .start-text strong { font: 800 22px var(--font-display); }
.king-label { color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.king-photo { flex: none; }
.crown-chase { color: var(--accent-text); font-size: 14px; font-weight: 700; }

/* Pivní účet */
.beer-balance { font-weight: 800; }
.beer-balance .plus { color: var(--plus); }
.beer-balance .minus { color: var(--minus); }
.debt-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.debt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 10px; border-radius: 14px; background: var(--bg); }
.debt-row.paid { opacity: .6; }
.debt-row .start-text { display: grid; flex: 1 1 140px; gap: 2px; min-width: 0; }
.beer-count { font-size: 18px; letter-spacing: 2px; }
.debt-actions { display: flex; gap: 6px; }

/* Pondělní shrnutí */
.recap-card { display: grid; gap: 12px; padding: 16px; border-radius: 18px; background: linear-gradient(160deg, #ff7a45, #8a3a1c 60%, #14151c); color: #fff; }
.recap-label { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.recap-king { display: flex; align-items: center; gap: 12px; padding-top: 12px; }
.recap-king small { display: block; font-size: 12px; opacity: .85; }
.recap-king strong { font: 800 24px var(--font-display); }
.recap-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.recap-stats span { display: grid; gap: 2px; padding: 10px 6px; border-radius: 12px; background: rgb(0 0 0 / .25); font-size: 11px; text-align: center; }
.recap-stats strong { font-size: 20px; }
.recap-line { padding: 10px; border-radius: 12px; background: rgb(0 0 0 / .25); }
.recap-card .button { justify-self: start; background: #fff; color: #1d1209; border-color: #fff; }

/* Kozel a animace velkých momentů */
.goat-pop { position: fixed; inset: 0; z-index: 60; display: grid; justify-items: center; align-content: center; gap: 6px; margin: auto; height: max-content; width: min(320px, calc(100vw - 32px)); padding: 18px 16px 16px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 16px 40px rgb(0 0 0 / .45); text-align: center; animation: goatIn .6s cubic-bezier(.2, 1.4, .4, 1) both; }
.goat-pop.shake .goat-art { animation: goatShake .6s .5s ease-in-out 2; }
.goat-art { position: relative; display: grid; place-items: center; width: 110px; height: 100px; }
.goat-face svg { width: 110px; height: 100px; }
.goat-pop.ring .goat-art::before { content: ''; position: absolute; width: 96px; height: 96px; border: 4px solid var(--gold); border-radius: 50%; animation: goatRing 1s ease-out 2; }
.goat-title { font: 800 17px var(--font-display); }
.goat-text { color: var(--muted); font-size: 14px; }
.moment-check { display: grid; place-items: center; width: 86px; height: 86px; border-radius: 50%; background: var(--plus); color: #14151c; font-size: 48px; font-weight: 800; animation: checkPop .45s ease-out both; }
.moment-crown { font-size: 64px; animation: crownFall .8s ease-out both; }
.moment-beer { display: flex; gap: 4px; font-size: 54px; }
.moment-beer span:first-child { animation: clinkLeft .9s ease-in-out both; }
.moment-beer span:last-child { animation: clinkRight .9s ease-in-out both; transform: scaleX(-1); }
.goat-confetti { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
@keyframes goatIn { 0% { transform: translateY(160px) scale(.7); opacity: 0; } 60% { transform: translateY(-10px) scale(1.03); opacity: 1; } 100% { transform: none; } }
@keyframes goatShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 50% { transform: rotate(9deg); } 75% { transform: rotate(-5deg); } }
@keyframes goatRing { from { transform: scale(.5); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
@keyframes checkPop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.2); opacity: 1; } 100% { transform: scale(1); } }
@keyframes crownFall { 0% { transform: translateY(-90px) rotate(-40deg); opacity: 0; } 70% { transform: translateY(6px) rotate(-8deg); opacity: 1; } 100% { transform: rotate(-12deg); } }
@keyframes clinkLeft { 0% { transform: translateX(-40px); } 50% { transform: translateX(6px) rotate(14deg); } 100% { transform: translateX(-10px); } }
@keyframes clinkRight { 0% { transform: translateX(40px) scaleX(-1); } 50% { transform: translateX(-6px) scaleX(-1) rotate(14deg); } 100% { transform: translateX(10px) scaleX(-1); } }
@media (prefers-reduced-motion: reduce) { .goat-pop, .goat-pop * { animation: none !important; } }

/* Tajné odznaky */
.badge-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
.secret-badge { display: grid; justify-items: center; gap: 3px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); text-align: center; opacity: .5; }
.secret-badge.got { opacity: 1; border-color: color-mix(in srgb, var(--gold) 45%, var(--line)); }
.secret-icon { font-size: 28px; }
.secret-badge strong { font-size: 12px; }
.push-bell { font-size: 32px; }

/* Role ve squadu a pozvánky podle přezdívky. */
.button.small { min-height: 36px; padding: 0 12px; font-size: 14px; }
.role-tag { padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; }
.role-tag.owner { background: rgb(245 184 61 / .16); color: var(--gold); }
.role-tag.admin { background: var(--accent-soft); color: var(--accent-text); }
.invite-results { display: grid; gap: 6px; }
.invite-results:empty { display: none; }
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* My Rating: přidat nebo ubrat se volí tlačítkem, do políčka jen číslo. */
.signed-amount { display: grid; gap: 10px; }
.sign-toggle { display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.sign-option { min-height: 48px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.sign-option:disabled { opacity: .35; cursor: not-allowed; }
.sign-option.plus[aria-pressed="true"] { background: var(--plus); color: #0b0d1c; }
.sign-option.minus[aria-pressed="true"] { background: var(--minus); color: #0b0d1c; }
.sign-amount-row { display: flex; align-items: center; gap: 10px; }
.sign-mark { width: 28px; text-align: center; color: var(--muted); font-size: 30px; font-weight: 800; }
.sign-mark.plus { color: var(--plus); }
.sign-mark.minus { color: var(--minus); }
.amount-field { flex: 1; min-width: 0; font-size: 22px; font-weight: 800; }
.amount-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Chování jako aplikace: žádné zvýraznění při ťuknutí, žádné pružení a posun stránky do strany. */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
body { overscroll-behavior: none; }
.detail { overflow-x: hidden; overscroll-behavior-y: contain; }
button, a { -webkit-touch-callout: none; }
/* iPhone přiblíží stránku při ťuknutí do políčka s písmem menším než 16 px. */
@media (pointer: coarse) {
  input, select, textarea { font-size: max(16px, 1em); }
}

/* Výřez fotky squadu a akce: obdélník 16:9 místo kruhu. */
.crop-stage.rect { width: min(100%, 520px); border-radius: 12px; }
.crop-frame { position: absolute; inset: 0; border-radius: 12px; outline: 2px solid rgb(255 255 255 / .9); outline-offset: -2px; pointer-events: none; }
/* Prázdné místo pro fotku: ťuknutím se přidá. */
.cover-pick { position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; padding: 0; border: 2px dashed var(--line); border-radius: 12px; background: var(--surface-hover); color: var(--muted); font: inherit; font-weight: 700; cursor: pointer; }
.cover-pick img, .cover-pick .cover-pick-img { width: 100%; height: 100%; object-fit: cover; }
.cover-pick:has(img) { border-style: solid; }
.event-cover-wrap { position: relative; }
/* Akce bez fotky: barevný pruh s názvem, nadpis pod ním by se opakoval. */
.event-band { position: relative; display: flex; align-items: flex-end; min-height: 120px; padding: 14px; overflow: hidden; border-radius: 12px; color: #fff; }
.event-band strong { font: 800 26px/1.15 var(--font-display); overflow-wrap: anywhere; text-shadow: 0 1px 8px rgb(0 0 0 / .35); }
.event-card.has-band .event-card-title h3 { display: none; }
/* Tlačítko v rohu vypadá malé, ale ťukací plocha je kolem dokola větší (aspoň 44 px). */
.squad-photo-button::after { content: ''; position: absolute; inset: -6px -4px; }

/* Záložky se nezalamují. Když se nevejdou, řada se posune do strany. */
.switch-tabs { overflow-x: auto; scrollbar-width: none; }
.switch-tabs::-webkit-scrollbar { display: none; }
.switch-tabs .ranking-tab { flex: 1 0 auto; padding: 0 11px; white-space: nowrap; }

/* Pruh squadu 16:9: stejný v seznamu i ve squadu. */
.squad-band { aspect-ratio: 16 / 9; min-height: 0; }
.squad-card .squad-band { display: flex; align-items: flex-end; min-height: 0; }
.squad-band .hero-cover-text { padding-top: 34px; }
.squad-band-name { margin: 0; font: 800 28px/1.1 var(--font-display); overflow-wrap: anywhere; }
.squad-card .squad-band-name { font-size: 24px; }
.squad-band-motto { display: block; margin-top: 4px; font-size: 14px; opacity: .92; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.squad-count { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 5px 10px; border-radius: 99px; background: rgb(0 0 0 / .55); color: #fff; font-size: 12px; font-weight: 700; }
.squad-settings .link-button { justify-self: start; color: var(--accent-text); font-weight: 700; }

/* Síň slávy */
.fame-hero { text-align: center; }
.fame-kicker { color: var(--gold); font-size: 12px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.fame-podium { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: end; gap: 6px; padding-top: 6px; }
.fame-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.fame-step-person { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; max-width: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; }
.fame-step-person strong { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.fame-step-title { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 11px; }
.fame-empty-face { display: grid; place-items: center; width: 52px; height: 52px; border: 2px dashed currentColor; border-radius: 50%; font-size: 22px; font-weight: 800; }
.fame-step.place-1 .fame-empty-face { width: 64px; height: 64px; }
.fame-step.place-1 { color: var(--gold); }
.fame-step.place-2 { color: #aeb8d0; }
.fame-step.place-3 { color: #e0975a; }
.fame-step .fame-step-person strong { color: var(--ink); }
.fame-block { display: flex; flex-direction: column; align-items: center; width: 100%; padding-top: 6px; border-radius: 10px 10px 0 0; color: #1d1b26; animation: fame-rise .6s ease-out both; }
.fame-block b { font-size: 22px; font-weight: 900; line-height: 1.1; }
.fame-block small { font-size: 12px; font-weight: 800; }
.place-1 .fame-block { height: 92px; background: linear-gradient(#f5b83d, #7a5300); animation-delay: .1s; }
.place-2 .fame-block { height: 66px; background: linear-gradient(#aeb8d0, #4a5266); }
.place-3 .fame-block { height: 48px; background: linear-gradient(#e0975a, #6b3a14); animation-delay: .2s; }
@keyframes fame-rise { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
@media (prefers-reduced-motion: reduce) { .fame-block { animation: none; } }
.fame-chase { margin: 4px 0 0; padding: 10px 12px; border-radius: 12px; background: rgb(245 184 61 / .12); color: var(--gold); font-size: 13px; font-weight: 700; text-align: left; }
.award-list-rows { display: grid; margin: 0; padding: 0; list-style: none; }
.award-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.award-icon { width: 30px; flex-shrink: 0; font-size: 22px; text-align: center; }
.award-name { color: var(--gold); font-weight: 700; }
.award-row.shame .award-name { color: var(--minus); }
.fame-ranking { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.fame-rank-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 14px; background: var(--bg); color: inherit; font: inherit; text-align: left; }
.fame-place { width: 22px; flex-shrink: 0; color: var(--muted); font-weight: 800; text-align: center; }
.fame-place.place-1 { color: var(--gold); }
.fame-place.place-2 { color: #aeb8d0; }
.fame-place.place-3 { color: #e0975a; }
.fame-delta { font-size: 11px; font-weight: 800; }
.fame-delta.up { color: var(--plus); }
.fame-delta.down { color: var(--minus); }
.fame-wins { color: var(--gold); font-weight: 800; white-space: nowrap; }
.record-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.record-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.record-tile.shame { border-color: rgb(255 142 151 / .35); }
.record-icon { font-size: 22px; }
.record-value { color: var(--gold); font-weight: 800; }
.record-tile.shame .record-value { color: var(--minus); }
.fame-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fame-howto-list { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.fame-howto { display: flex; align-items: center; gap: 10px; min-height: 40px; color: var(--muted); }
.fame-howto.done, .fame-howto.now { color: var(--ink); font-weight: 600; }
.fame-howto-mark { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 50%; background: var(--surface-hover); font-size: 13px; font-weight: 800; }
.fame-howto.done .fame-howto-mark { background: var(--plus); color: #0b0d1c; }
.fame-howto.now .fame-howto-mark { background: var(--accent); color: var(--on-accent); }
.fame-note { text-align: center; }
.celebration { position: relative; overflow: hidden; text-align: center; border-color: rgb(245 184 61 / .45); background: radial-gradient(circle at 50% 0%, rgb(245 184 61 / .22), var(--surface) 70%); }
.celebration.shame { border-color: rgb(255 142 151 / .45); background: radial-gradient(circle at 50% 0%, rgb(255 142 151 / .2), var(--surface) 70%); }
.celebration-kicker { color: var(--gold); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.celebration-face { display: flex; justify-content: center; margin-top: 8px; }
.celebration .hero-tools { justify-content: center; }
.celebration-confetti { position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(circle, #f5b83d 3px, transparent 4px) 8% 18% / 100% 100% no-repeat,
  radial-gradient(circle, #ff7a45 3px, transparent 4px) 22% 8% / 100% 100% no-repeat,
  radial-gradient(circle, #5be5b4 3px, transparent 4px) 78% 12% / 100% 100% no-repeat,
  radial-gradient(circle, #b3a4ff 3px, transparent 4px) 90% 34% / 100% 100% no-repeat,
  radial-gradient(circle, #f5b83d 3px, transparent 4px) 6% 46% / 100% 100% no-repeat; }
.celebration .award-list-rows { text-align: left; }
.fame-step .avatar { width: 50px; height: 50px; font-size: 20px; }
.fame-step.place-1 .avatar { width: 66px; height: 66px; font-size: 26px; }
.celebration-face .avatar { width: 84px; height: 84px; font-size: 32px; }

/* Vlastní pořadí squadů */
.squad-sort-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.squad-sort-list li { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 12px; background: var(--bg); }
.squad-sort-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.squad-sort-list .button.small { min-width: 44px; min-height: 44px; font-size: 18px; }
.squad-sort .link-button { justify-self: start; }

/* Označení @přezdívka */
.mention { display: inline; padding: 0; border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 700; cursor: pointer; }
.mention-box { display: grid; gap: 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); box-shadow: 0 8px 24px rgb(0 0 0 / .3); }
.comment-form .mention-box { grid-column: 1 / -1; }
.mention-option { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; }
.mention-option:hover, .mention-option:focus-visible { background: var(--surface-hover); }
/* Tlačítka v okně příspěvku se na úzkém telefonu zalomí, ať okno nepřeteče. */
dialog .hero-tools { flex-wrap: wrap; }
.mention-box[hidden] { display: none; }

/* Ukázka náhledu odkazu na pozvánku (jak ho ukáže WhatsApp nebo Messenger) */
.link-preview { display: grid; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.link-preview-image { position: relative; display: block; aspect-ratio: 1.91 / 1; overflow: hidden; background: var(--surface-hover); }
.link-preview-image img { display: block; width: 100%; height: 100%; object-fit: cover; }
.link-preview-text { display: grid; gap: 3px; padding: 10px 12px; }
.link-preview-text strong { font-size: 15px; }
.link-preview-text span { color: var(--muted); font-size: 13px; }
.link-preview-text small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }

/* Okno samo drží kurzor (na telefonu), rámeček kolem něj nechceme. */
dialog:focus { outline: none; }

/* Fotky z akce: vlastní sekce v detailu eventu */
.event-photos-section { padding-top: 14px; border-top: 1px solid var(--line); }
.event-photos-section .photo-strip { margin-top: 0; }

/* Fotka squadu jde ťuknutím zvětšit */
.squad-hero.zoomable { cursor: zoom-in; }

/* Zvoneček s novinkami vedle profilu vpravo nahoře */
.bell { position: fixed; top: max(10px, env(safe-area-inset-top)); right: calc(14px + 44px + 8px); z-index: 20; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 2px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: 0 4px 14px rgb(0 0 0 / .25); transition: opacity .2s, transform .2s; }
.bell:hover, .bell:focus-visible { border-color: var(--accent); }
.bell-count { position: absolute; top: -4px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font-size: 12px; font-weight: 800; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.app[data-gate] .bell { display: none; }
.bell-section { display: grid; gap: 8px; margin-bottom: 14px; }
.bell-section h3 { margin: 0; font-size: 15px; }
.news-row.fresh { background: var(--accent-soft); }
.news-row.fresh .start-text > span:first-child { font-weight: 700; }

/* Vlastní Domov */
.home-edit { justify-self: center; margin: 4px auto 0; padding: 9px 16px; border: 1px dashed var(--line); border-radius: 99px; background: none; color: var(--muted); font: inherit; font-size: 14px; }
.home-edit:hover, .home-edit:focus-visible { border-color: var(--accent); color: var(--ink); }
.couple-home { border-color: rgb(255 111 145 / .45); background: linear-gradient(135deg, rgb(255 111 145 / .14), transparent 70%), var(--surface); }
.couple-line { display: grid; gap: 2px; }
.couple-big { font-size: 20px; line-height: 1.25; }
.couple-plan { justify-self: start; }
.home-editor { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.home-editor-item { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--bg); touch-action: pan-y; }
.home-editor-item.off { opacity: .5; }
.home-editor-item.dragging { outline: 2px solid var(--accent); opacity: .9; }
.home-editor-item .start-text { flex: 1; min-width: 0; }
.home-editor-grip { flex: none; width: 28px; text-align: center; color: var(--muted); font-size: 20px; cursor: grab; touch-action: none; user-select: none; }
.home-editor-item.locked .home-editor-grip { cursor: default; font-size: 16px; }
.choice-row.compact .choice { min-height: 28px; padding: 0 10px; font-size: 13px; }
input.switch { appearance: none; flex: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 99px; background: var(--line); cursor: pointer; transition: background .15s; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
input.switch:checked { background: var(--accent); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Redesign 2026-11: herní animace ---------- */
/* Animace hýbou jen s transform a opacity. Nekonečná smí být na obrazovce jediná. */
@keyframes sg-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes sg-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sg-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.sg-in { animation: sg-in .4s ease-out both; }
.sg-fill { transform-origin: 0 50%; animation: sg-fill .9s cubic-bezier(.2, .8, .2, 1) both; }
.sg-blink { animation: sg-blink 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .sg-in, .sg-fill, .sg-blink { animation: none; }
}

/* ---------- Redesign 2026-11: Domov ---------- */
body.web .home-card { border-radius: 22px; }
body.web:not(.theme-light) .home-card { border-color: transparent; }
.home-v2 { gap: 28px; }
.home-v2 .greeting h2 { font-size: 30px; letter-spacing: -.02em; }
.home-v2 h3 { font: 800 20px/26px var(--font-display); }
.home-v2 .home-flat { gap: 12px; padding: 0; border: 0; border-radius: 0; background: none; }
.home-v2 .score-head .link-button { min-height: 32px; color: var(--accent-text); font-weight: 600; white-space: nowrap; }
.home-v2 .home-flat .challenge-row, .home-v2 .home-flat .duel-card { background: var(--surface); }

/* Kroužek úrovně kolem profilové fotky. */
.top-profile.level-ring { padding: 3px; border: 0; background: conic-gradient(var(--accent) 0%, var(--gold) var(--level-share, 0%), var(--track) var(--level-share, 0%) 100%); }
.top-profile.level-ring .rail-avatar, .top-profile.level-ring .avatar { box-sizing: border-box; border: 2px solid var(--bg); border-radius: 50%; overflow: hidden; }

/* Od minula. */
.since { display: grid; gap: 12px; min-width: 0; }
.since-row { display: flex; gap: 10px; margin: 0 -16px; padding: 2px 16px; overflow-x: auto; scrollbar-width: none; }
.since-row::-webkit-scrollbar { display: none; }
.since-person { display: grid; flex: none; justify-items: center; gap: 2px; width: 82px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: center; }
.since-ring { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 4px; border-radius: 50%; background: var(--accent); }
.since-person.lead .since-ring { background: var(--gold); }
.since-person.idle .since-ring { border: 2px dashed var(--muted); box-sizing: border-box; background: none; }
.since-ring .avatar.small { box-sizing: border-box; width: 58px; height: 58px; border: 2px solid var(--bg); font-size: 22px; }
.since-person.idle .since-ring .avatar.small { width: 54px; height: 54px; border: 0; }
.since-person strong { max-width: 100%; overflow: hidden; font-size: 12px; font-weight: 800; line-height: 15px; text-overflow: ellipsis; white-space: nowrap; }
.since-note { max-width: 100%; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.since-person.lead .since-note { color: var(--gold); font-weight: 700; }

/* Týden v kalendáři. */
.home-v2 .week-strip { gap: 6px; }
.home-v2 .week-day { align-content: center; gap: 1px; min-height: 64px; padding: 0; border: 0; border-radius: 20px; color: var(--ink); }
.home-v2 .week-day-name { font-size: 12px; font-weight: 600; }
.home-v2 .week-day strong { font-size: 20px; font-weight: 800; line-height: 24px; }
.home-v2 .week-dots { min-height: 6px; }
.home-v2 .week-dot { width: 6px; height: 6px; background: var(--accent); }
.home-v2 .week-day.today { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px var(--accent-soft); }
.home-v2 .week-day.today .week-day-name { color: inherit; font-weight: 700; }
.home-v2 .week-day.today strong { font-weight: 900; }
.home-v2 .week-day.today .week-dot { background: var(--on-accent); }

/* Vstupenka na nejbližší akci. */
.ticket { position: relative; display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: 26px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.ticket > * { position: relative; }
.ticket > .ticket-blur { position: absolute; top: -15%; left: -15%; width: 130%; height: 130%; object-fit: cover; opacity: .55; filter: blur(34px) saturate(1.3); }
.ticket > .ticket-shade { position: absolute; inset: 0; background: color-mix(in srgb, var(--surface) 62%, transparent); }
.ticket-cover { display: block; height: 132px; }
.ticket-count { position: absolute; bottom: -20px; left: 14px; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--bg); color: var(--gold); font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ticket-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.ticket-body { display: flex; align-items: center; gap: 14px; padding: 30px 16px 16px; }
.ticket-text { display: grid; gap: 4px; min-width: 0; }
.ticket-text strong { font: 900 30px/32px var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.ticket-text span { color: var(--soft, var(--muted)); font-size: 14px; line-height: 19px; }
.ticket-tear { display: block; height: 20px; margin: 0 22px; background: linear-gradient(90deg, var(--line) 50%, transparent 0) 0 50% / 12px 2px repeat-x; }
.ticket-tear::before, .ticket-tear::after { content: ''; position: absolute; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); }
.ticket-tear::before { left: -32px; }
.ticket-tear::after { right: -32px; }
.ticket-foot { display: flex; align-items: center; gap: 12px; padding: 10px 16px 16px; }
.ticket-foot .face-stack .avatar { width: 36px; height: 36px; border-color: var(--surface); font-size: 14px; }
.ticket-going { flex: 1; font-size: 15px; font-weight: 700; }
.ticket-arrow { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent-soft); font-size: 18px; }

.date-tile { display: grid; flex: none; place-items: center; align-content: center; box-sizing: border-box; width: 56px; height: 64px; border: 1px solid var(--line); border-radius: 16px; background: color-mix(in srgb, var(--bg) 72%, transparent); }
.date-tile strong { font-size: 24px; font-weight: 900; line-height: 26px; }
.date-tile-day { color: var(--accent-text); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.date-tile-month { color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.date-tile.small { width: 44px; height: 44px; border-radius: 14px; background: var(--surface); }
.date-tile.small strong { font-size: 16px; line-height: 18px; }
.next-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 2px 4px; border: 0; border-radius: 14px; background: none; color: var(--ink); font: inherit; text-align: left; }
.next-item:hover { background: var(--surface-hover); }
.next-item-name { flex: 1; min-width: 0; overflow: hidden; font-size: 16px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }

/* Série a řetěz dnů. */
.streak-big { display: flex; align-items: flex-end; gap: 8px; }
.streak-flame { font-size: 40px; line-height: 50px; }
.streak-big strong { color: var(--accent); font: 900 60px/54px var(--font-display); letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.streak-big > span:last-child { width: 4.5em; padding-bottom: 5px; color: var(--muted); font-size: 14px; font-weight: 700; line-height: 17px; }
.day-chain { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.chain-day { display: grid; justify-items: center; gap: 4px; }
.chain-mark { display: grid; place-items: center; box-sizing: border-box; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 50%; color: var(--accent-text); font-size: 15px; font-weight: 900; }
.chain-day.done .chain-mark { border: 2px solid var(--accent); background: var(--accent-soft); }
.chain-day.today:not(.done) .chain-mark { border: 2px dashed var(--gold); }
.chain-day.today:not(.done) .chain-mark::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.chain-name { color: var(--muted); font-size: 11px; font-weight: 600; }
.chain-day.today .chain-name { color: var(--gold); font-weight: 800; }
.home-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.home-actions .button { min-height: 48px; border-radius: 16px; font-size: 15px; font-weight: 700; }

/* Dlaždice squadů. */
.squad-tiles { display: flex; gap: 12px; margin: 0 -16px; padding: 2px 16px; overflow-x: auto; list-style: none; scrollbar-width: none; }
.squad-tiles::-webkit-scrollbar { display: none; }
.squad-tile { position: relative; display: flex; flex: none; flex-direction: column; justify-content: space-between; box-sizing: border-box; width: 150px; height: 196px; padding: 14px; overflow: hidden; border: 0; border-radius: 24px; background: var(--surface); color: #fff; font: inherit; text-align: left; }
.squad-tile > * { position: relative; }
.squad-tile > .squad-tile-blur { position: absolute; top: -20%; left: -20%; width: 140%; height: 140%; object-fit: cover; opacity: .7; filter: blur(22px) saturate(1.3); }
.squad-tile > .squad-tile-shade { position: absolute; inset: 0; background: rgb(20 21 30 / .55); }
.squad-tile-photo { display: grid; place-items: center; box-sizing: border-box; width: 72px; height: 72px; overflow: hidden; border: 3px solid #f4f0e8; border-radius: 18px; box-shadow: 0 8px 18px rgb(0 0 0 / .4); font-size: 28px; font-weight: 900; }
.squad-tile-photo img { position: static; width: 100%; height: 100%; object-fit: cover; }
.squad-tile-photo.tilt-0 { transform: rotate(-5deg); }
.squad-tile-photo.tilt-1 { transform: rotate(4deg); }
.squad-tile-photo.tilt-2 { transform: rotate(-3deg); }
.squad-tile-text { display: grid; gap: 3px; }
.squad-tile-text strong { font-size: 16px; font-weight: 800; line-height: 19px; overflow-wrap: anywhere; }
.squad-tile-text span { color: #d6d2c9; font-size: 13px; }

/* GOAT týdne. */
.goat-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; width: 100%; min-height: 72px; padding: 10px 16px 10px 14px; border: 0; border-radius: 22px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.goat-row:hover { background: var(--surface-hover); }
.goat-row .avatar.small, .goat-row .news-icon { width: 44px; height: 44px; border-radius: 50%; font-size: 17px; }
.goat-text { display: grid; gap: 4px; min-width: 0; }
.goat-squad { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.goat-text strong { font-size: 16px; font-weight: 800; line-height: 20px; }
.goat-lead, .goat-place { font-size: 13px; }
.goat-lead { color: var(--gold); }
.goat-place { color: var(--accent-text); }
.goat-bar { display: block; height: 6px; overflow: hidden; border-radius: 3px; background: var(--track); }
.goat-bar span { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.goat-bar span.lead { background: var(--gold); }
.goat-xp { color: var(--gold); font-size: 12px; font-weight: 800; }
.goat-xp strong { font-size: 26px; font-weight: 900; font-variant-numeric: tabular-nums; }

body.web .home-edit { display: flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 20px; border-width: 1.5px; font-size: 15px; font-weight: 600; }
.home-v2 .score-head .link-button { text-decoration: none; }

/* ---------- Redesign 2026-11: Lidé ---------- */
body.web .ranking-tabs.switch-tabs { padding: 5px; border-radius: 20px; }
body.web .switch-tabs .ranking-tab { min-height: 44px; border-radius: 15px; font-size: 16px; font-weight: 600; }
body.web .switch-tabs .ranking-tab[aria-pressed="true"] { font-weight: 800; }
.only-me { display: inline-flex; flex: none; align-items: center; gap: 2px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--soft, var(--muted)); font-size: 13px; font-weight: 600; white-space: nowrap; }
.board-hint { margin: -4px 4px 0; font-size: 13px; }

body.web .friend-cards { gap: 12px; }
body.web .friend-card { position: relative; display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; column-gap: 14px; min-height: 124px; padding: 14px 16px 14px 14px; overflow: hidden; border-radius: 22px; box-sizing: border-box; }
body.web:not(.theme-light) .friend-card { border-color: transparent; }
body.web .friend-card > * { position: relative; }
body.web .friend-card.first { grid-template-columns: 76px minmax(0, 1fr) auto; min-height: 164px; border-radius: 26px; }
body.web .friend-card-photo, body.web .friend-card-photo .avatar { width: 60px; height: 60px; font-size: 26px; }
body.web .friend-card.first .friend-card-photo, body.web .friend-card.first .friend-card-photo .avatar { width: 76px; height: 76px; }
/* Zlatý pruh hodnocení: šířku drží obal, výplň se při prvním zobrazení roztáhne zleva. */
body.web .friend-card > .friend-card-fill { position: absolute; top: 0; bottom: 0; left: 0; }
.friend-card-fill span { display: block; height: 100%; border-right: 2px solid color-mix(in srgb, var(--gold) 60%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 20%, transparent), color-mix(in srgb, var(--gold) 6%, transparent)); }
body.web .friend-card-text { gap: 5px; justify-items: start; }
.friend-card-open { max-width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: 800 17px/22px var(--font-display); text-align: left; overflow-wrap: anywhere; }
.friend-card.first .friend-card-open { font-size: 18px; }
/* Ťuknutí kamkoliv na kartu otevře profil, štítek zůstává nad tím jako vlastní tlačítko. */
.friend-card-open::after { content: ''; position: absolute; inset: 0; }
body.web .friend-card:has(.friend-card-open:hover) { background: var(--surface-hover); }
.friend-title-edit { position: relative; z-index: 1; display: inline; max-width: 100%; min-height: 24px; padding: 0; border: 0; background: none; font: inherit; font-size: 13px; font-weight: 800; line-height: 18px; text-align: left; }
.friend-title-edit:hover, .friend-title-edit:focus-visible { text-decoration: underline; }
.friend-title-pen { flex: none; font-size: 12px; }
.friend-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.friend-tags span { padding: 0 8px; border: 1px solid var(--line); border-radius: 10px; color: var(--soft, var(--muted)); font-size: 12px; line-height: 20px; }
body.web .friend-card-numbers { gap: 4px; }
body.web .friend-card-score { font-size: 28px; font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
body.web .friend-card.first .friend-card-score { font-size: 32px; }
body.web .friend-trend { font-size: 13px; font-weight: 800; }
@media (max-width: 420px) {
  body.web .friend-card.first .friend-card-score, body.web .friend-card-score { font-size: 26px; }
  body.web .friend-card.first { grid-template-columns: 68px minmax(0, 1fr) auto; column-gap: 12px; }
  body.web .friend-card.first .friend-card-photo, body.web .friend-card.first .friend-card-photo .avatar { width: 68px; height: 68px; }
}

/* ---------- Redesign 2026-11: Výzvy ---------- */
@keyframes sg-rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes sg-stamp { 0% { opacity: 0; transform: scale(2.4) rotate(-10deg); } 70% { opacity: 1; transform: scale(.94) rotate(-10deg); } 100% { opacity: 1; transform: scale(1) rotate(-10deg); } }
.sg-rise { transform-origin: 50% 100%; animation: sg-rise .7s cubic-bezier(.2, .8, .2, 1) both; }
.sg-stamp { animation: sg-stamp .5s cubic-bezier(.2, .9, .3, 1.1) both; }
@media (prefers-reduced-motion: reduce) {
  .sg-rise, .sg-stamp { animation: none; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Úroveň a XP: kruh s postupem, tři čísla a řetěz dnů. */
.xp-hero { display: grid; gap: 16px; min-width: 0; }
.xp-hero-top { display: flex; align-items: center; gap: 16px; }
.xp-ring { position: relative; display: grid; flex: none; place-content: center; justify-items: center; width: 140px; height: 140px; color: var(--gold); }
.xp-ring-track { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(var(--gold) var(--share), var(--track) 0); -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px)); mask: radial-gradient(farthest-side, transparent calc(100% - 11px), #000 calc(100% - 10px)); }
.xp-ring strong { font: 900 40px/40px var(--font-display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.xp-ring > span:last-child { font-size: 13px; font-weight: 800; letter-spacing: .1em; }
.xp-hero-text { display: grid; gap: 6px; min-width: 0; }
.xp-hero-text .xp-level { letter-spacing: .12em; }
.xp-hero-text h3 { margin: 0; font: 800 20px/24px var(--font-display); }
.xp-hero .xp-stats { gap: 0; }
.xp-hero .xp-stats > span { gap: 2px; padding: 8px 4px; border-radius: 0; background: none; font-size: 13px; }
.xp-hero .xp-stats > span + span { border-left: 1px solid var(--line); }
.xp-hero .xp-stats strong { font: 900 30px/32px var(--font-display); font-variant-numeric: tabular-nums; }
.xp-hero .xp-stats .streak strong { color: var(--accent); }
.xp-hero .xp-stats .week strong { color: var(--gold); }
.xp-hero .collapsible { border-radius: 16px; background: var(--surface); }
.xp-hero .collapsible > summary { color: var(--ink); font-size: 15px; font-weight: 700; }

/* Pivní účet jako účtenka z hospody. Barvy lístku platí i pro řádky dluhů uvnitř. */
.beer-wrap { --page-bg: var(--bg); padding: 6px 0 2px; }
.beer-ticket { position: relative; display: grid; gap: 12px; padding: 18px 18px 24px; border-radius: 6px 6px 0 0; box-shadow: 0 14px 30px rgb(0 0 0 / .3); color: var(--ink); transform: rotate(-1.2deg); }
.beer-ticket.light { --ink: #1a1208; --muted: #5b5446; --soft: #3b3528; --line: #cfc6b2; --plus: #0e7a55; --minus: #c22f45; --bg: #e7dfce; --surface-hover: #e7dfce; --accent-text: #a8401a; background: #f2ebdd; }
.beer-ticket.dark { --ink: #f4f0e8; --muted: #c9c5bc; --soft: #d6d2c9; --line: #3a3d4e; --plus: #3fd0a2; --minus: #ff8a96; --bg: #14151e; --surface-hover: #282a35; --accent-text: #ff9a70; background: #1d1f2a; }
.beer-ticket::after { content: ''; position: absolute; right: 0; bottom: 0; left: 0; height: 8px; background: linear-gradient(-45deg, var(--page-bg) 4px, transparent 0) 0 100% / 8px 8px repeat-x, linear-gradient(45deg, var(--page-bg) 4px, transparent 0) 0 100% / 8px 8px repeat-x; }
.beer-paper-toggle { position: absolute; top: 2px; right: 2px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; background: none; color: var(--muted); font-size: 18px; }
.beer-head { display: flex; align-items: center; gap: 12px; min-height: 30px; padding-right: 34px; }
.beer-head h3 { flex: 1; margin: 0; font: 900 20px/26px var(--font-display); }
.stamp { flex: none; padding: 3px 8px; border: 2.5px solid var(--plus); border-radius: 4px; color: var(--plus); font-size: 12px; font-weight: 900; letter-spacing: .14em; transform: rotate(-10deg); }
.beer-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.beer-totals > div { display: grid; gap: 4px; padding: 0 14px 10px 0; border-bottom: 1px solid var(--line); }
.beer-totals > div + div { padding: 0 0 10px 14px; border-left: 1.5px dashed var(--line); }
.beer-totals strong { font: 900 36px/36px var(--font-display); font-variant-numeric: tabular-nums; }
.beer-totals strong.plus { color: var(--plus); }
.beer-totals strong.minus { color: var(--minus); }
.beer-totals span { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.beer-clear { margin: 0; font-size: 15px; font-weight: 700; line-height: 20px; }
.beer-ticket .collapsible { border: 0; border-top: 1.5px dashed var(--line); border-bottom: 1.5px dashed var(--line); border-radius: 0; }
.beer-ticket .collapsible > summary { padding: 0; color: var(--ink); font-size: 15px; font-weight: 800; }
.beer-ticket .collapsible-body { padding: 0 0 12px; }
.beer-ticket .empty-note { font-size: 12px; line-height: 17px; }
.beer-ticket .debt-row .empty-note { font-size: 13px; }

/* Týdenní žebříček se stupni vítězů. */
.podium { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; align-items: end; gap: 8px; padding-top: 6px; }
.podium-place { display: grid; justify-items: center; gap: 3px; min-width: 0; text-align: center; }
.podium-place .avatar.small { width: 52px; height: 52px; margin-bottom: 3px; font-size: 20px; }
.podium-place.place-1 .avatar.small { width: 64px; height: 64px; font-size: 24px; }
.podium-place strong { max-width: 100%; overflow: hidden; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.podium-place .xp-amount { font-size: 13px; }
.podium-step { display: grid; align-content: start; justify-items: center; gap: 2px; box-sizing: border-box; width: 100%; margin-top: 4px; padding-top: 8px; border-radius: 14px 14px 0 0; background: var(--track); }
.podium-place.place-1 .podium-step { background: var(--gold); color: var(--on-medal); }
.podium-place.mine:not(.place-1) .podium-step { background: var(--accent); color: var(--on-accent); }
.podium-number { font: 900 24px/26px var(--font-display); }
.podium-me { font-size: 11px; font-weight: 900; letter-spacing: .1em; }
body.web .week-card .week-board li { padding: 8px; border-radius: 14px; }
.beer-ticket .button:not(.primary) { border-color: var(--line); background: transparent; color: var(--ink); }
.beer-ticket .chip { border-color: currentColor; }

/* ---------- Herní momenty: denní odměna a rýpnutí ---------- */
@keyframes sg-boom { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; transform: scale(1.15); } 100% { opacity: 1; transform: scale(1); } }
@keyframes sg-fly { 0% { opacity: 1; transform: translateY(0) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(300px) scale(.3); } }
@keyframes sg-wave { 0%, 100% { transform: rotate(0deg); } 25% { transform: rotate(18deg); } 75% { transform: rotate(-12deg); } }
.sg-boom { animation: sg-boom .5s cubic-bezier(.2, .9, .3, 1.2) .5s both; }
.sg-fly { animation: sg-fly .9s cubic-bezier(.5, 0, .8, .4) both; }
.sg-wave { transform-origin: 70% 80%; animation: sg-wave .6s ease-in-out 2; }
@media (prefers-reduced-motion: reduce) {
  .sg-boom, .sg-fly, .sg-wave { animation: none; }
}

/* Řetěz dnů: druhý stav „jen otevřeno“ a legenda. */
.chain-day.opened .chain-mark, .chain-day.today.opened:not(.done) .chain-mark { border: 0; background: var(--gold); }
.chain-day.today.opened:not(.done) .chain-mark::after { content: none; }
.chain-legend { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; line-height: 16px; }
.chain-legend > span { display: flex; align-items: center; gap: 6px; }
.chain-key { box-sizing: border-box; width: 12px; height: 12px; border-radius: 50%; }
.chain-key.done { border: 2px solid var(--accent); background: var(--accent-soft); }
.chain-key.opened { background: var(--gold); }

/* Karta denní odměny na Domově. */
.daily-card { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; align-items: center; column-gap: 12px; width: 100%; min-height: 72px; padding: 0 14px 0 12px; border: 1.5px solid color-mix(in srgb, var(--gold) 60%, transparent); border-radius: 24px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.daily-card.claimed { border-color: var(--line); }
.daily-card .start-text strong { font-size: 16px; font-weight: 800; line-height: 20px; }
.coin { display: grid; place-items: center; box-sizing: border-box; width: 48px; height: 48px; border: 3px solid color-mix(in srgb, var(--gold) 78%, #000); border-radius: 50%; background: var(--gold); color: var(--on-medal); font-size: 17px; font-weight: 900; }
.daily-card.claimed .coin { border-color: var(--line); background: var(--track); color: var(--muted); }
.daily-cta { display: flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 14px; background: var(--gold); color: var(--on-medal); font-size: 14px; font-weight: 800; }

/* Okno herního momentu. */
dialog.game-sheet { box-sizing: border-box; display: grid; gap: 16px; width: min(420px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); padding: 18px 16px 20px; overflow-y: auto; border: 1px solid var(--line); border-radius: 28px; background: var(--bg); color: var(--ink); }
dialog.game-sheet:not([open]) { display: none; }
dialog.game-sheet::backdrop { background: rgb(0 0 0 / .6); }
.sheet-head { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.sheet-label { flex: 1; padding-left: 44px; color: var(--gold); font-size: 13px; font-weight: 800; letter-spacing: .16em; text-align: center; }
.sheet-close { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--surface); color: var(--ink); font-size: 16px; }
.button.gold { border-color: transparent; background: var(--gold); color: var(--on-medal); font-weight: 900; }
.game-sheet .wide-button { width: 100%; min-height: 56px; border-radius: 18px; font-size: 17px; font-weight: 800; }

.daily-stage { position: relative; display: grid; place-items: center; height: 200px; }
.daily-coin { display: grid; place-content: center; justify-items: center; box-sizing: border-box; width: 150px; height: 150px; border: 8px solid color-mix(in srgb, var(--gold) 78%, #000); border-radius: 50%; background: var(--gold); box-shadow: 0 18px 50px color-mix(in srgb, var(--gold) 35%, transparent); color: var(--on-medal); }
.daily-coin strong { font: 900 56px/54px var(--font-display); letter-spacing: -.04em; }
.daily-coin span { font-size: 17px; font-weight: 900; letter-spacing: .1em; }
.daily-fly { position: absolute; top: 78px; left: 50%; box-sizing: border-box; width: 44px; height: 44px; margin-left: -22px; border: 3px solid color-mix(in srgb, var(--gold) 78%, #000); border-radius: 50%; background: var(--gold); pointer-events: none; }
.daily-stamp { position: absolute; bottom: 4px; left: 50%; width: 148px; margin-left: -74px; padding: 5px 0; background: var(--bg); font-size: 13px; text-align: center; }
.daily-text { display: grid; gap: 6px; text-align: center; }
.daily-text h2 { margin: 0; font: 900 28px/34px var(--font-display); letter-spacing: -.02em; }
.daily-text p { margin: 0; color: var(--soft, var(--muted)); font-size: 15px; line-height: 21px; }
.daily-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.daily-day { display: grid; justify-items: center; gap: 6px; }
.daily-day-mark { display: grid; place-items: center; box-sizing: border-box; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--soft, var(--muted)); font-size: 13px; font-weight: 700; }
.daily-day.today .daily-day-mark { border: 2px dashed var(--gold); color: var(--gold); font-weight: 900; }
.daily-day.claimed .daily-day-mark { border: 0; background: var(--gold); color: var(--on-medal); font-size: 16px; font-weight: 900; }
.daily-day.missed .daily-day-mark { opacity: .45; }
.daily-day.bonus:not(.claimed) .daily-day-mark { border: 2px solid var(--gold); border-radius: 14px; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); font-weight: 900; }
.daily-day-name { color: var(--muted); font-size: 11px; font-weight: 600; line-height: 14px; }
.daily-day.today .daily-day-name, .daily-day.bonus .daily-day-name { color: var(--gold); font-weight: 800; }
.daily-level { display: grid; gap: 10px; padding: 14px 16px; border-radius: 20px; background: var(--surface); }
.daily-level strong { color: var(--ink); font-size: 17px; font-weight: 900; }
.daily-note { margin: 0; font-size: 13px; line-height: 19px; text-align: center; }

/* Rýpnutí. */
.poke-sheet .sheet-head h2 { margin: 0; font: 800 20px/26px var(--font-display); }
.poke-who .avatar.small { width: 48px; height: 48px; font-size: 18px; }
.poke-lines { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.poke-lines .choice { min-height: 48px; border-radius: 16px; font-size: 15px; }
.poke-done { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 56px; }
.poke-wave { font-size: 26px; line-height: 1; }
.poke-done .stamp { font-size: 15px; }
.poke-button { flex: none; min-height: 36px; padding: 0 12px; border-radius: 12px; font-size: 13px; }
/* ---------- Redesign 2026-11: Squad ---------- */
@keyframes sg-drop { 0% { opacity: 0; transform: translateY(-24px) rotate(-24deg); } 60% { opacity: 1; transform: translateY(3px) rotate(4deg); } 100% { opacity: 1; transform: translateY(0) rotate(-8deg); } }
.sg-drop { animation: sg-drop .8s cubic-bezier(.2, .9, .3, 1.2) .3s both; }
@media (prefers-reduced-motion: reduce) {
  .sg-drop { animation: none; }
}
body.web .squad-hero, body.web .squad-card .hero-cover { border-radius: 26px; }
body.web .squad-actions { display: flex; align-items: center; gap: 12px; min-height: 44px; }
body.web .squad-actions .face-stack .avatar { width: 36px; height: 36px; font-size: 14px; }
.squad-members-count { flex: 1; color: var(--soft, var(--muted)); font-size: 15px; font-weight: 600; }
body.web .squad-actions .hero-tools { display: flex; flex: none; }
.button.invite-pill { min-height: 44px; padding: 0 18px 0 14px; border: 1.5px solid var(--accent); border-radius: 22px; background: var(--accent-soft); color: var(--accent-text); font-size: 15px; font-weight: 800; }
body.web .next-row { gap: 14px; min-height: 68px; padding: 10px 14px 10px 12px; border-radius: 20px; }
body.web:not(.theme-light) .next-row { border-color: transparent; }
body.web .next-row .start-text { padding-left: 14px; border-left: 2px dashed var(--line); }
body.web .next-row .start-text strong { font-size: 17px; font-weight: 800; line-height: 22px; }
body.web .next-row .date-tile.small { background: var(--bg); }

/* Král týdne. Paprsky stojí, koruna dosedne jen při prvním zobrazení. */
.king-card { position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 18px 20px; overflow: hidden; border: 1.5px solid color-mix(in srgb, var(--gold) 60%, transparent); border-radius: 28px; background: var(--surface); }
.king-card > * { position: relative; }
.king-card > .king-rays { position: absolute; top: 50%; left: -80px; width: 300px; height: 300px; margin-top: -150px; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--gold) 16%, transparent) 0deg 10deg, transparent 10deg 20deg); -webkit-mask: radial-gradient(circle, #000 50px, transparent 150px); mask: radial-gradient(circle, #000 50px, transparent 150px); }
.king-photo { position: relative; flex: none; width: 104px; height: 104px; }
.king-photo .avatar.large { box-sizing: border-box; width: 104px; height: 104px; border: 3px solid var(--gold); }
.king-crown { position: absolute; top: -24px; left: 50%; margin-left: -20px; font-size: 40px; line-height: 1; transform: rotate(-8deg); }
.king-card .start-text { gap: 3px; }
.king-card .start-text strong { font: 900 26px/30px var(--font-display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.king-label { font-size: 12px; letter-spacing: .12em; }
.king-squad { overflow: hidden; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.king-xp { color: var(--soft, var(--muted)); font-size: 14px; }
.king-xp b { color: var(--gold); font-weight: 900; }
.king-week { display: flex; gap: 4px; margin-top: 6px; }
.king-week span { width: 20px; height: 5px; border-radius: 3px; background: var(--track); }
.king-week span.on { background: var(--gold); }

/* Záložky s podtržením. */
body.web .ranking-tabs.switch-tabs.line-tabs { gap: 22px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; }
body.web .switch-tabs.line-tabs .ranking-tab { flex: none; min-height: 44px; padding: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; color: var(--muted); font-size: 15px; }
body.web .switch-tabs.line-tabs .ranking-tab[aria-pressed="true"] { border-bottom-color: var(--accent); background: none; color: var(--ink); }

/* Shrnutí týdne. */
.recap-card { gap: 16px; padding: 20px; border-radius: 28px; background: #ff7a45 repeating-linear-gradient(135deg, rgb(26 18 8 / .07) 0 10px, transparent 10px 20px); color: #1a1208; }
.recap-label { font-size: 11px; letter-spacing: .08em; }
.recap-stats { gap: 0; }
.recap-stats span { justify-items: start; padding: 0 0 0 14px; border-radius: 0; background: none; font-size: 12px; font-weight: 700; text-align: left; }
.recap-stats span:first-child { padding-left: 0; }
.recap-stats span + span { border-left: 1.5px solid rgb(26 18 8 / .3); }
.recap-stats strong { font: 900 30px/32px var(--font-display); font-variant-numeric: tabular-nums; }
.recap-king { display: grid; gap: 6px; padding: 0; }
.recap-king small { font-size: 13px; font-weight: 700; opacity: 1; }
.recap-king > span { display: flex; align-items: center; gap: 10px; }
.recap-king .avatar.small { box-sizing: border-box; width: 40px; height: 40px; border: 2px solid #1a1208; font-size: 15px; }
.recap-king strong { font: 900 26px/30px var(--font-display); letter-spacing: -.02em; }
.recap-line { margin: 0; background: rgb(26 18 8 / .12); }
.recap-card .button { min-height: 48px; padding: 0 20px; border-color: #14151e; border-radius: 16px; background: #14151e; color: #f4f0e8; font-size: 16px; font-weight: 800; }
@media (max-width: 420px) {
  .king-card { gap: 12px; padding-inline: 14px; }
  .king-photo, .king-photo .avatar.large { width: 88px; height: 88px; }
  .king-card .start-text strong { font-size: 20px; line-height: 24px; }
}
/* ---------- Redesign 2026-11: Eventy ---------- */
body.web .event-card.nearest { gap: 14px; padding: 0 0 16px; overflow: hidden; border-radius: 26px; }
body.web:not(.theme-light) .event-card.nearest { border-color: transparent; }
body.web .event-card.nearest > :not(.nearest-cover) { margin-inline: 16px; }
body.web .nearest-cover { display: block; width: 100%; min-height: 0; height: 150px; border-radius: 0; }
.nearest-cover .ticket-count { bottom: 12px; }
.nearest .ticket-body { padding: 0; }
.rsvp-stamp { position: absolute; top: 14px; right: 14px; padding: 5px 10px; border-width: 3px; background: color-mix(in srgb, var(--bg) 82%, transparent); font-size: 14px; }
.rsvp-stamp.no { border-color: var(--minus); color: var(--minus); }
body.web .response-tabs { padding: 5px; border-radius: 20px; }
body.web .response-tabs .ranking-tab { min-height: 48px; border-radius: 15px; font-size: 16px; font-weight: 700; }
.month-head { margin: 10px 4px 0; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
body.web .compact-event { gap: 12px; min-height: 68px; padding: 10px 12px; border-radius: 20px; }
body.web:not(.theme-light) .compact-event { border-color: transparent; }
body.web .compact-event .date-tile.small { background: var(--bg); }
body.web .compact-event .start-text > strong { font-size: 16px; font-weight: 800; }
body.web .compact-go { min-height: 40px; padding: 0 14px; border-radius: 14px; font-weight: 800; }
body.web .response-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* ---------- Herní momenty: level up, předběhnutí, finále, korunovace, VS ---------- */
@keyframes sg-xp-pop { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(46px) scale(1.2); } }
@keyframes sg-swap-up { 0% { transform: translateY(64px); } 70% { transform: translateY(-4px); } 100% { transform: translateY(0); } }
@keyframes sg-swap-down { 0% { transform: translateY(-64px); } 70% { transform: translateY(4px); } 100% { transform: translateY(0); } }
@keyframes sg-slide-left { 0% { opacity: 0; transform: translateX(-140px); } 70% { opacity: 1; transform: translateX(8px); } 100% { opacity: 1; transform: translateX(0); } }
@keyframes sg-slide-right { 0% { opacity: 0; transform: translateX(140px); } 70% { opacity: 1; transform: translateX(-8px); } 100% { opacity: 1; transform: translateX(0); } }
.sg-xp-pop { animation: sg-xp-pop 1.1s ease-out both; }
.sg-boom-now { animation: sg-boom .7s cubic-bezier(.2, .9, .3, 1.2) both; }
.sg-swap-up { animation: sg-swap-up .7s cubic-bezier(.2, .8, .2, 1) .3s both; }
.sg-swap-down { animation: sg-swap-down .7s cubic-bezier(.2, .8, .2, 1) .3s both; }
.sg-slide-left { animation: sg-slide-left .6s cubic-bezier(.2, .8, .2, 1) both; }
.sg-slide-right { animation: sg-slide-right .6s cubic-bezier(.2, .8, .2, 1) both; }
.sg-stamp.sg-late { animation-delay: .9s; }
@media (prefers-reduced-motion: reduce) {
  .sg-xp-pop, .sg-boom-now, .sg-swap-up, .sg-swap-down, .sg-slide-left, .sg-slide-right { animation: none; }
}
.xp-pop { position: fixed; top: calc(max(10px, env(safe-area-inset-top)) + 48px); right: 14px; z-index: 30; padding: 4px 12px; border-radius: 99px; background: var(--gold); color: var(--on-medal); font-size: 14px; font-weight: 900; pointer-events: none; }
dialog.game-sheet { justify-items: center; }
dialog.game-sheet > * { justify-self: stretch; }
.game-sheet .sheet-confetti { position: absolute; inset: 40% 50% auto; height: 0; justify-self: auto; }
.game-sheet .xp-level, .game-sheet .king-label { justify-self: center; text-align: center; }

.level-sheet, .crown-sheet, .overtake-sheet, .finale-sheet, .duel-sheet { text-align: center; }
.level-title { margin: 0; color: var(--gold); font: 900 56px/60px var(--font-display); letter-spacing: -.04em; }
.level-photo, .crown-photo { position: relative; justify-self: center !important; width: 150px; height: 150px; margin: 6px 0 14px; }
.level-photo .avatar.large, .crown-photo .avatar.large { box-sizing: border-box; width: 150px; height: 150px; border: 5px solid var(--gold); font-size: 54px; }
.level-badge { position: absolute; bottom: -18px; left: 50%; display: grid; place-items: center; box-sizing: border-box; width: 52px; height: 52px; margin-left: -26px; border: 4px solid var(--bg); border-radius: 50%; background: var(--gold); color: var(--on-medal); font-size: 24px; font-weight: 900; }
.level-name { font: 900 40px/46px var(--font-display); letter-spacing: -.03em; overflow-wrap: anywhere; }
.level-step { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; color: var(--gold); font-weight: 900; }
.level-old, .level-new { display: flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: 17px; font-size: 13px; }
.level-old { border: 1px solid var(--line); color: var(--muted); font-weight: 600; text-decoration: line-through; }
.level-new { background: var(--gold); color: var(--on-medal); }

.crown-photo .king-rays { position: absolute; top: 50%; left: 50%; width: 320px; height: 320px; margin: -160px 0 0 -160px; border-radius: 50%; background: repeating-conic-gradient(color-mix(in srgb, var(--gold) 16%, transparent) 0deg 10deg, transparent 10deg 20deg); -webkit-mask: radial-gradient(circle, #000 70px, transparent 160px); mask: radial-gradient(circle, #000 70px, transparent 160px); }
.crown-photo .avatar.large { position: relative; }
.crown-photo .king-crown { top: -34px; margin-left: -28px; font-size: 56px; }
.crown-sheet .king-xp, .crown-where { margin: 0; }

.overtake-title { margin: 0; font: 900 48px/54px var(--font-display); letter-spacing: -.03em; }
.overtake-where { margin: 0; }
.overtake-rows { display: grid; gap: 10px; text-align: left; }
.overtake-row { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 14px; border-radius: 20px; background: var(--surface); }
.overtake-row.mine { border: 1.5px solid var(--gold); }
.overtake-row .avatar.small { width: 40px; height: 40px; font-size: 15px; }

.finale-squad { margin: 0; font-size: 18px; font-weight: 800; }
.finale-clock { display: flex; align-items: center; justify-content: center; gap: 10px; }
.finale-time { color: var(--gold); font: 900 34px/40px var(--font-display); font-variant-numeric: tabular-nums; }
.finale-until { margin: -8px 0 0; }
.finale-bars { display: grid; gap: 10px; text-align: left; }
.finale-bar { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.finale-bar .avatar.small { width: 36px; height: 36px; font-size: 14px; }
.finale-track { height: 12px; overflow: hidden; border-radius: 6px; background: var(--track); }
.finale-track span { display: block; height: 100%; border-radius: 6px; background: var(--gold); }
.finale-bar.mine .finale-track span { background: var(--accent); }
.finale-bar strong { font-size: 14px; font-weight: 900; white-space: nowrap; }

.duel-stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; padding: 26px 12px 40px; overflow: hidden; border-radius: 28px; background: linear-gradient(105deg, color-mix(in srgb, var(--accent) 42%, var(--surface)) 0 50%, var(--surface) 50%); }
.duel-side { display: grid; justify-items: center; gap: 6px; min-width: 0; }
.duel-side .avatar.large { box-sizing: border-box; width: 96px; height: 96px; border: 4px solid var(--ink); font-size: 34px; }
.duel-side.me .avatar.large { border-color: var(--accent); }
.duel-side strong { max-width: 100%; overflow: hidden; font-size: 16px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.duel-side span:last-child { color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .1em; }
.duel-vs { display: grid; place-items: center; box-sizing: border-box; width: 64px; height: 64px; border: 3px solid var(--gold); border-radius: 50%; background: var(--bg); color: var(--gold); font-size: 26px; font-weight: 900; letter-spacing: -.04em; }
.duel-stamp { position: absolute; bottom: 8px; left: 50%; width: 140px; margin-left: -70px; padding: 5px 0; border-width: 3px; background: var(--bg); font-size: 14px; text-align: center; }
.duel-what { margin: 0; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.duel-wait { font-size: 17px; }
/* ---------- Reakce a společný cíl squadu ---------- */
@keyframes sg-up { 0% { opacity: 0; transform: translateY(0) scale(.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) scale(1.3); } }
.sg-up { animation: sg-up .9s ease-out both; }
@media (prefers-reduced-motion: reduce) {
  .sg-up { animation: none; }
}
.since .score-head .link-button { min-height: 32px; color: var(--accent-text); font-weight: 600; text-decoration: none; white-space: nowrap; }
dialog.since-sheet { text-align: left; }
.since-sheet .sheet-head h2 { flex: 1; margin: 0; font: 800 26px/32px var(--font-display); letter-spacing: -.02em; }
.since-got { margin: 0; padding: 10px 14px; border-radius: 16px; background: var(--surface); font-size: 14px; font-weight: 700; }
.since-cards { display: grid; gap: 10px; }
.since-card { display: grid; gap: 10px; padding: 14px; border-radius: 22px; background: var(--surface); }
.since-card-who { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; }
.since-card .since-ring { flex: none; width: 48px; height: 48px; margin: 0; }
.since-card .since-ring .avatar.small { width: 44px; height: 44px; font-size: 17px; }
.since-card.lead .since-ring { background: var(--gold); }
.since-card.idle .since-ring { border: 2px dashed var(--muted); box-sizing: border-box; background: none; }
.since-card.idle .since-ring .avatar.small { width: 40px; height: 40px; border: 0; }
.since-card .start-text strong { font-size: 15px; font-weight: 900; }
.since-card .since-note { font-size: 13px; line-height: 17px; white-space: normal; }
.since-card.lead .since-note { color: var(--gold); font-weight: 700; }
.reaction-row { display: flex; gap: 8px; }
.reaction { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 52px; height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 22px; background: transparent; color: var(--ink); font: inherit; font-size: 20px; line-height: 1; }
.reaction b { font-size: 15px; font-weight: 900; }
.reaction[aria-pressed="true"] { border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.reaction-fly { position: fixed; z-index: 5; font-size: 22px; line-height: 1; pointer-events: none; }

.goal-card { display: grid; gap: 10px; padding: 16px 18px; border-radius: 24px; background: var(--surface); }
.goal-card h3 { margin: 0; font: 800 17px/24px var(--font-display); }
.goal-card .xp-amount { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.goal-bar { height: 10px; overflow: hidden; border-radius: 5px; background: var(--track); }
.goal-bar span { display: block; min-width: 14px; height: 100%; border-radius: 5px; background: var(--gold); }
.goal-card.done { border: 1.5px solid color-mix(in srgb, var(--gold) 60%, transparent); }
/* Denní odměna: mince se při vyzvednutí dvakrát otočí. */
@keyframes sg-flip { 0% { transform: perspective(600px) rotateY(0deg) scale(1); } 45% { transform: perspective(600px) rotateY(400deg) scale(1.18); } 100% { transform: perspective(600px) rotateY(720deg) scale(1); } }
.sg-flip { animation: sg-flip 1s cubic-bezier(.3, .7, .3, 1) both; }
@media (prefers-reduced-motion: reduce) {
  .sg-flip { animation: none; }
}
/* Příchozí výzva: vyzyvatel vlevo na korálové straně. */
.duel-stage.incoming .duel-side.me .avatar.large { border-color: var(--accent); }
.sheet-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sheet-row .button { justify-content: center; min-height: 48px; border-radius: 16px; }

/* ---------- Formuláře výzvy a eventu ---------- */
dialog.wide { width: min(680px, calc(100vw - 16px)); }
.form-v2 { display: grid; gap: 22px; min-width: 0; }
.form-section { display: grid; gap: 10px; min-width: 0; }
.form-label { margin: 0; color: var(--muted); font: 800 12px/16px var(--font-body); letter-spacing: .12em; text-transform: uppercase; }
.form-note { margin: 0; color: var(--muted); font-size: 13px; line-height: 18px; text-align: center; }
.field-input.big-input { min-height: 56px; padding: 0 16px; border: 1.5px solid var(--accent); border-radius: 18px; background: var(--surface); font-size: 19px; font-weight: 800; }

.pick-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pick-tiles.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 640px) {
  .pick-tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.pick-tile { display: grid; align-content: end; justify-items: start; gap: 3px; min-height: 96px; padding: 12px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.pick-tiles.three .pick-tile { min-height: 84px; }
.pick-tile:hover { background: var(--surface-hover); }
.pick-tile[aria-pressed="true"] { border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.pick-tile-icon { font-size: 24px; line-height: 1; }
.pick-tile strong { font-size: 15px; font-weight: 800; line-height: 19px; }
.pick-tile-note { color: var(--muted); font-size: 12px; font-weight: 500; line-height: 15px; }

.quick-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-chip { min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; background: transparent; color: var(--soft, var(--ink)); font: inherit; font-size: 14px; font-weight: 600; }
.quick-chip:hover { background: var(--surface-hover); }
.quick-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--on-accent); font-weight: 800; }
.quick-chip.ghost { min-height: 36px; padding: 0 12px; font-size: 13px; }
.quick-chip.toggle[aria-pressed="true"] { border-color: var(--plus); background: var(--plus-bg); color: var(--plus); }
.quick-chip.toggle[aria-pressed="true"]::before { content: '✓ '; }

.segmented { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.segmented button { min-height: 42px; padding: 0 6px; border: 0; border-radius: 14px; background: transparent; color: var(--soft, var(--ink)); font: inherit; font-size: 14px; font-weight: 600; }
.segmented button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); font-weight: 800; }

.day-strip { display: flex; gap: 6px; margin: 0 -4px; padding: 2px 4px 4px; overflow-x: auto; scrollbar-width: none; }
.day-strip::-webkit-scrollbar { display: none; }
.day-pick { display: grid; flex: none; place-content: center; justify-items: center; gap: 1px; width: 52px; height: 60px; border: 0; border-radius: 18px; background: var(--surface); color: var(--ink); font: inherit; }
.day-pick span { color: var(--muted); font-size: 11px; font-weight: 700; }
.day-pick strong { font-size: 19px; font-weight: 900; line-height: 22px; }
.day-pick[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 20px var(--accent-soft); }
.day-pick[aria-pressed="true"] span { color: inherit; }
.form-more { justify-self: start; min-height: 32px; color: var(--accent-text); font-weight: 600; text-decoration: none; }

.when-box { display: grid; gap: 22px; }
.when-summary { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 16px; border-radius: 18px; background: var(--surface); }
.when-summary > span:not(.when-arrow):not(.when-badge) { display: grid; gap: 1px; min-width: 0; }
.when-summary small { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.when-summary strong { font-size: 15px; font-weight: 800; }
.when-arrow { color: var(--accent-text); font-weight: 900; }
.when-badge { margin-left: auto; padding: 4px 10px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); font-size: 12px; font-weight: 800; white-space: nowrap; }
.when-line { margin: -8px 0 0; padding: 12px 16px; border-radius: 16px; background: var(--surface); font-size: 15px; font-weight: 800; }

.person-picker { display: flex; gap: 12px; margin: 0 -4px; padding: 2px 4px 4px; overflow-x: auto; scrollbar-width: none; }
.person-picker::-webkit-scrollbar { display: none; }
.person-pick { display: grid; flex: none; justify-items: center; gap: 6px; width: 76px; padding: 0; border: 0; background: none; color: var(--soft, var(--ink)); font: inherit; font-size: 12px; font-weight: 600; }
.person-pick > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-pick-ring { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--track); }
.person-pick-ring .avatar.small { box-sizing: border-box; width: 58px; height: 58px; border: 2px solid var(--bg); font-size: 22px; }
.person-pick[aria-pressed="true"] { color: var(--ink); font-weight: 800; }
.person-pick[aria-pressed="true"] .person-pick-ring { background: var(--accent); }
.mini-vs { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; min-height: 64px; padding: 0 16px; border-radius: 20px; background: linear-gradient(100deg, color-mix(in srgb, var(--accent) 38%, var(--surface)) 0 50%, var(--surface) 50%); }
.mini-vs strong { overflow: hidden; font-size: 15px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.mini-vs strong:last-child { text-align: right; }
.mini-vs-badge { display: grid; place-items: center; box-sizing: border-box; width: 42px; height: 42px; border: 2.5px solid var(--gold); border-radius: 50%; background: var(--bg); color: var(--gold); font-size: 15px; font-weight: 900; }

.beer-tiles { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.beer-tile { display: grid; place-content: center; justify-items: center; gap: 2px; min-height: 56px; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--soft, var(--ink)); font: inherit; font-size: 13px; }
.beer-tile span { font-size: 20px; line-height: 1; }
.beer-tile[aria-pressed="true"] { border: 1.5px solid var(--gold); background: color-mix(in srgb, var(--gold) 16%, transparent); color: var(--gold); }

.pick-cards { display: grid; gap: 8px; }
@media (min-width: 640px) {
  .pick-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pick-card { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 8px 14px 8px 8px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.pick-card .start-text { display: grid; flex: 1; min-width: 0; }
.pick-card .start-text strong { overflow: hidden; font-size: 15px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.pick-card[aria-pressed="true"] { border: 1.5px solid var(--accent); background: var(--accent-soft); }
.pick-card-cover { position: relative; flex: none; width: 48px; height: 48px; overflow: hidden; border-radius: 14px; }
.pick-card-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.event-preview { display: grid; overflow: hidden; border-radius: 24px; background: var(--surface); }
.event-preview .cover-pick { aspect-ratio: auto; height: 150px; border: 0; border-radius: 0; color: #fff; }
.event-preview .cover-pick:not(:has(img))::after { content: attr(data-icon); position: absolute; top: 50%; right: 18px; margin-top: -40px; font-size: 80px; line-height: 1; transform: rotate(-8deg); }
.event-preview .cover-pick-empty { justify-self: start; align-self: start; margin: 14px; padding: 7px 12px; border-radius: 16px; background: rgb(20 21 30 / .7); color: #f4f0e8; font-size: 13px; font-weight: 700; }
.event-preview > .link-button { justify-self: end; margin: 6px 14px 0; }
.event-preview-body { padding: 10px 16px 16px; }
.event-preview .big-input { min-height: 48px; padding: 0; border: 0; border-bottom: 2px solid var(--accent); border-radius: 0; background: transparent; font-size: 22px; font-weight: 900; }
.place-field { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.place-field .field-input { padding: 0; border: 0; background: transparent; font-size: 16px; }
.form-more-box { border-radius: 20px; background: var(--surface); }
.form-more-box > summary { display: grid; gap: 2px; padding: 14px 16px; cursor: pointer; list-style: none; }
.form-more-box > summary::-webkit-details-marker { display: none; }
.form-more-box > summary strong { font-size: 15px; }
.form-more-box > summary span { color: var(--muted); font-size: 12px; }
.form-more-box > summary::after { content: '›'; position: absolute; right: 18px; margin-top: 4px; color: var(--muted); font-size: 18px; }
.form-more-box { position: relative; }
.form-more-box[open] > summary::after { transform: rotate(90deg); }
.form-more-body { display: grid; gap: 14px; padding: 0 16px 16px; }
.challenge-taunt, .duel-taunt { color: var(--accent-text); font-size: 15px; font-weight: 800; font-style: italic; }
.duel-taunt { margin: -6px 0 0; }

/* ---------- Nastavení na webu ---------- */
.settings-page { gap: 18px; }
.settings-me { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 24px; background: var(--surface); }
.settings-me-ring { display: grid; flex: none; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: conic-gradient(var(--accent) 0%, var(--gold) var(--level-share), var(--track) var(--level-share) 100%); }
.settings-me-ring .avatar.large { box-sizing: border-box; width: 62px; height: 62px; border: 2px solid var(--surface); font-size: 24px; }
.settings-me .setting-text strong { font-size: 20px; }
.settings-me-level { color: var(--gold) !important; font-weight: 700; }
.settings-v2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 18px; align-items: start; }
.settings-card { display: grid; gap: 10px; min-width: 0; }
.settings-card .form-label { padding: 0 4px; }
.settings-card-body { display: grid; padding: 4px 16px; border-radius: 22px; background: var(--surface); }
.setting-line { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 0; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); font: inherit; text-align: left; }
.settings-card-body > :last-child { border-bottom: 0; }
.setting-line.link:hover strong { text-decoration: underline; }
.setting-icon { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font-size: 17px; font-weight: 900; }
.setting-icon.gold { background: color-mix(in srgb, var(--gold) 18%, transparent); }
.setting-icon.green { background: color-mix(in srgb, var(--plus) 18%, transparent); }
.setting-icon.violet { background: rgb(109 79 242 / .2); }
.setting-icon.red { background: color-mix(in srgb, var(--minus) 18%, transparent); }
.setting-text { display: grid; flex: 1; gap: 2px; min-width: 0; }
.setting-text strong { font-size: 15px; font-weight: 800; }
.setting-text span { color: var(--muted); font-size: 12px; line-height: 16px; }
.setting-value { flex: none; color: var(--muted); font-size: 15px; }
.setting-range { flex: 1 1 140px; min-width: 0; }
.setting-line .language-select { flex: 0 1 180px; width: auto; }
.settings-try, .settings-push-kinds { display: grid; gap: 8px; padding: 10px 0 14px; }
.settings-push-kinds:empty { display: none; }
.switch { position: relative; flex: none; width: 52px; height: 32px; padding: 0; border: 0; border-radius: 16px; background: var(--track); transition: background .15s; }
.switch span { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #f4f0e8; box-shadow: 0 1px 3px rgb(0 0 0 / .3); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] span { transform: translateX(20px); }
@media (prefers-reduced-motion: reduce) {
  .switch, .switch span { transition: none; }
}
.theme-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 0; }
.theme-tile { display: grid; justify-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: 18px; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; }
.theme-tile[aria-pressed="true"] { border: 2px solid var(--accent); background: var(--accent-soft); }
.theme-preview { display: grid; gap: 5px; box-sizing: border-box; width: 100%; height: 64px; padding: 8px; border-radius: 12px; }
.theme-preview span { height: 8px; border-radius: 4px; }
.theme-preview span:nth-child(2) { height: 16px; }
.theme-preview span:first-child { width: 60%; }
.theme-preview span:last-child { width: 40%; }
.theme-preview.dark { background: #14151e; }
.theme-preview.dark span { background: #f4f0e8; }
.theme-preview.dark span:nth-child(2) { background: #2c2f3e; }
.theme-preview.dark span:last-child { background: #ff7a45; }
.theme-preview.light { background: #faf7f2; border: 1px solid #e8e1d6; }
.theme-preview.light span { background: #1d1b26; }
.theme-preview.light span:nth-child(2) { background: #ece5da; }
.theme-preview.light span:last-child { background: #e8602c; }
.theme-preview.split { background: linear-gradient(90deg, #14151e 50%, #faf7f2 50%); }
.theme-preview.split span { background: linear-gradient(90deg, #f4f0e8 50%, #1d1b26 50%); }
.theme-preview.split span:last-child { background: linear-gradient(90deg, #ff7a45 50%, #e8602c 50%); width: 100%; }
.settings-bottom { display: grid; justify-items: center; gap: 8px; max-width: 420px; margin: 0 auto; width: 100%; }
.danger-link { color: var(--minus); font-weight: 700; }
@media (max-width: 440px) {
  .pick-tiles.three .pick-tile-note { display: none; }
  .pick-tiles.three .pick-tile { min-height: 72px; padding: 10px; }
  .segmented button { font-size: 13px; line-height: 15px; }
}
.day-pick[aria-pressed="true"] { box-shadow: none; }
.settings-card-body > .setting-line:has(+ .settings-push-kinds:empty) { border-bottom: 0; }
