﻿:root{
  --bg0:#070A12;
  --bg1:#0B1230;

  --text:#EAF0FF;
  --muted:rgba(234,240,255,.72);

  --radius:18px;
}

.logo {
  width: 140px;
  height: auto;
  display: block;
  margin: 24px auto;

  /* �ist� modern� vzhled */
  object-fit: contain;
  filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.18));

  /* jemn� animace */
  transition: transform 0.25s ease, filter 0.25s ease, opacity 0.25s ease;

  /* trochu �luxusn�ho� feelingu */
  opacity: 0.95;
}

/* hover efekt � profesion�ln�, ne p�ehnan� */
.logo:hover {
  transform: translateY(-3px) scale(1.05);
  filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.25));
  opacity: 1;
}

/* p�i na�ten� str�nky jemn� animace */
@keyframes logoFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  to {
    opacity: 0.95;
    transform: translateY(0) scale(1);
  }
}

.logo {
  animation: logoFadeIn 0.6s ease-out;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  color:var(--text);
  overflow-x:hidden;

  background:#070A12;
}

body::after{
  content:"";
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  background:
    radial-gradient(760px 520px at 82% 8%, rgba(20,184,166,.22), transparent 58%),
    radial-gradient(680px 460px at 8% 18%, rgba(245,158,11,.12), transparent 52%),
    radial-gradient(820px 560px at 52% 86%, rgba(79,70,229,.16), transparent 62%),
    linear-gradient(180deg, #070A12 0%, #0B1020 54%, #0D1424 100%);
  background-repeat:no-repeat;
  background-size:cover;
}

/* Animated gradient overlay (cel� str�nka) */
body::before{
  content:"";
  position:fixed;
  inset:-20%;
  z-index:1;
  pointer-events:none;

  background: linear-gradient(120deg,
    rgba(109,94,247,.45),
    rgba(96,165,250,.35),
    rgba(34,211,238,.28),
    rgba(245,158,11,.18),
    rgba(109,94,247,.45)
  );

  background-size: 300% 300%;
  filter: blur(28px) saturate(160%);
  opacity:.35;
  animation: gradientShift 14s ease-in-out infinite;
}

@keyframes gradientShift{
  0%   { background-position: 0% 50%; transform: translate3d(0,0,0); }
  50%  { background-position: 100% 50%; transform: translate3d(3%, -2%, 0); }
  100% { background-position: 0% 50%; transform: translate3d(0,0,0); }
}


.bg{
  position:fixed;
  inset:0;
  z-index:1;
  pointer-events:none;
  overflow:hidden;
  min-height:100svh;
}

/* Three.js canvas behind everything */
#three-canvas{
  z-index:0;
}


.bg-svg{
  width:100%;
  height:100%;
  display:block;
  min-height:100svh;
}

/* UI overlay above background effects */
.page{
  position:relative;
  z-index:2;
  min-height:100vh;
  display:grid;
  place-items:center;
  padding:28px 16px;
}


.card{
  width:min(860px, 100%);
  padding:28px;
  border-radius:var(--radius);
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.20);
  backdrop-filter: blur(22px) saturate(185%);
  box-shadow:
    0 80px 240px rgba(0,0,0,.72),
    0 12px 50px rgba(109,94,247,.18),
    0 0 0 1px rgba(255,255,255,.07) inset,
    0 0 0 2px rgba(96,165,250,.06) inset;
  position:relative;
  overflow:hidden;
}

.card::before{
  content:"";
  position:absolute;
  inset:-3px;
  background:
    radial-gradient(900px 240px at 18% 0%, rgba(109,94,247,.46), transparent 58%),
    radial-gradient(700px 260px at 90% 8%, rgba(96,165,250,.34), transparent 60%),
    linear-gradient(120deg, rgba(255,255,255,.28), rgba(255,255,255,0) 42%);
  opacity:.85;
  pointer-events:none;
}

.card::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    radial-gradient(600px 120px at 20% 0%, rgba(255,255,255,.24), rgba(255,255,255,0) 55%),
    linear-gradient(90deg, rgba(255,255,255,.10), rgba(255,255,255,0) 35%, rgba(255,255,255,.08));
  opacity:.9;
}

.card > *{ position:relative; z-index:1; }


.header{ text-align:center; margin-bottom:18px; }

.logo{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  margin-bottom:14px;
}

.logo-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background: radial-gradient(circle at 30% 30%, #FFFFFF, rgba(255,255,255,.2) 28%),
              linear-gradient(135deg, #6D5EF7, #60A5FA);
  box-shadow: 0 0 0 6px rgba(109,94,247,.12);
}

.logo-text{ font-weight:700; letter-spacing:.2px; }

h1{
  margin:0;
  font-size: clamp(28px, 4vw, 38px);
  line-height:1.1;
  text-shadow:
    0 1px 0 rgba(255,255,255,.06),
    0 0 26px rgba(109,94,247,.28),
    0 0 54px rgba(96,165,250,.14);
  letter-spacing:.2px;
}


.header p{
  margin:10px auto 0;
  max-width:40ch;
  color:var(--muted);
  line-height:1.5;
}

.actions{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:18px;
}

.privacy-preview{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:12px;
  align-items:center;
  margin-top:18px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(135deg, rgba(255,255,255,.075), rgba(96,165,250,.055));
  text-align:left;
}

.privacy-preview strong,
.privacy-preview span{
  display:block;
}

.privacy-preview span{
  margin-top:4px;
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.privacy-preview .btn{
  width:auto;
  white-space:nowrap;
}

.field__hint{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
}

.privacy-consent{
  display:grid;
  gap:10px;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.045);
}

.checkbox-row{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color:var(--text);
  font-size:13px;
  line-height:1.45;
}

.checkbox-row input{
  margin-top:2px;
  flex:0 0 auto;
}

.privacy-policy{
  display:grid;
  gap:12px;
}

.privacy-policy section{
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background:rgba(255,255,255,.045);
}

.privacy-policy h2{
  margin:0 0 8px;
  font-size:16px;
}

.privacy-policy p{
  margin:0;
  color:var(--muted);
  line-height:1.65;
}

@media (max-width: 620px){
  .privacy-preview{
    grid-template-columns:1fr;
  }
  .privacy-preview .btn{
    width:100%;
  }
}

.btn{
  width:100%;
  border:0;
  padding:14px 16px;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
  font-family: inherit;
  text-transform:none;
  letter-spacing:.15px;
  color:var(--text);

  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, border-color .15s ease;
  outline:none;
  position:relative;
  overflow:hidden;
}

.btn::after{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.18), rgba(255,255,255,0) 35%);
  transform: translateX(-20%);
  opacity:.0;
  transition: opacity .2s ease, transform .35s ease;
  pointer-events:none;
}

.btn:hover::after{
  opacity:.9;
  transform: translateX(0%);
}


.btn:focus-visible{
  box-shadow: 0 0 0 4px rgba(109,94,247,.35);
}

.btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.btn:active{ transform: translateY(0); }

.btn-primary{
  background: linear-gradient(135deg, rgba(109,94,247,.98), rgba(96,165,250,.75));
  border-color: rgba(120,155,255,.55);
  box-shadow:
    0 24px 80px rgba(109,94,247,.28),
    0 0 0 1px rgba(255,255,255,.10) inset;
}


.btn-secondary{
  background: linear-gradient(135deg, rgba(20,184,166,.95), rgba(34,211,238,.72));
  border-color: rgba(34,211,238,.55);
  box-shadow:
    0 24px 80px rgba(20,184,166,.26),
    0 0 0 1px rgba(255,255,255,.10) inset;
}


.btn-tertiary{
  background: linear-gradient(135deg, rgba(245,158,11,.98), rgba(251,191,36,.78));
  border-color: rgba(251,191,36,.55);
  box-shadow:
    0 24px 80px rgba(245,158,11,.20),
    0 0 0 1px rgba(255,255,255,.10) inset;
}

/* Neon/glow hover */
.btn:hover{
  filter: brightness(1.08) saturate(1.1);
  box-shadow:
    0 28px 100px rgba(109,94,247,.22),
    0 0 0 1px rgba(255,255,255,.12) inset,
    0 0 30px rgba(96,165,250,.25);
}

/* 3D hover tilt */
.btn{
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}


.hint{

  margin-top:14px;
  min-height:22px;
  font-size:14px;
  color:var(--muted);
  text-align:center;
}

.account-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin:18px 0;
  flex-wrap:wrap;
}

.account-buttons{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.account-panel{
  justify-content:flex-start;
}

.account-left{
  display:flex;
  align-items:center;
  gap:14px;
  flex-wrap:wrap;
}

.profile-card{
  margin:0 0 20px;
  padding:24px;
  border-radius:28px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  box-shadow: 0 24px 80px rgba(0,0,0,.18);
}

.profile-hero{
  display:grid;
  gap:18px;
  margin-bottom:18px;
}

.profile-cover{
  position:relative;
  min-height:210px;
  border-radius:22px;
  overflow:hidden;
  background: radial-gradient(circle at top left, rgba(96,165,250,.24), rgba(255,255,255,0) 45%),
              radial-gradient(circle at bottom right, rgba(109,94,247,.18), rgba(255,255,255,0) 45%);
}

.profile-cover video{
  width:100%;
  height:100%;
  object-fit:cover;
}

.cover-placeholder{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:210px;
  color:rgba(234,240,255,.72);
  text-align:center;
  padding:22px;
}

.profile-meta{
  display:flex;
  align-items:flex-end;
  gap:18px;
}

.profile-avatar{
  width:156px;
  height:146px;
  border-radius:50%;
  border:3px solid rgba(255,255,255,.22);
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,0));
  background-size: cover;
  background-position: center;
  box-shadow: 0 14px 40px rgba(0,0,0,.18);
}

.profile-avatar--upload{
  cursor: pointer;
  position: relative;
  display:block;
}

.profile-avatar--upload:hover{
  box-shadow: 0 14px 40px rgba(0,0,0,.18), 0 0 0 4px rgba(96,165,250,.18);
}

.profile-avatar__overlay{
  position:absolute;
  inset:auto 10px 10px auto;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 900;
  background: rgba(10, 14, 28, .75);
  border: 1px solid rgba(255,255,255,.18);
  color: rgba(234,240,255,.9);
  backdrop-filter: blur(10px);
}

.cover-upload{
  margin-top: 12px;
}

.cover-upload .field__input{
  min-height: 46px;
}

.profile-summary{
  flex:1;
}

.profile-summary .label{
  display:inline-flex;
  margin-bottom:8px;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:.14em;
  font-size:.76rem;
}

.profile-summary h2{
  margin:0;
  font-size:clamp(24px, 3vw, 32px);
}

.role-badge{
  display:inline-flex;
  margin-top:8px;
  padding:8px 14px;
  border-radius:999px;
  background: rgba(96,165,250,.14);
  color:#EAF0FF;
  font-weight:700;
}

.profile-bio{
  margin:14px 0 0;
  color:var(--muted);
  line-height:1.8;
}

.profile-form .field{
  margin-bottom:14px;
}

.profile-form .field__input{
  min-height:48px;
}

.profile-form textarea.field__input{
  min-height:120px;
}

.feed-card{
  width:min(1100px, 100%);
  padding:28px;
  border-radius:28px;
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.16);
  box-shadow: 0 30px 120px rgba(0,0,0,.22);
}

/* ===== Feed v2 (jednodu���, �chytr�) ===== */
.feed-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:18px;
}

.feed-hero h1{
  margin: 8px 0 0;
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.1;
}

.feed-hero p{
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 60ch;
}

.feed-topbar--v2{
  grid-template-columns: 1fr;
}

.feed-topbar--v2 .feed-actions{
  justify-content:flex-start;
}

.feed-actions .btn{
  width:auto;
}

.feed-actions{
  gap:10px;
}

.feed-actions{
  align-items:center;
}

@media (max-width: 820px){
  .feed-actions{
    justify-content:flex-start;
  }
}

/* ===== Mobilní rozložení akcí na feedu (aby to mělo hlavu a patu) =====
   - na malých displejích se tlačítka neskládají do 4 řádků
   - zachová se rychlý přístup a přehlednost (horizontální „chip“ lišta)
*/
@media (max-width: 640px){
  .feed-topbar--v2{
    gap: 10px;
  }

  .feed-topbar--v2 .feed-actions{
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;

    justify-content: flex-start;
    gap: 8px;

    padding: 6px 2px 2px;
    margin: 0 -2px;

    /* jemný fade okrajů = naznačení, že jde rolovat do strany */
    mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 14px), transparent);
  }

  .feed-topbar--v2 .feed-actions::-webkit-scrollbar{
    display:none;
  }

  .feed-topbar--v2 .feed-actions .btn{
    flex: 0 0 auto;
    width: auto;

    padding: 10px 12px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;

    scroll-snap-align: start;
  }
}

.users-list{
  display:grid;
  gap:10px;
  margin-top: 10px;
}

.user-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.user-row__left{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
}

.user-row__avatar{
  width:42px;
  height:42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(135deg, rgba(255,255,255,.14), rgba(255,255,255,0));
  background-size: cover;
  background-position:center;
  flex: 0 0 auto;
}

.user-row__name{
  display:grid;
  gap:2px;
  min-width:0;
}

