*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; min-height: 100dvh;
  background-color: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: var(--font-size-base);
  line-height: var(--line-height-base); overflow-x: hidden;
  transition: background-color 200ms ease, color 200ms ease;
}
input, textarea, select { font-size: 16px; }
img, video, svg { max-width: 100%; }

header.top {
  position: sticky; top: 0; z-index: 40; height: var(--header-h);
  padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background-color: var(--glass); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--outline);
}
header.top .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
header.top .brand-icon { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
header.top .brand strong { display: block; font-size: 18px; font-weight: 800; }
header.top .brand small { display: block; font-size: 10px; letter-spacing: 0.08em; color: var(--accent); }
header.top form.search {
  flex: 1; max-width: 420px; display: flex; align-items: center;
  background-color: var(--raised); border: 1px solid var(--outline);
  border-radius: var(--radius-full); padding: 2px 6px 2px 14px;
}
header.top form.search input {
  flex: 1; min-width: 0; border: none; background: transparent; color: var(--text); outline: none; height: 34px;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius-full);
  background-color: var(--raised); color: var(--text); border: 1px solid var(--outline);
  font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--card-gradient); color: #06202a; border: none; }
.btn.primary:hover:not(:disabled) { background: var(--card-gradient); color: #06202a; box-shadow: 0 0 18px rgba(0,210,255,.26), 0 0 24px rgba(16,185,129,.16); }
.btn.primary:focus-visible { outline: 2px solid #00D2FF; outline-offset: 2px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 6px 12px; font-size: 13px; }

.app-shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: calc(100dvh - var(--header-h)); }
aside.sidebar {
  position: sticky; top: var(--header-h); height: calc(100dvh - var(--header-h));
  padding: 16px 12px; display: flex; flex-direction: column; gap: 6px;
  background-color: var(--panel); border-right: 1px solid var(--outline); overflow-y: auto;
}
aside.sidebar .nav {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; font-weight: 600; border: none; background: transparent;
  width: 100%; text-align: left; cursor: pointer;
}
aside.sidebar .nav:hover { background-color: var(--raised); color: var(--text); }
aside.sidebar .nav.active { background-color: var(--raised); color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
aside.sidebar .user-strip {
  margin-top: auto; padding: 12px; border-radius: var(--radius);
  background-color: var(--raised); border: 1px solid var(--outline); display: flex; align-items: center; gap: 10px;
}
aside.sidebar .foot { padding: 8px 12px 0; font-size: 11px; color: var(--muted); }

main#main.container { padding: 20px 24px 40px; max-width: 1360px; width: 100%; margin: 0 auto; }

.post-card, .card, .panel {
  background-color: var(--panel); border: 1px solid var(--outline);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px;
}

.avatar {
  width: 38px; height: 38px; border-radius: var(--radius-full);
  background: var(--card-gradient); color: #ffffff; font-weight: 700;
  display: inline-grid; place-items: center; overflow: hidden; flex-shrink: 0;
}
.avatar.sm { width: 30px; height: 30px; font-size: 12px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 90; background-color: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px;
}
.modal {
  width: 100%; max-width: 480px; max-height: 90dvh; overflow-y: auto;
  background-color: var(--panel); color: var(--text); border: 1px solid var(--outline);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.modal.wide { max-width: 760px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--outline);
}

#toast .t {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 100;
  padding: 10px 18px; border-radius: var(--radius-full); background-color: var(--raised);
  color: var(--text); border: 1px solid var(--accent); box-shadow: var(--shadow);
}

#lov-theme-switcher {
  width: 34px; height: 34px; border-radius: var(--radius-full);
  background-color: var(--raised); border: 1px solid var(--outline);
  color: var(--text); display: inline-grid; place-items: center; cursor: pointer; font-size: 16px;
}

