:root {
  color-scheme: dark;
  --bg: #0c0e0e;
  --panel: rgba(18, 20, 20, 0.92);
  --panel-strong: #1c1e1e;
  --line: rgba(255, 255, 255, 0.16);
  --line-strong: rgba(255, 255, 255, 0.34);
  --text: #f4f4f2;
  --muted: #949594;
  --accent: #00e5fd;
  --accent-light: #82f3ff;
  --accent-deep: #00e5fd;
  --success: #48bd74;
  --danger: #e34b4b;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 220ms;
  font-family: "Rajdhani", "Arial Narrow", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: linear-gradient(115deg, #090b0b, #0e1010 52%, #0a0c0c);
}

body::before,
body::after {
  position: fixed;
  z-index: 0;
  bottom: -22vh;
  width: 45vw;
  height: 78vh;
  content: "";
  pointer-events: none;
  opacity: 0.34;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26) 0 1px, transparent 1.7px) 0 0 / 12px 12px;
  mask-image: radial-gradient(ellipse at center, #000 5%, transparent 68%);
  transform: rotate(12deg);
}

body::before { left: -10vw; }
body::after { right: -12vw; transform: rotate(-15deg); }

.site-header,
main.page {
  animation: portalPageIn 420ms var(--ease) both;
  transition: opacity 180ms ease, transform 180ms ease;
}

body.page-leaving .site-header,
body.page-leaving .sticky-header,
body.page-leaving main.page {
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
}

@keyframes portalPageIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[hidden] { display: none !important; }

.app-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding-left: 76px;
}

.side-rail {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  display: block;
  width: 76px;
  border-right: 1px solid var(--line);
  background: rgba(9, 11, 11, 0.5);
}

.side-rail span {
  position: absolute;
  top: 50%;
  left: 50%;
  color: #e6e7e5;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 2px;
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-90deg);
}

.site-header {
  position: relative;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 104px;
  padding: 0 34px 0 48px;
}

.site-nav {
  display: flex;
  grid-column: 2;
  gap: 48px;
  align-items: center;
}

.site-nav a {
  position: relative;
  padding: 20px 0 9px;
  color: #777978;
  font-size: 18px;
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

.site-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 1px;
  content: "";
  background: var(--accent);
  transition: inset var(--duration) var(--ease);
}

.site-nav a:hover,
.site-nav a.active { color: var(--text); }
.site-nav a:hover::after,
.site-nav a.active::after { right: 0; left: 0; }

.sticky-header {
  position: fixed;
  z-index: 90;
  top: 10px;
  right: 18px;
  left: 94px;
  display: grid;
  min-height: 72px;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 8px 18px 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  opacity: 0;
  background: rgba(10, 12, 12, 0.78);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  pointer-events: none;
  transform: translateY(-18px) scale(0.985);
  transition: opacity 240ms var(--ease), transform 300ms var(--ease);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
  backdrop-filter: blur(18px) saturate(125%);
}

.sticky-header.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sticky-brand {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(0, 229, 253, 0.16);
  border-radius: 11px;
  background: rgba(0, 229, 253, 0.06);
}

.sticky-brand img { width: 100%; height: 100%; object-fit: cover; }

.sticky-nav {
  display: flex;
  gap: clamp(22px, 3vw, 48px);
  align-items: center;
  justify-content: center;
}

.sticky-nav a {
  position: relative;
  padding: 15px 0 9px;
  color: #858786;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--duration) var(--ease);
}

.sticky-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 0;
  left: 50%;
  height: 2px;
  content: "";
  background: var(--accent);
  transition: inset var(--duration) var(--ease);
}

.sticky-nav a:hover,
.sticky-nav a.active { color: var(--text); }
.sticky-nav a:hover::after,
.sticky-nav a.active::after { right: 0; left: 0; }
.sticky-account { min-width: max-content; }

.account-area {
  display: flex;
  grid-column: 3;
  gap: 8px;
  justify-self: end;
  align-items: center;
}