.user-row__name strong{
  font-size: 14px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-row__name span{
  font-size: 12px;
  color: var(--muted);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.live-grid--simple{
  max-width: 920px;
  margin: 0 auto;
  align-items: stretch;
}

.live-grid--with-chat{
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(280px, .8fr);
  align-items:start;
}

.live-actions--top{
  justify-content:flex-end;
  margin:0 0 12px;
}

.live-public{
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
}

.live-public__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.live-public__list{
  display:grid;
  gap: 10px;
}

.live-room-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.live-room-row:hover{
  border-color: rgba(96,165,250,.34);
  background: rgba(96,165,250,.08);
}

.live-room-row__meta{
  min-width:0;
}

.live-room-row__meta strong{
  display:block;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-room-row__meta span{
  display:block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-block{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  padding: 12px;
}

.live-block__title{
  font-weight: 900;
  margin-bottom: 10px;
}

.live-video{
  width:100%;
  background: rgba(0,0,0,.22);
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  max-height: 260px;
  object-fit: cover;
}

.live-start-panel{
  display:grid;
  gap:6px;
  padding:14px;
  min-height:160px;
  align-content:center;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(0,0,0,.16);
}

.live-start-panel strong{
  font-size:15px;
}

.live-start-panel span{
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}

.live-studio{
  display:grid;
  gap: 10px;
}

.live-studio-modal{
  z-index:130;
}

.live-studio-modal .modal__panel--wide{
  width:min(1180px, calc(100vw - 32px));
}

.live-public-studio-modal{
  z-index:130;
}

.live-public-player{
  width:min(920px, calc(100vw - 20px));
}

.live-public-player__body{
  display:grid;
  grid-template-columns:minmax(260px, 360px) minmax(300px, 1fr);
  gap:14px;
  align-items:stretch;
  justify-content:center;
}

.live-public-phone{
  position:relative;
  width:min(360px, 100%);
  aspect-ratio:9 / 16;
  overflow:hidden;
  border-radius:28px;
  border:1px solid rgba(255,255,255,.16);
  background:#05070d;
  box-shadow:0 26px 90px rgba(0,0,0,.45);
}

.camera-preview{
  position:relative;
}

.camera-preview-status,
.live-video-status{
  position:absolute;
  inset:auto 12px 12px;
  z-index:5;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(5,7,13,.72);
  border:1px solid rgba(255,255,255,.14);
  color:var(--text);
  font-size:13px;
  font-weight:800;
  text-align:center;
  backdrop-filter:blur(12px);
}

.camera-preview-status[hidden],
.live-video-status[hidden]{
  display:none !important;
}

.live-public-phone__video{
  width:100%;
  height:100%;
  object-fit:cover;
  background:#05070d;
}

.live-public-phone__top{
  position:absolute;
  top:14px;
  left:14px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(239,68,68,.92);
  color:#fff;
  font-size:12px;
  font-weight:900;
  letter-spacing:.08em;
}

.live-public-phone__audience{
  position:absolute;
  top:14px;
  right:14px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(5,7,13,.62);
  border:1px solid rgba(255,255,255,.14);
  color:#fff;
  font-size:12px;
  font-weight:900;
  backdrop-filter:blur(12px);
}

.live-public-phone__bottom{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
  padding:10px;
  border-radius:18px;
  background:rgba(5,7,13,.58);
  border:1px solid rgba(255,255,255,.12);
  backdrop-filter:blur(12px);
}

.live-studio-shell{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 320px;
  gap:18px;
  min-height:min(78vh, 820px);
  align-items:stretch;
}

.live-private-code{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto auto auto;
  gap:8px;
  align-items:center;
  padding:12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.045);
}

.live-private-code span{
  display:block;
  color:var(--muted);
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.live-private-code strong{
  display:block;
  margin-top:4px;
  font-size:15px;
  overflow-wrap:anywhere;
}

.live-studio-main{
  min-width:0;
  display:grid;
  grid-template-rows:auto auto minmax(0, 1fr) auto;
  gap:10px;
}

.live-audience{
  display:grid;
  gap:9px;
  padding:10px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background:linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
}

.live-audience__stats{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.live-audience__stats span{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(5,7,13,.34);
  color:var(--text);
  font-size:12px;
  font-weight:900;
}

.live-audience__list,
.live-feed-card__participants{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
  min-height:28px;
}

.live-audience__empty{
  color:var(--muted);
  font-size:12px;
  font-weight:700;
}

.live-participant{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-width:0;
  max-width:100%;
  padding:5px 8px 5px 5px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(255,255,255,.055);
  color:var(--text);
  font-size:12px;
  font-weight:800;
}

.live-participant__avatar{
  width:22px;
  height:22px;
  border-radius:50%;
  display:grid;
  place-items:center;
  flex:0 0 auto;
  background:linear-gradient(135deg, rgba(96,165,250,.95), rgba(34,197,94,.78));
  background-size:cover;
  background-position:center;
  color:#fff;
  font-size:11px;
  font-weight:900;
}

.live-participant--chip{
  background:rgba(5,7,13,.28);
}

.live-stage{
  position:relative;
  overflow:hidden;
  width:100%;
  min-width:0;
  min-height: 0;
  height: min(52vh, 520px);
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  background:#05070d;
  border:1px solid rgba(255,255,255,.12);
}

.live-video--stage{
  display:block;
  width:100%;
  height:100%;
  max-height:none;
  border:0;
  border-radius:0;
  object-fit:contain;
}

.live-camera-overlay{
  position:absolute;
  z-index:3;
  width: min(28%, 180px);
  aspect-ratio: 16 / 9;
  transform: translate(0, 0);
  object-fit:cover;
  border-radius: 14px;
  border: 2px solid rgba(255,255,255,.72);
  background:#05070d;
  box-shadow:0 18px 50px rgba(0,0,0,.45);
  cursor:grab;
  touch-action:none;
}

.live-camera-overlay:active{
  cursor:grabbing;
}

.live-camera-overlay[hidden]{
  display:none !important;
}

.live-stage__badge{
  position:absolute;
  left: 10px;
  bottom: 10px;
  z-index:4;
  max-width: calc(100% - 20px);
  padding: 7px 10px;
  border-radius:999px;
  background:rgba(5,7,13,.72);
  border:1px solid rgba(255,255,255,.14);
  color:var(--text);
  font-size:12px;
  font-weight:800;
  backdrop-filter: blur(10px);
}

.live-studio-controls{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.live-studio-controls .reaction-btn{
  width:100%;
  justify-content:center;
}

.live-chat--studio{
  min-height:0;
  align-self:stretch;
  grid-template-rows:auto minmax(0, 1fr) auto;
}

.live-chat--studio .live-chat__list{
  max-height:none;
  min-height:0;
}

.live-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top: 10px;
}

.live-room{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
}

.live-room__label{
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.live-room__code{
  margin-top: 6px;
  font-weight: 900;
  letter-spacing: .4px;
}

.live-chat{
  min-height: 100%;
  display:grid;
  grid-template-rows:auto minmax(220px, 1fr) auto;
  gap: 10px;
}

.live-chat__header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
}

.live-chat__reactions{
  display:flex;
  flex-wrap:wrap;
  gap: 6px;
  justify-content:flex-end;
}

.live-chat__list{
  min-height:220px;
  max-height:380px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap: 8px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
}

.live-comment{
  display:grid;
  gap: 3px;
  padding: 9px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.065);
  border: 1px solid rgba(255,255,255,.08);
}

.live-comment strong{
  font-size: 13px;
}

.live-comment span{
  overflow-wrap:anywhere;
}

.live-comment time{
  font-size: 11px;
  color: var(--muted);
}

.live-chat__form{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.live-viewer-modal{
  z-index:130;
}

.live-viewer-modal--inside-fullscreen{
  position:fixed;
  inset:0;
  z-index:2147483647;
}

.live-viewer-modal--inside-fullscreen .modal__backdrop{
  background:rgba(2,6,23,.72);
}

.live-viewer-modal--inside-fullscreen .modal__panel{
  width:min(1280px, calc(100vw - 20px));
  max-height:calc(100vh - 20px);
}

.live-modal-inside-fullscreen{
  position:fixed;
  inset:0;
  z-index:2147483647;
}

.live-modal-inside-fullscreen .modal__panel{
  max-height:calc(100vh - 20px);
}

/* Public live studio: TikTok-like camera-first layout for desktop and mobile. */
.live-public-player{
  width:min(1040px, calc(100vw - 20px));
}

.live-public-player__body{
  grid-template-columns:minmax(320px, 430px) minmax(300px, 400px);
  align-items:start;
}

.live-public-phone{
  width:min(430px, 100%);
  max-height:min(78vh, 780px);
  aspect-ratio:9 / 16;
  border-radius:24px;
}

.live-public-phone__video{
  height:100%;
  object-fit:cover;
}

.live-public-phone .live-video-status{
  left:16px;
  right:16px;
  bottom:76px;
  max-height:96px;
  overflow:auto;
  text-align:left;
}

.live-public-phone__bottom{
  left:auto;
  right:12px;
  bottom:68px;
  width:56px;
  display:grid;
  grid-template-columns:1fr;
  padding:8px;
  border-radius:18px;
}

.live-public-phone__bottom[hidden]{
  display:none !important;
}

.live-public-phone__bottom .reaction-btn{
  width:40px;
  min-height:40px;
  padding:0;
}

.live-chat--public{
  min-height:min(78vh, 780px);
  align-self:stretch;
}

.live-chat--public .live-chat__list{
  max-height:none;
}

@media (max-width: 820px){
  .live-public-player{
    width:min(460px, calc(100vw - 12px));
    max-height:calc(100dvh - 12px);
    overflow:auto;
  }

  .live-public-player__body{
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
    padding:8px;
  }

  .live-public-phone{
    width:100%;
    max-height:none;
    aspect-ratio:9 / 16;
    display:block;
    overflow:hidden;
    margin:0 auto;
    border-radius:22px;
  }

  .live-public-phone__video{
    width:100%;
    height:100%;
    min-height:0;
    border-radius:0;
  }

  .live-public-phone .live-video-status{
    position:absolute;
    left:14px;
    right:72px;
    bottom:74px;
    margin:0;
    inset:auto 72px 74px 14px;
    max-height:84px;
  }

  .live-public-phone__quick{
    left:12px;
    right:12px;
    bottom:12px;
  }

  .live-public-phone__bottom{
    position:absolute;
    left:auto;
    right:12px;
    bottom:68px;
    width:54px;
    margin:0;
    grid-template-columns:1fr;
    background:rgba(5,7,13,.72);
  }

  .live-public-phone__bottom .btn,
  .live-public-phone__bottom .reaction-btn{
    width:38px;
    min-height:38px;
    padding:0;
  }

  .live-public-phone__bottom .btn{
    grid-column:auto;
  }

  .live-chat--public{
    min-height:0;
    max-height:38dvh;
    overflow:hidden;
  }

  .live-chat--public .live-chat__list{
    min-height:120px;
    max-height:22dvh;
  }
}

.live-viewer-shell{
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(300px, .36fr);
  gap:14px;
  min-height:min(76vh, 780px);
}

.live-viewer-video{
  min-width:0;
  position:relative;
  display:grid;
  place-items:center;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background:#05070d;
  overflow:hidden;
}

.live-video-status--viewer{
  left:18px;
  right:18px;
  bottom:86px;
}

.live-video--viewer{
  width:100%;
  height:100%;
  max-height:none;
  object-fit:contain;
  border:0;
  border-radius:0;
  background:#05070d;
}

.live-video--viewer.live-video--cover{
  object-fit:cover;
}

.live-viewer-controls{
  position:absolute;
  left:14px;
  right:14px;
  bottom:14px;
  z-index:7;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:center;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(5,7,13,.72);
  backdrop-filter:blur(12px);
}

.live-public-phone__quick{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  z-index:8;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(74px, .7fr) 44px;
  gap:8px;
  align-items:center;
}

.live-public-phone__quick .btn,
.live-public-phone__quick .reaction-btn{
  min-height:44px;
  justify-content:center;
}

.live-viewer-controls .reaction-btn{
  min-height:38px;
  justify-content:center;
}

.live-modal-fullscreen .modal__panel{
  width:100vw;
  height:100vh;
  max-width:none;
  max-height:none;
  border-radius:0;
}

.live-modal-fullscreen .modal__body{
  min-height:0;
  overflow:auto;
}

.live-modal-fullscreen .live-grid--with-chat{
  grid-template-columns:minmax(0, 1fr) minmax(0, 1fr) minmax(320px, .7fr);
}

.live-modal-fullscreen .live-video{
  max-height:calc(100vh - 360px);
}

@media (max-width: 820px){
  .live-grid{
    grid-template-columns: 1fr;
  }
  .live-grid--with-chat{
    grid-template-columns: 1fr;
  }
  .live-studio-shell{
    grid-template-columns:1fr;
    min-height:70vh;
  }
  .live-public-player__body,
  .live-viewer-shell{
    grid-template-columns:1fr;
  }
  .live-private-code{
    grid-template-columns:1fr;
  }
  .live-studio-controls{
    grid-template-columns: 1fr;
  }
  .live-feed-card{
    grid-template-columns:1fr;
  }
  .live-feed-card .btn{
    width:100%;
  }

  /* Veřejné live: na mobilu nesmí "zmizet" kvůli výšce/overflowu */
  .live-public-player__body{
    min-height: 0;
  }
  .live-public-player{
    max-height: 100dvh;
    overflow: hidden;
  }
  .live-public-phone{
    width: min(420px, 100%);
    height: auto;
    aspect-ratio: 9 / 16;
    margin: 0 auto;
  }
}

@media (max-width: 520px){
  /* Je-li modal vyšší než viewport, zamezit tomu, aby videokontent “ujel” mimo */
  .live-public-studio-modal .modal__panel{
    max-height: calc(100dvh - 12px);
    overflow:auto;
  }
  .live-public-player__body{
    padding: 8px;
    min-height: 0;
    gap: 12px;
  }
  .live-public-phone{
    border-radius: 22px;
    display:flex;
    flex-direction:column;
    aspect-ratio:auto;
    min-height:0;
    max-height:none;
    overflow:visible;
  }

  /* Obecně pro veřejné live prvky: nikdy se neschová jako "hidden" v desktopu */
  .live-public-phone__video{
    min-height: 0;
    height:min(48dvh, 420px);
    border-radius:20px 20px 12px 12px;
  }

  /* Na malém mobilu držet hlášku mimo ovládání */
  .live-public-phone .live-video-status{
    position:static;
    margin:10px 10px 0;
    inset:auto;
    max-height:none;
  }

  .live-public-phone__bottom{
    position:static;
    margin:10px;
    display:grid;
    grid-template-columns:repeat(4, minmax(44px, 1fr));
    background:rgba(5,7,13,.86);
  }

  .live-public-phone__bottom .btn,
  .live-public-phone__bottom .reaction-btn{
    min-height:44px;
    width:100%;
    padding:9px 10px;
    color:var(--text);
  }

  .live-public-phone__bottom .btn-primary{
    color:#06120F;
    font-weight:900;
  }

  .live-public-phone__bottom .btn{
    grid-column:span 2;
  }

  .live-viewer-controls{
    left:10px;
    right:10px;
    bottom:10px;
    display:grid;
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }

  .live-viewer-controls .reaction-btn{
    width:100%;
    min-height:42px;
    padding:8px 10px;
  }
}

/* Nízké displeje (např. mobil na šířku): ať je v „veřejném live“ fakt vidět video */
@media (max-height: 700px) and (max-width: 820px){
  .live-public-phone{
    aspect-ratio: 16 / 10;
  }
  .live-public-phone__bottom{
    padding: 8px;
    border-radius: 16px;
  }
}

@media (max-height: 700px) and (max-width: 520px){
  .live-public-phone{
    aspect-ratio:auto;
  }
}

.live-card,
.live-launch-card{
  border-radius:12px;
  background:rgba(255,255,255,.045);
}

.live-launcher{
  align-items:start;
}

.live-launch-card{
  min-height:100%;
  padding:14px;
}

.live-launch-card .live-start-panel{
  min-height:112px;
  border-radius:10px;
  background:rgba(5,7,13,.26);
}

.live-room-row,
.live-private-code,
.live-audience,
.live-stage,
.live-chat__list,
.live-comment,
.live-viewer-video{
  border-radius:10px;
}

.live-room-row{
  background:rgba(5,7,13,.24);
}

.live-studio-controls{
  display:flex;
  flex-wrap:wrap;
}

.live-studio-controls .reaction-btn{
  min-width:130px;
  width:auto;
}

.live-chat__list{
  background:rgba(5,7,13,.24);
}

.live-comment{
  background:rgba(255,255,255,.075);
}

.live-receive-meter{
  position:absolute;
  left:14px;
  top:14px;
  z-index:6;
  display:flex;
  gap:7px;
  flex-wrap:wrap;
  max-width:calc(100% - 28px);
}

.live-receive-meter span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 9px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(5,7,13,.72);
  color:rgba(234,240,255,.82);
  font-size:12px;
  font-weight:900;
  backdrop-filter:blur(12px);
}

.live-public-phone .live-video-status{
  left:12px;
  right:12px;
  bottom:132px;
  max-height:96px;
  overflow:auto;
}

.live-public-phone__video,
.live-video--stage,
.live-camera-overlay{
  transform-origin:center;
}

.live-receive-meter span[data-ok="true"]{
  background:rgba(20,184,166,.18);
  border-color:rgba(20,184,166,.36);
  color:#d8fff7;
}

@media (max-width: 820px){
  .live-studio-controls{
    display:grid;
    grid-template-columns:1fr;
  }
  .live-studio-controls .reaction-btn{
    width:100%;
  }
}


/* Rychl� rohov� akce na feedu */
.feed-corner{
  position: fixed;
  top: 16px;
  z-index: 90;
  width: auto;
  padding: 10px 14px;
  border-radius: 999px;
}

.feed-corner-left{ left: 16px; }
.feed-corner-right{ right: 16px; }
.feed-corner--second{ top: 62px; }
.feed-corner--third{ top: 108px; }
.btn[hidden]{ display:none !important; }

@media (max-width: 520px){
  .feed-corner{
    top: 10px;
    padding: 9px 12px;
    font-size: 14px;
  }
  .feed-corner-left{ left: 10px; }
  .feed-corner-right{ right: 10px; }
  .feed-corner--second{ top: 54px; }
  .feed-corner--third{ top: 98px; }
}

.feed-header{
  display:grid;
  gap:14px;
  margin-bottom:20px;
}

.feed-header h1{
  margin:0;
  font-size:clamp(32px, 4vw, 44px);
}

.feed-header p{
  margin:0;
  color:var(--muted);
  max-width:56ch;
}

.feed-topbar{
  display:grid;
  gap:14px;
  grid-template-columns:1fr auto;
  align-items:center;
  margin-bottom:22px;
}

@media (max-width: 820px){
  .feed-topbar{
    grid-template-columns: 1fr;
  }
  .feed-actions{
    justify-content: flex-start;
  }
}

/* ==== Media p��sp�vky: jednoduch� taby (zat�m je aktivn� jen nahr�v�n�) ==== */
.media-form-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin: 0 0 14px;
}

.tab-btn{
  border:1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 14px;
  cursor:pointer;
  font-weight: 800;
  transition: .15s ease;
}

.tab-btn:hover{
  filter: brightness(1.05);
}

.tab-btn.active{
  background: linear-gradient(135deg, rgba(109,94,247,.70), rgba(96,165,250,.55));
  border-color: rgba(120,155,255,.55);
}

.tab-btn:disabled,
.tab-btn.disabled{
  opacity: .45;
  cursor: not-allowed;
  filter: none;
}

.feed-search{
  display:flex;
  align-items:center;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.16);
  border-radius:14px;
  padding:10px 12px;
}

.feed-search input{
  width:100%;
  border:none;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:16px;
}

.feed-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}

.profile-edit-photo{
  display:grid;
  gap:10px;
  margin-bottom:14px;
}

.profile-photo-upload{
  width:120px;
  height:120px;
  border-radius:50%;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  background:linear-gradient(135deg, rgba(109,94,247,.18), rgba(96,165,250,.12));
  border:2px dashed rgba(96,165,250,.4);
  transition:all .2s ease;
}

.profile-photo-upload:hover{
  background:linear-gradient(135deg, rgba(109,94,247,.28), rgba(96,165,250,.22));
  border-color:rgba(96,165,250,.6);
}

.upload-placeholder{
  font-size:48px;
  color:rgba(96,165,250,.6);
  font-weight:700;
}

.feed-list{
  display:grid;
  gap:20px;
}

.feed-item{
  border-radius:22px;
  padding:22px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  box-shadow: 0 16px 60px rgba(0,0,0,.16);
}

.feed-item--live{
  border-color:rgba(239,68,68,.30);
  background:
    linear-gradient(135deg, rgba(239,68,68,.11), rgba(96,165,250,.08)),
    rgba(255,255,255,.05);
}

.live-feed-card{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:16px;
  align-items:end;
  margin-top:14px;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(5,7,13,.38);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.10);
}

.live-feed-card__glow{
  position:absolute;
  inset:auto -10% -50% 15%;
  height:130px;
  pointer-events:none;
  background:radial-gradient(circle, rgba(239,68,68,.30), transparent 62%);
  filter:blur(12px);
}

.live-feed-card__main{
  position:relative;
  z-index:1;
  min-width:0;
}

.live-feed-card__badge{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:6px 10px;
  margin-bottom:10px;
  border-radius:999px;
  background:rgba(239,68,68,.94);
  color:#fff;
  font-size:12px;
  font-weight:950;
  letter-spacing:.08em;
}

.live-feed-card h3{
  margin:0 0 6px;
}

.live-feed-card p{
  margin:0 0 12px;
}

.live-feed-card__stats{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:10px;
}

.live-feed-card__stats span{
  padding:7px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.10);
  color:var(--text);
  font-size:12px;
  font-weight:850;
}

.live-feed-card .btn{
  position:relative;
  z-index:1;
  white-space:nowrap;
}

.feed-item h3{
  margin:0 0 10px;
  font-size:1.35rem;
}

.feed-item p{
  color:var(--muted);
  line-height:1.75;
}

.media-description{
  margin:8px 0 0;
  color:var(--muted);
  line-height:1.7;
}

.feed-meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
  color:var(--muted);
  font-size:.95rem;
}

.feed-meta{
  border-radius: 14px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.08);
  padding: 10px 12px;
}

.feed-meta summary{
  cursor: pointer;
  user-select: none;
  list-style: none;
  font-weight: 700;
  color: rgba(234,240,255,.78);
}

.feed-meta summary::-webkit-details-marker{ display:none; }
.feed-meta summary::before{
  content: '?';
  display:inline-block;
  margin-right: 8px;
  transform: translateY(-1px);
  opacity: .9;
}
.feed-meta[open] summary::before{ content:'?'; }

.feed-meta__content{
  margin-top: 10px;
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  color: var(--muted);
  font-size: .92rem;
}

.feed-author{
  display:flex;
  align-items:center;
  gap:14px;
  margin-bottom:16px;
}

.feed-author-avatar{
  width:52px;
  height:52px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,.18);
  background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,0));
  background-size:cover;
  background-position:center;
}

.feed-author-info{
  display:grid;
  gap:6px;
}

.feed-author-link,
.feed-author-name{
  color:inherit;
  text-decoration:none;
}

