:root {
  color-scheme: dark;
  --bg: #151219;
  --bg-deep: #0f0d12;
  --panel: rgba(35, 29, 42, 0.92);
  --panel-solid: #231d2a;
  --panel-raised: #2c2433;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f8f1e7;
  --muted: #aaa0b3;
  --muted-strong: #c9c0d1;
  --accent: #ff6c5f;
  --accent-strong: #ff887d;
  --accent-soft: rgba(255, 108, 95, 0.14);
  --mint: #b7e8c6;
  --yellow: #f4ce76;
  --danger: #ff776f;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.3);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg-deep);
}

body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 12% -5%, rgba(255, 108, 95, 0.14), transparent 30rem),
    radial-gradient(circle at 100% 18%, rgba(120, 91, 168, 0.16), transparent 28rem),
    linear-gradient(155deg, #19151e 0%, #131017 48%, #171219 100%);
  color: #f8f1e7;
  font-family:
    "PingFang SC",
    "Microsoft YaHei UI",
    "Microsoft YaHei",
    "Noto Sans CJK SC",
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(255, 108, 95, 0.45);
  outline-offset: 3px;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
}

[hidden] {
  display: none !important;
}

svg {
  display: block;
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.28;
}

.ambient-one {
  top: -10rem;
  right: -12rem;
  width: 30rem;
  height: 30rem;
  background: #6d477f;
}

.ambient-two {
  bottom: 6rem;
  left: -14rem;
  width: 24rem;
  height: 24rem;
  background: #a94d45;
  opacity: 0.15;
}

.app-shell {
  width: 100%;
  min-height: 100dvh;
}

.main-content {
  width: 100%;
}

.page {
  width: min(100%, 860px);
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 22px
    calc(112px + var(--safe-bottom));
}

.watch-page {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: max(42px, env(safe-area-inset-top));
}

.brand-header,
.page-header {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand-mark {
  position: relative;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.brand-mark span {
  position: absolute;
  width: 16px;
  height: 15px;
  border: 1.7px solid var(--accent-strong);
  border-radius: 5px;
}

.brand-mark span:first-child {
  top: 13px;
  left: 11px;
}

.brand-mark span:last-child {
  right: 10px;
  bottom: 12px;
  border-color: var(--yellow);
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.19em;
}

.brand-header h1,
.page-header h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.035em;
}

.hero-copy {
  max-width: 720px;
  margin: clamp(58px, 11vh, 112px) 0 38px;
}

.hero-kicker {
  margin: 0 0 15px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-copy h2 {
  margin: 0;
  font-family:
    "Noto Serif CJK SC",
    "Songti SC",
    "STSong",
    serif;
  font-size: clamp(40px, 9vw, 68px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.055em;
}

.hero-copy > p:last-child {
  max-width: 530px;
  margin: 22px 0 0;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.8;
}

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

.entry-card {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 20px;
  gap: 14px;
  align-items: center;
  min-height: 118px;
  padding: 21px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(35, 29, 42, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.entry-card::after {
  position: absolute;
  right: -55px;
  bottom: -80px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.025);
  content: "";
}

.entry-card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
}

.entry-card:active {
  transform: translateY(0) scale(0.99);
}

.entry-primary {
  border-color: rgba(255, 108, 95, 0.3);
  background:
    linear-gradient(125deg, rgba(255, 108, 95, 0.18), transparent 65%),
    rgba(44, 29, 39, 0.94);
}

.entry-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: var(--accent);
  color: #1d1214;
}

.entry-icon-soft {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.entry-copy {
  z-index: 1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
}

.entry-copy strong {
  font-size: 17px;
  letter-spacing: -0.02em;
}

.entry-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.entry-arrow {
  z-index: 1;
  align-self: start;
  color: var(--muted);
  font-size: 18px;
}

.rule-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 620px;
  margin-top: 22px;
  color: #8f8697;
}

.rule-note p {
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
}

.rule-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 12px rgba(244, 206, 118, 0.6);
}

.inner-page {
  padding-top: max(30px, env(safe-area-inset-top));
}

.page-header {
  margin-bottom: 28px;
}

.page-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 17px;
}