nav.phone-nav { display: none; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; }
  aside.sidebar { display: none; }
  main#main.container { padding: 14px 12px calc(var(--phone-nav-h) + env(safe-area-inset-bottom, 16px)); }
  nav.phone-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
    height: calc(var(--phone-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: flex; align-items: center; justify-content: space-around;
    background-color: var(--glass); backdrop-filter: blur(16px); border-top: 1px solid var(--outline);
  }
  nav.phone-nav a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 600;
  }
  nav.phone-nav a.active { color: var(--accent); }
  nav.phone-nav .nav-create {
    width: 44px; height: 34px; border-radius: 12px; background: var(--card-gradient);
    color: #ffffff; border: none; font-size: 20px; font-weight: 800; display: grid; place-items: center;
  }
  body.in-live-room nav.phone-nav, body.in-live-room header.top { display: none; }
  body.in-live-room main#main.container { padding: 0; height: 100dvh; overflow: hidden; }
}
/* ==========================================================================
   INTERNAL MODULES & SCREENS (Feed, Live Catalog, Room v2, DM, Guilds)
   ========================================================================== */

/* Табове и филтри */
.tabs, .feed-tabs, .sub-tabs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 16px;
}
.tabs .btn.active, .tab.active {
  background: var(--card-gradient); color: #ffffff; border-color: transparent;
}

/* Начало / Feed & LIVE Каталог */
#feed-posts, .live-grid, .ocean-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px;
}
.post-card .row, .post-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px;
}
.post-card video, .post-card img.media, .feed-live-card video {
  width: 100%; border-radius: var(--radius-sm); background-color: #05080f;
  aspect-ratio: 9 / 14; object-fit: cover; display: block;
}
.actionbar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--outline);
}
.ocean-live-badge, .live-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px;
  border-radius: var(--radius-full); background-color: var(--red); color: #ffffff;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
}

/* Формуляри, Профил и Настройки */
.stack { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
  background-color: var(--raised); color: var(--text); border: 1px solid var(--outline);
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.profile-cover {
  height: 150px; border-radius: var(--radius) var(--radius) 0 0;
  background: var(--card-gradient); margin: -16px -16px 16px;
}
progress {
  width: 100%; height: 10px; border-radius: var(--radius-full);
  overflow: hidden; accent-color: var(--accent);
}

/* Директни съобщения и Гилдии */
#inbox-thread-list { display: flex; flex-direction: column; gap: 8px; }
.thread-row, .guild-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  background-color: var(--panel); border: 1px solid var(--outline);
  text-decoration: none; color: var(--text);
}
.thread-row:hover, .guild-row:hover { border-color: var(--accent); background-color: var(--raised); }
#dm-bubbles, #group-bubbles {
  display: flex; flex-direction: column; gap: 8px; padding: 14px;
  max-height: 58dvh; overflow-y: auto; background-color: var(--bg);
  border-radius: var(--radius-sm); border: 1px solid var(--outline);
}

/* ==========================================================================
   LIVE STUDIO V2 (#lov-studio-v2) — Desktop Split & Mobile 100dvh
   ========================================================================== */
#lov-studio-v2 {
  display: grid; grid-template-columns: 1fr 370px;
  width: 100%; height: 100dvh; background-color: #05080f; color: #f8fafc; overflow: hidden;
}
#lov-main-stage {
  position: relative; display: flex; flex-direction: column;
  height: 100dvh; overflow: hidden; background-color: #05080f;
}
#lov-pk-scorebar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 14px; background: linear-gradient(90deg, var(--red) 0%, var(--accent) 100%);
  color: #ffffff; font-weight: 800; font-size: 13px; z-index: 15;
}
#speaker-grid, #lov-seats-slot {
  flex: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px; padding: 10px; overflow: hidden;
}
.room-tile, #lov-cinema, #lov-belote-stage, #lov-game-board {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background-color: #0f1624; border: 1px solid rgba(255, 255, 255, 0.1);
}
.room-tile video { width: 100%; height: 100%; object-fit: cover; }

#lov-chat {
  display: flex; flex-direction: column; height: 100dvh;
  background-color: var(--panel); color: var(--text);
  border-left: 1px solid var(--outline); overflow: hidden;
}
#room-lines {
  flex: 1; padding: 12px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px;
}
.lov-chat-editor, .lov-hud-viewer-compose {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--outline); background-color: var(--panel);
}
.lov-chat-editor input, .lov-hud-viewer-compose input {
  flex: 1; min-width: 0; padding: 9px 14px; border-radius: var(--radius-full);
  background-color: var(--raised); color: var(--text); border: 1px solid var(--outline);
}