.feed-author-link{
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.feed-author-link:hover{
  transform:translateY(-1px) scale(1.03);
  border-color:rgba(34,211,238,.55);
  box-shadow:0 0 0 4px rgba(34,211,238,.13);
}

.feed-author-name{
  width:max-content;
  max-width:100%;
  font-weight:800;
}

.feed-author-name:hover{
  color:#67E8F9;
  text-decoration:underline;
  text-underline-offset:3px;
}

.feed-author-info strong{
  display:block;
}

.feed-author-info span{
  color:var(--muted);
  font-size:.95rem;
}

.feed-preview{
  margin-top:16px;
  border-radius:18px;
  overflow:hidden;
  background: rgba(255,255,255,.04);
}

.feed-preview img,
.feed-preview video{
  width:100%;
  display:block;
  max-height:440px;
  object-fit:cover;
}

.feed-text{
  padding: 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  color: var(--text);
  line-height: 1.75;
  white-space: pre-wrap;
}

.feed-text--styled{
  position: relative;
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(18px, 4vw, 34px);
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0,0,0,.20);
  word-break: break-word;
}

.feed-text--styled::before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,0) 42%),
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.18), transparent 28%);
}

.feed-text--styled > *{
  position:relative;
}

.text-compose{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 330px;
  gap:18px;
  align-items:start;
}

.text-compose__main,
.text-compose__tools{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.text-compose__textarea textarea{
  min-height:210px;
  resize:vertical;
}

.text-compose__tools{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.06);
}

.text-tool-group{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.text-preset-row{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:8px;
}

.text-preset{
  min-height:38px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.22);
  cursor:pointer;
  background:linear-gradient(135deg, #1f2937, #4b5563);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.20);
}

.text-preset.is-active{
  outline:3px solid rgba(34,211,238,.34);
  border-color:rgba(255,255,255,.60);
}

.text-preset--sunset{ background:linear-gradient(135deg, #9a3412, #f97316); }
.text-preset--ocean{ background:linear-gradient(135deg, #155e75, #22d3ee); }
.text-preset--ink{ background:linear-gradient(135deg, #020617, #334155); }
.text-preset--paper{ background:linear-gradient(135deg, #f8fafc, #e2e8f0); }

.text-tool-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.field__input--color{
  min-height:44px;
  padding:6px;
}

.text-toggle-row{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.text-toggle{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:38px;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.07);
  color:var(--text);
  font-weight:700;
  font-size:.9rem;
}

.text-post-preview{
  min-height:170px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:10px;
  padding:20px;
  border-radius:18px;
  line-height:1.45;
  white-space:pre-wrap;
  overflow:hidden;
  word-break:break-word;
}

.text-post-preview strong{
  display:block;
  font-size:.78em;
  opacity:.82;
}

.text-post-preview span{
  display:block;
}

.comment-input{
  display:flex;
  gap:10px;
  margin-top: 12px;
}

.comment-input input{
  flex:1;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--text);
  outline: none;
}

.comment-input input:focus{
  box-shadow: 0 0 0 4px rgba(96,165,250,.22);
  border-color: rgba(96,165,250,.40);
}

@media (max-width: 520px){
  .text-compose{
    grid-template-columns:1fr;
  }

  .text-tool-grid{
    grid-template-columns:1fr;
  }

  .text-compose__tools{
    padding:12px;
  }

  .text-post-preview{
    min-height:140px;
  }

  .comment-input{
    flex-direction: column;
  }
  .comment-input .reaction-btn{
    width: 100%;
    justify-content: center;
  }
}

.toast{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%) translateY(10px);
  z-index: 120;
  max-width: min(560px, calc(100vw - 28px));
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(10, 14, 28, .90);
  backdrop-filter: blur(18px);
  color: rgba(234,240,255,.92);
  box-shadow: 0 18px 70px rgba(0,0,0,.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast[data-variant="error"]{
  border-color: rgba(239,68,68,.28);
  background: rgba(25, 10, 14, .90);
}

.camera-preview{
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.18);
}

.camera-preview video{
  width: 100%;
  display:block;
  max-height: 420px;
  object-fit: cover;
}

.camera-actions{
  display:flex;
  gap:12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.feed-empty{
  color:var(--muted);
  padding:40px 0;
  text-align:center;
}

.admin-toggle{
  width:52px;
  height:52px;
  position: fixed;
  left: 18px;
  top: 120px;
  z-index: 75;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background: linear-gradient(135deg, rgba(28, 35, 77, .96), rgba(45, 106, 255, .95));
  color:#ffffff;
  border:1px solid rgba(255,255,255,.18);
  box-shadow: 0 20px 48px rgba(45, 106, 255,.22);
  padding:0;
  font-size:20px;
  font-weight:700;
  text-shadow: 0 2px 8px rgba(0,0,0,.18);
}

.admin-toggle:hover{
  transform: translateY(-1px);
  filter: saturate(1.1) brightness(1.08);
}

/* D�LE�IT�: na�e CSS nastavuje display pro .admin-toggle, t�m by p�ebilo [hidden].
   Proto explicitn� vynut�me skryt�. */
.admin-toggle[hidden]{
  display: none !important;
}

.admin-card{
  position: fixed;
  inset: 0 auto 0 0;
  width: min(360px, 92vw);
  height: 100vh;
  overflow-y: auto;
  padding: 32px 24px 24px;
  border-radius: 0 28px 28px 0;
  background: rgba(8, 14, 28, .96);
  border-right: 1px solid rgba(109,94,247,.24);
  backdrop-filter: blur(26px);
  box-shadow:
    16px 0 64px rgba(0,0,0,.32),
    0 0 0 1px rgba(109,94,247,.08);
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  visibility: hidden;
  transition: transform .28s ease, opacity .28s ease, visibility 0s linear .28s;
}

.admin-card.open{
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  transition-delay: 0s;
}

.admin-card::before{
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(96,165,250,.18), transparent 38%),
              radial-gradient(circle at 75% 10%, rgba(138,92,245,.14), transparent 28%);
  pointer-events: none;
}

.admin-card > *{ position: relative; z-index: 1; }

.admin-card-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.admin-card-header-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Admin panel: tla��tka trochu kompaktn�j�� a p�ehledn�j�� */
.admin-card .btn{
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: .1px;
  white-space: normal;
}

/* Pouze k��ek pro zav�en� admin panelu (neovliv�ovat ostatn� btn-tertiary jako "Vlastn� ban") */
.admin-card-header-actions #adminCloseButton{
  min-width: 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Admin panel � ak�n� tla��tka: nenechat je �huben�, a� je vid�t text */
.admin-user-actions{
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

/* Admin panel � ak�n� tla��tka: vlastn� �iteln� design (ban/wifi) */
.admin-user-actions .btn{
  /* p�eb�t "neon" a gradienty z glob�ln�ch tla��tek */
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  box-shadow: none !important;
  text-shadow: none !important;
  filter: none !important;

  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.15;
  letter-spacing: .2px;
  font-weight: 900;

  color: #EAF0FF !important;
  text-align: center;
  /* o trochu v�t�� ne� X (44px), ale celkov� kompaktn�j�� */
  min-height: 46px;
}

.admin-user-actions .btn::after{ display:none !important; }

.admin-user-actions .btn:hover,
.admin-user-actions .btn:active{
  transform: none !important;
  filter: none !important;
  box-shadow: 0 0 0 4px rgba(96,165,250,.18) !important;
}

/* Barevn� odli�en� akc� */
.admin-user-actions button[data-action="ban-24"]{
  background: rgba(239, 68, 68, .18) !important;
  border-color: rgba(239, 68, 68, .35) !important;
}

.admin-user-actions button[data-action="ban-7"]{
  background: rgba(245, 158, 11, .18) !important;
  border-color: rgba(245, 158, 11, .38) !important;
}

.admin-user-actions button[data-action="ban-custom"]{
  background: rgba(109, 94, 247, .18) !important;
  border-color: rgba(109, 94, 247, .38) !important;
}

.admin-user-actions button[data-action="wifi-user"]{
  background: rgba(34, 211, 238, .14) !important;
  border-color: rgba(34, 211, 238, .30) !important;
}

@media (max-width: 520px){
  .admin-user-actions{
    grid-template-columns: 1fr;
  }
  .admin-user-buttons{
    min-width: 0;
  }
}

.admin-card-header h2{
  margin:0 0 6px;
  font-size:22px;
}

.admin-settings-intro{
  margin:18px 0 12px;
  padding:18px;
  border-radius:22px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}

.admin-settings-intro h3{
  margin:0 0 10px;
  font-size:18px;
}

.admin-settings-intro p{
  margin:0 0 12px;
  color: var(--muted);
  line-height:1.6;
}

.admin-feature-list{
  margin:0;
  padding-left:20px;
  color: var(--muted);
  font-size:14px;
  line-height:1.6;
}

.admin-feature-list li{
  margin-bottom:8px;
}

.account-label{
  color: var(--muted);
  font-size:13px;
}

.admin-note{
  margin:0;
  color:var(--muted);
  font-size:14px;
  max-width:44ch;
}

.admin-section-title{
  margin:22px 0 14px;
  font-size:18px;
  font-weight:700;
  letter-spacing:.2px;
  color:#EAF0FF;
}

.admin-summary{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
  margin:18px 0;
  padding:16px;
  border-radius:18px;
  background: rgba(255,255,255,.04);
}

.admin-summary div{
  color:var(--muted);
  font-size:14px;
}

.admin-summary strong{
  display:block;
  margin-bottom:4px;
  font-size:18px;
  font-weight:700;
  color:var(--text);
}

.admin-user-list{
  display:grid;
  gap:14px;
}

.admin-user{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  padding:16px;
  border-radius:18px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12);
}

.admin-user-info{
  display:grid;
  gap:6px;
}

.admin-user-meta{
  display:grid;
  gap:8px;
  margin-top:14px;
  padding:14px;
  border-radius:18px;
  background: rgba(96,165,250,.08);
  border:1px solid rgba(96,165,250,.16);
  color: var(--muted);
  font-size:13px;
  line-height:1.45;
}

.admin-ban-history{
  margin-top:16px;
  padding:14px;
  border-radius:18px;
  background: rgba(99,102,241,.10);
  border:1px solid rgba(99,102,241,.18);
}

.ban-entry{
  display:grid;
  gap:4px;
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.ban-entry:last-child{
  border-bottom:none;
}

.admin-user-actions{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}

.admin-media-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:24px;
}

.admin-media-header h3{
  margin:0;
  font-size:18px;
}

.admin-media-summary{
  display:grid;
  gap:12px;
  margin:14px 0;
  padding:16px;
  border-radius:18px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12);
}

.admin-media-list{
  display:grid;
  gap:14px;
}

.admin-media-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  padding:16px;
  border-radius:18px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.12);
}

.admin-media-preview{
  display:grid;
  gap:10px;
}

.admin-media-preview img,
.admin-media-preview video {
  width:100%;
  border-radius:14px;
  object-fit:cover;
  max-height:180px;
}

.admin-media-meta{
  display:grid;
  gap:6px;
}

.admin-media-actions{
  display:flex;
  flex-direction:column;
  gap:10px;
  min-width:160px;
}

.admin-comments{
  grid-column:1 / -1;
  display:grid;
  gap:10px;
  padding:12px;
  border-radius:14px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.10);
}

.admin-comments > strong{
  font-size:14px;
}

.admin-comments--empty{
  color:var(--muted);
  font-weight:700;
}

.admin-comment-row{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:start;
  gap:12px;
  padding:10px;
  border-radius:12px;
  background:rgba(5,7,13,.34);
  border:1px solid rgba(255,255,255,.09);
}

.admin-comment-row__body{
  min-width:0;
  display:grid;
  gap:5px;
}

.admin-comment-row span{
  color:rgba(234,240,255,.9);
  font-weight:700;
  font-size:13px;
}

.admin-comment-row p{
  margin:0;
  color:var(--text);
  overflow-wrap:anywhere;
}

.admin-comment-row small{
  color:var(--muted);
}

.admin-comment-reactions{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.admin-comment-delete{
  min-width:116px;
  white-space:nowrap;
}

.admin-user-info span{
  display:block;
  color:var(--muted);
  font-size:13px;
}

.admin-user-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}

.badge.admin{ background: rgba(96,165,250,.16); color: #A5F3FC; }
.badge.creator{ background: rgba(245,158,11,.16); color: #FDE68A; }
.badge.blocked{ background: rgba(239,68,68,.16); color: #FCA5A5; }
.badge.active{ background: rgba(34,197,94,.16); color: #86EFAC; }

.admin-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.admin-user-buttons{
  display:flex;
  flex-direction:column;
  gap:12px;
  min-width:180px;
}

.admin-user-buttons .btn{
  width:100%;
}

.admin-user-buttons .btn-secondary{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.18);
  color:var(--text);
}

.admin-user-buttons .btn-secondary:hover{
  filter: brightness(1.05);
}

.admin-note,
.admin-user-info span{
  line-height:1.5;
}

.account-value{
  font-size:16px;
  font-weight:700;
}

.media-card{
  margin-top:20px;
  padding:20px;
  border-radius:22px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
}

.media-card h2{
  margin:0 0 14px;
  font-size:18px;
}

.media-form .field{
  margin-bottom:14px;
}

.media-list{
  display:grid;
  gap:14px;
  margin-top:18px;
}

.media-item{
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  overflow:hidden;
  background: rgba(255,255,255,.04);
}

.media-preview img,
.media-preview video{
  width:100%;
  display:block;
  aspect-ratio:16/9;
  object-fit:cover;
}

.media-meta{
  padding:14px;
}

.media-meta strong{
  display:block;
  margin-bottom:6px;
}

.media-reaction-summary{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.media-reaction-summary span,
.admin-comment-reactions span{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:30px;
  padding:5px 11px;
  border-radius:999px;
  background:rgba(255,255,255,.075);
  border:1px solid rgba(255,255,255,.14);
  color:rgba(234,240,255,.9);
  font-size:13px;
  font-weight:700;
}

.media-comments-preview{
  display:grid;
  gap:8px;
  margin-top:12px;
}

.media-comment-preview{
  display:grid;
  gap:3px;
  padding:9px 10px;
  border-radius:12px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,255,255,.10);
}

.media-comment-preview strong{
  margin:0;
  font-size:13px;
}

.media-comment-preview span{
  color:var(--muted);
  font-size:13px;
  overflow-wrap:anywhere;
}

.media-empty{
  color: var(--muted);
}

.footer{
  margin-top:18px;
  text-align:center;
  color: rgba(234,240,255,.55);
  font-size:13px;
}

.feed-reactions{
  display:flex;
  gap:8px;
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,.08);
  flex-wrap:wrap;
}

.reaction-btn{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:6px 12px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  color:var(--muted);
  cursor:pointer;
  transition:all .2s ease;
  font-size:.9rem;
  font-weight:600;
}

.reaction-btn:hover{
  background:rgba(255,255,255,.12);
  color:var(--text);
  transform:translateY(-1px);
}

.reaction-btn.active{
  background:rgba(96,165,250,.28);
  color:#60A5FA;
  border-color:rgba(96,165,250,.4);
}

.comments-section{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,.08);
}

.comment-item{
  padding:12px;
  margin-bottom:10px;
  background:rgba(255,255,255,.04);
  border-radius:12px;
  border:1px solid rgba(255,255,255,.06);
}

.comment-author{
  font-weight:700;
  color:var(--text);
  font-size:.95rem;
}

.comment-text{
  margin-top:4px;
  color:var(--muted);
  line-height:1.6;
}

.comment-time{
  margin-top:6px;
  color:rgba(234,240,255,.52);
  font-size:12px;
}

.comment-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.comment-input{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:10px;
  align-items:center;
  margin-top:14px;
}

.comment-input input{
  width:100%;
  min-height:42px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:14px;
  background:rgba(255,255,255,.07);
  color:var(--text);
  padding:10px 12px;
  outline:none;
}

.comment-input input:focus{
  border-color:rgba(20,184,166,.65);
  box-shadow:0 0 0 4px rgba(20,184,166,.14);
}

.comment-time{
  margin-top:6px;
  color:rgba(234,240,255,.5);
  font-size:.85rem;
}



.comment-actions{ display:flex; align-items:center; gap:8px; margin-top:10px; flex-wrap:wrap; }
.modal__panel--wide{ width:min(1280px, calc(100vw - 20px)); }
.modal__panel--chat{ overflow:hidden; }
.chat-modal-header{
  background:
    linear-gradient(135deg, rgba(20,184,166,.14), transparent 36%),
    linear-gradient(315deg, rgba(245,158,11,.10), transparent 42%);
}
.chat-shell{ display:grid; grid-template-columns:minmax(320px, 410px) minmax(0, 1fr); gap:18px; min-height:min(84vh, 860px); padding:16px; }
.chat-sidebar,.chat-panel{ border:1px solid rgba(255,255,255,.12); background:linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.035)); border-radius:18px; min-height:0; box-shadow:0 18px 60px rgba(0,0,0,.18) inset; }
.chat-sidebar{ padding:12px; display:flex; flex-direction:column; gap:10px; }
.chat-tabs{ display:flex; gap:6px; flex-wrap:wrap; }
.chat-list{ display:grid; gap:8px; overflow:auto; padding-right:2px; }
.chat-list-item{ width:100%; display:grid; grid-template-columns:44px 1fr auto; align-items:center; gap:11px; padding:11px; border:1px solid rgba(255,255,255,.10); background:rgba(255,255,255,.045); color:var(--text); border-radius:14px; cursor:pointer; text-align:left; }
.chat-list-item:hover,.chat-list-item.active{ background:rgba(255,255,255,.095); border-color:rgba(20,184,166,.30); }
.chat-list-item__text{ min-width:0; display:grid; gap:3px; }
.chat-list-item__text small{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--muted); }
.chat-unread{ min-width:24px; height:24px; display:inline-grid; place-items:center; border-radius:999px; background:#14B8A6; color:#041015; font-weight:900; font-size:12px; }
.chat-panel{ display:grid; grid-template-rows:1fr; overflow:hidden; }
.chat-panel__empty{ display:grid; place-items:center; color:var(--muted); padding:24px; text-align:center; }
.chat-panel__content{ min-height:0; display:grid; grid-template-rows:auto auto 1fr auto; }
.chat-header,.chat-request-bar{ display:flex; align-items:center; justify-content:space-between; gap:10px; padding:14px 16px; border-bottom:1px solid rgba(255,255,255,.10); }
.chat-call-actions{ display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.chat-back-btn{ display:none; }
.chat-btn__icon{ display:inline-block; }
.chat-btn__label{ display:inline-block; }
.chat-request-bar{ background:rgba(245,158,11,.10); }
.chat-messages{
  min-height:0;
  overflow:auto;
  padding:18px;
  display:flex;
  flex-direction:column;
  gap:12px;
  background:
    radial-gradient(circle at 20% 10%, rgba(20,184,166,.08), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(245,158,11,.055), transparent 28%);
}
.chat-message{ max-width:min(74%, 620px); padding:11px 13px; border-radius:16px; background:rgba(255,255,255,.075); border:1px solid rgba(255,255,255,.10); line-height:1.45; }
.chat-message.mine{ align-self:flex-end; background:linear-gradient(135deg, rgba(20,184,166,.32), rgba(79,70,229,.22)); }
.chat-message time{ display:block; margin-top:6px; font-size:11px; color:rgba(234,240,255,.58); }
.chat-attachments{ display:grid; gap:8px; margin-top:8px; }
.chat-attachments img,.chat-attachments video{ max-width:100%; max-height:260px; object-fit:contain; background:#05070d; border-radius:10px; }
.chat-composer{ position:relative; display:grid; grid-template-columns:auto 1fr auto; gap:9px; padding:12px; border-top:1px solid rgba(255,255,255,.10); background:rgba(5,7,13,.20); }
.chat-composer textarea{ resize:none; min-height:42px; max-height:120px; border-radius:14px; border:1px solid rgba(255,255,255,.14); background:rgba(255,255,255,.06); color:var(--text); padding:11px 12px; outline:none; }
.chat-send-button{ min-width:48px; padding-inline:16px; }
.chat-tools,.chat-emoji-panel{ position:absolute; bottom:64px; left:12px; z-index:3; display:grid; gap:6px; padding:10px; border-radius:14px; border:1px solid rgba(255,255,255,.14); background:rgba(8,14,28,.96); box-shadow:0 18px 60px rgba(0,0,0,.34); }
.chat-tools button,.chat-emoji-panel button{ border:0; border-radius:10px; padding:8px 10px; background:rgba(255,255,255,.08); color:var(--text); cursor:pointer; }
.chat-emoji-panel{ left:12px; right:auto; grid-template-columns:repeat(5, 34px); }
.chat-panel__content[hidden],
.chat-request-bar[hidden],
.chat-tools[hidden],
.chat-emoji-panel[hidden],
#chatAttachmentInput[hidden]{ display:none !important; }

.chat-media-popover{
  position:fixed;
  inset:0;
  z-index:220;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(3,7,18,.72);
  backdrop-filter:blur(14px);
}

.chat-media-card{
  width:min(720px, 100%);
  display:grid;
  gap:12px;
  padding:16px;
  border-radius:20px;
  border:1px solid rgba(255,255,255,.16);
  background:rgba(8,14,28,.96);
  box-shadow:0 28px 100px rgba(0,0,0,.42);
}

.chat-media-card__head,
.chat-media-card__actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.chat-media-card video{
  width:100%;
  max-height:62vh;
  object-fit:contain;
  background:#05070d;
  border-radius:16px;
}

.chat-recorder-preview{
  position:relative;
  background:#05070d;
  border-radius:16px;
  overflow:hidden;
}

.chat-record-timer{
  position:absolute;
  top:12px;
  right:12px;
  padding:8px 11px;
  border-radius:999px;
  background:rgba(239,68,68,.92);
  color:#fff;
  font-weight:900;
  box-shadow:0 12px 30px rgba(0,0,0,.35);
}

.chat-media-card--call{ width:min(560px, 100%); }
.chat-audio-call{
  min-height:160px;
  display:grid;
  place-items:center;
  border-radius:16px;
  background:linear-gradient(135deg, rgba(20,184,166,.22), rgba(79,70,229,.18));
  border:1px solid rgba(255,255,255,.12);
  color:var(--text);
  font-weight:800;
  text-align:center;
}
.chat-call-card{
  display:grid;
  grid-template-columns:42px minmax(0, 1fr) auto;
  align-items:center;
  gap:10px;
  padding:10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.12);
  background:rgba(5,7,13,.34);
}

.chat-call-card__icon{
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:linear-gradient(135deg, rgba(20,184,166,.28), rgba(79,70,229,.22));
}

.chat-call-card__body{
  min-width:0;
  display:grid;
  gap:2px;
}

.chat-call-card__body span{
  color:var(--muted);
  font-size:13px;
}

.chat-call-window{
  width:min(920px, 100%);
  display:grid;
  grid-template-rows:auto minmax(280px, 1fr) auto;
  gap:14px;
  padding:18px;
  border-radius:24px;
  background:linear-gradient(180deg, rgba(10,16,32,.96), rgba(5,7,13,.98));
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 34px 120px rgba(0,0,0,.52);
}

.chat-call-topbar,
.chat-call-controls{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}

.chat-call-user{
  display:flex;
  align-items:center;
  gap:12px;
}

.chat-call-user span,
.chat-call-state{
  color:var(--muted);
  font-size:13px;
}

.chat-call-state{
  padding:7px 11px;
  border-radius:999px;
  background:rgba(20,184,166,.12);
  border:1px solid rgba(20,184,166,.24);
}

.chat-call-stage{
  position:relative;
  display:grid;
  place-items:center;
  overflow:hidden;
  min-height:320px;
  border-radius:22px;
  background:
    radial-gradient(circle at 24% 18%, rgba(20,184,166,.18), transparent 34%),
    radial-gradient(circle at 76% 70%, rgba(245,158,11,.12), transparent 34%),
    #05070d;
  border:1px solid rgba(255,255,255,.10);
}

.chat-call-video{
  width:100%;
  height:100%;
  max-height:64vh;
  object-fit:contain;
  background:#05070d;
}

.modal__panel:has(.chat-shell){
  overflow:hidden;
}

.chat-shell{
  grid-template-columns:minmax(280px, 360px) minmax(0, 1fr);
  gap:0;
  padding:0;
  min-height:min(84vh, 820px);
  background:rgba(5,7,13,.22);
}

.chat-sidebar,
.chat-panel{
  border:0;
  border-radius:0;
  box-shadow:none;
  background:rgba(255,255,255,.035);
}

.chat-sidebar{
  border-right:1px solid rgba(255,255,255,.10);
  padding:14px;
}

.chat-tabs{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  padding:4px;
  border-radius:10px;
  background:rgba(5,7,13,.34);
}

.chat-tabs .reaction-btn{
  min-height:36px;
  justify-content:center;
  border-radius:8px;
}

.chat-list-item{
  grid-template-columns:42px minmax(0, 1fr) auto;
  border-radius:10px;
  background:transparent;
}

.chat-list-item:hover,
.chat-list-item.active{
  background:rgba(20,184,166,.12);
  border-color:rgba(20,184,166,.32);
}

.chat-header,
.chat-request-bar{
  padding:12px 14px;
  background:rgba(5,7,13,.18);
}

.chat-messages{
  padding:18px 20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.01)),
    rgba(5,7,13,.14);
}

.chat-message{
  max-width:min(70%, 620px);
  border-radius:14px 14px 14px 4px;
  background:rgba(255,255,255,.078);
  box-shadow:0 12px 34px rgba(0,0,0,.16);
}

.chat-message.mine{
  border-radius:14px 14px 4px 14px;
  background:linear-gradient(135deg, rgba(20,184,166,.36), rgba(59,130,246,.22));
  border-color:rgba(20,184,166,.30);
}

.chat-composer{
  grid-template-columns:auto minmax(0, 1fr) auto auto;
  padding:12px 14px;
  background:rgba(5,7,13,.34);
}

.chat-composer textarea{
  border-radius:10px;
  min-height:44px;
  background:rgba(255,255,255,.085);
}

.chat-tools,
.chat-emoji-panel{
  border-radius:10px;
}

@media (max-width: 760px){
  .chat-shell{
    grid-template-columns:1fr;
  }
  .chat-sidebar{
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.10);
    max-height:36vh;
  }
  .chat-message{
    max-width:86%;
  }
  .chat-composer{
    grid-template-columns:auto minmax(0, 1fr) auto;
  }
  .chat-composer .btn[type="submit"]{
    grid-column:3;
  }
}

/* Final public-live layout override: keep the broadcaster camera tall and controls layered. */
.live-public-player{
  width:min(1040px, calc(100vw - 20px));
}

.live-public-player__body{
  grid-template-columns:minmax(320px, 430px) minmax(300px, 400px);
  align-items:start;
  justify-content:center;
}

.live-public-phone{
  position:relative;
  display:block;
  width:min(430px, 100%);
  aspect-ratio:9 / 16;
  max-height:min(78vh, 780px);
  overflow:hidden;
  border-radius:24px;
}

.live-public-phone__video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  min-height:0;
  object-fit:cover;
  border-radius:0;
}