.page-icon svg {
  width: 22px;
  height: 22px;
}

.page-icon-coral {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.page-icon-gold {
  background: rgba(244, 206, 118, 0.12);
  color: var(--yellow);
}

.header-count {
  margin-left: auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.section-intro {
  margin: 4px 2px 18px;
}

.section-intro h2 {
  margin: 0 0 7px;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.section-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.045);
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.content-card {
  margin-bottom: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card-heading {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 26px;
}

.compact-heading {
  margin-bottom: 22px;
}

.step-number {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.card-heading h2 {
  margin: 1px 0 8px;
  font-size: 19px;
  letter-spacing: -0.025em;
}

.card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.field-label {
  display: block;
  margin: 0 0 9px 3px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
}

.field-spacing {
  margin-top: 22px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 9px;
}

input,
select {
  min-width: 0;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(11, 9, 14, 0.48);
}

input::placeholder {
  color: #756c7e;
}

#video-url {
  width: 100%;
  height: 54px;
  padding: 0 17px;
  border-radius: 16px;
  font-size: 14px;
  transition: border-color 160ms ease;
}

#video-url:focus,
.large-input:focus {
  border-color: rgba(255, 108, 95, 0.55);
}

.search-button {
  display: grid;
  width: 52px;
  height: 54px;
  place-items: center;
  border: 0;
  border-radius: 16px;
  background: var(--accent);
  color: #241316;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

.search-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.search-button:disabled {
  opacity: 0.55;
  transform: none;
}

.large-input {
  width: 100%;
  height: 58px;
  padding: 0 17px;
  border-radius: 17px;
  font-size: 15px;
  transition: border-color 160ms ease;
}

.code-input {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.inline-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 12px;
}

.spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 720ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.inspection-result {
  display: flex;
  gap: 12px;
  margin-top: 18px;
  padding: 15px;
  border-radius: 15px;
  background: rgba(255, 108, 95, 0.09);
}

.result-symbol {
  display: grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 108, 95, 0.2);
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.inspection-result strong {
  display: block;
  margin: 1px 0 5px;
  font-size: 12px;
}

.inspection-result p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.video-result-card {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  gap: 20px;
}

.source-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
}

.source-mode {
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.source-mode.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.capacity-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
}

.capacity-card strong {
  display: block;
  font-size: 13px;
}

.capacity-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.capacity-card output {
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
}

.capacity-card input[type="range"] {
  width: 100%;
  height: 20px;
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
  accent-color: var(--accent);
  background: transparent;
}

.capacity-scale {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  margin-top: -8px;
  color: var(--muted);
  font-size: 8px;
}

.video-poster {
  position: relative;
  display: flex;
  min-height: 138px;
  align-items: flex-end;
  justify-content: space-between;
  padding: 13px;
  overflow: hidden;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent),
    linear-gradient(145deg, #6b4b74, #31283c 55%, #1f1a25);
}

.video-poster::before,
.video-poster::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 50%;
  content: "";
}

.video-poster::before {
  top: -48px;
  left: -40px;
  width: 130px;
  height: 130px;
}

.video-poster::after {
  right: -22px;
  bottom: -30px;
  width: 90px;
  height: 90px;
}

.video-poster > span {
  z-index: 1;
  color: rgba(255, 255, 255, 0.67);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

.poster-play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  background: rgba(20, 15, 24, 0.45);
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.video-result-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.status-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}

.status-success {
  background: rgba(183, 232, 198, 0.1);
  color: var(--mint);
}

.status-success span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 8px rgba(183, 232, 198, 0.65);
}

.video-result-copy h2 {
  display: -webkit-box;
  margin: 0 0 9px;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.35;
  letter-spacing: -0.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-result-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.identity-row strong {
  color: var(--text);
  font-size: 12px;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  grid-column: 1 / -1;
  margin-top: 6px;
  padding: 0 19px;
  border: 0;
  border-radius: 17px;
  background: var(--accent);
  color: #211216;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
  box-shadow: 0 15px 35px rgba(255, 108, 95, 0.15);
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.primary-button:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.52;
  transform: none;
}

.join-card {
  max-width: 610px;
  margin-right: auto;
  margin-left: auto;
}

#join-form .primary-button,
#profile-form .primary-button {
  margin-top: 26px;
}

.form-footnote {
  margin: 18px 2px 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.7;
  text-align: center;
}

.warehouse-footnote {
  text-align: left;
}

.library-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-strong);
  font-size: 14px;
}

