/* =========================================================================
   WebStream · 设计系统 v1
   共享于 publish.html / watch.html / index.html
   仅使用系统字体与原生能力，无外部依赖
   ========================================================================= */

/* ---------- 1. Tokens --------------------------------------------------- */
:root {
  --bg: #08090c;
  --bg-elev-1: #0c0e13;
  --bg-elev-2: #12151c;
  --bg-elev-3: #191d26;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #eef2f8;
  --text-dim: #9aa6b8;
  --text-mute: #6a7587;
  --accent: #6ea8ff;
  --accent-soft: rgba(110, 168, 255, 0.14);
  --accent-ink: #06101f;
  --violet: #8b7bff;
  --live: #ff4d6d;
  --ok: #35d39a;
  --warn: #f5b544;
  --err: #ff6b6b;

  --radius-sm: 9px;
  --radius: 13px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.045) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.95);
  --shadow-2: 0 24px 70px -34px rgba(0, 0, 0, 1);

  --font: "Inter", "HarmonyOS Sans SC", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei UI", "Microsoft YaHei", "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", "Cascadia Mono", Menlo,
    Consolas, monospace;

  --topbar-h: 60px;
  --chat-w: 384px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- 2. Reset / base -------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(880px 520px at 10% -12%, rgba(110, 168, 255, 0.14), transparent 62%),
    radial-gradient(760px 460px at 94% -8%, rgba(139, 123, 255, 0.12), transparent 64%),
    radial-gradient(720px 480px at 50% 112%, rgba(255, 77, 109, 0.055), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}

body.watch-body { overflow: hidden; }

h1, h2, h3, h4, p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, video, canvas, iframe { display: block; max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #a9cbff; }
button { font: inherit; }

::selection { background: rgba(110, 168, 255, 0.32); color: #fff; }

:focus-visible {
  outline: 2px solid rgba(110, 168, 255, 0.85);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); background-clip: padding-box; }

/* ---------- 3. Icons ---------------------------------------------------- */
.ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vertical-align: -3px;
}
.ico--sm { width: 15px; height: 15px; }
.ico--lg { width: 22px; height: 22px; }

/* ---------- 4. Top bar -------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 clamp(14px, 2.6vw, 26px);
  background: rgba(8, 9, 12, 0.74);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(150%) blur(18px);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}
a.brand:hover { color: var(--text); }

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #071120;
  background: linear-gradient(140deg, #9ec6ff, #6ea8ff 42%, #8b7bff 100%);
  box-shadow: 0 8px 22px -12px rgba(110, 168, 255, 0.95), 0 1px 0 rgba(255, 255, 255, 0.55) inset;
}
.brand-mark .ico { width: 19px; height: 19px; stroke-width: 2.1; }

.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-size: 0.95rem; font-weight: 700; letter-spacing: 0.01em; }
.brand-sub {
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 2px;
}

.topbar-sep { width: 1px; height: 22px; background: var(--line-strong); flex: 0 0 auto; }

.topbar-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-spacer { flex: 1 1 auto; }
.topbar-actions { display: flex; align-items: center; gap: 8px; min-width: 0; }

/* ---------- 5. Buttons -------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 15px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev-2);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease),
    transform 0.12s var(--ease), box-shadow 0.2s var(--ease), color 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--bg-elev-3); border-color: rgba(255, 255, 255, 0.22); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.42; cursor: not-allowed; transform: none; }
.btn .ico { margin: 0 -1px; }

.btn--primary {
  color: var(--accent-ink);
  border-color: transparent;
  background: linear-gradient(135deg, #a8ccff, #6ea8ff 46%, #8b7bff);
  box-shadow: 0 14px 30px -16px rgba(110, 168, 255, 0.95), 0 1px 0 rgba(255, 255, 255, 0.4) inset;
}
.btn--primary:hover { filter: brightness(1.06); background: linear-gradient(135deg, #a8ccff, #6ea8ff 46%, #8b7bff); }
.btn--danger {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #ff758c, #e02443);
  box-shadow: 0 14px 30px -18px rgba(224, 36, 67, 0.9);
}
.btn--danger:hover { filter: brightness(1.06); background: linear-gradient(135deg, #ff758c, #e02443); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-dim); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: transparent; color: var(--text); }
.btn--sm { height: 32px; padding: 0 11px; font-size: 0.78rem; border-radius: 9px; gap: 6px; }
.btn--lg { height: 52px; padding: 0 24px; font-size: 0.98rem; border-radius: 13px; }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn--block { width: 100%; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s var(--ease), transform 0.12s;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.09); color: var(--text); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn.is-on { color: var(--accent); background: rgba(110, 168, 255, 0.14); }

/* ---------- 6. Pills / badges ------------------------------------------ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text-dim);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.015em;
  white-space: nowrap;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--live {
  color: #ff92a5;
  border-color: rgba(255, 77, 109, 0.38);
  background: rgba(255, 77, 109, 0.12);
}
.pill--live .dot { animation: live-pulse 1.9s ease-out infinite; }
.pill--ok { color: #74e8bb; border-color: rgba(53, 211, 154, 0.32); background: rgba(53, 211, 154, 0.1); }
.pill--warn { color: #f9cb79; border-color: rgba(245, 181, 68, 0.34); background: rgba(245, 181, 68, 0.1); }
.pill--err { color: #ff9d9d; border-color: rgba(255, 107, 107, 0.34); background: rgba(255, 107, 107, 0.1); }
.pill--accent { color: #b6d4ff; border-color: rgba(110, 168, 255, 0.32); background: var(--accent-soft); }

@keyframes live-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(255, 77, 109, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 77, 109, 0); }
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.72rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tag b { color: var(--text); font-weight: 650; font-family: var(--mono); font-size: 0.72rem; }

/* ---------- 7. Cards ---------------------------------------------------- */
.card {
  position: relative;
  padding: clamp(15px, 1.8vw, 21px);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow-1);
}
.card--flush { padding: 0; overflow: hidden; }
.card--quiet { background: rgba(255, 255, 255, 0.02); box-shadow: none; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.card-title .ico { color: var(--text-mute); }
.card-sub { font-size: 0.75rem; color: var(--text-mute); }
.card-note { font-size: 0.76rem; color: var(--text-mute); line-height: 1.6; }

.section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 10px;
}

