:root {
  color-scheme: dark;
  --bg: #101017;
  --panel: #16161f;
  --panel-raised: #1d1c28;
  --border: #272633;
  --ink: #f6f4fb;
  --muted: #a29fb2;
  --dim: #777488;
  --accent: #b195ff;
  --accent-bright: #9463ff;
  --accent-bg: #29203e;
  --red: #fb426f;
  --green: #48e2a1;
  --header: 72px;
  --rail: 216px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Helvetica Neue", system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 1rem; }
body:has(dialog[open]) { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
img, video { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #c3acff; outline-offset: 4px; }
.skip { position: fixed; left: 12px; top: 8px; padding: 10px; background: var(--panel); z-index: 20; transform: translateY(-150%); }
.skip:focus { transform: translateY(0); }
svg { width: 19px; height: 19px; flex: none; vertical-align: middle; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
.topbar {
  position: sticky; top: 0; display: flex; align-items: center; z-index: 10;
  height: var(--header); padding: 0 28px 0 25px; gap: 27px;
  background: #13131beb; backdrop-filter: blur(18px); border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 164px; font-size: 1.13rem; font-weight: 800; letter-spacing: .08em; line-height: 1.1; }
.brand small { display: block; margin-top: 5px; color: #aaa1c1; font-size: .59rem; font-weight: 750; letter-spacing: .17em; }
.brand-symbol {
  width: 38px; height: 38px; display: flex; justify-content: center; align-items: center; gap: 3px;
  background: linear-gradient(145deg,#ad7aff,#6e3cdd); border-radius: 12px;
  border: 1px solid #cba8ff6b; box-shadow: 0 4px 16px #943cff30, inset 0 1px 0 #fff2;
}
.brand-symbol i { width: 3px; height: 10px; border-radius: 5px; background: white; }
.brand-symbol i:nth-child(2) { height: 20px; }
.brand-symbol i:nth-child(3) { height: 14px; }
.topnav { display: flex; align-self: stretch; gap: 28px; }
.topnav a { display: grid; place-items: center; position: relative; font-weight: 650; font-size: .9rem; white-space: nowrap; color: var(--muted); }
.topnav a:hover, .topnav a.active { color: #ddceff; }
.topnav a.active::after { position: absolute; content: ""; bottom: 0; height: 2px; width: 23px; border-radius: 2px; background: #9b71ff; }
.search {
  display: flex; align-items: center; gap: 9px; width: clamp(180px, 27vw, 340px); min-width: 0; height: 39px;
  margin-left: auto; padding: 0 10px 0 12px; background: #1c1b27; border: 1px solid #302d3e; border-radius: 9px; color: #9a94aa;
}
.search:focus-within { border-color: var(--accent-bright); }
.search input { padding: 0; min-width: 0; width: 100%; border: 0; outline: 0; background: none; color: var(--ink); font-size: .86rem; }
.search input::placeholder { color: #8f899e; }
.search kbd { padding: 0 5px; line-height: 19px; border: 1px solid #383546; border-radius: 4px; font: .72rem/17px ui-monospace, monospace; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.button, .icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
  max-width: 100%; flex-shrink: 0; padding: 0 15px; min-height: 40px; font-size: .88rem;
  font-weight: 700; line-height: 1.2; border-radius: 9px; border: 1px solid transparent; transition: background .18s, border-color .18s, color .18s;
}
.button svg { width: 17px; height: 17px; }
.button-accent { background: #9a68ff; color: #130925; border-color: #ad86ff; box-shadow: 0 4px 13px #8149ec25; }
.button-accent:hover { background: #ba98ff; border-color: #d2baff; }
.button-neutral, .icon-button { background: #211f2c; color: #e5e0f1; border-color: #343043; }
.button-neutral:hover, .icon-button:hover { background: #30283f; border-color: #5b487a; }
.button[aria-pressed="true"] { color: #cbb4ff; background: #302243; border-color: #634795; }
.icon-button { padding: 0; width: 38px; min-height: 38px; }
.account-button { max-width: 120px; }
#account-label { overflow: hidden; text-overflow: ellipsis; }
.sidebar {
  position: fixed; display: flex; flex-direction: column; top: var(--header); bottom: 0; width: var(--rail);
  background: #14141d; border-right: 1px solid var(--border); padding: 25px 14px 0; z-index: 8;
}
.sidebar-main { flex: 1 1 auto; overflow: auto; scrollbar-width: thin; scrollbar-color: #353143 transparent; }
.side-nav, .side-channels { margin-bottom: 21px; }
.side-nav h2, .side-channels h2 {
  padding: 0 12px; margin-bottom: 9px; color: #8e899f; font-size: .76rem; font-weight: 700; letter-spacing: .08em;
}
.side-nav a {
  display: flex; align-items: center; height: 41px; gap: 11px; padding: 0 12px; margin-bottom: 2px;
  border-radius: 8px; font-weight: 590; font-size: .89rem; color: #aaa5b9;
}
.side-nav a:hover, .channel:hover { background: #1e1c2a; color: var(--ink); }
.side-nav a.active { background: #29213e; color: #cbb5ff; }
.side-nav a svg { width: 18px; height: 18px; }
.side-categories, .side-channels { border-top: 1px solid var(--border); padding-top: 19px; }
.channel {
  padding: 7px 9px; display: flex; align-items: center; gap: 8px; border-radius: 8px; font-size: .83rem; min-width: 0;
}
.channel .avatar { width: 29px; height: 29px; }
.channel strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.channel .channel-viewers { white-space: nowrap; font-size: .71rem; color: #a9a3b8; }
.online-dot { width: 6px; height: 6px; flex: none; display: inline-block; border-radius: 50%; background: var(--red); }
.side-footer { padding: 14px 10px; min-height: 47px; border-top: 1px solid var(--border); color: #9690a7; font-size: .77rem; }
.side-footer span { display: inline-flex; align-items: center; gap: 8px; }
.side-footer .online-dot { background: var(--green); box-shadow: 0 0 8px #48e2a17a; }
.main { min-height: calc(100vh - var(--header)); max-width: 1800px; margin-left: var(--rail); padding: 27px clamp(24px,2.7vw,46px) 46px; }
.main:focus { outline: none; }
.mobile-nav { display: none; }
.page-title { font-size: 1.65rem; line-height: 1.2; font-weight: 780; letter-spacing: .015em; }
.heading { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin: 0 0 16px; min-height: 32px; }
.heading h2 { font-size: 1.28rem; letter-spacing: .015em; font-weight: 750; }
.heading h2 svg { color: #c09bff; margin-right: 8px; }
.heading .quiet { font-size: .83rem; color: #a39ab8; }
.gallery-head { margin-bottom: 16px; align-items: center; }
.hero {
  position: relative; min-height: clamp(310px, 29vw, 380px); overflow: hidden; display: flex; align-items: center; isolation: isolate;
  padding: 37px clamp(23px,4vw,58px) 60px; border-radius: 17px; background: #201333;
  border: 1px solid #604080; margin-bottom: 28px;
}
.hero .hero-photo { position: absolute; z-index: -3; inset: 0 0 0 auto; height: 100%; width: 84%; object-fit: cover; object-position: center 45%; }
.hero::before {
  position: absolute; inset: 0; z-index: -2; content: "";
  background: linear-gradient(90deg, #201132 1%, #25123bf7 22%, #28153f88 48%, #190c2700 76%),
              linear-gradient(0deg, #170c27d9 0%, transparent 31%);
}
.hero::after { position: absolute; inset: 0; z-index: -1; pointer-events: none; content: ""; box-shadow: inset 0 0 46px #37136877; }
.hero-copy { position: relative; max-width: 440px; }
.hero-kicker { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; color: #e2d3fa; font-size: .86rem; font-weight: 650; }
.hero-kicker .live-label { position: static; border-radius: 5px; }
.hero h2 { font-size: clamp(2.25rem,4.1vw,4rem); line-height: 1.12; font-weight: 850; letter-spacing: -.035em; text-wrap: balance; }
.hero p { margin: 14px 0 21px; color: #ddd0eb; font-size: .99rem; line-height: 1.65; }
.hero .button { min-height: 44px; padding: 0 17px; }
.hero-bottom { position: absolute; display: flex; justify-content: space-between; align-items: center; left: clamp(23px,4vw,58px); right: 20px; bottom: 15px; }
.hero-dots { display: flex; align-items: center; gap: 3px; }
.hero-dots button { display: grid; place-items: center; width: 26px; height: 26px; padding: 0; background: transparent; border: 0; }
.hero-dots button::after { width: 7px; height: 7px; border-radius: 8px; background: #d5c8ec8c; content: ""; }
.hero-dots button[aria-current="true"] { width: 33px; }
.hero-dots button[aria-current="true"]::after { width: 23px; background: #c196ff; }
.hero-counter { color: #eee9fb; background: #120d1c8c; padding: 5px 10px; border: 1px solid #d7bcff3d; border-radius: 7px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.categories { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; margin-bottom: 28px; }
.category {
  --tint: #bea5ff; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 11px 9px;
  border-radius: 11px; background: #1b1a25; border: 1px solid #2c2939; transition: background .18s, border-color .18s; text-align: left;
}
.category:hover, .category.active { border-color: color-mix(in srgb, var(--tint) 57%, #2c2939); background: color-mix(in srgb, var(--tint) 13%, #161522); }
.cat-icon { width: 35px; height: 35px; display: grid; flex: none; place-items: center; color: var(--tint); border-radius: 9px; background: color-mix(in srgb, var(--tint) 17%, #1c1928); }
.cat-icon svg { width: 19px; height: 19px; }
.category strong { display: block; font-size: .9rem; white-space: nowrap; font-weight: 740; }
.category small { display: block; color: var(--muted); font-size: .69rem; margin-top: 3px; white-space: nowrap; }
.live-count { display: inline-flex; align-items: center; gap: 7px; color: #aca5bd; font-size: .82rem; white-space: nowrap; }
.stream-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 17px; }
.stream-card { min-width: 0; background: #181822; border: 1px solid #292737; border-radius: 12px; transition: border-color .2s, transform .2s; }
.stream-card:hover { border-color: #655088; transform: translateY(-3px); }
.stream-card:focus-within { border-color: #8967bd; }
.stream-link { display: block; border-radius: inherit; }
.cover { border-radius: 11px 11px 0 0; overflow: hidden; position: relative; aspect-ratio: 16/9; isolation: isolate; background: #26213b; }
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.stream-card:hover .cover img { transform: scale(1.04); }
.cover::after { position: absolute; inset: 50% 0 0; z-index: 0; content: ""; background: linear-gradient(transparent, #11101bb7); pointer-events: none; }
.live-label, .viewers { position: absolute; display: inline-flex; z-index: 1; align-items: center; gap: 5px; line-height: 1; white-space: nowrap; border-radius: 6px; font-size: .75rem; font-weight: 770; }
.live-label { top: 10px; left: 10px; padding: 6px 7px; background: #da2657; color: #fff; }
.live-label::before { content: ""; width: 5px; height: 5px; background: #fff; border-radius: 50%; }
.viewers { bottom: 10px; right: 10px; padding: 5px 7px; background: #15111be0; color: #f1ecfc; }
.viewers svg { width: 14px; height: 14px; }
.cover-play { position: absolute; z-index: 1; left: 50%; top: 50%; translate: -50% -50%; border: 1px solid #fff6; background: #190c2c9c; border-radius: 50%; padding: 11px; opacity: 0; transition: opacity .2s; }
.stream-link:hover .cover-play, .stream-link:focus-visible .cover-play { opacity: 1; }
.card-meta { min-width: 0; display: flex; align-items: center; gap: 10px; padding: 12px; }
.avatar { width: 35px; height: 35px; border-radius: 50%; flex: none; object-fit: cover; border: 1px solid #eee3ff38; background: #372651; }
.card-text { min-width: 0; flex: 1; }
.card-text h3 { font-size: .92rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-weight: 720; }
.card-text p { color: #a29bb1; font-size: .77rem; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin-top: 5px; }
.tag { display: inline-flex; align-items: center; flex: none; padding: 4px 7px; font-size: .68rem; font-weight: 670; background: #281f3c; color: #cdb5ff; border-radius: 5px; white-space: nowrap; }
.subheading { margin-bottom: 20px; }
.subheading p { margin-top: 8px; color: var(--muted); font-size: .93rem; line-height: 1.65; }
.back-link { display: inline-flex; padding-bottom: 14px; color: var(--accent); font-size: .88rem; }
.back-link:hover { color: var(--ink); }
.empty { padding: 42px 17px; text-align: center; border: 1px dashed #383247; border-radius: 13px; color: var(--muted); line-height: 1.6; grid-column: 1/-1; }
.empty > svg { margin-bottom: 9px; color: var(--accent); width: 25px; height: 25px; }
.empty p + a { margin-top: 13px; }
.room-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(255px,29%); align-items: start; gap: 17px; }
.room-video { position: relative; aspect-ratio: 16/9; background: #0a0910; border: 1px solid #30293e; border-radius: 13px; overflow: hidden; display: grid; place-items: center; }
.room-video video { width: 100%; height: 100%; position: absolute; inset: 0; object-fit: contain; }
.video-loading { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 11px; padding: 20px; color: #e0d4f9; background: #17102483; text-align: center; }
.video-loading svg { width: 28px; height: 28px; }
.room-info, .room-chat, .studio-panel { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; }
.room-info { margin-top: 13px; padding: 16px; }
.room-info h1 { margin-bottom: 13px; font-size: clamp(1.25rem,2.7vw,1.75rem); line-height: 1.3; overflow-wrap: anywhere; }
.room-profile { display: flex; align-items: center; gap: 11px; }
.room-profile .avatar { width: 39px; height: 39px; }
.room-profile p { color: var(--muted); margin-top: 4px; font-size: .81rem; overflow-wrap: anywhere; }
.room-profile button { margin-left: auto; }
.room-profile .room-name { overflow-wrap: anywhere; }
.room-layout + .streams-section { margin-top: 26px; }
.room-chat { display: flex; flex-direction: column; height: clamp(360px, calc(39vw + 45px), 610px); overflow: hidden; }
.chat-heading { padding: 14px; border-bottom: 1px solid var(--border); }
.chat-heading h2 { font-size: 1rem; }
.chat-heading p { margin-top: 6px; font-size: .75rem; line-height: 1.5; color: var(--muted); }
.chat-log { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 13px; display: flex; flex-direction: column; gap: 12px; overscroll-behavior: contain; }
.chat-log p { font-size: .88rem; line-height: 1.55; color: #e0dceb; overflow-wrap: anywhere; }
.chat-log strong { color: #c6aaff; }
.chat-form { display: flex; padding: 11px; border-top: 1px solid var(--border); gap: 7px; }
.chat-form input, .field input, .field select {
  width: 100%; min-width: 0; padding: 10px 11px; color: var(--ink); font-size: .89rem;
  border: 1px solid #3a324e; background: #1e1b29; border-radius: 7px;
}
.chat-form .button { padding-inline: 10px; }
.studio-grid { display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); gap: 17px; align-items: start; }
.studio-panel { padding: 18px; display: grid; gap: 13px; }
.studio-panel h2 { font-size: 1.12rem; }
.studio-panel p { color: var(--muted); line-height: 1.6; font-size: .86rem; overflow-wrap: anywhere; }
.field { display: grid; gap: 7px; font-size: .88rem; font-weight: 680; }
.field small { color: var(--muted); font-weight: 500; font-size: .77rem; line-height: 1.5; }
.field select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' fill='none' viewBox='0 0 24 24' stroke='%23b8a7cf' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 8px center; }
.studio-panel .button { justify-self: start; }
.studio-panel .room-video { border-radius: 8px; }
.studio-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.studio-rooms { margin-top: 18px; }
.studio-room-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 10px 0; border-top: 1px solid var(--border); }
.studio-room-row a { flex: 1 1 120px; overflow-wrap: anywhere; color: var(--accent); }
.studio-room-row a:hover { text-decoration: underline; }
.account-dialog { width: min(430px,calc(100% - 30px)); background: #1b1927; color: var(--ink); border: 1px solid #403551; border-radius: 16px; padding: 21px; }
.account-dialog::backdrop { background: #080611b8; backdrop-filter: blur(4px); }
.account-dialog form { display: grid; gap: 13px; }
.account-dialog h2 { font-size: 1.35rem; }
.account-dialog p { color: var(--muted); font-size: .89rem; line-height: 1.6; }
.dialog-top, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; }
.dialog-icon { padding: 9px; border-radius: 9px; color: var(--accent); background: var(--accent-bg); }
.dialog-actions { justify-content: flex-end; margin-top: 4px; }
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 25; pointer-events: none; opacity: 0; translate: 0 8px;
  padding: 11px 14px; background: #282035; color: #ede0ff; border: 1px solid #634f80; border-radius: 9px; font-size: .88rem;
  max-width: calc(100% - 34px); transition: opacity .2s, translate .2s;
}
.toast.visible { opacity: 1; translate: 0 0; }
@media (min-width: 1540px) { .stream-grid { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (max-width: 1190px) {
  :root { --rail: 192px; }
  .topbar { padding-left: 17px; gap: 18px; }
  .brand { min-width: 154px; }
  .topnav { gap: 20px; }
  .category { padding: 9px 7px; gap: 7px; }
  .cat-icon { width: 30px; height: 32px; }
}
@media (max-width: 1010px) {
  :root { --rail: 162px; }
  .sidebar { padding-inline: 9px; }
  .brand { min-width: 127px; }
  .topbar { gap: 15px; padding-right: 17px; }
  .topnav { gap: 18px; }
  .categories { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .stream-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .room-layout { grid-template-columns: minmax(0,1fr); }
  .room-chat { height: 320px; }
}
@media (max-width: 760px) {
  :root { --rail: 0px; --header: 62px; }
  .topbar { padding: 0 13px; gap: 10px; }
  .topnav, .sidebar, .go-live, .search kbd { display: none; }
  .brand { min-width: auto; font-size: .96rem; gap: 6px; white-space: nowrap; letter-spacing: 0; }
  .brand small { font-size: .48rem; }
  .brand-symbol { width: 31px; height: 31px; border-radius: 9px; }
  .search { height: 35px; width: min(100%, 300px); padding-inline: 7px; gap: 4px; }
  .search svg { width: 15px; }
  .search input { font-size: .78rem; }
  .account-button { min-height: 35px; padding-inline: 8px; min-width: 37px; max-width: 61px; }
  .account-button [data-icon] { display: none; }
  .main { padding: 17px 13px calc(77px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 1.36rem; }
  .heading { margin-bottom: 10px; }
  .heading h2 { font-size: 1.13rem; }
  .hero { min-height: 288px; margin-bottom: 21px; border-radius: 12px; padding: 23px 15px 47px; }
  .hero .hero-photo { width: 100%; object-position: 55% center; }
  .hero::before { background: linear-gradient(90deg,#211030f5 2%,#211030b8 40%,#21103039 86%),linear-gradient(0deg,#180c25,transparent 40%); }
  .hero h2 { font-size: clamp(1.95rem,6.2vw,2.7rem); }
  .hero p { max-width: 22ch; font-size: .87rem; margin: 9px 0 16px; }
  .hero-kicker { margin-bottom: 10px; }
  .hero-bottom { left: 13px; right: 12px; bottom: 7px; }
  .categories { margin-bottom: 21px; gap: 7px; }
  .category { padding: 7px; gap: 6px; }
  .category strong { font-size: .77rem; }
  .category small { font-size: .65rem; }
  .cat-icon { width: 28px; height: 28px; border-radius: 6px; }
  .cat-icon svg { width: 16px; height: 16px; }
  .stream-grid { gap: 9px; }
  .card-meta { gap: 6px; padding: 8px 6px; }
  .card-meta .avatar { width: 27px; height: 27px; }
  .card-text h3 { font-size: .8rem; }
  .card-text p { font-size: .71rem; margin-top: 3px; }
  .card-meta .tag { display: none; }
  .cover .live-label { top: 6px; left: 6px; }
  .viewers { bottom: 6px; right: 6px; }
  .mobile-nav {
    position: fixed; display: grid; grid-template-columns: repeat(4,1fr); align-items: stretch; z-index: 10;
    inset: auto 0 0; padding-bottom: env(safe-area-inset-bottom); background: #17151fed; backdrop-filter: blur(16px);
    border-top: 1px solid #30283d;
  }
  .mobile-nav a { display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 55px; color: var(--muted); font-size: .72rem; }
  .mobile-nav a.active { color: #c5a8ff; }
  .mobile-nav svg { width: 19px; height: 19px; }
  .studio-grid { grid-template-columns: minmax(0,1fr); }
  .toast { bottom: calc(67px + env(safe-area-inset-bottom)); right: 13px; }
}
@media (max-width: 345px) {
  .brand { font-size: .85rem; }
  .brand-symbol { width: 27px; height: 28px; }
  .account-button { font-size: .78rem; }
  .category { gap: 4px; padding-inline: 4px; }
  .cat-icon { width: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

.side-categories a svg { color: var(--side-tint); }
.local-avatar { display: grid; place-items: center; color: #e2ceff; font-size: .83rem; }
.avatar-music { object-position: 68% 42%; }
.avatar-talk { object-position: 30% 31%; }
.avatar-camp { object-position: 48% 75%; }
