﻿:root {
  --bg: #f6f8fc;
  --surface: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --line: #e2e8f0;
  --mint: #38bdf8;
  --mint-dark: #2563eb;
  --coral: #4f46e5;
  --yellow: #f59e0b;
  --blue: #2563eb;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(37, 99, 235, 0.12), transparent 32vw),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 42%, #ffffff 100%);
  color: var(--ink);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(16px, 4vw, 48px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  color: #1d4ed8;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  color: #fff;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
}

.nav a:hover {
  color: var(--mint-dark);
}

.ghost-btn,
.text-btn,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 700;
}

.ghost-btn {
  padding: 0 16px;
  background: var(--surface);
  color: var(--mint-dark);
}

.account-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 290px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: var(--surface);
}

.user-pill span {
  overflow: hidden;
  max-width: 190px;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill strong {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 7px;
  background: #eff6ff;
  color: var(--mint-dark);
  font-size: 11px;
}

.workspace,
.template-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) 1fr;
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
}

.template-section {
  padding: 30px clamp(16px, 4vw, 48px) 44px;
}

.home-hero {
  padding: 54px clamp(16px, 4vw, 48px) 34px;
}

.home-hero-inner {
  overflow: hidden;
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  border: 1px solid rgba(191, 219, 254, 0.8);
  border-radius: 8px;
  padding: clamp(30px, 5vw, 64px);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.96), rgba(14, 165, 233, 0.88)),
    #2563eb;
  color: #fff;
  box-shadow: 0 24px 70px rgba(37, 99, 235, 0.22);
}

.home-hero-inner::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -80px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
}

.home-hero h1 {
  max-width: 920px;
  margin-bottom: 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.06;
}

.home-hero h1 span {
  display: block;
}

.home-hero h1 .hero-subtitle-line {
  margin-top: 8px;
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.14;
  white-space: nowrap;
}

.home-hero p {
  max-width: 680px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.75;
}

.home-hero .eyebrow {
  color: #bfdbfe;
}

.hero-search {
  display: grid;
  gap: 8px;
  max-width: 760px;
  margin-top: 26px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 800;
}

.hero-search input {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: #fff;
  color: var(--ink);
  outline: none;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 150px));
  gap: 12px;
  margin-top: 24px;
}

.hero-stats div {
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.12);
}

.hero-stats strong {
  display: block;
  color: #fff;
  font-size: 24px;
}

.hero-stats span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.filter-panel,
.content-area,
.scene-card,
.workflow-list,
.download-modal {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.filter-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  padding: 22px;
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: 32px;
  line-height: 1.18;
}

h2 {
  margin-bottom: 10px;
  font-size: 26px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 18px;
}

.panel-head p:last-child,
.lead,
.scene-card p,
.modal-body p,
.template-meta,
.template-desc {
  color: var(--muted);
  line-height: 1.65;
}

.search-box {
  display: grid;
  gap: 8px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.search-box input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-group p {
  flex: 0 0 100%;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.filter {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.filter.active {
  border-color: var(--mint-dark);
  background: var(--mint-dark);
  color: #fff;
}

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.stats div {
  padding: 12px;
  border-radius: 8px;
  background: #eff6ff;
}

.stats strong {
  display: block;
  color: var(--mint-dark);
  font-size: 22px;
}

.stats span {
  color: var(--muted);
  font-size: 12px;
}

.content-area {
  min-width: 0;
  padding: 22px;
  border-radius: 8px;
}

.content-toolbar,
.section-title {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.text-btn {
  padding: 0 14px;
  background: transparent;
  color: var(--mint-dark);
}

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

.template-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.12);
}

.template-card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #f2ece2;
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  min-height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--blue);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgba(46, 57, 54, 0.12);
}

.favorite-btn.is-favorite,
.secondary-btn.is-favorite {
  border-color: var(--coral);
  background: #fff4f1;
  color: var(--coral);
}

.template-body {
  padding: 14px;
}

.template-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.template-title-row h3 {
  margin-bottom: 4px;
  font-size: 16px;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  color: #4f46e5;
  font-size: 12px;
  font-weight: 800;
}

.template-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 12px;
}

.template-desc {
  min-height: 44px;
  margin-bottom: 12px;
  font-size: 13px;
}