/* ---------- 8. Forms ---------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.label { font-size: 0.77rem; font-weight: 650; color: var(--text-dim); letter-spacing: 0.01em; }
.label .opt { color: var(--text-mute); font-weight: 500; }

.input,
.select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(6, 8, 12, 0.66);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), opacity 0.18s;
}
.input::placeholder { color: #56606f; }
.input:focus,
.select:focus { border-color: rgba(110, 168, 255, 0.72); box-shadow: 0 0 0 3px rgba(110, 168, 255, 0.15); }
.input:disabled,
.select:disabled { opacity: 0.5; cursor: not-allowed; }
.input[readonly] { color: var(--text-dim); }

.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa6b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 15px 15px;
}
.select option { background: #12151c; color: var(--text); }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .input { padding-right: 44px; }
.input-group .input-action {
  position: absolute;
  right: 4px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
}
.input-group .input-action:hover { color: var(--text); background: rgba(255, 255, 255, 0.07); }

.hint { font-size: 0.73rem; color: var(--text-mute); line-height: 1.55; }
.hint--warn { color: #e8b262; }
.hint b { color: var(--text-dim); font-weight: 650; }
.hint code,
code {
  font-family: var(--mono);
  font-size: 0.92em;
  padding: 1px 5px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text-dim);
  white-space: nowrap;
}

.tips { display: flex; flex-direction: column; gap: 9px; }
.tips li {
  position: relative;
  padding-left: 15px;
  font-size: 0.77rem;
  line-height: 1.65;
  color: var(--text-mute);
}
.tips li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(110, 168, 255, 0.55);
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }

/* switches */
.switch {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
}
.switch:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--line-strong); }
.switch.is-disabled { opacity: 0.5; }
.switch.is-disabled .switch-track { filter: grayscale(1); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.switch-track {
  position: relative;
  flex: 0 0 auto;
  width: 38px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  transition: background 0.2s var(--ease);
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  transition: transform 0.2s var(--ease);
}
.switch input:checked + .switch-track { background: linear-gradient(135deg, #6ea8ff, #8b7bff); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch-body { min-width: 0; }
.switch-label { display: block; font-size: 0.81rem; font-weight: 650; }
.switch-desc { display: block; font-size: 0.73rem; color: var(--text-mute); line-height: 1.5; margin-top: 2px; }

/* range */
.range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #7fb2ff 0%,
    #8b7bff var(--range-progress, 100%),
    rgba(255, 255, 255, 0.16) var(--range-progress, 100%),
    rgba(255, 255, 255, 0.16) 100%
  );
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}
.range::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* ---------- 9. Stats ---------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 9px; }
.stat {
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.5);
  min-width: 0;
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.69rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-value--accent { color: #9bc8ff; }
.stat-value--ok { color: #74e8bb; }
.stat-value--warn { color: #f9cb79; }
.stat-value--err { color: #ff9d9d; }
.stat-value--mute { color: var(--text-mute); font-size: 0.85rem; }

.stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- 10. Log ----------------------------------------------------- */
.log {
  max-height: 208px;
  overflow: auto;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2, 3, 5, 0.72);
  font-family: var(--mono);
  font-size: 0.73rem;
  line-height: 1.75;
}
.log-line { display: flex; gap: 9px; white-space: pre-wrap; word-break: break-word; }
.log-time { color: #4a5465; flex: 0 0 auto; }
.log-msg { min-width: 0; }
.log-line--info .log-msg { color: #9fb0c7; }
.log-line--ok .log-msg { color: #74e8bb; }
.log-line--warn .log-msg { color: #f9cb79; }
.log-line--err .log-msg { color: #ff9d9d; }
.log-empty { color: #4a5465; }

/* ---------- 11. Toasts -------------------------------------------------- */
.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 130;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 13px;
  border: 1px solid var(--line-strong);
  background: rgba(19, 22, 30, 0.97);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(14px);
  font-size: 0.83rem;
  line-height: 1.5;
  animation: toast-in 0.24s var(--ease) both;
  pointer-events: auto;
}
.toast .ico { margin-top: 1px; }
.toast--ok .ico { color: var(--ok); }
.toast--warn .ico { color: var(--warn); }
.toast--err .ico { color: var(--err); }
.toast--info .ico { color: var(--accent); }
.toast.is-out { animation: toast-out 0.2s var(--ease) forwards; }

@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }

/* ---------- 12. Feedback ------------------------------------------------ */
.spinner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-top-color: #9bc8ff;
  animation: spin 0.85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.11), rgba(255, 255, 255, 0.05));
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 26px 18px;
  text-align: center;
  color: var(--text-mute);
  font-size: 0.8rem;
}
.empty .ico { width: 26px; height: 26px; color: var(--text-mute); opacity: 0.8; }

/* ---------- 13. Utility ------------------------------------------------- */
.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--text-mute); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
[hidden] { display: none !important; }

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  background: rgba(255, 255, 255, 0.06);
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* =========================================================================
   推流控制台 (publish.html)
   ========================================================================= */
.studio {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(14px, 2.2vw, 26px) clamp(14px, 2.6vw, 26px) 40px;
}
.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(330px, 1fr);
  gap: 15px;
  align-items: start;
}
.studio-side { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
.studio-main { display: flex; flex-direction: column; gap: 15px; min-width: 0; }
@media (max-width: 1080px) { .studio-grid { grid-template-columns: minmax(0, 1fr); } }

/* preview */
.preview-card { padding: 12px; }
.preview-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 13px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, #131824, #05070b 72%),
    #05070b;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.preview-shell video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 0.45s var(--ease);
}
.preview-shell.is-live video,
.preview-shell.is-preview video { opacity: 1; }

.preview-placeholder {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  color: var(--text-mute);
  text-align: center;
  padding: 20px;
  transition: opacity 0.3s var(--ease);
}
.preview-placeholder .ico { width: 34px; height: 34px; opacity: 0.65; }
.preview-placeholder strong { color: var(--text-dim); font-size: 0.86rem; font-weight: 650; }
.preview-placeholder span { font-size: 0.75rem; line-height: 1.6; }
.preview-shell.is-live .preview-placeholder,
.preview-shell.is-preview .preview-placeholder { opacity: 0; pointer-events: none; }

.preview-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.preview-shell.is-live .preview-overlay { opacity: 1; }
.preview-overlay .row { pointer-events: none; }
.preview-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border-radius: 7px;
  background: rgba(5, 7, 11, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #d8e3f2;
  backdrop-filter: blur(8px);
}

.transport {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 4px 2px;
}
.transport-main { display: flex; align-items: center; gap: 10px; flex: 1 1 260px; min-width: 0; }
.transport-btn { min-width: 168px; }
.transport-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.transport-status { font-size: 0.83rem; font-weight: 650; }
.transport-detail {
  font-size: 0.74rem;
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.transport-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

@media (max-width: 620px) {
  .studio { padding: 12px 12px 34px; }
  .topbar-title { display: none; }
  .card { padding: 15px; }
  .preview-card { padding: 10px; }
  .transport { padding: 11px 2px 0; gap: 10px; }
  .transport-main { flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 9px; }
  .transport-btn { width: 100%; min-width: 0; }
  .transport-detail { white-space: normal; }
  .transport-actions { width: 100%; justify-content: space-between; }
  .stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* checklist */
.checklist { display: flex; flex-direction: column; }
.check {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 2px;
  font-size: 0.79rem;
  color: var(--text-dim);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.055);
}
.check:last-child { border-bottom: 0; }
.check-ico {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mute);
}
.check-ico .ico { width: 11px; height: 11px; stroke-width: 2.6; }
.check[data-state="ok"] .check-ico { background: rgba(53, 211, 154, 0.16); color: #74e8bb; }
.check[data-state="warn"] .check-ico { background: rgba(245, 181, 68, 0.16); color: #f9cb79; }
.check[data-state="err"] .check-ico { background: rgba(255, 107, 107, 0.16); color: #ff9d9d; }
.check[data-state="ok"] .check-label { color: var(--text); }
.check-val { margin-left: auto; font-family: var(--mono); font-size: 0.7rem; color: var(--text-mute); }

/* chart */
.chart-wrap {
  position: relative;
  height: 78px;
  margin-top: 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.55);
  overflow: hidden;
}
.chart-wrap canvas { width: 100%; height: 100%; }
.chart-legend {
  position: absolute;
  top: 7px;
  left: 10px;
  display: flex;
  gap: 12px;
  font-size: 0.66rem;
  color: var(--text-mute);
  pointer-events: none;
}
.chart-legend i {
  display: inline-block;
  width: 14px;
  height: 2px;
  margin-right: 4px;
  vertical-align: middle;
  border-radius: 2px;
  background: #6ea8ff;
}
.chart-legend i.dash { background: repeating-linear-gradient(90deg, #8b7bff 0 4px, transparent 4px 7px); }

details.advanced { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
details.advanced > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  color: var(--text-mute);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary .ico { transition: transform 0.2s var(--ease); }
details.advanced[open] > summary .ico { transform: rotate(180deg); }
details.advanced > summary:hover { color: var(--text-dim); }
details.advanced .advanced-body { display: flex; flex-direction: column; gap: 12px; padding-top: 12px; }

/* =========================================================================
   放映厅 (watch.html)
   ========================================================================= */
.watch-body { display: flex; flex-direction: column; height: 100dvh; }
.watch-body .topbar { position: relative; flex: 0 0 auto; }

.watch-main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--chat-w);
  transition: grid-template-columns 0.26s var(--ease);
}
.watch-main.no-chat { grid-template-columns: minmax(0, 1fr) 0px; }

.stage-col {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 11px;
  padding: clamp(10px, 1.5vw, 16px);
}
.stage-wrap {
  flex: 0 0 auto;
  min-height: 0;
  display: grid;
  place-items: center;
}
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  isolation: isolate;
}
.watch-main.theater .meta-bar { display: none; }
.stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}
.stage.is-live video,
.stage.has-frame video { opacity: 1; }
.stage.is-idle { cursor: none; }

/* stage states */
.state-layer {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  background:
    radial-gradient(circle at 50% 38%, rgba(18, 22, 32, 0.86), rgba(4, 5, 8, 0.97) 70%);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade-in 0.35s var(--ease);
}
@keyframes fade-in { from { opacity: 0; } }
.state-inner { display: flex; flex-direction: column; align-items: center; gap: 13px; max-width: 420px; }
.state-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.045);
  color: #a9cbff;
}
.state-icon .ico { width: 26px; height: 26px; }
.state-title { font-size: 1.05rem; font-weight: 680; letter-spacing: 0.01em; }
.state-desc { font-size: 0.82rem; color: var(--text-mute); line-height: 1.65; }
.state-countdown {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: #7f8da3;
  letter-spacing: 0.02em;
}
.state-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 3px; }
.state-link { font-size: 0.78rem; color: var(--text-mute); }
.state-link:hover { color: var(--accent); }