@media (max-width: 900px) {
  #lov-studio-v2 { grid-template-columns: 1fr; }
  .lov-mo-top {
    position: absolute; top: 0; left: 0; right: 0; z-index: 25;
    padding: calc(10px + env(safe-area-inset-top, 0px)) 12px 10px;
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
  }
  .lov-mo-bottom {
    position: absolute; bottom: 0; left: 0; right: 0; z-index: 25;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.82) 0%, transparent 100%);
  }
  #lov-chat {
    position: fixed; left: 0; right: 0; bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    height: 36dvh; background: transparent; border: none; pointer-events: none; z-index: 20;
  }
  #room-lines {
    pointer-events: auto; mask-image: linear-gradient(transparent 0%, black 18%);
  }
  .lov-mo-more {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    max-height: 75dvh; overflow-y: auto; padding: 16px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    background-color: var(--panel); color: var(--text);
    border-radius: var(--radius) var(--radius) 0 0; border-top: 1px solid var(--outline);
  }
  .lov-mo-more[hidden] { display: none; }
}


/* Visual fixes: consistent dark shell, readable feed links/tabs, auth dialog.
   Excludes LIVE room and does not touch its layout or broadcast controls. */
html, body { overflow-x: hidden; }
html[data-theme="dark"] body:not(.in-live-room) {
  background: #0B0B0F;
  color: #FFFFFF;
  color-scheme: dark;
}
body:not(.in-live-room) :is(.app-shell, main#main.container) { min-width: 0; }
@media (min-width: 861px) {
  body:not(.in-live-room) .app-shell {
    height: calc(100dvh - var(--header-h));
    min-height: 0;
    overflow: hidden;
  }
  body:not(.in-live-room) main#main.container {
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }
  body:not(.in-live-room):has(.feed #feed-posts) main#main.container {
    overflow: hidden;
  }
}
body:not(.in-live-room) :is(.card, .post-card, .panel, .modal, .postthumb) {
  background-color: #14141C;
  color: #FFFFFF;
}
body:not(.in-live-room) :is(.feed-tabs, .ocean-tab-links) {
  display: inline-flex !important;
  align-items: center !important;
  gap: 16px !important;
  margin-top: 12px;
}
body:not(.in-live-room) :is(.feed-tabs, .ocean-tab-links) a {
  display: inline-flex;
  align-items: center;
  color: #FFFFFF !important;
  text-decoration: none !important;
  white-space: nowrap;
}
body:not(.in-live-room) #feed-posts :is(.post-card, .post) a,
body:not(.in-live-room) .feed .post-card a {
  text-decoration: none !important;
  color: #FFFFFF !important;
}
body:not(.in-live-room) #feed-posts .names {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
body:not(.in-live-room) #feed-posts .names > a,
body:not(.in-live-room) #feed-posts .names > small {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}
body:not(.in-live-room) #feed-posts .names strong { word-spacing: 0.15em; }
#modal-root .modal-backdrop .modal {
  background: #14141C !important;
  color: #FFFFFF !important;
  border-color: #30303A;
}
#modal-root .modal:has(.lov-auth-logo) .lov-auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  text-align: center;
  margin: 0 auto 20px;
}
#modal-root .modal:has(.lov-auth-logo) .lov-auth-logo img {
  display: block;
  margin: 0 auto;
}
#modal-root .modal:has(.lov-auth-logo) :is(input, textarea, select) {
  background: #1E1E2A !important;
  color: #FFFFFF !important;
  border: 1px solid #393947;
}
#modal-root .modal:has(.lov-auth-logo) input::placeholder { color: #A5A5B5; }
#modal-root .modal:has(.lov-auth-logo) .lov-auth-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Welcome modal in an installed desktop PWA: hide the grey inner scrollbar
   without clipping registration fields when the window is unusually short. */
