:root {
  --blue: #2478f2;
  --blue-dark: #165ac2;
  --blue-soft: #eaf4ff;
  --mint: #18b6a2;
  --orange: #ff9f43;
  --rose: #f25f7a;
  --ink: #182033;
  --muted: #6b7690;
  --line: #dce8f6;
  --panel: rgba(255, 255, 255, 0.92);
  --shadow: 0 18px 45px rgba(35, 89, 150, 0.13);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(36, 120, 242, 0.14), transparent 28%),
    linear-gradient(180deg, #f5fbff 0%, #ffffff 45%, #f4f8fd 100%);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 32px));
  min-height: 74px;
  margin: 18px auto 0;
  padding: 0 24px;
  border: 1px solid rgba(220, 232, 246, 0.86);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 12px 30px rgba(34, 83, 138, 0.09);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  font-size: 25px;
  font-weight: 800;
}

.brand img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  padding: 11px 14px;
  border-radius: 8px;
  color: #3e4c66;
  font-weight: 700;
}

.main-nav a:hover {
  color: var(--blue);
  background: var(--blue-soft);
}

.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  border-radius: 2px;
  background: var(--ink);
}

main {
  width: min(1200px, calc(100% - 32px));
  margin: 26px auto 0;
}

.hero-shell {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  min-height: 340px;
  border: 1px solid rgba(171, 208, 248, 0.8);
  background: #0f6eef;
  box-shadow: var(--shadow);
}

.hero-track {
  display: flex;
  height: 100%;
  min-height: 340px;
  transition: transform 0.55s ease;
}

.hero-slide {
  position: relative;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: 24px;
  min-width: 100%;
  padding: 48px 72px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(20, 91, 211, 0.95), rgba(59, 149, 255, 0.82)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 28%);
}

.hero-actions {
  margin-top: 22px;
}

.hero-cta {
  min-width: 132px;
}

.hero-media-link {
  display: block;
}

.hero-copy span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  font-weight: 700;
}

.hero-copy h2 {
  margin: 22px 0 12px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.08;
}

.hero-copy p {
  width: min(520px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.8;
}

.hero-slide img {
  width: 100%;
  max-height: 240px;
  object-fit: contain;
  filter: drop-shadow(0 18px 24px rgba(10, 43, 96, 0.22));
}

.announcement-bar {
  margin-bottom: 18px;
}

.announcement-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid rgba(220, 232, 246, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(34, 83, 138, 0.08);
}

.announcement-copy p {
  margin: 0 0 6px;
  color: var(--blue);
  font-weight: 800;
}

.announcement-copy h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.announcement-copy div {
  color: var(--muted);
  line-height: 1.7;
}

.announcement-meta,
.announcement-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.resource-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 14px;
}

.search-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 42px;
  width: min(420px, 100%);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(34, 78, 135, 0.06);
}

.search-box input {
  min-height: 44px;
  border: 0;
  background: transparent;
}

.search-box button {
  width: 42px;
  min-height: 44px;
  border: 0;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 24px;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  color: var(--blue-dark);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(20, 70, 130, 0.22);
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 28px;
}

.hero-prev {
  left: 18px;
}

.hero-next {
  right: 18px;
}

.hero-dots {
  position: absolute;
  left: 50%;
  bottom: 18px;
  display: flex;
  gap: 7px;
  transform: translateX(-50%);
}

.hero-dots button {
  width: 24px;
  height: 7px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
}

.hero-dots button.active {
  width: 36px;
  background: #fff;
}

.category-bar {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 24px 2px 10px;
  scrollbar-width: none;
}

.category-bar::-webkit-scrollbar {
  display: none;
}

.category-bar button {
  flex: 0 0 auto;
  min-width: 126px;
  height: 50px;
  border: 1px solid #d7e6f6;
  border-radius: 999px;
  color: #2b4b78;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 8px 18px rgba(34, 78, 135, 0.06);
  cursor: pointer;
  font-weight: 800;
}

.category-bar button:hover,
.category-bar button.active {
  color: #fff;
  border-color: var(--blue);
  background: var(--blue);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin: 18px 0 20px;
}