/* unmute prompt */
.unmute-pill {
  position: absolute;
  left: 50%;
  bottom: 84px;
  z-index: 18;
  transform: translateX(-50%);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 19px 0 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(11, 14, 20, 0.82);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 620;
  cursor: pointer;
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -18px rgba(0, 0, 0, 0.95);
  animation: float-in 0.4s var(--ease) both;
}
.unmute-pill:hover { background: rgba(24, 30, 42, 0.92); }
.unmute-pill .ico { color: #9bc8ff; }
@keyframes float-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* controls */
.controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 34px 12px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.4) 58%, transparent);
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.stage.is-idle .controls { opacity: 0; transform: translateY(8px); pointer-events: none; }

.ctrl-group { display: flex; align-items: center; gap: 2px; min-width: 0; }
.ctrl-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #e8eef8;
  cursor: pointer;
  transition: background 0.16s var(--ease), color 0.16s;
  -webkit-tap-highlight-color: transparent;
}
.ctrl-btn:hover { background: rgba(255, 255, 255, 0.12); }
.ctrl-btn:active { transform: scale(0.94); }
.ctrl-btn .ico { width: 20px; height: 20px; }
.ctrl-btn.is-on { color: #9bc8ff; }

.ctrl-btn { position: relative; }
.ctrl-btn.has-unread::after {
  content: attr(data-unread);
  position: absolute;
  top: 0;
  right: 0;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--live);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 2px rgba(8, 9, 12, 0.85);
}