#modal-root .modal:has(#auth-form) {
  width: min(440px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#modal-root .modal:has(#auth-form)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
#modal-root .modal:has(#auth-form) .lov-auth-logo {
  gap: 0;
  margin: 0 auto 12px;
}
@media (max-height: 760px) {
  #modal-root .modal:has(#auth-form) {
    padding: clamp(12px, 2dvh, 18px);
  }
  #modal-root .modal:has(#auth-form) > .modal-head {
    margin-bottom: 8px;
    padding-bottom: 8px;
  }
  #modal-root .modal:has(#auth-form) .lov-auth-logo {
    margin-bottom: 8px;
  }
  #modal-root .modal:has(#auth-form) .lov-auth-logo img {
    width: clamp(56px, 11dvh, 76px);
    height: clamp(56px, 11dvh, 76px);
  }
  #modal-root .modal:has(#auth-form) .lov-auth-tabs {
    margin-bottom: 10px;
  }
  #modal-root .modal:has(#auth-form) #auth-form {
    gap: 10px;
  }
  #modal-root .modal:has(#auth-form) #auth-form .field {
    gap: 4px;
  }
  #modal-root .modal:has(#auth-form) #auth-form .field input {
    padding-block: 7px;
  }
  #modal-root .modal:has(#auth-form) .install-under-registration {
    margin-top: 8px;
  }
}


/* Modern For You pill tabs — preserve desktop and mobile feed geometry. */
html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links {
 display:inline-flex!important;align-items:center!important;gap:12px!important;margin-top:12px;max-width:100%;
}
html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill {
 display:inline-flex!important;align-items:center;justify-content:center;min-height:36px;
 padding:7px 14px!important;border-radius:999px!important;
 border:1px solid rgba(255,255,255,.24)!important;background:rgba(20,20,28,.6)!important;
 color:#fff!important;text-decoration:none!important;white-space:nowrap;
 font-weight:700;text-shadow:none!important;backdrop-filter:blur(10px);
}
html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill.active,
html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill[aria-current="page"] {
 background:#fff!important;color:#14141C!important;border-color:#fff!important;box-shadow:0 3px 16px #0004!important;
}
html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill::after {content:none!important;display:none!important;}
@media(max-width:390px){
 html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links{gap:6px!important;}
 html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill{padding:6px 9px!important;font-size:12px!important;}
}