.empty-state p {
  max-width: 320px;
  margin: 0;
  font-size: 11px;
  line-height: 1.7;
}

.warehouse-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(35, 29, 42, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.warehouse-item.is-active {
  border-color: rgba(255, 108, 95, 0.32);
}

.warehouse-summary {
  display: grid;
  width: 100%;
  grid-template-columns: 74px minmax(0, 1fr) 20px;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border: 0;
  background: transparent;
  text-align: left;
}

.warehouse-cover,
.history-cover {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 32%, rgba(255, 108, 95, 0.2), transparent 45%),
    linear-gradient(145deg, #50394f, #201a27);
}

.warehouse-cover {
  width: 74px;
  height: 92px;
}

.warehouse-cover img,
.history-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  font-weight: 900;
}

.warehouse-summary-copy {
  min-width: 0;
}

.warehouse-summary-copy strong {
  display: block;
  margin-bottom: 7px;
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warehouse-summary-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}

.warehouse-summary-arrow {
  color: var(--muted);
  transition: transform 180ms ease;
}

.warehouse-item.is-active .warehouse-summary-arrow {
  transform: rotate(90deg);
}

.warehouse-details {
  padding: 0 13px 15px;
}

.warehouse-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 0 13px;
  border-top: 1px solid var(--line);
}

.warehouse-toolbar span {
  margin-right: auto;
  color: var(--muted);
  font-size: 10px;
}

.small-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 700;
}

.small-button.is-danger {
  color: #ffaaa3;
}

.episode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
  gap: 7px;
  max-height: 318px;
  overflow-y: auto;
  padding-right: 3px;
}

.episode-button {
  min-height: 44px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--muted-strong);
  font-size: 10px;
  line-height: 1.35;
}

.episode-button:hover {
  border-color: rgba(255, 108, 95, 0.35);
  color: var(--text);
}

.episode-button small {
  display: block;
  margin-top: 3px;
  color: #7f7588;
  font-size: 8px;
}

.warehouse-picker {
  display: grid;
  gap: 9px;
}

.picker-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
}

.picker-item .warehouse-cover {
  width: 52px;
  height: 64px;
  border-radius: 10px;
}

.picker-item strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.picker-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.selected-library-video {
  display: grid;
  gap: 17px;
  margin-top: 15px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.selected-library-video span {
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
}

.selected-library-video strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

.selected-library-video p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.history-card {
  display: grid;
  width: 100%;
  grid-template-columns: 66px minmax(0, 1fr) 18px;
  gap: 13px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: rgba(35, 29, 42, 0.76);
  text-align: left;
}

.history-cover {
  width: 66px;
  height: 82px;
}

.history-copy {
  min-width: 0;
}

.history-copy strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy p {
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-copy small {
  display: block;
  margin-top: 7px;
  color: #766d7f;
  font-size: 8px;
}

.history-arrow {
  color: var(--accent-strong);
}

.text-button {
  display: block;
  margin: 22px auto 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.settings-row {
  display: grid;
  width: 100%;
  grid-template-columns: 42px minmax(0, 1fr) 20px;
  gap: 13px;
  align-items: center;
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  text-align: left;
}

.settings-row-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted-strong);
  font-family: Georgia, serif;
  font-size: 17px;
  font-style: italic;
  font-weight: 700;
}

.settings-row strong {
  display: block;
  font-size: 13px;
}

.settings-row small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.settings-row-arrow {
  color: var(--muted);
}

.about-card {
  display: flex;
  min-height: 430px;
  align-items: center;
  flex-direction: column;
  padding: 48px 28px 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 0, rgba(255, 108, 95, 0.1), transparent 42%),
    var(--panel);
  text-align: center;
}