.volume-wrap { display: flex; align-items: center; gap: 4px; }
.volume-slider {
  width: 86px;
  height: 4px;
  border: 0;
  border-radius: 99px;
  appearance: none;
  -webkit-appearance: none;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #e8eef8 0%,
    #e8eef8 var(--vol, 100%),
    rgba(255, 255, 255, 0.25) var(--vol, 100%),
    rgba(255, 255, 255, 0.25) 100%
  );
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}
.volume-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.live-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #cfdaea;
  white-space: nowrap;
}
.live-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--live); }

/* stats popover */
.popover {
  position: absolute;
  right: 12px;
  bottom: 68px;
  z-index: 22;
  width: min(320px, calc(100% - 24px));
  padding: 13px;
  border-radius: 15px;
  border: 1px solid var(--line-strong);
  background: rgba(13, 16, 21, 0.97);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(16px);
  animation: pop-in 0.18s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
.pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 650;
  margin-bottom: 10px;
}
.pop-grid { display: grid; grid-template-columns: auto 1fr; gap: 7px 12px; font-size: 0.76rem; }
.pop-grid dt { color: var(--text-mute); white-space: nowrap; }
.pop-grid dd { margin: 0; text-align: right; font-family: var(--mono); font-size: 0.75rem; }
.pop-chart {
  position: relative;
  height: 46px;
  margin-top: 11px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 10, 0.6);
  overflow: hidden;
}
.pop-chart canvas { width: 100%; height: 100%; }
.pop-foot { margin-top: 9px; font-size: 0.68rem; color: var(--text-mute); }