.live-public-phone .live-video-status{
  position:absolute;
  left:16px;
  right:72px;
  bottom:76px;
  margin:0;
  max-height:96px;
  overflow:auto;
  text-align:left;
}

.live-public-phone__quick{
  position:absolute;
  left:12px;
  right:12px;
  bottom:12px;
  z-index:8;
  display:grid;
  grid-template-columns:minmax(0, 1fr) minmax(74px, .7fr) 44px;
  gap:8px;
}

.live-public-phone__bottom{
  position:absolute;
  left:auto;
  right:12px;
  bottom:68px;
  width:54px;
  margin:0;
  display:grid;
  grid-template-columns:1fr;
  padding:8px;
  border-radius:18px;
}

.live-public-phone__bottom[hidden]{
  display:none !important;
}

.live-public-phone__bottom .reaction-btn{
  width:38px;
  min-height:38px;
  padding:0;
}

.live-chat--public{
  min-height:min(78vh, 780px);
}

.live-chat--public .live-chat__list{
  max-height:none;
}

@media (max-width:820px){
  .live-public-player{
    width:min(460px, calc(100vw - 12px));
    max-height:calc(100dvh - 12px);
    overflow:auto;
  }

  .live-public-player__body{
    grid-template-columns:1fr;
    gap:10px;
    padding:8px;
  }

  .live-public-phone{
    width:100%;
    max-height:none;
    aspect-ratio:9 / 16;
    margin:0 auto;
  }

  .live-chat--public{
    min-height:0;
    max-height:38dvh;
    overflow:hidden;
  }

  .live-chat--public .live-chat__list{
    min-height:120px;
    max-height:22dvh;
  }
}

.chat-call-local-video{
  position:absolute;
  right:16px;
  bottom:16px;
  width:min(210px, 34%);
  aspect-ratio:16 / 9;
  object-fit:cover;
  border-radius:16px;
  border:2px solid rgba(255,255,255,.55);
  background:#05070d;
  box-shadow:0 18px 50px rgba(0,0,0,.45);
  z-index:2;
}

.chat-call-avatar{
  display:grid;
  place-items:center;
  gap:10px;
  text-align:center;
  z-index:1;
}

.chat-call-avatar .user-row__avatar{
  width:112px;
  height:112px;
  box-shadow:0 0 0 12px rgba(20,184,166,.10);
}

.chat-call-avatar span{
  color:var(--muted);
}

.chat-call-wave{
  position:absolute;
  inset:auto 0 24px;
  display:flex;
  align-items:end;
  justify-content:center;
  gap:8px;
  pointer-events:none;
}

.chat-call-wave span{
  width:8px;
  height:24px;
  border-radius:999px;
  background:linear-gradient(180deg, #14B8A6, #F59E0B);
  animation:chatWave 1.15s ease-in-out infinite;
}

.chat-call-wave span:nth-child(2){ animation-delay:.12s; height:38px; }
.chat-call-wave span:nth-child(3){ animation-delay:.24s; height:30px; }
.chat-call-wave span:nth-child(4){ animation-delay:.36s; height:46px; }

@keyframes chatWave{
  0%,100%{ transform:scaleY(.42); opacity:.55; }
  50%{ transform:scaleY(1); opacity:1; }
}

.chat-incoming-call{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:260;
  width:min(420px, calc(100vw - 28px));
  display:grid;
  grid-template-columns:64px minmax(0, 1fr);
  gap:12px;
  padding:14px;
  border-radius:20px;
  background:linear-gradient(145deg, rgba(10,16,32,.98), rgba(5,7,13,.96));
  border:1px solid rgba(255,255,255,.18);
  box-shadow:0 28px 90px rgba(0,0,0,.46);
  animation:incomingCallPop .22s ease-out both;
}

.chat-incoming-call__avatar{
  width:64px;
  height:64px;
  border-radius:18px;
  background:rgba(255,255,255,.08) center/cover no-repeat;
  box-shadow:0 0 0 8px rgba(20,184,166,.10);
}

.chat-incoming-call__body{
  min-width:0;
  display:grid;
  gap:3px;
}

.chat-incoming-call__body span,
.chat-incoming-call__body small{
  color:var(--muted);
}

.chat-incoming-call__actions{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}

.chat-gallery{
  width:min(980px, 100%);
  max-height:min(84vh, 820px);
  display:grid;
  grid-template-rows:auto 1fr;
  gap:14px;
  padding:16px;
  border-radius:22px;
  background:rgba(8,14,28,.97);
  border:1px solid rgba(255,255,255,.16);
  box-shadow:0 28px 100px rgba(0,0,0,.45);
}

.chat-gallery-grid{
  min-height:0;
  overflow:auto;
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(170px, 1fr));
  gap:12px;
}

.chat-gallery-item{
  position:relative;
  display:grid;
  gap:8px;
  padding:8px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  background:rgba(255,255,255,.055);
  color:var(--text);
  cursor:pointer;
  text-align:left;
}

.chat-gallery-item:hover{
  border-color:rgba(20,184,166,.34);
  background:rgba(255,255,255,.09);
}

.chat-gallery-item img,
.chat-gallery-item video{
  width:100%;
  aspect-ratio:1;
  object-fit:cover;
  border-radius:12px;
  background:#05070d;
}

.chat-gallery-item span{
  position:absolute;
  left:16px;
  top:16px;
  padding:5px 8px;
  border-radius:999px;
  background:rgba(0,0,0,.58);
  font-size:12px;
  font-weight:800;
}

.chat-gallery-item small{
  color:var(--muted);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.chat-gallery-viewer__card{
  position:relative;
  width:min(980px, 100%);
  display:grid;
  gap:12px;
  padding:16px;
  border-radius:22px;
  background:rgba(8,14,28,.98);
  border:1px solid rgba(255,255,255,.16);
}

.chat-gallery-viewer__card img,
.chat-gallery-viewer__card video{
  width:100%;
  max-height:76vh;
  object-fit:contain;
  border-radius:16px;
  background:#05070d;
}

@keyframes incomingCallPop{
  from{ transform:translateY(12px) scale(.98); opacity:0; }
  to{ transform:translateY(0) scale(1); opacity:1; }
}

@media (max-width: 820px){
  /* =========================================================
     Mobilní chat – profesionální layout (Messenger style)
     Cíl: nic se nepřekrývá, všechny funkce vidět, žádné "zmizelé" zprávy.
     ========================================================= */

  /* Fullscreen panel pro chat modal */
  .modal__panel--wide.modal__panel--chat{
    width:100vw;
    max-width:100vw;
    height:100vh;   /* fallback */
    height:100svh;  /* správně s browser UI */
    height:100dvh;  /* moderní prohlížeče */
    max-height:100dvh;
    border-radius:0 !important;
    padding:0 !important;
    display:flex;
    flex-direction:column;
    overflow:hidden;
  }
  .modal__panel--chat .modal__header{ flex:0 0 auto; }
  .modal__panel--chat .modal__body{ flex:1 1 auto; min-height:0; padding:0; }

  /* "Pages" slider: seznam ↔ konverzace (bez absolute positioning) */
  #chatsModal .chat-shell{
    display:flex !important;
    width:200%;
    height:100%;
    min-height:0;
    padding:0;
    gap:0;
    overflow:hidden;
    transform:translateX(0);
    transition:transform .22s ease;
  }
  #chatsModal.chat-mobile-thread .chat-shell{ transform:translateX(-50%); }

  #chatsModal .chat-sidebar,
  #chatsModal .chat-panel{
    position:relative;
    flex:0 0 50%;
    width:50%;
    height:100%;
    min-height:0;
    border-radius:0;
    border:0;
    background:transparent;
  }

  /* Sidebar (seznam) */
  #chatsModal .chat-sidebar{
    padding:12px;
    display:flex;
    flex-direction:column;
    gap:10px;
  }
  #chatsModal .chat-tabs{ display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:8px; }
  #chatsModal .chat-tab-btn{ width:100%; display:flex; gap:8px; align-items:center; justify-content:center; padding:10px 10px; }
  #chatsModal .chat-tab-btn .chat-btn__label{ font-size:13px; }
  #chatsModal .chat-list{ flex:1 1 auto; min-height:0; overflow:auto; padding-right:2px; }
  #chatsModal .chat-list-item{ padding:12px; }
  #chatsModal .chat-list-item__text strong{ font-size:14px; }
  #chatsModal .chat-list-item__text small{ font-size:12px; }

  /* Konverzace */
  #chatsModal .chat-panel{ display:flex; flex-direction:column; }
  #chatsModal .chat-panel__empty{ display:none; }
  #chatsModal #chatContent{
    display:flex;
    flex-direction:column;
    height:100%;
    min-height:0;
  }

  /* Header */
  #chatsModal .chat-header{
    flex:0 0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    padding:10px 12px;
    border-bottom:1px solid rgba(226,232,240,.12);
    background:rgba(6,10,18,.92);
    backdrop-filter:blur(10px);
  }
  #chatsModal .chat-back-btn{
    display:inline-flex !important;
    width:38px;
    height:38px;
    padding:0;
    border-radius:12px;
  }
  #chatsModal .chat-header .user-row__left{ gap:10px; min-width:0; }
  #chatsModal .chat-header .user-row__name strong{ font-size:15px; }
  #chatsModal .chat-header .user-row__name span{ font-size:12px; }

  /* Akce vpravo – ikonové kruhy */
  #chatsModal .chat-call-actions{ gap:8px; flex-wrap:nowrap; }
  #chatsModal .chat-action-btn{
    width:38px;
    height:38px;
    padding:0;
    border-radius:999px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(226,232,240,.16);
    background:rgba(11,17,30,.40);
  }
  #chatsModal .chat-action-btn .chat-btn__label{ display:none; }

  /* Zprávy – vždy scrollovatelné, nikdy pod kompozitorem */
  #chatsModal .chat-messages{
    flex:1 1 auto;
    min-height:0;
    overflow:auto;
    -webkit-overflow-scrolling:touch;
    padding:12px 12px calc(14px + 64px + env(safe-area-inset-bottom, 0px));
  }
  #chatsModal .chat-message{ max-width:92%; }

  /* Kompozitor – fixní dole, malé, všechny funkce vidět */
  #chatsModal .chat-composer{
    flex:0 0 auto;
    position:sticky;
    bottom:0;
    z-index:6;
    display:grid;
    grid-template-columns:38px minmax(0, 1fr) 46px;
    gap:8px;
    padding:8px 10px;
    padding-bottom:calc(8px + env(safe-area-inset-bottom, 0px));
    border-top:1px solid rgba(226,232,240,.12);
    background:rgba(6,10,18,.95);
    backdrop-filter:blur(10px);
  }
  #chatsModal .chat-composer textarea{
    min-height:38px;
    max-height:84px;
    padding:9px 10px;
  }
  #chatsModal .chat-composer .reaction-btn{
    width:38px;
    height:38px;
    padding:0;
    border-radius:14px;
    display:grid;
    place-items:center;
  }
  #chatsModal .chat-send-button{
    min-width:46px;
    min-height:38px;
    padding-inline:12px;
    border-radius:14px;
  }

  /* Emoji / tools panely ať nelezou mimo displej */
  #chatsModal .chat-tools,
  #chatsModal .chat-emoji-panel{
    bottom:64px;
    left:10px;
    right:10px;
    width:auto;
    max-width:none;
  }
  #chatsModal .chat-emoji-panel{ grid-template-columns:repeat(8, minmax(0, 1fr)); }
}