.about-mark {
  width: 74px;
  height: 74px;
  flex-basis: 74px;
  border-radius: 24px;
}

.about-mark span {
  width: 25px;
  height: 23px;
}

.about-mark span:first-child {
  top: 20px;
  left: 16px;
}

.about-mark span:last-child {
  right: 14px;
  bottom: 19px;
}

.about-card h2 {
  margin: 20px 0 28px;
  font-family:
    "Noto Serif CJK SC",
    "Songti SC",
    serif;
  font-size: 30px;
  letter-spacing: 0.05em;
}

.about-version {
  display: flex;
  width: 100%;
  max-width: 310px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.about-version strong {
  color: var(--text);
  font-size: 12px;
}

.about-description {
  max-width: 300px;
  margin: 24px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.8;
}

.about-credit {
  margin: auto 0 0;
  padding-top: 34px;
  color: #716977;
  font-size: 9px;
  letter-spacing: 0.06em;
}

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(10, 8, 12, 0.72);
  backdrop-filter: blur(8px);
}

.global-loading > div {
  display: flex;
  min-width: 230px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  padding: 26px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: #241d2b;
  box-shadow: var(--shadow);
}

.global-loading p {
  margin: 0;
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: clamp(48px, 11vh, 96px) auto 18px;
  padding: 24px;
  border: 1px solid rgba(255, 108, 95, 0.22);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 100% 0, rgba(255, 108, 95, 0.11), transparent 40%),
    rgba(41, 30, 43, 0.8);
  box-shadow: var(--shadow);
}

.profile-avatar {
  display: grid;
  width: 66px;
  height: 66px;
  flex: 0 0 66px;
  place-items: center;
  border-radius: 23px;
  background: linear-gradient(145deg, var(--accent), #cf554e);
  color: #271417;
  font-family:
    "Noto Serif CJK SC",
    "Songti SC",
    serif;
  font-size: 25px;
  font-weight: 900;
}

.profile-card p {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 11px;
}

.profile-card strong {
  font-size: 23px;
  letter-spacing: -0.03em;
}

.bottom-nav {
  position: fixed;
  right: 16px;
  bottom: calc(14px + var(--safe-bottom));
  left: 16px;
  z-index: 30;
  display: grid;
  width: min(calc(100% - 24px), 480px);
  height: 70px;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 23px;
  background: rgba(31, 26, 37, 0.9);
  box-shadow:
    0 15px 55px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(24px);
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
  border: 0;
  border-radius: 17px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.nav-item svg {
  width: 19px;
  height: 19px;
}

.nav-item.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.room-page {
  width: min(100%, 1040px);
  padding-top: max(14px, env(safe-area-inset-top));
}

.room-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 14px;
}

.room-leave-button,
.share-button {
  display: inline-flex;
  width: fit-content;
  height: 40px;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 700;
}

.room-leave-button svg,
.share-button svg {
  width: 18px;
  height: 18px;
}

.share-button {
  justify-self: end;
  padding-right: 4px;
  color: var(--accent-strong);
}

.room-code-block {
  text-align: center;
}

.room-code-block span {
  display: block;
  margin-bottom: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.room-code-block strong {
  font-size: 16px;
  letter-spacing: 0.16em;
}

.connection-banner {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid rgba(244, 206, 118, 0.2);
  border-radius: 13px;
  background: rgba(244, 206, 118, 0.08);
  color: #e5cb92;
}

.connection-banner p {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--yellow);
  animation: pulse 1.3s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
    transform: scale(0.8);
  }
}

.player-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #0b090e;
  box-shadow: var(--shadow);
}

.player-card.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  width: 100vw;
  height: 100dvh;
  flex-direction: column;
  border: 0;
  border-radius: 0;
  background: #000;
}

.player-card.is-fullscreen .video-frame {
  min-height: 0;
  flex: 1;
  aspect-ratio: auto;
}

.player-card.is-fullscreen .player-controls {
  flex: 0 0 auto;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
}

.player-card.is-fullscreen .room-badge {
  top: max(12px, env(safe-area-inset-top, 0px));
}