/* meta bar under stage */
.meta-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 0 2px;
  flex: 0 0 auto;
}
.meta-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.meta-title h1 {
  font-size: 0.98rem;
  font-weight: 680;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.meta-title p { font-size: 0.75rem; color: var(--text-mute); }
.meta-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }

/* chat */
.chat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  border-left: 1px solid var(--line);
  background: linear-gradient(180deg, #0b0d12, #080a0e);
  overflow: hidden;
}
.watch-main.no-chat .chat { border-left: 0; }
.chat-head {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
  padding: 0 8px 0 14px;
  border-bottom: 1px solid var(--line);
  flex: 0 0 auto;
}
.chat-title { display: flex; align-items: center; gap: 8px; font-size: 0.84rem; font-weight: 650; }
.chat-title .ico { color: var(--text-mute); }

.chat-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.71rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chat-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warn);
  flex: 0 0 auto;
}
.chat-status[data-state="online"] .dot { background: var(--ok); box-shadow: 0 0 6px rgba(53, 211, 154, 0.75); }
.chat-status[data-state="offline"] .dot,
.chat-status[data-state="kicked"] .dot,
.chat-status[data-state="error"] .dot { background: var(--err); }
.chat-status[data-state="need-name"] .dot { background: var(--text-mute); }

.chat-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
}
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 100%;
}
.chat-list::before {
  content: "";
  flex: 1 1 auto;
}

