:root {
  --ink: #14110f;
  --muted: #6a5e55;
  --line: #e2d4c6;
  --paper: #f7f1ea;
  --card: #fffaf4;
  --accent: #d45212;
  --accent-dark: #b33f0b;
  --max: 1080px;
}

@font-face {
  font-family: "Color Emoji";
  src: local("Segoe UI Emoji"), local("Apple Color Emoji"), local("Noto Color Emoji");
  unicode-range: U+2300-27BF, U+2B00-2BFF, U+1F000-1FAFF, U+FE00-FE0F, U+200D, U+20E3;
}
* { box-sizing: border-box; font-family: Arial, Helvetica, "Color Emoji", sans-serif; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Arial, Helvetica, "Color Emoji", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}
a { color: var(--accent); }
img { max-width: 100%; }

.wrap {
  width: min(var(--max), calc(100% - 2.4rem));
  margin: 0 auto;
}

header {
  position: sticky;
  top: 0;
  z-index: 4000;
  background: rgba(0, 0, 0, 0.78);
  border-bottom: 1px solid rgba(255, 176, 64, 0.22);
  backdrop-filter: blur(10px);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: #ffe7b8;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.brand img {
  width: 36px;
  height: 36px;
  display: block;
  border-radius: 8px;
}
.nav-links {
  display: flex;
  gap: 1.1rem;
  align-items: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}