.account-login,
.account-user,
.logout-button {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.account-login {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 8px 4px;
  font-size: 17px;
  cursor: pointer;
  transition: color var(--duration) var(--ease);
}

.account-login:hover { color: var(--text); }

.account-login .icon {
  display: block;
  width: 19px;
  height: 19px;
  color: var(--accent);
  filter: drop-shadow(0 0 7px rgba(0, 229, 253, 0.28));
  transition: color var(--duration) var(--ease), filter var(--duration) var(--ease), transform var(--duration) var(--ease);
}

.account-login .icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
  stroke: none;
}

.account-login:hover .icon {
  color: var(--accent-light);
  filter: drop-shadow(0 0 9px rgba(130, 243, 255, 0.5));
  transform: scale(1.06);
}

.account-user {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  padding: 6px 4px;
  font-size: 17px;
  cursor: pointer;
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.account-user:hover,
.account-user[aria-expanded="true"] { color: var(--text); }

.account-menu { position: relative; }
.account-chevron { display: block; width: 15px; height: 15px; transition: transform var(--duration) var(--ease); }
.account-user[aria-expanded="true"] .account-chevron { transform: rotate(180deg); }
.account-dropdown {
  position: absolute;
  z-index: 120;
  top: calc(100% + 10px);
  right: 0;
  width: 224px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 12px;
  background: rgba(15, 17, 17, 0.88);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  animation: accountDropIn 180ms var(--ease) both;
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
}
.account-dropdown-identity { display: flex; gap: 10px; align-items: center; padding: 9px 10px 12px; margin-bottom: 5px; border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
.account-dropdown-identity .account-avatar { width: 34px; height: 34px; flex: 0 0 auto; }
.account-dropdown-identity span { min-width: 0; }
.account-dropdown-identity small, .account-dropdown-identity strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-dropdown-identity small { color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.account-dropdown-identity strong { font-size: 15px; font-weight: 600; }
.account-dropdown a, .account-dropdown button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px; border: 0; border-radius: 7px; color: #c2c4c3; background: transparent; font: inherit; font-size: 15px; text-align: left; text-decoration: none; cursor: pointer; transition: color var(--duration) var(--ease), background var(--duration) var(--ease); }
.account-dropdown a:hover, .account-dropdown button:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }
.account-dropdown button:hover { color: var(--danger); }
.account-dropdown .icon { width: 17px; height: 17px; }
@keyframes accountDropIn { from { opacity: 0; transform: translateY(-5px) scale(.98); } to { opacity: 1; transform: none; } }

.account-avatar {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: #252727;
}

.account-avatar-fallback {
  display: grid;
  place-items: center;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.logout-button {
  display: grid;
  width: 30px;
  height: 30px;
  padding: 7px;
  place-items: center;
  border-radius: 4px;
  cursor: pointer;
  transition: color var(--duration) var(--ease), background var(--duration) var(--ease);
}

.logout-button:hover {
  color: var(--accent-light);
  background: rgba(130, 243, 255, 0.12);
}

.logout-button svg,
.account-chevron svg,
.search-box svg,
.icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.page {
  position: relative;
  z-index: 2;
  width: min(1600px, calc(100vw - 116px));
  min-height: calc(100vh - 104px);
  margin: 0 auto;
  padding: 44px 0 50px;
}

.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  min-height: 126px;
  margin-bottom: 30px;
  border-top: 1px solid var(--line-strong);
}

.page-heading-copy {
  padding-top: 6px;
}

.eyebrow,
.page-heading h1 {
  margin: 0;
  font-size: 37px;
  font-weight: 700;
  line-height: 0.96;
  text-transform: uppercase;
}

.page-heading h1 { color: var(--accent); }
.page-heading p,
.hero-copy p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 18px;
}

.search-box {
  display: flex;
  width: min(500px, 42vw);
  height: 51px;
  gap: 12px;
  align-items: center;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(18, 20, 20, 0.78);
  color: var(--text);
}

.search-box svg { width: 23px; height: 23px; flex: 0 0 auto; }
.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 18px;
}
.search-box input::placeholder { color: #b3b4b2; }

.primary-button {
  position: relative;
  z-index: 1;
  display: inline-flex;
  min-height: 38px;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 9px 28px;
  border: 1px solid var(--accent);
  border-radius: 5px;
  color: #111;
  background: var(--accent);
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.primary-button::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: #101212;
  transform: translateX(-102%);
  transition: transform 280ms var(--ease);
}

.primary-button:hover {
  color: var(--accent-light);
  box-shadow: 0 8px 28px rgba(130, 243, 255, 0.18);
  transform: translateY(-2px);
}
.primary-button:hover::before { transform: translateX(0); }
.primary-button:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.hero-page {
  min-height: calc(100vh - 104px);
  padding: 20px 0 40px;
}

body[data-page="home"] .hero-page { padding-top: 260px; }
body[data-page="character"] .hero-page { padding-top: 120px; }

.hero-copy {
  position: relative;
  z-index: 3;
  max-width: 800px;
}

.hero-copy h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.28;
  text-transform: uppercase;
}
.hero-copy h1 span { display: block; color: var(--accent); }

