:root {
  --ink: #18211f;
  --muted: #68736f;
  --paper: #f4eddf;
  --paper-deep: #e7dcc7;
  --chalk: #fffaf0;
  --green: #123f35;
  --green-soft: #dce9df;
  --orange: #d65f2a;
  --blue: #325caa;
  --yellow: #e2b847;
  --line: rgba(24, 33, 31, 0.14);
  --shadow: 0 26px 70px rgba(31, 38, 34, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Avenir Next", "Gill Sans", "PingFang SC", "Hiragino Sans GB", sans-serif;
  background:
    radial-gradient(circle at 8% 12%, rgba(214, 95, 42, 0.16), transparent 28%),
    radial-gradient(circle at 85% 18%, rgba(50, 92, 170, 0.14), transparent 30%),
    linear-gradient(135deg, #f7f0e2 0%, #ede2cc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(24, 33, 31, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 33, 31, 0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

button,
input {
  font: inherit;
}

.page-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.55fr);
  gap: 22px;
  width: min(1400px, calc(100% - 40px));
  margin: 20px auto;
  min-height: calc(100vh - 40px);
}

.hero-panel,
.catalog-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(24, 33, 31, 0.18);
  box-shadow: var(--shadow);
}

.hero-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 30px;
  color: var(--chalk);
  border-radius: 34px;
  background:
    linear-gradient(160deg, rgba(19, 52, 45, 0.98), rgba(12, 31, 29, 0.99)),
    repeating-linear-gradient(90deg, transparent 0 26px, rgba(255,255,255,0.035) 26px 27px);
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 250, 240, 0.12);
  border-radius: 24px;
  pointer-events: none;
}

.hero-panel::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(226, 184, 71, 0.18), transparent 68%);
  pointer-events: none;
}

.sidebar-head,
.sidebar-card,
.quiet-list,
.hero-stats {
  position: relative;
  z-index: 1;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 250, 240, 0.28);
  border-radius: 20px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.08em;
  background: rgba(255, 250, 240, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.16), 0 18px 40px rgba(0, 0, 0, 0.12);
}

.brand-contact {
  display: grid;
  gap: 7px;
  color: rgba(216, 183, 106, 0.86);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-contact span:last-child {
  color: rgba(255, 250, 240, 0.6);
  font-weight: 600;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: #d8b76a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero-panel h1 {
  margin: 0;
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-copy {
  max-width: 390px;
  margin: 24px 0 0;
  color: rgba(255, 250, 240, 0.72);
  font-size: 15px;
  line-height: 1.9;
}

.sidebar-card {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(255, 250, 240, 0.14);
  border-radius: 22px;
  background: rgba(255, 250, 240, 0.07);
  box-shadow: inset 0 1px 0 rgba(255, 250, 240, 0.08);
}

.card-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: #d8b76a;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-card p {
  margin: 0;
  color: rgba(255, 250, 240, 0.72);
  font-size: 14px;
  line-height: 1.8;
}

.quiet-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  margin-top: 2px;
  border: 1px solid rgba(255, 250, 240, 0.12);
  border-radius: 20px;
  background: rgba(255, 250, 240, 0.08);
}

.quiet-list div {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: rgba(10, 28, 25, 0.36);
}

.quiet-list span {
  color: rgba(255, 250, 240, 0.38);
  font-size: 12px;
  font-weight: 800;
}

.quiet-list strong {
  color: rgba(255, 250, 240, 0.78);
  font-size: 14px;
}

.hero-stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-stats span {
  padding: 10px 12px;
  border: 1px solid rgba(255, 250, 240, 0.15);
  border-radius: 999px;
  background: rgba(255, 250, 240, 0.07);
  color: rgba(255, 250, 240, 0.7);
  font-size: 13px;
}

.hero-stats strong {
  color: var(--chalk);
}

.catalog-panel {
  padding: 28px;
  border-radius: 34px;
  background: rgba(255, 250, 240, 0.66);
  backdrop-filter: blur(18px);
}

.catalog-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.catalog-header-plain {
  justify-content: flex-end;
  margin-bottom: 34px;
}

.catalog-header h2 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(32px, 4vw, 54px);
  line-height: 1;
  letter-spacing: -0.06em;
}

.search-box {
  width: min(310px, 42%);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 250, 240, 0.78);
}

.search-box label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
}

.search-box input::placeholder {
  color: rgba(104, 115, 111, 0.7);
}

.filters {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.filter-group {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
}

.filter-title {
  padding-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

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

.filter-tab,
.reset-button {
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
  background: rgba(255, 250, 240, 0.76);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.filter-tab {
  padding: 9px 13px;
  border-radius: 999px;
}

.filter-tab:hover,
.reset-button:hover {
  transform: translateY(-1px);
  border-color: rgba(18, 63, 53, 0.38);
}

.filter-tab.is-active {
  color: var(--chalk);
  border-color: var(--green);
  background: var(--green);
}

.result-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 22px 0 18px;
  color: var(--muted);
  font-size: 14px;
}

.reset-button {
  padding: 8px 12px;
  border-radius: 12px;
}

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

.course-card {
  position: relative;
  display: flex;
  min-height: 260px;
  padding: 18px;
  overflow: hidden;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(24, 33, 31, 0.16);
  border-radius: 24px;
  background: var(--chalk);
  box-shadow: 0 12px 32px rgba(31, 38, 34, 0.08);
  transform: translateY(10px);
  opacity: 0;
  animation: cardIn 520ms cubic-bezier(.2,.8,.2,1) forwards;
  cursor: pointer;
}

.course-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 94px;
  background: var(--accent, var(--green-soft));
  opacity: 0.18;
}

.course-card:hover {
  transform: translateY(-4px) rotate(-0.4deg);
  border-color: rgba(18, 63, 53, 0.36);
  box-shadow: 0 22px 44px rgba(31, 38, 34, 0.14);
}

.card-top,
.card-bottom {
  position: relative;
  z-index: 1;
}

.card-cover {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
  margin: -2px -2px 18px;
}

.subject-badge {
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--chalk);
  background: var(--badge, var(--green));
  font-size: 12px;
  font-weight: 800;
}