.nav-links a {
  color: #f3e4d2;
  text-decoration: none;
  font-size: 0.95rem;
}
.nav-links a:hover { color: #ffd27a; }
.lang-switch {
  display: inline-flex;
  align-items: center;
  margin-left: 0.15rem;
}
.lang-switch select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(255, 255, 255, 0.08);
  color: #ffe7b8;
  border: 1px solid rgba(255, 176, 64, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  line-height: 1.4;
}
.lang-switch select option { color: #1b1410; }
.nav-activity-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #ffe7b8;
  font-size: 0.82rem;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.nav-activity-toggle input {
  accent-color: #e09020;
  margin: 0;
}
.nav-links a.nav-activity {
  flex: 0 1 220px;
  width: 220px;
  max-width: 28vw;
  height: 1.35em;
  overflow: hidden;
  color: #ffe7b8;
  font-size: 0.82rem;
  line-height: 1.35em;
  text-decoration: none;
}
.nav-activity-track { display: block; }
.nav-activity-line {
  display: block;
  height: 1.35em;
  line-height: 1.35em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 860px) {
  .nav-activity, .nav-activity-toggle { display: none; }
}

.btn {
  display: inline-block;
  padding: 0.72rem 1.15rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 650;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-disabled {
  background: #b9b1a8;
  color: #fff;
  border-color: #b9b1a8;
  cursor: pointer;
}
.btn-disabled:hover { background: #a89f96; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-ghost-light {
  background: transparent;
  color: #fff6ea;
  border-color: rgba(255, 210, 122, 0.55);
}
.btn-ghost-light:hover { border-color: #ffd27a; color: #fff; }

.banner {
  position: relative;
  overflow: hidden;
  min-height: 34rem;
  padding: 5.2rem 0 6.2rem;
  color: #fff8ee;
  background: #000;
  border-bottom: 1px solid rgba(212, 82, 18, 0.35);
}
.banner-bg {
  position: absolute;
  inset: -28px;
  pointer-events: none;
  background: url("/banner.png?v=6") center / cover no-repeat;
  filter: blur(12px);
  transform: scale(1.08);
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.38) 48%, rgba(0,0,0,0.2) 100%);
}
.banner-inner { position: relative; z-index: 1; }
.banner .kicker {
  color: #ffd27a;
  letter-spacing: 0.28em;
}
.banner h1 {
  color: #fff;
  max-width: 16ch;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.85),
    0 8px 22px rgba(0, 0, 0, 0.7),
    0 18px 42px rgba(0, 0, 0, 0.45);
}
.banner .lede {
  color: #f0dcc6;
  max-width: 44rem;
  text-shadow: 0 1px 10px rgba(0,0,0,0.45);
}
.banner .meta { color: #d7b99a; }
.banner-github {
  position: absolute;
  right: 1.5rem;
  bottom: 3.4rem;
  z-index: 3;
  display: inline-flex;
  color: #f3e4d2;
}
.banner-github svg {
  width: 28px;
  height: 28px;
  display: block;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.65));
}
.banner-github:hover { color: #ffd27a; }
.banner-ticker {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: block;
  height: 3.35rem;
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(255, 176, 64, 0.22);
  text-decoration: none;
  color: inherit;
}
.banner-ticker-inner {
  display: block;
  height: 100%;
}
.banner-ticker-viewport {
  display: block;
  position: relative;
  width: min(44rem, 100%);
  height: 100%;
  overflow: hidden;
}
.banner-ticker-item {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  color: #ffd27a;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.25;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  overflow: hidden;
  transform: translateY(110%);
  transition: transform 0.7s ease;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}
.banner-ticker-item strong {
  display: block;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-ticker-meta {
  color: #e8c9a0;
  font-size: 0.8rem;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.banner-ticker-item.is-in { transform: translateY(-50%); }
.banner-ticker-item.is-out { transform: translateY(-160%); }
@media (prefers-reduced-motion: reduce) {
  .banner-ticker-item { transition: none; }
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  color: var(--muted);
  margin: 0 0 0.8rem;
}
h1, h2, h3 { font-family: Arial, Helvetica, "Color Emoji", sans-serif; line-height: 1.2; }
h1 {
  font-size: clamp(2.1rem, 4.5vw, 3.3rem);
  margin: 0 0 0.8rem;
  font-weight: 600;
}
.lede {
  max-width: 42rem;
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 1.6rem;
}
.actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.meta {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.92rem;
}

section { padding: 3.2rem 0; }
.section-title {
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
}
.section-sub {
  color: var(--muted);
  margin: 0 0 1.6rem;
  max-width: 40rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.25rem 1.3rem;
  border-top: 3px solid var(--accent);
}
.card h3 { margin: 0 0 0.45rem; font-size: 1.2rem; }
.card p { margin: 0; color: var(--muted); }

.feature-list { display: grid; gap: 1rem; }
.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem 1.4rem;
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.25rem 1.3rem;
  border-top: 3px solid var(--accent);
}
.feature h3 { margin: 0 0 0.45rem; font-size: 1.2rem; }
.feature p { margin: 0; color: var(--muted); }
.feature .doc-video { margin: 0; }
@media (min-width: 860px) {
  .feature.has-video {
    grid-template-columns: minmax(16rem, 0.9fr) minmax(18rem, 1.1fr);
    align-items: center;
  }
}

.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 2.4rem 1fr;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step::before {
  counter-increment: step;
  content: counter(step);
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: Arial, Helvetica, sans-serif;
}
.step h3 { margin: 0 0 0.2rem; font-size: 1.08rem; }
.step p { margin: 0; color: var(--muted); }
.step .doc-video { margin: 0.9rem 0 0; }

.cite {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1.2rem 1.3rem;
}
.cite pre {
  white-space: pre-wrap;
  font-size: 0.86rem;
  margin: 0.7rem 0 0;
  color: var(--muted);
}
.cite-actions { margin-top: 0.9rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

.docs h2 { font-size: 1.45rem; margin: 2.2rem 0 0.6rem; }
.docs h3 { font-size: 1.12rem; margin: 1.3rem 0 0.4rem; }
.docs p, .docs li { color: var(--ink); }
.docs ul, .docs ol { padding-left: 1.2rem; }
.docs code {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92em;
  background: #ece7dc;
  padding: 0.05em 0.35em;
}
.toc {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 1rem 1.2rem;
  margin: 1.2rem 0 2rem;
}
.toc a { text-decoration: none; }
.toc ol { margin: 0.4rem 0 0; }

.doc-video {
  margin: 1.1rem 0 1.4rem;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.7rem;
}
.doc-video video,
.doc-video img {
  display: block;
  width: 100%;
  max-height: 28rem;
  background: #120c08;
}
.doc-video img {
  object-fit: contain;
  background: #fff;
}
.doc-video figcaption {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.res-status { color: var(--muted); }
.res-count { color: var(--muted); margin: 0 0 1.2rem; }
.res-grid {
  display: grid;
  gap: 1rem;
  margin: 0 0 2rem;
}
.res-card {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.85rem;
}
.res-card .doc-video {
  margin: 0 0 0.7rem;
  padding: 0;
  border: 0;
  background: transparent;
}
.res-thumb {
  display: block;
  margin: 0 0 0.7rem;
  background: #ece7dc;
}
.res-thumb img {
  display: block;
  width: 100%;
  max-height: 16rem;
  object-fit: contain;
}
.res-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.res-meta span { color: var(--muted); font-size: 0.92rem; }
.res-actions {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0.7rem 0 0;
}

@media (min-width: 760px) {
  .res-grid { grid-template-columns: 1fr 1fr; }
}

footer {
  border-top: 1px solid var(--line);
  padding: 1.8rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.92rem;
}
footer a { color: var(--muted); }
.footer-inner {
  position: relative;
  padding-right: 2.2rem;
}
.footer-inner p { margin: 0 0 0.45rem; }
.footer-name {
  color: var(--ink);
  font-weight: 700;
}
.role-help {
  position: absolute;
  right: 0;
  bottom: 0;
}
.role-help summary {
  list-style: none;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  font-weight: 700;
}
.role-help summary::-webkit-details-marker { display: none; }
.role-help summary:hover { border-color: var(--accent); color: var(--accent); }
.role-help-panel {
  position: absolute;
  right: 0;
  bottom: 2.1rem;
  width: 18.5rem;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  box-shadow: 0 8px 24px rgba(20, 17, 15, 0.12);
  z-index: 6;
}
.role-help-panel p {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 400;
}
.role-help-panel p:last-child { margin-bottom: 0; }
.role-help-panel strong { color: var(--ink); }

.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}
.video-card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.8rem;
}
.video-card video {
  display: block;
  width: 100%;
  max-height: 28rem;
  background: #120c08;
}
.video-card figcaption {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.upload-form {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 1.2rem 0 2rem;
}
.video-admin {
  list-style: none;
  padding: 0;
  margin: 0;
}
.video-admin li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}
.forum-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}
.forum-bar .section-title { margin: 0; }
.forum-user {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.user-label {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  align-items: center;
  font-weight: 700;
  color: var(--ink);
}
.role-chip {
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.08rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}
.role-admin { background: #d45212; color: #fff; }
.role-sponsor { background: #6d4aff; color: #fff; }
.role-honor { background: #c9a227; color: #fff; }
.role-advanced { background: #2f6f4e; color: #fff; }
.role-nice { background: #d984a8; color: #fff; }
.role-level { background: #1f4b8f; color: #fff; }
.admin-stats {
  display: inline-flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: #1f4b8f;
  color: #fff !important;
  font-size: 0.82rem;
  font-weight: 650;
  text-decoration: none;
  line-height: 1.4;
}
.admin-stats span { white-space: nowrap; }
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0 0 1rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.95rem 1.05rem;
}
a.stat-card-link {
  color: inherit;
  text-decoration: none;
  display: block;
}
a.stat-card-link:hover {
  border-color: var(--accent);
}
.stat-card .n {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--accent-dark);
}
.stat-card .l { color: var(--ink); font-weight: 700; }
.stat-sub { font-size: 0.85rem; color: var(--muted); margin-top: 0.3rem; }
@media (max-width: 900px) {
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .stat-cards { grid-template-columns: 1fr; }
}
.stat-range {
  margin: 0 0 1rem;
  align-items: center;
}
.stat-date {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 0.9rem;
}
.stat-date.is-on {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.stat-date label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
}
.stat-date input[type="date"] {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
}
.dl-accounts {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.dl-accounts li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.8rem;
  align-items: baseline;
  padding: 0.55rem 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
}
.stat-charts {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 1rem;
}
.stat-chart-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem 0.45rem;
}
.stat-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 0.3rem;
}
.stat-legend {
  color: var(--muted);
  font-size: 0.85rem;
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}
.lg {
  display: inline-block;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 999px;
  margin-right: 0.28rem;
  vertical-align: -1px;
}
.lg-visits { background: #d45212; }
.lg-people { background: #1f4b8f; }
.lg-downloads { background: #2f6f4e; }
.lg-users { background: #6d4aff; }
.stat-chart-card canvas { display: block; width: 100%; height: 280px; }
.stat-geo {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(15rem, 0.7fr);
  gap: 0.9rem;
  margin: 0 0 1rem;
}
.stat-map {
  height: 380px;
  border-radius: 8px;
  background: #e8e0d6;
  overflow: hidden;
  isolation: isolate;
  z-index: 0;
}
.geo-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.geo-list li {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 1fr) 2.2rem;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 0.42rem;
  font-size: 0.88rem;
}
.geo-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.geo-n { text-align: right; color: var(--muted); }
.geo-bar {
  height: 0.45rem;
  background: #eadfd4;
  border-radius: 999px;
  overflow: hidden;
}
.geo-bar::after {
  content: "";
  display: block;
  height: 100%;
  width: calc(100% * var(--n) / max(var(--max), 1));
  background: #d45212;
  border-radius: 999px;
}
.geo-bar-dl::after { background: #2f6f4e; }
.geo-bar-user::after { background: #6d4aff; }
.dl-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  align-items: start;
  margin: 0 0 1rem;
}
.dl-packs {
  display: grid;
  gap: 1rem;
}
.dl-current h3 { margin: 0.15rem 0 0.35rem; }
.dl-notes {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.5;
  background: #f3ebe3;
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin: 0.7rem 0 1rem;
}
.dl-hist-title { margin: 1.2rem 0 0.5rem; font-size: 1.05rem; }
.dl-login h3 { margin: 0 0 0.7rem; }
.dl-login .forum-form { margin: 0; }
.dl-login-focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.dl-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(20, 24, 32, 0.55);
}
.dl-gate[hidden] { display: none; }
.dl-gate-card {
  width: 100%;
  max-width: 34rem;
  background: #fff;
  color: #1e2430;
  border-radius: 12px;
  padding: 1.25rem 1.35rem 1.15rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}
.dl-gate-card h3 { margin: 0 0 0.65rem; }
.dl-gate-card p { margin: 0 0 1rem; line-height: 1.55; }
.dl-gate-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.dl-gate-card .forum-hint { margin: 0.85rem 0 0; }
.dl-gate-card label { display: block; margin: 0 0 0.65rem; }
.dl-gate-card input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 0.25rem;
}
.dl-gate-code-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-bottom: 0.65rem; }
.dl-gate-code-row label { flex: 1; margin: 0; }
.dl-gate-code-row .btn { white-space: nowrap; }
.dl-gate-msg { margin: 0 0 0.75rem; line-height: 1.45; }
.dl-gate-pass { margin: 0 0 0.75rem; }
.dl-gate-pass input { font-family: Consolas, ui-monospace, monospace; letter-spacing: 0.04em; }
.dl-current .btn { margin-top: 0.85rem; }
.dl-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.85rem;
}
.dl-demo-actions .btn { margin-top: 0; }
.dl-updates { margin: 0 0 1rem; }
.dl-updates h3 { margin: 0 0 0.65rem; }
.dl-updates-view {
  max-height: 16rem;
  overflow-y: auto;
  padding-right: 0.45rem;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #c4b3a4 transparent;
}
.dl-updates-view::-webkit-scrollbar {
  width: 8px;
}
.dl-updates-view::-webkit-scrollbar-track {
  background: #f3ebe3;
  border-radius: 999px;
}
.dl-updates-view::-webkit-scrollbar-thumb {
  background: #c4b3a4;
  border-radius: 999px;
}
.dl-updates-view::-webkit-scrollbar-thumb:hover {
  background: #a89484;
}
.dl-update { margin: 0 0 1.1rem; }
.dl-update-head {
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  margin: 0 0 0.2rem;
  color: var(--ink);
}
.dl-update-head span { color: var(--muted); font-size: 0.88rem; }
.dl-update-title { margin: 0 0 0.35rem; color: var(--ink); }
.dl-update ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  color: var(--muted);
}
.dl-update li { margin: 0 0 0.22rem; }
@media (prefers-reduced-motion: reduce) {
  .dl-updates-track { animation: none; }
  .dl-updates-view { overflow: auto; mask-image: none; }
}
@media (max-width: 900px) {
  .dl-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .stat-geo { grid-template-columns: 1fr; }
}
.stat-tip {
  position: absolute;
  z-index: 2;
  background: #14110f;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.45;
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  pointer-events: none;
  min-width: 7rem;
}
.forum-flash {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 0.7rem 1rem;
  color: var(--accent-dark);
}
.forum-hint, .forum-meta { color: var(--muted); }
.forum-compose {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 1rem;
}
.forum-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  margin: 0 0 1.4rem;
}
.forum-form[hidden] {
  display: none !important;
}
.hp-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.forum-form h3 { margin: 0; }
.forum-form label {
  display: grid;
  gap: 0.3rem;
  color: var(--muted);
}
.forum-form input,
.forum-form textarea,
.forum-form select {
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  width: 100%;
}
.forum-form button { justify-self: start; }
.forum-field-label {
  display: block;
  margin: 0 0 0.3rem;
  color: var(--muted);
}
.rich {
  position: relative;
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
}
.rich-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.4rem;
  border-bottom: 1px solid var(--line);
  background: #f7f1ea;
  user-select: none;
}
.rich-bar button {
  min-width: 2rem;
  padding: 0.28rem 0.5rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.rich-bar button:hover { border-color: var(--ink); }
.rich-bar select {
  height: 1.9rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
}
.rich-emoji {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem;
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.45rem;
  border-bottom: 1px solid var(--line);
  background: #fffaf4;
}
.rich-emoji[hidden] { display: none; }
.rich-emoji-btn,
.rich-bar button.js-emoji-toggle {
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}
.rich-emoji-btn {
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 1.15rem;
  cursor: pointer;
  line-height: 1;
}
.rich-emoji-btn:hover { background: #f3e6d8; }
.rich-area {
  min-height: 9rem;
  padding: 0.7rem 0.8rem;
  outline: none;
  overflow-wrap: anywhere;
  font-family: Arial, Helvetica, "Color Emoji", sans-serif;
  font-weight: 400;
}
.rich-area:empty:before {
  content: "Write your message…";
  color: #9a8c80;
}
.rich-area strong, .rich-area b { font-weight: 800; }
.rich-area em, .rich-area i { font-style: italic; }
.rich-area u { text-decoration: underline; }
.rich-area s { text-decoration: line-through; }
.rich-area a { color: var(--accent); text-decoration: underline; }
.rich-area ul, .rich-area ol { margin: 0.2rem 0 0.4rem; padding-left: 1.3rem; }
.rich-area img,
.forum-html img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
  margin: 0.45rem 0;
  cursor: grab;
}
.rich-area video,
.forum-html video {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0.45rem 0;
  border-radius: 6px;
  background: #111;
}
.rich-area video:not([width]),
.forum-html video:not([width]) {
  width: 100%;
  max-width: 720px;
}
.rich-area img.is-picked,
.rich-area video.is-picked { outline: 2px solid #c45500; outline-offset: 2px; }
.rich-img-ui {
  position: absolute;
  z-index: 4;
  pointer-events: none;
  border: 2px solid #c45500;
  box-sizing: border-box;
}
.rich-img-ui[hidden] { display: none; }
.rich-img-crop {
  pointer-events: auto;
  position: absolute;
  left: 0;
  top: -30px;
  border: 0;
  background: #c45500;
  color: #fff;
  border-radius: 4px;
  padding: 0.15rem 0.5rem;
  font: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.rich-img-handle {
  pointer-events: auto;
  position: absolute;
  width: 10px;
  height: 10px;
  background: #fff;
  border: 2px solid #c45500;
  border-radius: 2px;
}
.rich-img-handle[data-dir="nw"] { left: -6px; top: -6px; cursor: nwse-resize; }
.rich-img-handle[data-dir="ne"] { right: -6px; top: -6px; cursor: nesw-resize; }
.rich-img-handle[data-dir="sw"] { left: -6px; bottom: -6px; cursor: nesw-resize; }
.rich-img-handle[data-dir="se"] { right: -6px; bottom: -6px; cursor: nwse-resize; }
.img-crop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(20, 12, 8, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.img-crop-card {
  background: #fff;
  border-radius: 8px;
  padding: 0.8rem;
  max-width: min(920px, 100%);
  width: 100%;
}
.img-crop-title { margin: 0 0 0.55rem; font-weight: 700; }
.img-crop-stage {
  position: relative;
  display: flex;
  justify-content: center;
  background: #1c140f;
  min-height: 180px;
  max-height: 68vh;
  overflow: hidden;
}
.img-crop-stage img {
  max-width: 100%;
  max-height: 68vh;
  display: block;
  cursor: default;
}
.img-crop-box {
  position: absolute;
  border: 2px solid #fff;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
  cursor: move;
}
.img-crop-handle {
  position: absolute;
  right: -6px;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #c45500;
  cursor: nwse-resize;
}
.img-crop-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 0.7rem; }
.rich.is-drag {
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}
.topic-tabs {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}
.topic-tabs a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--card);
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9rem;
}
.topic-tabs a.is-on,
.topic-tabs a:hover {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}
.topic-chip {
  display: inline-block;
  background: #f3e6d8;
  color: var(--accent-dark);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.82rem;
  white-space: nowrap;
}
.thread-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  background: var(--card);
}
.thread-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 40rem;
}
.thread-table th,
.thread-table td {
  text-align: left;
  padding: 0.85rem 0.9rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.thread-table th {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  background: #f3ebe2;
}
.thread-table tr:last-child td { border-bottom: 0; }
.thread-table td a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.thread-table td a:hover { color: var(--accent); }
.yt-op, .yt-comment, .yt-composer {
  margin: 0 0 1rem;
}
.yt-row {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}
.yt-main { min-width: 0; flex: 1; }
.yt-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 40px;
  background: #ead9c8;
}
.forum-me {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  color: inherit;
  text-decoration: none;
  max-width: 100%;
}
.forum-me .yt-avatar {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
}
.avatar-tip-wrap {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.avatar-tip {
  display: none;
  position: absolute;
  left: 50%;
  top: calc(100% + 8px);
  transform: translateX(-50%);
  z-index: 80;
  background: #14110f;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.4;
  padding: 0.85rem 1rem 0.95rem;
  border-radius: 12px;
  white-space: normal;
  width: max-content;
  max-width: min(22rem, calc(100vw - 2.4rem));
  pointer-events: none;
  box-shadow: 0 10px 28px rgba(20, 17, 15, 0.22);
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}
.avatar-tip-photo {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  object-fit: cover;
  background: #ead9c8;
  display: block;
}
.avatar-tip-letter {
  display: grid;
  place-items: center;
  font-size: 3rem;
  font-weight: 800;
  color: #b33f0b;
  background: #fffaf4;
}
.avatar-tip-name {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}
.avatar-tip-meta {
  display: block;
  font-weight: 500;
  opacity: 0.88;
  max-width: 18rem;
}
.avatar-tip-wrap:hover .avatar-tip {
  display: flex;
}
.profile-avatar-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.avatar-crop {
  display: grid;
  gap: 0.7rem;
  justify-items: start;
}
.avatar-crop[hidden] { display: none !important; }
.avatar-crop-view {
  position: relative;
  width: 280px;
  height: 280px;
  overflow: hidden;
  background: #1a1612;
  border-radius: 12px;
  touch-action: none;
  cursor: grab;
  user-select: none;
}
.avatar-crop-view.is-drag { cursor: grabbing; }
.avatar-crop-view img {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: none;
  transform-origin: center center;
  pointer-events: none;
}
.avatar-crop-mask {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 220px;
  height: 220px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.48);
  border: 2px solid rgba(255, 255, 255, 0.92);
  pointer-events: none;
}
.avatar-crop-zoom { width: 280px; }
.yt-avatar-letter {
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  font-weight: 700;
}
.yt-meta {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 0.92rem;
}
.yt-meta strong { color: var(--ink); }
.yt-count {
  font-size: 1.15rem;
  margin: 1.4rem 0 1rem;
}
.yt-composer {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  margin-bottom: 1.4rem;
}
.yt-composer-body { flex: 1; min-width: 0; }
.yt-composer-body .btn { margin-top: 0.7rem; }
.yt-nested {
  margin: 0.85rem 0 0;
  padding: 0.7rem 0 0 0.2rem;
}
.yt-nested-form {
  margin: 0.7rem 0 0.4rem;
}
.forum-html {
  overflow-wrap: anywhere;
  margin: 0 0 0.55rem;
  font-family: Arial, Helvetica, "Color Emoji", sans-serif;
}
.forum-html p { margin: 0 0 0.55rem; }
.forum-html p:last-child { margin-bottom: 0; }
.forum-html a { word-break: break-all; }
.forum-html ul, .forum-html ol { margin: 0.3rem 0 0.6rem; padding-left: 1.2rem; }
.yt-op .forum-html,
.yt-comment .forum-html {
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.65rem 0.8rem;
}
.thread-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.thread-list li {
  display: grid;
  gap: 0.15rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}
