:root {
  --bg: #1a1824;
  --bg-side: #15131d;
  --bg-main: #1f1d2b;
  --bg-card: #292638;
  --bg-hover: #2f2c42;
  --bg-active: #3a3652;
  --line: #2f2c42;
  --text: #f1eefb;
  --text-2: #b9b3d0;
  --text-3: #857fa3;
  --accent: #ff9d76;
  --accent-2: #ffb394;
  --accent-ink: #2a1710;
  --good: #6fd6a4;
  --bad: #ff7b8a;
  --warn: #ffcb6b;
  --radius: 14px;
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
}
:root[data-theme="light"] {
  --bg: #f4f0e8; --bg-side: #ece6db; --bg-main: #fbf8f3; --bg-card: #ffffff; --bg-hover: #efe9f8; --bg-active: #e2d9f4;
  --line: #e4ddd0; --text: #2b2540; --text-2: #5b5473; --text-3: #8d86a3; --accent: #7a5af8; --accent-2: #6a49e6; --accent-ink: #ffffff;
  --good: #1f9d68; --bad: #d9455b; --warn: #c98206;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); overflow: hidden; }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); }
::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); }
* { scrollbar-width: thin; scrollbar-color: var(--bg-active) transparent; }
.muted { color: var(--text-3); }

/* tlačítka */
.btn { border: 0; border-radius: 12px; padding: 0.6rem 1.1rem; background: var(--bg-card); font-weight: 700; transition: .15s; }
.btn:hover { background: var(--bg-hover); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { background: color-mix(in srgb, var(--bad) 20%, transparent); color: var(--bad); }
.btn.sm { padding: .35rem .7rem; font-size: .85rem; border-radius: 10px; }
.icon { border: 0; background: transparent; width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; font-size: 1.05rem; color: var(--text-2); transition: .15s; flex: none; }
.icon:hover { background: var(--bg-hover); color: var(--text); }
.icon.on { background: color-mix(in srgb, var(--bad) 22%, transparent); color: var(--bad); }
.logo { width: 64px; height: 64px; border-radius: 20px; background: linear-gradient(135deg, #ffb08c, #e86a6e); display: grid; place-items: center; font: 900 34px 'Segoe UI Black', 'Segoe UI', sans-serif; color: #2a1710; margin: 0 auto 1rem; }
.logo.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 16px; margin: 0; flex: none; }

/* přihlášení */
#auth { height: 100%; display: grid; place-items: center; background: radial-gradient(900px 500px at 80% -10%, rgba(255,157,118,.14), transparent 60%), radial-gradient(800px 500px at 0% 110%, rgba(165,180,255,.10), transparent 60%), var(--bg); padding: 1rem; }
.auth-card { width: 100%; max-width: 380px; background: var(--bg-card); border-radius: 24px; padding: 2rem; display: grid; gap: .9rem; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.auth-card h1 { margin: 0; text-align: center; letter-spacing: .18em; }
.auth-card p { margin: -.5rem 0 0; text-align: center; }
.auth-card label { display: grid; gap: .3rem; font-size: .8rem; font-weight: 700; color: var(--text-2); }
.auth-card input, .field { background: var(--bg-side); border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; outline: none; width: 100%; }
.auth-card input:focus, .field:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-side); border-radius: 12px; padding: 4px; }
.seg button { border: 0; background: transparent; border-radius: 9px; padding: .45rem; font-weight: 700; color: var(--text-2); }
.seg button.on { background: var(--bg-active); color: var(--text); }
.error { color: var(--bad); min-height: 1.2em; font-size: .85rem; text-align: center; }

/* rozložení */
#app { height: 100%; display: grid; grid-template-columns: 280px minmax(0, 1fr) auto; }
#side { background: var(--bg-side); display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
#main { background: var(--bg-main); display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#members { width: 250px; background: var(--bg-side); border-left: 1px solid var(--line); overflow-y: auto; padding: 1rem .6rem; }

.server-head { display: flex; align-items: center; gap: .6rem; margin: .7rem .7rem .3rem; padding: .55rem .6rem; border: 0; background: transparent; border-radius: 12px; font-weight: 800; letter-spacing: .1em; text-align: left; }
.server-head:hover { background: var(--bg-hover); }
.server-head #server-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chev { color: var(--text-3); }
.search-btn { display: flex; align-items: center; gap: .5rem; margin: .3rem .7rem .5rem; padding: .5rem .8rem; border: 0; border-radius: 12px; background: var(--bg); color: var(--text-3); text-align: left; }
.search-btn span { flex: 1; }
.search-btn:hover { color: var(--text-2); }
kbd { font: 600 .68rem var(--font); background: var(--bg-card); border-radius: 6px; padding: 2px 6px; color: var(--text-3); }

#tree { flex: 1; overflow-y: auto; padding: 0 .5rem .8rem; min-height: 0; }
.cat { margin-top: .9rem; }
.cat-head { display: flex; align-items: center; gap: .2rem; padding: 0 .3rem 0 .45rem; height: 1.8rem; }
.cat-head .name { flex: 1; font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); cursor: pointer; user-select: none; }
.cat-head .name:hover { color: var(--text); }
.cat-head .icon { width: 1.6rem; height: 1.6rem; font-size: .9rem; opacity: 0; }
.cat:hover .cat-head .icon, .cat-head .icon:focus { opacity: 1; }
.ch { display: flex; align-items: center; gap: .55rem; width: 100%; border: 0; background: transparent; text-align: left; padding: .38rem .6rem; border-radius: 10px; color: var(--text-2); font-size: .95rem; position: relative; }
.ch:hover { background: var(--bg-hover); color: var(--text); }
.ch.active { background: var(--bg-active); color: var(--text); font-weight: 700; }
.ch .em { width: 1.3rem; text-align: center; flex: none; }
.ch .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch.unread { color: var(--text); font-weight: 700; }
.badge { background: var(--accent); color: var(--accent-ink); border-radius: 99px; font-size: .7rem; font-weight: 800; padding: 0 .45rem; min-width: 1.2rem; text-align: center; }
.ch.in-call { color: var(--good); }
.vusers { margin: 0 0 .25rem 1.9rem; }
.vuser { display: flex; align-items: center; gap: .5rem; padding: .15rem .4rem; font-size: .85rem; color: var(--text-2); border-radius: 8px; }
.vuser .status { margin-left: auto; font-size: .8rem; opacity: .9; }
.vuser .live-tag { background: var(--bad); color: #fff; font-size: .62rem; font-weight: 800; letter-spacing: .05em; border-radius: 6px; padding: 0 .35rem; }

.avatar { width: 2.2rem; height: 2.2rem; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; flex: none; box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; position: relative; }
.avatar.xs { width: 1.5rem; height: 1.5rem; font-size: .72rem; }
.avatar.talking { box-shadow: 0 0 0 2px var(--good); }
.avatar.xl { width: 4.5rem; height: 4.5rem; font-size: 1.6rem; }
.presence { position: absolute; right: -2px; bottom: -2px; width: .7rem; height: .7rem; border-radius: 50%; background: var(--text-3); border: 2px solid var(--bg-side); }
.presence.on { background: var(--good); }

#call-bar { margin: 0 .6rem .4rem; padding: .6rem; background: color-mix(in srgb, var(--good) 12%, var(--bg-card)); border-radius: 14px; display: grid; gap: .5rem; }
.call-top { display: flex; align-items: center; gap: .6rem; }
.call-info { flex: 1; min-width: 0; display: grid; font-size: .85rem; line-height: 1.2; }
.call-info span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.call-info b { color: var(--good); }
#call-leave { color: var(--bad); }
.dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 25%, transparent); }
.share.on { background: var(--bad); color: #fff; }

#me-bar { display: flex; align-items: center; gap: .3rem; padding: .6rem; background: var(--bg); border-top: 1px solid var(--line); }
#me-bar .avatar { margin-right: .3rem; }
.me-name { flex: 1; min-width: 0; display: grid; line-height: 1.2; }
.me-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .9rem; }
.me-name span { font-size: .72rem; color: var(--text-3); }

/* hlavička a obsah */
.top { display: flex; align-items: center; gap: .7rem; height: 3.4rem; padding: 0 1rem; border-bottom: 1px solid var(--line); flex: none; }
.top h2 { margin: 0; font-size: 1.05rem; }
.top .topic { color: var(--text-3); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; border-left: 1px solid var(--line); padding-left: .7rem; }
.top .sp { flex: 1; }
.tabs { display: flex; gap: .2rem; }
.tab { border: 0; background: transparent; padding: .35rem .8rem; border-radius: 10px; font-weight: 700; color: var(--text-2); }
.tab.on { background: var(--bg-active); color: var(--text); }
.tab:hover { background: var(--bg-hover); }