/* Desktop web app-shell and adaptive video-card grid. LIVE room is excluded. */
@media (min-width:768px) {
 html,body { height:100%; overflow:hidden; }
 body:not(.in-live-room) { height:100%; overflow:hidden; }
 body:not(.in-live-room) header.top {
   position:relative; top:0; height:64px; min-height:64px;
 }
 body:not(.in-live-room) .app-shell {
   display:grid; grid-template-columns:240px minmax(0,1fr);
   height:calc(100vh - 64px); min-height:0; overflow:hidden;
 }
 body:not(.in-live-room) aside.sidebar {
   position:relative; top:0; height:calc(100vh - 64px);
   min-height:0; overflow-y:auto;
 }
 body:not(.in-live-room) main#main.container,
 body:not(.in-live-room):has(.feed #feed-posts) main#main.container {
   width:100%; max-width:none; min-width:0;
   height:calc(100vh - 64px); min-height:0;
   padding:24px; overflow-y:auto; overflow-x:hidden;
   overscroll-behavior-y:contain; scroll-behavior:smooth;
 }
 body:not(.in-live-room) .feed {
   position:relative!important; inset:auto!important;
   display:block!important; height:auto!important;
   overflow:visible!important; max-width:100%;
 }
 body:not(.in-live-room) .feed .ocean-tabs {
   position:sticky!important; top:0!important; left:auto!important;
   width:100%!important; height:auto!important;
   transform:none!important; padding:10px 0 18px!important;
   display:flex!important; background:#0B0B0F!important; z-index:30;
 }
 body:not(.in-live-room) .feed #feed-posts,
 body:not(.in-live-room) #feed-posts,
 body:not(.in-live-room) .lov-discovery-video-grid,
 body:not(.in-live-room) .postgrid {
   display:grid!important;
   grid-template-columns:repeat(auto-fill,minmax(240px,1fr))!important;
   align-items:start; gap:20px!important;
 }
 body:not(.in-live-room) .feed #feed-posts {
   position:static!important; inset:auto!important;
   transform:none!important; margin:0!important;
   width:100%!important; height:auto!important;
   max-height:none!important; overflow:visible!important;
   scroll-snap-type:none!important; border:0!important;
   background:transparent!important;
 }
 body:not(.in-live-room) .feed #feed-posts > article,
 body:not(.in-live-room) #feed-posts > .post-card {
   position:relative!important; display:flex!important;
   flex-direction:column!important; min-width:0!important;
   width:100%!important; height:auto!important; min-height:0!important;
   padding:12px!important; margin:0!important;
   scroll-snap-align:none!important; overflow:visible!important;
   border-radius:14px!important; background:#14141C!important;
 }
 body:not(.in-live-room) #feed-posts > .post-placeholder {
   min-height:0!important; aspect-ratio:9/16;
 }
 body:not(.in-live-room) #feed-posts .post-card .info {
   display:flex!important; align-items:center!important;
   gap:10px!important; position:static!important;
   padding:0!important; margin:0 0 10px!important;
   color:#fff; min-width:0;
 }
 body:not(.in-live-room) #feed-posts .post-card .names { flex:1; }
 body:not(.in-live-room) #feed-posts .post-card .post-media {
   position:relative!important; inset:auto!important;
   width:100%!important; height:clamp(360px,52vh,460px)!important;
   min-height:0!important; flex:0 0 auto;
   overflow:hidden; border-radius:12px!important;
   background:#09090d!important;
 }
 body:not(.in-live-room) #feed-posts .post-card .post-media :is(video,img),
 body:not(.in-live-room) .post-card :is(video,img.media),
 body:not(.in-live-room) .lov-discovery-media :is(img,video) {
   width:100%!important; height:100%!important;
   object-fit:cover!important; border-radius:12px!important;
 }
 body:not(.in-live-room) #feed-posts .post-card .caption {
   position:static!important; margin:10px 0 8px!important;
   padding:0!important; max-height:3.1em; overflow:hidden;
   display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical;
 }
 body:not(.in-live-room) #feed-posts .post-card .actionbar {
   position:static!important; inset:auto!important;
   display:flex!important; flex-direction:row!important;
   flex-wrap:wrap!important; align-items:center!important;
   justify-content:flex-start!important;
   gap:6px!important; padding:0!important; margin-top:auto;
   width:100%; background:transparent!important;
 }
 body:not(.in-live-room) #feed-posts .post-card .actionbar .btn {
   min-width:0; padding:5px 8px; font-size:12px;
 }
 body:not(.in-live-room) #feed-posts .ocean-live-card {
   min-height:clamp(360px,52vh,460px)!important;
 }
}
@media(max-width:767px) {
 html,body { width:100%; height:100%; overflow:hidden; }
 body:not(.in-live-room) .app-shell {
   display:block; height:calc(100dvh - var(--header-h));
   min-height:0; overflow:hidden;
 }
 body:not(.in-live-room) main#main.container {
   height:100%; min-height:0; overflow-y:auto;
   overscroll-behavior-y:contain;
 }
 body:not(.in-live-room):has(.feed #feed-posts) .feed {
   position:fixed!important; inset:0!important;
   overflow:hidden!important; height:100dvh!important;
 }
 body:not(.in-live-room) .feed #feed-posts {
   height:100dvh!important; max-height:100dvh!important;
   overflow-y:auto!important; overflow-x:hidden!important;
   scroll-snap-type:y mandatory!important;
   overscroll-behavior-y:contain;
   -webkit-overflow-scrolling:touch;
 }
 body:not(.in-live-room) .feed #feed-posts > article {
   height:100dvh!important; min-height:100dvh!important;
   scroll-snap-align:start!important; scroll-snap-stop:always;
 }
 body:not(.in-live-room) nav.phone-nav {
   position:fixed!important;
   bottom:env(safe-area-inset-bottom,0px);
   z-index:60;
 }
}