body.player-fullscreen-open {
  overflow: hidden;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.04), transparent 40%),
    #08070a;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.video-blocker {
  position: absolute;
  inset: 0;
  cursor: default;
}

.room-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(15, 11, 18, 0.65);
  color: rgba(255, 255, 255, 0.8);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.07em;
  backdrop-filter: blur(9px);
}

.player-message {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: rgba(10, 8, 12, 0.86);
  text-align: center;
  backdrop-filter: blur(8px);
}

.player-message p {
  max-width: 420px;
  margin: 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.7;
}

.player-message button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #211216;
  font-size: 12px;
  font-weight: 800;
}

.player-controls {
  display: grid;
  grid-template-columns: 36px auto minmax(80px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  min-height: 60px;
  padding: 10px 13px;
  border-top: 1px solid var(--line);
  background: #17131c;
}

.play-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #211216;
}

.play-toggle svg {
  width: 20px;
  height: 20px;
}

.icon-pause {
  display: none;
}

.play-toggle.is-playing .icon-play {
  display: none;
}

.play-toggle.is-playing .icon-pause {
  display: block;
}

.play-toggle:disabled {
  opacity: 0.35;
}

.time-label {
  min-width: 34px;
  color: var(--muted);
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.timeline {
  width: 100%;
  height: 20px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  accent-color: var(--accent);
}

.timeline::-webkit-slider-runnable-track {
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.15);
}

.timeline::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4.5px;
  appearance: none;
  border: 2px solid #1c151e;
  border-radius: 50%;
  background: var(--accent);
}

.timeline:disabled {
  opacity: 0.38;
}

.rate-select {
  height: 32px;
  padding: 0 5px;
  border-radius: 10px;
  color: var(--muted-strong);
  font-size: 10px;
  font-weight: 700;
}

.rate-select:disabled {
  opacity: 0.38;
}

.fullscreen-button {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
}

.fullscreen-button svg {
  width: 18px;
  height: 18px;
}

.fullscreen-button .icon-collapse {
  display: none;
}

.fullscreen-button.is-fullscreen .icon-expand {
  display: none;
}

.fullscreen-button.is-fullscreen .icon-collapse {
  display: block;
}

.room-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 4px 16px;
  border-bottom: 1px solid var(--line);
}

.room-playback-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}