.chat-msg { display: flex; align-items: flex-start; gap: 9px; }
.chat-avatar {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
  text-transform: uppercase;
}
.chat-msg-main { min-width: 0; flex: 1 1 auto; }
.chat-msg-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 2px; }
.chat-name {
  font-size: 0.78rem;
  font-weight: 650;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-badge {
  flex: 0 0 auto;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 15px;
  padding: 0 4px;
  border-radius: 4px;
  border: 1px solid;
}
.chat-badge--admin { color: #f5cf7a; border-color: rgba(245, 181, 68, 0.4); background: rgba(245, 181, 68, 0.12); }
.chat-badge--leader { color: #9bc8ff; border-color: rgba(110, 168, 255, 0.4); background: rgba(110, 168, 255, 0.12); }
.chat-time {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.66rem;
  color: var(--text-mute);
  font-variant-numeric: tabular-nums;
}
.chat-msg-text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #dbe4f0;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.chat-msg-text a { color: #8ec2ff; }
.chat-emote { display: inline-block; height: 22px; width: auto; vertical-align: middle; margin: 0 1px; }
.chat-msg.is-mine .chat-msg-text { color: #eef4ff; }
.chat-system {
  align-self: center;
  max-width: 92%;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.7rem;
  line-height: 1.5;
  color: var(--text-mute);
  text-align: center;
}
.chat-jump {
  position: sticky;
  bottom: 6px;
  display: block;
  margin: 10px auto 0;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(18, 22, 30, 0.96);
  color: var(--text);
  font-size: 0.72rem;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.9);
}

.chat-login {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(6, 8, 12, 0.5);
}
.chat-login-label { font-size: 0.78rem; font-weight: 650; color: var(--text-dim); }
.chat-login-row { display: flex; align-items: center; gap: 8px; }
.chat-login-row .input { flex: 1 1 auto; height: 38px; font-size: 16px; }
.chat-login-row .btn { flex: 0 0 auto; height: 38px; }

.chat-compose {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  background: rgba(6, 8, 12, 0.5);
}
.chat-compose .input { flex: 1 1 auto; height: 38px; font-size: 16px; }
.chat-compose .btn { flex: 0 0 auto; height: 38px; }

.chat-backdrop {
  display: none;
}

/* keyboard help */
.help-panel {
  position: fixed;
  right: 18px;
  top: 72px;
  z-index: 60;
  width: min(300px, calc(100vw - 36px));
  padding: 15px;
  border-radius: 15px;
  border: 1px solid var(--line-strong);
  background: rgba(13, 16, 21, 0.98);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(16px);
  animation: pop-in 0.18s var(--ease);
}
.help-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 0.79rem;
  color: var(--text-dim);
}
.help-row + .help-row { border-top: 1px dashed rgba(255, 255, 255, 0.055); }

/* fullscreen */
.stage:fullscreen,
.stage:-webkit-full-screen {
  border-radius: 0;
  border: 0;
  width: 100vw !important;
  height: 100vh !important;
  aspect-ratio: auto !important;
  box-shadow: none;
}
.stage:fullscreen .controls,
.stage:-webkit-full-screen .controls { padding-bottom: 18px; }

@media (max-width: 1180px) {
  :root { --chat-w: 340px; }
}

@media (max-width: 900px) {
  .watch-body { height: 100dvh; overflow: hidden; }
  .watch-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .stage-col {
    flex: 0 0 auto;
    justify-content: flex-start;
    padding: 8px 8px 0;
    gap: 9px;
  }
  .stage-wrap { flex: 0 0 auto; width: 100%; }
  .stage { width: 100%; height: auto; aspect-ratio: 16 / 9; }
  .meta-bar { padding: 0 2px 6px; }
  .chat {
    flex: 1 1 auto;
    min-height: 0;
    margin: 0 8px 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
  }
  .watch-main.no-chat .chat { display: none; }
  .meta-title h1 { font-size: 0.92rem; }
  .meta-title p { display: none; }
  .volume-slider { width: 62px; }
  .watch-body .topbar-title { display: none; }
  .help-panel { top: 66px; right: 10px; }
}

@media (max-width: 560px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .brand-sub { display: none; }
  .topbar-sep { display: none; }
  .topbar-actions #btnHelp { display: none; }
  .topbar-actions .publish-link { width: 34px; padding: 0; }
  .publish-link .btn-label { display: none; }
  .stage-col { padding: 6px 6px 0; }
  .stage { border-radius: 12px; }
  .chat { margin: 0 6px 6px; }
  .meta-chips { margin-left: 0; width: 100%; }
  .meta-chips .tag[data-chip="fps"],
  .meta-chips .tag[data-chip="buffer"] { display: none; }
  .controls { gap: 2px; padding: 26px 6px 6px; }
  .ctrl-btn { width: 34px; height: 34px; }
  .volume-slider { display: none; }
  .toasts { right: 10px; bottom: 10px; width: calc(100vw - 20px); }

  /* 小屏离线条：隐藏控制条，压缩状态卡片 */
  .stage { position: relative; z-index: 2; }
  .stage:not(.is-live) .controls { display: none; }
  .state-layer { padding: 12px; }
  .state-inner { gap: 8px; }
  .state-icon { width: 40px; height: 40px; border-radius: 12px; }
  .state-icon .ico { width: 20px; height: 20px; }
  .state-title { font-size: 0.92rem; }
  .state-desc { font-size: 0.74rem; line-height: 1.5; }
  .state-actions { margin-top: 0; }
  .state-actions .btn { height: 30px; font-size: 0.75rem; }
  .popover {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    top: auto;
    width: auto;
    max-height: 62vh;
    overflow: auto;
    z-index: 90;
  }
}

/* =========================================================================
   入口页 (index.html)
   ========================================================================= */
.landing { max-width: 1020px; margin: 0 auto; padding: 0 22px 64px; }
.hero { padding: clamp(38px, 8vh, 88px) 0 0; text-align: center; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(110, 168, 255, 0.28);
  background: rgba(110, 168, 255, 0.09);
  color: #b6d4ff;
  font-size: 0.74rem;
  font-weight: 620;
  letter-spacing: 0.02em;
}
.hero h1 {
  margin: 20px auto 0;
  max-width: 16em;
  font-size: clamp(2rem, 5vw, 3.3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 760;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(115deg, #9ec6ff, #a78bfa 55%, #f0abfc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p {
  margin: 16px auto 0;
  max-width: 34em;
  font-size: clamp(0.88rem, 1.4vw, 1rem);
  color: var(--text-dim);
  line-height: 1.75;
}
.entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin-top: clamp(28px, 5vh, 44px);
}
.entry-card {
  display: block;
  padding: 22px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.014));
  color: var(--text);
  box-shadow: var(--shadow-1);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.25s var(--ease);
}
.entry-card:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 168, 255, 0.4);
  color: var(--text);
  box-shadow: 0 30px 60px -34px rgba(0, 0, 0, 1), 0 0 0 1px rgba(110, 168, 255, 0.14) inset;
}
.entry-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: var(--accent-soft);
  border: 1px solid rgba(110, 168, 255, 0.26);
  color: #a9cbff;
  margin-bottom: 15px;
}
.entry-icon .ico { width: 21px; height: 21px; }
.entry-card h2 { font-size: 1.02rem; font-weight: 680; display: flex; align-items: center; gap: 8px; }
.entry-card p { margin-top: 7px; font-size: 0.82rem; color: var(--text-mute); line-height: 1.7; }
.entry-foot { margin-top: 15px; display: flex; align-items: center; gap: 6px; font-size: 0.79rem; font-weight: 620; color: #9bc8ff; }

.how {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.how-step { display: flex; gap: 11px; }
.how-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-dim);
}
.how-step h3 { font-size: 0.83rem; font-weight: 650; }
.how-step p { margin-top: 3px; font-size: 0.76rem; color: var(--text-mute); line-height: 1.65; }
.landing-foot {
  margin-top: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: #55606f;
}

/* ---------- Motion / print --------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