.card-symbol {
  color: var(--badge, var(--green));
  font-family: "Songti SC", "STSong", serif;
  font-size: 52px;
  line-height: 1;
  opacity: 0.72;
}

.course-card h3 {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  line-height: 1.18;
  letter-spacing: -0.05em;
}

.course-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.card-meta span {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  background: rgba(244, 237, 223, 0.68);
}

.card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 18px;
}

.enter-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
}

.enter-link-secondary {
  padding: 8px 11px;
  border: 1px solid rgba(24, 33, 31, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(244, 237, 223, 0.66);
  font-size: 13px;
}

.enter-link-secondary:hover {
  color: var(--ink);
  border-color: rgba(18, 63, 53, 0.36);
}

.empty-state[hidden] {
  display: none;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 240px;
  border: 1px dashed rgba(24, 33, 31, 0.24);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
  background: rgba(255, 250, 240, 0.48);
}

.empty-state span {
  color: var(--ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 28px;
}

.empty-state p {
  margin: 8px 0 0;
}

.demo-body {
  min-height: 100vh;
}

.demo-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.58fr) minmax(0, 1.42fr);
  gap: 24px;
  width: min(1440px, calc(100% - 40px));
  margin: 20px auto;
}

.demo-hero,
.demo-stage {
  position: relative;
  border: 1px solid rgba(24, 33, 31, 0.18);
  border-radius: 34px;
  box-shadow: var(--shadow);
}

.demo-hero {
  min-height: calc(100vh - 40px);
  padding: 30px;
  color: var(--chalk);
  background: linear-gradient(160deg, rgba(19, 52, 45, 0.98), rgba(12, 31, 29, 0.99));
}

.demo-back {
  display: inline-flex;
  margin-bottom: 44px;
  color: rgba(255, 250, 240, 0.72);
  text-decoration: none;
  font-weight: 800;
}

.demo-kicker {
  color: #d8b76a;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.18em;
}

.demo-hero h1 {
  margin: 14px 0 18px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(42px, 6vw, 76px);
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.demo-hero p {
  max-width: 390px;
  margin: 0;
  color: rgba(255, 250, 240, 0.72);
  font-size: 16px;
  line-height: 1.9;
}

.demo-actions {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.demo-actions span {
  width: fit-content;
  padding: 11px 14px;
  border: 1px solid rgba(255, 250, 240, 0.16);
  border-radius: 999px;
  color: rgba(255, 250, 240, 0.76);
  background: rgba(255, 250, 240, 0.08);
  font-weight: 800;
}

.demo-stage {
  display: grid;
  align-content: center;
  min-height: calc(100vh - 40px);
  padding: 32px;
  background: rgba(255, 250, 240, 0.72);
  backdrop-filter: blur(18px);
}

.demo-window {
  overflow: hidden;
  border: 1px solid rgba(24, 33, 31, 0.18);
  border-radius: 28px;
  background: #18211f;
  box-shadow: 0 32px 80px rgba(24, 33, 31, 0.24);
}

.demo-window-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  height: 42px;
  padding: 0 16px;
  color: rgba(255, 250, 240, 0.58);
  background: rgba(10, 18, 16, 0.96);
  font-size: 13px;
}

.demo-window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #d65f2a;
}

.demo-window-bar span:nth-child(2) {
  background: #e2b847;
}

.demo-window-bar span:nth-child(3) {
  background: #6da56d;
}

.demo-window-bar strong {
  margin-left: 8px;
}

.demo-frame-wrap {
  --demo-base-width: 1920px;
  --demo-base-height: 1080px;
  --demo-scale: 0.5;
  position: relative;
  width: min(100%, 980px);
  aspect-ratio: 16 / 9;
  margin: 0 auto;
  overflow: hidden;
  background: #0d1211;
}

.demo-frame-wrap iframe {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--demo-base-width);
  height: var(--demo-base-height);
  border: 0;
  background: white;
  transform: scale(var(--demo-scale));
  transform-origin: left top;
}

.demo-watermark {
  position: absolute;
  right: 18px;
  bottom: 16px;
  padding: 9px 12px;
  border-radius: 999px;
  color: rgba(255, 250, 240, 0.86);
  background: rgba(18, 63, 53, 0.74);
  font-size: 13px;
  font-weight: 900;
  pointer-events: none;
}

.demo-tip {
  margin: 18px 0 0;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

@keyframes cardIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 1080px) {
  .page-shell,
  .demo-shell {
    grid-template-columns: 1fr;
  }

  .hero-panel,
  .demo-hero,
  .demo-stage {
    min-height: auto;
  }
}

@media (max-width: 820px) {
  .page-shell,
  .demo-shell {
    width: min(100% - 24px, 720px);
    margin: 12px auto;
  }

  .hero-panel,
  .catalog-panel,
  .demo-hero,
  .demo-stage {
    border-radius: 26px;
    padding: 24px;
  }

  .catalog-header {
    display: grid;
  }

  .search-box {
    width: 100%;
  }

  .course-grid {
    grid-template-columns: 1fr;
  }

  .filter-group {
    grid-template-columns: 1fr;
  }

  .filter-title {
    padding-top: 0;
  }
}