.hero-copy .primary-button {
  width: 250px;
  margin-top: 36px;
}

.hero-art {
  position: absolute;
  z-index: 1;
  right: -1vw;
  bottom: 0;
  width: min(58vw, 900px);
  height: calc(100vh - 150px);
  pointer-events: none;
}

.hero-art::after {
  position: absolute;
  right: 2%;
  bottom: 0;
  width: 85%;
  height: 22%;
  content: "";
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.75), transparent 70%);
}

.hero-art img {
  position: absolute;
  z-index: 1;
  right: 5%;
  bottom: 0;
  max-width: 86%;
  max-height: 100%;
  object-fit: contain;
  object-position: right bottom;
  filter: contrast(1.05) drop-shadow(0 22px 20px rgba(0, 0, 0, 0.5));
}

.stats-grid {
  display: grid;
  width: 800px;
  max-width: calc(100vw - 180px);
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 34px;
}

.stat-card {
  min-height: 120px;
  padding: 27px 20px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(18, 20, 20, 0.72);
}

.stat-card span {
  display: block;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.stat-card strong { display: block; color: var(--accent); font-size: 24px; line-height: 1.25; }
.stat-card small { font-size: 14px; white-space: nowrap; }
.stat-card small [data-slots] { display: inline; }

.guide-page { width: min(1598px, calc(100vw - 116px)); }
.guide-layout {
  display: grid;
  grid-template-columns: minmax(650px, 950px) minmax(420px, 1fr);
  align-items: start;
}

.guide-column { position: relative; z-index: 4; }
.guide-panel {
  min-height: 600px;
  padding: 42px 32px 45px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(17, 19, 19, 0.86);
}

.guide-step-head {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 20px;
  align-items: start;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--line);
}

.step-number,
.document-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 5px;
  color: #101212;
  background: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.guide-step-head h2,
.document-title h2 {
  margin: 2px 0 0;
  font-size: 19px;
  text-transform: uppercase;
}
.guide-step-head p { margin: 1px 0 0; color: var(--muted); font-size: 14px; line-height: 1.35; }

.guide-stage {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 30px;
  align-items: center;
  padding-top: 35px;
}

.guide-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  background: #080a0a;
  box-shadow: 0 20px 32px rgba(0, 0, 0, 0.26);
}
.guide-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