.section-heading p,
.admin-topbar p {
  margin: 0 0 5px;
  color: var(--blue);
  font-weight: 800;
}

.section-heading h1,
.admin-topbar h1 {
  margin: 0;
  font-size: 30px;
}

#resourceCount {
  color: var(--muted);
  font-weight: 700;
}

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

.resource-card {
  overflow: hidden;
  border: 1px solid rgba(220, 232, 246, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 30px rgba(34, 83, 138, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.card-image-link img,
.detail-image-wrap img,
.modal-image {
  display: block;
  width: 100%;
  object-fit: cover;
}

.card-image-link img {
  aspect-ratio: 16 / 10;
}

.card-body {
  padding: 16px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.pin-pill {
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--rose));
}

.card-body h2 {
  min-height: 52px;
  margin: 12px 0 8px;
  font-size: 18px;
  line-height: 1.45;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-body p {
  min-height: 66px;
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.65;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.btn.primary {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 20px rgba(36, 120, 242, 0.24);
}

.btn.primary:hover {
  background: var(--blue-dark);
}

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

.btn.ghost {
  color: var(--blue-dark);
  border-color: var(--line);
  background: #fff;
}

.btn.danger {
  color: #fff;
  background: #e5484d;
}

.card-btn {
  width: 100%;
}

.site-footer {
  width: min(1200px, calc(100% - 32px));
  margin: 44px auto 20px;
  padding: 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
}

.site-footer p {
  margin: 0 0 8px;
  font-weight: 700;
}

.site-footer small {
  display: block;
  line-height: 1.7;
}

.admin-return-link {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--blue);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 31, 55, 0.42);
}

.modal.open {
  display: flex;
}

.modal-panel {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  width: min(880px, 100%);
  overflow: hidden;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(13, 33, 68, 0.3);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  font-size: 24px;
}

.modal-image {
  height: 100%;
  min-height: 390px;
}

.modal-content {
  padding: 42px;
}

.modal-content h2,
.detail-content h1 {
  margin: 14px 0;
  font-size: 34px;
  line-height: 1.25;
}

.modal-content p,
.detail-desc,
.detail-summary {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.modal-actions,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.detail-main {
  margin-top: 34px;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--blue-dark);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 34px;
  align-items: start;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.detail-image-wrap {
  overflow: hidden;
  border-radius: 8px;
}

.detail-image-wrap img {
  aspect-ratio: 16 / 11;
}

.detail-summary {
  font-weight: 700;
}

.resource-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.empty-state {
  padding: 64px;
  color: var(--muted);
  text-align: center;
}

.admin-body {
  background: linear-gradient(135deg, #eff7ff, #ffffff 46%, #f7fbff);
}

.hidden {
  display: none !important;
}

.admin-login {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.login-card img {
  width: 54px;
  height: 54px;
}

.login-card h1 {
  margin: 18px 0 24px;
}

.login-card p {
  min-height: 22px;
  color: #e5484d;
}

.admin-app {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  width: 100%;
  min-height: 100vh;
  margin: 0;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.admin-brand {
  margin-bottom: 26px;
  font-size: 20px;
}

.admin-tab,
.admin-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  margin-bottom: 10px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #39506f;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
  text-align: left;
}

.admin-tab.active,
.admin-tab:hover,
.admin-link:hover {
  color: var(--blue-dark);
  border-color: var(--line);
  background: var(--blue-soft);
}

.admin-workspace {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.admin-topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

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

.publish-status {
  margin: -10px 0 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #42536f;
  background: #fbfdff;
  font-weight: 700;
}

.publish-status[data-state="success"] {
  color: #0f766e;
  border-color: rgba(24, 182, 162, 0.35);
  background: rgba(24, 182, 162, 0.08);
}

.publish-status[data-state="warning"] {
  color: #9a5b00;
  border-color: rgba(255, 159, 67, 0.36);
  background: rgba(255, 159, 67, 0.1);
}

.publish-status[data-state="error"] {
  color: #b42318;
  border-color: rgba(229, 72, 77, 0.36);
  background: rgba(229, 72, 77, 0.1);
}

.file-btn input {
  display: none;
}

.admin-panel {
  display: none;
}

.admin-panel.active {
  display: block;
}

.admin-form,
.admin-list {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(34, 83, 138, 0.08);
}

.admin-form {
  margin-bottom: 20px;
}

.admin-form h2 {
  margin: 0 0 18px;
}

.form-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.form-title h2 {
  margin: 0;
}

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

label {
  display: grid;
  gap: 8px;
  color: #42536f;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfdff;
  outline: none;
}

textarea {
  resize: vertical;
}

.check-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-self: end;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.check-field input {
  width: 18px;
  min-height: 18px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(36, 120, 242, 0.12);
}

.admin-form > label,
.admin-form > .btn {
  margin-top: 14px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-resource {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.admin-resource img {
  width: 94px;
  height: 68px;
  border-radius: 8px;
  object-fit: cover;
}

.admin-resource span {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.admin-resource h3 {
  margin: 5px 0;
}

.admin-resource p {
  margin: 0;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.banner-editor {
  display: grid;
  gap: 14px;
}

.banner-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.panel-subtitle {
  margin: 22px 0 14px;
  font-size: 18px;
}

.panel-helper {
  margin: -6px 0 18px;
  color: var(--muted);
}

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

  .hero-slide,
  .detail-layout,
  .modal-panel {
    grid-template-columns: 1fr;
  }

  .modal-image {
    min-height: 240px;
  }

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

  .admin-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    height: auto;
    gap: 8px;
  }

  .admin-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .site-header {
    width: calc(100% - 20px);
    min-height: 62px;
    margin-top: 10px;
    padding: 0 12px;
  }

  .brand {
    font-size: 19px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
  }

  main {
    width: calc(100% - 20px);
    margin-top: 16px;
  }

  .hero-shell,
  .hero-track {
    min-height: 236px;
  }

  .hero-slide {
    gap: 8px;
    padding: 26px 22px 42px;
  }

  .hero-copy h2 {
    margin-top: 14px;
    font-size: 30px;
  }

  .hero-copy p {
    font-size: 14px;
    line-height: 1.65;
  }

  .hero-slide img {
    max-height: 96px;
  }

  .hero-arrow {
    display: none;
  }

  .category-bar {
    gap: 10px;
    padding-top: 16px;
  }

  .category-bar button {
    min-width: 106px;
    height: 42px;
    font-size: 14px;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .section-heading h1 {
    font-size: 24px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .card-body h2,
  .card-body p {
    min-height: auto;
  }

  .modal {
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .modal-content {
    padding: 24px;
  }

  .modal-content h2,
  .detail-content h1 {
    font-size: 26px;
  }

  .modal-actions,
  .detail-actions {
    flex-direction: column;
  }

  .detail-layout {
    padding: 14px;
    gap: 18px;
  }

  .site-footer {
    width: calc(100% - 20px);
    margin-top: 30px;
    padding: 18px 8px;
  }

  .admin-workspace {
    width: calc(100% - 20px);
    padding-top: 18px;
  }

  .admin-topbar,
  .form-title {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-actions,
  .form-grid,
  .banner-row,
  .admin-resource {
    grid-template-columns: 1fr;
  }

  .admin-actions,
  .row-actions {
    justify-content: stretch;
  }

  .admin-actions .btn,
  .row-actions .btn {
    flex: 1;
  }
}

/* Software downloads and VIP channel */
.utility-section,
.vip-section {
  margin-top: 28px;
}

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

.software-card {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.software-icon-wrap {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 8px;
  background: #eef6ff;
  overflow: hidden;
}

.software-icon-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.software-card-body {
  min-width: 0;
}

.software-card h2 {
  margin: 10px 0 6px;
  font-size: 18px;
}

.software-card p {
  min-height: 44px;
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.vip-intro {
  max-width: 760px;
  margin: -6px 0 18px;
  color: var(--muted);
  line-height: 1.8;
}

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

.vip-plan {
  position: relative;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.vip-plan.featured {
  border-color: #79aef0;
  box-shadow: 0 14px 30px rgba(35, 100, 180, 0.14);
}

.vip-plan-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #9a5a00;
  background: #fff1d8;
  font-size: 12px;
  font-weight: 800;
}

.vip-plan h2 {
  margin: 0 0 16px;
  font-size: 19px;
}

.vip-plan strong {
  display: block;
  color: var(--blue-dark);
  font-size: 34px;
  line-height: 1;
}

.vip-plan strong small {
  margin-right: 3px;
  font-size: 16px;
}

.vip-plan > span:not(.vip-plan-badge) {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.vip-plan p {
  min-height: 42px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.vip-payment-panel {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  margin-top: 22px;
  padding: 22px;
  border: 1px solid #d9e7f4;
  border-radius: 8px;
  background: #f8fbff;
}

.vip-qr-wrap {
  display: grid;
  place-items: center;
  min-height: 210px;
  padding: 10px;
  border-radius: 8px;
  background: #fff;
}

.vip-qr-wrap img {
  display: block;
  width: 190px;
  height: 190px;
  object-fit: contain;
}

.vip-payment-copy h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.vip-payment-copy > p:not(.eyebrow) {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.vip-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  color: var(--blue-dark);
  font-weight: 700;
}

.vip-payment-actions {
  margin-top: 18px;
}

@media (max-width: 980px) {
  .software-grid,
  .vip-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .utility-section,
  .vip-section {
    margin-top: 20px;
  }

  .software-grid,
  .vip-plan-grid,
  .vip-payment-panel {
    grid-template-columns: 1fr;
  }

  .software-card {
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .software-icon-wrap {
    width: 54px;
    height: 54px;
  }

  .software-card h2 {
    margin-top: 7px;
    font-size: 16px;
  }

  .software-card p {
    min-height: 0;
  }

  .vip-plan {
    padding: 18px;
  }

  .vip-payment-panel {
    gap: 16px;
    padding: 16px;
  }

  .vip-qr-wrap {
    min-height: 180px;
  }

  .vip-qr-wrap img {
    width: 160px;
    height: 160px;
  }
}

/* 前台手机端保持电脑端同款布局，避免线上移动端变成另一套显示格式。 */
@media (max-width: 980px) {
  body:not(.admin-body) {
    min-width: 1200px;
    overflow-x: auto;
  }

  body:not(.admin-body) .resource-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  body:not(.admin-body) .hero-slide {
    grid-template-columns: 1.08fr 0.92fr;
  }

  body:not(.admin-body) .detail-layout {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  body:not(.admin-body) .modal-panel {
    grid-template-columns: 0.9fr 1.1fr;
  }

  body:not(.admin-body) .modal-image {
    min-height: 390px;
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) .site-header {
    width: min(1200px, calc(100% - 32px));
    min-height: 74px;
    margin: 18px auto 0;
    padding: 0 24px;
  }

  body:not(.admin-body) .brand {
    font-size: 25px;
  }

  body:not(.admin-body) .brand img {
    width: 38px;
    height: 38px;
  }

  body:not(.admin-body) .menu-toggle {
    display: none;
  }

  body:not(.admin-body) .main-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  body:not(.admin-body) main {
    width: min(1200px, calc(100% - 32px));
    margin-top: 26px;
  }

  body:not(.admin-body) .hero-shell,
  body:not(.admin-body) .hero-track {
    min-height: 340px;
  }

  body:not(.admin-body) .hero-slide {
    gap: 24px;
    padding: 48px 72px;
  }

  body:not(.admin-body) .hero-copy h2 {
    margin-top: 22px;
    font-size: clamp(34px, 5vw, 58px);
  }

  body:not(.admin-body) .hero-copy p {
    font-size: 18px;
    line-height: 1.8;
  }

  body:not(.admin-body) .hero-slide img {
    max-height: 240px;
  }

  body:not(.admin-body) .hero-arrow {
    display: block;
  }

  body:not(.admin-body) .category-bar {
    gap: 16px;
    padding-top: 24px;
  }

  body:not(.admin-body) .category-bar button {
    min-width: 126px;
    height: 50px;
    font-size: inherit;
  }

  body:not(.admin-body) .section-heading {
    align-items: end;
    flex-direction: row;
    gap: 0;
  }

  body:not(.admin-body) .section-heading h1 {
    font-size: 30px;
  }

  body:not(.admin-body) .resource-grid {
    gap: 22px;
  }

  body:not(.admin-body) .card-body h2 {
    min-height: 52px;
  }

  body:not(.admin-body) .card-body p {
    min-height: 66px;
  }

  body:not(.admin-body) .modal {
    padding: 20px;
  }

  body:not(.admin-body) .modal-panel {
    max-height: none;
    overflow: hidden;
  }

  body:not(.admin-body) .modal-content {
    padding: 42px;
  }

  body:not(.admin-body) .modal-content h2,
  body:not(.admin-body) .detail-content h1 {
    font-size: 34px;
  }

  body:not(.admin-body) .modal-actions,
  body:not(.admin-body) .detail-actions {
    flex-direction: row;
  }

  body:not(.admin-body) .detail-layout {
    gap: 34px;
    padding: 26px;
  }

  body:not(.admin-body) .site-footer {
    width: min(1200px, calc(100% - 32px));
    margin-top: 44px;
    padding: 24px;
  }
}

/* Mobile front-end optimization: compact, readable, and still resource-dense. */
@media (max-width: 980px) {
  body:not(.admin-body) {
    min-width: 0;
    overflow-x: hidden;
  }

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

  body:not(.admin-body) .hero-slide,
  body:not(.admin-body) .detail-layout,
  body:not(.admin-body) .modal-panel {
    grid-template-columns: 1fr;
  }

  body:not(.admin-body) .modal-image {
    min-height: 240px;
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) .site-header {
    width: calc(100% - 20px);
    min-height: 62px;
    margin-top: 10px;
    padding: 0 12px;
  }

  body:not(.admin-body) .brand {
    font-size: 19px;
  }

  body:not(.admin-body) .brand img {
    width: 32px;
    height: 32px;
  }

  body:not(.admin-body) .menu-toggle {
    display: block;
  }

  body:not(.admin-body) .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  body:not(.admin-body) .main-nav.open {
    display: flex;
  }

  body:not(.admin-body) main {
    width: calc(100% - 20px);
    margin-top: 16px;
  }

  body:not(.admin-body) .hero-shell,
  body:not(.admin-body) .hero-track {
    min-height: 198px;
  }

  body:not(.admin-body) .hero-slide {
    grid-template-columns: minmax(0, 1fr) 118px;
    gap: 10px;
    padding: 22px 18px 36px;
  }

  body:not(.admin-body) .hero-copy span {
    padding: 5px 9px;
    font-size: 12px;
  }

  body:not(.admin-body) .hero-copy h2 {
    margin: 12px 0 8px;
    font-size: 24px;
    line-height: 1.18;
  }

  body:not(.admin-body) .hero-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.admin-body) .hero-slide img {
    max-height: 116px;
    align-self: center;
  }

  body:not(.admin-body) .hero-arrow {
    display: none;
  }

  body:not(.admin-body) .hero-dots {
    bottom: 12px;
  }

  body:not(.admin-body) .hero-dots button {
    width: 18px;
    height: 6px;
  }

  body:not(.admin-body) .hero-dots button.active {
    width: 28px;
  }

  body:not(.admin-body) .category-bar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 14px 0 8px;
  }

  body:not(.admin-body) .category-bar button {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 4px;
    font-size: 13px;
    white-space: nowrap;
  }

  body:not(.admin-body) .section-heading {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin: 14px 0 12px;
  }

  body:not(.admin-body) .section-heading h1 {
    font-size: 22px;
  }

  body:not(.admin-body) #resourceCount {
    font-size: 13px;
  }

  body:not(.admin-body) .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body:not(.admin-body) .resource-card {
    border-radius: 8px;
  }

  body:not(.admin-body) .card-image-link img {
    aspect-ratio: 4 / 3;
  }

  body:not(.admin-body) .card-body {
    padding: 9px;
  }

  body:not(.admin-body) .card-meta {
    gap: 4px;
  }

  body:not(.admin-body) .pill {
    min-height: 21px;
    padding: 2px 7px;
    font-size: 11px;
  }

  body:not(.admin-body) .card-body h2 {
    display: -webkit-box;
    min-height: 38px;
    margin: 7px 0 5px;
    overflow: hidden;
    font-size: 14px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.admin-body) .card-body p {
    display: -webkit-box;
    min-height: 34px;
    margin: 0 0 8px;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.admin-body) .btn {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  body:not(.admin-body) .modal {
    padding: 12px;
  }

  body:not(.admin-body) .modal-panel {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  body:not(.admin-body) .modal-image {
    min-height: 170px;
  }

  body:not(.admin-body) .modal-content {
    padding: 20px;
  }

  body:not(.admin-body) .modal-content h2,
  body:not(.admin-body) .detail-content h1 {
    font-size: 24px;
  }

  body:not(.admin-body) .modal-actions,
  body:not(.admin-body) .detail-actions {
    flex-direction: column;
  }

  body:not(.admin-body) .detail-layout {
    gap: 18px;
    padding: 14px;
  }

  body:not(.admin-body) .site-footer {
    width: calc(100% - 20px);
    margin-top: 28px;
    padding: 18px 8px;
  }
}

@media (max-width: 980px) {
  body:not(.admin-body) {
    min-width: 0;
    overflow-x: hidden;
  }

  body:not(.admin-body) main,
  body:not(.admin-body) .site-header,
  body:not(.admin-body) .site-footer {
    width: calc(100% - 20px);
  }

  body:not(.admin-body) .announcement-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body:not(.admin-body) .announcement-meta,
  body:not(.admin-body) .announcement-actions,
  body:not(.admin-body) .resource-toolbar {
    justify-content: flex-start;
  }

  body:not(.admin-body) .search-box {
    width: 100%;
  }

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

  body:not(.admin-body) .hero-slide,
  body:not(.admin-body) .detail-layout,
  body:not(.admin-body) .modal-panel {
    grid-template-columns: 1fr;
  }

  body:not(.admin-body) .hero-media-link img {
    max-height: 220px;
    width: 100%;
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) .site-header {
    width: calc(100% - 16px);
    min-height: 60px;
    margin-top: 8px;
    padding: 0 10px;
  }

  body:not(.admin-body) .brand {
    font-size: 18px;
    gap: 8px;
  }

  body:not(.admin-body) .brand img {
    width: 30px;
    height: 30px;
  }

  body:not(.admin-body) .menu-toggle {
    display: block;
  }

  body:not(.admin-body) .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  body:not(.admin-body) .main-nav.open {
    display: flex;
  }

  body:not(.admin-body) main {
    width: calc(100% - 16px);
    margin-top: 14px;
  }

  body:not(.admin-body) .announcement-bar {
    margin-bottom: 12px;
  }

  body:not(.admin-body) .announcement-card {
    padding: 14px;
    gap: 12px;
  }

  body:not(.admin-body) .announcement-copy h2 {
    font-size: 18px;
  }

  body:not(.admin-body) .announcement-copy div {
    font-size: 13px;
  }

  body:not(.admin-body) .hero-shell,
  body:not(.admin-body) .hero-track {
    min-height: 210px;
  }

  body:not(.admin-body) .hero-slide {
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 10px;
    padding: 20px 16px 34px;
  }

  body:not(.admin-body) .hero-copy span {
    padding: 5px 9px;
    font-size: 12px;
  }

  body:not(.admin-body) .hero-copy h2 {
    margin: 12px 0 8px;
    font-size: 22px;
    line-height: 1.18;
  }

  body:not(.admin-body) .hero-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.admin-body) .hero-media-link img {
    max-height: 108px;
    align-self: center;
  }

  body:not(.admin-body) .hero-arrow {
    display: none;
  }

  body:not(.admin-body) .hero-dots {
    bottom: 12px;
  }

  body:not(.admin-body) .hero-dots button {
    width: 18px;
    height: 6px;
  }

  body:not(.admin-body) .hero-dots button.active {
    width: 28px;
  }

  body:not(.admin-body) .category-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 14px 0 8px;
  }

  body:not(.admin-body) .category-bar button {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 4px;
    font-size: 13px;
    white-space: nowrap;
  }

  body:not(.admin-body) .resource-toolbar {
    margin-bottom: 10px;
  }

  body:not(.admin-body) .search-box {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  body:not(.admin-body) .section-heading {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin: 14px 0 12px;
  }

  body:not(.admin-body) .section-heading h1 {
    font-size: 22px;
  }

  body:not(.admin-body) #resourceCount {
    font-size: 13px;
  }

  body:not(.admin-body) .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body:not(.admin-body) .resource-card {
    border-radius: 8px;
  }

  body:not(.admin-body) .card-image-link img {
    aspect-ratio: 4 / 3;
  }

  body:not(.admin-body) .card-body {
    padding: 9px;
  }

  body:not(.admin-body) .card-meta {
    gap: 4px;
  }

  body:not(.admin-body) .pill {
    min-height: 21px;
    padding: 2px 7px;
    font-size: 11px;
  }

  body:not(.admin-body) .card-body h2 {
    min-height: 38px;
    margin: 7px 0 5px;
    font-size: 14px;
    line-height: 1.35;
  }

  body:not(.admin-body) .card-body p {
    min-height: 34px;
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.45;
  }

  body:not(.admin-body) .btn {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  body:not(.admin-body) .modal {
    padding: 12px;
  }

  body:not(.admin-body) .modal-panel {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  body:not(.admin-body) .modal-image {
    min-height: 170px;
  }

  body:not(.admin-body) .modal-content {
    padding: 20px;
  }

  body:not(.admin-body) .modal-content h2,
  body:not(.admin-body) .detail-content h1 {
    font-size: 24px;
  }

  body:not(.admin-body) .modal-actions,
  body:not(.admin-body) .detail-actions {
    flex-direction: column;
  }

  body:not(.admin-body) .detail-layout {
    gap: 18px;
    padding: 14px;
  }

  body:not(.admin-body) .site-footer {
    width: calc(100% - 16px);
    margin-top: 28px;
    padding: 18px 8px;
  }
}

/* Full-image carousel mode: the slide is exactly the uploaded banner image. */
body:not(.admin-body) .hero-shell {
  aspect-ratio: 900 / 500;
  min-height: 0 !important;
  background: #fff;
}

body:not(.admin-body) .hero-track {
  height: 100%;
  min-height: 0 !important;
}

body:not(.admin-body) .hero-slide {
  display: block !important;
  height: 100%;
  min-height: 0 !important;
  padding: 0 !important;
  background: #fff !important;
}

body:not(.admin-body) .hero-copy {
  display: none !important;
}

body:not(.admin-body) .hero-media-link {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

body:not(.admin-body) .hero-slide img,
body:not(.admin-body) .hero-media-link img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  max-height: none !important;
  object-fit: contain;
  filter: none;
}

@media (max-width: 980px) {
  body:not(.admin-body) {
    min-width: 0;
    overflow-x: hidden;
  }

  body:not(.admin-body) main,
  body:not(.admin-body) .site-header,
  body:not(.admin-body) .site-footer {
    width: calc(100% - 20px);
  }

  body:not(.admin-body) .announcement-card {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body:not(.admin-body) .announcement-meta,
  body:not(.admin-body) .announcement-actions,
  body:not(.admin-body) .resource-toolbar {
    justify-content: flex-start;
  }

  body:not(.admin-body) .search-box {
    width: 100%;
  }

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

  body:not(.admin-body) .hero-slide,
  body:not(.admin-body) .detail-layout,
  body:not(.admin-body) .modal-panel {
    grid-template-columns: 1fr;
  }

  body:not(.admin-body) .hero-media-link img {
    max-height: 220px;
    width: 100%;
  }
}

@media (max-width: 640px) {
  body:not(.admin-body) .site-header {
    width: calc(100% - 16px);
    min-height: 60px;
    margin-top: 8px;
    padding: 0 10px;
  }

  body:not(.admin-body) .brand {
    font-size: 18px;
    gap: 8px;
  }

  body:not(.admin-body) .brand img {
    width: 30px;
    height: 30px;
  }

  body:not(.admin-body) .menu-toggle {
    display: block;
  }

  body:not(.admin-body) .main-nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  body:not(.admin-body) .main-nav.open {
    display: flex;
  }

  body:not(.admin-body) main {
    width: calc(100% - 16px);
    margin-top: 14px;
  }

  body:not(.admin-body) .announcement-bar {
    margin-bottom: 12px;
  }

  body:not(.admin-body) .announcement-card {
    padding: 14px;
    gap: 12px;
  }

  body:not(.admin-body) .announcement-copy h2 {
    font-size: 18px;
  }

  body:not(.admin-body) .announcement-copy div {
    font-size: 13px;
  }

  body:not(.admin-body) .hero-shell,
  body:not(.admin-body) .hero-track {
    min-height: 210px;
  }

  body:not(.admin-body) .hero-slide {
    grid-template-columns: minmax(0, 1fr) 108px;
    gap: 10px;
    padding: 20px 16px 34px;
  }

  body:not(.admin-body) .hero-copy span {
    padding: 5px 9px;
    font-size: 12px;
  }

  body:not(.admin-body) .hero-copy h2 {
    margin: 12px 0 8px;
    font-size: 22px;
    line-height: 1.18;
  }

  body:not(.admin-body) .hero-copy p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.55;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  body:not(.admin-body) .hero-media-link img {
    max-height: 108px;
    align-self: center;
  }

  body:not(.admin-body) .hero-arrow {
    display: none;
  }

  body:not(.admin-body) .hero-dots {
    bottom: 12px;
  }

  body:not(.admin-body) .hero-dots button {
    width: 18px;
    height: 6px;
  }

  body:not(.admin-body) .hero-dots button.active {
    width: 28px;
  }

  body:not(.admin-body) .category-bar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 14px 0 8px;
  }

  body:not(.admin-body) .category-bar button {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0 4px;
    font-size: 13px;
    white-space: nowrap;
  }

  body:not(.admin-body) .resource-toolbar {
    margin-bottom: 10px;
  }

  body:not(.admin-body) .search-box {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  body:not(.admin-body) .section-heading {
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin: 14px 0 12px;
  }

  body:not(.admin-body) .section-heading h1 {
    font-size: 22px;
  }

  body:not(.admin-body) #resourceCount {
    font-size: 13px;
  }

  body:not(.admin-body) .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body:not(.admin-body) .resource-card {
    border-radius: 8px;
  }

  body:not(.admin-body) .card-image-link img {
    aspect-ratio: 4 / 3;
  }

  body:not(.admin-body) .card-body {
    padding: 9px;
  }

  body:not(.admin-body) .card-meta {
    gap: 4px;
  }

  body:not(.admin-body) .pill {
    min-height: 21px;
    padding: 2px 7px;
    font-size: 11px;
  }

  body:not(.admin-body) .card-body h2 {
    min-height: 38px;
    margin: 7px 0 5px;
    font-size: 14px;
    line-height: 1.35;
  }

  body:not(.admin-body) .card-body p {
    min-height: 34px;
    margin: 0 0 8px;
    font-size: 12px;
    line-height: 1.45;
  }

  body:not(.admin-body) .btn {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }

  body:not(.admin-body) .modal {
    padding: 12px;
  }

  body:not(.admin-body) .modal-panel {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  body:not(.admin-body) .modal-image {
    min-height: 170px;
  }

  body:not(.admin-body) .modal-content {
    padding: 20px;
  }

  body:not(.admin-body) .modal-content h2,
  body:not(.admin-body) .detail-content h1 {
    font-size: 24px;
  }

  body:not(.admin-body) .modal-actions,
  body:not(.admin-body) .detail-actions {
    flex-direction: column;
  }

  body:not(.admin-body) .detail-layout {
    gap: 18px;
    padding: 14px;
  }

  body:not(.admin-body) .site-footer {
    width: calc(100% - 16px);
    margin-top: 28px;
    padding: 18px 8px;
  }
}
