/* CMO Chat - tmavé téma v barvách Car Meet Olomouc, mobile-first */

:root {
  --bg: #0d0c0f;
  --bg2: #131216;
  --panel: #19181d;
  --panel2: #222127;
  --panel3: #2c2b32;
  --line: rgba(255, 255, 255, .07);
  --line2: rgba(255, 255, 255, .12);
  --txt: #f4f2f6;
  --txt2: #bdb8c3;
  --muted: #8b8692;
  --brand: #e5097f;
  --brand2: #ff4aa5;
  --brand-dark: #b8006a;
  --brand-rgb: 229, 9, 127;
  --aud-rgb: 64, 140, 255; /* modul audience: modrý podklad zpráv jen pro skupinu */
  --plate: #e8e5ec; /* jmenovka u zpráv (rámeček kolem avataru, nicku a flairů): jedna bílošedá barva pro všechny */
  --ok: #2fd27a;
  --danger: #ff5266;
  --danger-rgb: 255, 82, 102;
  --info: #5fb8ff;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow: 0 12px 36px rgba(0, 0, 0, .5);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.2, .9, .25, 1);

  --app-h: 100dvh;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--txt);
  font: 15px/1.4 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}

/* klávesnice otevřená: bez odsazení pro pruh gesta domů (je schovaný pod klávesnicí), viz syncViewport v chat.js */
html.kb-open { --safe-b: 0px; }

body { overflow: hidden; }

[hidden] { display: none !important; }

button { font: inherit; color: inherit; cursor: pointer; }
a { color: var(--brand2); }
img, video { display: block; }

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

* { scrollbar-width: thin; scrollbar-color: #36343c transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #36343c; border-radius: 8px; }

.app {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--app-top, 0px) + var(--maint-bar, 0px)); /* --maint-bar: lišta údržby pro admina */
  height: calc(var(--app-h) - var(--maint-bar, 0px));
  display: flex;
  overflow: hidden;
}

/* ------------------------------------------------------------- prvky */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 15px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: var(--panel2);
  color: var(--txt);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, opacity .15s;
}
.btn:hover { border-color: rgba(255, 255, 255, .26); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn.primary { background: var(--brand); border-color: transparent; color: #fff; }
.btn.primary:hover { background: #f31690; }
.btn.danger { color: var(--danger); background: rgba(var(--danger-rgb), .08); border-color: rgba(var(--danger-rgb), .3); }
.btn.danger:hover { background: rgba(var(--danger-rgb), .16); }
.btn.big { width: 100%; padding: 14px 18px; font-size: 16px; border-radius: 14px; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 10px; }
.btn.busy { position: relative; color: transparent !important; }
.btn.busy::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}

.icon-btn {
  position: relative;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: none;
  color: var(--txt2);
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--panel2); color: var(--txt); }
.icon-btn.sm { width: 30px; height: 30px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  background: var(--panel2);
  font-weight: 700;
  font-size: 13px;
}

.dot {
  display: inline-block;
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(47, 210, 122, .18);
  margin-right: 2px;
}

.nbadge {
  position: absolute;
  top: 2px; right: 0;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-pill);
  border: 2px solid var(--bg);
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1;
}

.gif-tag {
  padding: 1px 4px;
  border-radius: 4px;
  background: var(--brand);
  color: #fff;
  font-weight: 900;
  font-size: 10.5px;
  letter-spacing: .4px;
}

.spinner {
  display: inline-block;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .14);
  border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }

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

input, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: var(--panel2);
  color: var(--txt);
  font: inherit;
  font-size: 16px; /* iOS nezoomuje */
  outline: none;
  transition: border-color .15s;
}
input:focus, textarea:focus { border-color: rgba(var(--brand-rgb), .7); }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #6f6a76; }
input[type=search]::-webkit-search-cancel-button { display: none; }

.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 11.5px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; color: var(--txt2); }
.hint { margin: -4px 0 0; font-size: 12.5px; color: var(--muted); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.35; color: var(--txt2); cursor: pointer; }
/* vlastní kolečko místo systémového checkboxu (ten na Androidu bral i globální styl inputu) */
.check input[type=checkbox] {
  appearance: none; -webkit-appearance: none;
  width: 22px; height: 22px; margin: 0; padding: 0; flex: none;
  border: 2px solid var(--line2); border-radius: 50%; background: var(--panel2) center / 14px no-repeat;
  cursor: pointer; transition: background-color .15s, border-color .15s;
}
.check input[type=checkbox]:checked {
  border-color: var(--brand); background-color: var(--brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.check input[type=checkbox]:focus-visible { box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .35); }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.nowrap { flex: none; white-space: nowrap; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row-btns { display: flex; gap: 8px; }
.row-btns > .btn { flex: 1; }
.row-btns.wrap { flex-wrap: wrap; }
.row-form { display: flex; gap: 8px; }
.row-form input { flex: 1; }

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel2);
}
.card p { margin: 0; font-size: 14px; }
.card b { display: flex; align-items: center; gap: 6px; }
details.card summary { display: flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; list-style: none; }
details.card summary::-webkit-details-marker { display: none; }
details.card[open] summary { margin-bottom: 4px; }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 13px; background: var(--panel2); }
.seg button {
  flex: 1;
  padding: 9px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--txt2);
  font-weight: 700;
}
.seg button.on { background: var(--panel3); color: var(--txt); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.seg-wrap { flex-wrap: wrap; }
.seg-wrap button { flex: 1 0 auto; min-width: 54px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.switch-row > span:first-child { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; z-index: 1; margin: 0; opacity: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: var(--r-pill); background: var(--panel3); transition: background .2s; }
.switch i::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s var(--ease);
}
.switch input:checked + i { background: var(--brand); }
.switch input:checked + i::after { transform: translateX(18px); }

/* ------------------------------------------------------------- avatar, odznaky */

.av {
  position: relative;
  display: inline-block;
  flex: none;
  overflow: hidden;
  border-radius: 50%;
  background: var(--panel3);
}
/* Zakulacené i samy: ořez rodičem (overflow + border-radius) Chrome vynechá v průhledném řádku (offline v panelu Členové) */
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.av-ini { width: 100%; height: 100%; border-radius: inherit; display: grid; place-items: center; background: linear-gradient(135deg, #d30976 0%, #8a0f5e 45%, #2d1836 100%); color: #fff; font-family: Arial, "Helvetica Neue", Helvetica, sans-serif; font-weight: 700; letter-spacing: 0; line-height: 1; }
.av.xl { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px rgba(var(--brand-rgb), .75); }
.av-btn { display: block; padding: 0; border: 0; border-radius: 50%; background: none; }
.av-wrap { position: relative; display: inline-block; flex: none; }
.online-dot {
  position: absolute;
  right: -1px; bottom: -1px;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 2.5px solid var(--panel);
  background: var(--ok);
}

.badge { display: inline-flex; align-items: center; gap: 3px; flex: none; vertical-align: middle; }
.badge-v { color: var(--info); }
.badge-admin-ic { color: var(--brand2); }
.badge-admin {
  padding: 1px 6px 1px 4px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ------------------------------------------------------------- vstupní obrazovka */

.gate {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  overflow-y: auto;
  padding: calc(28px + var(--safe-t)) 18px calc(28px + var(--safe-b));
  background:
    radial-gradient(1100px 560px at 50% -12%, rgba(var(--brand-rgb), .30), transparent 62%),
    radial-gradient(600px 420px at 110% 105%, rgba(var(--brand-rgb), .14), transparent 70%),
    var(--bg);
}
.gate-card { width: 100%; max-width: 400px; margin: auto 0; display: flex; flex-direction: column; gap: 14px; }
.gate-logo { align-self: center; width: 176px; height: auto; filter: drop-shadow(0 8px 24px rgba(var(--brand-rgb), .4)); }
.gate-title { margin: 2px 0 0; text-align: center; font-size: 27px; line-height: 1.12; font-weight: 900; letter-spacing: -.4px; }
.gate-sub { margin: 0; text-align: center; color: var(--txt2); font-size: 14.5px; }
.gate-form { display: flex; flex-direction: column; gap: 12px; }
.gate-av {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
}
.gate-av-pic { position: relative; padding: 0; border: 0; border-radius: 50%; background: none; }
.gate-av-pic .av { box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px rgba(var(--brand-rgb), .6); }
.gate-av-edit {
  position: absolute;
  left: 50%; bottom: -7px;
  transform: translateX(-50%);
  padding: 2px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line2);
  background: var(--panel3);
  font-size: 10px;
  font-weight: 800;
}
.gate-av-side { display: flex; flex-direction: column; gap: 8px; }
.gate-av-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.gate-err { min-height: 1.3em; margin: 0; text-align: center; color: #ff8d9a; font-size: 14px; font-weight: 600; }

/* ------------------------------------------------------------- layout chatu */

.main { flex: 1; display: flex; min-width: 0; }
.side { display: none; }

.chat {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 500px at 50% -20%, rgba(var(--brand-rgb), .07), transparent 60%),
    var(--bg);
}

.top {
  position: relative;
  z-index: 3;
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: calc(58px + var(--safe-t));
  padding: var(--safe-t) 8px 0 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(13, 12, 15, .86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.top-back { margin-left: -6px; }
.top-id { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.top-logo { width: auto; height: 32px; }
.top-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.18; }
.top-txt b { display: flex; align-items: center; gap: 5px; font-size: 16px; }
.top-sub { display: flex; align-items: center; gap: 4px; overflow: hidden; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.top-sub.on { color: var(--ok); }
.top-peer { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; text-align: left; }
.top-actions { display: flex; align-items: center; gap: 2px; }
.top-actions .pill { margin-right: 4px; }
.me-btn { padding: 3px; border: 0; border-radius: 50%; background: none; margin-left: 2px; }
@media (max-width: 520px) {
  .in-dm .top-actions .pill { display: none; }
}

.conn {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  background: #33250d;
  color: #ffd08a;
  font-size: 12.5px;
  font-weight: 600;
}

.pinned {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 14px;
  border-bottom: 1px solid rgba(var(--brand-rgb), .25);
  background: linear-gradient(90deg, rgba(var(--brand-rgb), .22), rgba(var(--brand-rgb), .06));
  font-size: 13.5px;
}
.pinned-ic { color: var(--brand2); display: grid; }
.pinned-txt {
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  white-space: pre-wrap;
  cursor: pointer;
}
.pinned.open .pinned-txt { -webkit-line-clamp: unset; }

/* Dotyk: podržení zprávy otevírá menu, nesmí přitom označit text (iOS modře vybral celý chat).
   Kopírování textu je v menu zprávy. */
@media (pointer: coarse) {
  .list { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
}
.list {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.list-inner {
  min-height: 100%;
  padding: 6px 0 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.list-top { display: flex; justify-content: center; padding: 18px; }

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 34px 20px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
.intro b { color: var(--txt); font-size: 15px; }
.intro .av { margin-bottom: 4px; }
.intro-ic {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border-radius: 50%;
  background: rgba(var(--brand-rgb), .15);
  color: var(--brand2);
}

/* ------------------------------------------------------------- zprávy (styl Discordu) */

.msg {
  position: relative;
  margin-top: 16px;
  padding: 2px 16px 2px 14px;
  touch-action: pan-y;
  transition: transform .22s var(--ease), background .1s;
}
.msg.cont { margin-top: 0; }
.msg.swiping { transition: none; }
@media (hover: hover) {
  .msg:hover { background: rgba(255, 255, 255, .03); }
}

.m-row { display: flex; gap: 14px; }
.m-av { width: 40px; flex: none; display: flex; justify-content: center; }
.m-av .av-btn { margin-top: 2px; height: 40px; }
.m-gtime { visibility: hidden; font-size: 10.5px; line-height: 22px; color: var(--muted); white-space: nowrap; }
.msg.cont:hover .m-gtime { visibility: visible; }

.m-main { flex: 1; min-width: 0; }
/* Rozmazání jen u mizejících zpráv (filter na všech by zbytečně tvořil vrstvy) */
.msg.fading > * {
  filter: blur(calc(var(--fade, 0) * 7px));
  opacity: calc(1 - var(--fade, 0) * .8);
  transition: filter .8s, opacity .8s;
}
.msg.fading:hover > *, .msg.fading:active > * { filter: none; opacity: 1; }

.m-head { display: flex; align-items: baseline; gap: 7px; min-width: 0; line-height: 1.375; }
.m-nick {
  max-width: 62%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: none;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-nick:hover { text-decoration: underline; }
.m-head .badge { flex: none; align-self: center; }
.m-head .m-time { flex: none; }
.m-head .flair { max-width: 140px; flex-shrink: 12; }
.m-time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }

.m-body { color: #e8e5eb; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.m-body.jumbo { font-size: 44px; line-height: 1.2; }
.m-body.jumbo .cem.inline { width: 48px !important; height: 48px !important; }
.cem { display: inline-block; object-fit: contain; vertical-align: -5px; }
.cem.inline { margin: 0 1px; }
.uem { font-size: 16px; line-height: 1; }
.m-left { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; color: #ff9fcb; font-size: 11px; white-space: nowrap; vertical-align: 1px; }
.m-left:empty { display: none; }
.k-gif, .k-sticker, .k-poll { padding-top: 4px; }
.k-gif .m-left, .k-sticker .m-left, .k-poll .m-left { display: flex; margin: 4px 0 0; }
.k-gif .m-left:empty, .k-sticker .m-left:empty, .k-poll .m-left:empty { display: none; }

.gbox {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background-color: var(--panel3);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}
.gbox video, .gbox img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: transparent;
}
.gbox img { opacity: 0; transition: opacity .25s; }
.gbox img.on { opacity: 1; }
.gbox.is-sticker { border-radius: 0; background-color: transparent; }
.gbox.is-sticker img { object-fit: contain; }

.mention-tag { padding: 0 3px; border-radius: 4px; background: rgba(var(--brand-rgb), .18); color: #ffc4e0; font-weight: 600; }
.mention-tag.me { background: rgba(var(--brand-rgb), .42); color: #fff; }
.msg.mention { background: rgba(var(--brand-rgb), .08); box-shadow: inset 3px 0 0 var(--brand); }
@media (hover: hover) {
  .msg.mention:hover { background: rgba(var(--brand-rgb), .12); }
}

/* odpověď - řádek nad zprávou se zahnutou čárou k avataru */
.m-reply {
  position: relative;
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
  margin: 0 0 4px;
  padding: 0 0 0 54px;
  border: 0;
  background: none;
  color: var(--txt2);
  font-size: 13px;
  text-align: left;
}
.m-reply-curve {
  position: absolute;
  left: 20px;
  top: 50%;
  width: 28px;
  height: 13px;
  border-left: 2px solid #4a4750;
  border-top: 2px solid #4a4750;
  border-top-left-radius: 7px;
}
.m-reply b { flex: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.m-reply-x { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: .85; }
.m-reply:hover .m-reply-x { color: var(--txt); opacity: 1; }
.m-reply-g { width: 20px; height: 20px; flex: none; border-radius: 4px; object-fit: cover; }
.m-reply .cem { width: 16px !important; height: 16px !important; vertical-align: -3px; }

/* reakce */
.m-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.m-rx:empty { display: none; }
.rx, .rx-add {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 26px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--panel2);
  color: var(--txt2);
  font-size: 13px;
  font-weight: 700;
  transition: border-color .12s, background .12s, transform .1s;
}
.rx:hover, .rx-add:hover { border-color: var(--line2); }
.rx:active { transform: scale(.92); }
.rx.on { border-color: rgba(var(--brand-rgb), .75); background: rgba(var(--brand-rgb), .16); color: #ffd3e8; }
.rx .uem { font-size: 16px; }
.rx-add { padding: 0 7px; color: var(--muted); }
@media (hover: hover) {
  .rx-add { opacity: 0; }
  .msg:hover .rx-add { opacity: 1; }
}

/* nástroje po najetí myší (desktop) */
.m-tools {
  position: absolute;
  z-index: 2;
  top: -16px;
  right: 16px;
  display: none;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  border: 1px solid var(--line2);
  background: var(--panel);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
}
.msg:hover .m-tools { display: flex; }
.mt-btn { width: 32px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--txt2); }
.mt-btn:hover { background: var(--panel3); color: var(--txt); }

.msg.pending .m-body { opacity: .5; }
.msg.failed .m-body { color: var(--danger); }
.m-fail { display: flex; align-items: center; gap: 4px; margin-top: 3px; color: var(--danger); font-size: 12px; font-weight: 600; }

.msg.swipe-ok { background: rgba(var(--brand-rgb), .12); }
.msg.enter { animation: pop .26s var(--ease); }
.msg.flash { animation: flash 1.6s ease; }
.msg.vanish { animation: vanish .9s ease forwards; pointer-events: none; }

@keyframes pop { from { opacity: 0; transform: translateY(8px); } }
@keyframes flash { 0%, 50% { background: rgba(var(--brand-rgb), .25); } 100% { background: transparent; } }
@keyframes vanish { to { opacity: 0; filter: blur(16px); transform: scale(.97); } }

/* čára „Nové" - od kdy přibyly zprávy za nepřítomnost */
.new-div { display: flex; align-items: center; gap: 6px; margin: 16px 16px 0 14px; color: var(--brand2); font-size: 10.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.new-div::before { content: ''; flex: 1; height: 1px; background: var(--brand); }
.new-div span { padding: 1px 6px; border-radius: 4px; background: var(--brand); color: #fff; }
.new-div + .msg { margin-top: 6px; }

/* ankety */
.poll {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel2);
  white-space: normal;
}
.poll-sub { display: flex; align-items: center; gap: 5px; color: var(--brand2); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .5px; }
.poll-q { font-size: 16px; font-weight: 800; line-height: 1.25; margin-bottom: 2px; }
.poll-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 10px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--panel3);
  text-align: left;
  font-size: 14px;
  font-weight: 600;
  transition: border-color .15s, transform .1s;
}
.poll-opt:active { transform: scale(.98); }
.poll-opt.mine { border-color: var(--brand); }
.poll-bar { position: absolute; inset: 0 auto 0 0; background: rgba(var(--brand-rgb), .26); transition: width .5s var(--ease); }
.poll-check {
  position: relative;
  width: 18px; height: 18px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--muted);
}
.poll-opt.mine .poll-check { border-color: var(--brand); background: var(--brand); color: #fff; }
.poll-lbl { position: relative; flex: 1; }
.poll-pct { position: relative; font-weight: 800; font-size: 13px; }
.poll-foot { color: var(--muted); font-size: 12px; }

/* ------------------------------------------------------------- spodní část */

.below { position: relative; flex: none; padding-bottom: var(--safe-b); }
.pk-open .below { padding-bottom: 0; }

.jump {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
  animation: pop .25s var(--ease);
}

.typing {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 18px;
  color: var(--muted);
  font-size: 12.5px;
  transition: height .15s;
}
.typing.on { height: 22px; }
.tdots { display: inline-flex; gap: 3px; }
.tdots i { width: 5px; height: 5px; border-radius: 50%; background: var(--brand2); animation: blink 1.2s infinite; }
.tdots i:nth-child(2) { animation-delay: .2s; }
.tdots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 60%, 100% { opacity: .25; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-2px); } }

/* „Odpověď pro…" - přilepené nad lištou jako na Discordu */
.reply-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px;
  padding: 7px 8px 7px 14px;
  border-radius: 10px 10px 0 0;
  background: var(--panel);
  font-size: 13px;
}
.rb-ic { color: var(--brand2); display: grid; }
.rb-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rb-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.reply-bar:not([hidden]) ~ .composer .cbar { border-top-left-radius: 0; border-top-right-radius: 0; }

.notice { padding: 16px; border-top: 1px solid var(--line); background: var(--panel); color: var(--txt2); text-align: center; font-size: 13.5px; }

/* lišta pro psaní ve stylu Discordu: + vlevo, GIF / samolepka / emoji vpravo */
.composer { padding: 0 16px 16px; }
.cbar {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 2px;
  min-height: 48px;
  padding: 0 6px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--panel2);
  transition: border-color .15s;
}
.cbar:focus-within { border-color: rgba(var(--brand-rgb), .35); }
/* vlastní kurzor po „Odpovědět“, než vyjede klávesnice (chat.js updateFakeCaret) */
.cbar.fake-on textarea { caret-color: transparent; }
.fake-caret { position: absolute; width: 2px; height: 20px; border-radius: 1px; background: var(--brand); pointer-events: none; animation: caret-blink 1.06s steps(1) infinite; }
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .fake-caret { animation: none; } }
.cbar textarea {
  flex: 1;
  min-width: 0;
  max-height: 160px;
  padding: 13px 8px;
  border: 0;
  border-radius: 0;
  background: none;
  resize: none;
  line-height: 1.4;
  caret-color: var(--brand); /* výrazný kurzor = je jasné, že se dá psát */
}
.cb-btn {
  width: 40px; height: 46px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  color: #b3afb9;
  transition: color .15s, transform .1s;
}
.cb-btn:hover { color: var(--txt); }
.cb-btn:active { transform: scale(.9); }
.cb-btn.on { color: var(--brand2); }
.cb-gif span {
  padding: 2px 4px;
  border: 2px solid currentColor;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .4px;
  line-height: 1;
}
.cb-gif.on span { border-color: var(--brand); background: var(--brand); color: #fff; }
.cb-right { display: flex; align-items: flex-end; }
.cb-send {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  margin: 5px 2px 5px 4px;
  border: 0;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  animation: pop .15s var(--ease);
}
.cb-send:active { transform: scale(.9); }

@media (max-width: 600px) {
  .composer { padding: 0 8px 8px; }
  .reply-bar { margin: 0 8px; }
  .cb-btn { width: 36px; }
  .composer.has-text .cb-gif, .composer.has-text .cb-sticker { display: none; }
}
@media (max-width: 380px) {
  .cb-sticker { display: none; }
}

.mentions {
  position: absolute;
  z-index: 5;
  left: 16px;
  bottom: calc(100% - 10px);
  width: min(300px, calc(100% - 32px));
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line2);
  background: var(--panel);
  box-shadow: var(--shadow);
}
.mention-item { width: 100%; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border: 0; border-radius: 10px; background: none; text-align: left; font-weight: 700; }
.mention-item.on, .mention-item:hover { background: var(--panel3); }
.mention-item .dot { margin-left: auto; }

/* lišta „za tvou nepřítomnost přibylo…" */
.away {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px 6px 14px;
  background: var(--brand);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  animation: pop .25s var(--ease);
}
.away-ic { display: grid; }
.away-txt { flex: 1; min-width: 0; }
.away-go { flex: none; padding: 4px 11px; border: 0; border-radius: var(--r-pill); background: rgba(255, 255, 255, .2); color: #fff; font-size: 12.5px; font-weight: 800; }
.away-go:hover { background: rgba(255, 255, 255, .3); }
.away .icon-btn { color: #fff; }
.away .icon-btn:hover { background: rgba(255, 255, 255, .18); }

/* výběr emoji */
.ep-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 10px; }
.ep-sec { padding: 8px 2px 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .7px; text-transform: uppercase; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); gap: 2px; }
.ep-item { height: 44px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; font-size: 26px; line-height: 1; transition: background .1s, transform .1s; }
.ep-item:hover { background: var(--panel3); }
.ep-item:active { transform: scale(.88); }

/* aktivita (notifikace) */
.notif-list { display: flex; flex-direction: column; gap: 2px; }
.notif { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 8px; border: 0; border-radius: 12px; background: none; text-align: left; }
.notif:hover { background: var(--panel2); }
.notif.unseen { background: rgba(var(--brand-rgb), .1); }
.notif .grow b { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.notif-kind {
  position: absolute;
  right: -3px; bottom: -3px;
  width: 18px; height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--panel);
  background: var(--brand);
  color: #fff;
}
.notif-dm { padding: 1px 5px; border-radius: 4px; background: var(--panel3); color: var(--txt2); font-size: 10px; }

/* správa vlastních emoji */
.em-admin { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.em-tile { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 6px; border-radius: 10px; background: var(--panel2); }
.em-name { max-width: 100%; overflow: hidden; color: var(--txt2); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.em-del { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel3); color: var(--muted); }
.em-del:hover { background: var(--danger); color: #fff; }

/* ------------------------------------------------------------- GIF picker */

.picker-slot { height: min(48vh, 430px); border-top: 1px solid var(--line); background: var(--bg2); padding-bottom: var(--safe-b); }
.picker { height: 100%; display: flex; flex-direction: column; }
/* stahování prstem: slot se zmenšuje, obsah drží výšku a ořezává se zespodu (ui.js dragToClose) */
.picker-slot.dragging { overflow: hidden; }
.picker-slot.dragging > .picker { height: var(--drag-h); }
.pk-head { display: flex; align-items: center; padding: 8px 6px 0 10px; }
.pk-tabs { flex: 1; display: flex; gap: 4px; }
.pk-tab { padding: 6px 13px; border: 0; border-radius: var(--r-pill); background: none; color: var(--txt2); font-size: 13.5px; font-weight: 800; }
.pk-tab.on { background: var(--panel3); color: var(--txt); }
.pk-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 10px 8px;
  padding: 0 6px 0 12px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
}
.pk-search:focus-within { border-color: rgba(var(--brand-rgb), .6); }
.pk-search input { flex: 1; height: 40px; padding: 0; border: 0; border-radius: 0; background: none; }
.pk-clear { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel3); color: var(--txt2); }
.pk-chips { display: flex; gap: 6px; overflow-x: auto; padding: 0 10px 8px; scrollbar-width: none; }
.pk-chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 5px 12px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--panel2); color: var(--txt2); font-size: 13px; font-weight: 700; }
.chip:hover { color: var(--txt); border-color: var(--line2); }
.pk-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 10px 10px; }
.pk-grid { display: flex; align-items: flex-start; gap: 6px; }
.pk-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.pk-item { display: block; width: 100%; padding: 0; border: 0; border-radius: 11px; background: none; overflow: hidden; transition: transform .12s, filter .12s; }
.pk-item:hover { filter: brightness(1.12); }
.pk-item:active { transform: scale(.95); }
.pk-item .gbox { border-radius: 11px; }
.pk-item .gbox.is-sticker { border-radius: 11px; background-color: rgba(255, 255, 255, .04); }
.pk-status { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 16px 10px; color: var(--muted); font-size: 13.5px; text-align: center; }
.pk-status:empty { display: none; }
.pk-sentinel { height: 1px; }
.pk-foot { display: flex; justify-content: flex-end; padding: 4px 12px 7px; opacity: .8; transition: opacity .15s; }
.pk-foot:hover { opacity: 1; }
.pk-foot img { display: block; width: auto; height: 17px; }

/* ------------------------------------------------------------- sheety */

.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; pointer-events: none; }
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .58); opacity: 0; transition: opacity .25s; pointer-events: auto; }
.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(var(--app-h) - 36px - var(--safe-t));
  display: flex;
  flex-direction: column;
  padding-bottom: var(--safe-b);
  border-radius: 24px 24px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
  background: var(--panel);
  box-shadow: var(--shadow);
  transform: translateY(100%);
  transition: transform .28s var(--ease);
  pointer-events: auto;
}
.sheet-wrap.open .sheet { transform: none; }
.sheet-wrap.open .sheet-back { opacity: 1; }
.sheet-tall { height: calc(var(--app-h) - 36px - var(--safe-t)); }
.sheet-grip { width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: var(--line2); flex: none; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 4px 8px 2px 18px; flex: none; }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 800; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: none; /* bez gumového odskoku */ display: flex; flex-direction: column; gap: 12px; padding: 6px 16px 20px; }
.sheet-picker .sheet-body { padding: 0; overflow: hidden; }
.sheet-picker .picker-slot, .sheet-picker .picker { height: 100%; }

