:root {
  color-scheme: dark;
  --win: #1e201d;
  --panel: #242723;
  --sel: #2d332e;
  --hover: #30362f;
  --line: #454942;
  --hair: #32362f;
  --text: #f1eee7;
  --muted: #9ca198;
  --jade: #86aa91;
  --deep: #496854;
  --copper: #b98265;
  --danger: #ff6b6b;
  --danger-bg: #542b2b;
  --inset: #191b18;
  --font-display: KaiTi, STKaiti, "Kaiti SC", "LXGW WenKai", "Noto Serif SC", serif;
  --font-body: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-synthesis: none;
  line-break: strict;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { background: var(--win); }
body {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--win);
  color: var(--text);
  font: 17px/1.7 var(--font-body);
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; font-weight: 400; }
p { text-wrap: pretty; }

.top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 76px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--hair);
  background: var(--panel);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}
.logo {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  flex: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-mark {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.5px;
}
.brand-sub {
  color: var(--jade);
  font-size: 13px;
}
.top-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.top-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}
.top-note[hidden] { display: none; }
.session {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.session img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--hover); }
.btn.primary {
  background: var(--deep);
  border-color: var(--jade);
  font-weight: 700;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost {
  border-color: transparent;
  color: var(--muted);
  padding-inline: 8px;
}
.btn.ghost:hover { color: var(--text); background: transparent; }
.btn.danger {
  border-color: var(--danger);
  color: var(--danger);
}
.btn.danger:hover { background: var(--danger-bg); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:focus-visible,
.nav a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--jade);
  outline-offset: 2px;
}

.workspace {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 0;
}
.side {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 24px 16px;
  border-right: 1px solid #343831;
}
.side-title {
  font-family: var(--font-display);
  font-size: 20px;
  padding: 0 10px 14px;
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
}
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a:focus { background: transparent; color: var(--muted); }
.nav a.active,
.nav a.active:focus {
  background: var(--sel);
  color: var(--jade);
  font-weight: 700;
}
.side-note {
  margin-top: auto;
  border-top: 1px solid var(--line);
  padding: 16px 10px 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.side-note strong {
  display: block;
  color: var(--jade);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 3px;
}

.app {
  padding: 24px 28px 40px;
  min-width: 0;
}
.page-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
}
.page-head h1,
.app > h1 {
  font-family: var(--font-display);
  font-size: clamp(26px, 2vw + 18px, 30px);
  line-height: 1.3;
  margin: 0 0 6px;
}
.lead {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  max-width: 36em;
}
.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}
.toolbar input {
  width: min(330px, 100%);
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--inset);
  padding: 0 14px;
}
.toolbar input:focus { border-color: var(--jade); outline: none; }

.feature {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(280px, 1fr);
  overflow: hidden;
  margin-bottom: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  min-width: 0;
}
.feature-media {
  position: relative;
  min-height: 218px;
  background: #16252a;
}
.feature-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 16 / 10;
}
.feature-copy {
  display: flex;
  flex-direction: column;
  padding: 25px 28px;
}
.eyebrow {
  color: var(--jade);
  font-size: 12px;
  letter-spacing: 1.4px;
}
.feature h2 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.3;
  margin: 10px 0 8px;
}
.desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 36em;
  margin: 0;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.pill {
  font-size: 12px;
  color: var(--jade);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 9px;
}
.action {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 16px;
}
.action .ghost { color: var(--muted); font-size: 14px; }

.section-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 12px;
}
.section-row h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
}
.section-row span {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.card {
  display: block;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid #373b35;
  border-radius: 11px;
  overflow: hidden;
  min-width: 0;
}
.card .cover {
  position: relative;
  background: #2a2e29;
}
.card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #111;
}
.kind {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 4px 7px;
  border-radius: 5px;
  background: #171a16d9;
  color: var(--jade);
  font-size: 11px;
}
.card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  padding: 12px 13px 13px;
}
.card h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card small, .muted { color: var(--muted); font-size: 13px; }
@media (prefers-reduced-motion: no-preference) {
  .card img, .feature-media img { transition: transform 0.55s ease; }
  .card:hover img, .feature:hover img { transform: scale(1.035); }
  .card:hover { border-color: var(--jade); }
}