.room-playback-tools > span {
  min-width: 0;
  margin-right: auto;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-title-block {
  min-width: 0;
}

.room-title-block p {
  margin: 0 0 5px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-title-block span {
  color: var(--muted);
  font-size: 10px;
}

.participant-list {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.participant-chip {
  display: inline-flex;
  max-width: 120px;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-strong);
  font-size: 9px;
}

.participant-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-chip::before {
  width: 5px;
  height: 5px;
  flex: 0 0 5px;
  border-radius: 50%;
  background: var(--mint);
  content: "";
}

.participant-chip.is-host {
  background: var(--accent-soft);
  color: #ffc0b9;
}

.participant-chip.is-host::before {
  background: var(--accent);
}

.participant-chip.is-offline::before {
  background: var(--muted);
}

.chat-card {
  display: flex;
  height: clamp(360px, 54dvh, 560px);
  min-height: 340px;
  max-height: 560px;
  flex-direction: column;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(31, 26, 37, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.chat-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 12px;
}

.chat-heading h2 {
  margin: 0;
  font-size: 16px;
}

.chat-note {
  color: var(--muted);
  font-size: 9px;
}

.chat-messages {
  display: flex;
  min-height: 170px;
  max-height: 100%;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 10px 18px 18px;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
}

.chat-empty {
  display: grid;
  min-height: 130px;
  flex: 1;
  place-items: center;
  color: #766d7f;
  font-size: 11px;
  text-align: center;
}

.chat-message {
  display: flex;
  max-width: 86%;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.chat-message.is-own {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-message-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 3px;
  color: var(--muted);
  font-size: 9px;
}

.role-tag {
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
}

.role-tag.is-host {
  background: var(--accent-soft);
  color: #ffaaa2;
}

.chat-bubble {
  padding: 10px 13px;
  border-radius: 4px 15px 15px;
  background: rgba(255, 255, 255, 0.07);
  color: #e6deea;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.chat-message.is-own .chat-bubble {
  border-radius: 15px 4px 15px 15px;
  background: #de665d;
  color: #211315;
}

.chat-system {
  align-self: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  color: #7f7588;
  font-size: 9px;
  text-align: center;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(15, 12, 18, 0.28);
}

.chat-form input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 12px;
}

.chat-form button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 13px;
  background: var(--text);
  color: var(--bg);
}

.chat-form button svg {
  width: 19px;
  height: 19px;
}

.toast {
  position: fixed;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  z-index: 1200;
  max-width: min(calc(100% - 36px), 440px);
  padding: 11px 15px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 13px;
  background: rgba(31, 25, 37, 0.95);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 11px;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  text-align: center;
  transform: translate(-50%, -12px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  backdrop-filter: blur(16px);
}

.fullscreen-chat-bubble {
  position: fixed;
  top: 50%;
  right: max(15px, env(safe-area-inset-right, 0px));
  z-index: 1300;
  width: min(270px, 72vw);
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 17px 4px 17px 17px;
  background: rgba(32, 25, 38, 0.93);
  color: #f8f1e7;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.42);
  transform: translateY(-50%);
  animation: chatBubbleIn 220ms ease both;
  backdrop-filter: blur(16px);
}

.fullscreen-chat-bubble span {
  display: block;
  margin-bottom: 6px;
  color: var(--mint);
  font-size: 9px;
  font-weight: 800;
}

.fullscreen-chat-bubble p {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.55;
}

@keyframes chatBubbleIn {
  from {
    opacity: 0;
    transform: translate(18px, -50%);
  }
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.confirm-dialog {
  width: min(calc(100% - 40px), 390px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: #251f2c;
  color: var(--text);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.55);
}

.media-picker-dialog {
  width: min(calc(100% - 24px), 620px);
  max-height: min(82dvh, 720px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: var(--panel-solid);
  color: var(--text);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.5);
}

.media-picker-dialog::backdrop {
  background: rgba(8, 6, 10, 0.7);
  backdrop-filter: blur(6px);
}

.media-picker-card {
  display: flex;
  max-height: min(82dvh, 720px);
  flex-direction: column;
}

.media-picker-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 20px 14px;
}

.media-picker-card h2 {
  margin: 0;
  font-size: 19px;
}

.media-picker-content {
  overflow-y: auto;
  padding: 6px 20px 22px;
}

.line-choice-list {
  display: grid;
  gap: 8px;
}

.line-choice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
}

.line-choice.is-current {
  border-color: rgba(255, 108, 95, 0.45);
  background: var(--accent-soft);
}

.line-choice small {
  color: var(--muted);
  font-size: 9px;
}

.episode-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 8px;
}

.episode-choice {
  min-height: 44px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  font-size: 10px;
}

.episode-choice.is-current {
  border-color: rgba(255, 108, 95, 0.45);
  background: var(--accent-soft);
}

.confirm-dialog::backdrop {
  background: rgba(7, 5, 9, 0.72);
  backdrop-filter: blur(5px);
}

.confirm-dialog form {
  padding: 28px;
}

.dialog-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin-bottom: 19px;
  place-items: center;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 21px;
}

.confirm-dialog h2 {
  margin: 0 0 9px;
  font-size: 20px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.dialog-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 24px;
}

.secondary-button,
.danger-button {
  min-height: 46px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 800;
}

.secondary-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
}

.danger-button {
  border: 0;
  background: var(--accent);
  color: #211315;
}

.noscript-note {
  position: fixed;
  inset: 20px;
  z-index: 200;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #231d2a;
  color: #f8f1e7;
  text-align: center;
}