.msg-menu .sheet-head { padding: 6px 8px 6px 10px; }
.msg-menu .sheet-body { gap: 0; padding-top: 4px; }
.mm-head { flex: 1; display: flex; justify-content: space-between; gap: 4px; }
.rx-big { width: 48px; height: 48px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel2); font-size: 26px; transition: transform .12s, background .15s; }
.rx-big:active { transform: scale(.86); }
.rx-big.on { background: rgba(var(--brand-rgb), .32); }
.menu-item { width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px 8px; border: 0; border-radius: 12px; background: none; text-align: left; font-size: 15.5px; font-weight: 600; }
.menu-item:hover { background: var(--panel2); }
.menu-item .ic { color: var(--txt2); }
.menu-item.danger, .menu-item.danger .ic { color: var(--danger); }

.prof-top { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 4px 0; text-align: center; }
.prof-top .av { margin-bottom: 6px; }
.prof-name { display: flex; align-items: center; gap: 6px; font-size: 21px; }
.claim { border-color: rgba(var(--brand-rgb), .4); background: linear-gradient(160deg, rgba(var(--brand-rgb), .14), var(--panel2) 60%); }

.user-row { display: flex; align-items: center; gap: 11px; }
.user-row .grow b { display: flex; align-items: center; gap: 4px; }
.btn-row { width: 100%; padding: 8px; border: 0; border-radius: 13px; background: none; text-align: left; }
.btn-row:hover { background: var(--panel2); }
.people { display: flex; flex-direction: column; gap: 2px; }
.admin-box { border-color: rgba(var(--brand-rgb), .35); }

.dm-list { display: flex; flex-direction: column; gap: 2px; }
.dm-row { display: flex; align-items: center; border-radius: 14px; }
.dm-row:hover, .dm-row.on { background: var(--panel2); }
.dm-item { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 9px 4px 9px 8px; border: 0; border-radius: 14px; background: none; text-align: left; }
.dm-x {
  width: 32px; height: 32px;
  flex: none;
  display: grid;
  place-items: center;
  margin-right: 4px;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.dm-x:hover { background: rgba(var(--danger-rgb), .14); color: var(--danger); }
.dm-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dm-txt b { display: flex; align-items: center; gap: 4px; }
.dm-txt > span { color: var(--muted); font-size: 13.5px; }
.dm-row.unread .dm-txt > span { color: var(--txt); font-weight: 600; }
.dm-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: var(--muted); font-size: 11.5px; }
.dm-meta .nbadge { position: static; border: 0; }
.dm-empty { margin: 0; padding: 8px; color: var(--muted); font-size: 13.5px; }

.rules { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.rules li b { display: block; }
.rules li span { color: var(--txt2); font-size: 14px; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.stat { display: flex; flex-direction: column; padding: 10px 12px; border-radius: 14px; background: var(--panel2); }
.stat b { font-size: 22px; }
.stat span { color: var(--muted); font-size: 11.5px; }
.adm-sec { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.adm-sec h3 { margin: 4px 0 0; color: var(--txt2); font-size: 12px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase; }
.rep { gap: 8px; }
.rep-g { max-width: 160px; border-radius: 10px; }
.rep-t { white-space: pre-wrap; font-size: 14px; }
.pw-out code {
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--bg);
  font: 600 20px/1.2 ui-monospace, Consolas, monospace;
  letter-spacing: 1.5px;
  user-select: all;
}

.toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border-radius: 14px;
  background: #2f2d35;
  box-shadow: var(--shadow);
  color: var(--txt);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 16px);
  transition: opacity .2s, transform .2s var(--ease);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #4b1823; }

/* ------------------------------------------------------------- desktop */

@media (min-width: 700px) {
  .sheet-wrap { align-items: center; padding: 20px; }
  .sheet {
    max-height: min(780px, calc(var(--app-h) - 40px));
    padding-bottom: 0;
    border-radius: 24px;
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transform: translateY(16px) scale(.98);
    transition: transform .22s var(--ease), opacity .18s;
  }
  .sheet-wrap.open .sheet { opacity: 1; }
  .sheet-tall { height: min(780px, calc(var(--app-h) - 40px)); }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 10px; }
  .toast { bottom: 110px; }
}

@media (min-width: 901px) {
  .picker-slot {
    position: absolute;
    z-index: 6;
    left: 12px;
    bottom: 100%;
    width: 440px;
    height: 500px;
    padding: 0;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--line2);
    box-shadow: var(--shadow);
    animation: pop .2s var(--ease);
  }
  .pk-open .below { padding-bottom: var(--safe-b); }
}

@media (min-width: 960px) {
  .side {
    width: 292px;
    flex: none;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: var(--bg2);
  }
  .side-head { padding: 16px 18px 6px; }
  .side-head img { width: 92px; height: auto; }
  .side-sec {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 30px;
    padding: 14px 10px 4px 18px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
  }
  .side-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 8px;
    padding: 10px;
    border: 0;
    border-radius: 12px;
    background: none;
    color: var(--txt2);
    font-size: 15px;
    font-weight: 700;
    text-align: left;
  }
  .side-item:hover { background: var(--panel); }
  .side-item.on { background: var(--panel2); color: var(--txt); }
  .side-hash { display: grid; color: var(--brand2); }
  .side-meta { display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 12px; }
  .side .dm-list { flex: 1; overflow-y: auto; padding: 0 8px; }
  .side .dm-empty { padding: 6px 12px; font-size: 13px; }
  .side-foot { padding: 10px; border-top: 1px solid var(--line); }
  .side-me { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px; border: 0; border-radius: 12px; background: none; text-align: left; }
  .side-me:hover { background: var(--panel2); }
  .side-me-txt { min-width: 0; display: flex; flex-direction: column; font-size: 14px; }
  .side-me-txt b, .side-me-txt span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .side-me-txt span { color: var(--muted); font-size: 12px; }
  .top-dm, .top .me-btn { display: none; }
  .top-logo { display: none; }
  .top { padding-left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.rx-big.more { color: var(--txt2); }

/* ------------------------------------------------------------- flair (štítek od admina) */

.flair {
  display: inline-block;
  max-width: 120px;
  height: 18px;
  padding: 0 6px;
  overflow: hidden;
  flex: 0 3 auto;
  min-width: 34px;
  border-radius: 5px;
  border: 1px solid;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  align-self: center;
}
.prof-top .flair { max-width: 100%; height: 22px; padding: 0 9px; font-size: 12.5px; line-height: 20px; }
.flair.pick { cursor: pointer; }
.flair-preview { display: flex; align-items: center; min-width: 90px; }
.flair-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { width: 26px; height: 26px; border: 2px solid transparent; border-radius: 50%; box-shadow: inset 0 0 0 2px var(--panel2); }
.swatch.on { border-color: #fff; }
.flair-quick { display: flex; flex-wrap: wrap; gap: 6px; }

/* ------------------------------------------------------------- členové (panel vpravo) */

.members {
  width: 264px;
  flex: none;
  display: none;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--bg2);
}
.members-open .members { display: flex; }
.mem-back { display: none; }
.mem-head { display: flex; align-items: center; justify-content: space-between; min-height: calc(58px + var(--safe-t)); padding: var(--safe-t) 8px 0 16px; border-bottom: 1px solid var(--line); }
.mem-head b { font-size: 15px; }
.mem-search { width: auto; margin: 10px 10px 4px; padding: 8px 11px; border-radius: 9px; font-size: 14px; }
.mem-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 16px; }
.mem-sec { padding: 14px 8px 6px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.mem-row { display: flex; align-items: center; border-radius: 9px; }
.mem-row:hover { background: var(--panel); }
.mem-row.off { opacity: .45; }
.mem-row.off:hover { opacity: .85; }
.mem-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 8px; border: 0; background: none; text-align: left; }
.mem-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mem-name { min-width: 0; display: flex; align-items: center; gap: 5px; font-size: 14.5px; font-weight: 600; }
/* Nick má přednost: nezmenšuje se, dokud nenarazí na limit; flair dostane zbytek místa a zkrátí se „…" */
.mem-nick { flex: 0 0 auto; max-width: calc(100% - 20px); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mem-name:has(.flair) .mem-nick { max-width: calc(100% - 74px); }
.mem-name .badge { flex: none; }
.mem-name .flair { flex: 0 1 auto; min-width: 0; max-width: 96px; height: 17px; font-size: 10.5px; line-height: 15px; }
.mem-sub { overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.mem-dm { width: 30px; height: 30px; flex: none; display: grid; place-items: center; margin-right: 4px; border: 0; border-radius: 50%; background: none; color: var(--muted); opacity: 0; transition: opacity .12s, background .12s; }
.mem-row:hover .mem-dm, .mem-dm:focus-visible { opacity: 1; }
.mem-dm:hover { background: var(--panel3); color: var(--txt); }
.mem-empty { padding: 10px; }
.members .online-dot { border-color: var(--bg2); }
#btnOnline { cursor: pointer; }
.members-open #btnOnline { border-color: rgba(var(--brand-rgb), .6); }

/* Užší obrazovky: panel vyjede zprava přes chat */
@media (max-width: 1099px) {
  .members {
    position: fixed;
    z-index: 40;
    top: calc(var(--app-top, 0px) + var(--maint-bar, 0px));
    right: 0;
    height: calc(var(--app-h) - var(--maint-bar, 0px));
    width: min(320px, 86vw);
    display: flex;
    border-left: 1px solid var(--line2);
    box-shadow: var(--shadow);
    transform: translateX(105%);
    transition: transform .26s var(--ease);
  }
  .members-open .members { transform: none; }
  .mem-back {
    position: fixed;
    z-index: 39;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s;
  }
  .members-open .mem-back { opacity: 1; pointer-events: auto; }
  .mem-dm { opacity: 1; }
  .mem-row.off { opacity: .55; }
}
@media (min-width: 1100px) {
  .mem-head .icon-btn { display: none; }
}

/* ---- bez růžových rámečků po kliknutí (jen jemné zesvětlení okraje) */
input:focus, textarea:focus { border-color: rgba(255, 255, 255, .22); }
input:focus-visible, textarea:focus-visible { outline: none; }
:focus-visible { outline: 2px solid rgba(255, 255, 255, .35); outline-offset: 2px; }
.cbar:focus-within, .input-wrap:focus-within, .pk-search:focus-within { border-color: transparent; }

/* ---- panel členů: šířky viz „panel Členové“ níž */
.mem-name:has(.flair) .mem-nick { max-width: calc(100% - 60px); }
.mem-name .flair { max-width: 150px; }

/* ---- stránka místo chatu (administrace) */
.page-open .chat > :not(.page) { display: none !important; }
.page { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.page-head { display: flex; align-items: center; gap: 8px; min-height: calc(58px + var(--safe-t)); padding: var(--safe-t) 12px 0 8px; border-bottom: 1px solid var(--line); }
.page-head h1 { margin: 0; font-size: 18px; font-weight: 800; }
.page-body { flex: 1; min-height: 0; display: flex; }
.adm { flex: 1; min-height: 0; display: flex; }
.adm-nav { width: 210px; flex: none; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--line); }
.adm-tab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: var(--txt2); font-weight: 700; text-align: left; }
.adm-tab:hover { background: var(--panel); color: var(--txt); }
.adm-tab.on { background: var(--panel2); color: var(--txt); }
.adm-tab.danger { color: var(--danger); margin-top: auto; }
.adm-content { flex: 1; min-width: 0; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
/* posuvník u pravé hrany okna, obsah vycentrovaný s max. šířkou */
.adm-content > * { width: 100%; max-width: 900px; margin-inline: auto; }
.adm-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); }
.adm-card h3 { margin: 0; font-size: 15px; font-weight: 800; }
@media (max-width: 760px) {
  .adm { flex-direction: column; }
  .adm-nav { width: auto; flex-direction: row; overflow-x: auto; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .adm-tab { flex: none; padding: 8px 12px; }
  .adm-tab.danger { margin-top: 0; }
  .adm-content { padding: 12px; }
}

/* ---- výběr emoji ve stylu Discordu */
.emoji-picker .ep-top { display: flex; align-items: center; padding: 6px 6px 0 0; }
.emoji-picker .ep-top .pk-search { flex: 1; }
.ep-main { flex: 1; min-height: 0; display: flex; }
.ep-nav { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; overflow-y: auto; border-right: 1px solid var(--line); scrollbar-width: none; }
.ep-navbtn { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border: 0; border-radius: 9px; background: none; color: var(--muted); }
.ep-navbtn:hover { color: var(--txt); background: var(--panel3); }
.ep-navbtn.on { color: var(--txt); background: var(--panel2); }
.ep-navlogo { width: 24px; height: 24px; border-radius: 50%; }
.ep-body { flex: 1; min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 8px 8px; }
.ep-sec { content-visibility: auto; contain-intrinsic-size: auto 300px; }
.ep-sec-h { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px; padding: 8px 2px 6px; background: var(--bg2); color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.ep-seclogo { width: 14px; height: 14px; border-radius: 50%; }
.ep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 2px; }
.ep-item { height: 42px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; font-size: 26px; line-height: 1; }
.ep-item:hover, .ep-item:focus-visible { background: var(--panel3); outline: none; }
.ep-empty { margin: 0 0 8px; padding: 4px 2px; color: var(--muted); font-size: 12.5px; }
.ep-foot { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 6px 12px; border-top: 1px solid var(--line); }
.ep-prev-e { font-size: 26px; line-height: 1; display: grid; place-items: center; }
.ep-prev-n { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.ep-hint { color: var(--muted); font-size: 12px; }
.ep-star { width: 34px; height: 34px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel2); color: var(--muted); }
.ep-star.on { color: #f7c948; }
.ep-star.on svg { fill: currentColor; }
.picker-slot:has(.emoji-picker:not([hidden])) { height: min(56vh, 460px); }

/* ---- profil: bio a Instagram */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ig-field { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.card-about { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 4px; }
.card-bio { margin: 0; color: var(--txt2); font-size: 14px; text-align: center; white-space: pre-wrap; overflow-wrap: anywhere; }
.ig-link { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--panel2); color: var(--txt); font-size: 13px; font-weight: 700; text-decoration: none; }
.ig-link:hover { background: var(--panel3); }

/* ---- rozbalovací výběr (flair) */
.select {
  min-width: 0;
  height: 36px;
  padding: 0 32px 0 11px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--panel2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23b3afb9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  color: var(--txt);
  font: inherit;
  font-size: 14px;
  appearance: none;
  cursor: pointer;
}
.select:focus { border-color: rgba(255, 255, 255, .22); outline: none; }
.select optgroup, .select option { background: var(--panel); color: var(--txt); }

/* ---- administrace: účty */
.acc-list { display: flex; flex-direction: column; gap: 4px; }
.acc-row { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 4px; border-radius: 12px; }
.acc-row:hover { background: var(--panel2); }
.acc-row.banned { opacity: .6; }
.acc-who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 2px; border: 0; background: none; text-align: left; }
.acc-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.acc-actions { flex: none; display: flex; align-items: center; gap: 6px; }
.acc-actions .select { width: 150px; height: 32px; font-size: 13px; }
@media (max-width: 700px) {
  .acc-row { flex-wrap: wrap; }
  .acc-actions { width: 100%; padding-left: 50px; }
  .acc-actions .select { flex: 1; width: auto; }
}

/* ---- administrace: flairy */
.fl-list { display: flex; flex-direction: column; gap: 4px; }
.fl-group { padding: 10px 2px 4px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.fl-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--panel2); }
.fl-row .flair { max-width: 60%; height: 22px; padding: 0 9px; font-size: 12.5px; line-height: 20px; }
.adm-card > .btn { align-self: flex-start; }
.page, .page-body, .adm { min-width: 0; }
.adm-content { overflow-x: hidden; }
.adm-card { min-width: 0; }
.emoji-picker .ep-sec { padding: 0; color: inherit; font-size: inherit; font-weight: inherit; letter-spacing: normal; text-transform: none; }