/* liveOVER cyan-emerald action accent. Colors only: preserve feed geometry and scrolling. */
body:not(.in-live-room) :is(header.top .auth-actions, aside.sidebar .user-strip, .lov-live-list-header) .btn.primary,
body:not(.in-live-room) .btn.primary,
body:not(.in-live-room) nav.phone-nav .nav-create {
  background: var(--card-gradient) !important;
  color: #06202a !important;
}
body:not(.in-live-room) :is(header.top .auth-actions, aside.sidebar .user-strip, .lov-live-list-header) .btn.primary:hover:not(:disabled),
body:not(.in-live-room) .btn.primary:hover:not(:disabled),
body:not(.in-live-room) nav.phone-nav .nav-create:hover:not(:disabled) {
  box-shadow: 0 0 18px rgba(0,210,255,.26), 0 0 24px rgba(16,185,129,.16);
}
/* No missing-glyph placeholder above the empty LIVE directory message. */
body:not(.in-live-room) .lov-official-live-list .empty .symbol:empty { display: none; }

/* Unified liveOVER cyan-emerald feed presentation. Desktop grid and snap rules unchanged. */
body:not(.in-live-room) #feed-posts .actionbar :is([data-action="like"],[data-action="comments"],[data-action="share-post"],[data-action="feed-sound"]){color:white;border:0;background:transparent}
body:not(.in-live-room) #feed-posts .actionbar .ocean-action-follow,
body:not(.in-live-room) nav.phone-nav .nav-create{background:linear-gradient(135deg,#00D2FF,#10B981);color:#05212b}
body:not(.in-live-room) #feed-posts .actionbar .ocean-action-follow:hover,
body:not(.in-live-room) nav.phone-nav .nav-create:hover{box-shadow:0 0 18px #00d2ff50,0 0 18px #10b98130}
body:not(.in-live-room) #feed-posts .actionbar .ocean-sound-disc{border-radius:50%;aspect-ratio:1;background:#14141C!important;animation:lov-disc-spin 5s linear infinite}
@keyframes lov-disc-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){body:not(.in-live-room) #feed-posts .actionbar .ocean-sound-disc{animation:none}}
@media(max-width:767px){
 html body:not(.in-live-room) .feed .ocean-tabs{position:fixed!important;top:0!important;left:0!important;right:0!important;width:100%!important;margin:0!important;padding:calc(env(safe-area-inset-top,0px) + 10px) 12px 7px!important;display:flex!important;justify-content:center!important;background:linear-gradient(180deg,#09090d90,transparent)!important;z-index:25!important;pointer-events:none}
 html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links{display:flex!important;justify-content:center!important;gap:10px!important;max-width:100%!important;margin:0!important;pointer-events:auto}
 html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill{background:#14141c99!important;border-color:#ffffff30!important;color:white!important;min-height:34px}
 html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill.active,
 html body:not(.in-live-room) .feed .ocean-tabs .ocean-tab-links a.ocean-pill[aria-current="page"]{background:linear-gradient(135deg,#00D2FF,#10B981)!important;color:#05212b!important;border-color:transparent!important;box-shadow:0 0 16px #00d2ff50!important}
 body:not(.in-live-room) .feed #feed-posts .post-card{background:#09090D}
 body:not(.in-live-room) .feed #feed-posts .post-card .actionbar{position:absolute!important;right:10px!important;bottom:calc(var(--phone-nav-h,62px) + env(safe-area-inset-bottom,0px) + 82px)!important;z-index:5!important;display:flex!important;flex-direction:column!important;align-items:center!important;gap:8px!important;width:58px!important;background:transparent!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .actionbar .ocean-action-avatar{width:48px!important;height:48px!important;border-radius:50%!important;position:relative!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .actionbar .ocean-action-avatar .avatar{width:48px!important;height:48px!important;border-radius:50%!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .actionbar .ocean-action-follow{position:relative!important;top:-21px!important;left:0!important;right:auto!important;bottom:auto!important;width:24px!important;height:24px!important;border-radius:50%!important;border:2px solid #09090D!important;font-size:0!important;margin-bottom:-17px!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .actionbar .ocean-action-follow::after{content:"+"!important;font-size:17px!important;font-weight:800!important;line-height:19px!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .actionbar :is([data-action="like"],[data-action="comments"],[data-action="share-post"]){display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:3px!important;min-width:48px!important;color:white!important;text-shadow:0 1px 5px #000!important;padding:5px 2px!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .actionbar .ocean-sound-disc{width:43px!important;height:43px!important;min-width:43px!important;display:grid!important;place-items:center!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .info{position:absolute!important;left:14px!important;right:80px!important;bottom:calc(var(--phone-nav-h,62px) + env(safe-area-inset-bottom,0px) + 104px)!important;z-index:4!important;width:auto!important}
 body:not(.in-live-room) .feed #feed-posts .post-card .caption{position:absolute!important;left:14px!important;right:80px!important;bottom:calc(var(--phone-nav-h,62px) + env(safe-area-inset-bottom,0px) + 22px)!important;z-index:4!important;max-height:68px;overflow:hidden}
 body:not(.in-live-room) nav.phone-nav{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;background:#09090dee!important;border-top:1px solid #ffffff22!important}
 body:not(.in-live-room) nav.phone-nav .nav-create{justify-self:center;width:52px;height:42px;border-radius:13px}
}

/* LIVE-only control and chat repairs. No #feed or #profile selectors. */
html body.in-live-room #lov-studio-v2{--lov-room-gradient:linear-gradient(135deg,#00D2FF 0%,#10B981 100%)}
html body.in-live-room #lov-studio-v2 .lov-side-actions{display:none}
html body.in-live-room #lov-studio-v2 .lov-room-send{background:var(--lov-room-gradient)!important;color:#061d27!important;border:0!important;box-shadow:0 0 12px #00d2ff33;white-space:nowrap;gap:6px;cursor:pointer}
html body.in-live-room #lov-studio-v2 .lov-room-send:disabled{opacity:.55;cursor:not-allowed}
html body.in-live-room #lov-studio-v2 .lov-room-send:hover:not(:disabled){box-shadow:0 0 18px #00d2ff66,0 0 14px #10b98155}
html body.in-live-room #lov-studio-v2 .chat-send{display:flex;align-items:center;gap:8px;min-width:0}
html body.in-live-room #lov-studio-v2 .chat-send .lov-chat-editor{min-width:0;flex:1}
html body.in-live-room #lov-studio-v2 .chat-send textarea{min-width:0;flex:1;resize:none}
html body.in-live-room #lov-studio-v2 #lov-main-stage .lov-mode-vacancy[hidden],
html body.in-live-room #lov-studio-v2 #lov-main-stage #lov-effects-strip:empty{display:none!important}
/* Suppress unassigned decorative pseudo-bars in the SOLO video scene only. */
html body.in-live-room #lov-studio-v2[data-unified-mode="solo"] #lov-main-stage .lov-mode-vacancy{display:none!important}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-mo-host-pill{gap:10px;padding:12px;min-width:0;max-width:100%;box-sizing:border-box}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-mo-host-stack{min-width:0;max-width:100%}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-mo-host-text{max-width:100%;flex:1;gap:3px;overflow:visible}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-hud-badges{display:flex;gap:6px;flex-wrap:wrap}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-mo-top button,
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-mo-bottom button,
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-side-actions button{pointer-events:auto;touch-action:manipulation}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-side-actions button{border:1px solid #00d2ff55;background:#14141C;color:#ecfeff;border-radius:10px;padding:9px 10px;min-height:40px;font-weight:700}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-side-actions button:hover{background:#143a46;box-shadow:0 0 10px #00d2ff33}
html body.in-live-room.lov-mo-live #lov-studio-v2 .lov-side-actions button:focus-visible{outline:2px solid #00D2FF;outline-offset:2px}
@media(min-width:768px){
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar #lov-mobile-overlay{grid-template-rows:auto minmax(0,1fr) auto!important}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar .lov-mo-top{display:flex;flex-direction:column;align-items:stretch;gap:10px;padding:0;position:relative;pointer-events:auto;min-width:0}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar .lov-mo-host-stack{flex:1 1 auto;width:100%}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar .lov-mo-host-pill{width:100%}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar .lov-mo-right{width:100%;display:flex;justify-content:space-between;gap:10px;pointer-events:auto}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar .lov-side-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;pointer-events:auto}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar #lov-chat{position:relative!important;inset:auto!important;height:100%!important;max-height:none!important;min-height:0!important;opacity:1;visibility:visible;pointer-events:auto;mask-image:none!important;-webkit-mask-image:none!important}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar :is(#lov-chat-slot,.room-chat){display:flex!important;flex-direction:column!important;flex:1 1 auto!important;min-height:0!important;height:100%!important;max-height:none!important;overflow:hidden!important}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar #room-lines{display:flex!important;flex:1 1 auto!important;min-height:0!important;height:auto!important;max-height:none!important;overflow-y:auto!important;mask-image:none!important;-webkit-mask-image:none!important}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar .chat-send{flex:none!important;width:100%;padding:8px 0!important;background:#14141C!important}
 html body.in-live-room.lov-mo-live #main #lov-studio-v2.lov-mobile-layered[data-live-viewport="desktop"] #lov-live-sidebar .lov-room-send{flex:0 0 auto;min-width:88px;min-height:42px;border-radius:12px}
}
@media(max-width:767px){
 html body.in-live-room #lov-studio-v2 .lov-room-send{flex:0 0 36px!important;min-width:36px!important;width:36px!important;height:36px!important;border-radius:50%!important;padding:0!important;display:grid!important;place-items:center!important}
 html body.in-live-room #lov-studio-v2 .lov-send-label{display:none!important}
}


/* Restored badge component bounds from legacy styles.css (not linked by index.html).
   Fixes gigantic SVG diamond/wing geometry in Levels, profile, and LIVE tiles. */
.pill.lov-glass-badge{
 position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;gap:4px;
 flex:0 0 auto;min-width:42px;max-width:100%;height:24px;padding:2px 10px;
 vertical-align:middle;border:1px solid hsl(var(--lov-badge-hue,210) 70% 70% / .8);
 border-radius:9px;background:linear-gradient(145deg,hsl(var(--lov-badge-hue,210) 65% 24% / .85),#071524dc);
 box-shadow:inset 0 1px 0 #ffffff38,0 0 9px hsl(var(--lov-badge-hue,210) 70% 45% / .22);
 color:hsl(var(--lov-badge-hue,210) 90% 86%);font-size:11px;font-weight:800;line-height:1;
 white-space:nowrap;box-sizing:border-box;overflow:visible;
}
.lov-glass-badge.vip{border-radius:6px 12px 6px 12px}
.lov-glass-badge.guild{border-radius:7px 7px 11px 11px}
.lov-glass-badge svg.lov-badge-icon,.lov-badge-icon{
 display:inline-block!important;position:static!important;flex:0 0 16px!important;
 width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;
 max-width:16px!important;max-height:16px!important;overflow:visible;
}
.lov-glass-badge.gold-wings{border-color:#e7c45e;padding-inline:13px;box-shadow:inset 0 1px #ffedaa55,0 0 10px #d8b54a35}
.lov-glass-badge svg.lov-gold-wings{
 position:absolute!important;inset:-5px -15px!important;z-index:-1!important;
 width:calc(100% + 30px)!important;height:34px!important;
 max-width:none!important;max-height:34px!important;pointer-events:none!important;
}
.lov-glass-badge.inactive{opacity:.55;filter:saturate(.3)}
.lov-live-level-badges,.lov-profile-levels{display:inline-flex;flex-wrap:wrap;align-items:center;gap:5px;min-width:0}
.lov-level-cards{align-items:stretch}
.lov-level-card{display:flex;flex-direction:column;align-items:stretch;gap:12px;min-width:0}
.lov-level-card h2{margin:0;font-size:17px}
.lov-level-card .row.between{min-width:0;gap:8px;flex-wrap:wrap}
.lov-level-card .row.between .lov-glass-badge{flex:none}
.lov-level-card>.btn{margin-top:auto}
.lov-level-meter{display:grid;gap:6px;min-width:0;width:100%}
.lov-level-meter progress{display:block;width:100%;height:12px;accent-color:#00D2FF;border-radius:999px}
.lov-level-meter .row{gap:9px;flex-wrap:wrap}
.lov-level-meter small{font-size:11px;color:#b1dbea}