.thread-list li:last-child { border-bottom: 1px solid var(--line); }
.thread-list a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
}
.thread-list a:hover { color: var(--accent); }
.thread-list span { color: var(--muted); font-size: 0.92rem; }
.forum-post { margin: 0 0 0.9rem; }
.forum-body {
  margin: 0.4rem 0 0.7rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.forum-actions {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.forum-actions form { margin: 0; }
.react-bar {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  margin: 0.15rem 0 0.45rem;
}
.react-form { margin: 0; }
.react-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 0.18rem 0.62rem;
  font: inherit;
  cursor: pointer;
  display: inline-flex;
  gap: 0.28rem;
  align-items: center;
}
.react-btn:hover { border-color: var(--accent); }
.react-btn.is-on {
  border-color: var(--accent);
  background: #fff4ec;
  color: var(--accent-dark);
}
.react-flower.is-on {
  border-color: #d984a8;
  background: #fff0f5;
  color: #9a4068;
}
.btn-wechat {
  background: #07c160;
  color: #fff;
  border-color: #07c160;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.btn-wechat:hover {
  background: #06ad56;
  color: #fff;
  border-color: #06ad56;
}
.btn-wechat svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
  display: block;
}
.sso-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1rem;
}
button.btn {
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

@media (max-width: 760px) {
  .grid { grid-template-columns: 1fr; }
  .wrap { width: min(var(--max), calc(100% - 1.4rem)); }
  .nav { gap: 0.5rem; min-height: 56px; }
  .brand { gap: 0.35rem; letter-spacing: 0.06em; font-size: 0.9rem; }
  .brand img { width: 28px; height: 28px; }
  .nav-links { gap: 0.55rem; }
  .nav-links a { font-size: 0.8rem; }
}