.clipboard-helper {
  position: fixed;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.theme-setting-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.settings-row-icon svg {
  width: 19px;
  height: 19px;
}

.theme-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.theme-choice {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.theme-choice.is-active {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #edf6ea;
  --bg-deep: #e3f0e2;
  --panel: rgba(255, 255, 255, 0.84);
  --panel-solid: #f7fbf5;
  --panel-raised: #e7f3e5;
  --line: rgba(35, 87, 52, 0.13);
  --line-strong: rgba(35, 87, 52, 0.23);
  --text: #173b27;
  --muted: #687e6e;
  --muted-strong: #3f5f4a;
  --accent: #64a77a;
  --accent-strong: #3f835b;
  --accent-soft: rgba(78, 150, 104, 0.14);
  --mint: #3e8a5d;
  --yellow: #b98438;
  --danger: #c85f57;
  --shadow: 0 24px 60px rgba(58, 99, 70, 0.13);
}

html[data-theme="light"] {
  background: #e3f0e2;
}

html[data-theme="light"] body {
  background:
    radial-gradient(circle at 8% 0, rgba(117, 182, 132, 0.24), transparent 31rem),
    radial-gradient(circle at 100% 18%, rgba(204, 228, 187, 0.45), transparent 28rem),
    linear-gradient(155deg, #f7fcf4 0%, #edf6ea 48%, #e5f0e5 100%);
  color: var(--text);
}

html[data-theme="light"] .ambient {
  opacity: 0.12;
}

html[data-theme="light"] .ambient-one {
  background: #7fb98d;
}

html[data-theme="light"] .ambient-two {
  background: #d5b978;
}

html[data-theme="light"] .brand-mark,
html[data-theme="light"] .icon-button,
html[data-theme="light"] .settings-row,
html[data-theme="light"] .content-card,
html[data-theme="light"] .entry-card,
html[data-theme="light"] .profile-card,
html[data-theme="light"] .about-card,
html[data-theme="light"] .warehouse-item,
html[data-theme="light"] .history-card {
  border-color: var(--line);
  background-color: var(--panel);
  box-shadow:
    0 16px 42px rgba(51, 92, 63, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .brand-mark {
  background: linear-gradient(145deg, #ffffff, #eaf4e7);
}

html[data-theme="light"] .entry-primary {
  background:
    linear-gradient(125deg, rgba(100, 167, 122, 0.2), transparent 65%),
    rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] .entry-icon {
  color: #173b27;
}

html[data-theme="light"] .entry-icon-soft,
html[data-theme="light"] .icon-button,
html[data-theme="light"] .settings-row-icon,
html[data-theme="light"] .participant-chip,
html[data-theme="light"] .small-button,
html[data-theme="light"] .episode-button,
html[data-theme="light"] .picker-item {
  background: rgba(67, 123, 83, 0.07);
  color: var(--muted-strong);
}

html[data-theme="light"] .source-switch,
html[data-theme="light"] .theme-switch {
  background: rgba(65, 116, 78, 0.06);
}

html[data-theme="light"] .source-mode.is-active,
html[data-theme="light"] .theme-choice.is-active,
html[data-theme="light"] .nav-item.is-active {
  background: rgba(65, 131, 91, 0.14);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

html[data-theme="light"] .bottom-nav {
  border-color: var(--line-strong);
  background: rgba(248, 252, 245, 0.92);
  box-shadow:
    0 16px 55px rgba(50, 88, 59, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

html[data-theme="light"] input,
html[data-theme="light"] select {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
}

html[data-theme="light"] input::placeholder {
  color: #95a99a;
}

html[data-theme="light"] .primary-button,
html[data-theme="light"] .search-button,
html[data-theme="light"] .play-toggle {
  color: #12351f;
}

html[data-theme="light"] .profile-avatar {
  background: linear-gradient(145deg, #8bc49a, #5c9b73);
  color: #f7fff7;
}

html[data-theme="light"] .rule-note,
html[data-theme="light"] .card-heading p,
html[data-theme="light"] .video-result-copy p,
html[data-theme="light"] .form-footnote,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .history-copy p,
html[data-theme="light"] .history-copy small {
  color: var(--muted);
}

html[data-theme="light"] .video-poster {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), transparent),
    linear-gradient(145deg, #b8d8be, #78ae88 55%, #4f8762);
}

html[data-theme="light"] .empty-state {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.34);
}

html[data-theme="light"] .capacity-card,
html[data-theme="light"] .media-picker-dialog {
  border-color: var(--line);
  background: #f9fcf7;
  color: var(--text);
}

html[data-theme="light"] .line-choice,
html[data-theme="light"] .episode-choice {
  background: rgba(58, 116, 77, 0.06);
  color: var(--text);
}

html[data-theme="light"] .room-code-block span,
html[data-theme="light"] .room-title-block span,
html[data-theme="light"] .chat-note {
  color: var(--muted);
}

html[data-theme="light"] .player-card,
html[data-theme="light"] .player-controls,
html[data-theme="light"] .video-frame {
  color-scheme: dark;
}

html[data-theme="light"] .chat-card {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
}

html[data-theme="light"] .chat-form {
  background: rgba(222, 239, 220, 0.55);
}

html[data-theme="light"] .chat-bubble {
  background: rgba(55, 112, 73, 0.09);
  color: var(--text);
}

html[data-theme="light"] .chat-message.is-own .chat-bubble {
  background: #73ad86;
  color: #113620;
}

html[data-theme="light"] .chat-system,
html[data-theme="light"] .chat-empty {
  background: rgba(66, 121, 82, 0.06);
  color: #7b9181;
}

html[data-theme="light"] .role-tag {
  background: rgba(48, 104, 67, 0.08);
}

html[data-theme="light"] .role-tag.is-host,
html[data-theme="light"] .participant-chip.is-host {
  background: rgba(34, 118, 67, 0.13);
  color: #2d7548;
}

html[data-theme="light"] .connection-banner {
  border-color: rgba(160, 111, 35, 0.25);
  background: rgba(239, 205, 135, 0.25);
  color: #7d5b25;
}

html[data-theme="light"] .toast {
  border-color: var(--line-strong);
  background: rgba(249, 253, 247, 0.96);
  color: var(--text);
  box-shadow: 0 16px 40px rgba(45, 83, 55, 0.18);
}

html[data-theme="light"] .confirm-dialog {
  border-color: var(--line-strong);
  background: #f9fcf7;
  color: var(--text);
}

html[data-theme="light"] .secondary-button {
  background: rgba(54, 115, 72, 0.06);
  color: var(--text);
}

html[data-theme="light"] .global-loading > div {
  border-color: var(--line-strong);
  background: #f9fcf7;
}

html[data-theme="light"] .global-loading p {
  color: var(--muted-strong);
}

@media (max-width: 680px) {
  .page {
    padding-right: 16px;
    padding-left: 16px;
  }

  .watch-page {
    justify-content: flex-start;
  }

  .hero-copy {
    margin-top: 68px;
  }

  .hero-copy h2 {
    font-size: clamp(38px, 12vw, 54px);
  }

  .entry-grid {
    grid-template-columns: 1fr;
  }

  .entry-card {
    min-height: 96px;
    padding: 17px;
    border-radius: 23px;
  }

  .content-card {
    padding: 19px;
    border-radius: 23px;
  }

  .video-result-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 15px;
  }

  .video-poster {
    min-height: 116px;
  }

  .video-result-copy h2 {
    font-size: 16px;
  }

  .player-card {
    border-radius: 18px;
  }

  .player-controls {
    grid-template-columns: 34px auto minmax(40px, 1fr) auto auto 32px;
    gap: 7px;
    padding-right: 9px;
    padding-left: 9px;
  }

  .fullscreen-button {
    display: grid;
    width: 32px;
    height: 32px;
  }

  .room-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .participant-list {
    flex-wrap: wrap;
  }

  .chat-card {
    min-height: 390px;
  }

  .chat-heading {
    padding-right: 15px;
    padding-left: 15px;
  }

  .chat-messages {
    padding-right: 15px;
    padding-left: 15px;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .player-card.is-fullscreen .player-controls {
    min-height: 48px;
    padding-top: 5px;
    padding-bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  }
}

@media (min-width: 1000px) {
  .room-page {
    padding-right: 28px;
    padding-left: 28px;
  }

  .video-frame {
    aspect-ratio: 16 / 8.5;
  }
}

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