/* === 2026 polish + video performance pass === */
:root{
  --surface: rgba(9, 13, 28, .72);
  --surface-strong: rgba(12, 18, 36, .86);
  --line: rgba(255,255,255,.14);
  --accent:#14B8A6;
  --accent-warm:#F59E0B;
}

body{
  background:#070A12;
}

body::before{
  opacity:.22;
  filter: blur(22px) saturate(130%);
  animation-duration: 28s;
}

body > img.logo{
  position:relative;
  z-index:3;
  width:clamp(72px, 9vw, 112px);
  height:auto;
  display:block;
  margin:22px auto -8px;
  padding:0;
  border:0;
  border-radius:14px;
  background:transparent;
  object-fit:contain;
  filter: drop-shadow(0 18px 36px rgba(0,0,0,.24));
}

.header .logo,
.feed-hero .logo,
.card .logo:not(img){
  width:auto;
  height:auto;
  display:inline-flex;
  margin:0 0 14px;
  padding:9px 13px;
  border-radius:999px;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.live-block,
.live-public,
.admin-card{
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 26px 90px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.04) inset;
}

.card{
  border-radius:16px;
  backdrop-filter: blur(18px) saturate(150%);
}

.card::before{ opacity:.55; }
.card::after{ opacity:.55; }

.feed-card{ width:min(1040px, 100%); }
.feed-hero__left{ min-width:0; }
.feed-hero img.logo{ flex:0 0 auto; }
.feed-actions .btn,
.media-form-tabs .tab-btn{ min-height:42px; }

.btn{
  border-radius:12px;
  min-height:46px;
  box-shadow:none;
}

.btn-primary{
  background: linear-gradient(135deg, #4F46E5, #14B8A6);
  border-color: rgba(20,184,166,.55);
}

.btn-secondary{
  background: rgba(255,255,255,.075);
  border-color: rgba(255,255,255,.16);
}

.btn-tertiary{
  background: linear-gradient(135deg, rgba(245,158,11,.92), rgba(239,68,68,.76));
  border-color: rgba(245,158,11,.50);
}

.feed-list,
.media-list,
.admin-media-list{
  content-visibility:auto;
  contain-intrinsic-size: 900px;
}

.feed-item{
  contain: layout paint style;
  border-radius:16px;
}

.feed-preview,
.media-preview,
.admin-media-preview{
  background:#05070d;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  overflow:hidden;
}

.feed-preview img,
.feed-preview video,
.media-preview img,
.media-preview video,
.admin-media-preview img,
.admin-media-preview video{
  width:100%;
  aspect-ratio:16/9;
  max-height:min(68vh, 560px);
  object-fit:contain;
  background:#05070d;
}

.video-player{
  display:block;
  transform:translateZ(0);
  will-change:auto;
}

.video-player--short{
  aspect-ratio:9/16 !important;
  max-height:min(76vh, 680px) !important;
  width:min(100%, 430px) !important;
  margin-inline:auto;
}

.static-object-bg #three-canvas,
#three-canvas{
  display:none !important;
}

.bg-svg [class^="float-"],
.bg-svg [class*=" float-"]{
  transform-box:fill-box;
  transform-origin:center;
}

.bg-svg .float-1{ animation:bgFloatA 18s ease-in-out infinite; }
.bg-svg .float-2{ animation:bgFloatB 24s ease-in-out infinite; }
.bg-svg .float-3{ animation:bgFloatC 30s ease-in-out infinite; }
.bg-svg .float-4{ animation:bgFloatD 36s ease-in-out infinite; }

.bg-svg .glass-shells,
.bg-svg .glass-prisms{
  opacity:.72;
}

.bg-svg .glass-lines{
  opacity:.34;
}

.bg-svg .glass-dust{
  opacity:.34;
}

.bg-svg .glass-shells *,
.bg-svg .glass-prisms *{
  vector-effect:non-scaling-stroke;
}

.video-active body::before{
  animation-play-state:paused;
  opacity:.10;
  filter:blur(14px) saturate(110%);
}

.video-active .bg-svg [class^="float-"],
.video-active .bg-svg [class*=" float-"]{
  animation-play-state:paused;
}

.video-active .bg-svg .glass-dust{
  opacity:.06;
}

.video-active .bg-svg .glass-shells,
.video-active .bg-svg .glass-prisms,
.video-active .bg-svg .glass-lines{
  opacity:.22;
}

@keyframes bgFloatA{
  0%,100%{ transform:translate3d(0,0,0) rotate(0deg); }
  50%{ transform:translate3d(18px,-16px,0) rotate(2deg); }
}

@keyframes bgFloatB{
  0%,100%{ transform:translate3d(0,0,0) rotate(0deg); }
  50%{ transform:translate3d(-16px,14px,0) rotate(-2deg); }
}

@keyframes bgFloatC{
  0%,100%{ transform:translate3d(0,0,0) scale(1); }
  50%{ transform:translate3d(10px,18px,0) scale(1.025); }
}

@keyframes bgFloatD{
  0%,100%{ transform:translate3d(0,0,0) rotate(0deg); }
  50%{ transform:translate3d(-20px,-10px,0) rotate(1.5deg); }
}

.live-video,
.camera-preview video{
  transform:translateZ(0);
  background:#05070d;
}

.profile-cover{
  border-radius:16px;
  background:
    linear-gradient(135deg, rgba(20,184,166,.18), transparent 45%),
    linear-gradient(315deg, rgba(245,158,11,.12), transparent 48%),
    rgba(255,255,255,.035);
}

.profile-avatar{ width:132px; height:132px; }

.account-body{
  min-height:100vh;
}

.app-quicknav{
  position:relative;
  z-index:92;
  width:min(1120px, calc(100% - 32px));
  margin:18px auto 0;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:22px;
}

.app-quicknav__group{
  display:grid;
  gap:12px;
}

.app-quicknav__group--main{
  grid-template-columns:repeat(3, minmax(150px, auto));
}

.app-nav-btn{
  min-width:150px;
  justify-content:center;
  border-radius:14px;
}

.feed-quicknav .app-quicknav__group--main{
  grid-template-columns:repeat(2, minmax(150px, auto));
}

.user-quicknav{
  width:min(980px, calc(100% - 32px));
}

.app-page{
  place-items:start center;
  padding-top:26px;
}

.account-page{
  place-items:start center;
  padding-top:26px;
}

.account-card{
  width:min(1120px, 100%);
  display:grid;
  gap:22px;
}

.account-header{
  margin-bottom:0;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.10);
}

.account-title-lockup{
  width:100%;
}

.account-title-lockup h1{
  margin-bottom:8px;
}

.account-title-lockup p{
  max-width:680px;
}

.account-panel{
  margin:0;
  padding:14px 16px;
  border-radius:14px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.10);
}

.account-summary{
  display:grid;
  gap:4px;
}

.account-value{
  margin:0;
}

.profile-card{
  display:grid;
  grid-template-columns:minmax(0, 1.25fr) minmax(280px, .75fr);
  gap:22px;
  padding:22px;
  border-radius:16px;
}

.profile-hero{
  margin-bottom:0;
}

.profile-cover{
  min-height:240px;
}

.cover-placeholder{
  min-height:240px;
}

.cover-upload{
  margin-top:0;
}

.profile-meta{
  align-items:center;
  padding:0 4px;
}

.profile-card--view{
  /* Na read-only profilu nechceme 2-sloupcový layout (ten je pro edit panel).
     Jinak zůstává prázdný pravý sloupec a profil vypadá zbytečně úzký. */
  grid-template-columns: 1fr;
}

.profile-card--view .profile-cover{
  /* Větší a čistší cover */
  position:relative;
  min-height: 320px;
  aspect-ratio: 16 / 9;
  background:#05070d;
  border-radius:22px;
  overflow:hidden;
}

.profile-card--view .profile-cover video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  background:#05070d;
}

/* Pokud je cover video na výšku, raději ho nezkracuj – vycentruj a "contain". */
.profile-card--view .profile-cover.is-portrait video{
  object-fit:contain;
}

.profile-card--view .cover-placeholder{
  min-height: unset;
  height: 100%;
  display:grid;
  place-items:center;
  padding:18px;
}

/* Mobil: u cover videa preferuj "contain", aby nebylo uříznuté (často portrait videa). */
@media (max-width: 520px){
  .profile-card--view .profile-cover{
    aspect-ratio:auto;
    min-height: 240px;
    height: min(52vh, 460px);
  }
  .profile-card--view .profile-cover video{
    object-fit:contain;
    object-position:center;
  }
}

@media (max-width: 820px){
  .profile-card--view .profile-meta{
    flex-direction:column;
    align-items:center;
    text-align:center;
  }
  .profile-card--view .profile-summary{
    width:100%;
  }
}

.profile-summary .label{
  letter-spacing:.08em;
}

.profile-stats{
  display:flex;
  gap:14px;
  align-items:center;
  flex-wrap:wrap;
  margin:10px 0;
  color:rgba(234,240,255,.68);
  font-size:14px;
}

.profile-edit-panel{
  align-self:stretch;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:14px;
  padding:18px;
  border-radius:14px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.10);
}

.profile-edit-panel .field{
  margin:0;
}

.account-form-actions{
  justify-content:flex-end;
  padding:0;
  margin-top:auto;
}

.media-card--composer{
  padding:22px;
  border-radius:16px;
}

.account-section-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
}

.account-section-head h2{
  margin:0 0 6px;
}

.media-form-tabs--comfortable{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
  padding:6px;
  border-radius:14px;
  background:rgba(255,255,255,.045);
  border:1px solid rgba(255,255,255,.10);
}

.media-form-tabs--comfortable .tab-btn{
  width:100%;
  border-radius:10px;
  white-space:normal;
  text-align:center;
}

.media-form{
  max-width:760px;
}

.text-compose{
  max-width:none;
}

@media (max-width: 720px){
  .page{ padding:94px 12px 18px; place-items:start center; }
  .card,.feed-card{ padding:18px; }
  .feed-hero,.profile-meta{ align-items:flex-start; }
  .feed-hero__left{ flex-direction:column; gap:12px !important; }
  .feed-corner{ max-width:calc(50vw - 16px); white-space:normal; line-height:1.15; }
  .feed-preview img,.feed-preview video{ max-height:62vh; }
  .profile-avatar{ width:104px; height:104px; }
  .admin-media-item{ grid-template-columns:1fr; }
  .admin-media-actions{ flex-direction:row; flex-wrap:wrap; min-width:0; }
  .admin-comment-row{ grid-template-columns:1fr; }
  .admin-comment-delete{ width:max-content; }
  .app-quicknav{
    width:calc(100% - 24px);
    margin-top:12px;
    flex-direction:column;
    gap:12px;
  }
  .app-quicknav__group,
  .app-quicknav__group--main,
  .feed-quicknav .app-quicknav__group--main{
    width:100%;
    grid-template-columns:1fr;
    gap:10px;
  }
  .app-nav-btn{
    width:100%;
    min-width:0;
  }
  .app-page{ padding-top:18px; }
  .account-page{ padding-top:18px; }
  .account-card{ gap:16px; }
  .profile-card{ grid-template-columns:1fr; padding:16px; }
  .profile-cover,
  .cover-placeholder{ min-height:180px; }
  .profile-meta{ flex-direction:column; }
  .profile-summary{ width:100%; }
  .media-form-tabs--comfortable{ grid-template-columns:1fr 1fr; }
  .comment-input{ grid-template-columns:1fr; }
  .comment-input .reaction-btn{ justify-content:center; width:100%; }
}

@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
  }
  #three-canvas{ display:none !important; }
}

/* ===== Professional UI refresh ===== */
:root{
  --surface-strong: rgba(9, 14, 28, .82);
  --surface-soft: rgba(255,255,255,.055);
  --line-strong: rgba(255,255,255,.18);
  --accent: #14B8A6;
  --accent-2: #4F46E5;
  --warn: #F59E0B;
}

html[data-theme="contrast"]{
  --surface: rgba(5, 7, 13, .92);
  --surface-strong: rgba(3, 7, 18, .96);
  --muted: rgba(234,240,255,.82);
  --line: rgba(255,255,255,.24);
}

html[data-theme="calm"]{
  --surface: rgba(10, 18, 24, .78);
  --surface-strong: rgba(8, 16, 22, .86);
  --accent: #2DD4BF;
  --accent-2: #38BDF8;
}

html[data-density="compact"] .card,
html[data-density="compact"] .feed-card,
html[data-density="compact"] .profile-card,
html[data-density="compact"] .media-card,
html[data-density="compact"] .modal__body{
  padding:16px;
}

html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after{
  animation-duration:.01ms !important;
  animation-iteration-count:1 !important;
  transition-duration:.01ms !important;
  scroll-behavior:auto !important;
}

body::after{
  background:
    radial-gradient(900px 560px at 82% 0%, rgba(20,184,166,.20), transparent 60%),
    radial-gradient(760px 500px at 10% 10%, rgba(79,70,229,.18), transparent 55%),
    linear-gradient(135deg, rgba(255,255,255,.045) 0 1px, transparent 1px 44px),
    linear-gradient(225deg, rgba(255,255,255,.035) 0 1px, transparent 1px 52px),
    linear-gradient(180deg, #060912 0%, #0A1020 48%, #08131B 100%);
}

body::before{
  opacity:.22;
  filter: blur(44px) saturate(135%);
}

.bg-svg{
  opacity:.72;
  filter: saturate(1.05) contrast(1.02);
}

.btn,
.reaction-btn,
.tab-btn{
  border-radius:12px;
  letter-spacing:0;
  box-shadow:0 10px 28px rgba(0,0,0,.16);
}

.btn{
  min-height:44px;
  width:auto;
  padding:12px 16px;
}

.btn-primary{
  background:linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color:rgba(45,212,191,.54);
}

.btn-secondary{
  background:rgba(255,255,255,.075);
  border-color:rgba(255,255,255,.18);
}

.btn-tertiary{
  background:linear-gradient(135deg, rgba(245,158,11,.94), rgba(239,68,68,.82));
  border-color:rgba(245,158,11,.45);
}

.btn:hover,
.reaction-btn:hover,
.tab-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 42px rgba(0,0,0,.24), 0 0 0 1px rgba(255,255,255,.08) inset;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.modal__panel,
.chat-sidebar,
.chat-panel{
  background:
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.04)),
    var(--surface-strong);
  border:1px solid var(--line-strong);
  border-radius:18px;
}

.app-quicknav{
  padding:10px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:18px;
  background:rgba(5,7,13,.44);
  backdrop-filter:blur(18px) saturate(145%);
  box-shadow:0 18px 80px rgba(0,0,0,.24);
}

.app-quicknav__group{
  align-items:stretch;
}

.app-nav-btn{
  min-width:160px;
}

.field__input,
.feed-search,
.chat-composer textarea{
  background:rgba(255,255,255,.075);
  border-color:rgba(255,255,255,.16);
  box-shadow:0 0 0 1px rgba(255,255,255,.035) inset;
}

.field__input:focus,
.feed-search:focus-within,
.chat-composer textarea:focus{
  border-color:rgba(45,212,191,.68);
  box-shadow:0 0 0 4px rgba(20,184,166,.14);
}

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

.settings-toggle-card{
  display:grid;
  grid-template-columns:auto minmax(0, 1fr);
  gap:12px;
  align-items:flex-start;
  padding:14px;
  border-radius:14px;
  background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}

.settings-toggle-card input{
  margin-top:4px;
}

.settings-toggle-card span{
  display:grid;
  gap:3px;
}

.settings-toggle-card small{
  color:var(--muted);
  line-height:1.45;
}

.settings-grid-form .modal__footer{
  grid-column:1 / -1;
  padding:0;
}

.chat-shell{
  grid-template-columns:minmax(280px, 380px) minmax(0, 1fr);
  gap:14px;
}

.chat-modal-header{
  border-bottom:1px solid rgba(255,255,255,.12);
}

.chat-list-item{
  border-radius:12px;
  transition:transform .15s ease, border-color .15s ease, background .15s ease;
}

.chat-list-item:hover{
  transform:translateY(-1px);
}

.chat-message{
  border-radius:16px 16px 16px 6px;
}

.chat-message.mine{
  border-radius:16px 16px 6px 16px;
}

.chat-compose-stack{
  min-width:0;
  display:grid;
  gap:8px;
}