.arrow-button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--text);
  background: #121414;
  cursor: pointer;
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease), background var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.arrow-button:hover { color: #111; border-color: var(--accent-light); background: var(--accent-light); transform: translateY(-2px); }
.arrow-button:disabled { opacity: 0.3; cursor: default; transform: none; background: #121414; color: var(--muted); border-color: var(--line); }

.content-transition { animation: contentIn 280ms var(--ease); }
@keyframes contentIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.bottom-tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: 4px;
  margin-top: 64px;
  padding: 13px 18px;
  border-radius: 4px;
  background: #1c1e1e;
}

.bottom-tabs button {
  position: relative;
  min-height: 40px;
  padding: 0 26px;
  border: 1px solid transparent;
  color: #858685;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease), background var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.bottom-tabs button:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.025); transform: translateY(-2px); }
.bottom-tabs button.active { color: var(--text); border-color: var(--line-strong); background: #202222; }

.guide-character {
  position: absolute;
  right: -2vw;
  bottom: 0;
  width: min(55vw, 880px);
  max-height: calc(100vh - 180px);
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
  filter: drop-shadow(0 20px 22px rgba(0,0,0,.55));
}

.documents-panel {
  position: relative;
  height: 600px;
  overflow: auto;
  padding: 27px 34px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: linear-gradient(105deg, rgba(18,20,20,.96), rgba(16,18,18,.88));
  scrollbar-color: var(--accent) #444;
  scrollbar-width: thin;
}

.documents-panel::-webkit-scrollbar,
.streamer-list::-webkit-scrollbar { width: 5px; }
.documents-panel::-webkit-scrollbar-thumb,
.streamer-list::-webkit-scrollbar-thumb { border-radius: 10px; background: var(--accent); }
.documents-panel::-webkit-scrollbar-track,
.streamer-list::-webkit-scrollbar-track { background: #444; }

.document-card + .document-card { margin-top: 30px; }
.document-title { display: flex; gap: 15px; align-items: center; }
.document-icon { width: 45px; height: 45px; padding: 12px; }
.document-body {
  margin: 30px 0 0;
  padding-left: 21px;
  border-left: 1px solid var(--line-strong);
  color: #d0d1cf;
  font-size: 18px;
  line-height: 1.45;
  white-space: pre-line;
}
.document-body p { margin: 0 0 25px; }
.document-empty { display: grid; height: 100%; place-items: center; color: var(--muted); }
.documents-layout .bottom-tabs { margin-top: 60px; }

.character-form { width: min(652px, 48vw); margin-top: 36px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px 52px; }
.form-field label,
.gender-field legend {
  display: block;
  margin-bottom: 7px;
  color: #ebebe9;
  font-size: 17px;
  font-weight: 600;
  text-transform: uppercase;
}
.input-wrap { position: relative; }
.input-wrap input {
  width: 100%;
  height: 51px;
  padding: 0 48px 0 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  outline: 0;
  color: var(--text);
  background: rgba(17, 19, 19, 0.82);
  font-size: 18px;
  text-align: center;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.input-wrap input:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(255,255,255,.025); }
.field-status {
  position: absolute;
  top: 50%;
  right: 15px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0;
  transform: translateY(-50%) scale(.5);
}
.is-valid .field-status,
.is-invalid .field-status,
.is-pending .field-status { opacity: 1; animation: statusPop 240ms var(--ease) both; }
.is-valid .field-status { color: var(--success); }
.is-invalid .field-status { color: var(--danger); }
.field-status::before { content: "✓"; font-size: 12px; font-weight: 700; }
.is-invalid .field-status::before { content: "×"; font-size: 16px; line-height: 1; }
.is-pending .field-status { color: var(--muted); border-top-color: transparent; animation: statusSpin 700ms linear infinite; }
.is-pending .field-status::before { content: ""; }
@keyframes statusPop { to { opacity: 1; transform: translateY(-50%) scale(1); } }
@keyframes statusSpin { to { transform: translateY(-50%) rotate(360deg); } }

.gender-field { grid-column: 1 / -1; padding: 0; border: 0; }
.gender-options { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; }
.gender-button {
  height: 51px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #888a88;
  background: rgba(17,19,19,.82);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: color var(--duration) var(--ease), border-color var(--duration) var(--ease), background var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.gender-button:hover { color: var(--text); border-color: rgba(130,243,255,.62); background: rgba(130,243,255,.08); transform: translateY(-2px); }
.gender-button.active { color: var(--accent); border-color: rgba(0,229,253,.68); background: rgba(0,229,253,.12); }

.character-submit-row { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.character-submit-row .primary-button { width: 250px; }
.form-message { min-height: 22px; margin: 10px 0 0; color: var(--muted); text-align: center; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.account-hint { margin: 30px 0 0; font-size: 18px; }
.account-hint span { color: var(--accent); font-weight: 700; }

.character-migration {
  position: fixed;
  z-index: 200;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 22px;
  padding: 24px;
  opacity: 0;
  color: var(--text);
  background: linear-gradient(115deg, #090b0b, #0e1010 52%, #0a0c0c);
  transition: opacity 240ms var(--ease);
}

.character-migration.is-visible { opacity: 1; }
.character-migration p { margin: 0; font-size: clamp(20px, 2.2vw, 30px); font-weight: 600; letter-spacing: 0.02em; text-align: center; }
.migration-spinner {
  width: 46px;
  height: 46px;
  border: 3px solid rgba(255, 255, 255, 0.13);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: migrationSpin 760ms linear infinite;
}
@keyframes migrationSpin { to { transform: rotate(360deg); } }

.live-layout {
  display: grid;
  grid-template-columns: minmax(600px, 1.75fr) minmax(360px, 1fr);
  gap: 34px;
}
.stream-preview,
.stream-list-panel {
  min-height: 600px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(16,18,18,.83);
}
.panel-kicker { margin: 0; color: #d6d7d5; font-size: 18px; font-weight: 400; text-transform: uppercase; }
.stream-frame {
  position: relative;
  display: grid;
  width: min(770px, 90%);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  margin: 78px auto 0;
  place-items: center;
  border: 1px solid rgba(0, 229, 253, .42);
  border-radius: 28px;
  background: #080a0a;
  box-shadow: 0 18px 38px rgba(0,0,0,.38);
}
.stream-frame iframe { width: 100%; height: 100%; border: 0; }
.stream-demo-preview { position: relative; display: block; width: 100%; height: 100%; color: var(--text); text-decoration: none; }
.stream-demo-preview img { width: 100%; height: 100%; object-fit: cover; opacity: .78; }
.stream-demo-preview::after { position: absolute; inset: 0; content: ""; background: linear-gradient(180deg, transparent 42%, rgba(0,0,0,.72)); }
.stream-demo-preview span { position: absolute; z-index: 1; right: 26px; bottom: 22px; left: 26px; display: flex; justify-content: space-between; align-items: center; font-size: 17px; }
.stream-demo-preview b { padding: 5px 16px; border: 1px solid #00d85c; border-radius: 20px; color: #00ef67; background: rgba(0,0,0,.62); text-transform: uppercase; }
.stream-demo-preview em { position: relative; z-index: 1; color: #fff; font-style: normal; font-weight: 700; }
.stream-offline { padding: 30px; color: var(--muted); font-size: 19px; text-align: center; text-decoration: none; }
.stream-offline strong { display: block; margin-bottom: 6px; color: var(--text); font-size: 25px; }
.stream-offline:hover { color: var(--accent); }
.stream-meta { width: min(770px, 90%); margin: 18px auto 0; }
.stream-meta-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.stream-meta h2 { margin: 0; font-size: 28px; }
.stream-meta p { margin: 3px 0 12px; color: #d4d5d3; font-size: 17px; }
.stream-watch-link { flex: 0 0 auto; padding: 8px 14px; border: 1px solid rgba(0,229,253,.35); border-radius: 5px; color: var(--accent); background: rgba(0,229,253,.06); font-size: 13px; font-weight: 700; text-decoration: none; }
.stream-watch-link:hover { border-color: var(--accent); color: #061315; background: var(--accent-light); }
.stream-tags { display: flex; gap: 10px; flex-wrap: wrap; }
.stream-tags span { padding: 5px 18px; border: 1px solid var(--line-strong); border-radius: 20px; }
.stream-tags .stream-tags-empty { border-color: var(--line); color: var(--muted); }
.streamer-list { max-height: 540px; overflow-y: auto; margin-top: 26px; padding-right: 14px; }
.streamer-card {
  display: grid;
  width: 100%;
  grid-template-columns: 52px 1fr auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 24px;
  padding: 14px 12px 14px 20px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--text);
  background: #1d1f1f;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 6px 10px rgba(0,0,0,.2);
  transition: border-color var(--duration) var(--ease), background var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.streamer-card:hover { border-color: var(--line-strong); background: #222424; transform: translateY(-2px); }
.streamer-card.active { border-color: var(--accent); }
.streamer-card img { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; background: #101212; }
.streamer-card strong,
.streamer-card small { display: block; }
.streamer-card small { color: #b8b9b7; }
.live-badge { min-width: 65px; padding: 4px 12px; border: 1px solid #58b975; border-radius: 20px; color: #00ef55; background: rgba(53,126,76,.25); font-size: 11px; font-weight: 700; text-align: center; text-transform: uppercase; }
.live-badge.offline { border-color: var(--danger); color: #ff3131; background: rgba(130,38,38,.2); }
.live-badge.unknown { border-color: rgba(0,229,253,.3); color: var(--accent); background: rgba(0,229,253,.07); }

.mobile-menu-button { display: none; }

@media (max-width: 1250px) {
  .site-nav { gap: 28px; }
  .hero-page { grid-template-columns: 1fr 440px; }
  .guide-layout { grid-template-columns: minmax(600px, 800px) 1fr; }
  .bottom-tabs button { padding-inline: 16px; }
  .documents-panel { height: 570px; }
}

@media (max-width: 980px) {
  .app-shell { padding-left: 0; }
  .side-rail { display: none; }
  .site-header { grid-template-columns: auto 1fr auto; min-height: 76px; padding: 0 22px; }
  .mobile-menu-button { display: grid; grid-column: 1; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line); color: var(--text); background: #151717; cursor: pointer; }
  .mobile-menu-button:hover { color: var(--accent-light); border-color: var(--accent-light); }
  .site-nav { position: absolute; top: 68px; left: 20px; display: none; width: min(320px, calc(100vw - 40px)); flex-direction: column; gap: 0; align-items: stretch; padding: 12px 20px 20px; border: 1px solid var(--line); background: #111313; }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 13px 2px; }
  .sticky-header { right: 12px; left: 12px; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; min-height: 66px; }
  .sticky-brand { width: 48px; height: 48px; }
  .sticky-nav { justify-content: flex-start; gap: 22px; overflow-x: auto; scrollbar-width: none; }
  .sticky-nav::-webkit-scrollbar { display: none; }
  .sticky-nav a { font-size: 14px; }
  .account-area { grid-column: 3; }
  .page, .guide-page { width: calc(100vw - 40px); padding-top: 25px; }
  .page-heading { min-height: 120px; }
  .hero-page { display: block; padding-top: 18vh; }
  body[data-page="home"] .hero-page,
  body[data-page="character"] .hero-page { padding-top: 18vh; }
  .hero-art { opacity: .42; width: 75vw; }
  .guide-layout { display: block; min-height: auto; }
  .guide-character { display: none; }
  .guide-panel { min-height: auto; }
  .documents-panel { height: auto; max-height: 60vh; }
  .bottom-tabs { overflow-x: auto; margin-top: 28px; }
  .bottom-tabs button { flex: 0 0 auto; }
  .live-layout { grid-template-columns: 1fr; }
  .stream-preview, .stream-list-panel { min-height: 500px; }
  .character-form { width: min(652px, 100%); }
}

@media (max-width: 680px) {
  .account-user span { display: none; }
  .account-login span:last-child { display: none; }
  .sticky-header { grid-template-columns: minmax(0, 1fr) auto; padding-left: 16px; }
  .sticky-brand { display: none; }
  .page-heading { display: block; padding-top: 28px; }
  .page-heading .search-box { width: 100%; margin-top: 24px; }
  .eyebrow, .page-heading h1 { font-size: 31px; }
  .hero-page { padding-top: 14vh; }
  body[data-page="home"] .hero-page,
  body[data-page="character"] .hero-page { padding-top: 14vh; }
  .hero-copy h1 { font-size: 33px; }
  .hero-copy p { max-width: 90%; }
  .stats-grid { width: 100%; max-width: none; grid-template-columns: 1fr; gap: 12px; }
  .stat-card { min-height: 90px; padding: 18px; }
  .hero-art { width: 100vw; opacity: .24; }
  .guide-panel { padding: 24px 18px; }
  .guide-step-head { grid-template-columns: 42px 1fr; gap: 13px; }
  .guide-stage { grid-template-columns: 40px minmax(0,1fr) 40px; gap: 8px; }
  .arrow-button { width: 40px; height: 40px; }
  .field-grid, .gender-options { grid-template-columns: 1fr; gap: 24px; }
  .gender-field { grid-column: auto; }
  .character-form { margin-top: 35px; }
  .account-hint { margin-top: 34px; }
  .stream-frame, .stream-meta { width: 100%; }
  .stream-frame { margin-top: 40px; border-radius: 15px; }
  .stream-meta-heading { align-items: flex-start; flex-direction: column; }
  .streamer-card { grid-template-columns: 46px 1fr; }
  .streamer-card .live-badge { grid-column: 2; width: max-content; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