/* ---- VIP flair: plná barva, jemná záře a přejíždějící odlesk */
.flair.vip {
  position: relative;
  font-weight: 800;
  box-shadow: 0 0 10px -3px var(--fc), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.flair.vip::after {
  content: '';
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: -70%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
  transform: skewX(-20deg);
  animation: flair-shine 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes flair-shine {
  0% { left: -70%; }
  40%, 100% { left: 140%; }
}

/* ---- editor flairu: výběr barvy */
.flair-color-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.color-pick { width: 44px; height: 32px; padding: 2px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); cursor: pointer; }
.color-pick::-webkit-color-swatch-wrapper { padding: 0; }
.color-pick::-webkit-color-swatch { border: 0; border-radius: 6px; }
.color-pick::-moz-color-swatch { border: 0; border-radius: 6px; }
.color-hex { width: 92px; height: 32px; padding: 0 8px; font: 600 13px ui-monospace, Consolas, monospace; text-transform: uppercase; }
.vip-tag { padding: 1px 6px; border-radius: 4px; background: linear-gradient(90deg, #f7c948, #ff6b35); color: #16141a; font-size: 10px; font-weight: 900; letter-spacing: .4px; }

/* ---- vzdušnější zprávy a reakce (rozměry podle Discordu) */
.msg { margin-top: 18px; padding-top: 3px; padding-bottom: 3px; }
.msg.cont { margin-top: 0; padding-top: 1px; padding-bottom: 1px; }
.m-body { font-size: 16px; line-height: 1.375; }
.m-head { margin-bottom: 1px; }
.m-nick { font-size: 16px; font-weight: 600; }
.m-time { font-size: 12px; margin-left: 2px; }

.m-rx { gap: 6px; margin-top: 6px; margin-bottom: 2px; }
.rx, .rx-add {
  height: 28px;
  gap: 6px;
  padding: 0 9px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: #1f1e24;
  color: var(--txt2);
  font-size: 14px;
  font-weight: 600;
}
.rx .uem { font-size: 17px; }
.rx .cem { width: 19px !important; height: 19px !important; }
.rx-n { min-width: 8px; text-align: center; }
.rx:hover { border-color: rgba(255, 255, 255, .18); background: #26252c; }
.rx.on { border-color: rgba(var(--brand-rgb), .55); background: rgba(var(--brand-rgb), .14); color: #ffcfe5; }
.rx.on:hover { border-color: rgba(var(--brand-rgb), .8); }
.rx-add { padding: 0 8px; color: var(--muted); }

/* ---- odpověď: zahnutá čára od avataru k původní zprávě (jako Discord) */
.m-reply { gap: 6px; margin: 0 0 6px; padding-left: 56px; font-size: 13.5px; }
.m-reply-curve {
  left: 19px;
  top: 50%;
  width: 31px;
  height: calc(50% + 6px);
  border-left: 2px solid #4a4752;
  border-top: 2px solid #4a4752;
  border-top-left-radius: 8px;
}
.m-reply .av { flex: none; }
.m-reply b { font-weight: 600; opacity: .95; }
.m-reply-x { color: var(--muted); opacity: 1; }
.m-reply:hover .m-reply-x { color: var(--txt2); }
.m-reply:hover b { text-decoration: underline; }

/* ---- desktop: picker (emoji / GIF / samolepky) vpravo nad ikonami, s mezerou od lišty */
@media (min-width: 901px) {
  .picker-slot { left: auto; right: 16px; bottom: calc(100% + 8px); }
}
@media (min-width: 901px) {
  .picker-slot { max-height: calc(var(--app-h) - 150px); }
}

/* ---- stav v kartě uživatele: mezera mezi tečkou a textem */
.status-line { display: inline-flex; align-items: center; gap: 8px; }
.status-line .dot { margin-right: 0; }

/* ---- počet zpráv za 24 h v hlavičce */
.pill-msgs { gap: 6px; color: var(--txt2); cursor: default; }
.pill-msgs .ic { color: var(--muted); }
.top-actions .pill-msgs { margin-right: 2px; }
@media (max-width: 420px) {
  .top-actions .pill { padding: 0 9px; gap: 5px; }
}

/* ---- vstupní obrazovka: upozornění na mazání nezabraného nicku */
.gate-note {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(var(--brand-rgb), .25);
  background: rgba(var(--brand-rgb), .07);
  color: var(--txt2);
  font-size: 13px;
  line-height: 1.45;
}
.gate-note b { color: var(--txt); }

/* ---- oblíbené GIFy: hvězdička v rohu */
.pk-cell { position: relative; }
.pk-star {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  opacity: 0;
  transition: opacity .12s, transform .12s, color .12s;
  backdrop-filter: blur(4px);
}
.pk-cell:hover .pk-star, .pk-star:focus-visible, .pk-star.on { opacity: 1; }
.pk-star:hover { transform: scale(1.1); }
.pk-star.on { color: #f7c948; }
.pk-star.on svg { fill: currentColor; }
@media (hover: none) {
  .pk-star { opacity: .85; width: 28px; height: 28px; }
}

/* ---- GIF v chatu: hvězdička do oblíbených po najetí */
.m-gif { position: relative; display: inline-block; }
.m-gif .pk-star { opacity: 0; }
.m-gif:hover .pk-star, .m-gif .pk-star:focus-visible { opacity: 1; }
.m-gif .pk-star.on { opacity: 0; }
.m-gif:hover .pk-star.on { opacity: 1; }
@media (hover: none) { .m-gif .pk-star { display: none; } }

/* ---- picker: úvodní dlaždice jako na Discordu */
.pk-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pk-tile {
  position: relative;
  height: 96px;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--panel3);
  transition: transform .12s, filter .12s;
}
.pk-tile:hover { filter: brightness(1.15); }
.pk-tile:active { transform: scale(.97); }
.pk-tile-bg { position: absolute !important; inset: 0; width: 100% !important; height: 100% !important; aspect-ratio: auto !important; object-fit: cover; border-radius: 0 !important; }
.pk-tile-bg video, .pk-tile-bg img { object-fit: cover; }
.pk-tile::after { content: ''; position: absolute; inset: 0; background: rgba(10, 9, 12, .55); transition: background .12s; }
.pk-tile:hover::after { background: rgba(10, 9, 12, .4); }
.pk-tile.fav::after { background: linear-gradient(135deg, rgba(var(--brand-rgb), .85), rgba(124, 77, 255, .75)); }
.pk-tile.trend::after { background: rgba(20, 18, 40, .6); }
.pk-tile.car { background: linear-gradient(135deg, #2c1b26, #1b1a22); }
.pk-tile.car::after { background: linear-gradient(135deg, rgba(var(--brand-rgb), .25), transparent); }
.pk-tile-label {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
}
.pk-crumb { display: flex; align-items: center; gap: 6px; padding: 0 0 8px; font-size: 14px; }
.pk-crumb-star { color: #f7c948; fill: currentColor; }

/* ---- moje reakce: o ~40 % jemnější rámeček a podklad */
.rx.on { border-color: rgba(var(--brand-rgb), .33); background: rgba(var(--brand-rgb), .085); color: #f5d6e5; }
.rx.on:hover { border-color: rgba(var(--brand-rgb), .5); }

/* ---- mobil: odlehčená hlavička (logo + počítadla + ikony; administrace je v profilu) */
@media (max-width: 520px) {
  .top { gap: 4px; padding-left: 10px; padding-right: 6px; }
  body:not(.in-dm) .top-id .top-txt { display: none; }
  .top-logo { height: 26px; }
  .top-actions { gap: 0; }
  .top-actions .pill { height: 30px; padding: 0 8px; gap: 5px; font-size: 12.5px; margin-right: 2px; }
  .top-actions .icon-btn { width: 38px; height: 38px; }
  #btnAdmin { display: none !important; }
  .me-btn .av { width: 30px !important; height: 30px !important; }
}
.admin-entry { justify-content: flex-start; border-color: rgba(var(--brand-rgb), .35); }
.nbadge.inline { position: static; margin-left: auto; border: 0; }

/* ---- import balíčku: náhled emoji */
.pk-preview { display: flex; flex-wrap: wrap; gap: 4px; max-height: 120px; overflow-y: auto; padding: 6px; border-radius: 10px; background: var(--panel2); }
.pk-preview img { width: 28px; height: 28px; object-fit: contain; }
.ep-navlogo.pack-ic { border-radius: 6px; object-fit: contain; }

/* ---- rozbalovací výběr ve stylu aplikace */
.dd {
  min-width: 0;
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 11px;
  border-radius: 10px;
  border: 1px solid var(--line2);
  background: var(--panel2);
  color: var(--txt);
  font-size: 14px;
  text-align: left;
  transition: border-color .15s, background .15s;
}
.dd:hover { border-color: rgba(255, 255, 255, .22); }
.dd.open { border-color: rgba(255, 255, 255, .3); background: var(--panel3); }
.dd-val { flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; }
.dd-caret { flex: none; color: var(--muted); transition: transform .15s; }
.dd.open .dd-caret { transform: rotate(180deg); }
.dd-menu {
  position: fixed;
  z-index: 200;
  max-width: min(320px, calc(100vw - 16px));
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line2);
  background: var(--panel);
  box-shadow: var(--shadow);
  animation: pop .14s var(--ease);
}
.dd-group { padding: 8px 8px 4px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.dd-opt {
  width: 100%;
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  text-align: left;
}
.dd-opt:hover, .dd-opt:focus-visible { background: var(--panel3); outline: none; }
.dd-opt.on { background: rgba(var(--brand-rgb), .1); }
.dd-opt-l { flex: 1; min-width: 0; display: flex; align-items: center; }
.dd-opt .flair, .dd .flair { max-width: 100%; }
.dd-check { flex: none; color: var(--brand2); }
.acc-actions .dd { width: 170px; height: 32px; }
.card > .dd { align-self: flex-start; min-width: 200px; }
.admin-box .dd { align-self: flex-start; min-width: 200px; }

/* ---- balíčky: rozbalení, vyškrtávání v náhledu */
.pack-box { display: flex; flex-direction: column; gap: 8px; border-radius: 10px; }
.pack-row { padding: 0 8px 0 0; }
.pack-toggle { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; padding: 6px 4px 6px 8px; border: 0; background: none; text-align: left; }
.pack-caret { flex: none; color: var(--muted); transform: rotate(-90deg); transition: transform .15s; }
.pack-box.open .pack-caret { transform: none; }
.pack-grid { padding: 0 4px 6px; }
.pk-preview { max-height: 220px; }
.pk-pv { position: relative; width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid transparent; border-radius: 8px; background: none; }
.pk-pv:hover { background: var(--panel3); }
.pk-pv img { width: 30px; height: 30px; object-fit: contain; }
.pk-pv.off img { opacity: .25; filter: grayscale(1); }
.pk-pv.off::after { content: ''; position: absolute; left: 6px; right: 6px; top: 50%; height: 2px; border-radius: 2px; background: var(--danger); transform: rotate(-35deg); }
.pk-dup { position: absolute; left: 0; right: 0; bottom: -2px; color: #f7c948; font-size: 8.5px; font-weight: 800; text-align: center; }

/* ---- emoji v administraci: přetahování mezi balíčky */
.em-tile { cursor: grab; }
.em-tile.dragging { opacity: .4; }
.em-move { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--panel3); color: var(--muted); opacity: 0; transition: opacity .12s; }
.em-tile:hover .em-move, .em-move:focus-visible { opacity: 1; }
.em-move:hover { background: var(--info); color: #fff; }
@media (hover: none) { .em-move { opacity: 1; } }
.em-dragging .pack-box, .em-dragging .em-admin:not(.pack-grid) { outline: 1px dashed rgba(255, 255, 255, .18); outline-offset: 2px; border-radius: 10px; }
.drop-on { outline: 2px solid var(--brand) !important; outline-offset: 2px; background: rgba(var(--brand-rgb), .08); border-radius: 10px; }

/* ---- odkazy a vložené přehrávače (YouTube, Spotify, TikTok, Instagram) */
.m-link { color: var(--info); text-decoration: none; word-break: break-all; }
.m-link:hover { text-decoration: underline; }
.emb { --emb: #ff0033; display: flex; flex-direction: column; gap: 4px; width: min(400px, 100%); margin-top: 6px; padding: 10px 12px 12px; border-left: 3px solid var(--emb); border-radius: 6px; background: var(--panel2); }
.emb-sp { --emb: #1ed760; }
.emb-tt { --emb: #25f4ee; }
.emb-ig { --emb: #e1306c; }
.emb.vert { width: min(220px, 100%); }
.emb-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.emb-src { display: inline-flex; align-items: center; gap: 6px; color: var(--txt2); font-size: 12px; font-weight: 700; }
.emb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emb); }
.emb-open { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; color: var(--muted); }
.emb-open:hover { background: var(--panel3); color: var(--txt); }
.emb-title { display: -webkit-box; overflow: hidden; color: var(--txt); font-size: 14px; line-height: 1.3; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.emb-title:empty, .emb-author:empty { display: none; }
.emb-author { color: var(--muted); font-size: 12.5px; }
.emb-media { position: relative; width: 100%; aspect-ratio: 16 / 9; margin-top: 4px; overflow: hidden; border-radius: 8px; background: #000; }
.emb.vert .emb-media { aspect-ratio: 9 / 16; }
.emb-ig .emb-media { aspect-ratio: 4 / 5.6; background: #fff; }
.emb-sp .emb-media { aspect-ratio: auto; height: 152px; background: var(--panel3); }
.emb-sp.tall .emb-media { height: 352px; }
.emb-play { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: linear-gradient(135deg, rgba(var(--brand-rgb), .25), rgba(0, 0, 0, .6)); cursor: pointer; }
.emb-ig .emb-play { background: linear-gradient(135deg, #feda75, #d62976 55%, #4f5bd5); }
.emb-sp .emb-play { background: linear-gradient(135deg, rgba(29, 185, 84, .25), var(--panel3)); }
.emb-thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.emb-sp .emb-thumb { inset: 16px auto 16px 16px; width: auto; height: calc(100% - 32px); aspect-ratio: 1; border-radius: 8px; }
.emb-thumb.on { opacity: 1; }
.emb-btn { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 60px; height: 42px; border-radius: 12px; background: rgba(0, 0, 0, .7); color: #fff; transform: translate(-50%, -50%); transition: background .15s, transform .15s; }
.emb-btn .ic { fill: currentColor; stroke: none; }
.emb-sp .emb-btn .ic { fill: none; stroke: currentColor; }
.emb-yt .emb-play:hover .emb-btn { background: var(--emb); }
.emb-play:hover .emb-btn { transform: translate(-50%, -50%) scale(1.06); }
.emb-sp .emb-btn { left: auto; right: 22px; width: 48px; height: 48px; border-radius: 50%; background: var(--emb); color: #000; transform: translateY(-50%); }
.emb-sp .emb-play:hover .emb-btn { transform: translateY(-50%) scale(1.06); }
.emb-frame { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- statistiky v administraci */
.chip.on { border-color: transparent; background: var(--brand); color: #fff; }
.lb-chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.lb-chips::-webkit-scrollbar { display: none; }
.lb-filter { flex: 1; max-width: 420px; }
.kpis { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.kpi-d { margin-top: 2px; color: var(--muted); font-size: 11.5px; font-style: normal; font-weight: 700; }
.kpi-d.up { color: var(--ok); }
.kpi-d.down { color: var(--danger); }

.chart { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--txt2); font-size: 12px; }
.ch-legend span, .ch-val { display: inline-flex; align-items: center; gap: 6px; }
.ch-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.ch-dot.line { height: 3px; border-radius: 2px; }
.c1 { --c: var(--brand); }
.c2 { --c: #7c6dff; }
.c3 { --c: var(--info); }
.c4 { --c: #f7c948; }
.c5 { --c: var(--ok); }
.ch-wrap { position: relative; padding-top: 16px; }
.ch-max { position: absolute; top: 0; left: 0; color: var(--muted); font-size: 10.5px; }
.ch-max.r { left: auto; right: 0; color: #f7c948; }
.ch-plot { height: 170px; touch-action: pan-y; cursor: crosshair; }
.ch-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-hit { fill: transparent; }
.ch-col.on .ch-hit { fill: rgba(255, 255, 255, .06); }
.ch-bar { fill: var(--c); opacity: .85; }
.ch-col.on .ch-bar { opacity: 1; }
.ch-line { stroke: var(--c); stroke-width: 2; stroke-linejoin: round; }
.ch-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.ch-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 36px; padding: 8px 10px; border-radius: 10px; background: var(--panel2); font-size: 13px; }

.hm { display: grid; grid-template-columns: 24px repeat(24, minmax(0, 1fr)); gap: 2px; }
.hm-h { color: var(--muted); font-size: 10px; }
.hm-d { color: var(--muted); font-size: 11px; line-height: 16px; }
.hm-c { height: 16px; border-radius: 3px; background: rgba(var(--brand-rgb), var(--a)); }
.hm-c.zero { background: var(--panel2); }
.hm-c:hover { outline: 1px solid var(--txt); }

.tl { position: relative; display: flex; flex-direction: column; gap: 14px; padding-left: 4px; }
.tl::before { content: ""; position: absolute; top: 6px; bottom: 6px; left: 17px; width: 2px; background: var(--line2); }
.tl-it { position: relative; display: flex; align-items: flex-start; gap: 12px; }
.tl-ic { position: relative; z-index: 1; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--panel); background: var(--panel3); color: var(--txt2); }
.tl-it.ms .tl-ic { background: var(--info); color: #fff; }
.tl-it.rec .tl-ic { background: #f7c948; color: #000; }
.tl-it.wave .tl-ic { background: var(--brand); color: #fff; }
.tl-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding-top: 2px; }
.tl-day { color: var(--muted); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.tl-more { align-self: flex-start; margin-left: 40px; }

.lb-list { display: flex; flex-direction: column; gap: 2px; }
.lb-row { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; border: 0; border-radius: 10px; background: none; color: var(--txt); text-align: left; }
.lb-row:hover { background: var(--panel2); }
.lb-row.banned { opacity: .5; }
.lb-rank { display: grid; place-items: center; flex: none; min-width: 26px; height: 26px; padding: 0 4px; border-radius: var(--r-pill); background: var(--panel2); color: var(--muted); font-size: 12px; font-weight: 800; }
.lb-rank.r1 { background: #f7c948; color: #2a2100; }
.lb-rank.r2 { background: #c9ced6; color: #1d2026; }
.lb-rank.r3 { background: #d08a4e; color: #2a1606; }
.lb-txt { display: flex; flex-direction: column; gap: 1px; flex: 1; min-width: 0; }
.lb-val { flex: none; max-width: 42%; overflow: hidden; color: var(--txt); font-size: 13.5px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.lb-on { flex: none; width: 8px; height: 8px; margin-left: 2px; border-radius: 50%; background: var(--ok); }
.lb-more { align-self: center; margin-top: 6px; }

.tm { display: flex; align-items: flex-start; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); color: var(--txt); text-align: left; }
.tm.link { cursor: pointer; }
.tm.link:hover { border-color: var(--line2); }
.tm-main { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.tm-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.tm-head .muted { flex: none; margin-left: auto; }
.tm-text { overflow-wrap: anywhere; color: var(--txt2); font-size: 14px; line-height: 1.35; }
.tm-gif { max-width: 160px; max-height: 120px; border-radius: 8px; object-fit: cover; }
.tm-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.tm-people { display: inline-flex; align-items: center; gap: 4px; color: var(--brand2); font-size: 12.5px; font-weight: 800; }
.tm-rx { display: flex; flex-wrap: wrap; gap: 5px; }
.tm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px 2px 5px; border-radius: var(--r-pill); background: var(--panel3); font-size: 12px; }
.tm-chip .uem { font-size: 15px; line-height: 1; }
.tm-rx.big { gap: 8px; }
.tm-rx.big .tm-chip { padding: 5px 12px 5px 8px; font-size: 13.5px; }
.tm-rx.big .uem { font-size: 22px; }

.sheet-wide { max-width: 640px; }
.us-head { display: flex; align-items: center; gap: 12px; }
.us-who { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.us-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 18px; }
.us-fact { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.us-fact b { text-align: right; }
.us-h { margin: 6px 0 0; font-size: 14px; font-weight: 800; }
@media (hover: hover) { .lb-chips { flex-wrap: wrap; overflow: visible; } }

/* ---- modul Leaderboard (panel Členové) */
.lbw { display: flex; flex-direction: column; gap: 1px; margin: 4px 0 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(247, 201, 72, .07), transparent 70%); }
.lbw-head { display: flex; align-items: center; gap: 7px; width: 100%; padding: 6px 6px 6px 8px; border: 0; border-radius: 8px; background: none; color: #f7c948; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-align: left; text-transform: uppercase; }
.lbw-head:hover { background: rgba(255, 255, 255, .04); }
.lbw-sub { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.lbw-caret { color: var(--muted); transition: transform .15s; }
.lbw.closed .lbw-caret { transform: rotate(-90deg); }
.lbw-row { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: var(--txt); text-align: left; }
.lbw-row:hover { background: var(--panel2); }
.lb-rank.sm { min-width: 20px; height: 20px; font-size: 10.5px; }
.lbw-name { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.lbw-name .mem-nick { max-width: 100%; }
.lbw-n { display: inline-flex; align-items: center; gap: 4px; flex: none; color: var(--txt2); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lbw-n .ic { color: var(--muted); }
.lbw-empty { display: grid; place-items: center; padding: 8px; }

/* ---- modul Cover (pruh za avatarem v kartě profilu) */
.prof-cover {
  position: absolute; top: 0; left: 0; right: 0; z-index: 0; height: 270px; overflow: hidden;
  border-radius: 24px 24px 0 0; opacity: 0; pointer-events: none; transition: opacity .25s;
  clip-path: inset(0 round 24px 24px 0 0); /* kulaté rohy drží i při stahování prstem (mobilní Chrome) */
  /* plynule do ztracena: spodek se postupně zprůhlední až do pozadí karty */
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, .55) 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 42%, rgba(0, 0, 0, .55) 70%, transparent 100%);
}
.prof-cover.on { opacity: 1; }
.prof-cover img, .prof-cover .gbox, .prof-cover video { position: absolute; inset: 0; width: 100% !important; height: 100%; aspect-ratio: auto !important; object-fit: cover; border-radius: 0; }
.prof-cover .gbox { background-size: cover; background-position: center; }
/* Pozor: žádný backdrop-filter. Prosvítal přes něj chat za sheetem a při stahování prstem
   se na mobilu vykreslil jako hranatý rozmazaný blok. Mizení řeší jen maska a ztmavení. */
/* ztmavení nahoře kvůli křížku, dole do barvy karty */
.prof-cover::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, rgba(0, 0, 0, .3) 0%, transparent 28%, rgba(25, 24, 29, .35) 60%, rgba(25, 24, 29, .75) 100%); }
.prof-cover.on ~ .sheet-body .prof-top b, .prof-cover.on ~ .sheet-body .status-line { text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.sheet > .sheet-grip, .sheet > .sheet-head, .sheet > .sheet-body { position: relative; z-index: 1; }
.prof-cover.on ~ .sheet-head .icon-btn { background: rgba(0, 0, 0, .45); color: #fff; }
.prof-cover.on ~ .sheet-grip { background: rgba(255, 255, 255, .45); }

/* ---- Leaderboard: řádek, kterému přibyly zprávy, krátce blikne */
.lbw-row.bump { animation: lbw-bump 1.2s ease-out; }
.lbw-row.bump .lbw-n { animation: lbw-num 1.2s ease-out; }
@keyframes lbw-bump { 0% { background: rgba(247, 201, 72, .22); } 100% { background: transparent; } }
@keyframes lbw-num { 0% { color: #f7c948; transform: scale(1.18); } 40% { transform: scale(1); } 100% { color: var(--txt2); } }
@media (prefers-reduced-motion: reduce) { .lbw-row.bump, .lbw-row.bump .lbw-n { animation: none; } }

/* ---- zabrání nicku nahoře v profilu */
.claim-warn { display: flex; align-items: center; gap: 6px; margin: 0; color: #ffb3d6; font-size: 12.5px; font-weight: 600; }
.claim-warn .ic { flex: none; }

/* ---- sheet: odscrollovaný obsah se nahoře měkce ztrácí (u coveru navíc lehce rozmaže, co je pod hlavičkou) */
.sheet.scrolled > .sheet-body {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .35) 10px, #000 34px);
  mask-image: linear-gradient(180deg, transparent 0, rgba(0, 0, 0, .35) 10px, #000 34px);
}
/* cover se při scrollu plynule ztrácí: zprůhlední, rozmaže a lehce ujede nahoru (--scroll 0..1 nastavuje ui.js) */
.prof-cover.on { opacity: calc(1 - var(--scroll, 0) * .9); }
.prof-cover img, .prof-cover .gbox {
  transform: translateY(calc(var(--scroll, 0) * -40px)) scale(calc(1 + var(--scroll, 0) * .06));
  filter: blur(calc(var(--scroll, 0) * 14px));
}

/* okno s reakcemi: nadpis + „Další akce“ */
.rp-head { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.rp-head h2 { flex: 1; }

/* ---- Leaderboard: záložky */
.lbw-tabs { display: flex; gap: 3px; margin: 0 2px 4px; padding: 3px; border-radius: 9px; background: rgba(0, 0, 0, .25); }
.lbw-tabs button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 5px; min-width: 0; padding: 5px 6px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.lbw-tabs button:hover { color: var(--txt); }
.lbw-tabs button.on { background: var(--panel3); color: #f7c948; box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }

/* ---- modul Pozvánky */
.inv-card { border-color: rgba(247, 201, 72, .3); background: linear-gradient(160deg, rgba(247, 201, 72, .08), var(--panel2) 60%); }
.inv-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; padding: 11px 12px; border: 1px dashed rgba(247, 201, 72, .5); border-radius: 10px; background: rgba(0, 0, 0, .25); color: #f7c948; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14.5px; font-weight: 700; text-align: left; }
.inv-link:hover { border-style: solid; }
.inv-link .ic { flex: none; color: var(--txt2); }
.inv-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inv-recent { display: flex; flex-wrap: wrap; gap: 4px; }
.inv-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(247, 201, 72, .12); color: #f7c948; font-size: 12px; font-weight: 700; }

/* ---- hlavička: online / celkem účtů (chat.js renderHeader, onTotal) */
#btnOnline { position: relative; }
.pill-total { display: inline-flex; align-items: center; gap: 4px; margin-left: -2px; color: var(--muted); font-weight: 700; }
.pill-sep { opacity: .6; }
#onlineCount, #totalCount { font-variant-numeric: tabular-nums; }
#onlineCount { display: inline-block; }
#onlineCount.pop { animation: cnt-pop .45s var(--ease); }
#btnOnline.shake { animation: cnt-shake .65s ease-in-out; border-color: rgba(var(--brand-rgb), .6); }
#btnOnline.shake #totalCount { color: var(--brand2); }
.pill-fly {
  position: absolute; right: 8px; top: -2px; z-index: 5; pointer-events: none;
  color: var(--brand2); font-size: 13px; font-weight: 900; text-shadow: 0 1px 6px rgba(0, 0, 0, .6);
  animation: cnt-fly 1.3s var(--ease) forwards;
}
@keyframes cnt-pop { 0% { transform: scale(1); } 40% { transform: scale(1.35); color: #2fd27a; } 100% { transform: scale(1); } }
@keyframes cnt-shake {
  0%, 100% { transform: translateX(0) rotate(0); }
  15% { transform: translateX(-3px) rotate(-3deg); }
  30% { transform: translateX(3px) rotate(3deg); }
  45% { transform: translateX(-2px) rotate(-2deg); }
  60% { transform: translateX(2px) rotate(1deg); }
  75% { transform: translateX(-1px); }
}
@keyframes cnt-fly { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 15% { opacity: 1; transform: translateY(-6px) scale(1.1); } 100% { opacity: 0; transform: translateY(-26px) scale(1); } }
@media (prefers-reduced-motion: reduce) { #onlineCount.pop, #btnOnline.shake, .pill-fly { animation: none; } }

/* ---- Administrace → Moduly */
.mod-list { display: flex; flex-direction: column; }
.mod-row { padding: 11px 0; border-bottom: 1px solid var(--line); }
.mod-row:last-child { border-bottom: 0; }
.mod-row.child { padding-left: 22px; position: relative; }
.mod-row.child::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 50%; width: 10px; border-left: 2px solid var(--line2); border-bottom: 2px solid var(--line2); border-bottom-left-radius: 6px; }
.mod-row.dim { opacity: .45; }
.mod-row input:disabled { cursor: not-allowed; }

/* ---- modul Servisní zprávy: růžový podklad v barvě loga */
.svc {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  max-width: min(520px, 100%); margin-top: 2px; padding: 11px 14px 13px;
  border: 1px solid rgba(var(--brand-rgb), .6); border-radius: 14px;
  background: linear-gradient(135deg, rgba(var(--brand-rgb), .32), rgba(var(--brand-rgb), .14) 70%);
  box-shadow: 0 6px 22px rgba(var(--brand-rgb), .18);
}
.svc-tag { display: inline-flex; align-items: center; gap: 6px; color: #ffd0e8; font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.svc-h { color: #fff; font-size: 16.5px; font-weight: 800; line-height: 1.3; }
.svc-t { color: #fff; white-space: pre-wrap; overflow-wrap: anywhere; }
.svc-t a { color: #fff; text-decoration: underline; }
.svc-link {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 4px; padding: 8px 14px;
  border-radius: var(--r-pill); background: var(--brand); color: #fff; font-size: 14px; font-weight: 800; text-decoration: none;
}
.svc-link:hover { filter: brightness(1.1); }
.svc .emb { margin-top: 4px; }
.svc-preview { padding: 10px; border: 1px dashed var(--line2); border-radius: 12px; }
/* servisní zpráva: víc místa nad i pod, ať se odliší od běžného hovoru */
.msg.msg-svc { margin-top: 30px; margin-bottom: 12px; }
/* emoji v administraci: křížek a přesun přesně na středu kolečka (bez výchozího paddingu tlačítka) */
.em-del, .em-move { padding: 0; line-height: 0; }
.em-del .ic, .em-move .ic { display: block; flex: none; }

/* ---- modul Legacy: svítící odznaky u nicku (barva --bc, velikost --bs) */
.flair-set { display: inline-flex; align-items: center; gap: 5px; min-width: 0; flex-wrap: nowrap; }
.flair-set > .flair { min-width: 0; }
.lgb {
  --bc: var(--brand); --bs: 16px;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--bs); height: var(--bs); border-radius: 50%;
  color: var(--bc); background: color-mix(in srgb, var(--bc) 22%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 55%, transparent), 0 0 6px color-mix(in srgb, var(--bc) 45%, transparent);
  cursor: help; vertical-align: middle;
}
/* Pulzující záře přes průhlednost vrstvy (běží na grafické kartě, bez překreslování v každém snímku) */
.lgb::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--bc) 80%, transparent), 0 0 14px color-mix(in srgb, var(--bc) 85%, transparent);
  opacity: 0; animation: lgb-glow 2.4s ease-in-out infinite;
}
.lgb .ic { filter: drop-shadow(0 0 3px var(--bc)); }
.lgb img { width: 78%; height: 78%; object-fit: contain; filter: drop-shadow(0 0 3px var(--bc)); }
@keyframes lgb-glow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .lgb::after { animation: none; } }

/* Legacy intel (okno v profilu) */
.lg-open { border-color: rgba(247, 201, 72, .45); color: #f7c948; }
.lg-wait { display: grid; place-items: center; padding: 24px; }
.lg-mine { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--panel2); font-size: 13px; font-weight: 700; }
.lg-chip.pickable { cursor: pointer; color: var(--txt2); }
.lg-chip.pickable.on { border-color: var(--brand); color: var(--txt); background: rgba(var(--brand-rgb), .14); }
.lg-q { gap: 10px; }
.lg-q-top { display: flex; align-items: flex-start; gap: 10px; line-height: 1.35; }
.lg-q-top .lgb { margin-top: 1px; }
.lg-yn button { flex: 1; }
.lg-yn button.on.yes { background: var(--brand); color: #fff; }

/* Legacy v administraci */
.lg-row { align-items: center; gap: 10px; }
.lg-has { display: inline-flex; gap: 4px; margin-top: 2px; }
.lg-badge-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-prev { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.lg-icons { display: flex; flex-wrap: wrap; gap: 6px; }
.lg-ic { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.lg-ic.on { border-color: var(--brand); background: rgba(var(--brand-rgb), .16); }
.lg-colors { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lg-sw { width: 28px; height: 28px; padding: 0; border: 2px solid transparent; border-radius: 50%; }
.lg-sw.on { border-color: #fff; }
.lg-grant { padding: 8px 0; }
.lg-grant-l { display: flex; align-items: center; gap: 10px; }
.lg-grant-l > span:last-child { display: flex; flex-direction: column; }
.switch-row.lg-grant > .lg-grant-l { flex-direction: row; align-items: center; }
/* flair + odznaky v hlavičce zprávy: smrskává se flair, ne nick ani odznaky */
.m-head .flair-set { align-self: center; flex-shrink: 12; }
.m-head .flair-set .flair { flex-shrink: 1; }
.m-head .m-nick { flex-shrink: 1; min-width: 0; text-align: left; } /* zkracuje se až po flairu (ten má flex-shrink 12) */
.m-head .flair-set { gap: 3px; }
.m-head .lgb { --bs: 15px !important; }
/* odznak: ikona přesně na středu kolečka (bez účaří řádku) */
.lgb { line-height: 0; }
.lgb > .ic, .lgb > img { display: block; margin: 0; }
/* panel Členové, účty v administraci: flair se zkracuje, odznaky zůstanou celé vidět */
.mem-name .flair-set { flex: 0 1 auto; min-width: 0; gap: 3px; }
.mem-name .flair-set .flair { flex: 0 1 auto; min-width: 22px; }
.mem-name .lgb { --bs: 15px !important; }
.mem-name:has(.lgb) .mem-nick { max-width: calc(100% - 110px); min-width: 4em; }
.mem-name:has(.lgb):not(:has(.flair)) .mem-nick { max-width: calc(100% - 70px); }
/* Legacy odznaky (karta uživatele): mezera mezi ikonou a textem, text pod sebou */
.switch-row.lg-grant > .lg-grant-l { gap: 12px; }
.switch-row.lg-grant > .lg-grant-l > span:last-child { display: flex; flex-direction: column; gap: 1px; }
.switch-row.lg-grant { gap: 14px; }

/* ---- modul Údržba (maintenance mode) */
.maint-ov {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px;
  background: rgba(8, 7, 10, .55); -webkit-backdrop-filter: blur(14px) saturate(.8); backdrop-filter: blur(14px) saturate(.8);
}
.maint-ov { overflow: hidden; }
/* růžové záře, které se pomalu přelévají za kartou */
.maint-glow { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(60px); opacity: .5; pointer-events: none; }
.maint-glow.g1 { left: -18vmax; top: -22vmax; background: radial-gradient(circle, rgba(var(--brand-rgb), .65), transparent 65%); animation: maint-drift 14s ease-in-out infinite alternate; }
.maint-glow.g2 { right: -20vmax; bottom: -24vmax; background: radial-gradient(circle, rgba(124, 109, 255, .45), transparent 65%); animation: maint-drift 17s ease-in-out infinite alternate-reverse; }
@keyframes maint-drift { from { transform: translate(0, 0) scale(1); } to { transform: translate(8vmax, 6vmax) scale(1.15); } }

/* karta s točícím se zářivým okrajem (kužel barev za vnitřkem karty) */
.maint-card {
  position: relative; width: min(440px, 100%); padding: 2px; overflow: hidden; border-radius: 24px;
  background: rgba(var(--brand-rgb), .5);
  box-shadow: 0 0 0 1px rgba(var(--brand-rgb), .25), 0 20px 60px rgba(0, 0, 0, .55), 0 0 60px rgba(var(--brand-rgb), .28);
}
.maint-card::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; translate: -50% -50%;
  background: conic-gradient(from 0deg, transparent 0 55%, rgba(var(--brand-rgb), .25) 65%, #ff4aa5 78%, #fff 82%, #ff4aa5 86%, transparent 95%);
  animation: maint-spin 4.5s linear infinite;
}
@keyframes maint-spin { to { rotate: 360deg; } }
.maint-inner {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 24px 22px;
  border-radius: 22px; text-align: center;
  background: radial-gradient(120% 70% at 50% 0%, rgba(var(--brand-rgb), .16), transparent 60%), var(--panel);
}
.maint-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border: 1px solid rgba(var(--brand-rgb), .45);
  border-radius: var(--r-pill); background: rgba(var(--brand-rgb), .12); color: #ffb3d6;
  font-size: 11px; font-weight: 800; letter-spacing: .8px; text-transform: uppercase;
}
.maint-chip .ic { animation: maint-wrench 2.4s ease-in-out infinite; transform-origin: 70% 30%; }
@keyframes maint-wrench { 0%, 60%, 100% { rotate: 0deg; } 70% { rotate: -25deg; } 80% { rotate: 15deg; } 90% { rotate: -8deg; } }
.maint-logo { width: 130px; height: auto; margin-top: 4px; filter: drop-shadow(0 0 14px rgba(var(--brand-rgb), .55)); animation: maint-float 3.6s ease-in-out infinite; }
@keyframes maint-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.maint-inner h2 {
  margin: 2px 0 0; font-size: 24px; font-weight: 900; letter-spacing: -.2px;
  background: linear-gradient(90deg, #fff 0%, #ffd0e8 40%, #ff4aa5 50%, #ffd0e8 60%, #fff 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: maint-shine 3.2s linear infinite;
}
@keyframes maint-shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.maint-msg { margin: 0; color: var(--txt); font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
/* pruhovaný průběh jako páska na stavbě */
.maint-progress { position: relative; width: 100%; height: 8px; margin-top: 6px; overflow: hidden; border-radius: var(--r-pill); background: rgba(255, 255, 255, .07); }
.maint-progress i {
  position: absolute; inset: 0 auto 0 0; width: 45%; border-radius: inherit;
  background: repeating-linear-gradient(135deg, var(--brand) 0 10px, #ff4aa5 10px 20px);
  box-shadow: 0 0 12px rgba(var(--brand-rgb), .7);
  animation: maint-bar 1.8s ease-in-out infinite;
}
@keyframes maint-bar { 0% { left: -45%; } 100% { left: 100%; } }
.maint-work { display: inline-flex; align-items: baseline; gap: 2px; margin: 2px 0 0; color: var(--txt2); font-size: 13.5px; font-weight: 700; }
.maint-dots { display: inline-flex; gap: 3px; margin-left: 3px; }
.maint-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: maint-dot 1.2s ease-in-out infinite; }
.maint-dots i:nth-child(2) { animation-delay: .15s; }
.maint-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes maint-dot { 0%, 60%, 100% { translate: 0 0; opacity: .5; } 30% { translate: 0 -4px; opacity: 1; } }
.maint-inner .muted { margin: 0; }
@media (max-width: 420px) { .maint-inner { padding: 22px 18px 18px; } .maint-inner h2 { font-size: 21px; } .maint-logo { width: 110px; } }
@media (prefers-reduced-motion: reduce) {
  .maint-glow, .maint-card::before, .maint-chip .ic, .maint-logo, .maint-inner h2, .maint-progress i, .maint-dots i { animation: none; }
  .maint-progress i { left: 0; width: 100%; }
  .maint-inner h2 { background-position: 0 0; }
}
html.maint-admin { --maint-bar: calc(30px + env(safe-area-inset-top, 0px)); --safe-t: 0px; }
.maint-bar {
  position: fixed; left: 0; right: 0; top: 0; z-index: 999; height: var(--maint-bar);
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: env(safe-area-inset-top, 0px) 10px 0;
  background: repeating-linear-gradient(135deg, #f7c948 0 14px, #e8b52e 14px 28px); color: #16141a; font-size: 12.5px; letter-spacing: .4px;
}
.maint-bar b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.maint-off { flex: none; padding: 3px 10px; border: 0; border-radius: var(--r-pill); background: #16141a; color: #f7c948; font-size: 12px; font-weight: 800; }
/* lišta údržby: sheety začínají pod ní */
html.maint-admin .sheet-wrap { top: var(--maint-bar); }
html.maint-admin .sheet { max-height: calc(var(--app-h) - 36px - var(--maint-bar)); }
html.maint-admin .sheet-tall { height: calc(var(--app-h) - 36px - var(--maint-bar)); }

/* ---- úvodní obrazovka: karta se zářivým obíhajícím okrajem (jako údržba), záře v pozadí, vznášející se logo */
@property --gate-ang { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.gate::before, .gate::after {
  content: ""; position: fixed; z-index: 0; width: 70vmax; height: 70vmax; border-radius: 50%; filter: blur(70px); opacity: .45; pointer-events: none;
}
.gate::before { left: -25vmax; top: -30vmax; background: radial-gradient(circle, rgba(var(--brand-rgb), .6), transparent 65%); animation: maint-drift 16s ease-in-out infinite alternate; }
.gate::after { right: -28vmax; bottom: -32vmax; background: radial-gradient(circle, rgba(124, 109, 255, .38), transparent 65%); animation: maint-drift 19s ease-in-out infinite alternate-reverse; }
.gate-card {
  position: relative; z-index: 1; max-width: 430px; padding: 24px 22px 18px;
  border: 2px solid transparent; border-radius: 26px;
  background:
    radial-gradient(120% 60% at 50% 0%, rgba(var(--brand-rgb), .14), transparent 60%) padding-box,
    linear-gradient(var(--panel), var(--panel)) padding-box,
    conic-gradient(from var(--gate-ang), rgba(var(--brand-rgb), .25) 0 55%, #ff4aa5 72%, #fff 78%, #ff4aa5 84%, rgba(var(--brand-rgb), .25) 100%) border-box;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .5), 0 0 70px rgba(var(--brand-rgb), .22);
  animation: gate-spin 6s linear infinite;
}
@keyframes gate-spin { to { --gate-ang: 360deg; } }
.gate-logo { animation: maint-float 3.6s ease-in-out infinite; }
@media (max-width: 420px) { .gate-card { padding: 20px 16px 14px; border-radius: 22px; } }
@media (prefers-reduced-motion: reduce) { .gate::before, .gate::after, .gate-card, .gate-logo { animation: none; } }

/* ---- modul Beta (úvodní obrazovka) */
.beta {
  display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid rgba(var(--brand-rgb), .4); border-radius: 16px;
  background: linear-gradient(160deg, rgba(var(--brand-rgb), .16), rgba(var(--brand-rgb), .04) 70%);
}
.beta-head { display: flex; align-items: center; gap: 10px; }
.beta-head b { font-size: 15.5px; font-weight: 800; }
.beta-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: var(--r-pill);
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase;
}
.beta-pulse { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: beta-pulse 1.6s ease-in-out infinite; }
@keyframes beta-pulse { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); } 50% { opacity: .6; box-shadow: 0 0 0 5px rgba(255, 255, 255, 0); } }
.beta-txt { margin: 0; color: var(--txt2); font-size: 14px; line-height: 1.45; }
.beta-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.beta-stat { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .22); }
.beta-stat-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--brand-rgb), .16); color: var(--brand2); }
.beta-stat-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.beta-stat.on .beta-stat-ic { background: rgba(47, 210, 122, .14); }
.beta-stat b { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.beta-stat-txt > span { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.beta-dot { width: 10px; height: 10px; border-radius: 50%; background: #2fd27a; box-shadow: 0 0 0 0 rgba(47, 210, 122, .6); animation: beta-online 1.8s ease-out infinite; }
@keyframes beta-online { 0% { box-shadow: 0 0 0 0 rgba(47, 210, 122, .6); } 100% { box-shadow: 0 0 0 9px rgba(47, 210, 122, 0); } }
.beta-ig {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 14px; border-radius: 13px;
  background: linear-gradient(90deg, #f58529, #dd2a7b 45%, #8134af 80%, #515bd4); color: #fff; font-size: 14.5px; font-weight: 800; text-decoration: none;
  box-shadow: 0 6px 20px rgba(221, 42, 123, .35);
}
.beta-ig:hover { filter: brightness(1.08); }
.beta-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0; color: var(--muted); font-size: 12.5px; }
/* Beta bez pozvánky: jen přihlášení */
.gate.beta-locked .seg [data-mode="new"], .gate.beta-locked #gateNew { display: none !important; }
.gate.beta-locked .seg { display: none; }
@media (prefers-reduced-motion: reduce) { .beta-pulse, .beta-dot { animation: none; } }
/* úvodní karta: víc vzduchu nad logem (logo se navíc vznáší o 6 px nahoru) */
.gate-card { padding-top: 34px; }
.gate-logo { margin-top: 6px; }
@media (max-width: 420px) { .gate-card { padding-top: 28px; } }
/* Beta bez pozvánky: přihlášení až po tlačítku, na mobilu bez scrollování */
.gate.beta-locked:not(.beta-login) #gateLogin { display: none !important; }
.gate.beta-locked .gate-sub { display: none; }
.gate.beta-login .beta { display: none !important; }
.beta-back { display: none; align-self: flex-start; align-items: center; gap: 6px; padding: 6px 10px 6px 6px; border: 0; border-radius: var(--r-pill); background: none; color: var(--txt2); font-size: 13.5px; font-weight: 700; }
.beta-back:hover { color: var(--txt); background: var(--panel2); }
.gate.beta-login .beta-back { display: inline-flex; }
.beta-login-btn { width: 100%; justify-content: center; }
.gate.beta-locked .gate-err:empty { display: none; }
/* kdo píše: jména tučně, dlouhý seznam se ořízne třemi tečkami (nezalomí se) */
.tdots { flex: none; }
.ttxt { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttxt b { color: var(--txt2); font-weight: 700; }

/* ---- modul Odpočet u hostů: červený tikající štítek u nezabraného nicku */
.gclock {
  display: inline-flex; align-items: center; gap: 3px; flex: none; height: 17px; padding: 0 6px 0 5px;
  border: 1px solid rgba(255, 77, 94, .55); border-radius: 6px; background: rgba(255, 77, 94, .14);
  color: #ff6b78; font-size: 10.5px; font-weight: 800; line-height: 1; letter-spacing: .2px;
  font-variant-numeric: tabular-nums; cursor: help; vertical-align: middle; white-space: nowrap;
}
.gclock .ic { flex: none; }
.gclock.soon { animation: gclock-pulse 1s ease-in-out infinite; }
@keyframes gclock-pulse { 0%, 100% { background: rgba(255, 77, 94, .14); } 50% { background: rgba(255, 77, 94, .38); } }
.m-head .gclock { align-self: center; }
.prof-top .gclock { height: 22px; padding: 0 9px 0 7px; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .gclock.soon { animation: none; } }

/* ---- panel Členové: bez flairů stačí užší (o 30 % než dřív), na mobilu přes celý displej (zavírá se křížkem nahoře) */
.members { width: 310px; }
@media (min-width: 1400px) { .members { width: 345px; } }
@media (max-width: 1099px) { .members { width: min(384px, 86vw); } }
@media (max-width: 699px) {
  .members { width: 100vw; border-left: 0; box-shadow: none; }
  .mem-head .icon-btn { width: 40px; height: 40px; }
}

/* ---- flair s logem (značka auta): jen logo v rámečku, text je popisek po najetí */
.flair.logo {
  display: inline-grid; place-items: center; flex: none; max-width: none; width: auto; min-width: 24px; height: 18px; padding: 0 5px;
  border: 1px solid rgba(255, 255, 255, .14); border-radius: 6px; background: rgba(255, 255, 255, .07); vertical-align: middle;
}
.flair.logo img { display: block; height: 12px; width: auto; max-width: 30px; object-fit: contain; }
.flair.logo.vip { border-color: color-mix(in srgb, var(--fc) 70%, transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--fc) 45%, transparent); background: rgba(255, 255, 255, .09); }
.flair.logo.vip::after { display: none; }
.mem-name .flair.logo { height: 18px; min-width: 24px; padding: 1px 4px; }
.mem-name .flair.logo img { height: 13px; }
.prof-top .flair.logo { height: 22px; min-width: 30px; padding: 0 7px; }
.prof-top .flair.logo img { height: 15px; max-width: 40px; }
/* výběr loga v editoru flairu */
.fl-logos { display: flex; flex-wrap: wrap; gap: 5px; max-height: 168px; overflow-y: auto; }
.fl-logo { width: 40px; height: 40px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--muted); font-size: 13px; font-weight: 800; }
.fl-logo.on { border-color: var(--brand); background: rgba(var(--brand-rgb), .16); color: var(--txt); }

/* ---- dva sloty flairu: auto + vlastní */
.fl-slot { display: flex; flex-direction: column; gap: 6px; }
.fl-slot + .fl-slot { margin-top: 4px; }
.fl-pickers { display: flex; flex-wrap: wrap; gap: 6px; }
.fl-pickers > * { flex: 1 1 140px; min-width: 0; }
.fl-opt { display: inline-flex; align-items: center; gap: 8px; }

/* ---- panel Členové: sekce CMO Team a Návštěvy */
.mem-sec.team { display: flex; align-items: center; gap: 5px; color: var(--brand2); }
.mem-sec.guests { color: #ff8a9a; }
.mem-name .gclock { flex: none; }
.inv-wait { display: flex; flex-direction: column; gap: 6px; }
.inv-wait-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 80px auto; align-items: center; gap: 8px; font-size: 13px; }
.inv-wait-row b { color: var(--txt2); font-size: 12px; font-variant-numeric: tabular-nums; }
.inv-bar { height: 6px; overflow: hidden; border-radius: 3px; background: rgba(255, 255, 255, .08); }
.inv-bar i { display: block; height: 100%; border-radius: 3px; background: #f7c948; }

/* ---- modul Uvítací okno */
.sheet-welcome { max-width: 480px; }
.sheet-welcome .sheet-body { gap: 14px; padding-top: 18px; padding-bottom: 22px; } /* nahoře místo pro záři loga (posuvný obsah ji jinak ořízne) */
.wl-top { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.wl-logo { width: 120px; height: auto; filter: drop-shadow(0 6px 18px rgba(var(--brand-rgb), .45)); }
.wl-top h2 { margin: 0; font-size: 21px; font-weight: 800; }
.wl-msg { padding: 14px 16px; border: 1px solid rgba(var(--brand-rgb), .35); border-radius: 14px; background: linear-gradient(150deg, rgba(var(--brand-rgb), .16), var(--panel2) 70%); color: var(--txt); font-size: 15px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.wl-h { margin: 2px 0 -4px; color: var(--muted); font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase; }
.wl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wl-tile { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.wl-tile .ic { grid-row: span 2; color: var(--brand2); }
.wl-tile b { font-size: 19px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.wl-tile span { color: var(--muted); font-size: 11.5px; line-height: 1.25; }
.wl-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 4px; }
.wl-card .wl-grid { margin-top: 2px; }
.wl-edit { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.wl-edit textarea { min-height: 54px; }
.wl-n { padding-top: 9px; color: var(--muted); font-size: 12px; font-weight: 800; text-align: right; }

/* ---- modul CMO Team: kategorie v administraci */
.tm-cat { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tm-cat > input { flex: 1 1 200px; min-width: 140px; }
.tm-cat .tm-count { margin-left: auto; }
.tm-ord { display: flex; flex-direction: column; }
.tm-ord .icon-btn { width: 24px; height: 18px; }
.tm-ord .icon-btn:disabled { opacity: .25; }
.ic.up { transform: rotate(180deg); }
.tm-pub { display: inline-flex; align-items: center; gap: 6px; min-width: 92px; cursor: pointer; }
.tm-count { min-width: 52px; text-align: right; }
.tm-tag { padding: 2px 9px; border-radius: var(--r-pill); background: var(--panel3); color: var(--muted); font-size: 11.5px; font-weight: 700; }
.tm-tag.pub { background: rgba(var(--brand-rgb), .16); color: var(--brand2); }
.tm-list { display: flex; flex-direction: column; gap: 4px; }
.tm-row { display: grid; grid-template-columns: 28px minmax(80px, 1fr) minmax(110px, 170px) auto; align-items: center; gap: 10px; padding: 4px 4px 4px 6px; border-radius: 10px; }
.tm-row:hover { background: var(--panel2); }
.tm-row .dd { width: 100%; height: 32px; }
.tm-nick { display: flex; align-items: center; gap: 5px; min-width: 0; font-weight: 600; }
.tm-found { display: flex; flex-direction: column; gap: 2px; }
.tm-add { display: grid; grid-template-columns: 24px minmax(0, auto) auto 1fr auto; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 9px; background: none; color: var(--txt); text-align: left; }
.tm-add:hover { background: var(--panel2); }
.tm-add .muted { justify-self: end; }
.tm-add-ic { color: var(--brand2); }

.tm-row .dd-val { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wl-edit input { height: 38px; }

/* ---- modul Role */
.rl-role { gap: 10px; border-color: rgba(var(--brand-rgb), .3); }
.rl-head { display: flex; align-items: center; gap: 8px; color: var(--brand2); }
.rl-head input { flex: 1; min-width: 0; font-weight: 700; }
.rl-perms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.rl-perm { align-items: flex-start; }
.rl-perm b { font-size: 13.5px; }
.rl-log { display: flex; flex-direction: column; max-height: 360px; overflow-y: auto; }
.rl-log-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.rl-when { white-space: nowrap; }
.rl-who { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 10px; background: none; color: var(--txt); text-align: left; }
.rl-who:hover { background: var(--panel2); }

/* ---- Uvítání: GIF na pozadí okna, proměnné, sady v administraci */
.sheet-welcome .wl-bg {
  position: absolute; top: 0; left: 0; right: 0; z-index: 0; height: 290px; overflow: hidden; border-radius: 24px 24px 0 0; pointer-events: none;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgba(0, 0, 0, .5) 70%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 40%, rgba(0, 0, 0, .5) 70%, transparent 100%);
}
.sheet-welcome .wl-bg .gbox, .sheet-welcome .wl-bg video, .sheet-welcome .wl-bg img { position: absolute; inset: 0; width: 100% !important; height: 100%; aspect-ratio: auto !important; object-fit: cover; border-radius: 0; background-size: cover; }
.sheet-welcome .wl-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .35), rgba(25, 24, 29, .35) 55%, rgba(25, 24, 29, .8)); }
.sheet-welcome.has-gif .wl-top h2 { text-shadow: 0 2px 12px rgba(0, 0, 0, .8); }
.sheet-welcome.has-gif .sheet-head .icon-btn { background: rgba(0, 0, 0, .45); color: #fff; }
.wl-set { padding: 2px 10px; border-radius: var(--r-pill); background: rgba(0, 0, 0, .45); color: var(--txt2); font-size: 12px; font-weight: 700; }
.wl-vars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.wl-var { display: flex; align-items: baseline; gap: 8px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); color: var(--txt); text-align: left; }
.wl-var:hover { border-color: rgba(var(--brand-rgb), .5); }
.wl-var code { flex: none; color: var(--brand2); font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; font-weight: 700; }
.wl-gifs { display: flex; flex-wrap: wrap; gap: 8px; }
.wl-gif { position: relative; width: 96px; height: 64px; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--panel2); }
.wl-gif img { width: 100%; height: 100%; object-fit: cover; }
.wl-gif.add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border-style: dashed; color: var(--muted); font-size: 11.5px; font-weight: 700; }
.wl-gif.add:hover { color: var(--txt); border-color: var(--line2); }
.wl-gif-x { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; }
.wl-setcard { gap: 8px; border-color: rgba(var(--brand-rgb), .3); }
.wl-accs { display: flex; flex-wrap: wrap; gap: 6px; }
.wl-acc { display: inline-flex; align-items: center; gap: 6px; max-width: 200px; padding: 3px 4px 3px 4px; border-radius: var(--r-pill); background: var(--panel3); font-size: 13px; font-weight: 600; }
.wl-acc button { display: grid; place-items: center; width: 18px; height: 18px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); }
.wl-acc button:hover { background: rgba(255, 255, 255, .1); color: var(--txt); }
.wl-status { align-self: center; }
.wl-status.on { color: #f7c948; font-weight: 700; }
.wl-edit-btns { display: flex; flex-direction: column; gap: 4px; }

/* ---- modul Ochrana */
.ts-box:empty { display: none; }
.ts-box { display: flex; justify-content: center; }
.twin-box { gap: 8px; }
.twin-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; align-items: center; gap: 8px; width: 100%; padding: 5px 6px; border: 0; border-radius: 9px; background: none; color: var(--txt); text-align: left; }
.twin-row:hover { background: var(--panel3); }
.twin-why { padding: 1px 8px; border-radius: var(--r-pill); background: var(--panel3); color: var(--muted); font-size: 11px; font-weight: 700; white-space: nowrap; }
.twin-why.dev { background: rgba(var(--danger-rgb), .16); color: var(--danger); }
.twin-warn { margin: 0; color: var(--danger); font-weight: 600; }

/* ---- modul Sezóny: plátno s efektem přes celé okno (pod okny a sheety, neklikatelné) */
.season-fx { position: fixed; inset: 0; z-index: 45; width: 100%; height: 100%; pointer-events: none; }
.season-fx[hidden] { display: none; }
/* Prohlížeč fotek (modul photos): efekty nepadají přes fotku (okna jsou v #app pod plátnem) */
body:has(.ph-view) .season-fx { visibility: hidden; }
.season-modes button { flex: 1 1 auto; }
.season-now { display: flex; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--panel2); font-size: 14px; }
.season-now .ic { color: #f7c948; flex: none; }
.season-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 4px; border-bottom: 1px solid var(--line); border-radius: 8px; }
.season-row.now { background: rgba(247, 201, 72, .07); }
.season-row .dd { width: 190px; height: 34px; }
.season-range { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-right: auto; }
.season-date { display: inline-flex; align-items: center; gap: 2px; }
.season-num { width: 52px; height: 34px; padding: 0 6px; text-align: center; }
.season-tries { display: flex; flex-wrap: wrap; gap: 6px; }
.muted.small.warn { color: #f7c948; font-weight: 700; }
.season-num { -moz-appearance: textfield; appearance: textfield; }
.season-num::-webkit-outer-spin-button, .season-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- můj profil: záložky a nastavení jako seznam stejně vysokých řádků */
.prof-tabs { position: sticky; top: -6px; z-index: 2; display: flex; gap: 4px; margin: 2px -4px 0; padding: 4px; border-radius: 13px; background: var(--panel2); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .7); }
.prof-tabs button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; min-width: 0; height: 36px; padding: 0 6px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.prof-tabs button:hover { color: var(--txt); }
.prof-tabs button.on { background: var(--panel3); color: var(--txt); box-shadow: 0 1px 3px rgba(0, 0, 0, .35); }
.prof-tabs button.on .ic { color: var(--brand2); }
@media (max-width: 400px) { .prof-tabs button .ic { display: none; } }
.prof-pane { display: flex; flex-direction: column; gap: 12px; }
.prof-pane > .center { padding: 18px 0; }

.set-list { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); }
.set-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; margin: 0; padding: 8px 14px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; color: var(--txt); font-size: 14px; text-align: left; cursor: pointer; }
.set-row:last-child { border-bottom: 0; }
.set-row[hidden] { display: none; }
button.set-row:hover, .set-more > summary:hover { background: rgba(255, 255, 255, .03); }
.set-row > .ic { flex: none; color: var(--txt2); }
.set-t { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; }
.set-t .muted { font-size: 12.5px; }
.set-row.danger, .set-row.danger > .ic { color: var(--danger); }
.set-caret { flex: none; color: var(--muted); transition: transform .15s; }
.set-caret-r { transform: rotate(-90deg); } /* šipka doprava (pozor: třída .side už patří postrannímu panelu) */
/* rozbalovací řádky (heslo, zablokovaní, admin přístup): summary má stejnou výšku jako ostatní řádky */
.set-more { display: block; min-height: 0; padding: 0; cursor: default; }
.set-more > summary { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; list-style: none; cursor: pointer; }
.set-more > summary::-webkit-details-marker { display: none; }
.set-more > summary > .ic:first-child { flex: none; color: var(--txt2); }
.set-more[open] .set-caret { transform: rotate(180deg); }
.set-inner { padding: 0 14px 14px 43px; }
form.set-inner { gap: 8px; }
form.set-inner .btn { align-self: flex-start; }

/* ---- můj profil: pevná výška (záložky nemění velikost okna) a plynulé přepínání */
.sheet.sheet-prof { height: min(calc(var(--app-h) - 36px - var(--safe-t)), 860px); }
.prof-tabs button { transition: background .18s ease, color .18s ease, box-shadow .18s ease; }
.prof-pane.enter { animation: prof-pane-in .22s cubic-bezier(.2, .8, .25, 1) both; }
@keyframes prof-pane-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .prof-pane.enter { animation: none; } }

/* ---- modul Invite flair: štítek „N×“ u nicku za aktivní pozvané (stupeň = barvy --ia světlá, --ib tmavá, --it text) */
.ivf {
  --ia: #e7a26a; --ib: #8a4c1e; --it: #fff1e2; --ig: #e08a45;
  position: relative; display: inline-flex; align-items: center; gap: 3px; flex: none; overflow: hidden;
  height: 18px; padding: 0 6px 0 5px; border-radius: 5px; vertical-align: middle; align-self: center; cursor: help;
  font-size: 11px; font-weight: 800; line-height: 1; white-space: nowrap; color: var(--it);
  background: linear-gradient(135deg, var(--ia), var(--ib));
  border: 1px solid color-mix(in srgb, var(--ia) 75%, #fff);
  box-shadow: 0 0 7px -1px color-mix(in srgb, var(--ig) 75%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .35);
  animation: ivf-glow 2.6s ease-in-out infinite;
}
.ivf > * { position: relative; z-index: 1; }
.ivf .ic { flex: none; stroke-width: 2.6; }
.ivf-silver { --ia: #f4f7fb; --ib: #8e98a6; --it: #1b2029; --ig: #cfd8e6; text-shadow: 0 1px 0 rgba(255, 255, 255, .55); }
.ivf-gold { --ia: #ffe48a; --ib: #c4860f; --it: #3a2400; --ig: #ffc93a; text-shadow: 0 1px 0 rgba(255, 245, 200, .6); }
.ivf-diamond {
  --ia: #e9fdff; --ib: #7fd8f2; --it: #07334a; --ig: #8be9ff; text-shadow: 0 1px 0 rgba(255, 255, 255, .7);
  background: linear-gradient(120deg, #f2feff 0%, #9fe8ff 22%, #d4c6ff 42%, #a9f3ff 60%, #ffffff 78%, #8fdcff 100%);
  background-size: 220% 100%;
  animation: ivf-glow 2.6s ease-in-out infinite, ivf-prism 5s linear infinite;
}
/* diamant: přejíždějící odlesk a třpytky */
.ivf-diamond::after {
  content: ''; position: absolute; top: -3px; bottom: -3px; left: -70%; width: 45%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .95), transparent);
  transform: skewX(-20deg); animation: flair-shine 2.8s ease-in-out infinite;
}
.ivf-diamond::before {
  content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(circle at 14% 28%, #fff 0 .8px, transparent 1.6px),
    radial-gradient(circle at 52% 82%, #fff 0 .7px, transparent 1.4px),
    radial-gradient(circle at 86% 24%, #fff 0 .9px, transparent 1.8px);
  animation: ivf-twinkle 1.7s ease-in-out infinite;
}
@keyframes ivf-glow {
  0%, 100% { box-shadow: 0 0 5px -1px color-mix(in srgb, var(--ig) 60%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
  50% { box-shadow: 0 0 11px 0 color-mix(in srgb, var(--ig) 90%, transparent), inset 0 1px 0 rgba(255, 255, 255, .35); }
}
@keyframes ivf-prism { to { background-position: -220% 0; } }
@keyframes ivf-twinkle { 0%, 100% { opacity: .15; } 50% { opacity: 1; } }
/* platina (100+): perleťový přeliv, točící se okraj, dvojitý odlesk a hvězdičky */
@property --ivf-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.ivf-platinum {
  --ia: #ffffff; --ib: #b8c1d4; --it: #2a2340; --ig: #e9ddff; text-shadow: 0 1px 0 rgba(255, 255, 255, .8);
  border: 1px solid transparent;
  background:
    linear-gradient(115deg, #ffffff 0%, #dfe4ee 18%, #f4e8ff 34%, #cfd8e8 50%, #e8fbff 66%, #ffffff 82%, #d7dcea 100%) padding-box,
    conic-gradient(from var(--ivf-a), #ffffff, #c9b6ff, #9fe9ff, #ffffff, #ffd6f0, #b9c3d6, #ffffff) border-box;
  background-size: 260% 100%, 100% 100%;
  animation: ivf-plat-glow 2.2s ease-in-out infinite, ivf-prism 3.2s linear infinite, ivf-spin 2.4s linear infinite;
}
.ivf-platinum::after {
  content: ''; position: absolute; top: -3px; bottom: -3px; left: -70%; width: 40%; z-index: 2; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .95) 45%, rgba(214, 196, 255, .9) 55%, transparent);
  transform: skewX(-20deg); animation: ivf-shine2 2.4s ease-in-out infinite;
}
.ivf-platinum::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none; /* pod textem, ať číslo zůstane čitelné */
  background: linear-gradient(100deg, transparent 40%, rgba(255, 255, 255, .9) 50%, transparent 60%);
  background-size: 300% 100%; animation: ivf-sweep 1.6s linear infinite;
}
.ivf-stars { position: absolute !important; inset: 0; z-index: 3 !important; pointer-events: none; }
.ivf-stars i {
  position: absolute; width: 8px; height: 8px; --sc: #8f6bff; background: radial-gradient(circle, #fff 0 18%, var(--sc) 55%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: 0; animation: ivf-star 1.8s ease-in-out infinite;
}
.ivf-stars i:nth-child(1) { left: 6%; top: 8%; }
.ivf-stars i:nth-child(2) { left: 40%; top: 52%; width: 7px; height: 7px; animation-delay: .35s; --sc: #2fb8f0; }
.ivf-stars i:nth-child(3) { left: 66%; top: 0; width: 9px; height: 9px; animation-delay: .7s; --sc: #e85cc0; }
.ivf-stars i:nth-child(4) { left: 84%; top: 48%; width: 7px; height: 7px; animation-delay: 1.05s; --sc: #d9a400; }
.ivf-stars i:nth-child(5) { left: 22%; top: 46%; width: 6px; height: 6px; animation-delay: 1.4s; --sc: #6b8cff; }
@keyframes ivf-plat-glow {
  0%, 100% { box-shadow: 0 0 6px 0 rgba(233, 221, 255, .7), 0 0 0 0 rgba(159, 233, 255, 0), inset 0 1px 0 rgba(255, 255, 255, .6); }
  50% { box-shadow: 0 0 12px 1px rgba(255, 255, 255, .85), 0 0 18px 2px rgba(201, 182, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .6); }
}
@keyframes ivf-spin { to { --ivf-a: 360deg; } }
@keyframes ivf-shine2 { 0% { left: -70%; } 45%, 100% { left: 140%; } }
@keyframes ivf-sweep { from { background-position: 150% 0; } to { background-position: -150% 0; } }
@keyframes ivf-star {
  0%, 100% { opacity: 0; transform: scale(.2) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.15) rotate(90deg); }
}
@media (prefers-reduced-motion: reduce) {
  .ivf, .ivf-diamond, .ivf-diamond::before, .ivf-diamond::after, .ivf-platinum, .ivf-platinum::before, .ivf-platinum::after { animation: none; }
  .ivf-stars { display: none; }
}
.prof-top .ivf { height: 22px; padding: 0 8px 0 7px; font-size: 12.5px; }

/* karta Pozvi kamarády: stupně a kolik chybí */
.ivf-mine { display: flex; flex-direction: column; gap: 8px; }
.ivf-mine p { margin: 0; }
.ivf-ladder { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; }
.ivf-step { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 6px; border-radius: 10px; background: var(--panel2); color: var(--muted); font-size: 11px; font-weight: 700; }
.ivf-step:not(.got) .ivf { filter: grayscale(.85) brightness(.75); opacity: .6; animation: none; }
.ivf-step:not(.got) .ivf::before, .ivf-step:not(.got) .ivf::after, .ivf-step:not(.got) .ivf-stars { display: none; }
.ivf-step.on { box-shadow: inset 0 0 0 1px rgba(var(--brand-rgb), .55); color: var(--txt); }

/* Administrace → Flairy → Invite flair */
.ivf-tiers { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.ivf-tier { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.ivf-demo { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 0 6px; font-weight: 800; }
.ivf-demo-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--brand); }
.ivf-tier-n { margin-top: 2px; font-size: 12px; font-weight: 800; }
.ivf-holders { display: flex; flex-direction: column; gap: 6px; }
.ivf-row { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 10px; background: var(--panel2); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.ivf-row:hover { background: color-mix(in srgb, var(--panel2) 80%, #fff 6%); }
.ivf-row-name { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; }
.ivf-row-name .mem-nick { flex: 0 1 auto; }

/* Administrace → Flairy → Přidělit flair: filtr Všichni / S flairem / Bez flairu */
.uf-filter { align-self: flex-start; }
.uf-filter button { flex: none; padding: 6px 12px; white-space: nowrap; }

/* Po načtení stránky nejnovější zprávy naskočí odspodu nahoru (chat.js animateIntro, zpoždění po zprávách) */
.msg.m-in { animation: m-in .36s cubic-bezier(.2, .9, .3, 1.15) both; }
@keyframes m-in {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .msg.m-in { animation: none; } }

/* ---- modul Fotky: vybrané fotky nad polem pro psaní */
.ph-tray { margin-bottom: 6px; padding: 8px 10px 10px; border-radius: 10px; background: var(--panel2); }
.ph-tray-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; color: var(--muted); font-size: 12px; font-weight: 700; }
.ph-tray-clear { padding: 2px 6px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; cursor: pointer; }
.ph-tray-clear:hover { color: var(--txt); background: var(--panel3); }
.ph-tray-list { display: flex; gap: 8px; overflow-x: auto; padding: 4px 4px 2px 0; scrollbar-width: thin; }
.ph-thumb { position: relative; flex: none; width: 72px; height: 72px; border-radius: 10px; overflow: visible; background: var(--panel3); }
.ph-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; display: block; }
.ph-thumb.prep img, .ph-thumb.up img { opacity: .55; }
.ph-thumb.err img { opacity: .35; filter: grayscale(1); }
.ph-thumb-st { position: absolute; inset: 0; display: grid; place-items: center; border: 0; border-radius: 10px; background: none; color: #fff; }
.ph-thumb-st.err { cursor: pointer; color: var(--danger); background: rgba(var(--danger-rgb), .2); }
.ph-thumb-x {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0;
  border: 2px solid var(--panel2); border-radius: 50%; background: #3a3842; color: #fff; cursor: pointer;
}
.ph-thumb-x:hover { background: var(--danger); }
.ph-add { display: grid; place-items: center; border: 1px dashed rgba(255, 255, 255, .22); background: none; color: var(--muted); cursor: pointer; }
.ph-add:hover { color: var(--txt); border-color: rgba(var(--brand-rgb), .6); }

/* přetahování souborů do chatu */
body.ph-drop #composer .cbar { border-color: rgba(var(--brand-rgb), .8); box-shadow: 0 0 0 3px rgba(var(--brand-rgb), .25); }
body.ph-drop #list { outline: 2px dashed rgba(var(--brand-rgb), .55); outline-offset: -10px; }

/* nabídka tlačítka + (Fotky, Anketa) */
.plus-list { display: flex; flex-direction: column; gap: 6px; }
.plus-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--panel2); color: var(--txt); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.plus-row:hover { background: var(--panel3); }

/* zpráva s fotkami: album v mřížce */
.k-photo { padding-top: 4px; }
.k-photo .m-left { display: flex; margin: 4px 0 0; }
.k-photo .m-left:empty { display: none; }
.ph-msg { display: flex; flex-direction: column; gap: 6px; max-width: 100%; }
.ph-album { display: grid; gap: 3px; width: min(360px, 78vw); border-radius: 12px; overflow: hidden; }
.ph-tile { display: block; padding: 0; border: 0; aspect-ratio: 1; overflow: hidden; background: var(--panel2); cursor: zoom-in; }
.ph-tile img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.ph-tile:hover img { transform: scale(1.03); }
.ph-album.n1 { --ar: 1; width: min(320px, 70vw, calc(360px * var(--ar))); }
.ph-album.n1 .ph-tile { aspect-ratio: var(--ar); }
.ph-album.n2, .ph-album.n4 { grid-template-columns: 1fr 1fr; }
.ph-album.n3 { grid-template-columns: 1fr 1fr; }
.ph-album.n3 .ph-tile:first-child { grid-column: span 2; aspect-ratio: 2; }
.ph-album.n5 { grid-template-columns: repeat(3, 1fr); }
.ph-album.n5.r1 .ph-tile:first-child { grid-column: span 3; aspect-ratio: 2; }
.ph-album.n5.r2 .ph-tile:first-child { grid-column: span 2; aspect-ratio: 2; }
.ph-cap { white-space: pre-wrap; overflow-wrap: anywhere; }

/* prohlížeč fotek přes celou obrazovku: fotka se vždy celá vejde a zvětší na plochu okna (object-fit: contain) */
.sheet-wrap:has(.ph-view) { padding: 0; }
.sheet-wrap .sheet.ph-view {
  position: fixed; inset: 0; width: 100%; height: auto; max-width: none; max-height: none; margin: 0; padding: 0;
  border: 0; border-radius: 0; background: rgba(6, 6, 8, .97); box-shadow: none;
  opacity: 0; transform: none; transition: opacity .2s ease;
}
.sheet-wrap.open .sheet.ph-view { opacity: 1; transform: none; }
.sheet.ph-view .sheet-grip { display: none; }
.sheet.ph-view .sheet-head { position: absolute; top: 0; left: 0; right: 0; z-index: 3; min-height: 0; padding: calc(10px + var(--safe-t)) 12px 10px 18px; background: linear-gradient(rgba(0, 0, 0, .6), transparent); border: 0; }
.sheet.ph-view .sheet-head .icon-btn { background: rgba(0, 0, 0, .45); color: #fff; }
.ph-count { color: #fff; font-size: 14px; font-weight: 800; }
.sheet.ph-view .sheet-body { position: absolute; inset: 0; padding: 0; overflow: hidden; gap: 0; }
.ph-stage { position: absolute; inset: 0; touch-action: pan-y; user-select: none; }
/* plocha pro fotku: nahoře hlavička, dole pás náhledů (u alba), po stranách šipky */
.ph-big {
  position: absolute; top: calc(56px + var(--safe-t)); left: 72px; right: 72px; bottom: 16px;
  width: calc(100% - 144px); height: calc(100% - 72px - var(--safe-t)); object-fit: contain;
  -webkit-user-drag: none;
}
.ph-view.album .ph-big { bottom: 88px; height: calc(100% - 144px - var(--safe-t)); }
.ph-nav {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%; width: 48px; height: 48px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .15s;
}
.ph-nav:hover { background: rgba(255, 255, 255, .24); }
.ph-nav.prev { left: 14px; }
.ph-nav.next { right: 14px; }
.ph-nav.next .ic { rotate: 180deg; }
/* pás náhledů alba */
.ph-strip {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; display: flex; justify-content: safe center; gap: 6px;
  padding: 12px 12px calc(12px + var(--safe-b, 0px)); overflow-x: auto; scrollbar-width: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
}
.ph-strip::-webkit-scrollbar { display: none; }
.ph-strip button { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: 8px; overflow: hidden; background: #222; opacity: .55; cursor: pointer; transition: opacity .15s, border-color .15s; }
.ph-strip button:hover { opacity: .85; }
.ph-strip button.on { opacity: 1; border-color: #fff; }
.ph-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* mobil: fotka přes celou šířku, menší šipky přes fotku */
@media (max-width: 699px) {
  .ph-big { left: 0; right: 0; width: 100%; }
  .ph-nav { width: 40px; height: 40px; background: rgba(0, 0, 0, .45); }
  .ph-nav.prev { left: 8px; }
  .ph-nav.next { right: 8px; }
  .ph-strip button { width: 48px; height: 48px; }
  .ph-view.album .ph-big { bottom: 80px; height: calc(100% - 136px - var(--safe-t)); }
}

/* ---- modul Zprávy pro skupinu (audience): modrý podklad, štítek „Jen pro: …“, modré pole pro psaní */
.msg.msg-aud { background: rgba(var(--aud-rgb), .1); box-shadow: inset 3px 0 0 rgb(var(--aud-rgb)); }
@media (hover: hover) {
  .msg.msg-aud:hover { background: rgba(var(--aud-rgb), .15); }
}
.au-msg { display: flex; flex-direction: column; gap: 3px; }
.au-tag { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; padding: 1px 8px; border-radius: var(--r-pill); background: rgba(var(--aud-rgb), .2); color: #b9d6ff; font-size: 11px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase; }
.au-t { white-space: pre-wrap; overflow-wrap: anywhere; }
.composer.au-on .cbar { border-color: rgba(var(--aud-rgb), .7); background: linear-gradient(rgba(var(--aud-rgb), .1), rgba(var(--aud-rgb), .1)), var(--panel2); }
.composer.au-on .cbar textarea { caret-color: rgb(var(--aud-rgb)); }
.au-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; padding: 5px 6px 5px 12px; border-radius: 10px; background: rgba(var(--aud-rgb), .16); color: #b9d6ff; font-size: 13px; }
.au-bar[hidden] { display: none; }
.au-bar-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.au-bar-t b { color: #fff; }
.au-bar-n { display: inline-flex; color: #fff; }
.au-bar-btn { padding: 4px 10px; border: 0; border-radius: var(--r-pill); background: rgba(var(--aud-rgb), .3); color: #fff; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.au-bar-btn:hover { background: rgba(var(--aud-rgb), .45); }
.au-load { display: grid; place-items: center; padding: 24px; }
.au-hint { margin: 0 0 12px; }
.au-opts { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.au-opt { padding: 9px 4px; border-bottom: 1px solid var(--line); }
.au-opt .switch input:checked + i { background: rgb(var(--aud-rgb)); }
.au-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---- modul Servisní zprávy: časové linky (čára přes chat jako „Nové“, text uprostřed) */
.msg.msg-bare { margin-top: 14px; padding-top: 0; padding-bottom: 0; }
.msg.msg-bare + .msg { margin-top: 10px; }
.svl { display: flex; align-items: center; gap: 10px; color: var(--txt2); font-size: 12px; font-weight: 700; }
.svl::before, .svl::after { content: ''; flex: 1; min-width: 16px; height: 1px; background: var(--line2); }
.svl-t { display: inline-flex; align-items: center; gap: 6px; max-width: min(80%, 520px); padding: 3px 11px; border: 1px solid var(--line2); border-radius: var(--r-pill); background: var(--panel2); text-align: center; overflow-wrap: anywhere; }
.svl-t .ic { flex: none; color: var(--brand2); }
/* smazání pro admina: bublina nad textem linky (po najetí myší / klepnutí), v čáře nezabírá místo */
.svl-t.can-del { position: relative; cursor: pointer; }
.svl-del {
  position: absolute; left: 50%; bottom: calc(100% + 8px); z-index: 5;
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px;
  border: 1px solid var(--line2); border-radius: var(--r-pill); background: var(--panel3); color: var(--txt);
  font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .4);
  opacity: 0; pointer-events: none; transform: translate(-50%, 4px); transition: opacity .15s, transform .15s, background .15s;
}
/* most přes mezeru mezi textem a bublinou, ať bublina při přejetí myší nezmizí */
.svl-del::before { content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 10px; }
/* šipka dolů k textu */
.svl-del::after { content: ''; position: absolute; left: 50%; top: 100%; width: 8px; height: 8px; margin: -4px 0 0 -4px; background: inherit; border-right: 1px solid var(--line2); border-bottom: 1px solid var(--line2); transform: rotate(45deg); }
.svl-t.can-del:hover .svl-del, .svl-t.on .svl-del, .svl-del:focus-visible { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.svl-del:hover { border-color: transparent; background: var(--danger); color: #fff; }
.svl-del:hover::after { border-color: transparent; }
.svl-del:disabled { opacity: .5; cursor: default; }
/* administrace */
.svl-list { gap: 10px; margin: 6px 0 10px; }
.svl-card { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel2); }
.svl-card.off { opacity: .55; }
.svl-top { display: flex; align-items: center; gap: 8px; }
.svl-top .switch { flex: none; }
.svl-name { flex: 1; min-width: 0; font-weight: 700; }
.svl-card textarea { resize: vertical; min-height: 64px; }
.svl-when { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.svl-when input[type="time"] { width: auto; min-width: 104px; }
.svl-when .dd { min-width: 190px; }
.svl-extra { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.svl-extra:empty { display: none; }
.svl-extra input[type="date"] { width: auto; }
.svl-days { display: flex; flex-wrap: wrap; gap: 6px; }
.svl-day { min-width: 38px; padding: 6px 8px; border: 1px solid var(--line2); border-radius: var(--r-pill); background: var(--panel3); color: var(--txt2); font-size: 13px; font-weight: 700; cursor: pointer; }
.svl-day.on { border-color: transparent; background: var(--brand); color: #fff; }
.svl-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.svl-foot > span { flex: 1; min-width: 140px; }

/* ---- modul Leaderboard: odpočet měsíčního resetu a flair pro první místo (lesklé zlato se zábleskem) */
.lbw-reset { display: flex; align-items: center; gap: 5px; margin: 2px 4px 4px; padding: 5px 8px; border-radius: 8px; background: rgba(247, 201, 72, .07); color: var(--muted); font-size: 11px; font-weight: 600; }
.lbw-reset .ic { flex: none; color: #f7c948; }
.lbw-reset .grow { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbw-cd-l { flex: none; }
.lbw-cd, .lbf-cd { flex: none; color: #f7c948; font-weight: 800; font-variant-numeric: tabular-nums; }
.lbf {
  position: relative; display: inline-flex; align-items: center; gap: 3px; flex: none; overflow: hidden; isolation: isolate;
  height: 18px; padding: 0 6px 0 5px; border-radius: 5px; vertical-align: middle; align-self: center; cursor: help;
  font-size: 10.5px; font-weight: 900; line-height: 1; letter-spacing: .3px; text-transform: uppercase; white-space: nowrap; color: #2b1d00;
  /* kovové zlato: světlé a tmavé pruhy jako odraz na leštěném kovu */
  background: linear-gradient(160deg, #fff6c8 0%, #f7d35a 22%, #c8901a 46%, #ffe68f 62%, #b5800f 82%, #f4cf5c 100%);
  border: 1px solid #ffe9a3;
  box-shadow: 0 0 8px -1px rgba(255, 196, 46, .75), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(120, 72, 0, .45);
  text-shadow: 0 1px 0 rgba(255, 244, 200, .7);
}
.lbf > * { position: relative; z-index: 2; }
.lbf .ic { flex: none; stroke-width: 2.6; }
/* záblesk: světlý pruh přejede přes štítek (transform = GPU) */
.lbf::after {
  content: ''; position: absolute; top: -4px; bottom: -4px; left: 0; width: 40%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .95) 50%, transparent);
  transform: translateX(-150%) skewX(-20deg); animation: lbf-shine 3.2s ease-in-out infinite;
}
/* jiskra v rohu (jen opacity a transform) */
.lbf::before {
  content: ''; position: absolute; right: 3px; top: 2px; width: 6px; height: 6px; z-index: 3; pointer-events: none;
  background: radial-gradient(circle, #fff 0 20%, rgba(255, 240, 180, .9) 45%, transparent 70%);
  clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
  opacity: 0; animation: lbf-spark 3.2s ease-in-out infinite;
}
@keyframes lbf-shine { 0% { transform: translateX(-150%) skewX(-20deg); } 55%, 100% { transform: translateX(320%) skewX(-20deg); } }
@keyframes lbf-spark { 0%, 45%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); } 58% { opacity: 1; transform: scale(1.2) rotate(90deg); } 70% { opacity: 0; transform: scale(.4) rotate(140deg); } }
@media (prefers-reduced-motion: reduce) { .lbf::after, .lbf::before { animation: none; opacity: 0; } }
.prof-top .lbf { height: 22px; padding: 0 8px 0 7px; font-size: 12px; }
/* administrace: Flairy → Leaderboard flair */
.lbf-card { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.lbf-card .ivf-row { background: var(--panel3); }
.lbf-reset { margin: 4px 0; font-size: 12px; }
.lbf-hist-m { display: flex; flex-direction: column; gap: 3px; padding: 8px 12px; border-radius: 10px; background: var(--panel2); }
.lbf-hist-m b { text-transform: capitalize; }
.lbf-hist-row { display: flex; gap: 8px; }
.lbf-hist-row > .muted { flex: none; min-width: 120px; }
.lbw-reset2 { align-items: flex-start; padding: 6px 9px; }
.lbw-reset2 .ic { margin-top: 1px; }
.lbw-reset-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.35; }
.lbw-reset-t > span:last-child { color: var(--txt2); font-size: 12px; font-weight: 700; }
.lbf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.lbf-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.lbf-card .ivf-row-name { min-width: 0; }
.lbf-card .ivf-row-name .mem-nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* flair lídra Nejvíc kamarádů: leštěné stříbro (ať se neplete se zlatým za zprávy) */
.lbf-invites {
  color: #1c222b; text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
  background: linear-gradient(160deg, #ffffff 0%, #dfe5ec 22%, #8e99a8 46%, #f2f5f9 62%, #7d8796 82%, #d9dfe7 100%);
  border-color: #f4f7fb;
  box-shadow: 0 0 8px -1px rgba(206, 220, 240, .7), inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 -1px 0 rgba(60, 70, 85, .45);
}
/* flair vítěze měsíce: bublina zprávy (ostrý roh vlevo dole), zlatá / stříbrná, od 2 výher „×N“ */
.lbw-win {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 2px; flex: none; overflow: hidden; isolation: isolate;
  min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px 9px 9px 3px; vertical-align: middle; align-self: center; cursor: help;
  font-size: 10.5px; font-weight: 900; line-height: 1; white-space: nowrap; color: #2b1d00; text-shadow: 0 1px 0 rgba(255, 244, 200, .7);
  background: linear-gradient(160deg, #fff6c8 0%, #f7d35a 25%, #c8901a 50%, #ffe68f 68%, #b5800f 100%);
  border: 1px solid #ffe9a3;
  box-shadow: 0 0 6px -1px rgba(255, 196, 46, .7), inset 0 1px 0 rgba(255, 255, 255, .7);
}
.lbw-win > * { position: relative; z-index: 2; }
.lbw-win .ic { flex: none; stroke-width: 2.6; }
.lbw-win::after {
  content: ''; position: absolute; top: -4px; bottom: -4px; left: 0; width: 55%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .9) 50%, transparent);
  transform: translateX(-150%) skewX(-20deg); animation: lbf-shine 4.2s ease-in-out infinite 1.2s;
}
.lbw-win-invites {
  color: #1c222b; text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
  background: linear-gradient(160deg, #ffffff 0%, #dfe5ec 25%, #8e99a8 50%, #f2f5f9 68%, #7d8796 100%);
  border-color: #f4f7fb; box-shadow: 0 0 6px -1px rgba(206, 220, 240, .65), inset 0 1px 0 rgba(255, 255, 255, .85);
}
@media (prefers-reduced-motion: reduce) { .lbw-win::after { animation: none; opacity: 0; } }
.prof-top .lbw-win { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px 11px 11px 4px; font-size: 12px; }
/* administrace: vítězové a ruční úprava výher */
.lbf-demo-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.lbf-winner { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; padding: 6px 8px; border-radius: 10px; background: var(--panel2); }
.lbf-winner-u { display: flex; align-items: center; gap: 8px; flex: 1 1 140px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.lbf-winner-u .mem-nick { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbf-winner-k { display: inline-flex; align-items: center; gap: 4px; }
.lbf-winner-k.dim .lbw-win { filter: grayscale(1); opacity: .4; }
.lbf-winner-k .icon-btn b { font-size: 16px; line-height: 1; }
.lbf-give { align-self: flex-start; }
/* Leaderboard: záložky jako ikony, vybraná se roztáhne i s názvem */
.lbw-tabs button { flex: 0 0 34px; padding: 5px 0; }
.lbw-tabs button.on { flex: 1 1 auto; padding: 5px 8px; }
.lbw-tabs button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* flairy tabulek reakcí: rozdané = leštěná měď, získané = růžové zlato */
.lbf-rxgiven, .lbw-win-rxgiven {
  color: #2a1206; text-shadow: 0 1px 0 rgba(255, 220, 190, .7);
  background: linear-gradient(160deg, #ffe0c4 0%, #e9a06a 24%, #a45a26 48%, #f6c49a 64%, #94501f 84%, #df9a62 100%);
  border-color: #ffd2ad;
  box-shadow: 0 0 8px -1px rgba(230, 140, 70, .7), inset 0 1px 0 rgba(255, 255, 255, .6), inset 0 -1px 0 rgba(90, 40, 10, .45);
}
.lbf-rxgot, .lbw-win-rxgot {
  color: #3a0d22; text-shadow: 0 1px 0 rgba(255, 225, 238, .75);
  background: linear-gradient(160deg, #fff0f5 0%, #f6b7cd 24%, #c56a8c 48%, #ffd6e4 64%, #b65a7d 84%, #f0a8c2 100%);
  border-color: #ffd9e7;
  box-shadow: 0 0 8px -1px rgba(240, 130, 170, .7), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(100, 30, 60, .4);
}
/* karta / profil: víc flairů (Legacy, lídr, vítěz…) se zalomí na další řádek, ať nepřetékají přes okraj */
.prof-top .flair-set { flex-wrap: wrap; justify-content: center; row-gap: 6px; max-width: 100%; }
/* flair lídra jen jako symbol tabulky: malý kovový čtvereček s ikonou (dlouhé názvy se nevešly) */
.lbf { justify-content: center; width: 22px; padding: 0; gap: 0; }
.lbf .ic { stroke-width: 2.4; }
.lbf::before { right: 1px; top: 1px; width: 5px; height: 5px; }
.prof-top .lbf { width: 26px; padding: 0; }
.prof-top .lbf .ic { width: 14px; height: 14px; }
/* Nejdéle online: smaragdový kov */
.lbf-active, .lbw-win-active {
  color: #04271b; text-shadow: 0 1px 0 rgba(210, 255, 235, .7);
  background: linear-gradient(160deg, #e2fff2 0%, #6fe0ae 24%, #1f8a5e 48%, #a9f2cf 64%, #187650 84%, #5fd29f 100%);
  border-color: #c8ffe6;
  box-shadow: 0 0 8px -1px rgba(60, 220, 150, .65), inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(5, 60, 40, .45);
}
.st-mine { align-self: flex-start; }

/* ---- modul Statistiky serveru (records): nad Leaderboardem v panelu Členové, stejný styl, růžový nádech */
.srv { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(var(--brand-rgb), .08), transparent 70%); }
.srv[hidden] { display: none; }
.srv-head { display: flex; align-items: center; gap: 7px; width: 100%; padding: 6px 6px 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--brand2); font-size: 12px; font-weight: 800; letter-spacing: .5px; text-align: left; text-transform: uppercase; }
.srv-head:hover { background: rgba(255, 255, 255, .04); }
.srv-sub { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.srv-caret { color: var(--muted); transition: transform .15s; }
.srv.closed .srv-caret { transform: rotate(-90deg); }
.srv-empty { display: grid; place-items: center; padding: 8px; }
.srv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 0 2px 2px; }
.srv-tile { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .22); }
.srv-l { display: flex; align-items: center; gap: 4px; min-width: 0; color: var(--muted); font-size: 10.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-l .ic { flex: none; color: var(--brand2); }
.srv-v { color: var(--txt); font-size: 14px; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-s { color: var(--txt2); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srv-emoji { display: flex; flex-direction: column; gap: 4px; margin: 0 2px 2px; padding: 6px 8px; border-radius: 8px; background: rgba(0, 0, 0, .22); }
.srv-emoji-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.srv-em { display: inline-flex; align-items: center; gap: 3px; color: var(--txt2); font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.srv-em b { font-weight: 700; }

/* ---- panel Členové: uživatelé ve vlastním sbalitelném rámečku (jako Server a Leaderboard) */
.mbx { display: flex; flex-direction: column; margin: 4px 0 2px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(180deg, rgba(255, 255, 255, .03), transparent 70%); }
.mbx-head { display: flex; align-items: center; gap: 7px; width: 100%; padding: 6px 6px 6px 8px; border: 0; border-radius: 8px; background: none; color: var(--txt2); font-size: 12px; font-weight: 800; letter-spacing: .5px; text-align: left; text-transform: uppercase; }
.mbx-head:hover:not(:disabled) { background: rgba(255, 255, 255, .04); }
.mbx-head:disabled { cursor: default; opacity: 1; }
.mbx-sub { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.mbx-caret { color: var(--muted); transition: transform .15s; }
.mbx.closed .mbx-caret { transform: rotate(-90deg); }
.mbx .mem-sec { padding: 10px 8px 5px; }
.mbx .mem-sec:first-of-type { padding-top: 4px; }
/* hledání člena uvnitř rámečku Uživatelé; při hledání se rámečky nad ním schovají */
.mbx .mem-search { margin: 2px 4px 4px; }
.mbx .mem-search[hidden] { display: none; }
.mem-list.searching > :not(.mbx) { display: none; }
.mem-list { padding-top: 8px; }

/* ---- modul Notifikace (push): řádek v Nastavení, ukázky notifikací, extra notifikace v administraci */
.pu-inner { display: flex; flex-direction: column; gap: 2px; padding: 0 14px 12px; }
.pu-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; cursor: pointer; }
.pu-row .switch { flex: none; }
.pu-main { padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pu-label { margin-top: 8px; }
.pu-test { align-self: flex-start; margin-top: 6px; }
.pu-steps { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; padding-left: 20px; line-height: 1.4; }
.pu-mock { display: flex; gap: 10px; max-width: 360px; padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .09); backdrop-filter: blur(8px); box-shadow: 0 4px 16px rgba(0, 0, 0, .3); }
.pu-mock-ic { flex: none; width: 34px; height: 34px; border-radius: 8px; }
.pu-mock-tx { display: flex; flex: 1; flex-direction: column; gap: 1px; min-width: 0; font-size: 13px; line-height: 1.3; }
.pu-mock-tx > b, .pu-mock-tx > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pu-mock-tx > span:last-child { color: var(--txt2); }
.pu-mock-top { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.pu-kinds { display: flex; flex-direction: column; gap: 10px; }
.pu-kind { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.pu-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pu-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--panel2); }
.pu-stats b { font-size: 20px; }
.pu-to { display: flex; flex-wrap: wrap; gap: 6px; }
.pu-chip { padding: 6px 12px; border: 1px solid var(--line2); border-radius: var(--r-pill); background: var(--panel3); color: var(--txt2); font-size: 13px; font-weight: 700; cursor: pointer; }
.pu-chip.on { border-color: transparent; background: var(--brand); color: #fff; }
.pu-prev { padding: 12px; border: 1px dashed var(--line2); border-radius: 12px; }

/* ---- zpráva: flairy a odznaky na druhém řádku pod nickem (na mobilu se do řádku s nickem nevešly), zalamují se */
.m-flairs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; margin: 1px 0 4px; line-height: 1; }
.m-flairs .flair-set { flex-wrap: wrap; gap: 4px; row-gap: 4px; }
.m-flairs .flair { max-width: min(180px, 100%); }
.m-flairs .lgb { --bs: 15px !important; }

/* ---- zpráva: jmenovka (avatar + nick + flairy v rámečku v barvě účtu --pc, doprava mizí do ztracena; jako Nameplates na Discordu) */
.m-hw {
  position: relative; display: flex; flex-direction: column; justify-content: center; min-height: 44px;
  margin: 0 0 4px -56px; padding: 3px 12px 3px 56px; /* začne 2 px před avatarem (40 px + mezera 14 px) */
  border-radius: 22px 8px 8px 22px; /* levý oblouk obkrouží kolečko avataru */
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 26%, transparent) 0, color-mix(in srgb, var(--pc) 11%, transparent) 38%, transparent 80%);
}
/* jemná světlá hrana nahoře, taky do ztracena */
.m-hw::before {
  content: ''; position: absolute; left: 20px; right: 0; top: 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 60%, transparent), transparent 65%);
}
.m-hw .m-flairs { margin-bottom: 1px; }
.msg.m-first .m-av { position: relative; z-index: 1; }
.msg.m-first .m-av .av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 55%, transparent); }
/* jmenovka: pevná výška = avatar 40 px + 2 px kolem, levý oblouk (22 px) soustředný s kolečkem avataru;
   nick nahoře, flairy pod ním v jednom řádku (co se nevejde, doprava zmizí), bez flairů je nick svisle uprostřed */
.m-hw { height: 44px; min-height: 0; padding-top: 0; padding-bottom: 0; gap: 2px; overflow: hidden; border-radius: 22px 8px 8px 22px; }
.m-hw .m-head { line-height: 20px; margin-bottom: 0; }
.m-hw .m-flairs { flex-wrap: nowrap; margin: 0; overflow: hidden; height: 18px; }
.m-hw .m-flairs.more { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
.m-hw .m-flairs .flair-set { flex-wrap: nowrap; }
.m-hw .m-flairs > *, .m-hw .m-flairs .flair-set > * { flex-shrink: 0; }
.msg.m-first .m-av .av-btn { margin-top: 2px; }
/* jmenovka střídměji: jen na šířku obsahu (+ krátký dojezd), slabší barva, víc vzduchu mezi lidmi i nad textem */
.m-hw {
  width: fit-content; max-width: 100%; padding-right: 64px; gap: 3px; margin-bottom: 6px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 20%, transparent) 0, color-mix(in srgb, var(--pc) 9%, transparent) 55%, transparent 100%);
}
.m-hw::before { background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 50%, transparent), transparent 85%); }
.msg.m-first { margin-top: 24px; }
.msg.m-first .m-av .av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 45%, transparent); }
/* odznak ADMIN v hlavičce zprávy stejně vysoký jako flairy (18 px) */
.m-head .badge-admin { box-sizing: border-box; height: 18px; padding: 0 7px 0 5px; line-height: 1; font-size: 10px; }
/* jmenovka bílošedá (--plate): slabší podklad, ať je čitelná a nekřičí; flairy se ořezávají jen když se nevejdou
   (záře posledního odznaku jinak byla useknutá), na konci řádku malá rezerva */
.m-hw { background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 13%, transparent) 0, color-mix(in srgb, var(--pc) 6%, transparent) 55%, transparent 100%); }
.m-hw::before { background: linear-gradient(90deg, color-mix(in srgb, var(--pc) 32%, transparent), transparent 85%); }
.msg.m-first .m-av .av { box-shadow: 0 0 0 2px color-mix(in srgb, var(--pc) 30%, transparent); }
.m-hw .m-flairs { overflow: visible; padding-right: 3px; }
.m-hw .m-flairs.more { overflow: hidden; }
/* mobil: krátký dojezd jmenovky, ať nebere místo nicku a flairům */
@media (max-width: 600px) { .m-hw { padding-right: 16px; } }
/* jmenovka je posunutá 56 px doleva pod avatar → smí být o 56 px širší než sloupec zprávy */
.m-hw { max-width: calc(100% + 56px); }

/* ---- administrace na mobilu (Přehled → Žebříček, Účty, Flairy): seznamy účtů nesmí přetékat */
/* nick a flairy: flairy se zalamují pod nick, nelezou přes číslo vpravo */
.lb-txt .mem-name, .acc-txt .mem-name { flex-wrap: wrap; row-gap: 3px; }
.lb-txt .mem-name .mem-nick, .acc-txt .mem-name .mem-nick { max-width: 100%; }
.lb-txt .flair-set, .acc-txt .flair-set { flex-wrap: wrap; row-gap: 3px; max-width: 100%; }
@media (max-width: 600px) {
  /* tlačítka u účtu (flairy, nick, heslo) na vlastní řádek pod jménem */
  .acc-row { flex-wrap: wrap; row-gap: 6px; }
  .acc-who { flex: 1 1 100%; }
  .acc-actions { flex: 1 1 100%; flex-wrap: wrap; padding-left: 48px; }
  .acc-actions .dd, .acc-actions .select { flex: 1 1 130px; width: auto; min-width: 0; }
}
/* Přehled → Žebříček: počet lidí vedle filtrů se nezalamuje, na úzkém displeji spadne pod ně */
.row-between:has(> .lb-filter) { flex-wrap: wrap; row-gap: 6px; }
.lb-filter + .muted { flex: none; white-space: nowrap; }
/* řádky karet řazení (Žebříček, Aktivita) se posouvají do strany: konec mizí do ztracena, ať je vidět, že pokračují */
@media (max-width: 600px) {
  .lb-chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); padding-right: 24px; }
}
/* mobil: lišta záložek administrace se posouvá do strany, konec mizí do ztracena (je vidět, že pokračuje) */
@media (max-width: 760px) {
  .adm-nav { scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent); padding-right: 28px; }
  .adm-nav::-webkit-scrollbar { display: none; }
}
/* nejužší telefony (do 400 px) v administraci: záhlaví s tlačítky se zalomí, řádky CMO Team a popisky mapy hodin se vejdou */
@media (max-width: 400px) {
  .adm-content .row-between { flex-wrap: wrap; row-gap: 6px; }
  .tm-row { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 6px; }
  .tm-row .dd { grid-column: 2 / 4; grid-row: 2; }
  .hm-h { font-size: 8.5px; overflow: hidden; }
}
/* administrace se řídí svou šířkou, ne šířkou okna (na PC je mezi bočními panely a bývá úzká) */
.adm-content { container-type: inline-size; }
@container (max-width: 640px) {
  .acc-row { flex-wrap: wrap; row-gap: 6px; }
  .acc-who { flex: 1 1 100%; }
  .acc-actions { flex: 1 1 100%; flex-wrap: wrap; padding-left: 48px; }
  .acc-actions .dd, .acc-actions .select { flex: 1 1 130px; width: auto; min-width: 0; }
  .row-between:has(> .lb-filter) { flex-wrap: wrap; }
}
@container (max-width: 380px) {
  .row-between { flex-wrap: wrap; row-gap: 6px; }
  .tm-row { grid-template-columns: 28px minmax(0, 1fr) auto; row-gap: 6px; }
  .tm-row .dd { grid-column: 2 / 4; grid-row: 2; }
}

/* seznam zpráv: nahoře plynulý přechod do pozadí, zprávy pod hlavičkou „zajíždějí“ do ztracena místo ostré hrany */
.list {
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
  mask-image: linear-gradient(to bottom, transparent 0, #000 28px);
}

/* ---- modul Ikonka aplikace (administrace): současná ikonka, výběr pozadí, náhled iPhone (zaoblený čtverec) a Android (kruh) */
.ai-now { display: flex; align-items: center; gap: 14px; }
.ai-cur { flex: none; width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); }
.ai-ctl { display: flex; flex-direction: column; gap: 6px; }
.ai-ctl input[type="range"] { width: 100%; max-width: 320px; }
.ai-sw { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ai-swatch { width: 30px; height: 30px; padding: 0; border: 2px solid var(--line2); border-radius: 8px; cursor: pointer; }
.ai-prev { display: flex; flex-wrap: wrap; gap: 24px; padding: 18px; border-radius: 14px; background: linear-gradient(135deg, #2b1f3a, #142738 60%, #1d3a2c); }
.ai-phone { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #fff; font-size: 12px; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.ai-phone canvas { width: 64px; height: 64px; box-shadow: 0 3px 10px rgba(0, 0, 0, .45); }
.ai-ios { border-radius: 22.5%; }
.ai-and { border-radius: 50%; }

/* ---- formátování zpráv: **tučně** / *tučně*, _kurzíva_, ||spoiler|| (rozmazaný, dokud se na něj neklepne) */
.m-body strong, .svc-t strong, .au-t strong { font-weight: 800; }
.m-body em, .svc-t em, .au-t em { font-style: italic; }
.spl { padding: 0 3px; border-radius: 4px; background: rgba(255, 255, 255, .06); transition: background .2s, color .2s; }
.spl:not(.open) { color: transparent; background: var(--panel3); cursor: pointer; user-select: none; -webkit-user-select: none; }
.spl:not(.open) * { visibility: hidden; }
.spl:not(.open):hover { background: color-mix(in srgb, var(--panel3) 80%, #fff 10%); }

/* ---- modul Akce v chatu: nabídka příkazů po „/“, karta hlasování (votekick / voteban), pravidla v administraci */
.ac-menu { margin-bottom: 6px; padding: 4px; border: 1px solid var(--line2); border-radius: 12px; background: var(--panel); box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.ac-menu[hidden] { display: none; }
.ac-head { padding: 4px 8px 6px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.ac-item { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; width: 100%; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--txt); font: inherit; text-align: left; cursor: pointer; }
.ac-item.on, .ac-item:hover { background: var(--panel2); }
.ac-item b { color: var(--brand2); font-size: 14px; }
.ac-args { color: var(--txt2); font-size: 13px; }
.ac-desc { flex: 1 1 100%; color: var(--muted); font-size: 12px; }
@media (min-width: 600px) { .ac-desc { flex: 1 1 auto; text-align: right; } }
.cv-card { display: flex; flex-direction: column; gap: 7px; max-width: min(460px, 100%); margin-top: 2px; padding: 11px 13px 12px; border: 1px solid rgba(255, 82, 102, .45); border-radius: 14px; background: linear-gradient(135deg, rgba(255, 82, 102, .14), rgba(255, 82, 102, .05) 70%); }
.cv-card.kick { border-color: rgba(247, 201, 72, .45); background: linear-gradient(135deg, rgba(247, 201, 72, .12), rgba(247, 201, 72, .04) 70%); }
.cv-card.failed, .cv-card.cancelled { opacity: .75; }
.cv-top { display: flex; align-items: center; gap: 7px; font-size: 15px; }
.cv-top .ic { flex: none; color: #ff5266; }
.cv-card.kick .cv-top .ic { color: #f7c948; }
.cv-reason { font-size: 14px; overflow-wrap: anywhere; }
.cv-bar { height: 7px; overflow: hidden; border-radius: 99px; background: var(--panel3); }
.cv-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f7c948, #ff5266); transition: width .3s; }
.cv-nums { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; }
.cv-left { margin-left: auto; font-variant-numeric: tabular-nums; }
.cv-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cv-btn.yes.on { border-color: transparent; background: var(--ok); color: #06210f; }
.cv-btn.no.on { border-color: transparent; background: var(--danger); color: #fff; }
.cv-result { font-size: 14px; font-weight: 700; }
.cv-card.passed .cv-result { color: #ff8a9a; }
.cv-cancel { align-self: flex-start; }
.msg.msg-cv { margin-top: 22px; margin-bottom: 8px; }
.cv-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.cv-form .row-btns { grid-column: 1 / -1; }
.cv-field { display: flex; flex-direction: column; gap: 4px; }
.cv-in { display: flex; align-items: center; gap: 6px; }
.cv-in input { width: 90px; }
.cv-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--panel2); }
.cv-row .grow { min-width: 160px; }
.cv-st { font-size: 12px; font-weight: 800; }
.cv-st.passed { color: #ff8a9a; }
.cv-st.open { color: #f7c948; }

/* ---- ztlumený chat: pole pro psaní zčervená, ukazuje odpočet (placeholder), tlačítka zmizí */
.composer.cz-muted .cbar { border-color: rgba(255, 82, 102, .75); background: linear-gradient(rgba(255, 82, 102, .14), rgba(255, 82, 102, .14)), var(--panel2); }
.composer.cz-muted .cbar::before {
  content: ''; flex: none; align-self: center; width: 20px; height: 20px; margin-left: 8px; background: #ff5266;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5Z'/%3E%3Cpath d='m22 9-6 6M16 9l6 6'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M11 5 6 9H2v6h4l5 4V5Z'/%3E%3Cpath d='m22 9-6 6M16 9l6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.composer.cz-muted .cbar textarea { cursor: not-allowed; }
.composer.cz-muted .cbar textarea::placeholder { color: #ff8a9a; opacity: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.composer.cz-muted .cb-btn, .composer.cz-muted .cb-send, .composer.cz-muted .cb-right { display: none !important; }

/* ===================================================== Pozvánka na úvodní obrazovce (modul invites) */
.gi {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 14px; overflow: hidden;
  border: 1px solid rgba(var(--brand-rgb), .45); border-radius: 18px;
  background: radial-gradient(130% 90% at 0% 0%, rgba(var(--brand-rgb), .26), transparent 60%), rgba(0, 0, 0, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
}
.gi::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .09) 50%, transparent 65%);
  transform: translateX(-100%); animation: gi-shine 5s ease-in-out 1s infinite;
}
@keyframes gi-shine { 0%, 60% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.gi-top { display: flex; align-items: center; gap: 13px; min-width: 0; }
.gi-av { position: relative; flex: none; display: grid; border-radius: 50%; box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px rgba(var(--brand-rgb), .75), 0 8px 22px rgba(var(--brand-rgb), .35); }
.gi-av-ic {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--panel);
}
.gi-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.gi-chip {
  padding: 2px 9px; border-radius: var(--r-pill); background: rgba(var(--brand-rgb), .22); color: var(--brand2);
  font-size: 10.5px; font-weight: 900; letter-spacing: .8px; text-transform: uppercase;
}
.gi-txt p { margin: 0; color: var(--txt2); font-size: 15px; line-height: 1.35; overflow-wrap: anywhere; }
.gi-txt p b { color: var(--txt); font-size: 16.5px; font-weight: 900; }
.gi-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gi-stat { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(0, 0, 0, .25); }
.gi-stat-ic { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(var(--brand-rgb), .16); color: var(--brand2); }
.gi-stat.on .gi-stat-ic { background: rgba(47, 210, 122, .14); }
.gi-stat-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.gi-stat b { font-size: 18px; font-weight: 900; font-variant-numeric: tabular-nums; }
.gi-stat-txt > span { overflow: hidden; color: var(--muted); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.gi-dot { width: 10px; height: 10px; border-radius: 50%; background: #2fd27a; animation: beta-online 1.8s ease-out infinite; }
/* S pozvánkou je místo obecného podnadpisu karta „X tě zve…“ */
.gate.invited .gate-sub { display: none; }
@media (prefers-reduced-motion: reduce) { .gi::after { animation: none; } }

/* ===================================================== Administrace → Úvodní obrazovka (modul login) */
.lgn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 18px 14px; }
.lgn-item { display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 0; min-width: 0; }
.lgn-phone {
  width: 214px; padding: 7px; border-radius: 34px; background: #050506;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .12), 0 14px 34px rgba(0, 0, 0, .45);
}
/* Telefon 390 × 800 zmenšený na 0,51 */
.lgn-screen { position: relative; width: 200px; height: 410px; overflow: hidden; border-radius: 27px; background: var(--bg); }
.lgn-if { position: absolute; left: 0; top: 0; width: 390px; height: 800px; border: 0; transform: scale(.5128); transform-origin: 0 0; pointer-events: none; }
.lgn-cap { display: flex; flex-direction: column; align-items: center; gap: 3px; max-width: 214px; text-align: center; }
.lgn-cap b { font-size: 14px; }
.lgn-open { display: inline-flex; align-items: center; gap: 5px; margin-top: 2px; color: var(--brand2); font-size: 12.5px; font-weight: 700; text-decoration: none; }
.lgn-open:hover { text-decoration: underline; }

/* Proč se úvodní obrazovka ukázala (vypršel nick, ban, odhlášení): nahoře pod nadpisem */
.gate-notice {
  display: flex; gap: 10px; margin: 0; padding: 11px 13px; border: 1px solid rgba(255, 92, 120, .45); border-radius: 14px;
  background: rgba(255, 70, 100, .12); color: #ffd0d8; font-size: 14px; font-weight: 600; line-height: 1.4; text-align: left;
}
.gate-notice[hidden] { display: none; }
.gate-notice::before { content: ""; flex: none; width: 4px; border-radius: 4px; background: #ff5c78; }

/* Posuvník nesmí měnit šířku karty při přepínání Nový nick / Mám účet (delší obsah = posuvník) */
.gate { scrollbar-gutter: stable both-edges; }
.adm-content { scrollbar-gutter: stable; }
.gp .gate { scrollbar-width: none; } /* náhled v administraci (modul login) */
.gp .gate::-webkit-scrollbar { display: none; }

/* Ban: jen „Máš ban do: …“, žádný formulář */
.gate.gate-ban .seg, .gate.gate-ban .gate-form, .gate.gate-ban .gate-title, .gate.gate-ban .gate-sub, .gate.gate-ban .gate-notice,
.gate.gate-ban .gate-err, .gate.gate-ban .gi, .gate.gate-ban .beta, .gate.gate-ban .beta-back { display: none !important; }
.gb {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px; text-align: center;
  border: 1px solid rgba(255, 92, 120, .45); border-radius: 18px; background: radial-gradient(120% 90% at 50% 0%, rgba(255, 70, 100, .2), rgba(0, 0, 0, .2) 70%);
}
.gb-ic { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 4px; border-radius: 50%; background: rgba(255, 70, 100, .16); color: #ff5c78; }
.gb-title { font-size: 19px; font-weight: 900; line-height: 1.25; }
.gb-left { color: var(--txt2); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Panel Členové: tečka online se při psaní roztáhne do tří skákajících teček (members.js syncTyping) */
.members .online-dot {
  display: flex; align-items: center; justify-content: center; gap: 2px; overflow: hidden;
  transition: width .28s cubic-bezier(.3, 1.4, .5, 1), border-radius .28s;
}
.members .online-dot i { flex: none; width: 3px; height: 3px; border-radius: 50%; background: #fff; opacity: 0; transform: scale(0); transition: opacity .15s, transform .2s; }
.members .online-dot.od-typing { width: 25px; border-radius: var(--r-pill); }
.members .online-dot.od-typing i { opacity: 1; transform: scale(1); animation: od-bounce 1.1s ease-in-out infinite; }
.members .online-dot.od-typing i:nth-child(2) { animation-delay: .14s; }
.members .online-dot.od-typing i:nth-child(3) { animation-delay: .28s; }
@keyframes od-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .6; } 30% { transform: translateY(-2px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .members .online-dot.od-typing i { animation: none; opacity: 1; } }

/* ===================================================== Hlášení chyb během bety (modul bugs) */
.bg-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; margin-right: 6px; padding: 0 12px 0 10px; flex: none;
  border: 1px solid rgba(255, 170, 60, .6); border-radius: var(--r-pill); color: #1d1100; font-size: 13px; font-weight: 800;
  background: linear-gradient(180deg, #ffb347, #ff8a1f); box-shadow: 0 0 14px rgba(255, 138, 31, .35);
  animation: bg-shake 7s ease-in-out infinite 2s; transform-origin: 50% 60%;
}
.bg-btn[hidden] { display: none; }
.bg-btn:hover { filter: brightness(1.06); }
.bg-btn .ic { stroke-width: 2.4; }
/* Zatřese se jen chvilku, pak 6 s klid (transform běží na GPU) */
@keyframes bg-shake {
  0%, 86%, 100% { transform: none; }
  88% { transform: rotate(-3.5deg) scale(1.02); }
  90% { transform: rotate(3deg) scale(1.02); }
  92% { transform: rotate(-2.5deg); }
  94% { transform: rotate(2deg); }
  96% { transform: rotate(-1deg); }
}
@media (max-width: 720px) {
  .bg-btn { width: 32px; padding: 0; justify-content: center; margin-right: 4px; }
  .bg-btn-t { display: none; }
}
@media (prefers-reduced-motion: reduce) { .bg-btn { animation: none; } }
/* Admin: tečka u ikony soukromých zpráv, když čekají hlášení */
#btnDms.bg-dot::after { content: ""; position: absolute; top: 5px; right: 5px; width: 9px; height: 9px; border-radius: 50%; background: #ff8a1f; box-shadow: 0 0 0 2px var(--bg); }
#btnDms { position: relative; }

.bg-sheet .sheet-body { display: flex; flex-direction: column; gap: 12px; }
.bg-intro { display: flex; gap: 12px; align-items: flex-start; }
.bg-intro b { display: block; margin-bottom: 3px; font-size: 16px; }
.bg-intro p { margin: 0; font-size: 13.5px; line-height: 1.45; }
.bg-intro-ic, .bg-inbox-av, .bg-done-ic { flex: none; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 138, 31, .16); color: #ff9a3c; }
.bg-intro-ic { width: 46px; height: 46px; }
.bg-ta { width: 100%; min-height: 100px; resize: vertical; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); color: var(--txt); font: inherit; font-size: 15px; line-height: 1.45; }
.bg-ta:focus { outline: none; border-color: rgba(255, 138, 31, .7); box-shadow: 0 0 0 3px rgba(255, 138, 31, .15); }
.bg-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: -6px; }
.bg-err { margin: 0; color: #ff8d9a; font-size: 13px; font-weight: 600; }
.bg-count { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.bg-send { width: 100%; justify-content: center; }
.bg-done { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 6px 8px; text-align: center; }
.bg-done-ic { width: 58px; height: 58px; background: rgba(47, 210, 122, .15); color: #2fd27a; }
.bg-done b { font-size: 17px; }
.bg-done p { margin: 0 0 6px; }

/* Bug flair: bublina s broukem (jako vítěz měsíce), zelená „bug hunter“ */
.bg-flair {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 2px; flex: none; overflow: hidden; isolation: isolate;
  min-width: 20px; height: 18px; padding: 0 5px; border-radius: 9px 9px 9px 3px; vertical-align: middle; align-self: center; cursor: help;
  font-size: 10.5px; font-weight: 900; line-height: 1; white-space: nowrap; color: #0d2600; text-shadow: 0 1px 0 rgba(230, 255, 200, .6);
  background: linear-gradient(160deg, #eaffc7 0%, #a6f05a 28%, #4fae1d 52%, #c6ff86 70%, #3d8f12 100%);
  border: 1px solid #d8ffad; box-shadow: 0 0 6px -1px rgba(130, 230, 60, .65), inset 0 1px 0 rgba(255, 255, 255, .6);
}
.bg-flair > * { position: relative; z-index: 2; }
.bg-flair .ic { flex: none; stroke-width: 2.6; }
.bg-flair::after {
  content: ''; position: absolute; top: -4px; bottom: -4px; left: 0; width: 55%; z-index: 1; pointer-events: none;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .85) 50%, transparent);
  transform: translateX(-150%) skewX(-20deg); animation: lbf-shine 4.6s ease-in-out infinite 2s;
}
@media (prefers-reduced-motion: reduce) { .bg-flair::after { animation: none; opacity: 0; } }
.prof-top .bg-flair { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px 11px 11px 4px; font-size: 12px; }
.bg-demo { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); }
.bg-demo-nick { font-weight: 800; margin-right: 2px; }
.bg-holders { display: flex; flex-direction: column; gap: 6px; }
.bg-holder { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bg-holder-u { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 0; border: 0; background: none; color: var(--txt); font-weight: 700; text-align: left; }
.bg-holder > b { min-width: 26px; text-align: right; font-variant-numeric: tabular-nums; }
.bg-uc { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; }
.bg-uc-l { display: inline-flex; align-items: center; gap: 6px; margin-right: auto; color: var(--txt2); font-weight: 700; }
.bg-uc > b { min-width: 18px; text-align: center; font-variant-numeric: tabular-nums; }

/* Admin: schránka nad soukromými zprávami */
.bg-inbox-av { width: 40px; height: 40px; }
.bg-nbadge { background: #ff8a1f; color: #1d1100; }
.bg-inbox-row .dm-item { padding-right: 10px; }
.bg-inbox .sheet-body { display: flex; flex-direction: column; gap: 12px; }
.bg-seg { align-self: flex-start; max-width: 100%; overflow-x: auto; }
.bg-seg button { white-space: nowrap; padding-left: 14px; padding-right: 14px; }
.bg-list { display: flex; flex-direction: column; gap: 10px; }
.bg-empty { padding: 24px 6px; text-align: center; }
.bg-card { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line); border-left: 3px solid #ff8a1f; border-radius: 14px; background: var(--panel2); }
.bg-card.done { border-left-color: #2fd27a; opacity: .72; }
.bg-card-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.bg-card-u { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 0; border: 0; background: none; color: var(--txt); text-align: left; }
.bg-card-n { display: flex; align-items: center; gap: 4px; min-width: 0; }
.bg-card-ts { margin-left: auto; flex: none; color: var(--muted); font-size: 12px; }
.bg-chip { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--r-pill); background: rgba(255, 138, 31, .16); color: #ffab5c; font-size: 11px; font-weight: 800; }
.bg-chip.ok { background: rgba(47, 210, 122, .15); color: #4fe08f; }
.bg-card-t { margin: 0; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bg-card-env { margin: 0; overflow: hidden; color: var(--muted); font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.bg-card-btns { display: flex; flex-wrap: wrap; gap: 6px; }

/* ===================================================== Administrace → Přenos (modul transfer) */
.tr-list { display: flex; flex-direction: column; gap: 6px; }
.tr-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); cursor: pointer; }
.tr-row input { flex: none; width: 18px; height: 18px; accent-color: var(--brand); }
.tr-row > span { display: flex; flex-direction: column; min-width: 0; }
.tr-status { min-height: 1.2em; margin: 0; }
.tr-info:empty { display: none; }
.tr-info { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); font-size: 13.5px; overflow-wrap: anywhere; }
.tr-info ul { margin: 6px 0 0; padding-left: 18px; color: var(--txt2); }
.tr-bar { height: 6px; border-radius: 3px; background: var(--panel3); overflow: hidden; }
.tr-bar[hidden] { display: none; }
.tr-bar i { display: block; width: 0; height: 100%; background: var(--brand); transition: width .2s; }