.chat-quick-replies{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.chat-quick-replies[hidden]{
  display:none !important;
}

.chat-quick-replies button,
.chat-attachment-chip button{
  border:1px solid rgba(255,255,255,.14);
  background:rgba(255,255,255,.08);
  color:var(--text);
  border-radius:999px;
  padding:7px 10px;
  cursor:pointer;
  font-weight:700;
}

.chat-attachment-chip{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  background:rgba(20,184,166,.13);
  border:1px solid rgba(20,184,166,.25);
  color:rgba(234,240,255,.92);
  font-size:13px;
}

.chat-attachment-chip[hidden]{
  display:none !important;
}

.chat-attachment-chip button{
  width:28px;
  height:28px;
  padding:0;
  display:grid;
  place-items:center;
}

@media (max-width: 820px){
  .settings-grid-form{
    grid-template-columns:1fr;
  }
  .chat-shell{
    grid-template-columns:1fr;
  }
  .chat-sidebar{
    min-height:260px;
  }
  .chat-message{
    max-width:92%;
  }
}

/* ===== Anuk professional refinement: toned down, no grid, mature product UI ===== */
:root{
  --pro-bg:#070A12;
  --pro-bg-2:#0B111D;
  --pro-panel:rgba(12, 18, 32, .78);
  --pro-panel-strong:rgba(14, 21, 36, .88);
  --pro-line:rgba(226,232,240,.14);
  --pro-line-strong:rgba(226,232,240,.22);
  --pro-text:#EEF4FF;
  --pro-muted:rgba(226,232,240,.72);
  --pro-accent:#2DD4BF;
  --pro-accent-2:#8B5CF6;
  --pro-danger:#F97373;
  --pro-warn:#F5B84B;
}

body{
  color:var(--pro-text);
  background:
    radial-gradient(860px 560px at 82% 4%, rgba(45,212,191,.16), transparent 62%),
    radial-gradient(760px 520px at 8% 12%, rgba(139,92,246,.14), transparent 58%),
    radial-gradient(860px 560px at 52% 92%, rgba(245,184,75,.08), transparent 64%),
    linear-gradient(180deg, var(--pro-bg) 0%, var(--pro-bg-2) 54%, #08111A 100%);
}

body::after{
  background:
    radial-gradient(900px 560px at 82% 0%, rgba(45,212,191,.14), transparent 62%),
    radial-gradient(760px 500px at 10% 10%, rgba(139,92,246,.12), transparent 58%),
    radial-gradient(820px 560px at 52% 86%, rgba(245,184,75,.07), transparent 66%),
    linear-gradient(180deg, #070A12 0%, #0B1020 54%, #08131B 100%);
  background-size:auto;
  opacity:1;
}

body::before{
  inset:-18%;
  background:
    radial-gradient(620px 360px at 24% 22%, rgba(139,92,246,.18), transparent 68%),
    radial-gradient(720px 420px at 80% 16%, rgba(45,212,191,.16), transparent 70%);
  filter:blur(46px) saturate(120%);
  opacity:.42;
  animation:gradientShift 18s ease-in-out infinite;
}

.bg::before,
.bg::after{
  display:none !important;
}

.bg-svg{
  opacity:.42;
  filter:saturate(.85) contrast(.95) blur(.4px);
  mix-blend-mode:normal;
}

.bg-svg .glass-shells,
.bg-svg .glass-prisms,
.bg-svg .glass-lines{
  opacity:.34;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.modal__panel,
.chat-sidebar,
.chat-panel,
.admin-card{
  border:1px solid var(--pro-line);
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)),
    var(--pro-panel);
  box-shadow:
    0 28px 90px rgba(0,0,0,.36),
    0 1px 0 rgba(255,255,255,.08) inset;
  backdrop-filter:blur(22px) saturate(140%);
}

.card::before,
.feed-card::before,
.profile-card::before,
.media-card::before{
  opacity:.42;
  background:
    radial-gradient(720px 180px at 18% 0%, rgba(139,92,246,.18), transparent 62%),
    radial-gradient(620px 200px at 90% 8%, rgba(45,212,191,.14), transparent 64%);
}

.card::after,
.feed-card::after,
.profile-card::after,
.media-card::after{
  opacity:.34;
  background:linear-gradient(120deg, rgba(255,255,255,.12), transparent 38%);
}

.feed-hero,
.account-header,
.profile-hero{
  border:1px solid var(--pro-line);
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)),
    rgba(10,16,28,.44);
  box-shadow:none;
}

.app-quicknav{
  border:1px solid var(--pro-line);
  border-radius:18px;
  background:rgba(8,13,24,.72);
  color:var(--pro-text);
  box-shadow:
    0 18px 70px rgba(0,0,0,.28),
    0 1px 0 rgba(255,255,255,.08) inset;
  backdrop-filter:blur(18px) saturate(135%);
}

.app-quicknav .btn,
.app-quicknav .app-nav-btn{
  color:var(--pro-text);
}

.btn,
.reaction-btn,
.tab-btn,
.modal__close,
.chat-tools button,
.chat-quick-replies button,
.chat-attachment-chip button{
  min-height:44px;
  border:1px solid rgba(226,232,240,.16);
  border-radius:12px;
  color:var(--pro-text);
  font-weight:750;
  background:
    linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045)),
    rgba(15,23,42,.72);
  box-shadow:
    0 12px 28px rgba(0,0,0,.22),
    0 1px 0 rgba(255,255,255,.08) inset;
  text-shadow:none;
}

.btn::before,
.reaction-btn::before,
.tab-btn::before,
.modal__close::before{
  display:none;
}

.btn-primary,
.reaction-btn.active,
.tab-btn.active{
  color:#06120F;
  border-color:rgba(45,212,191,.56);
  background:linear-gradient(135deg, #55E6D0, #2DD4BF 48%, #7DD3FC);
  box-shadow:
    0 16px 36px rgba(45,212,191,.20),
    0 1px 0 rgba(255,255,255,.28) inset;
}

.btn-secondary,
.reaction-btn,
.tab-btn,
.chat-tools button{
  background:
    linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045)),
    rgba(15,23,42,.76);
}

.btn-tertiary{
  color:#FFF7ED;
  border-color:rgba(249,115,115,.40);
  background:linear-gradient(135deg, rgba(249,115,115,.92), rgba(190,18,60,.86));
  box-shadow:
    0 16px 36px rgba(190,18,60,.18),
    0 1px 0 rgba(255,255,255,.20) inset;
}

.btn:hover,
.reaction-btn:hover,
.tab-btn:hover,
.modal__close:hover,
.chat-tools button:hover{
  transform:translateY(-1px);
  border-color:rgba(226,232,240,.28);
  box-shadow:
    0 18px 42px rgba(0,0,0,.26),
    0 1px 0 rgba(255,255,255,.10) inset;
  filter:none;
}

.btn:active,
.reaction-btn:active,
.tab-btn:active,
.modal__close:active,
.chat-tools button:active{
  transform:translateY(0);
  box-shadow:
    0 8px 20px rgba(0,0,0,.20),
    0 1px 0 rgba(255,255,255,.07) inset;
}

.field__input,
.feed-search,
.chat-composer textarea,
.chat-search .field__input,
select.field__input,
textarea.field__input{
  color:var(--pro-text);
  border:1px solid rgba(226,232,240,.14);
  border-radius:12px;
  background:rgba(6,10,18,.54);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 10px 26px rgba(0,0,0,.12);
}

.field__input:focus,
.feed-search:focus-within,
.chat-composer textarea:focus{
  border-color:rgba(45,212,191,.64);
  box-shadow:
    0 0 0 4px rgba(45,212,191,.12),
    0 12px 30px rgba(0,0,0,.18);
}

.settings-toggle-card,
.chat-list-item,
.notification-item,
.user-row,
.comment,
.media-card{
  border:1px solid var(--pro-line);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025)),
    rgba(11,17,30,.54);
  box-shadow:0 12px 34px rgba(0,0,0,.18);
}

.modal__backdrop{
  background:rgba(2,6,23,.68);
  backdrop-filter:blur(10px) saturate(120%);
}

.modal__panel{
  border-radius:20px;
}

.modal__header{
  border-bottom:1px solid var(--pro-line);
}

.modal__title,
h1,
h2,
h3{
  text-shadow:0 18px 40px rgba(0,0,0,.22);
}

.chat-message{
  border:1px solid var(--pro-line);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03)),
    rgba(15,23,42,.72);
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}