/* chat */
.msgs { flex: 1; overflow-y: auto; padding: 1rem 1rem .5rem; min-height: 0; }
.more { display: block; margin: 0 auto 1rem; }
.msg { display: flex; gap: .8rem; padding: .15rem .6rem; border-radius: 12px; position: relative; }
.msg.first { margin-top: .9rem; }
.msg:hover { background: color-mix(in srgb, var(--bg-hover) 55%, transparent); }
.msg .gutter { width: 2.2rem; flex: none; font-size: .65rem; color: var(--text-3); text-align: center; padding-top: .35rem; opacity: 0; }
.msg:hover .gutter { opacity: 1; }
.msg .body { min-width: 0; flex: 1; }
.msg .meta { display: flex; gap: .5rem; align-items: baseline; }
.msg .who { font-weight: 800; }
.msg .when { font-size: .72rem; color: var(--text-3); }
.msg .txt { overflow-wrap: anywhere; }
.msg .txt pre { background: var(--bg); padding: .6rem .8rem; border-radius: 10px; overflow-x: auto; margin: .3rem 0; }
.msg .pin { font-size: .75rem; color: var(--warn); }
.msg .edited { font-size: .7rem; color: var(--text-3); }
code { background: var(--bg); padding: .1rem .35rem; border-radius: 6px; font-family: 'Cascadia Code', Consolas, monospace; font-size: .88em; }
pre code { background: transparent; padding: 0; }
.md-img, .msg img { max-width: min(420px, 100%); max-height: 320px; border-radius: 12px; display: block; margin-top: .3rem; cursor: zoom-in; }
.actions { position: absolute; right: .6rem; top: -.9rem; display: none; background: var(--bg-card); border: 1px solid var(--line); border-radius: 12px; padding: 2px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.msg:hover .actions { display: flex; }
.actions .icon { width: 1.8rem; height: 1.8rem; font-size: .9rem; }
.empty { margin: auto; text-align: center; color: var(--text-3); padding: 2rem; }
.empty .big { font-size: 3rem; }

.composer { padding: 0 1rem 1rem; flex: none; }
.composer-box { display: flex; align-items: flex-end; gap: .3rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: .35rem .4rem .35rem .8rem; box-shadow: 0 6px 20px rgba(0,0,0,.15); transition: .15s; }
.composer-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.composer textarea { flex: 1; border: 0; outline: 0; background: transparent; resize: none; max-height: 40vh; padding: .5rem 0; line-height: 1.4; }
.preview { display: flex; align-items: center; gap: .6rem; padding: .5rem .8rem; margin-bottom: .4rem; background: var(--bg-card); border-radius: 12px; }
.preview img { height: 56px; border-radius: 8px; }

/* hlas */
.call-stage { flex: 1; overflow-y: auto; padding: 1.2rem; display: flex; flex-direction: column; gap: 1rem; min-height: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .9rem; }
.tile { background: var(--bg-card); border-radius: 18px; aspect-ratio: 16 / 10; display: grid; place-items: center; position: relative; overflow: hidden; box-shadow: 0 0 0 2px transparent; transition: box-shadow .15s; }
.tile.talking { box-shadow: 0 0 0 3px var(--good); }
.tile .nm { position: absolute; left: .7rem; bottom: .6rem; background: rgba(0,0,0,.55); color: #fff; border-radius: 8px; padding: .1rem .5rem; font-size: .8rem; }
.tile .st { position: absolute; right: .7rem; top: .6rem; }
.screens { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); }
.screen { background: #000; border-radius: 16px; overflow: hidden; position: relative; aspect-ratio: 16 / 9; }
.screen video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.screen .nm { position: absolute; left: .7rem; top: .6rem; background: rgba(0,0,0,.6); color: #fff; border-radius: 8px; padding: .1rem .6rem; font-size: .8rem; }
.screen .fs { position: absolute; right: .6rem; top: .5rem; background: rgba(0,0,0,.6); color: #fff; }
.callctl { display: flex; justify-content: center; gap: .6rem; padding: .8rem; border-top: 1px solid var(--line); flex: none; flex-wrap: wrap; align-items: center; }
.callctl select { background: var(--bg-card); border: 1px solid var(--line); border-radius: 10px; padding: .45rem .6rem; }
.join-big { margin: auto; text-align: center; display: grid; gap: 1rem; justify-items: center; }

/* wiki */
.wiki { flex: 1; display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 0; }
.wiki-list { border-right: 1px solid var(--line); overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .2rem; }
.wiki-list .ch { padding: .5rem .7rem; }
.wiki-view { overflow-y: auto; padding: 1.5rem 2rem 3rem; }
.wiki-view .doc { max-width: 760px; }
.doc h2, .doc h3, .doc h4 { margin: 1.4rem 0 .5rem; line-height: 1.25; }
.doc h2 { font-size: 1.7rem; margin-top: 0; }
.doc h3 { font-size: 1.25rem; border-bottom: 1px solid var(--line); padding-bottom: .3rem; }
.doc p, .doc ul, .doc ol { margin: .6rem 0; }
.doc blockquote { margin: .8rem 0; padding: .5rem 1rem; border-left: 4px solid var(--accent); background: var(--bg-card); border-radius: 0 12px 12px 0; }
.doc pre { background: var(--bg); padding: .8rem 1rem; border-radius: 12px; overflow-x: auto; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0; }
.doc .md-img { max-width: 100%; max-height: 480px; }
.wiki-meta { color: var(--text-3); font-size: .82rem; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.edit-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 1200px; }
.edit-wrap textarea { min-height: 55vh; font-family: 'Cascadia Code', Consolas, monospace; font-size: .9rem; resize: vertical; }
.edit-wrap .doc { background: var(--bg-card); border-radius: 14px; padding: 1rem 1.3rem; overflow: auto; max-height: 70vh; }
.tb { display: flex; gap: .3rem; flex-wrap: wrap; margin: .6rem 0; }

/* hledání a dialogy */
dialog { border: 0; border-radius: 22px; background: var(--bg-card); color: var(--text); padding: 1.4rem; width: min(440px, calc(100vw - 2rem)); box-shadow: 0 30px 90px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(10,8,18,.6); backdrop-filter: blur(3px); }
dialog h3 { margin: 0 0 .9rem; }
dialog .row { display: grid; gap: .35rem; margin-bottom: .8rem; font-size: .8rem; font-weight: 700; color: var(--text-2); }
dialog .btns { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; }
dialog.wide { width: min(640px, calc(100vw - 2rem)); }
.res { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 12px; padding: .5rem .7rem; }
.res:hover { background: var(--bg-hover); }
.res small { color: var(--text-3); display: block; }
.menu { display: grid; gap: .2rem; }
.menu .btn { text-align: left; background: transparent; }
.menu .btn:hover { background: var(--bg-hover); }
.menu .btn.danger { background: transparent; }
.menu .btn.danger:hover { background: color-mix(in srgb, var(--bad) 18%, transparent); }
.mem { display: flex; align-items: center; gap: .6rem; padding: .35rem .5rem; border-radius: 10px; color: var(--text-2); }
.mem.off { opacity: .45; }
.mem .avatar { width: 2rem; height: 2rem; font-size: .8rem; }
.mem-h { font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin: .8rem .5rem .3rem; }
#toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(20px); background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; padding: .7rem 1.1rem; box-shadow: 0 14px 40px rgba(0,0,0,.4); opacity: 0; pointer-events: none; transition: .2s; z-index: 50; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 900px) {
  #app { grid-template-columns: 230px minmax(0, 1fr); }
  #members { display: none; }
  .wiki { grid-template-columns: 1fr; }
  .wiki-list { max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .edit-wrap { grid-template-columns: 1fr; }
}

/* přepínač Chat / Wiki */
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem; margin: .2rem .7rem .5rem; padding: .25rem; background: var(--bg); border-radius: 14px; }
.mode-switch button { border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: .85rem; padding: .5rem .3rem; border-radius: 11px; transition: .15s; }
.mode-switch button:hover { color: var(--text); }
.mode-switch button.active { background: var(--accent); color: var(--accent-ink); }
.ch.sub { padding-left: 1.4rem; font-size: .9rem; }

/* wiki: přehled, karty, stránka */
.wiki-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.wiki-main .wiki-view { flex: 1; }
.crumbs { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: 1.05rem; }
.crumb { cursor: pointer; color: var(--text-2); font-weight: 600; }
.crumb:hover { color: var(--accent); }
.crumbs .sep { color: var(--text-3); }
.wsearch { max-width: 520px; margin-bottom: 1.2rem; }
.wh { margin: 1.4rem 0 .7rem; font-size: .8rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.wh:empty { display: none; }
.wgames { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .9rem; }
.wgame { position: relative; height: 120px; border: 0; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg, var(--bg-active), var(--bg-card)); color: #fff; text-align: left; transition: .18s; }
.wgame:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.wgame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wg-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 20%, rgba(10,8,18,.82)); }
.wg-t { position: absolute; left: .9rem; right: .9rem; bottom: .7rem; display: grid; gap: .1rem; }
.wg-t b { font-size: 1.05rem; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.wg-t small { opacity: .8; }
.wg-e { font-size: 1.5rem; }
.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem; }
.wcard { border: 0; padding: 0; text-align: left; background: var(--bg-card); color: var(--text); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; transition: .18s; }
.wcard:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(0,0,0,.3); background: var(--bg-hover); }
.wthumb { position: relative; height: 130px; background: var(--bg-active); }
.wthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wthumb.none { display: grid; place-items: center; font-size: 2.6rem; }
.wcount { position: absolute; right: .5rem; bottom: .5rem; font-size: .75rem; font-weight: 700; padding: .15rem .5rem; border-radius: 99px; background: rgba(10,8,18,.75); color: #fff; }
.wbody { padding: .7rem .85rem .85rem; display: grid; gap: .25rem; }
.wbody p { margin: 0; color: var(--text-2); font-size: .85rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wbody small { color: var(--text-3); }
#w-home.filtering .wgames, #w-home.filtering .wh { display: none; }
.wiki-view.page { display: grid; grid-template-columns: minmax(0, 760px) 220px; gap: 2rem; align-items: start; align-content: start; }
.toc { position: sticky; top: 0; display: grid; gap: .1rem; padding-top: .3rem; }
.toc:empty { display: none; }
.toc-h { font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin-bottom: .4rem; }
.toc a { color: var(--text-2); text-decoration: none; padding: .25rem .6rem; border-left: 2px solid var(--line); font-size: .88rem; }
.toc a:hover { color: var(--accent); border-color: var(--accent); }
.toc a.l2 { padding-left: 1.2rem; font-size: .83rem; }
.doc .md-img { border-radius: 12px; cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(10,8,18,.88); display: grid; place-items: center; cursor: zoom-out; padding: 2rem; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; box-shadow: 0 30px 90px rgba(0,0,0,.6); }
@media (max-width: 900px) { .wiki-view.page { grid-template-columns: 1fr; } .toc { display: none; } }

/* panel hlasu ve wiki: jasně oddělený od stromu stránek */
#voice-dock { flex: none; margin: .4rem .7rem .5rem; padding: .5rem .4rem .6rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); max-height: 34vh; overflow-y: auto; }
.dock-h { font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); padding: .1rem .5rem .35rem; }
.droom .dr-name { display: flex; width: 100%; justify-content: space-between; border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: .9rem; padding: .3rem .5rem; border-radius: 9px; text-align: left; }
.droom .dr-name:hover { background: var(--bg-hover); color: var(--text); }
.droom.mine .dr-name { color: var(--good); }
.droom .dr-name small { color: var(--text-3); }

/* obrázky ve wiki: galerie, popisky, přetahování */
.doc figure { margin: 1rem 0; }
.doc figure img.md-img { max-width: 100%; max-height: 520px; display: block; border: 1px solid var(--line); }
.doc figcaption { margin-top: .35rem; font-size: .82rem; color: var(--text-3); }
.doc .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .7rem; margin: 1rem 0; }
.doc .gallery figure { margin: 0; }
.doc .gallery img.md-img { width: 100%; height: 150px; max-height: none; object-fit: cover; }
.dropzone { display: grid; justify-items: center; gap: .2rem; width: 100%; margin-top: 2rem; padding: 1.4rem 1rem; border: 2px dashed var(--line); border-radius: 18px; background: transparent; color: var(--text-2); transition: .15s; }
.dropzone:hover, #main.dropping .dropzone { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); color: var(--text); }
.dropzone small { color: var(--text-3); }
.dropzone .dz-i { font-size: 1.8rem; }
.dropzone.busy { opacity: .5; pointer-events: none; }
#main.dropping { outline: 3px dashed var(--accent); outline-offset: -10px; }
.edit-wrap.dropping textarea { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--bg)); }
.lightbox { flex-direction: column; gap: .6rem; }
.lb-cap { color: #fff; font-size: .95rem; }
.lb-count { position: absolute; bottom: 1rem; left: 50%; transform: translateX(-50%); color: #fff; opacity: .7; font-size: .85rem; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.8rem; line-height: 1; }
.lb-nav:hover { background: rgba(255,255,255,.28); }
.lb-nav.prev { left: 1.2rem; } .lb-nav.next { right: 1.2rem; }

/* wiki: sekce uvnitř hry */
.wsec { margin: .1rem 0 .3rem; }
.wsec-head { display: flex; align-items: center; gap: .2rem; padding: 0 .3rem 0 .6rem; height: 1.8rem; border-radius: 9px; }
.wsec-head:hover, .wsec-head.active { background: var(--bg-hover); }
.wsec-head.active { background: var(--bg-active); }
.wsec-head .sname { flex: 1; font-size: .85rem; font-weight: 700; color: var(--text-2); cursor: pointer; user-select: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsec-head small { color: var(--text-3); font-weight: 600; margin-left: .2rem; }
.wsec-head .icon { width: 1.5rem; height: 1.5rem; font-size: .85rem; opacity: 0; }
.wsec-head:hover .icon, .wsec-head .icon:focus { opacity: 1; }
.wsec .ch.sub { padding-left: 1.7rem; }
.wtools { display: flex; gap: .7rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: .6rem; }
.wtools .wsearch { margin-bottom: 0; flex: 1; }
.wgroup .wh small { margin-left: .4rem; opacity: .7; }
.wgroup + .wgroup .wh { margin-top: 1.8rem; }
.wempty { padding: .4rem 0 .6rem; }
.seclbl { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; font-size: .82rem; font-weight: 700; color: var(--text-2); }
.seclbl .field { width: auto; min-width: 180px; padding: .4rem .6rem; }
.ch .ch-more { width: 1.5rem; height: 1.5rem; font-size: .85rem; opacity: 0; margin-left: auto; flex: none; }
.ch:hover .ch-more, .ch .ch-more:focus { opacity: 1; }
.emptytoggle { font-size: .8rem; color: var(--text-3); margin-top: .4rem; }

/* ── profily, členové, Welcome, hlasitost ── */
.avatar.img { background-size: cover; background-position: center; background-color: var(--bg-active); }
.avatar.lg { width: 3rem; height: 3rem; font-size: 1.2rem; }
.avatar.xxl { width: 5.4rem; height: 5.4rem; font-size: 2rem; box-shadow: 0 0 0 5px var(--bg-card); }
.who-av { cursor: pointer; display: contents; }
.who { cursor: pointer; }
.who:hover { text-decoration: underline; }
.crown { font-style: normal; font-size: .85em; }

/* pravý panel */
#members { width: 250px; padding: .8rem .5rem 1rem; }
.mem { display: flex; align-items: center; gap: .65rem; width: 100%; border: 0; background: transparent; text-align: left; padding: .35rem .5rem; border-radius: 12px; color: var(--text-2); transition: background .12s; }
.mem:hover { background: var(--bg-hover); }
.mem .mav { position: relative; flex: none; }
.mem .avatar { width: 2.3rem; height: 2.3rem; font-size: .85rem; }
.mem .presence { border-color: var(--bg-side); }
.mtxt { display: grid; min-width: 0; line-height: 1.25; }
.mtxt b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mtxt small { color: var(--text-3); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* profilová karta */
dialog.profile { padding: 0; width: min(380px, calc(100vw - 2rem)); overflow: hidden; }
dialog.profile.edit { width: min(440px, calc(100vw - 2rem)); max-height: calc(100vh - 2rem); overflow-y: auto; }
.pcard { position: relative; }
.pbanner { height: 104px; }
.pavatar { position: absolute; left: 1.2rem; top: 56px; }
.pavatar .presence { right: 4px; bottom: 4px; width: 1rem; height: 1rem; border-color: var(--bg-card); }
.pbody { padding: 3.4rem 1.3rem 1.2rem; display: grid; gap: .5rem; }
.pname { font-size: 1.35rem; font-weight: 800; }
.pstatus { display: inline-block; justify-self: start; padding: .2rem .7rem; border-radius: 99px; background: var(--bg-hover); font-size: .85rem; color: var(--text-2); }
.pbio { background: var(--bg); border-radius: 14px; padding: .7rem .9rem; line-height: 1.5; font-size: .92rem; overflow-wrap: anywhere; }
.pbio.empty { color: var(--text-3); font-style: italic; }
.pmeta { color: var(--text-3); font-size: .8rem; }
.pactions { padding: 0 1.3rem 1.3rem; display: flex; justify-content: flex-end; }
.pe-form { padding: .2rem 1.3rem 1.3rem; display: grid; gap: .9rem; }
.pe-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.pe-row.col { display: grid; gap: .35rem; }
.pe-l { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); flex-basis: 100%; }
.pe-form .btns { display: flex; justify-content: flex-end; gap: .5rem; }
.sws { display: flex; flex-wrap: wrap; gap: .45rem; }
.sw { width: 1.9rem; height: 1.9rem; border-radius: 50%; border: 3px solid transparent; outline: 0; box-shadow: 0 0 0 1px var(--line); position: relative; display: grid; place-items: center; font-weight: 800; color: var(--text-2); cursor: pointer; background: var(--bg-card); transition: transform .12s; }
.sw:hover { transform: scale(1.12); }
.sw.on { border-color: var(--bg-card); box-shadow: 0 0 0 3px var(--accent); }
.sw.custom input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }

/* Welcome */
.wel-cols { flex: 1; display: flex; min-height: 0; }
.wel-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.wel-main .msgs { flex: 1; min-height: 120px; }
.hero { position: relative; margin: 1rem 1.2rem .4rem; padding: 1.3rem 1.4rem 1.2rem; border-radius: 22px; overflow: hidden; border: 1px solid var(--line);
  background: radial-gradient(520px 220px at 100% -20%, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%), radial-gradient(380px 200px at -10% 120%, color-mix(in srgb, #7a5af8 22%, transparent), transparent 70%), var(--bg-card);
  display: grid; grid-template-columns: auto 1fr; gap: .4rem 1.1rem; align-items: center; flex: none; }
.hero-logo { width: 3.6rem; height: 3.6rem; border-radius: 18px; display: grid; place-items: center; font-weight: 900; font-size: 2rem; color: var(--accent-ink); background: linear-gradient(135deg, #ffb08c, #e86a6e); box-shadow: 0 10px 28px rgba(232,106,110,.35); }
.hero-t h1 { margin: 0 0 .2rem; font-size: 1.55rem; }
.hero-t p { margin: 0; color: var(--text-2); max-width: 46rem; line-height: 1.45; }
.hero-feats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; margin-top: .6rem; }
.hero-feats div { background: color-mix(in srgb, var(--bg) 55%, transparent); border: 1px solid var(--line); border-radius: 14px; padding: .6rem .8rem; display: grid; gap: .15rem; }
.hero-feats b { font-size: .92rem; }
.hero-feats span { color: var(--text-3); font-size: .8rem; line-height: 1.4; }
.hero-x { position: absolute; right: .6rem; top: .5rem; width: 1.6rem; height: 1.6rem; font-size: .8rem; opacity: .55; }
.hero-x:hover { opacity: 1; }
.hero-show { align-self: flex-start; margin: .6rem 1.2rem 0; border: 0; background: var(--bg-card); color: var(--text-2); border-radius: 99px; padding: .3rem .9rem; font-size: .8rem; font-weight: 700; }
.newcomers { width: 250px; flex: none; border-left: 1px solid var(--line); background: var(--bg-side); overflow-y: auto; padding: .8rem .5rem 1rem; }
.nc-h { font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin: .2rem .5rem .5rem; }
.nc { display: flex; align-items: center; gap: .6rem; width: 100%; border: 0; background: transparent; text-align: left; padding: .4rem .5rem; border-radius: 12px; color: var(--text-2); }
.nc:hover { background: var(--bg-hover); }
.nc .avatar { width: 2.2rem; height: 2.2rem; font-size: .8rem; }
.nc-t { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.nc-t b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nc-t small { color: var(--text-3); font-size: .75rem; }
.nc-new { font-size: .62rem; font-weight: 800; letter-spacing: .06em; padding: .15rem .45rem; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
@media (max-width: 1250px) { .newcomers { display: none; } }

/* hlasitost jednotlivce */
dialog.volume { width: min(340px, calc(100vw - 2rem)); }
.vol-head { display: flex; align-items: center; gap: .8rem; margin-bottom: 1rem; }
.vol-head div { display: grid; line-height: 1.25; }
.vol-head small { color: var(--text-3); }
.vol-row { display: flex; align-items: center; gap: .6rem; }
.vol-row input[type=range] { flex: 1; accent-color: var(--accent); }
.vol-val { text-align: center; font-weight: 700; margin: .4rem 0 .2rem; color: var(--text-2); }
dialog.volume .btns { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .8rem; }
.vuser[data-vu], .tile[data-vu] { cursor: pointer; }
.vuser[data-vu]:hover { background: var(--bg-hover); }

/* nastavení člověka v hovoru: okno vedle panelu s lidmi, bez ztmavení */
.volpop { position: fixed; z-index: 900; width: 290px; background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px; padding: .9rem 1rem 1rem; box-shadow: 0 18px 50px rgba(0,0,0,.45); display: grid; gap: .8rem; animation: vpin .14s ease-out; }
@keyframes vpin { from { opacity: 0; transform: translateX(8px); } to { opacity: 1; transform: none; } }
.vp-head { display: flex; align-items: center; gap: .7rem; }
.vp-who { display: grid; line-height: 1.25; flex: 1; min-width: 0; }
.vp-who small { color: var(--text-3); font-size: .75rem; }
.vp-x { width: 1.6rem; height: 1.6rem; font-size: .8rem; opacity: .6; }
.vp-sec { display: grid; gap: .25rem; }
.vp-l { display: flex; justify-content: space-between; font-size: .78rem; color: var(--text-2); font-weight: 700; }
.vp-l b { color: var(--text); font-weight: 700; }
.volpop input[type=range] { width: 100%; accent-color: var(--accent); }
.vp-chk { display: flex; align-items: center; gap: .5rem; font-size: .88rem; color: var(--text-2); }
.vp-chk input { accent-color: var(--accent); width: 1rem; height: 1rem; }
.vp-btns { display: flex; justify-content: space-between; gap: .5rem; }
.volpop.muted .vp-sec { opacity: .5; }

/* ── nastavení ── */
dialog.settings { width: min(780px, calc(100vw - 2rem)); height: min(560px, calc(100vh - 3rem)); padding: 0; display: none; overflow: hidden; }
dialog.settings[open] { display: grid; grid-template-columns: 210px minmax(0, 1fr); }
.st-nav { background: var(--bg-side); padding: 1.2rem .8rem; display: flex; flex-direction: column; gap: .25rem; border-right: 1px solid var(--line); }
.st-nav h3 { margin: 0 .5rem 1rem; }
.st-nav button { border: 0; background: transparent; color: var(--text-2); text-align: left; padding: .6rem .8rem; border-radius: 11px; font-weight: 700; font-size: .92rem; }
.st-nav button:hover { background: var(--bg-hover); color: var(--text); }
.st-nav button.on { background: var(--bg-active); color: var(--text); }
.st-nav .st-close { margin-top: auto; background: var(--accent); color: var(--accent-ink); text-align: center; }
.st-nav .st-close:hover { background: var(--accent-2); color: var(--accent-ink); }
.st-body { padding: 1.3rem 1.6rem 1.6rem; overflow-y: auto; display: grid; gap: .8rem; align-content: start; }
.st-body h4 { margin: .6rem 0 .1rem; font-size: .75rem; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.st-body h4:first-child { margin-top: 0; }
.st-row { display: grid; gap: .35rem; font-size: .85rem; font-weight: 700; color: var(--text-2); }
.st-row.inline { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; font-weight: 500; }
.st-row .muted, .st-note { font-weight: 500; font-size: .8rem; margin: 0; }
.st-row input[type=range] { accent-color: var(--accent); }
.st-meter { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.st-meter > div { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--good), var(--warn) 75%, var(--bad)); transition: width .06s linear; }
.st-sw { display: grid; grid-template-columns: auto 1fr; gap: 0 .7rem; align-items: center; padding: .55rem .8rem; background: var(--bg); border-radius: 12px; font-weight: 700; font-size: .9rem; }
.st-sw input { grid-row: span 2; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.st-sw small { grid-column: 2; color: var(--text-3); font-weight: 500; font-size: .76rem; }
.st-seg { max-width: 360px; }
.st-seg button { border: 0; background: transparent; color: var(--text-2); font-weight: 700; padding: .55rem .6rem; border-radius: 9px; }
.st-seg button.active { background: var(--accent); color: var(--accent-ink); }
.st-keyrow { display: flex; gap: .4rem; }
.keybtn { min-width: 190px; text-align: left; font-family: ui-monospace, Consolas, monospace; font-weight: 700; background: var(--bg); border: 1px dashed var(--line); }
.keybtn.listening { border-color: var(--accent); color: var(--accent); }
@media (max-width: 700px) { dialog.settings[open] { grid-template-columns: 1fr; height: calc(100vh - 2rem); } .st-nav { flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); } .st-nav h3 { display: none; } .st-nav .st-close { margin: 0 0 0 auto; } }

/* ── wiki strom: hry jako složky ── */
.wsep { height: 1px; background: var(--line); margin: .5rem .6rem .6rem; }
.wgm { margin-bottom: .15rem; }
.wgm-head { display: flex; align-items: center; gap: .1rem; border-radius: 12px; padding-right: .25rem; }
.wgm-head:hover, .wgm-head.active { background: var(--bg-hover); }
.wgm-head.active { background: var(--bg-active); }
.wgm-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .55rem; border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: .95rem; padding: .5rem .6rem; text-align: left; }
.wgm.cur .wgm-main, .wgm-head:hover .wgm-main, .wgm-head.active .wgm-main { color: var(--text); }
.wgm-e { width: 1.4rem; text-align: center; font-size: 1.05rem; flex: none; }
.wgm-main .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wgm-c, .wsec2-c { color: var(--text-3); font-size: .75rem; font-weight: 700; }
.wgm-head .icon { width: 1.5rem; height: 1.5rem; font-size: .85rem; opacity: 0; flex: none; }
.wgm-head:hover .icon, .wgm-head .icon:focus { opacity: 1; }
.wgm-chev { border: 0; background: transparent; color: var(--text-3); width: 1.4rem; font-size: .8rem; flex: none; }
.wgm-chev:hover { color: var(--text); }
.wgm-body { margin: .1rem 0 .5rem 1.45rem; padding-left: .55rem; border-left: 2px solid var(--line); display: grid; gap: .05rem; }
.wsec2-row { display: flex; align-items: center; border-radius: 9px; padding-right: .2rem; }
.wsec2-row:hover { background: var(--bg-hover); }
.wsec2-row.active { background: var(--bg-active); }
.wsec2-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .45rem; border: 0; background: transparent; color: var(--text-2); font-weight: 600; font-size: .9rem; padding: .32rem .5rem; text-align: left; }
.wsec2-row:hover .wsec2-main, .wsec2-row.active .wsec2-main { color: var(--text); }
.wsec2-i { color: var(--text-3); font-weight: 800; }
.wsec2-main .t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wsec2-row .icon { width: 1.4rem; height: 1.4rem; font-size: .8rem; opacity: 0; }
.wsec2-row:hover .icon, .wsec2-row .icon:focus { opacity: 1; }
.wsec2-pages { margin: .1rem 0 .3rem 1.1rem; display: grid; }
.wpg { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: var(--text-3); font-size: .85rem; padding: .25rem .6rem; border-radius: 8px; }
.wpg .t { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wpg:hover { background: var(--bg-hover); color: var(--text); }
.wpg.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); font-weight: 700; }
.wnone { margin: .1rem .6rem; font-size: .8rem; }
.wadd { border: 0; background: transparent; color: var(--text-3); text-align: left; font-size: .82rem; font-weight: 600; padding: .3rem .5rem; border-radius: 9px; margin-top: .15rem; }
.wadd:hover { color: var(--accent); background: var(--bg-hover); }

/* kód pozvánky (jen admin) nahoře v pravém panelu */
.invite-chip { margin: .1rem .3rem .6rem; padding: .7rem .8rem; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--bg-card)), var(--bg-card)); display: grid; gap: .45rem; }
.ic-l { font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.ic-code { font-family: ui-monospace, Consolas, monospace; font-size: 1.35rem; font-weight: 800; letter-spacing: .08em; color: var(--accent); cursor: pointer; user-select: all; }
.ic-btns { display: flex; gap: .4rem; }

/* ovládání hovoru přímo v panelu místností (ve wiki) */
.dr-ctl { display: flex; gap: .4rem; padding: .5rem .3rem 0; margin-top: .4rem; border-top: 1px solid var(--line); }
.dr-ctl .btn { flex: 1; font-size: .78rem; padding: .35rem .4rem; }
.dr-ctl .btn.on { background: color-mix(in srgb, var(--accent) 25%, transparent); color: var(--accent); }

/* ══ Styly jmen, rámečky a animované bannery ══ */
.nm { color: var(--c); }
.nm[class*='fx-'] { font-weight: 800; }
@keyframes fx-flow { to { background-position: 200% 0; } }
@keyframes fx-glow { 0%, 100% { text-shadow: 0 0 4px var(--c), 0 0 10px color-mix(in srgb, var(--c) 70%, transparent); } 50% { text-shadow: 0 0 8px var(--c), 0 0 22px var(--c), 0 0 34px color-mix(in srgb, var(--c) 60%, transparent); } }
@keyframes fx-shimmer { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
@keyframes fx-flicker { 0%, 100% { filter: brightness(1) saturate(1.1); } 40% { filter: brightness(1.25) saturate(1.3); } 70% { filter: brightness(.9); } }
.fx-gradient { background: linear-gradient(90deg, var(--c), color-mix(in srgb, var(--c) 35%, #fff), color-mix(in srgb, var(--c) 60%, #8a5cff), var(--c)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-flow 4s linear infinite; }
.fx-rainbow { background: linear-gradient(90deg, #ff5f6d, #ffc371, #5fe08b, #4cc9f0, #a78bfa, #ff5f6d); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-flow 3s linear infinite; }
.fx-glow { animation: fx-glow 2.4s ease-in-out infinite; }
.fx-shimmer { background: linear-gradient(100deg, var(--c) 35%, #fff 50%, var(--c) 65%); background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-shimmer 2.6s linear infinite; }
.fx-fire { background: linear-gradient(90deg, #ff3d00, #ffb300, #ff6d00, #ff3d00); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-flow 2s linear infinite, fx-flicker 1.2s ease-in-out infinite; text-shadow: none; }
.fx-ice { background: linear-gradient(90deg, #7ee8fa, #ffffff, #80b9ff, #7ee8fa); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-flow 5s linear infinite; }

/* rámečky kolem profilového obrázku */
.avwrap { position: relative; display: inline-block; flex: none; line-height: 0; border-radius: 50%; padding: 3px; isolation: isolate; }
.avwrap > .avatar { position: relative; z-index: 1; box-shadow: none; }
.avwrap::before { content: ''; position: absolute; inset: 0; border-radius: 50%; z-index: 0; }
.avwrap > .avatar.talking { outline: 2px solid var(--good); outline-offset: 1px; }
@keyframes fr-spin { to { transform: rotate(360deg); } }
@keyframes fr-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }
.frame-ring::before { background: conic-gradient(from 0deg, var(--c), color-mix(in srgb, var(--c) 30%, #fff), var(--c)); animation: fr-spin 4s linear infinite; }
.frame-pulse::before { background: var(--c); animation: fr-pulse 1.8s ease-out infinite; }
.frame-rainbow::before { background: conic-gradient(#ff5f6d, #ffc371, #5fe08b, #4cc9f0, #a78bfa, #ff5f6d); animation: fr-spin 3s linear infinite; }
.frame-flame::before { background: conic-gradient(#ff3d00, #ffb300, #ff6d00, #ffe082, #ff3d00); animation: fr-spin 2s linear infinite; filter: blur(.4px); }
.avwrap.mini { width: 1.5rem; height: 1.5rem; padding: 2px; margin-right: .45rem; vertical-align: middle; --c: var(--accent); }
.avwrap.mini i { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--bg-card); position: relative; z-index: 1; }
.avwrap.xxl-wrap { padding: 4px; }
.pavatar .avwrap { padding: 4px; }
.pavatar .avwrap .avatar.xxl { box-shadow: 0 0 0 4px var(--bg-card); }

/* výběr stylů v editoru profilu */
.fxs { display: flex; flex-wrap: wrap; gap: .45rem; }
.fxchip { border: 2px solid transparent; background: var(--bg); color: var(--text-2); border-radius: 12px; padding: .4rem .75rem; font-weight: 700; font-size: .88rem; display: inline-flex; align-items: center; transition: .12s; }
.fxchip:hover { background: var(--bg-hover); }
.fxchip.on { border-color: var(--accent); color: var(--text); }
.pe-form { --c: var(--accent); }

/* animované bannery */
@keyframes bn-shift { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }

@media (prefers-reduced-motion: reduce) {
  .nm, .avwrap::before, .pbanner, .sw { animation: none !important; }
}

/* ikony ve spodní liště: jasný stav mikrofonu a sluchátek */
#me-bar .icon svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
#me-bar .icon { color: var(--text-2); display: grid; place-items: center; }
#me-bar .icon:hover { color: var(--text); }
#mic-btn.on, #deaf-btn.on { color: var(--bad); background: color-mix(in srgb, var(--bad) 18%, transparent); }
#mic-btn.on .slash, #deaf-btn.on .slash { stroke: var(--bad); }
#mic-btn.idle { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, transparent); }
#mic-btn.live { color: var(--good); background: color-mix(in srgb, var(--good) 18%, transparent); }
#logout-btn:hover { color: var(--bad); }

/* ══ Bannery: vrstvené scény s pohybem ══ */
.pbanner { position: relative; overflow: hidden; height: 112px; }
.pbanner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 32%, rgba(255,255,255,.16) 50%, transparent 68%); transform: translateX(-120%); animation: bn-sheen 7s ease-in-out infinite; pointer-events: none; }
.pbanner[data-b='']::after { display: none; }
@keyframes bn-sheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
.sw.bn { width: 3.7rem; height: 2.1rem; border-radius: 11px; overflow: hidden; border: 0; background-color: var(--bg-card); }
.sw.bn.on { box-shadow: 0 0 0 3px var(--accent); }
.sw.bn:hover { transform: scale(1.06); }
.sw.bn.custom { display: grid; place-items: center; background: var(--bg); }

/* Západ slunce */
.pbanner[data-b='sunset'], .sw.bn[data-b='sunset'] {
  background: radial-gradient(circle at 78% 118%, #ffe29a 0 13%, rgba(255,226,154,0) 40%), radial-gradient(60% 90% at 12% 0%, rgba(255,120,170,.85), transparent 65%), linear-gradient(160deg, #ff9966 0%, #ff5e62 48%, #9b3d8f 100%);
  background-size: 140% 140%, 100% 100%, 100% 100%; animation: bn-sun 9s ease-in-out infinite alternate; }
@keyframes bn-sun { from { background-position: 0% 0%, 0 0, 0 0; } to { background-position: 30% -12%, 0 0, 0 0; } }

/* Oceán: vlny */
.pbanner[data-b='ocean'], .sw.bn[data-b='ocean'] {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='36'%3E%3Cpath d='M0 18 Q20 2 40 18 T80 18 T120 18 T160 18 V36 H0Z' fill='rgba(255,255,255,.16)'/%3E%3C/svg%3E") 0 56% / 160px 36px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='110' height='28'%3E%3Cpath d='M0 14 Q14 2 28 14 T55 14 T83 14 T110 14 V28 H0Z' fill='rgba(255,255,255,.14)'/%3E%3C/svg%3E") 0 76% / 110px 28px repeat-x,
    radial-gradient(60% 80% at 80% 0%, rgba(160,235,255,.5), transparent 70%), linear-gradient(180deg, #4facfe 0%, #1d5fd0 58%, #0b2f7a 100%);
  animation: bn-waves 8s linear infinite; }
@keyframes bn-waves { to { background-position: 160px 56%, -110px 76%, 0 0, 0 0; } }

/* Les */
.pbanner[data-b='forest'], .sw.bn[data-b='forest'] {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='50'%3E%3Cpath d='M30 4 L46 28 H38 L52 46 H8 L22 28 H14Z' fill='rgba(0,28,18,.6)'/%3E%3C/svg%3E") 0 100% / 60px 50px repeat-x,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='90' height='70'%3E%3Cpath d='M45 4 L68 38 H56 L78 66 H12 L34 38 H22Z' fill='rgba(0,20,12,.78)'/%3E%3C/svg%3E") 30px 100% / 90px 70px repeat-x,
    radial-gradient(2px 2px at 22% 38%, #fff6a0, transparent), radial-gradient(2px 2px at 64% 26%, #fff6a0, transparent), radial-gradient(1.5px 1.5px at 84% 48%, #d7ffb0, transparent),
    radial-gradient(70% 90% at 50% -10%, rgba(180,255,200,.45), transparent 70%), linear-gradient(180deg, #2f8f5e 0%, #15523a 100%);
  animation: bn-forest 18s linear infinite; }
@keyframes bn-forest { to { background-position: 60px 100%, 120px 100%, 0 0, 0 0, 0 0, 0 0, 0 0; } }

/* Bobule: pohyblivá mesh */
.pbanner[data-b='berry'], .sw.bn[data-b='berry'] {
  background: radial-gradient(40% 70% at 20% 30%, #f78ca0, transparent 70%), radial-gradient(45% 80% at 85% 20%, #7a5af8, transparent 70%), radial-gradient(50% 80% at 55% 110%, #e58bd9, transparent 70%), linear-gradient(135deg, #3b1f6b, #8e2de2);
  background-size: 170% 170%, 170% 170%, 170% 170%, 100% 100%; animation: bn-mesh 10s ease-in-out infinite alternate; }
@keyframes bn-mesh { from { background-position: 0% 0%, 100% 0%, 50% 100%, 0 0; } to { background-position: 100% 100%, 0% 100%, 50% 0%, 0 0; } }

/* Noc: hvězdy a měsíc */
.pbanner[data-b='night'], .sw.bn[data-b='night'] {
  background: radial-gradient(circle at 82% 30%, #fffbe6 0 7px, rgba(255,251,230,.38) 8px 13px, transparent 30px),
    radial-gradient(1.2px 1.2px at 12px 18px, #fff, transparent), radial-gradient(1.4px 1.4px at 58px 44px, #cfe8ff, transparent), radial-gradient(1.2px 1.2px at 96px 20px, #fff, transparent), radial-gradient(1.6px 1.6px at 130px 72px, #fff, transparent),
    radial-gradient(1px 1px at 30px 62px, rgba(255,255,255,.75), transparent), radial-gradient(1px 1px at 82px 10px, rgba(255,255,255,.75), transparent), radial-gradient(1px 1px at 52px 36px, rgba(255,255,255,.6), transparent),
    linear-gradient(180deg, #0b1030, #1d1b4b 68%, #352a6b);
  background-size: 100% 100%, 150px 90px, 150px 90px, 150px 90px, 150px 90px, 110px 80px, 110px 80px, 110px 80px, 100% 100%;
  animation: bn-stars 40s linear infinite; }
@keyframes bn-stars { to { background-position: 0 0, -150px 0, -150px 0, -150px 0, -150px 0, -110px 0, -110px 0, -110px 0, 0 0; } }

/* Zlato: kovový lesk */
.pbanner[data-b='gold'], .sw.bn[data-b='gold'] {
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 2px, transparent 2px 11px), linear-gradient(115deg, #7a5200 0%, #e8a33d 22%, #ffe08a 38%, #e8a33d 55%, #8a5a0a 75%, #f3c969 100%);
  background-size: 100% 100%, 220% 100%; animation: bn-gold 7s ease-in-out infinite alternate; }
@keyframes bn-gold { from { background-position: 0 0, 0% 0; } to { background-position: 0 0, 100% 0; } }

/* Máta: pastelová mesh */
.pbanner[data-b='mint'], .sw.bn[data-b='mint'] {
  background: radial-gradient(45% 80% at 15% 20%, #fff1b8, transparent 70%), radial-gradient(45% 80% at 90% 30%, #c5b8ff, transparent 70%), radial-gradient(50% 80% at 50% 110%, #9fe8d8, transparent 70%), linear-gradient(135deg, #b8f2e6, #8fd3c4);
  background-size: 170% 170%, 170% 170%, 170% 170%, 100% 100%; animation: bn-mesh 12s ease-in-out infinite alternate; }

/* Mono: jemná mřížka */
.pbanner[data-b='mono'], .sw.bn[data-b='mono'] {
  background: linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px) 0 0 / 22px 22px, radial-gradient(70% 120% at 80% 0%, rgba(255,255,255,.2), transparent), linear-gradient(135deg, #3a3652, #14121f);
  animation: bn-grid 14s linear infinite; }
@keyframes bn-grid { to { background-position: 22px 22px, 22px 22px, 0 0, 0 0; } }

/* Aurora: zelené, modré a fialové závoje */
.pbanner[data-b='aurora'], .sw.bn[data-b='aurora'] {
  background: radial-gradient(45% 55% at 22% 78%, rgba(42,245,152,.85), transparent 70%), radial-gradient(40% 60% at 60% 70%, rgba(0,158,253,.75), transparent 70%), radial-gradient(40% 60% at 90% 80%, rgba(168,85,247,.75), transparent 70%), linear-gradient(180deg, #050d27, #0b1e44);
  background-size: 190% 190%, 190% 190%, 190% 190%, 100% 100%; animation: bn-aurora 11s ease-in-out infinite alternate; }
@keyframes bn-aurora { from { background-position: 0% 100%, 100% 100%, 50% 100%, 0 0; } to { background-position: 100% 30%, 0% 20%, 60% 0%, 0 0; } }

/* Neon: synthwave slunce a mřížka */
.pbanner[data-b='neon'], .sw.bn[data-b='neon'] {
  background: repeating-linear-gradient(180deg, rgba(255,80,210,.6) 0 1px, transparent 1px 9px) 0 100% / 100% 38% no-repeat, repeating-linear-gradient(90deg, rgba(255,80,210,.45) 0 1px, transparent 1px 22px) 0 100% / 100% 38% no-repeat,
    radial-gradient(circle at 50% 66%, #ffd36b 0 20%, #ff3d81 21% 36%, rgba(255,61,129,0) 38%), linear-gradient(180deg, #1a0536 0%, #4a0e6e 60%, #7a1fa2 100%);
  animation: bn-neon 5s linear infinite; }
@keyframes bn-neon { to { background-position: 0 calc(100% + 9px), 22px 100%, 0 0, 0 0; } }

/* Láva: žhavé skvrny */
.pbanner[data-b='lava'], .sw.bn[data-b='lava'] {
  background: radial-gradient(40% 60% at 20% 90%, rgba(255,140,0,.9), transparent 70%), radial-gradient(35% 55% at 65% 100%, rgba(255,60,0,.9), transparent 70%), radial-gradient(30% 50% at 95% 80%, rgba(255,200,60,.7), transparent 70%), linear-gradient(180deg, #1a0505, #3a0c06);
  background-size: 190% 190%, 190% 190%, 190% 190%, 100% 100%; animation: bn-lava 7s ease-in-out infinite alternate; }
@keyframes bn-lava { from { background-position: 0% 100%, 100% 100%, 50% 100%, 0 0; } to { background-position: 60% 40%, 20% 60%, 100% 30%, 0 0; } }

/* Vesmír: mlhovina a hvězdy */
.pbanner[data-b='space'], .sw.bn[data-b='space'] {
  background: radial-gradient(1.2px 1.2px at 14px 20px, #fff, transparent), radial-gradient(1.6px 1.6px at 70px 54px, #fff, transparent), radial-gradient(1px 1px at 118px 28px, #cfe8ff, transparent), radial-gradient(1.4px 1.4px at 150px 80px, #fff, transparent),
    radial-gradient(45% 70% at 25% 40%, rgba(255,92,200,.55), transparent 70%), radial-gradient(45% 70% at 75% 60%, rgba(70,120,255,.6), transparent 70%), linear-gradient(135deg, #0a0626, #1b0b4a);
  background-size: 170px 100px, 170px 100px, 170px 100px, 170px 100px, 160% 160%, 160% 160%, 100% 100%;
  animation: bn-space 30s linear infinite; }
@keyframes bn-space { to { background-position: -170px 0, -170px 0, -170px 0, -170px 0, 100% 100%, 0% 0%, 0 0; } }

/* Cyber: mřížka a skenovací paprsek */
.pbanner[data-b='cyber'], .sw.bn[data-b='cyber'] {
  background: linear-gradient(90deg, transparent 0 46%, rgba(0,255,210,.55) 50%, transparent 54% 100%) -100% 0 / 60% 100% no-repeat,
    linear-gradient(rgba(0,255,210,.14) 1px, transparent 1px) 0 0 / 20px 20px, linear-gradient(90deg, rgba(0,255,210,.14) 1px, transparent 1px) 0 0 / 20px 20px,
    radial-gradient(60% 100% at 100% 0%, rgba(0,160,255,.4), transparent 70%), linear-gradient(135deg, #031a1f, #06323a);
  animation: bn-cyber 4s linear infinite; }
@keyframes bn-cyber { to { background-position: 220% 0, 0 0, 0 0, 0 0, 0 0; } }

/* Bonbón: bubliny */
.pbanner[data-b='candy'], .sw.bn[data-b='candy'] {
  background: radial-gradient(circle at 18% 70%, rgba(255,255,255,.55) 0 7px, transparent 8px), radial-gradient(circle at 46% 30%, rgba(255,255,255,.45) 0 5px, transparent 6px), radial-gradient(circle at 78% 62%, rgba(255,255,255,.5) 0 9px, transparent 10px), radial-gradient(circle at 92% 20%, rgba(255,255,255,.4) 0 4px, transparent 5px),
    linear-gradient(135deg, #ff9ac8 0%, #ffc3a0 40%, #9ad0ff 100%);
  background-size: 100% 140%, 100% 140%, 100% 140%, 100% 140%, 100% 100%; animation: bn-bubbles 8s ease-in-out infinite alternate; }
@keyframes bn-bubbles { from { background-position: 0 0, 0 0, 0 0, 0 0, 0 0; } to { background-position: 0 -40%, 0 -30%, 0 -50%, 0 -25%, 0 0; } }

/* ══ Rámečky: tenký svítící prstenec kolem obrázku ══ */
.avwrap { --rt: 3px; --gap: 2px; padding: calc(var(--rt) + var(--gap)); }
.pavatar .avwrap { --rt: 5px; --gap: 3px; }
.avwrap.mini { --rt: 2px; --gap: 1px; padding: 3px; }
.avwrap::before { inset: 0; border-radius: 50%; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--rt) - .5px), #000 calc(100% - var(--rt))); mask: radial-gradient(farthest-side, transparent calc(100% - var(--rt) - .5px), #000 calc(100% - var(--rt))); }
.avwrap::after { content: ''; position: absolute; display: none; pointer-events: none; z-index: 2; }
.pavatar .avwrap .avatar.xxl, .avwrap > .avatar.xxl { box-shadow: none; }
@keyframes fr-spin { to { transform: rotate(360deg); } }
@keyframes fr-wave { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.55); opacity: 0; } }
@keyframes fr-float { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-2px); } }
@keyframes fr-flicker { 0%, 100% { filter: drop-shadow(0 0 5px #ff6a00) brightness(1); } 45% { filter: drop-shadow(0 0 9px #ffb300) brightness(1.2); } 70% { filter: drop-shadow(0 0 4px #ff3d00) brightness(.95); } }

.frame-ring { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c) 75%, transparent)); }
.frame-ring::before { background: conic-gradient(from 0deg, var(--c), color-mix(in srgb, var(--c) 22%, #fff), var(--c) 48%, color-mix(in srgb, var(--c) 50%, #7a5af8), var(--c)); animation: fr-spin 4s linear infinite; }

.frame-pulse::before { background: var(--c); animation: none; }
.frame-pulse::after { display: block; inset: 0; border-radius: 50%; border: 2px solid var(--c); animation: fr-wave 1.9s ease-out infinite; z-index: 0; }
.frame-pulse { filter: drop-shadow(0 0 4px color-mix(in srgb, var(--c) 60%, transparent)); }

.frame-rainbow { filter: drop-shadow(0 0 5px rgba(120, 190, 255, .65)); }
.frame-rainbow::before { background: conic-gradient(#ff5f6d, #ffc371, #5fe08b, #4cc9f0, #a78bfa, #ff5f6d); animation: fr-spin 3s linear infinite; }

.frame-flame { animation: fr-flicker 1.3s ease-in-out infinite; }
.frame-flame::before { background: conic-gradient(#ff3d00, #ffb300, #ff6d00, #ffe082, #ff3d00); animation: fr-spin 2s linear infinite; }

.frame-neon { filter: drop-shadow(0 0 4px #00f0ff) drop-shadow(0 0 8px #ff2bd6); }
.frame-neon::before { background: conic-gradient(#00f0ff, #ff2bd6, #00f0ff); animation: fr-spin 3.5s linear infinite; }
.frame-neon::after { display: block; inset: calc(var(--rt) - 1px); border-radius: 50%; box-shadow: inset 0 0 7px rgba(0, 240, 255, .9); z-index: 2; }

.avwrap.frame-orbit { --rt: 2px; }
.frame-orbit::before { background: color-mix(in srgb, var(--c) 55%, transparent); animation: none; }
.frame-orbit::after { display: block; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 1.5px, #fff 0 2.5px, var(--c) 3px, transparent 6px); animation: fr-spin 2.6s linear infinite; }
.frame-orbit { filter: drop-shadow(0 0 3px color-mix(in srgb, var(--c) 70%, transparent)); }

.avwrap.frame-halo { --rt: 0px; --gap: 0px; padding: 0; }
.frame-halo::before { display: none; }
.frame-halo::after { display: block; left: 50%; top: -13%; width: 64%; height: 22%; transform: translateX(-50%); border-radius: 50%; border: 3px solid #ffe08a; box-shadow: 0 0 9px #ffd54f, inset 0 0 6px #ffd54f; animation: fr-float 2.4s ease-in-out infinite; }

@media (prefers-reduced-motion: reduce) {
  .pbanner, .sw.bn, .avwrap, .avwrap::before, .avwrap::after, .pbanner::after { animation: none !important; }
}

/* ══ Blesky ══ */
@keyframes fx-storm { 0%, 84%, 100% { color: #9fd0ff; text-shadow: 0 0 4px #4aa3ff, 0 0 10px #2f6fe8; } 86% { color: #fff; text-shadow: 0 0 6px #fff, 0 0 18px #bfe3ff, 0 0 34px #7ab8ff; } 88% { color: #9fd0ff; } 91% { color: #fff; text-shadow: 0 0 8px #fff, 0 0 24px #8cc8ff; } 94% { color: #9fd0ff; } }
.fx-storm { color: #9fd0ff; animation: fx-storm 3.4s linear infinite; }
.fx-storm::after { content: ' ⚡'; font-size: .85em; text-shadow: none; }
@keyframes bolt-flash { 0%, 82%, 100% { opacity: 0; } 84% { opacity: 1; } 86% { opacity: .1; } 89% { opacity: 1; } 93% { opacity: 0; } }
@keyframes sky-flash { 0%, 82%, 100% { opacity: 0; } 84% { opacity: .5; } 86% { opacity: 0; } 89% { opacity: .35; } 93% { opacity: 0; } }

/* banner Bouře: tmavé mraky, blesk a záblesk oblohy */
.pbanner[data-b='storm'], .sw.bn[data-b='storm'] {
  background: radial-gradient(45% 55% at 20% 20%, rgba(120,140,190,.55), transparent 70%), radial-gradient(50% 60% at 75% 15%, rgba(90,110,170,.55), transparent 70%), radial-gradient(40% 40% at 50% 0%, rgba(150,170,220,.35), transparent 70%), linear-gradient(180deg, #0b1020 0%, #18213a 55%, #0e1426 100%);
  background-size: 150% 150%, 150% 150%, 150% 150%, 100% 100%; animation: bn-mesh 14s ease-in-out infinite alternate; }
.pbanner[data-b='storm']::before, .sw.bn[data-b='storm']::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 100' preserveAspectRatio='none'%3E%3Cpath d='M34 0 L20 44 L32 44 L16 100 L46 38 L33 38 L44 0Z' fill='%23eaf6ff' stroke='%239cd0ff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 68% 0 / 44px 100% no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 100' preserveAspectRatio='none'%3E%3Cpath d='M30 0 L22 36 L30 36 L18 82 L38 32 L29 32 L36 0Z' fill='%23eaf6ff' stroke='%239cd0ff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") 22% 0 / 28px 80% no-repeat;
  filter: drop-shadow(0 0 6px #7ab8ff); animation: bolt-flash 5.2s linear infinite; }
.pbanner[data-b='storm']::after, .sw.bn[data-b='storm']::after { display: block; content: ''; position: absolute; inset: 0; transform: none; background: radial-gradient(60% 90% at 68% 0%, rgba(210,230,255,.9), transparent 70%); animation: sky-flash 5.2s linear infinite; pointer-events: none; }

/* rámeček Blesk: elektrický prstenec s výboji */
@keyframes fr-zap { 0%, 78%, 100% { filter: drop-shadow(0 0 4px #4aa3ff) brightness(1); } 82% { filter: drop-shadow(0 0 10px #fff) brightness(1.7); } 86% { filter: drop-shadow(0 0 4px #4aa3ff) brightness(1); } 90% { filter: drop-shadow(0 0 12px #bfe3ff) brightness(1.6); } }
.frame-bolt { animation: fr-zap 2.8s linear infinite; }
.frame-bolt::before { background: conic-gradient(#2f6fe8, #bfe3ff, #2f6fe8 30%, #ffffff 45%, #2f6fe8 60%, #7ab8ff 80%, #2f6fe8); animation: fr-spin 1.6s linear infinite; }
.frame-bolt::after { display: block; inset: -14% -14% auto auto; width: 52%; height: 52%; border-radius: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M26 0 L10 22 L19 22 L12 40 L32 15 L22 15 L30 0Z' fill='%23eaf6ff' stroke='%237ab8ff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: bolt-flash 2.8s linear infinite; }

/* ══ Welcome banner ══ */
.hero { display: block; position: relative; margin: 1rem 1.2rem .5rem; padding: 1.5rem 1.6rem 1.3rem; border-radius: 26px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line)); flex: none; isolation: isolate;
  background: linear-gradient(135deg, #1d1736 0%, #271b3f 55%, #1a1330 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.06); }
:root[data-theme='light'] .hero { background: linear-gradient(135deg, #fff1e8 0%, #f2e8ff 100%); }
.hero-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero-bg i { position: absolute; border-radius: 50%; filter: blur(46px); opacity: .75; }
.hero-bg .o1 { width: 280px; height: 280px; background: #ff7a59; left: -60px; top: -90px; animation: orb1 14s ease-in-out infinite alternate; }
.hero-bg .o2 { width: 320px; height: 320px; background: #7a5af8; right: -80px; top: -60px; animation: orb2 17s ease-in-out infinite alternate; }
.hero-bg .o3 { width: 240px; height: 240px; background: #19c3b1; right: 30%; bottom: -150px; opacity: .5; animation: orb3 12s ease-in-out infinite alternate; }
@keyframes orb1 { to { transform: translate(120px, 50px) scale(1.2); } }
@keyframes orb2 { to { transform: translate(-140px, 70px) scale(.9); } }
@keyframes orb3 { to { transform: translate(-90px, -30px) scale(1.25); } }
.hero-grid { position: absolute; inset: 0; background: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 28px 28px, linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) 0 0 / 28px 28px; -webkit-mask: radial-gradient(80% 100% at 50% 0%, #000, transparent 85%); mask: radial-gradient(80% 100% at 50% 0%, #000, transparent 85%); }
.hero-top { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.hero-logo { width: 4.4rem; height: 4.4rem; border-radius: 22px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, #ffb08c, #e86a6e 60%, #b4458c); box-shadow: 0 12px 34px rgba(232,106,110,.5), inset 0 2px 0 rgba(255,255,255,.35); animation: logo-float 4.5s ease-in-out infinite; }
.hero-logo span { font-weight: 900; font-size: 2.5rem; color: #2a1710; text-shadow: 0 2px 0 rgba(255,255,255,.3); }
@keyframes logo-float { 0%, 100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-5px) rotate(3deg); } }
.hero-t { flex: 1; min-width: 240px; }
.hero-kicker { font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: .2rem; }
.hero-t h1 { margin: 0 0 .3rem; font-size: 2.2rem; line-height: 1.1; letter-spacing: -.01em; }
.hero-t h1 .grad { background: linear-gradient(90deg, #ffb08c, #ff6a88, #b57bff, #ffb08c); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: fx-flow 6s linear infinite; }
.hero-t p { margin: 0; color: var(--text-2); max-width: 36rem; line-height: 1.5; }
.hero-stats { display: flex; gap: .6rem; }
.hero-stats div { display: grid; justify-items: center; min-width: 4.4rem; padding: .55rem .7rem; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.hero-stats b { font-size: 1.5rem; line-height: 1.1; background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--accent) 65%, #fff)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-stats span { font-size: .7rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.hero-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .7rem; margin-top: 1.2rem; }
.hf { position: relative; display: grid; gap: .15rem; text-align: left; padding: .85rem .95rem .8rem; border-radius: 18px; border: 1px solid rgba(255,255,255,.09); background: rgba(255,255,255,.055); backdrop-filter: blur(8px); color: var(--text); font: inherit; transition: transform .18s, border-color .18s, background .18s; }
button.hf { cursor: pointer; }
button.hf:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: rgba(255,255,255,.09); }
.hf i { font-style: normal; width: 2.3rem; height: 2.3rem; display: grid; place-items: center; font-size: 1.15rem; border-radius: 12px; margin-bottom: .35rem; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 6px 16px rgba(0,0,0,.25); }
.hf.f1 i { background: linear-gradient(135deg, #6aa5ff, #4a6cf7); } .hf.f2 i { background: linear-gradient(135deg, #6fd6a4, #19a37b); } .hf.f3 i { background: linear-gradient(135deg, #ffcb6b, #ff8a3d); } .hf.f4 i { background: linear-gradient(135deg, #e58bd9, #7a5af8); }
.hf b { font-size: .98rem; }
.hf span { color: var(--text-3); font-size: .8rem; line-height: 1.4; }
.hf em { font-style: normal; font-size: .78rem; font-weight: 700; color: var(--accent); margin-top: .25rem; }
.hero-x { position: absolute; right: .7rem; top: .6rem; width: 1.7rem; height: 1.7rem; font-size: .8rem; opacity: .55; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .hero-bg i, .hero-logo, .hero-t h1 .grad, .fx-storm, .frame-bolt, .pbanner::before { animation: none !important; } }

/* ══ Vlastní výběr barvy ══ */
.cpick { position: fixed; z-index: 2000; width: 272px; padding: .8rem; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--line); box-shadow: 0 22px 60px rgba(0,0,0,.55); display: grid; gap: .7rem; animation: vpin .14s ease-out; }
.cp-sv { position: relative; height: 150px; border-radius: 12px; cursor: crosshair; touch-action: none;
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(var(--h, 0), 100%, 50%)); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.cp-knob { position: absolute; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.4), 0 3px 8px rgba(0,0,0,.5); pointer-events: none; }
.cp-row { display: flex; align-items: center; gap: .6rem; }
.cp-eye { width: 2rem; height: 2rem; border: 0; border-radius: 10px; background: var(--bg); font-size: 1rem; flex: none; }
.cp-eye:hover { background: var(--bg-hover); }
.cp-prev { width: 2rem; height: 2rem; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px var(--bg-card), 0 0 0 4px var(--line); }
.cp-hue { position: relative; flex: 1; height: 12px; border-radius: 99px; cursor: pointer; touch-action: none; background: linear-gradient(90deg, #f00, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00); }
.cp-hknob { position: absolute; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; border: 3px solid #fff; background: transparent; box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 2px 6px rgba(0,0,0,.45); pointer-events: none; }
.cp-inputs { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: .4rem; }
.cp-inputs label { display: grid; gap: .2rem; font-size: .68rem; font-weight: 800; letter-spacing: .08em; color: var(--text-3); text-align: center; }
.cp-inputs input { width: 100%; min-width: 0; padding: .4rem .3rem; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 600 .85rem ui-monospace, Consolas, monospace; text-align: center; outline: none; -moz-appearance: textfield; }
.cp-inputs input::-webkit-outer-spin-button, .cp-inputs input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.cp-inputs input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.cp-pre { display: flex; flex-wrap: wrap; gap: .35rem; }
.cp-pre button { width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--line); }
.cp-pre button:hover { transform: scale(1.15); }
.cp-foot { display: flex; justify-content: flex-end; }
.sw.custom.on { color: transparent; }

/* ══ Vypínač animací ══ */
.side-top { display: flex; align-items: center; gap: .3rem; margin: .7rem .7rem .3rem; }
.side-top .server-head { margin: 0; flex: 1; min-width: 0; }
.anim-btn { display: inline-flex; align-items: center; gap: .3rem; flex: none; border: 1px solid var(--line); background: var(--bg); color: var(--accent); border-radius: 99px; padding: .32rem .6rem; font-weight: 800; font-size: .72rem; letter-spacing: .06em; transition: .15s; }
.anim-btn:hover { background: var(--bg-hover); }
.anim-btn.off { color: var(--text-3); }
.anim-btn.off .anim-i { filter: grayscale(1); opacity: .6; }
html[data-anim='off'] *, html[data-anim='off'] *::before, html[data-anim='off'] *::after { animation: none !important; }
html[data-anim='off'] .pbanner::after, html[data-anim='off'] .pbanner[data-b='storm']::before, html[data-anim='off'] .sw.bn[data-b='storm']::before, html[data-anim='off'] .frame-bolt::after, html[data-anim='off'] .frame-pulse::after, html[data-anim='off'] .frame-orbit::after { display: none !important; }

/* ══ Odznaky a hry na profilu ══ */
.bdg { display: inline-flex; align-items: center; gap: .3rem; height: 1.35rem; padding: 0 .3rem; border-radius: 99px; background: color-mix(in srgb, var(--b) 18%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--b) 45%, transparent); font-size: .72rem; line-height: 1; }
.bdg i { font-style: normal; font-size: .8rem; }
.bdg.full { height: 1.7rem; padding: 0 .65rem 0 .45rem; font-size: .8rem; }
.bdg.full i { font-size: 1rem; }
.bdg.full b { font-weight: 700; color: var(--text); }
.mbd { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; margin-top: .25rem; }
.mbd .gm { font-size: .85rem; width: 1.35rem; height: 1.35rem; display: grid; place-items: center; border-radius: 8px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.mbd .gm:first-of-type { margin-left: .2rem; }
.mem { align-items: flex-start; }
.mem .mav { margin-top: .1rem; }
.psec { display: grid; gap: .35rem; }
.pl { font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); }
.pbadges, .pgames { display: flex; flex-wrap: wrap; gap: .4rem; }
.pg { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem .3rem .45rem; border-radius: 99px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); font-size: .82rem; font-weight: 700; color: var(--text); }
.pg i { font-style: normal; font-size: 1rem; }
.gchip { font-size: .85rem; }

/* ══ Levá lišta: jasné, kontrastní ikony ══ */
#side { --ico: color-mix(in srgb, var(--text) 78%, var(--bg-side)); }
.ch, .wgm-main, .wsec2-main { color: color-mix(in srgb, var(--text) 84%, var(--bg-side)); }
.ch .em { width: 1.5rem; height: 1.5rem; display: grid; place-items: center; flex: none; color: var(--ico); }
.ch .em svg, .mode-switch svg, .search-btn svg { width: 1.2rem; height: 1.2rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ch:hover .em { color: var(--text); }
.ch.active .em { color: var(--accent); }
.ch.in-call .em { color: var(--good); }
.ch[data-kind='voice'] .em { color: color-mix(in srgb, var(--good) 75%, var(--ico)); }
.ch.active { background: color-mix(in srgb, var(--accent) 16%, var(--bg-active)); }
.ch { font-size: 1rem; padding: .45rem .65rem; }
.mode-switch button { display: flex; align-items: center; justify-content: center; gap: .5rem; font-size: .9rem; color: color-mix(in srgb, var(--text) 80%, var(--bg)); }
.mode-switch button.active { color: var(--accent-ink); }
.search-btn { color: color-mix(in srgb, var(--text) 78%, var(--bg)); }
.search-btn svg { flex: none; }
.wgm-e { font-size: 1.3rem; width: 1.7rem; }
.wsec2-i { font-size: 1rem; color: var(--ico); }
.cat-head .name { color: color-mix(in srgb, var(--text) 70%, var(--bg-side)); font-size: .74rem; }
.vuser { color: color-mix(in srgb, var(--text) 82%, var(--bg-side)); }

.me-av { display: grid; flex: none; margin-right: .3rem; }
#me-bar .me-av .avatar { margin-right: 0; }

/* ══ Loga her a hlavičky kategorií ══ */
.cico { width: 1.35rem; height: 1.35rem; flex: none; display: block; }
img.cico { border-radius: 7px; object-fit: cover; }
.cemo { font-size: 1.1rem; line-height: 1; }
.cat-head { height: 2.1rem; padding: 0 .3rem 0 .35rem; margin-top: .35rem; }
.cat-head .name { display: flex; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; font-size: .92rem; font-weight: 800; color: color-mix(in srgb, var(--text) 88%, var(--bg-side)); }
.cat-head .name b { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-head .name .chev { font-style: normal; font-size: .65rem; color: var(--text-3); width: .7rem; }
.cat-head .name:hover { color: var(--text); }
.cat-head .name .cico { width: 1.4rem; height: 1.4rem; }
.wgm-e .cico { width: 1.5rem; height: 1.5rem; }
.wg-e .cico { width: 2.1rem; height: 2.1rem; }
.wthumb.none .cico { width: 3.4rem; height: 3.4rem; }
.pg i .cico, .gchip .cico { width: 1.2rem; height: 1.2rem; }
.pg i { display: grid; place-items: center; }
.mbd .gm .cico { width: 1rem; height: 1rem; }
.gchip { display: inline-flex; align-items: center; gap: .45rem; }
.logo-edit { display: flex; align-items: center; gap: .5rem; }
.logo-prev { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; background: var(--bg); border-radius: 12px; }
.logo-prev .cico { width: 1.9rem; height: 1.9rem; }
.crumb .cico, .crumbs .cico { display: inline-block; width: 1.1rem; height: 1.1rem; vertical-align: -.2rem; margin-right: .15rem; }

.cico.px { image-rendering: pixelated; border-radius: 4px; }

/* ══ Emoji, GIFy, samolepky, reakce ══ */
.composer { position: relative; }
.composer-box .cmp { color: var(--text-2); display: grid; place-items: center; }
.composer-box .cmp svg { width: 1.3rem; height: 1.3rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.composer-box .cmp:hover { color: var(--accent); }
.composer-box .gifb { font-weight: 900; font-size: .72rem; letter-spacing: .03em; border: 2px solid currentColor; border-radius: 7px; width: 2rem; height: 1.45rem; padding: 0; align-self: center; }

.picker { position: absolute; right: 1rem; bottom: calc(100% - .4rem); width: min(440px, calc(100vw - 2rem)); height: 380px; display: flex; flex-direction: column; border-radius: 18px; background: var(--bg-card); border: 1px solid var(--line); box-shadow: 0 -10px 50px rgba(0,0,0,.45); overflow: hidden; z-index: 40; animation: vpin .14s ease-out; }
.pk-tabs { display: flex; gap: .25rem; padding: .5rem .5rem 0; border-bottom: 1px solid var(--line); }
.pk-tabs button { flex: 1; border: 0; background: transparent; color: var(--text-2); font-weight: 700; font-size: .82rem; padding: .5rem .3rem .55rem; border-bottom: 3px solid transparent; display: flex; align-items: center; justify-content: center; gap: .35rem; }
.pk-tabs button i { font-style: normal; }
.pk-tabs button:hover { color: var(--text); }
.pk-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.pk-search { padding: .6rem .7rem 0; }
.pk-search input { width: 100%; padding: .5rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); outline: none; font: inherit; }
.pk-search input:focus { border-color: var(--accent); }
.pk-body { flex: 1; overflow-y: auto; padding: .5rem .7rem .8rem; }
.emo-h { font-size: .68rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); margin: .6rem .2rem .3rem; }
.emo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(2.2rem, 1fr)); gap: .1rem; }
.emo-grid button, .rx-quick button, .rx-all button { border: 0; background: transparent; font-size: 1.4rem; padding: .2rem; border-radius: 9px; line-height: 1.2; }
.emo-grid button:hover, .rx-quick button:hover, .rx-all button:hover { background: var(--bg-hover); transform: scale(1.15); }
.lib-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.lib-grid.sticker { grid-template-columns: repeat(4, 1fr); }
.lib { position: relative; border: 0; padding: 0; border-radius: 12px; overflow: hidden; background: var(--bg); aspect-ratio: 1; display: grid; transition: transform .12s; }
.lib:hover { transform: scale(1.04); box-shadow: 0 0 0 2px var(--accent); }
.lib img { width: 100%; height: 100%; object-fit: cover; }
.lib-grid.sticker .lib img { object-fit: contain; padding: .3rem; }
.lib span { position: absolute; left: 0; right: 0; bottom: 0; padding: .2rem .4rem; font-size: .68rem; font-weight: 700; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; opacity: 0; transition: .12s; text-align: left; }
.lib:hover span { opacity: 1; }
.lib.add { place-items: center; border: 2px dashed var(--line); background: transparent; color: var(--text-2); align-content: center; gap: .1rem; }
.lib.add i { font-style: normal; font-size: 1.6rem; color: var(--accent); }
.lib.add span { position: static; opacity: 1; background: none; color: var(--text-2); text-align: center; white-space: normal; }
.lib.add:hover { border-color: var(--accent); }
.lib-x { position: absolute; top: .25rem; right: .25rem; font-style: normal; width: 1.3rem; height: 1.3rem; border-radius: 50%; background: rgba(0,0,0,.7); color: #fff; font-size: .65rem; display: none; place-items: center; }
.lib:hover .lib-x { display: grid; }
.lib-x:hover { background: var(--bad); }
.pk-empty { text-align: center; padding: 1.2rem .5rem; }
.lb-row { display: flex; align-items: center; gap: .6rem; }
.lb-prev { width: 3.4rem; height: 3.4rem; border-radius: 12px; background: var(--bg); display: grid; place-items: center; overflow: hidden; font-size: .72rem; color: var(--text-3); }
.lb-prev img { width: 100%; height: 100%; object-fit: cover; }

/* zprávy: samolepky a reakce */
.msg img.sticker { width: 150px; height: 150px; object-fit: contain; border-radius: 0; background: none; border: 0; box-shadow: none; }
.rxrow { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.rx { display: inline-flex; align-items: center; gap: .35rem; height: 1.7rem; padding: 0 .55rem; border-radius: 99px; border: 1px solid var(--line); background: var(--bg-card); color: var(--text-2); font-size: .9rem; transition: .12s; }
.rx b { font-size: .78rem; font-weight: 800; }
.rx:hover { background: var(--bg-hover); border-color: var(--text-3); }
.rx.mine { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--bg-card)); color: var(--text); }
.rx .rxi { line-height: 1; display: grid; place-items: center; }
.rximg { width: 1.2rem; height: 1.2rem; object-fit: contain; }
.rx.add { padding: 0 .6rem; opacity: 0; font-weight: 800; }
.msg:hover .rx.add { opacity: 1; }
.rxpal { position: fixed; z-index: 2000; width: 300px; max-height: 340px; overflow-y: auto; padding: .5rem; border-radius: 16px; background: var(--bg-card); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.5); animation: vpin .14s ease-out; }
.rx-quick { display: flex; justify-content: space-between; padding-bottom: .3rem; border-bottom: 1px solid var(--line); }
.rx-quick button { font-size: 1.5rem; }
.rx-all { display: grid; grid-template-columns: repeat(auto-fill, minmax(2rem, 1fr)); }
.rx-st { display: grid; grid-template-columns: repeat(6, 1fr); gap: .2rem; }
.rx-st button { border: 0; background: transparent; border-radius: 9px; padding: .15rem; }
.rx-st button:hover { background: var(--bg-hover); }
.rx-st img { width: 100%; aspect-ratio: 1; object-fit: contain; }

/* kanál #tipy: nápověda a barevný stav zprávy */
.tips-bar { margin: .7rem 1rem 0; padding: .6rem .9rem; border-radius: 14px; background: color-mix(in srgb, var(--warn) 10%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); color: var(--text-2); font-size: .85rem; line-height: 1.6; flex: none; }
.tips-bar b { color: var(--text); margin-right: .3rem; }
.ts { display: inline-block; margin-left: .35rem; padding: .05rem .55rem; border-radius: 99px; font-size: .75rem; font-weight: 700; }
.ts.done, .tstat.done { background: color-mix(in srgb, var(--good) 20%, transparent); color: var(--good); }
.ts.wip, .tstat.wip { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.ts.no, .tstat.no { background: color-mix(in srgb, var(--bad) 18%, transparent); color: var(--bad); }
.tstat { display: inline-block; margin-bottom: .2rem; padding: .05rem .6rem; border-radius: 99px; font-size: .72rem; font-weight: 800; letter-spacing: .03em; }
.msg.tip-done { box-shadow: inset 3px 0 0 var(--good); }
.msg.tip-wip { box-shadow: inset 3px 0 0 var(--warn); }
.msg.tip-no { box-shadow: inset 3px 0 0 var(--bad); opacity: .65; }

/* ══════════ Telefon a tablet na výšku (do 900 px) ══════════ */
.menu-btn, #scrim, #mcall { display: none; }
@media (max-width: 900px) {
  html, body { height: var(--vvh, 100dvh); overscroll-behavior: none; }
  #app { grid-template-columns: minmax(0, 1fr); height: var(--vvh, 100dvh); }

  /* levý panel jako výsuvné menu */
  #side { position: fixed; z-index: 1000; top: 0; bottom: 0; left: 0; width: min(86vw, 330px); transform: translateX(-104%); transition: transform .26s cubic-bezier(.2, .8, .2, 1); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  body.drawer #side { transform: none; box-shadow: 10px 0 44px rgba(0,0,0,.55); }
  #scrim { display: block; position: fixed; inset: 0; z-index: 999; background: rgba(8,6,16,.58); opacity: 0; pointer-events: none; transition: opacity .22s; }
  body.drawer #scrim, body.mem-open #scrim { opacity: 1; pointer-events: auto; }
  .menu-btn { display: grid; place-items: center; position: fixed; z-index: 900; top: calc(.55rem + env(safe-area-inset-top)); left: .6rem; width: 2.4rem; height: 2.4rem; border: 1px solid var(--line); border-radius: 13px; background: var(--bg-card); color: var(--text); }
  .menu-btn svg { width: 1.3rem; height: 1.3rem; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
  body.drawer .menu-btn { opacity: 0; pointer-events: none; }

  /* členové jako druhý výsuvný panel zprava */
  #members:not([hidden]) { display: block; position: fixed; z-index: 1000; top: 0; right: 0; bottom: 0; width: min(84vw, 310px); padding-top: calc(1rem + env(safe-area-inset-top)); padding-bottom: env(safe-area-inset-bottom); box-shadow: -10px 0 44px rgba(0,0,0,.55); animation: mslide .24s cubic-bezier(.2, .8, .2, 1); }
  @keyframes mslide { from { transform: translateX(100%); } to { transform: none; } }

  /* horní lišta */
  .top { padding: env(safe-area-inset-top) .7rem 0 3.6rem; height: calc(3.4rem + env(safe-area-inset-top)); gap: .4rem; }
  .top h2 { font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .top .topic { display: none; }
  .crumbs { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; font-size: .9rem; }
  .top .btn.sm { padding: .35rem .6rem; font-size: .8rem; white-space: nowrap; }

  /* chat */
  .msgs { padding: .6rem .3rem .3rem; }
  .msg { gap: .55rem; padding: .15rem .35rem; }
  .actions { top: -1.3rem; right: .3rem; }
  .actions .icon { width: 2.3rem; height: 2.3rem; font-size: 1.05rem; }
  .msg.tapped { background: color-mix(in srgb, var(--bg-hover) 70%, transparent); }
  .msg.tapped .actions { display: flex; }
  .msg img { max-width: 100%; }
  .composer { padding: 0 .55rem calc(.55rem + env(safe-area-inset-bottom)); }
  .composer-box { gap: .15rem; }
  .composer-box .icon { width: 2.5rem; height: 2.5rem; }
  .composer-box .gifb { width: 2.1rem; height: 1.5rem; }
  .picker { left: .5rem; right: .5rem; width: auto; height: min(380px, 58vh); }
  .tips-bar { margin: .5rem .6rem 0; font-size: .8rem; }

  /* Welcome */
  .hero { margin: .6rem .6rem .3rem; padding: 1rem 1rem .9rem; border-radius: 20px; }
  .hero-top { gap: .8rem; }
  .hero-logo { width: 3.4rem; height: 3.4rem; border-radius: 17px; }
  .hero-logo span { font-size: 2rem; }
  .hero-t { min-width: 0; flex-basis: calc(100% - 4.4rem); }
  .hero-t h1 { font-size: 1.6rem; }
  .hero-t p { font-size: .88rem; }
  .hero-stats { width: 100%; }
  .hero-stats div { flex: 1; min-width: 0; }
  .hero-feats { grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .9rem; }
  .hf { padding: .65rem .7rem; }
  .hf span { font-size: .75rem; }
  .hero-x { display: none; }

  /* wiki */
  .wiki-view { padding: 1rem .85rem 2.5rem; }
  .wiki-view.page { gap: 1rem; }
  .wtools { gap: .5rem; }
  .wgames { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .wgame { height: 96px; }
  .wgrid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
  .wthumb { height: 96px; }
  .doc .md-img, .doc figure img.md-img { max-height: 340px; }
  .doc .gallery { grid-template-columns: 1fr 1fr; }
  .dropzone { padding: 1rem .6rem; }

  /* hlas */
  .screens { grid-template-columns: minmax(0, 1fr); }
  .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  #mcall { display: flex; align-items: center; gap: .3rem; position: fixed; z-index: 800; top: calc(3.7rem + env(safe-area-inset-top)); right: .6rem; padding: .25rem .35rem .25rem .7rem; border-radius: 99px; background: color-mix(in srgb, var(--good) 22%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--good) 50%, var(--line)); box-shadow: 0 8px 24px rgba(0,0,0,.4); font-size: .82rem; font-weight: 700; }
  #mcall[hidden] { display: none; }
  #mcall .mc-dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 30%, transparent); }
  #mcall .icon { width: 2rem; height: 2rem; }
  #mcall svg { width: 1.1rem; height: 1.1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  #mcall .icon.on { color: var(--bad); }

  /* okna a nabídky */
  dialog { width: calc(100vw - 1.2rem); max-height: calc(var(--vvh, 100dvh) - 1.2rem); }
  dialog.wide { width: calc(100vw - 1.2rem); }
  dialog.profile, dialog.profile.edit { width: calc(100vw - 1.2rem); }
  dialog.settings[open] { height: calc(var(--vvh, 100dvh) - 1.2rem); }
  .volpop { left: .6rem; right: .6rem !important; top: auto !important; bottom: calc(.8rem + env(safe-area-inset-bottom)); width: auto; }
  .rxpal { width: min(300px, 92vw); }
  .cpick { width: min(290px, 92vw); }
  #toast { bottom: calc(1.5rem + env(safe-area-inset-bottom)); }

  /* prst nemá najetí myší: skryté ovladače jsou vidět vždy a cíle jsou větší */
  input, textarea, select { font-size: 16px !important; }
  .ch { padding: .6rem .7rem; }
  .ch-more, .cat-head .icon, .wgm-head .icon, .wsec2-row .icon, .rx.add { opacity: 1 !important; }
  .cat-head .icon, .wgm-head .icon, .wsec2-row .icon, .ch-more { width: 2rem; height: 2rem; }
  .wsec2-main, .wpg { padding-top: .5rem; padding-bottom: .5rem; }
  .rx { height: 2rem; }
  .st-sw { padding: .7rem .8rem; }
}

/* ══ Dotykové zařízení (telefon i iPad, i na široké obrazovce): bez najetí myší ══ */
@media (hover: none) {
  .msg.tapped { background: color-mix(in srgb, var(--bg-hover) 70%, transparent); }
  .msg.tapped .actions { display: flex; }
  .actions .icon { width: 2.3rem; height: 2.3rem; font-size: 1.05rem; }
  .ch-more, .cat-head .icon, .wgm-head .icon, .wsec2-row .icon, .rx.add, .lib-x { opacity: 1 !important; display: grid; }
  .cat-head .icon, .wgm-head .icon, .wsec2-row .icon, .ch-more { width: 2rem; height: 2rem; }
  input, textarea, select { font-size: 16px !important; }
  .ch { padding-top: .5rem; padding-bottom: .5rem; }
  .rx { height: 1.9rem; }
  .lib span { opacity: 1; }
  .composer-box .icon { width: 2.4rem; height: 2.4rem; }
}

/* telefon: Welcome banner kompaktní, ať zbude místo na chat */
@media (max-width: 900px) {
  .hero-feats { display: none; }
  .hero { padding: .9rem 1rem; }
  .hero-t p { display: none; }
  .hero-stats { margin-top: .2rem; }
  .composer-box textarea { min-height: 2.4rem; }
}

@media (max-width: 900px) { .search-btn kbd { display: none; } }

/* iPad: Welcome karty ve dvou sloupcích i při užším hlavním okně, bez nápovědy ke klávesnici */
.hero-feats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (hover: none) { .search-btn kbd { display: none; } }

/* ══ Lampička (světlý / tmavý režim) ══ */
.lamp-btn { flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); color: var(--text-3); display: grid; place-items: center; transition: .2s; }
.lamp-btn svg { width: 1.15rem; height: 1.15rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lamp-btn:hover { color: var(--text); background: var(--bg-hover); }
.lamp-btn.on { color: #e8a500; background: #fff4c2; border-color: #f2c94c; box-shadow: 0 0 14px rgba(255, 200, 60, .65); }
.lamp-btn.on svg { fill: #ffd54f; }

/* ══ Panel akcí u zprávy ══ */
.actions { gap: 1px; padding: 3px; }
.actions .icon { display: grid; place-items: center; color: var(--text-2); }
.actions .icon svg { width: 1.1rem; height: 1.1rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.actions .icon:hover { color: var(--accent); background: var(--bg-hover); }
.msgmenu { position: fixed; z-index: 2000; min-width: 210px; padding: .35rem; border-radius: 14px; background: var(--bg-card); border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.5); animation: vpin .12s ease-out; }
.msgmenu button { display: flex; align-items: center; gap: .65rem; width: 100%; border: 0; background: transparent; color: var(--text); text-align: left; padding: .55rem .7rem; border-radius: 10px; font-size: .92rem; font-weight: 600; }
.msgmenu button i { font-style: normal; width: 1.3rem; text-align: center; display: grid; place-items: center; }
.msgmenu button svg { width: 1.05rem; height: 1.05rem; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.msgmenu button:hover { background: var(--bg-hover); }
.msgmenu button.danger { color: var(--bad); }
.msgmenu button.danger:hover { background: color-mix(in srgb, var(--bad) 16%, transparent); }
.mm-sep { height: 1px; background: var(--line); margin: .3rem .4rem; }

/* odpověď, citace a přeposlání */
.replybar { display: flex; align-items: center; gap: .6rem; margin: 0 0 .35rem; padding: .45rem .5rem .45rem .8rem; border-radius: 12px; background: var(--bg-card); border-left: 3px solid var(--accent); font-size: .82rem; color: var(--text-2); }
.replybar b { color: var(--text); }
.replybar i { flex: 1; min-width: 0; font-style: normal; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.replybar .icon { width: 1.7rem; height: 1.7rem; font-size: .8rem; }
.quote { display: flex; flex-direction: column; margin: .1rem 0 .3rem; padding: .25rem .7rem; max-width: 34rem; border-left: 3px solid var(--accent); border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--accent) 8%, transparent); cursor: pointer; font-size: .82rem; }
.quote b { color: var(--accent); font-size: .78rem; }
.quote span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quote.gone { color: var(--text-3); font-style: italic; cursor: default; border-left-color: var(--line); background: transparent; }
.quote:hover { background: color-mix(in srgb, var(--accent) 14%, transparent); }
.fwd { font-size: .76rem; color: var(--text-3); margin-bottom: .15rem; }
.fwd b { color: var(--text-2); }
.msg.flash { animation: msg-flash 1.6s ease-out; }
@keyframes msg-flash { 0%, 40% { background: color-mix(in srgb, var(--accent) 28%, transparent); } 100% { background: transparent; } }

/* ══ Úplná sada emoji ══ */
.pk-body.emo { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.ep { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ep-top { display: flex; gap: .5rem; align-items: center; padding: .6rem .7rem .3rem; }
.ep-q { flex: 1; min-width: 0; padding: .5rem .8rem; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--text); outline: none; font: inherit; font-size: .9rem; }
.ep-q:focus { border-color: var(--accent); }
.ep-tone { display: flex; gap: .1rem; flex: none; }
.ep-tone button { border: 2px solid transparent; background: transparent; border-radius: 8px; font-size: .95rem; padding: .1rem .15rem; opacity: .7; }
.ep-tone button.on { border-color: var(--accent); opacity: 1; }
.ep-tone button:hover { opacity: 1; }
.ep-cats { display: flex; justify-content: space-between; gap: .1rem; padding: .1rem .5rem .3rem; border-bottom: 1px solid var(--line); }
.ep-cats button { flex: 1; border: 0; background: transparent; font-size: 1.15rem; padding: .25rem 0; border-radius: 9px; opacity: .65; }
.ep-cats button:hover { opacity: 1; background: var(--bg-hover); }
.ep-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 0 .7rem .6rem; position: relative; }
.ep-load { text-align: center; padding: 1.2rem; }

/* paleta reakcí: rychlé emoji, samolepky a celý výběr */
.rxpal { width: 352px; max-height: none; height: 420px; display: flex; flex-direction: column; overflow: hidden; padding: .5rem 0 0; }
.rx-quick { padding: 0 .6rem .4rem; }
.rx-st { padding: .3rem .6rem; border-bottom: 1px solid var(--line); }
.rx-panel { flex: 1; min-height: 0; display: flex; flex-direction: column; }

@media (max-width: 900px) {
  .rxpal { left: .5rem !important; right: .5rem; top: auto !important; bottom: calc(.5rem + env(safe-area-inset-bottom)); width: auto; height: min(440px, 62vh); }
  .msgmenu { left: .6rem !important; right: .6rem; top: auto !important; bottom: calc(.6rem + env(safe-area-inset-bottom)); min-width: 0; padding: .5rem; }
  .msgmenu button { padding: .8rem .9rem; font-size: 1rem; }
  .quote { max-width: 100%; }
}

.rx-st { grid-template-columns: repeat(8, 1fr); }
.rx-st img { width: 100%; }

/* cedule o kanálu #tipy pod Welcome bannerem */
.tips-sign { position: relative; display: flex; align-items: center; gap: .9rem; margin: .5rem 1.2rem .4rem; padding: .85rem 1.1rem .85rem 1.2rem; text-align: left; width: calc(100% - 2.4rem); flex: none; color: var(--text); font: inherit;
  border: 2px dashed color-mix(in srgb, var(--warn) 55%, transparent); border-radius: 18px; background: linear-gradient(135deg, color-mix(in srgb, var(--warn) 16%, var(--bg-card)), color-mix(in srgb, var(--warn) 6%, var(--bg-card))); transition: transform .18s, box-shadow .18s; }
.tips-sign:hover { transform: translateY(-2px) rotate(-.3deg); box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.ts-pin { position: absolute; top: -.7rem; left: 1rem; font-size: 1.1rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,.4)); }
.ts-ico { font-size: 1.8rem; flex: none; }
.ts-txt { display: grid; gap: .15rem; flex: 1; min-width: 0; }
.ts-txt b { font-size: .98rem; }
.ts-txt small { color: var(--text-2); font-size: .84rem; line-height: 1.4; }
.ts-txt u { text-decoration: none; font-weight: 800; color: var(--warn); }
.tips-sign em { font-style: normal; font-weight: 800; font-size: .82rem; color: var(--warn); white-space: nowrap; flex: none; }
@media (max-width: 900px) { .tips-sign { margin: .4rem .6rem; width: calc(100% - 1.2rem); padding: .75rem .8rem; gap: .6rem; } .ts-ico { font-size: 1.5rem; } .tips-sign em { display: none; } }

/* cedule #tipy: žárovka v zářivém odznaku (bez připínáčku) */
.ts-pin { display: none; }
.tips-sign { padding: .8rem 1.1rem .8rem .85rem; }
.ts-ico { width: 2.9rem; height: 2.9rem; border-radius: 16px; display: grid; place-items: center; flex: none; font-size: 0; color: #5a3a00; background: linear-gradient(135deg, #ffe08a, #ffb347); box-shadow: 0 6px 18px rgba(255, 179, 71, .45), inset 0 1px 0 rgba(255,255,255,.6); animation: bulb-glow 3s ease-in-out infinite; }
.ts-ico svg { width: 1.55rem; height: 1.55rem; stroke: currentColor; fill: rgba(255, 255, 255, .55); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@keyframes bulb-glow { 0%, 100% { box-shadow: 0 6px 18px rgba(255,179,71,.4), inset 0 1px 0 rgba(255,255,255,.6); } 50% { box-shadow: 0 6px 26px rgba(255,200,80,.75), inset 0 1px 0 rgba(255,255,255,.6); } }
@media (max-width: 900px) { .ts-ico { width: 2.4rem; height: 2.4rem; border-radius: 13px; } .ts-ico svg { width: 1.3rem; height: 1.3rem; } }

/* odkaz na kanál v textu: vypadá stejně jako v seznamu kanálů (# tipy) */
.chan-chip { display: inline-flex; align-items: center; gap: .25rem; padding: 0 .5rem 0 .35rem; border-radius: 8px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); vertical-align: baseline; line-height: 1.5; }
.chan-chip svg { width: .95em; height: .95em; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; color: var(--text-2); }
.chan-chip b { font-weight: 700; color: var(--text); }
.ts-txt u { text-decoration: none; }

/* žárovka v textu cedulky i v levém panelu: stejná barva */
.chan-chip.bulb svg { color: #f2b21a; fill: rgba(255, 213, 79, .35); }
.ch .em svg.bulb-ico, .ch[data-ch] .em svg { }

.dl-btn { display: inline-flex; align-items: center; gap: .5rem; justify-self: start; text-decoration: none; padding: .75rem 1.2rem; }

/* karta „Nechceš používat prohlížeč?“ dole v levém panelu */
#dl-promo { position: relative; flex: none; display: grid; grid-template-columns: auto 1fr; gap: .2rem .7rem; align-items: center; margin: .4rem .7rem .5rem; padding: .8rem .9rem .85rem; border-radius: 16px; border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, var(--bg-card)), var(--bg-card)); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
#dl-promo[hidden] { display: none; }
#dl-promo .dl-ico { width: 2.4rem; height: 2.4rem; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #ffb08c, #e86a6e); color: #2a1710; box-shadow: 0 6px 16px rgba(232,106,110,.4); }
#dl-promo .dl-ico svg { width: 1.3rem; height: 1.3rem; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
#dl-promo .dl-t { display: grid; line-height: 1.3; min-width: 0; padding-right: 1.2rem; }
#dl-promo .dl-t b { font-size: .92rem; }
#dl-promo .dl-t span { color: var(--text-2); font-size: .76rem; }
#dl-promo .btn { grid-column: 1 / -1; margin-top: .4rem; text-align: center; text-decoration: none; }
#dl-promo .dl-x { position: absolute; top: .35rem; right: .4rem; width: 1.5rem; height: 1.5rem; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); font-size: .75rem; }
#dl-promo .dl-x:hover { background: var(--bg-hover); color: var(--text); }

/* karta ke stažení je úplně nahoře nad lampičkou a animacemi, kompaktní */
#side > #dl-promo { margin: .7rem .7rem 0; padding: .65rem .8rem .7rem; }
#side > #dl-promo .dl-ico { width: 2rem; height: 2rem; border-radius: 11px; }
#side > #dl-promo .dl-ico svg { width: 1.1rem; height: 1.1rem; }
#side > #dl-promo .dl-t b { font-size: .86rem; }
#side > #dl-promo .dl-t span { font-size: .72rem; }
#side > #dl-promo .btn { margin-top: .3rem; padding: .35rem .6rem; font-size: .8rem; }
#side > #dl-promo + .side-top { margin-top: .5rem; }

/* „Zobrazit kategorie bez kanálů“: tichý odkaz úplně dole v panelu */
#tree-foot { flex: none; padding: 0 .7rem .35rem; }
#tree-foot:empty { display: none; }
#tree-foot .emptytoggle { display: block; width: 100%; border: 0; background: transparent; text-align: left; margin: 0; padding: .4rem .6rem; border-radius: 9px; font-size: .76rem; color: var(--text-3); }
#tree-foot .emptytoggle:hover { background: var(--bg-hover); color: var(--text-2); }

/* ══ Safari (iPhone a iPad): prefixy a záložní hodnoty ══ */
:root { --vvh: 100%; } /* výška aplikace; na telefonu ji upraví skript podle klávesnice */
dialog::backdrop { -webkit-backdrop-filter: blur(3px); }
.hero-stats div { -webkit-backdrop-filter: blur(6px); }
.hf { -webkit-backdrop-filter: blur(8px); }
#unlock-audio { position: fixed; z-index: 3000; left: 50%; bottom: calc(5rem + env(safe-area-inset-bottom)); transform: translateX(-50%); border: 0; border-radius: 99px; padding: .8rem 1.3rem; background: var(--accent); color: var(--accent-ink); font: 800 .95rem var(--font); box-shadow: 0 12px 34px rgba(0,0,0,.5); animation: vpin .2s ease-out; }

/* čísla v Welcome banneru: čitelnější popisky */
.hero-stats span { color: color-mix(in srgb, var(--text) 78%, transparent); }

/* Rámeček kolem fotky se v řádku zprávy neroztahuje do výšky (u dlouhé zprávy nebo samolepky byl z kolečka ovál) */
.msg > .avwrap, .who-av > .avwrap, .msg > .avatar, .who-av > .avatar { align-self: flex-start; }
.msg > .avwrap, .who-av > .avwrap { aspect-ratio: 1; }

/* Dotyk: tlačítka reakcí a nabídek reagují hned na klepnutí (bez zdržení a bez falešného najetí myší na iOS) */
.actions button, .rx, .rxpal button, .msgmenu button, .emo-grid button { touch-action: manipulation; cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (hover: none) { .msg:hover:not(.tapped) .actions { display: none; } }

/* Ořez obrázku (profil a banner) */
.cropdlg { border: 1px solid var(--line); border-radius: 18px; background: var(--bg-card); color: var(--text); padding: 1.1rem 1.2rem; width: min(380px, 94vw); }
.cropdlg::backdrop { background: rgba(0,0,0,.6); }
.cropdlg h3 { margin: 0 0 .2rem; }
.cropdlg p { margin: 0 0 .7rem; font-size: .85rem; }
.crop-box { margin: 0 auto .8rem; max-width: 100%; border-radius: 12px; overflow: hidden; background: #000; position: relative; box-shadow: 0 0 0 1px var(--line); }
.crop-box canvas { display: block; cursor: grab; max-width: 100%; }
.crop-box.round { border-radius: 50%; }
.crop-zoom { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.crop-zoom input { flex: 1; }
.cropdlg .btns { display: flex; gap: .5rem; justify-content: flex-end; flex-wrap: wrap; }
.btn[hidden] { display: none !important; }
.profile.edit #pe-prev .pavatar, .profile.edit #pe-prev .pbanner { cursor: pointer; }
.profile.edit #pe-prev .pavatar:hover { filter: brightness(1.12); }

/* Rámečky banneru: stejný styl jako rámeček profilového obrázku, takže profil ladí */
.pb-fr { position: absolute; inset: 0; pointer-events: none; z-index: 3; border-radius: inherit; }
.pf-ring .pb-fr { box-shadow: inset 0 0 0 3px var(--c), inset 0 0 16px color-mix(in srgb, var(--c) 55%, transparent); }
.pf-pulse .pb-fr { box-shadow: inset 0 0 0 2px var(--c); animation: pb-pulse 1.9s ease-out infinite; }
@keyframes pb-pulse { 0% { box-shadow: inset 0 0 0 2px var(--c), inset 0 0 0 0 color-mix(in srgb, var(--c) 70%, transparent); } 100% { box-shadow: inset 0 0 0 2px var(--c), inset 0 0 26px 6px transparent; } }
.pf-rainbow .pb-fr { padding: 3px; background: linear-gradient(90deg, #ff5f6d, #ffc371, #5fe08b, #4cc9f0, #a78bfa, #ff5f6d, #ffc371); background-size: 300% 100%; animation: pb-flow 4s linear infinite;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
@keyframes pb-flow { to { background-position: -300% 0; } }
.pf-flame .pb-fr { box-shadow: inset 0 0 0 2px #ff6d00, inset 0 -18px 22px -8px #ff3d00, inset 0 -6px 10px -2px #ffb300; animation: pb-flick 1.3s ease-in-out infinite; }
@keyframes pb-flick { 0%, 100% { opacity: 1; } 50% { opacity: .78; } }
.pf-neon .pb-fr { box-shadow: inset 0 0 0 2px #00f0ff, inset 0 0 0 6px rgba(255, 43, 214, .85), inset 0 0 14px 4px rgba(0, 240, 255, .55); }
.pf-orbit .pb-fr { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, transparent); }
.pf-orbit .pb-fr::after { content: ''; position: absolute; width: 22px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #fff); box-shadow: 0 0 8px var(--c); offset-path: inset(1px); offset-rotate: auto; animation: pb-orbit 4.5s linear infinite; }
@keyframes pb-orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }
.pf-halo .pb-fr { box-shadow: inset 0 0 0 2px #ffe08a, inset 0 0 26px 2px rgba(255, 213, 79, .5); }
.pf-bolt .pb-fr { box-shadow: inset 0 0 0 2px #5fa8ff, inset 0 0 14px 2px rgba(122, 184, 255, .7); animation: pb-zap 2.8s linear infinite; }
@keyframes pb-zap { 0%, 100% { opacity: 1; } 40% { opacity: 1; } 42% { opacity: .35; } 44% { opacity: 1; } 70% { opacity: .55; } 72% { opacity: 1; } }
html[data-anim='off'] .pb-fr, html[data-anim='off'] .pb-fr::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) { .pb-fr, .pb-fr::after { animation: none !important; } }

/* Sakura: růžový obruč u obrázku a padající lístky přes banner */
.frame-sakura { filter: drop-shadow(0 0 4px rgba(255, 150, 190, .6)); }
.frame-sakura::before { background: conic-gradient(from 0deg, #ffb7d0, #fff0f6, #ff8fb8, #ffd1e3, #f7a1c4, #ffb7d0); animation: fr-spin 7s linear infinite; }
.frame-sakura::after { display: block; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 1px, #fff 0 2.5px, #ffc2d9 3px, transparent 6px), radial-gradient(circle at 50% calc(100% - 1px), #ffe3ee 0 2px, #ff9fc3 2.5px, transparent 5px); animation: fr-spin 5s linear infinite reverse; }
.pf-sakura .pb-fr { box-shadow: inset 0 0 0 2px #ffb7d0, inset 0 0 22px rgba(255, 143, 184, .4); overflow: hidden; }
.petal { position: absolute; top: -12px; left: var(--x); width: 9px; height: 9px; border-radius: 100% 0 100% 0; background: linear-gradient(135deg, #fff3f8, #ff9fc3); box-shadow: 0 0 5px rgba(255, 175, 205, .7); opacity: 0; transform: scale(var(--s)) rotate(var(--r)); animation: petal-fall var(--d) linear var(--w) infinite; }
@keyframes petal-fall { 0% { opacity: 0; transform: translate(0, 0) scale(var(--s)) rotate(var(--r)); } 10% { opacity: 1; } 50% { transform: translate(14px, 60px) scale(var(--s)) rotate(calc(var(--r) + 150deg)); } 90% { opacity: .9; } 100% { opacity: 0; transform: translate(-6px, 130px) scale(var(--s)) rotate(calc(var(--r) + 320deg)); } }
html[data-anim='off'] .petal, html[data-anim='off'] .frame-sakura::after { animation: none !important; }
html[data-anim='off'] .petal { opacity: .8; top: calc(var(--s) * 40px); }
@media (prefers-reduced-motion: reduce) { .petal { animation: none !important; opacity: .8; top: 30px; } }

/* Starfall: noční obruč s hvězdami u obrázku, přes banner padají propracované hvězdy a meteory */
.frame-starfall { filter: drop-shadow(0 0 5px rgba(140, 150, 255, .65)); }
.frame-starfall::before { background: conic-gradient(from 0deg, #ffd54f, #fff6c8, #7b6bff, #3d4fd6, #b9a8ff, #ffd54f); animation: fr-spin 6s linear infinite; }
.frame-starfall::after { display: block; inset: 0; border-radius: 50%; background: radial-gradient(circle at 50% 1px, #fff 0 2px, #ffe58a 2.5px, transparent 6px), radial-gradient(circle at 12% 70%, #fff 0 1.5px, transparent 4px), radial-gradient(circle at 88% 30%, #fff 0 1.5px, transparent 4px); animation: fr-spin 8s linear infinite; }
.pf-starfall .pb-fr { box-shadow: inset 0 0 0 2px #ffd54f, inset 0 0 0 4px rgba(94, 82, 214, .8), inset 0 0 22px rgba(124, 108, 255, .5); overflow: hidden; }
.stf { position: absolute; top: -18px; left: var(--x); width: 18px; height: 18px; opacity: 0; filter: drop-shadow(0 0 3px #ffd54f) drop-shadow(0 0 7px rgba(255, 213, 79, .55)); animation: stf-fall var(--d) linear var(--w) infinite; }
.stf i { display: block; width: 100%; height: 100%; transform: scale(var(--s)); }
.st5 i { clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); background: radial-gradient(circle at 40% 35%, #fffbe0 0, #ffe073 45%, #ff9d2e 100%); animation: stf-twinkle 1.6s ease-in-out infinite; }
.st4 { filter: drop-shadow(0 0 3px #bfe0ff) drop-shadow(0 0 8px rgba(130, 190, 255, .6)); }
.st4 i { clip-path: polygon(50% 0%, 59% 41%, 100% 50%, 59% 59%, 50% 100%, 41% 59%, 0% 50%, 41% 41%); background: radial-gradient(circle, #fff 0, #cfe7ff 45%, #7fb2ff 100%); animation: stf-twinkle 1.1s ease-in-out infinite; }
.st6 { filter: drop-shadow(0 0 3px #e0c8ff) drop-shadow(0 0 7px rgba(190, 150, 255, .6)); }
.st6 i { clip-path: polygon(50% 0%, 58% 30%, 87% 15%, 70% 42%, 100% 50%, 70% 58%, 87% 85%, 58% 70%, 50% 100%, 42% 70%, 13% 85%, 30% 58%, 0% 50%, 30% 42%, 13% 15%, 42% 30%); background: radial-gradient(circle, #fff 0, #ead9ff 40%, #a88bff 100%); animation: stf-twinkle 1.9s ease-in-out infinite; }
.meteor { width: 56px; height: 2px; top: 6px; filter: drop-shadow(0 0 4px #fff); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9) 85%, #fff); border-radius: 2px; transform: rotate(32deg); transform-origin: right center; animation: meteor-fly var(--d) ease-in var(--w) infinite; }
.meteor::after { content: ''; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px 2px #ffe58a; }
@keyframes stf-fall { 0% { opacity: 0; transform: translate(0, 0) rotate(0); } 12% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; transform: translate(-24px, 135px) rotate(200deg); } }
@keyframes stf-twinkle { 0%, 100% { transform: scale(var(--s)); } 50% { transform: scale(calc(var(--s) * .62)); } }
@keyframes meteor-fly { 0%, 55% { opacity: 0; transform: translate(0, 0) rotate(32deg); } 60% { opacity: 1; } 100% { opacity: 0; transform: translate(-180px, 130px) rotate(32deg); } }
html[data-anim='off'] .stf, html[data-anim='off'] .stf i, html[data-anim='off'] .frame-starfall::after { animation: none !important; }
html[data-anim='off'] .stf:not(.meteor) { opacity: .85; top: calc(var(--s) * 36px); }
html[data-anim='off'] .meteor { display: none; }
@media (prefers-reduced-motion: reduce) { .stf, .stf i { animation: none !important; } .stf:not(.meteor) { opacity: .85; top: 30px; } .meteor { display: none; } }

/* rámeček banneru nikdy nepřekrývá profilový obrázek */
.pbanner { isolation: isolate; }
.pavatar { z-index: 5; }

/* Sakura: detaily, dřevěný rámeček, větvička s květy v rohu a květ u obrázku (střídmě) */
.frame-sakura { filter: drop-shadow(0 0 3px rgba(255, 150, 190, .55)); }
.frame-sakura::before { background: conic-gradient(from 20deg, #6b4226, #a8723f, #7a4a2b, #c08a52, #6b4226, #8a5a34, #5c351c, #a8723f, #6b4226); animation: none; }
.frame-sakura::after { display: block; inset: -2% -4% auto auto; width: 32%; height: 32%; border-radius: 0; animation: none; z-index: 3;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'><g fill='%23ffc9de' stroke='%23ee86b0' stroke-width='.7'><ellipse cx='20' cy='10' rx='6.5' ry='9'/><ellipse cx='20' cy='10' rx='6.5' ry='9' transform='rotate(72 20 20)'/><ellipse cx='20' cy='10' rx='6.5' ry='9' transform='rotate(144 20 20)'/><ellipse cx='20' cy='10' rx='6.5' ry='9' transform='rotate(216 20 20)'/><ellipse cx='20' cy='10' rx='6.5' ry='9' transform='rotate(288 20 20)'/></g><circle cx='20' cy='20' r='3.4' fill='%23ffd36a'/><circle cx='20' cy='20' r='1.4' fill='%23e0903a'/></svg>") center / contain no-repeat; }
.pf-sakura .pb-fr { box-shadow: inset 0 0 22px rgba(255, 143, 184, .35); overflow: hidden; }
.pf-sakura .pb-fr::before { content: ''; position: absolute; inset: 0; padding: 4px; pointer-events: none;
  background: linear-gradient(90deg, #6b4226, #a8723f 22%, #7a4a2b 46%, #c08a52 70%, #6b4226 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0); }
.pf-sakura .pb-fr::after { content: ''; position: absolute; inset: 0; pointer-events: none; animation: none;
  background:
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 70'><defs><g id='b'><g fill='%23ffc9de' stroke='%23ee86b0' stroke-width='.8'><ellipse cx='0' cy='-6' rx='4.2' ry='6'/><ellipse cx='0' cy='-6' rx='4.2' ry='6' transform='rotate(72)'/><ellipse cx='0' cy='-6' rx='4.2' ry='6' transform='rotate(144)'/><ellipse cx='0' cy='-6' rx='4.2' ry='6' transform='rotate(216)'/><ellipse cx='0' cy='-6' rx='4.2' ry='6' transform='rotate(288)'/></g><circle r='2.3' fill='%23ffd36a'/></g></defs><g fill='none' stroke='%236b4226' stroke-linecap='round'><path d='M222 6C176 4 126 12 84 30S30 48 8 46' stroke-width='3.4'/><path d='M158 9C148 24 134 33 116 40' stroke-width='2.2'/><path d='M104 23C94 13 82 9 66 10' stroke-width='2'/></g><use href='%23b' transform='translate(196 9) scale(1.15)'/><use href='%23b' transform='translate(132 20) scale(.9)'/><use href='%23b' transform='translate(88 22) scale(.85)'/><circle cx='56' cy='38' r='2.6' fill='%23f58fb4'/><circle cx='30' cy='46' r='2.4' fill='%23f58fb4'/></svg>") right top / 62% auto no-repeat; }

/* Detaily rámečků (posuvník 1 až 5) */
.pb-branch { position: absolute; right: 0; top: 0; width: 62%; height: auto; pointer-events: none; }
.pf-sakura .pb-fr::after { content: none !important; }
.pbanner[data-d='1'] .pb-fr, .avwrap[data-d='1']::before, .avwrap[data-d='1']::after { animation: none !important; }
.avwrap.frame-sakura[data-d='1']::after { display: none; }
.avwrap.frame-sakura[data-d='4']::after, .avwrap.frame-sakura[data-d='5']::after { width: 44%; height: 44%; }
.pe-range { width: 100%; accent-color: var(--accent); }
.pe-range-l { display: flex; justify-content: space-between; font-size: .75rem; color: var(--text-3, #857fa3); }

/* Posuvník detailů ovlivňuje u všech rámečků rychlost animací a sílu záře (1 = klid bez záře, 5 = nejrychlejší a nejzářivější) */
.avwrap[data-d='2'], .pbanner[data-d='2'] { --sm: 1.8; }
.avwrap[data-d='4'], .pbanner[data-d='4'] { --sm: .75; }
.avwrap[data-d='5'], .pbanner[data-d='5'] { --sm: .55; }
.frame-neon { --gc: #00f0ff; } .frame-rainbow { --gc: #7ab8ff; } .frame-flame { --gc: #ff7a00; } .frame-halo { --gc: #ffd54f; }
.frame-bolt { --gc: #5fa8ff; } .frame-starfall { --gc: #8c96ff; } .frame-sakura { --gc: #ff96be; }
.frame-ring::before { animation-duration: calc(4s * var(--sm, 1)); }
.frame-rainbow::before { animation-duration: calc(3s * var(--sm, 1)); }
.frame-flame::before { animation-duration: calc(2s * var(--sm, 1)); }
.frame-flame { animation-duration: calc(1.3s * var(--sm, 1)); }
.frame-neon::before { animation-duration: calc(3.5s * var(--sm, 1)); }
.frame-pulse::after { animation-duration: calc(1.9s * var(--sm, 1)); }
.frame-orbit::after { animation-duration: calc(2.6s * var(--sm, 1)); }
.frame-bolt::before { animation-duration: calc(1.6s * var(--sm, 1)); }
.frame-bolt { animation-duration: calc(2.8s * var(--sm, 1)); }
.frame-halo::after { animation-duration: calc(2.4s * var(--sm, 1)); }
.frame-starfall::before { animation-duration: calc(6s * var(--sm, 1)); }
.frame-starfall::after { animation-duration: calc(8s * var(--sm, 1)); }
.avwrap[data-d='1'] { animation: none !important; filter: none !important; }
.avwrap[data-d='2'] { filter: drop-shadow(0 0 2px color-mix(in srgb, var(--gc, var(--c)) 55%, transparent)) !important; }
.avwrap[data-d='4'] { filter: drop-shadow(0 0 5px var(--gc, var(--c))) !important; }
.avwrap[data-d='5'] { filter: drop-shadow(0 0 6px var(--gc, var(--c))) drop-shadow(0 0 14px color-mix(in srgb, var(--gc, var(--c)) 60%, transparent)) !important; }
.pf-pulse .pb-fr { animation-duration: calc(1.9s * var(--sm, 1)); }
.pf-rainbow .pb-fr { animation-duration: calc(4s * var(--sm, 1)); }
.pf-flame .pb-fr { animation-duration: calc(1.3s * var(--sm, 1)); }
.pf-orbit .pb-fr::after { animation-duration: calc(4.5s * var(--sm, 1)); }
.pf-bolt .pb-fr { animation-duration: calc(2.8s * var(--sm, 1)); }
.pbanner .petal, .pbanner .stf { animation-duration: calc(var(--d) * var(--sm, 1)); }
.pbanner[data-d='1'] .pb-fr, .pbanner[data-d='1'] .pb-fr::after { animation: none !important; opacity: .85; }
.pbanner[data-d='2'] .pb-fr { opacity: .9; }
.pbanner[data-d='4'] .pb-fr { filter: brightness(1.12) saturate(1.2); }
.pbanner[data-d='5'] .pb-fr { filter: brightness(1.25) saturate(1.4); }

/* W u člena, který je online z aplikace WIKI (nenápadně) */
.appw { display: inline-grid; place-items: center; width: 1.05rem; height: 1.05rem; margin-left: .25rem; border-radius: 5px; font: 800 .62rem/1 'Barlow Condensed', system-ui, sans-serif; font-style: normal; color: #2a1710; background: linear-gradient(135deg, #ffb08c, #ff7a59); vertical-align: 1px; opacity: .9; }

/* aktivita: kterou hru člen právě hraje */
.mtxt small.act { display: flex; align-items: center; gap: .3rem; color: var(--good, #6fd6a4); }
.mtxt small.act i { font-style: normal; display: inline-grid; }
.mtxt small.act .cico { width: .95rem; height: .95rem; }
.psec small.act { display: inline-flex; align-items: center; gap: .35rem; color: var(--good, #6fd6a4); font-size: .85rem; }
.psec small.act .cico { width: 1.1rem; height: 1.1rem; }

/* ══ Soukromé zprávy ══ */
.mode-switch { grid-template-columns: repeat(3, 1fr); }
.mode-switch button { font-size: .78rem; gap: .3rem; padding: .5rem .15rem; position: relative; }
.mode-switch button svg { width: 1rem; height: 1rem; }
.mode-switch button.has-unread::after { content: attr(data-n); position: absolute; top: -4px; right: -2px; min-width: 1.1rem; height: 1.1rem; padding: 0 .3rem; border-radius: 99px; background: var(--danger, #e86a6e); color: #fff; font-size: .68rem; display: grid; place-items: center; }
.dmrow, .dmcard { display: flex; align-items: center; gap: .65rem; width: 100%; border: 0; background: transparent; text-align: left; padding: .45rem .6rem; border-radius: 12px; color: var(--text-2); cursor: pointer; position: relative; }
.dmrow:hover, .dmcard:hover { background: var(--bg-hover); }
.dmrow.active { background: var(--bg-active); color: var(--text); }
.dmrow .mtxt { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.dmrow .mtxt small { color: var(--text-3); font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubadge { font-style: normal; min-width: 1.2rem; height: 1.2rem; padding: 0 .35rem; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 800; display: grid; place-items: center; }
.dm-empty { padding: .8rem; font-size: .85rem; line-height: 1.45; }
.dmhome { padding: 1.2rem; overflow-y: auto; }
.dmgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .5rem; margin-top: .8rem; }
.dmcard { background: var(--bg-card); border: 1px solid var(--line); }
.top .presence.inl { position: static; display: inline-block; width: .6rem; height: .6rem; margin-left: .5rem; vertical-align: middle; border-radius: 50%; background: var(--text-3); }
.top .presence.inl.on { background: var(--good, #6fd6a4); }
#main[data-dm='1'] #mem-toggle { display: none; }

/* ══ Karta profilu: statistiky a na počítači větší a bohatší ══ */
.pcard { box-shadow: inset 0 3px 0 0 color-mix(in srgb, var(--c, var(--accent)) 70%, transparent); }
.pstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; margin: .7rem 0 .2rem; }
.pstats div { background: color-mix(in srgb, var(--bg) 70%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: .45rem .3rem; text-align: center; }
.pstats b { display: block; font-size: 1.05rem; color: var(--text); font-variant-numeric: tabular-nums; }
.pstats span { font-size: .66rem; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
@media (min-width: 900px) and (hover: hover) {
  dialog.profile { width: min(580px, calc(100vw - 2rem)); }
  dialog.profile .pbanner { height: 150px; }
  dialog.profile .pavatar { top: 96px; left: 1.6rem; }
  dialog.profile .pavatar .avatar.xxl { width: 6.6rem; height: 6.6rem; font-size: 2.4rem; }
  dialog.profile .pbody { display: grid; grid-template-columns: 1fr 1fr; column-gap: 1.4rem; padding: 1rem 1.6rem 1.2rem; }
  dialog.profile .pbody > * { grid-column: 1 / -1; }
  dialog.profile .pbody > .psec:not(.bd) { grid-column: auto; }
  dialog.profile .pname, dialog.profile .pstatus { margin-left: 8.6rem; }
  dialog.profile .pname { font-size: 1.5rem; padding-top: .1rem; }
  dialog.profile .pbio { margin-top: 1.4rem; }
  dialog.profile .pactions { padding: 0 1.6rem 1.3rem; display: flex; gap: .6rem; justify-content: flex-end; }
}

/* Bublina Novinky pod seznamem kanálů */
#news { flex: none; padding: 0 .7rem .5rem; }
.news { background: color-mix(in srgb, var(--accent) 9%, var(--bg-card)); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); border-radius: 14px; padding: .55rem .6rem; font-size: .82rem; }
.news.quiet { opacity: .75; }
.nw-t { font-weight: 800; font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); margin-bottom: .3rem; }
.nw-h { color: var(--text-3); font-size: .72rem; margin: .15rem 0; }
.news p { margin: 0; color: var(--text-3); }
.nw-row { display: flex; align-items: center; gap: .45rem; width: 100%; border: 0; background: transparent; color: var(--text-2); text-align: left; padding: .2rem .15rem; border-radius: 8px; cursor: pointer; }
.nw-row:hover { background: var(--bg-hover); }
.nw-row i { font-style: normal; display: inline-grid; flex: none; }
.nw-row .cico { width: 1.05rem; height: 1.05rem; }
.nw-row span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-row b { color: var(--text); }
.nw-row small { color: var(--good, #6fd6a4); font-size: .72rem; }
.nw-more { font-size: .74rem; }
.mode-switch button { flex-direction: column; gap: .15rem; font-size: .72rem; line-height: 1.1; padding: .4rem .1rem; white-space: nowrap; }
.mode-switch button span { display: block; }

/* Panel členů na velké obrazovce (aplikace pro počítač): širší a vzdušnější */
@media (min-width: 1100px) and (hover: hover) {
  #members { width: 320px; padding: 1rem .9rem 1.2rem; }
  .mem-h { margin: 1.1rem .6rem .45rem; font-size: .72rem; }
  .mem { gap: .85rem; padding: .6rem .7rem; margin-bottom: .2rem; border-radius: 14px; }
  .mem .mav .avatar { width: 2.7rem; height: 2.7rem; font-size: 1.1rem; }
  .mem .mav .avwrap { padding: 4px; }
  .mem .mav .avwrap .avatar { width: 2.5rem; height: 2.5rem; }
  .mtxt b { font-size: 1rem; }
  .mtxt small { font-size: .82rem; margin-top: .1rem; }
  .mbd { gap: .35rem; margin-top: .45rem; }
  .mbd .bdg { transform: scale(1.05); }
  .invite-chip { margin: 0 .2rem .6rem; }
}

/* hlas: stav spojení, Sledovat stream, vlastní náhled */
.tile .link { position: absolute; left: .7rem; top: .6rem; font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 99px; background: rgba(0,0,0,.45); }
.tile .link.ok { color: #6fd6a4; } .tile .link.wait { color: #ffcb6b; } .tile .link.bad { color: #ff7a7a; }
.tile .watch-btn { position: absolute; left: 50%; bottom: .6rem; transform: translateX(-50%); white-space: nowrap; }
.watch-bar { display: flex; flex-wrap: wrap; gap: .6rem; margin-bottom: .9rem; }
.screen.mine { aspect-ratio: auto; width: 240px; height: 135px; justify-self: start; opacity: .9; }
.screen.waiting { display: grid; place-items: center; text-align: center; color: var(--text-2); background: var(--bg-card); border: 1px dashed var(--line); }
.screen .wait-in { display: grid; gap: .4rem; padding: 1rem; }

/* citlivost mikrofonu, náhled a nastavení streamu */
.st-meter { position: relative; }
.st-meter > div.open { background: linear-gradient(90deg, var(--good), var(--good)); }
#st-thrmark { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--text); left: 0; opacity: .85; }
.screen.mine[data-size=s] { width: 240px; height: 135px; }
.screen.mine[data-size=m] { width: 360px; height: 203px; }
.screen.mine[data-size=l] { width: 480px; height: 270px; }
.streamcfg { display: grid; gap: .6rem; padding: .8rem 1rem; margin-bottom: .8rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: 14px; max-width: 520px; }
.streamcfg .st-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