.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 5px;
  background: #171a16d9;
  color: var(--jade);
  font-size: 12px;
  font-family: var(--font-body);
}
.badge.warn { background: color-mix(in srgb, var(--copper) 18%, transparent); color: #e3c0aa; }
.badge.bad { background: var(--danger-bg); color: #ffb0b0; }

.detail {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 22px;
}
.detail-media {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #111;
}
.detail-media img,
.detail-media video {
  width: 100%;
  display: block;
  background: #000;
}
.back {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.back:hover { color: var(--jade); }
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 22px 20px;
}
.form-panel { max-width: 640px; }
.panel h2,
.panel > h1 {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.3;
  margin: 0 0 8px;
}
label { display: block; margin: 0 0 14px; font-size: 14px; }
label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
}
label input,
label select,
label textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--inset);
  padding: 10px 12px;
}
textarea { min-height: 88px; resize: vertical; }
.file-btn {
  display: block;
  border: 1px dashed var(--line);
  border-radius: 9px;
  background: var(--inset);
  color: var(--muted);
  padding: 12px 14px;
  font-size: 14px;
}
.file:hover .file-btn { border-color: var(--jade); color: var(--text); }
.file { position: relative; }
.file input[type="file"] {
  position: absolute;
  inset: auto 0 0 0;
  height: 46px;
  opacity: 0;
  cursor: pointer;
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
}
.check input {
  width: auto;
  display: inline;
  margin-top: 5px;
}
.preview {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 9px;
  margin: 0 0 14px;
  background: #111;
}
.file-name { color: var(--muted); font-size: 12px; margin: -8px 0 14px; }
.progress {
  height: 8px;
  border-radius: 99px;
  background: var(--inset);
  overflow: hidden;
  margin: 8px 0 16px;
}
.progress > i { display: block; height: 100%; width: 0; background: var(--jade); }
.msg { color: var(--muted); font-size: 14px; }

.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--panel);
  border: 1px solid #373b35;
  border-radius: 11px;
  padding: 10px;
}
.row-link {
  display: flex;
  gap: 12px;
  align-items: center;
  flex: 1;
  min-width: 0;
  text-decoration: none;
}
.row img {
  width: 88px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: #111;
  flex: none;
}
.row .grow { flex: 1; min-width: 0; }
.row-link:hover strong { color: var(--jade); }
.row strong {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 400;
}
.empty {
  color: var(--muted);
  padding: 48px 8px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  text-align: center;
}

.foot {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  padding: 16px 24px 22px;
  border-top: 1px solid #343831;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.foot p { margin: 0 0 4px; }
.foot p:last-child { margin-bottom: 0; }
.foot-copy { flex: 1; min-width: 0; }
.foot-meta {
  margin: 0 0 2px auto;
  color: var(--copper);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .top { flex-wrap: wrap; min-height: 0; padding: 12px 16px; }
  .top-note { display: none; }
  .workspace { grid-template-columns: 1fr; }
  .side {
    border-right: 0;
    border-bottom: 1px solid #343831;
    padding: 12px 16px 14px;
  }
  .side-title, .side-note { display: none; }
  .nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 6px;
  }
  .nav a { flex: none; white-space: nowrap; }
  .app { padding: 20px 16px 36px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .toolbar { margin-left: 0; }
  .toolbar input { width: 100%; }
  .feature,
  .detail { grid-template-columns: 1fr; }
  .feature-copy { padding: 18px 16px 16px; }
  .feature h2, .panel h2 { font-size: 24px; }
  .grid { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; }
  .foot { flex-direction: column; align-items: flex-start; padding: 16px; }
  .foot-meta { margin-left: 0; }
}