.chat-message.mine{
  color:#06120F;
  background:linear-gradient(135deg, #69E9D8, #2DD4BF);
}

.chat-quick-replies button,
.chat-attachment-chip{
  border-color:rgba(45,212,191,.24);
  background:rgba(45,212,191,.10);
}

html[data-theme="contrast"] body,
html[data-theme="calm"] body{
  background:
    radial-gradient(860px 560px at 82% 4%, rgba(45,212,191,.16), transparent 62%),
    radial-gradient(760px 520px at 8% 12%, rgba(139,92,246,.14), transparent 58%),
    linear-gradient(180deg, #070A12 0%, #0B111D 54%, #08111A 100%);
}

html[data-theme="contrast"] body::after,
html[data-theme="calm"] body::after{
  background:
    radial-gradient(900px 560px at 82% 0%, rgba(45,212,191,.14), transparent 62%),
    radial-gradient(760px 500px at 10% 10%, rgba(139,92,246,.12), transparent 58%),
    radial-gradient(820px 560px at 52% 86%, rgba(245,184,75,.07), transparent 66%),
    linear-gradient(180deg, #070A12 0%, #0B1020 54%, #08131B 100%);
  background-size:auto;
}

@media (max-width: 820px){
  .card,
  .feed-card,
  .profile-card,
  .media-card,
  .feed-item,
  .modal__panel{
    border-radius:18px;
    box-shadow:
      0 18px 52px rgba(0,0,0,.32),
      0 1px 0 rgba(255,255,255,.08) inset;
  }

  .app-quicknav{
    border-radius:16px;
    box-shadow:
      0 16px 52px rgba(0,0,0,.28),
      0 1px 0 rgba(255,255,255,.08) inset;
  }
}

/* ===== EOF override: accent-aware premium performance UI ===== */
:root,
html[data-accent="teal"]{
  --ui-accent:#2DD4BF;
  --ui-accent-2:#7DD3FC;
  --ui-accent-rgb:45 212 191;
}

html[data-accent="violet"]{
  --ui-accent:#A78BFA;
  --ui-accent-2:#C084FC;
  --ui-accent-rgb:167 139 250;
}

html[data-accent="blue"]{
  --ui-accent:#60A5FA;
  --ui-accent-2:#38BDF8;
  --ui-accent-rgb:96 165 250;
}

html[data-accent="amber"]{
  --ui-accent:#F5B84B;
  --ui-accent-2:#F97316;
  --ui-accent-rgb:245 184 75;
}

body::after,
html[data-theme="contrast"] body::after,
html[data-theme="calm"] body::after{
  background:
    radial-gradient(900px 560px at 82% 0%, rgb(var(--ui-accent-rgb) / .13), transparent 62%),
    radial-gradient(760px 500px at 10% 10%, rgba(139,92,246,.11), transparent 58%),
    radial-gradient(820px 560px at 52% 86%, rgba(255,255,255,.045), transparent 66%),
    linear-gradient(180deg, #070A12 0%, #0B1020 54%, #08131B 100%);
  background-size:auto !important;
}

body::before{
  background:
    radial-gradient(620px 360px at 24% 22%, rgba(139,92,246,.14), transparent 70%),
    radial-gradient(720px 420px at 80% 16%, rgb(var(--ui-accent-rgb) / .14), transparent 72%);
}

html[data-effects="quiet"] body::before,
html[data-effects="off"] body::before{
  animation:none !important;
  filter:blur(24px) saturate(105%);
  opacity:.24;
}

html[data-effects="quiet"] .bg-svg,
html[data-effects="off"] .bg-svg,
html[data-effects="off"] body::before,
html[data-effects="off"] body::after{
  display:none !important;
}

html[data-effects="quiet"] .card,
html[data-effects="quiet"] .feed-card,
html[data-effects="quiet"] .profile-card,
html[data-effects="quiet"] .media-card,
html[data-effects="quiet"] .feed-item,
html[data-effects="quiet"] .modal__panel,
html[data-effects="quiet"] .chat-sidebar,
html[data-effects="quiet"] .chat-panel,
html[data-effects="off"] .card,
html[data-effects="off"] .feed-card,
html[data-effects="off"] .profile-card,
html[data-effects="off"] .media-card,
html[data-effects="off"] .feed-item,
html[data-effects="off"] .modal__panel,
html[data-effects="off"] .chat-sidebar,
html[data-effects="off"] .chat-panel{
  backdrop-filter:none;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.modal__panel,
.chat-sidebar,
.chat-panel,
.admin-card{
  border-color:rgba(226,232,240,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.028)),
    rgba(10,16,30,.82);
  box-shadow:
    0 24px 80px rgba(0,0,0,.34),
    0 1px 0 rgba(255,255,255,.07) inset;
}

.btn-primary,
.reaction-btn.active,
.tab-btn.active{
  color:#06120F;
  border-color:rgb(var(--ui-accent-rgb) / .55);
  background:linear-gradient(135deg, color-mix(in srgb, var(--ui-accent) 92%, white), var(--ui-accent) 52%, var(--ui-accent-2));
  box-shadow:
    0 14px 34px rgb(var(--ui-accent-rgb) / .18),
    0 1px 0 rgba(255,255,255,.24) inset;
}

.btn:hover,
.reaction-btn:hover,
.tab-btn:hover,
.chat-list-item:hover,
.media-card:hover{
  border-color:rgb(var(--ui-accent-rgb) / .30);
}

.field__input:focus,
.feed-search:focus-within,
.chat-composer textarea:focus{
  border-color:rgb(var(--ui-accent-rgb) / .62);
  box-shadow:
    0 0 0 4px rgb(var(--ui-accent-rgb) / .11),
    0 12px 30px rgba(0,0,0,.16);
}

html[data-navigation="compact"] .app-quicknav{
  gap:10px;
  padding:8px;
}

html[data-navigation="compact"] .app-nav-btn,
html[data-navigation="compact"] .feed-actions .btn{
  min-height:40px;
  padding:9px 12px;
  font-size:13px;
}

html[data-navigation="compact"] .app-quicknav__group{
  gap:8px;
}

.settings-grid-form{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.settings-toggle-card{
  min-height:92px;
}

@media (max-width: 900px){
  .settings-grid-form{
    grid-template-columns:1fr;
  }
}

/* ===== Appearance settings: final authoritative layer ===== */
html[data-theme="glass"]{
  --app-bg-a:#070A12;
  --app-bg-b:#10182f;
  --app-surface:rgba(255,255,255,.075);
  --app-surface-strong:rgba(17,24,39,.68);
  --app-border:rgba(255,255,255,.18);
  --app-text:#EAF0FF;
  --app-muted:rgba(234,240,255,.72);
}

html[data-theme="contrast"]{
  --app-bg-a:#010409;
  --app-bg-b:#050814;
  --app-surface:rgba(0,0,0,.88);
  --app-surface-strong:rgba(0,0,0,.96);
  --app-border:rgba(255,255,255,.72);
  --app-text:#FFFFFF;
  --app-muted:rgba(255,255,255,.86);
}

html[data-theme="calm"]{
  --app-bg-a:#06150f;
  --app-bg-b:#10231f;
  --app-surface:rgba(12,28,24,.76);
  --app-surface-strong:rgba(12,28,24,.9);
  --app-border:rgba(148,213,190,.28);
  --app-text:#F2FBF7;
  --app-muted:rgba(226,245,237,.76);
}

html[data-radius="sharp"]{ --radius:8px; --app-radius:8px; }
html[data-radius="soft"]{ --radius:18px; --app-radius:18px; }
html[data-radius="rounded"]{ --radius:28px; --app-radius:28px; }

html[data-glass="clear"]{
  --app-surface:rgba(255,255,255,.045);
  --app-surface-strong:rgba(15,23,42,.5);
  --app-blur:10px;
}

html[data-glass="frosted"]{ --app-blur:22px; }

html[data-glass="solid"]{
  --app-surface:rgba(15,23,42,.92);
  --app-surface-strong:rgba(15,23,42,.98);
  --app-blur:0px;
}

html[data-theme] body{
  color:var(--app-text);
  background:linear-gradient(180deg, var(--app-bg-a), var(--app-bg-b));
}

html[data-theme] body::after{
  background:
    radial-gradient(760px 520px at 82% 8%, rgba(var(--ui-accent-rgb), .18), transparent 58%),
    radial-gradient(680px 460px at 8% 18%, rgba(245,184,75,.10), transparent 52%),
    linear-gradient(180deg, var(--app-bg-a) 0%, var(--app-bg-b) 100%);
}

html[data-theme="contrast"] body::before,
html[data-effects="off"] body::before,
html[data-effects="off"] .bg,
html[data-effects="off"] .bg-svg,
html[data-effects="off"] #three-canvas{
  display:none !important;
}

html[data-effects="quiet"] body::before{ opacity:.14; filter:blur(18px) saturate(120%); }
html[data-effects="standard"] body::before{ opacity:.35; }

html[data-theme] .card,
html[data-theme] .feed-card,
html[data-theme] .profile-card,
html[data-theme] .media-card,
html[data-theme] .modal__panel,
html[data-theme] .live-shell,
html[data-theme] .live-public-phone,
html[data-theme] .live-viewer-layout,
html[data-theme] .chat-panel,
html[data-theme] .settings-toggle-card,
html[data-theme] .field__input,
html[data-theme] textarea,
html[data-theme] select,
html[data-theme] input{
  color:var(--app-text);
  background:var(--app-surface);
  border-color:var(--app-border);
  border-radius:var(--app-radius, var(--radius));
  backdrop-filter:blur(var(--app-blur, 18px)) saturate(150%);
}

html[data-theme] .btn-secondary,
html[data-theme] .tab-btn,
html[data-theme] .chip,
html[data-theme] .app-nav-btn{
  color:var(--app-text);
  background:var(--app-surface-strong);
  border-color:var(--app-border);
  border-radius:var(--app-radius, var(--radius));
}

html[data-theme] .account-label,
html[data-theme] .field__label,
html[data-theme] .settings-toggle-card small,
html[data-theme] .muted,
html[data-theme] small{
  color:var(--app-muted);
}

html[data-theme="contrast"] .btn-primary,
html[data-theme="contrast"] .tab-btn.active{
  color:#020617;
  text-shadow:none;
  box-shadow:0 0 0 2px #fff, 0 12px 30px rgba(255,255,255,.18);
}

html[data-text-scale="large"] body{ font-size:17px; }
html[data-text-scale="large"] .field__input,
html[data-text-scale="large"] .btn,
html[data-text-scale="large"] textarea,
html[data-text-scale="large"] select{ font-size:1.02rem; }
html[data-text-scale="large"] .feed-card__title,
html[data-text-scale="large"] .modal__title{ font-size:1.16em; }

html[data-layout-width="wide"] .feed-shell,
html[data-layout-width="wide"] .feed-layout,
html[data-layout-width="wide"] .profile-shell,
html[data-layout-width="wide"] .account-shell{
  max-width:min(1420px, calc(100vw - 24px));
}

html[data-density="compact"] .settings-toggle-card{ min-height:74px; }
html[data-density="compact"] .field{ gap:5px; }
html[data-density="compact"] .modal__panel{ padding:14px; }

html.reduce-motion *,
html.reduce-motion *::before,
html.reduce-motion *::after{
  animation-duration:.001ms !important;
  animation-iteration-count:1 !important;
  transition-duration:.001ms !important;
  scroll-behavior:auto !important;
}

/* EOF public live priority override. */
.live-public-player{ width:min(1040px, calc(100vw - 20px)); }
.live-public-player__body{ grid-template-columns:minmax(320px, 430px) minmax(300px, 400px); align-items:start; justify-content:center; }
.live-public-phone{ position:relative; display:block; width:min(430px, 100%); aspect-ratio:9 / 16; max-height:min(78vh, 780px); overflow:hidden; border-radius:24px; }
.live-public-phone__video{ position:absolute; inset:0; width:100%; height:100%; min-height:0; object-fit:cover; border-radius:0; }
.live-public-phone .live-video-status{ position:absolute; left:16px; right:72px; bottom:76px; margin:0; max-height:96px; overflow:auto; text-align:left; }
.live-public-phone__quick{ position:absolute; left:12px; right:12px; bottom:12px; z-index:8; display:grid; grid-template-columns:minmax(0, 1fr) minmax(74px, .7fr) 44px; gap:8px; }
.live-public-phone__bottom{ position:absolute; left:auto; right:12px; bottom:68px; width:54px; margin:0; display:grid; grid-template-columns:1fr; padding:8px; border-radius:18px; }
.live-public-phone__bottom[hidden]{ display:none !important; }
.live-public-phone__bottom .reaction-btn{ width:38px; min-height:38px; padding:0; }
.live-chat--public{ min-height:min(78vh, 780px); }
.live-chat--public .live-chat__list{ max-height:none; }

@media (max-width:820px){
  .live-public-player{ width:min(460px, calc(100vw - 12px)); max-height:calc(100dvh - 12px); overflow:auto; }
  .live-public-player__body{ grid-template-columns:1fr; gap:10px; padding:8px; }
  .live-public-phone{ width:100%; max-height:none; aspect-ratio:9 / 16; margin:0 auto; }
  .live-chat--public{ min-height:0; max-height:38dvh; overflow:hidden; }
  .live-chat--public .live-chat__list{ min-height:120px; max-height:22dvh; }
}

/* Final chat refresh: keep the chat UI simple even after theme overrides. */
.modal__panel:has(.chat-shell){
  overflow:hidden;
}

.chat-shell{
  grid-template-columns:minmax(280px, 360px) minmax(0, 1fr);
  gap:0;
  padding:0;
  border-radius:12px;
  min-height:min(84vh, 820px);
  background:rgba(5,7,13,.22);
}

.chat-sidebar,
.chat-panel{
  border:0;
  border-radius:0;
  box-shadow:none;
  background:rgba(255,255,255,.035);
}

.chat-sidebar{
  border-right:1px solid rgba(255,255,255,.10);
  padding:14px;
}

.chat-tabs{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  padding:4px;
  border-radius:10px;
  background:rgba(5,7,13,.34);
}

.chat-tabs .reaction-btn{
  min-height:36px;
  justify-content:center;
  border-radius:8px;
}

.chat-list-item{
  grid-template-columns:42px minmax(0, 1fr) auto;
  border-radius:10px;
  background:transparent;
}

.chat-list-item:hover,
.chat-list-item.active{
  transform:none;
  background:rgba(20,184,166,.12);
  border-color:rgba(20,184,166,.32);
}

.chat-header,
.chat-request-bar{
  padding:12px 14px;
  background:rgba(5,7,13,.18);
}

.chat-messages{
  padding:18px 20px;
  background:linear-gradient(180deg, rgba(255,255,255,.028), rgba(255,255,255,.01)), rgba(5,7,13,.14);
}

.chat-message{
  max-width:min(70%, 620px);
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px 14px 14px 4px;
  background:rgba(255,255,255,.078);
  color:var(--text);
  box-shadow:0 12px 34px rgba(0,0,0,.16);
}

.chat-message.mine{
  border-radius:14px 14px 4px 14px;
  background:linear-gradient(135deg, rgba(20,184,166,.36), rgba(59,130,246,.22));
  border-color:rgba(20,184,166,.30);
  color:var(--text);
}

.chat-composer{
  grid-template-columns:auto minmax(0, 1fr) auto auto;
  padding:12px 14px;
  background:rgba(5,7,13,.34);
}

.chat-composer textarea{
  border-radius:10px;
  min-height:44px;
  background:rgba(255,255,255,.085);
}

@media (max-width: 760px){
  .chat-shell{
    grid-template-columns:1fr;
  }
  .chat-sidebar{
    border-right:0;
    border-bottom:1px solid rgba(255,255,255,.10);
    max-height:36vh;
  }
  .chat-message{
    max-width:86%;
  }
  .chat-composer{
    grid-template-columns:auto minmax(0, 1fr) auto;
  }
  .chat-composer .btn[type="submit"]{
    grid-column:3;
  }
}

html[data-accent="violet"] .btn-primary,
html[data-accent="violet"] .reaction-btn.active,
html[data-accent="violet"] .tab-btn.active{
  box-shadow:
    0 14px 34px rgba(167,139,250,.18),
    0 1px 0 rgba(255,255,255,.24) inset;
}

html[data-accent="blue"] .btn-primary,
html[data-accent="blue"] .reaction-btn.active,
html[data-accent="blue"] .tab-btn.active{
  box-shadow:
    0 14px 34px rgba(96,165,250,.18),
    0 1px 0 rgba(255,255,255,.24) inset;
}

html[data-accent="amber"] .btn-primary,
html[data-accent="amber"] .reaction-btn.active,
html[data-accent="amber"] .tab-btn.active{
  box-shadow:
    0 14px 34px rgba(245,184,75,.18),
    0 1px 0 rgba(255,255,255,.24) inset;
}

/* ===== Premium performance pass ===== */
:root,
html[data-accent="teal"]{
  --ui-accent:#2DD4BF;
  --ui-accent-2:#7DD3FC;
  --ui-accent-rgb:45, 212, 191;
}

html[data-accent="violet"]{
  --ui-accent:#A78BFA;
  --ui-accent-2:#C084FC;
  --ui-accent-rgb:167, 139, 250;
}

html[data-accent="blue"]{
  --ui-accent:#60A5FA;
  --ui-accent-2:#38BDF8;
  --ui-accent-rgb:96, 165, 250;
}

html[data-accent="amber"]{
  --ui-accent:#F5B84B;
  --ui-accent-2:#F97316;
  --ui-accent-rgb:245, 184, 75;
}

body{
  letter-spacing:0;
}

body::after,
html[data-theme="contrast"] body::after,
html[data-theme="calm"] body::after{
  background:
    radial-gradient(900px 560px at 82% 0%, rgba(var(--ui-accent-rgb), .13), transparent 62%),
    radial-gradient(760px 500px at 10% 10%, rgba(139,92,246,.11), transparent 58%),
    radial-gradient(820px 560px at 52% 86%, rgba(255,255,255,.045), transparent 66%),
    linear-gradient(180deg, #070A12 0%, #0B1020 54%, #08131B 100%);
}

body::before{
  background:
    radial-gradient(620px 360px at 24% 22%, rgba(139,92,246,.14), transparent 70%),
    radial-gradient(720px 420px at 80% 16%, rgba(var(--ui-accent-rgb), .14), transparent 72%);
}

html[data-effects="quiet"] body::before,
html[data-effects="off"] body::before{
  animation:none !important;
  filter:blur(24px) saturate(105%);
  opacity:.24;
}

html[data-effects="quiet"] .bg-svg,
html[data-effects="off"] .bg-svg,
html[data-effects="off"] body::before,
html[data-effects="off"] body::after{
  display:none !important;
}

html[data-effects="quiet"] .card,
html[data-effects="quiet"] .feed-card,
html[data-effects="quiet"] .profile-card,
html[data-effects="quiet"] .media-card,
html[data-effects="quiet"] .feed-item,
html[data-effects="quiet"] .modal__panel,
html[data-effects="quiet"] .chat-sidebar,
html[data-effects="quiet"] .chat-panel,
html[data-effects="off"] .card,
html[data-effects="off"] .feed-card,
html[data-effects="off"] .profile-card,
html[data-effects="off"] .media-card,
html[data-effects="off"] .feed-item,
html[data-effects="off"] .modal__panel,
html[data-effects="off"] .chat-sidebar,
html[data-effects="off"] .chat-panel{
  backdrop-filter:none;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.modal__panel,
.chat-sidebar,
.chat-panel,
.admin-card{
  border-color:rgba(226,232,240,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.028)),
    rgba(10,16,30,.82);
  box-shadow:
    0 24px 80px rgba(0,0,0,.34),
    0 1px 0 rgba(255,255,255,.07) inset;
}

.card:hover,
.feed-item:hover,
.media-card:hover,
.chat-list-item:hover{
  border-color:rgba(var(--ui-accent-rgb), .24);
}

.btn-primary,
.reaction-btn.active,
.tab-btn.active{
  background:linear-gradient(135deg, color-mix(in srgb, var(--ui-accent) 92%, white), var(--ui-accent) 52%, var(--ui-accent-2));
  border-color:rgba(var(--ui-accent-rgb), .55);
  box-shadow:
    0 14px 34px rgba(var(--ui-accent-rgb), .18),
    0 1px 0 rgba(255,255,255,.24) inset;
}

.btn,
.reaction-btn,
.tab-btn,
.modal__close{
  border-radius:11px;
}

.btn-secondary,
.reaction-btn,
.tab-btn{
  background:
    linear-gradient(180deg, rgba(255,255,255,.082), rgba(255,255,255,.036)),
    rgba(12,18,31,.82);
}

.btn:hover,
.reaction-btn:hover,
.tab-btn:hover{
  border-color:rgba(var(--ui-accent-rgb), .32);
}

.field__input:focus,
.feed-search:focus-within,
.chat-composer textarea:focus{
  border-color:rgba(var(--ui-accent-rgb), .62);
  box-shadow:
    0 0 0 4px rgba(var(--ui-accent-rgb), .11),
    0 12px 30px rgba(0,0,0,.16);
}

.feed-topbar--v2,
.account-panel,
.profile-card,
.chat-shell{
  border-radius:20px;
}

.app-quicknav{
  background:rgba(7,12,22,.78);
}

html[data-navigation="compact"] .app-quicknav{
  gap:10px;
  padding:8px;
}

html[data-navigation="compact"] .app-nav-btn,
html[data-navigation="compact"] .feed-actions .btn{
  min-height:40px;
  padding:9px 12px;
  font-size:13px;
}

html[data-navigation="compact"] .app-quicknav__group{
  gap:8px;
}

html[data-navigation="compact"] .feed-topbar--v2{
  gap:10px;
}

.settings-grid-form{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.settings-toggle-card{
  min-height:92px;
}

.settings-toggle-card strong{
  color:#F8FAFC;
}

@media (max-width: 900px){
  .settings-grid-form{
    grid-template-columns:1fr;
  }
}

/* ===== Anuk hybrid design system: clay + material + neumo + clean brutal accents ===== */
:root{
  --hybrid-ink:#0A1020;
  --hybrid-paper:#F8FAFC;
  --hybrid-panel:rgba(248,250,252,.88);
  --hybrid-panel-dark:rgba(10,16,32,.82);
  --hybrid-line:rgba(15,23,42,.16);
  --hybrid-shadow:rgba(2,6,23,.34);
  --hybrid-brutal:#020617;
  --hybrid-mint:#24D6B5;
  --hybrid-blue:#4A7DFF;
  --hybrid-pink:#FF6BAA;
  --hybrid-yellow:#FFD166;
  --hybrid-orange:#FF8A3D;
  --hybrid-lavender:#A78BFA;
  --clay-radius:24px;
}

body{
  color:#EAF2FF;
  background:
    radial-gradient(circle at 20% 18%, rgba(255,209,102,.42) 0 0, transparent 25%),
    radial-gradient(circle at 86% 12%, rgba(36,214,181,.34) 0 0, transparent 28%),
    radial-gradient(circle at 72% 82%, rgba(255,107,170,.28) 0 0, transparent 30%),
    linear-gradient(140deg, #07111F 0%, #0D1B2E 46%, #111827 100%);
}

body::after{
  background:
    linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.055) 1px, transparent 1px),
    radial-gradient(680px 460px at 9% 10%, rgba(255,209,102,.22), transparent 64%),
    radial-gradient(780px 520px at 92% 8%, rgba(36,214,181,.20), transparent 62%),
    radial-gradient(840px 620px at 72% 86%, rgba(255,107,170,.18), transparent 66%),
    linear-gradient(140deg, #07111F 0%, #0D1B2E 48%, #0B1020 100%);
  background-size:52px 52px, 52px 52px, auto, auto, auto, auto;
  opacity:1;
}

body::before{
  inset:-10%;
  background:
    conic-gradient(from 220deg at 24% 22%, rgba(255,209,102,.35), rgba(255,138,61,.12), transparent 34%, rgba(36,214,181,.24), rgba(74,125,255,.10), rgba(255,209,102,.35)),
    conic-gradient(from 40deg at 82% 18%, rgba(167,139,250,.28), rgba(255,107,170,.14), transparent 42%, rgba(36,214,181,.20), rgba(167,139,250,.28));
  filter:blur(42px) saturate(150%);
  opacity:.62;
}

.bg::before,
.bg::after{
  content:"";
  position:absolute;
  pointer-events:none;
  border:2px solid rgba(2,6,23,.24);
  background:linear-gradient(145deg, rgba(255,255,255,.38), rgba(255,255,255,.08));
  box-shadow:
    16px 18px 0 rgba(2,6,23,.18),
    inset 12px 14px 24px rgba(255,255,255,.18),
    inset -16px -18px 32px rgba(2,6,23,.18);
  transform:rotate(-8deg);
}

.bg::before{
  width:min(42vw, 520px);
  aspect-ratio:1.7;
  left:4vw;
  top:11vh;
  border-radius:42% 58% 38% 62% / 58% 34% 66% 42%;
  background:linear-gradient(145deg, rgba(255,209,102,.34), rgba(255,107,170,.12));
}

.bg::after{
  width:min(34vw, 420px);
  aspect-ratio:1.15;
  right:5vw;
  bottom:9vh;
  border-radius:34px 82px 42px 78px;
  background:linear-gradient(145deg, rgba(36,214,181,.30), rgba(74,125,255,.13));
  transform:rotate(10deg);
}

.bg-svg{
  opacity:.20;
  filter:saturate(1.35) contrast(1.12) blur(.2px);
  mix-blend-mode:screen;
}

.page,
.app-page{
  padding-top:34px;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.modal__panel,
.chat-sidebar,
.chat-panel,
.admin-card{
  border:2px solid rgba(248,250,252,.30);
  border-radius:var(--clay-radius);
  background:
    linear-gradient(145deg, rgba(255,255,255,.18), rgba(255,255,255,.06) 40%, rgba(15,23,42,.44)),
    rgba(12,18,34,.78);
  box-shadow:
    0 26px 72px rgba(2,6,23,.38),
    10px 12px 0 rgba(2,6,23,.22),
    inset 10px 12px 24px rgba(255,255,255,.08),
    inset -16px -18px 34px rgba(2,6,23,.28);
}

.card::before,
.feed-card::before,
.profile-card::before,
.media-card::before{
  background:
    radial-gradient(480px 150px at 18% 0%, rgba(255,209,102,.28), transparent 62%),
    radial-gradient(440px 180px at 90% 12%, rgba(36,214,181,.22), transparent 66%),
    linear-gradient(120deg, rgba(255,255,255,.22), transparent 44%);
}

.card::after,
.feed-card::after,
.profile-card::after,
.media-card::after{
  opacity:.58;
  background:
    linear-gradient(135deg, rgba(255,255,255,.12), transparent 28%),
    radial-gradient(circle at 16% 12%, rgba(255,255,255,.22), transparent 18%);
}

.feed-hero,
.account-header,
.profile-hero{
  border-radius:26px;
  padding:18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.055)),
    radial-gradient(420px 180px at 12% 0%, rgba(255,209,102,.20), transparent 62%);
  border:2px solid rgba(255,255,255,.20);
  box-shadow:
    inset 8px 8px 22px rgba(255,255,255,.08),
    inset -10px -12px 24px rgba(2,6,23,.24);
}

.app-quicknav{
  border:2px solid rgba(2,6,23,.58);
  border-radius:26px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.86), rgba(226,232,240,.72)),
    var(--hybrid-panel);
  color:#0F172A;
  box-shadow:
    9px 10px 0 rgba(2,6,23,.28),
    0 24px 72px rgba(2,6,23,.28),
    inset 8px 9px 20px rgba(255,255,255,.72),
    inset -10px -12px 26px rgba(148,163,184,.34);
}

.app-quicknav .btn,
.app-quicknav .app-nav-btn{
  color:#0F172A;
}

.btn,
.reaction-btn,
.tab-btn,
.modal__close,
.chat-tools button,
.chat-quick-replies button,
.chat-attachment-chip button{
  position:relative;
  isolation:isolate;
  min-height:46px;
  border:2px solid rgba(2,6,23,.62);
  border-radius:18px;
  color:#F8FAFC;
  font-weight:900;
  text-shadow:none;
  background:
    linear-gradient(145deg, rgba(255,255,255,.22), rgba(255,255,255,.07)),
    #1F2937;
  box-shadow:
    5px 6px 0 rgba(2,6,23,.46),
    0 14px 30px rgba(2,6,23,.22),
    inset 6px 7px 16px rgba(255,255,255,.16),
    inset -8px -9px 18px rgba(2,6,23,.25);
  transition:transform .16s ease, box-shadow .16s ease, filter .16s ease, background .16s ease;
}

.btn::before,
.reaction-btn::before,
.tab-btn::before,
.modal__close::before{
  content:"";
  position:absolute;
  inset:4px 6px auto 6px;
  height:34%;
  border-radius:14px 14px 10px 10px;
  background:linear-gradient(180deg, rgba(255,255,255,.36), rgba(255,255,255,0));
  pointer-events:none;
  z-index:-1;
}

.btn-primary,
.reaction-btn.active,
.tab-btn.active{
  color:#06111D;
  border-color:#020617;
  background:
    linear-gradient(145deg, rgba(255,255,255,.45), rgba(255,255,255,.08)),
    linear-gradient(135deg, var(--hybrid-yellow), var(--hybrid-mint) 54%, #73D2FF);
  box-shadow:
    6px 7px 0 rgba(2,6,23,.62),
    0 18px 42px rgba(36,214,181,.20),
    inset 8px 9px 18px rgba(255,255,255,.42),
    inset -10px -12px 24px rgba(15,23,42,.18);
}

.btn-secondary,
.reaction-btn,
.tab-btn,
.chat-tools button{
  background:
    linear-gradient(145deg, rgba(255,255,255,.24), rgba(255,255,255,.08)),
    linear-gradient(135deg, #334155, #111827);
}

.btn-tertiary{
  color:#111827;
  background:
    linear-gradient(145deg, rgba(255,255,255,.50), rgba(255,255,255,.06)),
    linear-gradient(135deg, var(--hybrid-orange), var(--hybrid-pink));
}

.btn:hover,
.reaction-btn:hover,
.tab-btn:hover,
.modal__close:hover,
.chat-tools button:hover{
  transform:translate(-1px, -2px);
  filter:saturate(1.08);
  box-shadow:
    8px 9px 0 rgba(2,6,23,.54),
    0 22px 48px rgba(2,6,23,.28),
    inset 8px 9px 18px rgba(255,255,255,.18),
    inset -10px -12px 24px rgba(2,6,23,.26);
}

.btn:active,
.reaction-btn:active,
.tab-btn:active,
.modal__close:active,
.chat-tools button:active{
  transform:translate(3px, 3px);
  box-shadow:
    2px 2px 0 rgba(2,6,23,.58),
    0 10px 22px rgba(2,6,23,.22),
    inset 7px 8px 16px rgba(2,6,23,.18);
}

.feed-actions,
.account-quicknav__group--main,
.chat-call-actions,
.settings-grid-form{
  gap:16px;
}

.feed-actions .btn,
.app-nav-btn{
  min-width:0;
  padding-inline:18px;
}

.field__input,
.feed-search,
.chat-composer textarea,
.chat-search .field__input,
select.field__input,
textarea.field__input{
  color:#F8FAFC;
  border:2px solid rgba(2,6,23,.42);
  border-radius:18px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.13), rgba(255,255,255,.045)),
    rgba(15,23,42,.72);
  box-shadow:
    inset 5px 6px 16px rgba(2,6,23,.30),
    inset -6px -7px 16px rgba(255,255,255,.07),
    0 10px 28px rgba(2,6,23,.16);
}

.field__input::placeholder,
.feed-search input::placeholder,
.chat-composer textarea::placeholder{
  color:rgba(226,232,240,.58);
}

.field__input:focus,
.feed-search:focus-within,
.chat-composer textarea:focus{
  border-color:var(--hybrid-yellow);
  box-shadow:
    0 0 0 4px rgba(255,209,102,.20),
    6px 7px 0 rgba(2,6,23,.22),
    inset 5px 6px 16px rgba(2,6,23,.22);
}

.settings-toggle-card,
.chat-list-item,
.notification-item,
.user-row,
.comment,
.media-card{
  border:2px solid rgba(2,6,23,.30);
  border-radius:20px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.055)),
    rgba(15,23,42,.52);
  box-shadow:
    5px 6px 0 rgba(2,6,23,.18),
    inset 6px 7px 16px rgba(255,255,255,.07),
    inset -8px -9px 18px rgba(2,6,23,.20);
}

.modal__backdrop{
  background:
    radial-gradient(620px 420px at 20% 12%, rgba(255,209,102,.18), transparent 64%),
    radial-gradient(740px 520px at 88% 18%, rgba(36,214,181,.18), transparent 62%),
    rgba(2,6,23,.70);
  backdrop-filter:blur(10px) saturate(130%);
}

.modal__panel{
  border-radius:28px;
}

.modal__header{
  padding:20px 20px 14px;
  border-bottom:2px solid rgba(255,255,255,.12);
}

.modal__title,
h1,
h2,
h3{
  text-shadow:0 2px 0 rgba(2,6,23,.24), 0 14px 34px rgba(36,214,181,.12);
}

.chat-shell{
  gap:18px;
}

.chat-sidebar,
.chat-panel{
  border-radius:26px;
}

.chat-message{
  border:2px solid rgba(2,6,23,.28);
  background:
    linear-gradient(145deg, rgba(255,255,255,.17), rgba(255,255,255,.055)),
    rgba(15,23,42,.72);
  box-shadow:5px 6px 0 rgba(2,6,23,.16);
}

.chat-message.mine{
  color:#07111F;
  background:
    linear-gradient(145deg, rgba(255,255,255,.48), rgba(255,255,255,.12)),
    linear-gradient(135deg, var(--hybrid-mint), #7DD3FC);
}

.chat-quick-replies button,
.chat-attachment-chip{
  border-color:rgba(2,6,23,.42);
  background:
    linear-gradient(145deg, rgba(255,255,255,.30), rgba(255,255,255,.08)),
    rgba(36,214,181,.22);
}

html[data-theme="contrast"] body{
  background:#020617;
}

html[data-theme="contrast"] body::after{
  background:
    linear-gradient(90deg, rgba(255,255,255,.10) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.08) 1px, transparent 1px),
    radial-gradient(760px 520px at 82% 10%, rgba(255,209,102,.20), transparent 58%),
    linear-gradient(140deg, #020617, #0F172A);
  background-size:44px 44px, 44px 44px, auto, auto;
}

html[data-theme="calm"] body::after{
  background:
    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(180deg, rgba(255,255,255,.045) 1px, transparent 1px),
    radial-gradient(740px 520px at 18% 12%, rgba(45,212,191,.22), transparent 64%),
    radial-gradient(760px 520px at 86% 18%, rgba(125,211,252,.18), transparent 62%),
    linear-gradient(140deg, #06211F, #0F2430 52%, #0B1320);
  background-size:56px 56px, 56px 56px, auto, auto, auto;
}

@media (max-width: 820px){
  .page,
  .app-page{
    padding:18px 12px 28px;
  }

  .card,
  .feed-card,
  .profile-card,
  .media-card,
  .feed-item,
  .modal__panel{
    border-radius:22px;
    box-shadow:
      0 22px 54px rgba(2,6,23,.34),
      6px 7px 0 rgba(2,6,23,.22),
      inset 8px 9px 18px rgba(255,255,255,.07),
      inset -10px -12px 22px rgba(2,6,23,.24);
  }

  .app-quicknav{
    width:calc(100% - 20px);
    gap:14px;
    padding:12px;
    border-radius:22px;
  }

  .app-quicknav__group,
  .app-quicknav__group--main,
  .feed-quicknav .app-quicknav__group--main{
    grid-template-columns:1fr;
    width:100%;
  }

  .app-nav-btn,
  .feed-actions .btn,
  .btn{
    width:100%;
    min-height:48px;
  }

  .feed-actions{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
  }

  .bg::before{
    width:82vw;
    top:8vh;
    left:-16vw;
  }

  .bg::after{
    width:76vw;
    right:-22vw;
    bottom:7vh;
  }
}

/* ===== Final visual override: modern Anuk, restored dark background, no grid/no toy styling ===== */
body{
  color:#EEF4FF;
  background:
    radial-gradient(860px 560px at 82% 4%, rgba(45,212,191,.16), transparent 62%),
    radial-gradient(760px 520px at 8% 12%, rgba(139,92,246,.14), transparent 58%),
    radial-gradient(860px 560px at 52% 92%, rgba(245,184,75,.07), transparent 64%),
    linear-gradient(180deg, #070A12 0%, #0B111D 54%, #08111A 100%);
}

body::after,
html[data-theme="contrast"] body::after,
html[data-theme="calm"] body::after{
  background:
    radial-gradient(900px 560px at 82% 0%, rgba(45,212,191,.14), transparent 62%),
    radial-gradient(760px 500px at 10% 10%, rgba(139,92,246,.12), transparent 58%),
    radial-gradient(820px 560px at 52% 86%, rgba(245,184,75,.07), transparent 66%),
    linear-gradient(180deg, #070A12 0%, #0B1020 54%, #08131B 100%);
  background-size:auto !important;
  opacity:1;
}

body::before{
  inset:-18%;
  background:
    radial-gradient(620px 360px at 24% 22%, rgba(139,92,246,.18), transparent 68%),
    radial-gradient(720px 420px at 80% 16%, rgba(45,212,191,.16), transparent 70%);
  filter:blur(46px) saturate(120%);
  opacity:.42;
}

.bg::before,
.bg::after{
  display:none !important;
}

.bg-svg{
  opacity:.42;
  filter:saturate(.85) contrast(.95) blur(.4px);
  mix-blend-mode:normal;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.modal__panel,
.chat-sidebar,
.chat-panel,
.admin-card{
  border:1px solid rgba(226,232,240,.14);
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035)),
    rgba(12,18,32,.78);
  box-shadow:
    0 28px 90px rgba(0,0,0,.36),
    0 1px 0 rgba(255,255,255,.08) inset;
  backdrop-filter:blur(22px) saturate(140%);
}

.feed-hero,
.account-header,
.profile-hero{
  border:1px solid rgba(226,232,240,.14);
  border-radius:20px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025)),
    rgba(10,16,28,.44);
  box-shadow:none;
}

.app-quicknav{
  border:1px solid rgba(226,232,240,.14);
  border-radius:18px;
  background:rgba(8,13,24,.72);
  color:#EEF4FF;
  box-shadow:
    0 18px 70px rgba(0,0,0,.28),
    0 1px 0 rgba(255,255,255,.08) inset;
  backdrop-filter:blur(18px) saturate(135%);
}

.app-quicknav .btn,
.app-quicknav .app-nav-btn{
  color:#EEF4FF;
}

.btn,
.reaction-btn,
.tab-btn,
.modal__close,
.chat-tools button,
.chat-quick-replies button,
.chat-attachment-chip button{
  min-height:44px;
  border:1px solid rgba(226,232,240,.16);
  border-radius:12px;
  color:#EEF4FF;
  font-weight:750;
  background:
    linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045)),
    rgba(15,23,42,.76);
  box-shadow:
    0 12px 28px rgba(0,0,0,.22),
    0 1px 0 rgba(255,255,255,.08) inset;
  text-shadow:none;
}