.card-actions {
  display: flex;
  gap: 8px;
}

.primary-btn,
.secondary-btn {
  padding: 0 14px;
}

.primary-btn {
  border-color: var(--mint-dark);
  background: var(--mint-dark);
  color: #fff;
}

.secondary-btn {
  background: #fff;
  color: var(--mint-dark);
}

.scene-section,
.workflow-section,
.topics {
  padding: 44px clamp(16px, 4vw, 48px);
  max-width: 1536px;
  margin: 0 auto;
}

.scene-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.scene-card {
  min-height: 220px;
  padding: 22px;
  border-radius: 8px;
}

.scene-card > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  margin-bottom: 18px;
  background: #eff6ff;
  color: var(--mint-dark);
  font-weight: 900;
}

.scene-card h3 {
  margin-bottom: 8px;
}

.scene-card .text-btn {
  margin-top: 10px;
  padding: 0;
  border: 0;
}

.workflow-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 24px;
  align-items: start;
}

.workflow-copy {
  position: sticky;
  top: 92px;
}

.workflow-list {
  display: grid;
  gap: 0;
  padding: 8px 18px;
  border-radius: 8px;
}

.workflow-list div {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 0 14px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.workflow-list div:last-child {
  border-bottom: 0;
}

.workflow-list span {
  grid-row: span 2;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 999px;
  background: var(--mint-dark);
  color: #fff;
  font-weight: 900;
}

.workflow-list strong {
  margin-bottom: 4px;
}

.workflow-list p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.topic-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.topic-pill {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.topic-pill:hover {
  border-color: rgba(37, 99, 235, 0.38);
  background: #eff6ff;
  color: var(--mint-dark);
}

.download-modal,
.auth-modal,
.member-modal,
.preview-modal {
  width: min(460px, calc(100vw - 32px));
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
}

.preview-modal {
  width: min(980px, calc(100vw - 32px));
}

.download-modal::backdrop,
.auth-modal::backdrop,
.member-modal::backdrop,
.preview-modal::backdrop {
  background: rgba(22, 38, 36, 0.35);
  backdrop-filter: blur(4px);
}

.close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  font-size: 22px;
}

.modal-body {
  padding: 28px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.netdisk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.preview-gallery {
  display: grid;
  gap: 14px;
  max-height: min(70vh, 760px);
  overflow-y: auto;
  padding-right: 4px;
}

.preview-gallery img {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.auth-tab {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}

.auth-tab.active {
  border-color: var(--mint-dark);
  background: var(--mint-dark);
  color: #fff;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.auth-form input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.template-admin-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
  border: 1px solid rgba(234, 223, 208, 0.86);
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.template-admin-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.template-admin-form input,
.template-admin-form select,
.template-admin-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.template-admin-form input,
.template-admin-form select {
  height: 42px;
}

.template-admin-form textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

.template-admin-form input:focus,
.template-admin-form select:focus,
.template-admin-form textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.category-row .secondary-btn {
  white-space: nowrap;
}

.form-wide {
  grid-column: span 2;
}

.form-actions {
  display: flex;
  align-items: end;
  gap: 10px;
}

.cover-upload {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.cover-picker {
  overflow: hidden;
  display: grid;
  width: 100%;
  min-height: 152px;
  place-items: center;
  border: 1px dashed rgba(37, 99, 235, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(14, 165, 233, 0.10)),
    #fff;
  color: var(--mint-dark);
  cursor: pointer;
  font-weight: 900;
}

.cover-picker:hover {
  border-color: var(--mint-dark);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.12);
}

.cover-picker img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.cover-picker.has-image {
  min-height: auto;
  border-style: solid;
  padding: 0;
  background: #fff;
}

.preview-upload {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.netdisk-editor {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fbff;
}

.netdisk-list {
  display: grid;
  gap: 10px;
}

.netdisk-row {
  display: grid;
  grid-template-columns: 150px minmax(220px, 1fr) 110px auto;
  gap: 8px;
  align-items: center;
}

.preview-upload-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.preview-upload-head span {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.preview-upload-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.preview-empty {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed rgba(37, 99, 235, 0.34);
  border-radius: 8px;
  background: #eff6ff;
  color: var(--muted);
  font-size: 13px;
}

.preview-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.preview-thumb {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.preview-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.preview-thumb-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
}

.preview-thumb-actions .text-btn {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.template-table-wrap {
  margin-top: 8px;
}

.template-admin-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 180px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.template-admin-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.template-admin-toolbar select {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  outline: none;
}

.detail-shell {
  padding: 28px clamp(16px, 4vw, 48px) 48px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 24px;
  max-width: 1440px;
  margin: 0 auto;
  align-items: start;
}

.detail-hero {
  position: sticky;
  top: 92px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.detail-meta {
  margin: 14px 0 18px;
}

.detail-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.detail-downloads span {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.detail-gallery {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.detail-gallery img {
  display: block;
  width: 100%;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(46, 57, 54, 0.12);
}

.member-page {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 32vw),
    linear-gradient(180deg, #f8fbff 0%, #f6f8fc 58%, #ffffff 100%);
}

.member-dashboard {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 22px;
  padding: 28px clamp(16px, 4vw, 54px) 54px;
}

.member-nav-panel,
.member-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.member-nav-panel {
  position: sticky;
  top: 92px;
  align-self: start;
  overflow: hidden;
}

.member-nav-panel::before {
  content: "";
  display: block;
  height: 6px;
  margin: -20px -20px 18px;
  background: linear-gradient(90deg, var(--mint-dark), var(--mint));
}

.member-avatar {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  margin-bottom: 16px;
  background: var(--mint-dark);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
}

.member-nav-panel h1 {
  margin-bottom: 8px;
  font-size: 26px;
}

.member-nav-panel > p:not(.eyebrow) {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.member-menu {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.member-menu a {
  display: flex;
  align-items: center;
  min-height: 40px;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.member-menu a:hover,
.member-menu a.active {
  background: #eff6ff;
  color: var(--mint-dark);
}

.member-main-panel {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.member-hero-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 8px;
  padding: clamp(20px, 3vw, 30px);
  background:
    radial-gradient(circle at 92% 18%, rgba(59, 130, 246, 0.24), transparent 18vw),
    linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: var(--shadow);
}

.member-hero-panel h1 {
  max-width: 760px;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: clamp(28px, 4vw, 44px);
}

.member-hero-panel .template-desc {
  max-width: 720px;
}

.member-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.member-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.member-summary-row article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.member-summary-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.member-summary-row strong {
  display: block;
  margin: 8px 0 6px;
  color: var(--mint-dark);
  font-size: 24px;
}

.member-summary-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.member-content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
}

.member-lower-grid {
  align-items: start;
}

.member-library {
  min-width: 0;
}

.member-side {
  display: grid;
  gap: 18px;
  align-self: start;
}

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

.member-library-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.member-library-toolbar .search-box {
  margin: 0;
}

.member-library-toolbar label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.member-library-toolbar select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.benefit-list {
  display: grid;
  gap: 10px;
  margin: 14px 0 16px;
}

.benefit-list div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.benefit-list strong {
  color: var(--ink);
}

.benefit-list span {
  color: var(--muted);
  font-size: 13px;
}

.member-progress {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  margin: 14px 0 12px;
  background: #e5edf8;
}

.member-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint-dark), var(--mint));
  transition: width 0.28s ease;
}

.activity-tabs {
  display: inline-flex;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px;
  margin-bottom: 14px;
  background: #f8fbff;
}

.activity-tabs button {
  border: 0;
  border-radius: 6px;
  padding: 8px 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-weight: 900;
}

.activity-tabs button.active {
  background: #ffffff;
  color: var(--mint-dark);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.activity-item img {
  width: 76px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eff6ff;
}

.activity-item strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-item p {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.preference-form {
  display: grid;
  gap: 12px;
}

.preference-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.preference-form select {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
}

.auth-form input:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.code-field {
  display: none;
}

.code-field.is-visible {
  display: grid;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.code-row .secondary-btn {
  min-width: 116px;
  white-space: nowrap;
}

.auth-message {
  min-height: 18px;
  margin: 0;
  color: var(--coral);
  font-size: 13px;
}

.auth-message[data-type="success"] {
  color: var(--mint-dark);
}

.auth-message[data-type="info"] {
  color: var(--muted);
}

.member-summary {
  display: grid;
  gap: 10px;
  margin: 16px 0 22px;
}

.member-summary div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.member-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.member-summary strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 14px;
}

.reset-box {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.admin-page {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 34vw),
    linear-gradient(180deg, #f8fbff 0%, #f6f8fc 48%, #ffffff 100%);
}

.admin-shell {
  padding: 28px clamp(16px, 4vw, 48px) 48px;
}

.admin-hero,
.admin-toolbar,
.admin-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.admin-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 420px);
  gap: 24px;
  align-items: end;
  padding: 24px;
}

.admin-hero::after {
  content: "";
  position: absolute;
  top: -42px;
  right: 28px;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  pointer-events: none;
}

.admin-key-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.admin-key-box label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-key-box input,
.admin-search input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  outline: none;
}

.admin-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
}

.admin-search {
  width: min(420px, 100%);
  margin: 0;
}

.admin-panel {
  margin-top: 18px;
  padding: 20px;
}

.admin-panel-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.user-table-wrap {
  overflow-x: auto;
}

.user-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  font-size: 14px;
}

.user-table th,
.user-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

.user-table th {
  color: var(--muted);
  font-size: 12px;
}

.member-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f7efe5;
  color: var(--coral);
  font-size: 12px;
  font-weight: 800;
}

.member-badge.is-member {
  background: #eff6ff;
  color: var(--mint-dark);
}

.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 1080px) {
  .workspace,
  .template-layout,
  .workflow-section,
  .member-dashboard,
  .member-content-grid {
    grid-template-columns: 1fr;
  }

  .member-nav-panel {
    position: static;
  }

  .filter-panel {
    position: static;
  }

  .detail-layout {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    position: static;
  }

  .member-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .ghost-btn {
    display: none;
  }

  .account-box .ghost-btn {
    display: inline-flex;
  }

  .account-box {
    width: 100%;
    justify-content: space-between;
  }

  .user-pill {
    max-width: calc(100vw - 116px);
  }

  .code-row {
    grid-template-columns: 1fr;
  }

  .admin-hero,
  .admin-key-box,
  .admin-toolbar,
  .admin-panel-head,
  .template-admin-form {
    grid-template-columns: 1fr;
    align-items: start;
    flex-direction: column;
  }

  .form-wide {
    grid-column: auto;
  }

  .admin-key-box .primary-btn,
  .admin-toolbar .secondary-btn {
    width: 100%;
  }

  .category-row {
    grid-template-columns: 1fr;
  }

  .category-row .secondary-btn {
    width: 100%;
  }

  .preview-upload-head {
    align-items: stretch;
    flex-direction: column;
  }

  .preview-list {
    grid-template-columns: 1fr;
  }

  .template-admin-toolbar {
    grid-template-columns: 1fr;
  }

  .netdisk-row {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding-top: 18px;
  }

  .template-section {
    padding: 18px 12px 34px;
  }

  .template-layout {
    gap: 14px;
  }

  .filter-panel {
    padding: 14px;
  }

  .filter-panel .panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
  }

  .filter-panel .panel-head h2 {
    margin: 0;
    font-size: 18px;
  }

  .filter-panel .eyebrow {
    display: none;
  }

  .filter-group {
    display: block;
  }

  .filter-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .filter {
    flex: 0 0 auto;
  }

  .content-area {
    padding: 14px;
  }

  .detail-shell {
    padding: 18px 12px 34px;
  }

  .template-grid,
  .scene-grid,
  .topic-list,
  .favorite-grid,
  .member-summary-row,
  .member-library-toolbar {
    grid-template-columns: 1fr;
  }

  .member-dashboard {
    padding: 18px 12px 34px;
  }

  .member-hero-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .member-quick-actions {
    justify-content: flex-start;
  }

  .member-quick-actions .primary-btn,
  .member-quick-actions .secondary-btn {
    flex: 1;
  }

  .activity-item {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .activity-item img {
    width: 64px;
  }

  .activity-item .secondary-btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .content-toolbar,
  .section-title {
    align-items: start;
    flex-direction: column;
  }

  h1 {
    font-size: 27px;
  }

  .home-hero h1 .hero-subtitle-line {
    font-size: 25px;
    white-space: normal;
  }

  h2 {
    font-size: 23px;
  }
}