.btn::before,
.reaction-btn::before,
.tab-btn::before,
.modal__close::before{
  display:none !important;
}

.btn-primary,
.reaction-btn.active,
.tab-btn.active{
  color:#06120F;
  border-color:rgba(45,212,191,.56);
  background:linear-gradient(135deg, #55E6D0, #2DD4BF 48%, #7DD3FC);
  box-shadow:
    0 16px 36px rgba(45,212,191,.20),
    0 1px 0 rgba(255,255,255,.28) inset;
}

.btn-secondary,
.reaction-btn,
.tab-btn,
.chat-tools button{
  background:
    linear-gradient(180deg, rgba(255,255,255,.095), rgba(255,255,255,.045)),
    rgba(15,23,42,.76);
}

.btn-tertiary{
  color:#FFF7ED;
  border-color:rgba(249,115,115,.40);
  background:linear-gradient(135deg, rgba(249,115,115,.92), rgba(190,18,60,.86));
  box-shadow:
    0 16px 36px rgba(190,18,60,.18),
    0 1px 0 rgba(255,255,255,.20) inset;
}

.btn:hover,
.reaction-btn:hover,
.tab-btn:hover,
.modal__close:hover,
.chat-tools button:hover{
  transform:translateY(-1px);
  border-color:rgba(226,232,240,.28);
  box-shadow:
    0 18px 42px rgba(0,0,0,.26),
    0 1px 0 rgba(255,255,255,.10) inset;
  filter:none;
}

.btn:active,
.reaction-btn:active,
.tab-btn:active,
.modal__close:active,
.chat-tools button:active{
  transform:translateY(0);
  box-shadow:
    0 8px 20px rgba(0,0,0,.20),
    0 1px 0 rgba(255,255,255,.07) inset;
}

.field__input,
.feed-search,
.chat-composer textarea,
.chat-search .field__input,
select.field__input,
textarea.field__input{
  color:#EEF4FF;
  border:1px solid rgba(226,232,240,.14);
  border-radius:12px;
  background:rgba(6,10,18,.54);
  box-shadow:
    0 1px 0 rgba(255,255,255,.05) inset,
    0 10px 26px rgba(0,0,0,.12);
}

.field__input:focus,
.feed-search:focus-within,
.chat-composer textarea:focus{
  border-color:rgba(45,212,191,.64);
  box-shadow:
    0 0 0 4px rgba(45,212,191,.12),
    0 12px 30px rgba(0,0,0,.18);
}

.settings-toggle-card,
.chat-list-item,
.notification-item,
.user-row,
.comment,
.media-card{
  border:1px solid rgba(226,232,240,.14);
  border-radius:16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.065), rgba(255,255,255,.025)),
    rgba(11,17,30,.54);
  box-shadow:0 12px 34px rgba(0,0,0,.18);
}

.modal__backdrop{
  background:rgba(2,6,23,.68);
  backdrop-filter:blur(10px) saturate(120%);
}

.modal__panel{
  border-radius:20px;
}

.modal__header{
  border-bottom:1px solid rgba(226,232,240,.14);
}

.chat-message{
  border:1px solid rgba(226,232,240,.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.03)),
    rgba(15,23,42,.72);
  box-shadow:0 12px 28px rgba(0,0,0,.18);
}

.chat-message.mine{
  color:#06120F;
  background:linear-gradient(135deg, #69E9D8, #2DD4BF);
}

.chat-quick-replies button,
.chat-attachment-chip{
  border-color:rgba(45,212,191,.24);
  background:rgba(45,212,191,.10);
}

@media (max-width: 820px){
  .card,
  .feed-card,
  .profile-card,
  .media-card,
  .feed-item,
  .modal__panel{
    border-radius:18px;
    box-shadow:
      0 18px 52px rgba(0,0,0,.32),
      0 1px 0 rgba(255,255,255,.08) inset;
  }

  .app-quicknav{
    border-radius:16px;
    box-shadow:
      0 16px 52px rgba(0,0,0,.28),
      0 1px 0 rgba(255,255,255,.08) inset;
  }
}

/* ===== EOF override: accent-aware premium performance UI ===== */
:root,
html[data-accent="teal"]{
  --ui-accent:#2DD4BF;
  --ui-accent-2:#7DD3FC;
  --ui-accent-rgb:45, 212, 191;
}

html[data-accent="violet"]{
  --ui-accent:#A78BFA;
  --ui-accent-2:#C084FC;
  --ui-accent-rgb:167, 139, 250;
}

html[data-accent="blue"]{
  --ui-accent:#60A5FA;
  --ui-accent-2:#38BDF8;
  --ui-accent-rgb:96, 165, 250;
}

html[data-accent="amber"]{
  --ui-accent:#F5B84B;
  --ui-accent-2:#F97316;
  --ui-accent-rgb:245, 184, 75;
}

body::after,
html[data-theme="contrast"] body::after,
html[data-theme="calm"] body::after{
  background:
    radial-gradient(900px 560px at 82% 0%, rgba(var(--ui-accent-rgb), .13), transparent 62%),
    radial-gradient(760px 500px at 10% 10%, rgba(139,92,246,.11), transparent 58%),
    radial-gradient(820px 560px at 52% 86%, rgba(255,255,255,.045), transparent 66%),
    linear-gradient(180deg, #070A12 0%, #0B1020 54%, #08131B 100%);
  background-size:auto !important;
}

body::before{
  background:
    radial-gradient(620px 360px at 24% 22%, rgba(139,92,246,.14), transparent 70%),
    radial-gradient(720px 420px at 80% 16%, rgba(var(--ui-accent-rgb), .14), transparent 72%);
}

html[data-effects="quiet"] body::before,
html[data-effects="off"] body::before{
  animation:none !important;
  filter:blur(24px) saturate(105%);
  opacity:.24;
}

html[data-effects="quiet"] .bg-svg,
html[data-effects="off"] .bg-svg,
html[data-effects="off"] body::before,
html[data-effects="off"] body::after{
  display:none !important;
}

html[data-effects="quiet"] .card,
html[data-effects="quiet"] .feed-card,
html[data-effects="quiet"] .profile-card,
html[data-effects="quiet"] .media-card,
html[data-effects="quiet"] .feed-item,
html[data-effects="quiet"] .modal__panel,
html[data-effects="quiet"] .chat-sidebar,
html[data-effects="quiet"] .chat-panel,
html[data-effects="off"] .card,
html[data-effects="off"] .feed-card,
html[data-effects="off"] .profile-card,
html[data-effects="off"] .media-card,
html[data-effects="off"] .feed-item,
html[data-effects="off"] .modal__panel,
html[data-effects="off"] .chat-sidebar,
html[data-effects="off"] .chat-panel{
  backdrop-filter:none;
}

.card,
.feed-card,
.profile-card,
.media-card,
.feed-item,
.modal__panel,
.chat-sidebar,
.chat-panel,
.admin-card{
  border-color:rgba(226,232,240,.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.028)),
    rgba(10,16,30,.82);
  box-shadow:
    0 24px 80px rgba(0,0,0,.34),
    0 1px 0 rgba(255,255,255,.07) inset;
}

.btn-primary,
.reaction-btn.active,
.tab-btn.active{
  color:#06120F;
  border-color:rgba(var(--ui-accent-rgb), .55);
  background:linear-gradient(135deg, color-mix(in srgb, var(--ui-accent) 92%, white), var(--ui-accent) 52%, var(--ui-accent-2));
  box-shadow:
    0 14px 34px rgba(var(--ui-accent-rgb), .18),
    0 1px 0 rgba(255,255,255,.24) inset;
}

.btn:hover,
.reaction-btn:hover,
.tab-btn:hover,
.chat-list-item:hover,
.media-card:hover{
  border-color:rgba(var(--ui-accent-rgb), .30);
}

.field__input:focus,
.feed-search:focus-within,
.chat-composer textarea:focus{
  border-color:rgba(var(--ui-accent-rgb), .62);
  box-shadow:
    0 0 0 4px rgba(var(--ui-accent-rgb), .11),
    0 12px 30px rgba(0,0,0,.16);
}

html[data-navigation="compact"] .app-quicknav{
  gap:10px;
  padding:8px;
}

html[data-navigation="compact"] .app-nav-btn,
html[data-navigation="compact"] .feed-actions .btn{
  min-height:40px;
  padding:9px 12px;
  font-size:13px;
}

html[data-navigation="compact"] .app-quicknav__group{
  gap:8px;
}

.settings-grid-form{
  grid-template-columns:repeat(3, minmax(0, 1fr));
}

.settings-toggle-card{
  min-height:92px;
}

@media (max-width: 900px){
  .settings-grid-form{
    grid-template-columns:1fr;
  }
}
