:root {
  --paper: #f6f0df;
  --paper-deep: #eee3c8;
  --ink: #172522;
  --ink-soft: #33433f;
  --gold: #c99a3d;
  --gold-light: #f1d68f;
  --red: #a61f18;
  --muted: #7c796e;
  --line: rgba(81, 65, 35, .14);
  --white: #fffdf7;
  --shadow: 0 18px 48px rgba(47, 37, 19, .10);
  --radius: 22px;
}

* { box-sizing: border-box; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: #171914;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 8% 8%, rgba(201,154,61,.12), transparent 22rem),
    radial-gradient(circle at 90% 28%, rgba(42,78,67,.07), transparent 28rem),
    var(--paper);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.08'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 76px;
  display: flex;
  align-items: center;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
  gap: 44px;
  background: rgba(246, 240, 223, .9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 20px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  color: var(--gold-light); background: var(--ink); border: 1px solid var(--gold);
  border-radius: 10px 10px 10px 3px; font-family: "STKaiti", "KaiTi", serif;
}
.header-nav { display: flex; gap: 32px; height: 100%; }
.header-nav a { display: grid; place-items: center; color: var(--muted); font-size: 15px; position: relative; }
.header-nav a.active { color: var(--red); font-weight: 700; }
.header-nav a.active::after { content: ""; position: absolute; bottom: 0; width: 28px; height: 3px; border-radius: 9px; background: var(--red); }
.admin-link { margin-left: auto; color: var(--ink); font-size: 14px; border: 1px solid rgba(23,37,34,.3); border-radius: 999px; padding: 9px 16px; }

.hero {
  max-width: 1180px;
  min-height: 430px;
  margin: 36px auto 72px;
  padding: 64px 74px;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(201,154,61,.55);
  border-radius: 32px;
  color: #f8e8b9;
  background:
    linear-gradient(90deg, rgba(8,25,22,.98) 0%, rgba(14,36,32,.9) 56%, rgba(14,36,32,.45) 100%),
    radial-gradient(circle at 82% 50%, #52665d 0 5%, #1b3730 6% 28%, #0b201c 29%);
  box-shadow: var(--shadow);
}
.hero::before, .hero::after {
  content: ""; position: absolute; border: 1px solid rgba(227,194,110,.28); border-radius: 50%;
}
.hero::before { width: 520px; height: 520px; right: -140px; top: -160px; }
.hero::after { width: 360px; height: 360px; right: -60px; bottom: -220px; }
.hero-copy { position: relative; z-index: 2; width: 58%; }
.eyebrow { display: inline-block; color: var(--red); font-weight: 700; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; }
.hero .eyebrow { color: var(--gold-light); }
.hero h1 { margin: 18px 0 16px; font-family: "STKaiti", "KaiTi", serif; font-size: clamp(40px, 5vw, 70px); line-height: 1.08; letter-spacing: .07em; }
.hero h1 span { color: var(--gold-light); }
.hero p { max-width: 550px; margin: 0 0 30px; color: rgba(255,253,247,.72); font-size: 17px; line-height: 1.8; }
.primary-button, .secondary-button {
  border: 0; border-radius: 999px; padding: 13px 22px; font-weight: 700; transition: transform .2s, box-shadow .2s, opacity .2s;
}
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; color: #2a2111; background: linear-gradient(135deg, #f6dfa0, #cf9939); box-shadow: 0 10px 25px rgba(184,130,31,.2); }
.primary-button:hover, .secondary-button:hover { transform: translateY(-2px); }
.secondary-button { background: #eee9db; color: #514c42; }
.primary-button.full { width: 100%; }
.hero-art { position: absolute; right: 3%; width: 42%; height: 100%; top: 0; }
.art-orbit { position: absolute; border: 1px solid rgba(237,204,119,.36); border-radius: 50%; }
.orbit-one { width: 300px; height: 300px; top: 66px; right: 60px; }
.orbit-two { width: 230px; height: 230px; top: 101px; right: 95px; }
.play-card { position: absolute; top: 156px; right: 150px; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: rgba(6,19,17,.76); border: 1px solid var(--gold); box-shadow: 0 0 0 14px rgba(205,163,72,.08); }
.play-triangle { margin-left: 8px; width: 0; height: 0; border-top: 20px solid transparent; border-bottom: 20px solid transparent; border-left: 30px solid var(--gold-light); }
.floating-card { position: absolute; display: flex; align-items: center; gap: 8px; color: var(--ink); background: rgba(255,249,229,.94); padding: 11px 15px; border-radius: 14px; box-shadow: var(--shadow); font-size: 12px; }
.floating-card strong { font-size: 22px; }
.floating-card span { color: #777062; }
.card-one { right: 10px; top: 84px; }
.card-two { left: 10px; bottom: 56px; }
.mini-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }

.course-section { max-width: 1180px; margin: 0 auto 76px; padding: 0 14px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 28px; }
.section-heading h2, .learning-strip h2 { margin: 8px 0 0; font-family: "STKaiti", "KaiTi", serif; font-size: 36px; }
.search-box { width: min(390px, 100%); height: 48px; display: flex; align-items: center; gap: 10px; background: rgba(255,253,247,.72); border: 1px solid rgba(94,72,31,.2); border-radius: 999px; padding: 0 18px; }
.search-box svg { width: 20px; fill: none; stroke: #706b5e; stroke-width: 1.8; }
.search-box input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.category-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 18px; scrollbar-width: none; }
.category-row::-webkit-scrollbar { display: none; }
.category-button { flex: none; border: 1px solid rgba(55,63,56,.18); background: rgba(255,253,247,.6); padding: 9px 18px; border-radius: 999px; color: #625f55; }
.category-button.active { background: var(--red); color: white; border-color: var(--red); }
.course-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.course-card { overflow: hidden; background: var(--ink); color: white; border: 1px solid rgba(201,154,61,.68); border-radius: var(--radius); box-shadow: 0 14px 34px rgba(31,39,35,.13); transition: transform .25s, box-shadow .25s; }
.course-card:hover { transform: translateY(-5px); box-shadow: 0 20px 45px rgba(31,39,35,.2); }
.course-cover { aspect-ratio: 16/9; position: relative; overflow: hidden; background: linear-gradient(145deg, #d9c69a, #eff0d7 45%, #8b9e8d); }
.course-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.course-cover.placeholder::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 26% 82%, #344f46 0 13%, transparent 14%),
    radial-gradient(ellipse at 73% 89%, #1d3933 0 20%, transparent 21%),
    radial-gradient(circle at 65% 27%, #f0d993 0 4%, transparent 4.5%),
    linear-gradient(160deg, transparent 52%, rgba(245,234,199,.66) 53% 56%, transparent 57%);
}
.course-cover.placeholder::after { content: "玄衡阁"; position: absolute; inset: 0; display: grid; place-items: center; color: #213a34; font: 700 28px "STKaiti", "KaiTi", serif; letter-spacing: .18em; text-shadow: 0 1px 0 rgba(255,255,255,.7); }
.level-badge { position: absolute; left: 14px; top: 14px; padding: 5px 10px; border-radius: 999px; background: rgba(11,29,26,.82); color: #f4d68c; font-size: 11px; border: 1px solid rgba(244,214,140,.6); }
.course-body { padding: 20px; }
.course-body h3 { margin: 0 0 8px; font: 700 24px "STKaiti", "KaiTi", serif; letter-spacing: .03em; color: #fff4d1; }
.course-body p { height: 44px; overflow: hidden; margin: 0 0 18px; color: rgba(255,255,255,.64); line-height: 1.55; font-size: 13px; }
.course-info { display: flex; gap: 12px; font-size: 12px; color: rgba(255,255,255,.58); }
.course-info span + span::before { content: "·"; margin-right: 12px; color: var(--gold); }
.course-footer { margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.11); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.course-price { color: #f4d68c; font-weight: 700; }
.watch-button { border: 0; border-radius: 999px; background: linear-gradient(135deg, #f5dda0, #c99232); color: #2b2010; padding: 9px 16px; font-weight: 700; }
.mini-progress { height: 3px; margin: 14px -20px -20px; background: rgba(255,255,255,.08); }
.mini-progress span { display: block; height: 100%; background: var(--gold-light); }
.empty-state { padding: 70px 20px; text-align: center; background: rgba(255,253,247,.5); border: 1px dashed rgba(89,72,39,.24); border-radius: var(--radius); }
.empty-icon { margin: 0 auto 15px; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--gold); border: 1px solid var(--gold); }
.empty-state h3 { margin: 0 0 8px; }
.empty-state p { color: var(--muted); margin: 0; }
.learning-strip { max-width: 1180px; margin: 0 auto 70px; padding: 38px 48px; display: flex; justify-content: space-between; align-items: center; background: var(--red); border-radius: 24px; color: white; box-shadow: var(--shadow); }
.learning-strip p { color: rgba(255,255,255,.68); margin-bottom: 0; }
.eyebrow.light { color: #f3d38c; }
.learning-stat { display: flex; align-items: center; gap: 14px; }
.learning-stat strong { font: 700 62px "STKaiti", "KaiTi", serif; color: #f3d38c; }
.learning-stat span { max-width: 100px; line-height: 1.5; }

dialog { padding: 0; border: 0; }
dialog::backdrop { background: rgba(8,16,14,.72); backdrop-filter: blur(8px); }
.course-dialog { width: min(800px, calc(100vw - 28px)); max-height: 92vh; overflow-y: auto; border-radius: 25px; background: var(--paper); box-shadow: 0 30px 90px rgba(0,0,0,.4); }
.dialog-close { position: absolute; z-index: 3; right: 16px; top: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; color: white; background: rgba(0,0,0,.52); font-size: 25px; line-height: 1; }
.dialog-back { position: absolute; z-index: 3; left: 16px; top: 16px; min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; border: 1px solid rgba(255,255,255,.52); border-radius: 999px; color: white; background: rgba(4,28,24,.76); box-shadow: 0 7px 20px rgba(0,0,0,.2); backdrop-filter: blur(9px); }
.dialog-back span { font-size: 23px; line-height: 1; }
.dialog-back b { font-size: 14px; }
.mobile-view-back { display: none; }
.video-shell { aspect-ratio: 16/9; background: #0b1816; display: grid; place-items: center; color: #dbc27e; }
.video-shell video { width: 100%; height: 100%; object-fit: contain; background: #07110f; }
.video-shell:fullscreen,
.video-shell:-webkit-full-screen,
.video-shell video:fullscreen,
.video-shell video:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  background: #000;
}
.video-shell.portrait { width: min(100%, 430px); aspect-ratio: 9/16; margin-inline: auto; }
.video-placeholder { text-align: center; padding: 25px; }
.video-placeholder span { display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; border: 1px solid var(--gold); margin: 0 auto 14px; font-size: 25px; }
.video-placeholder small { color: rgba(255,255,255,.55); }
.dialog-content { padding: 30px 34px 36px; }
.course-meta { color: var(--red); font-weight: 700; font-size: 13px; }
.dialog-content h2 { margin: 9px 0 8px; font: 700 34px "STKaiti", "KaiTi", serif; color: var(--ink); }
.dialog-subtitle { color: #53564e; font-size: 17px; }
.teacher-line { margin: 18px 0; color: #87753f; font-size: 13px; }
.dialog-description { color: #5e5d55; line-height: 1.8; }
.progress-block { margin-top: 25px; padding: 16px 18px; background: rgba(225,207,161,.27); border-radius: 14px; }
.progress-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 10px; }
.progress-track { height: 6px; border-radius: 999px; background: rgba(23,37,34,.12); overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--red), #d19832); transition: width .3s; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 30px; transform: translate(-50%, 20px); padding: 12px 18px; color: white; background: #172522; border-radius: 12px; opacity: 0; pointer-events: none; transition: .25s; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin */
.admin-body { background: #f2efe7; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(430px, 100%); padding: 44px; background: var(--white); border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow); }
.brand.centered { margin-bottom: 36px; }
.login-card h1 { margin: 8px 0; font: 700 38px "STKaiti", "KaiTi", serif; }
.login-card > p { color: var(--muted); margin: 0 0 28px; }
.field-label { display: grid; gap: 8px; color: #59584f; font-size: 13px; font-weight: 700; }
.field-label input, .field-label textarea, .field-label select { width: 100%; border: 1px solid #d9d4c8; border-radius: 11px; background: white; padding: 12px 13px; outline: none; color: #24251f; resize: vertical; }
.field-label input:focus, .field-label textarea:focus, .field-label select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,154,61,.12); }
.login-card .primary-button { margin-top: 20px; }
.login-card small { display: block; text-align: center; color: #9a9588; margin-top: 14px; }
.form-error { color: var(--red) !important; min-height: 20px; text-align: center; margin: 10px 0 0 !important; font-size: 13px; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; width: 230px; padding: 26px 18px; background: linear-gradient(180deg, #fffaf0 0%, #eee3cd 100%); color: #263b35; border-right: 1px solid #d8c9a9; box-shadow: 8px 0 28px rgba(84,65,30,.08); display: flex; flex-direction: column; }
.brand.inverse { padding: 0 8px 32px; color: #183e35; }
.brand.inverse .brand-mark { background: #1f4a40; color: #f4dda0; }
.admin-sidebar nav { display: grid; gap: 8px; }
.side-group { display: grid; gap: 8px; }
.side-group + .side-group { margin-top: 14px; padding-top: 16px; border-top: 1px solid rgba(118,92,40,.16); }
.side-group-label { padding: 0 13px 2px; color: #99763a; font-size: 10px; font-weight: 700; letter-spacing: .14em; }
.admin-sidebar { overflow-y: auto; }
.side-item { width: 100%; border: 1px solid transparent; border-radius: 11px; background: transparent; color: #5d635d; padding: 12px 14px; text-align: left; }
.side-item span { display: inline-block; width: 26px; color: #d3ac57; }
.side-item:hover { border-color: #d9caa8; background: rgba(255,255,255,.58); color: #244239; }
.side-item.active { border-color: #b7c9c0; background: #e3ece7; color: #174137; box-shadow: 0 5px 14px rgba(34,74,64,.10); font-weight: 700; }
.sidebar-bottom { margin-top: auto; padding: 18px 8px 0; border-top: 1px solid rgba(118,92,40,.16); display: grid; gap: 14px; font-size: 13px; }
.sidebar-bottom a { color: #7f612c; }
.sidebar-bottom button { border: 0; background: transparent; color: #817b70; text-align: left; padding: 0; }
.admin-main { grid-column: 2; padding: 42px 50px 60px; max-width: 1400px; width: 100%; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-topbar h1 { margin: 6px 0 0; font-size: 30px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.grant-button { border-color: #b88d3c; color: #75571c; background: #fffaf0; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.learner-stats { grid-template-columns: repeat(4, 1fr); }
.stats-row article { display: flex; justify-content: space-between; align-items: center; background: white; border: 1px solid #e4dfd3; border-radius: 15px; padding: 21px 22px; }
.stats-row span { color: #77756c; font-size: 13px; }
.stats-row strong { font-size: 28px; color: var(--ink); }
.admin-panel { background: white; border: 1px solid #e4dfd3; border-radius: 18px; padding: 26px; }
.admin-view { display: none; }
.admin-view.active { display: block; }
.admin-view > .admin-panel + .admin-panel { margin-top: 18px; }
.banner-admin-list { display: grid; gap: 14px; margin-top: 20px; }
.banner-admin-list article { display: grid; grid-template-columns: 210px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 13px; border: 1px solid #e2dacb; border-radius: 15px; background: #fffdf8; }
.banner-admin-list img { width: 210px; aspect-ratio: 16 / 6; object-fit: cover; border-radius: 11px; background: #e9e1d2; }
.banner-admin-copy { min-width: 0; display: grid; gap: 6px; }
.banner-admin-copy small { color: #a47a2c; font-size: 10px; letter-spacing: .08em; }
.banner-admin-copy strong { color: #233b34; font-size: 18px; }
.banner-admin-copy p { margin: 0; color: #827b6e; font-size: 11px; line-height: 1.55; }
.banner-admin-copy span { color: #9b9486; font-size: 10px; }
.banner-admin-actions { display: flex; align-items: center; gap: 7px; }
.banner-admin-actions button { border: 1px solid #dcd3c2; border-radius: 8px; padding: 8px 10px; color: #645e53; background: white; }
.banner-admin-actions button.danger { color: #a52620; }
.table-head { display: grid; padding: 0 12px 9px; color: #9b968a; font-size: 11px; }
.course-head { grid-template-columns: 104px minmax(150px, 1fr) 110px 90px 185px; }
.course-head span:first-child { grid-column: 1 / 3; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.panel-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.panel-heading h2 { margin: 0 0 5px; font-size: 19px; }
.panel-heading p { margin: 0; color: #989386; font-size: 12px; }
.search-box.compact { height: 39px; width: 250px; }
.admin-course-list { display: grid; gap: 12px; }
.admin-course-row { display: grid; grid-template-columns: 88px minmax(150px, 1fr) 110px 90px 185px; align-items: center; gap: 16px; padding: 12px; border: 1px solid #ece8df; border-radius: 13px; }
.admin-thumb { width: 88px; aspect-ratio: 16/10; object-fit: cover; border-radius: 8px; background: linear-gradient(135deg, #d8c48c, #26453d); }
.admin-thumb.placeholder { display: grid; place-items: center; color: #f2d994; font-family: "KaiTi", serif; }
.row-title strong { display: block; margin-bottom: 5px; }
.row-title small, .row-cell { color: #8b877b; font-size: 12px; }
.row-title small { display: block; line-height: 1.55; }
.status-pill { justify-self: start; border-radius: 999px; padding: 5px 9px; font-size: 11px; font-weight: 700; }
.status-pill.live { background: #e7f3ec; color: #32724d; }
.status-pill.draft { background: #f3eee4; color: #857a67; }
.row-actions { display: flex; justify-content: end; gap: 6px; }
.row-actions button { border: 1px solid #ddd8cc; border-radius: 8px; background: white; padding: 7px 9px; font-size: 12px; color: #5e5b52; }
.row-actions button.danger { color: #a6312c; }
.editor-dialog { width: min(760px, calc(100vw - 28px)); max-height: 92vh; overflow-y: auto; border-radius: 20px; background: #faf8f2; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.editor-dialog form { padding: 28px; }
.grant-dialog { width: min(680px, calc(100vw - 28px)); max-height: 92vh; overflow-y: auto; border-radius: 20px; background: #faf8f2; box-shadow: 0 30px 80px rgba(0,0,0,.32); }
.grant-dialog form { padding: 28px; }
.editor-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid #e7e2d7; }
.editor-header h2 { margin: 5px 0 0; }
.editor-header p { margin: 7px 0 0; color: #8e887b; font-size: 12px; }
.dialog-close.static { position: static; background: #ece8de; color: #59564e; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 24px 0; }
.span-two { grid-column: span 2; }
.upload-field { min-height: 130px; display: flex; flex-direction: column; justify-content: center; text-align: center; border: 1px dashed #cfc5ae; border-radius: 13px; padding: 18px; background: #fffdf8; cursor: pointer; }
.upload-field > span { color: #777268; font-size: 12px; }
.upload-field strong { color: #8b651d; margin: 7px 0; }
.upload-field small { color: #aaa396; line-height: 1.4; }
.upload-field input { display: none; }
.publish-check { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f0ece2; border-radius: 12px; cursor: pointer; }
.publish-check input { width: 18px; height: 18px; accent-color: var(--red); }
.publish-check span { display: grid; gap: 3px; }
.publish-check small { color: #8e8a7f; }
.editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.upload-status { margin-right: auto; color: #807b70; font-size: 12px; }
.price-field { display: none; }
.price-field.visible { display: grid; }
.field-help { color: #a52d25; font-size: 11px; line-height: 1.4; }
.category-admin-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.category-admin-grid article { min-height: 190px; padding: 23px; border: 1px solid #e7dfce; border-radius: 15px; background: #fffdf8; }
.category-cover-preview, .category-cover-empty { width: 100%; aspect-ratio: 16 / 6; margin-bottom: 16px; border-radius: 10px; }
.category-cover-preview { display: block; object-fit: cover; }
.category-cover-empty { display: grid; place-items: center; border: 1px dashed #d8cdb9; background: #f7f2e8; color: #aaa08e; font-size: 12px; }
.cover-adjust-entry { display: flex; align-items: center; gap: 14px; margin-top: -4px; }
.cover-adjust-entry button { flex: none; }
.cover-adjust-entry span { color: #8b806d; font-size: 12px; }
.cover-position-dialog { width: min(760px, calc(100vw - 24px)); padding: 0; overflow: hidden; border: 0; border-radius: 20px; background: #fbf7ed; box-shadow: 0 30px 80px rgba(0,0,0,.36); }
.cover-position-dialog::backdrop { background: rgba(7,20,18,.68); backdrop-filter: blur(5px); }
.cover-position-shell { padding: 28px; }
.cover-crop-viewport { position: relative; width: 100%; aspect-ratio: 1200 / 520; margin-top: 22px; overflow: hidden; border: 2px solid #c79b3d; border-radius: 14px; background: #162d28; cursor: grab; touch-action: none; user-select: none; }
.cover-crop-viewport.dragging { cursor: grabbing; }
.cover-crop-viewport::after { content: "封面显示范围"; position: absolute; right: 12px; bottom: 10px; padding: 5px 9px; border-radius: 99px; color: #fff2c7; background: rgba(10,38,32,.76); font-size: 11px; pointer-events: none; }
.cover-crop-viewport img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 50% 50%; pointer-events: none; }
.cover-drag-tip { margin: 10px 2px 0; color: #8b806d; font-size: 12px; }
.category-admin-grid article > span { color: #a67b2b; font-size: 10px; letter-spacing: .12em; }
.category-admin-grid h3 { margin: 15px 0 10px; font: 700 23px "KaiTi", serif; color: #203a34; }
.category-admin-grid p { min-height: 42px; color: #8b867b; font-size: 12px; line-height: 1.7; }
.category-admin-grid .reserved-category { border-style: dashed; opacity: .7; }
.mini-switch { display: flex; align-items: center; gap: 8px; margin-top: 22px; color: #557268; font-size: 12px; }
.mini-switch input { accent-color: #1d4b40; }
.placement-guide { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-bottom: 18px; }
.placement-guide button { display: grid; gap: 5px; padding: 13px 15px; border: 1px solid transparent; border-radius: 11px; background: #f3efe6; text-align: left; cursor: pointer; }
.placement-guide button:hover { border-color: #d6bc82; background: #faf4e6; }
.placement-guide button.active { border-color: #b58a35; background: linear-gradient(135deg,#fff3cf,#f3e2ad); box-shadow: inset 4px 0 #1f4a40; }
.placement-guide b { color: #354d47; font-size: 13px; }
.placement-guide span { color: #8c867a; font-size: 11px; }
.category-actions { display: flex; align-items: center; gap: 7px; margin-top: 18px; }
.category-actions button { border: 1px solid #dcd5c8; border-radius: 8px; padding: 7px 10px; background: white; color: #625c50; }
.category-actions .danger { color: #a4342c; border-color: #e7c7c2; }
.category-order-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 16px; padding-bottom: 14px; border-bottom: 1px solid #eee6d8; }
.category-order-actions button { border: 1px solid #d6c9aa; border-radius: 8px; padding: 8px 5px; background: #fbf5e8; color: #71551f; font-size: 12px; }
.category-order-actions button:hover:not(:disabled) { background: #f1dfb1; border-color: #c69a3b; }
.category-order-actions button:disabled { opacity: .35; cursor: not-allowed; }
.compact-dialog { width: min(560px, calc(100vw - 28px)); }
.course-picker { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto minmax(180px, 1fr) auto; align-items: center; gap: 14px; padding: 15px 17px; border-radius: 12px; background: #f4f0e7; color: #756f63; font-size: 12px; }
.course-picker select { border: 1px solid #d9d2c4; border-radius: 9px; padding: 10px; background: white; }
.course-picker b { color: #9a6e20; }
.direct-course-picker { grid-template-columns: auto minmax(260px, 1fr) auto; }
.chapter-admin-list { display: grid; gap: 10px; margin-top: 18px; }
.chapter-admin-list article { display: grid; grid-template-columns: 26px minmax(230px, 1fr) 72px auto auto; align-items: center; gap: 12px; padding: 16px 14px; border: 1px solid #e8e2d8; border-radius: 12px; }
.chapter-admin-list small { display: block; margin-top: 6px; color: #9d978c; }
.chapter-admin-list button, .data-row button { border: 1px solid #dcd5c8; border-radius: 8px; padding: 7px 9px; color: #665f54; background: white; }
.lesson-order { color: #9a6e20; font: 700 14px ui-monospace, monospace; }
.lesson-move-actions, .lesson-edit-actions { display: flex; align-items: center; gap: 6px; }
.lesson-edit-actions .danger { color: #a4342c; border-color: #e7c7c2; }
.batch-guide { display: grid; gap: 6px; margin: 2px 0 20px; padding: 15px 17px; border: 1px solid #dfd2b6; border-radius: 12px; background: #f6f0e2; }
.batch-guide strong { color: #815d1e; }
.batch-guide span { color: #4f4a40; font-size: 13px; word-break: break-all; }
.batch-guide small { color: #8d8679; line-height: 1.5; }
.batch-upload-field { min-height: 150px; }
.batch-file-preview { max-height: 170px; overflow-y: auto; margin-top: 15px; padding: 13px 15px; border-radius: 11px; background: #f1eee7; color: #777165; font-size: 12px; line-height: 1.75; white-space: pre-line; }
.batch-progress { margin-top: 16px; }
.batch-progress > div { display: flex; justify-content: space-between; gap: 12px; color: #6b6458; font-size: 12px; }
.batch-progress > i { display: block; height: 8px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #e2ddd2; }
.batch-progress b { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#9f211d,#c69a43); transition: width .2s; }
.drag-handle { color: #b2a993; cursor: grab; font-size: 20px; }
.data-table { overflow-x: auto; }
.data-row { min-width: 780px; display: grid; grid-template-columns: 1.1fr 1fr .8fr .7fr 1.7fr; align-items: center; gap: 14px; padding: 15px 12px; border-bottom: 1px solid #eee9df; color: #625f57; font-size: 12px; }
.data-row.head { padding-top: 8px; color: #a09a8d; font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.data-row small { display: block; margin-top: 5px; color: #a6a093; }
.order-row { grid-template-columns: 1.1fr 1.5fr .6fr .8fr 1.2fr; }
.vip-row { grid-template-columns: 1fr 1fr 1fr .7fr .7fr; }
.inline-actions { display: flex; align-items: center; gap: 6px; }
.inline-actions i { font-style: normal; }
.grant-link { color: #8c651d !important; border-color: #d3b777 !important; background: #fff9e9 !important; }
.sub-tabs { display: flex; gap: 8px; margin: -2px 0 18px; border-bottom: 1px solid #e9e3d8; }
.sub-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 10px 15px; color: #8b8579; background: transparent; }
.sub-tabs button.active { border-color: #a22922; color: #a22922; font-weight: 700; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.ratio-field { display: flex; align-items: center; gap: 12px; margin: 25px 0; color: #6f6b62; }
.ratio-field input { width: 110px; border: 1px solid #d5cdbd; border-radius: 10px; padding: 12px; font-size: 22px; text-align: center; }
.ratio-field b { color: #9a7022; }
.rule-list { margin: 15px 0 0; padding-left: 20px; color: #69665d; line-height: 2.2; }
.log-list { display: grid; }
.log-list article { display: grid; grid-template-columns: 75px 150px 1fr auto; align-items: center; gap: 14px; padding: 16px 8px; border-bottom: 1px solid #eee9df; }
.log-list span, .log-list p, .log-list i { color: #938d81; font-size: 11px; }
.log-list p { margin: 0; line-height: 1.5; }
.log-list i { padding: 5px 8px; border-radius: 7px; background: #f1eee6; font-style: normal; }
.stack-form { display: grid; gap: 15px; }
.stack-form .primary-button { justify-self: start; }
.form-status { min-height: 1.5em; margin: 0; color: #8f2d28; font-size: 14px; }
.security-note { margin-top: 20px; padding: 16px 18px; border: 1px solid #dfd6bf; border-radius: 14px; background: #faf7ee; display: flex; align-items: center; justify-content: space-between; color: #32443e; }
.security-note span { color: #8d6f2f; font-weight: 700; }
.setting-lines { display: grid; }
.setting-lines button { display: flex; align-items: center; justify-content: space-between; padding: 17px 3px; border: 0; border-bottom: 1px solid #eee8dd; background: transparent; text-align: left; }
.setting-lines button span { display: grid; gap: 6px; }
.setting-lines small { color: #989286; }
.setting-lines i { color: #a1782c; font-style: normal; }
.grant-notice { display: flex; gap: 12px; align-items: center; margin-top: 20px; padding: 14px 16px; border: 1px solid #dfd1aa; border-radius: 12px; background: linear-gradient(120deg, #fff9e9, #f4ebd5); }
.grant-notice strong { flex: none; color: #8b631a; font-size: 12px; }
.grant-notice span { color: #756d60; font-size: 12px; line-height: 1.55; }
.activation-guide { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; gap: 10px 14px; margin: 15px 0 18px; padding: 14px 16px; border: 1px solid #e0d6c2; border-radius: 12px; background: #faf7ef; color: #716b60; font-size: 11px; line-height: 1.6; }
.activation-guide b { padding: 5px 9px; border-radius: 7px; background: #1f4a40; color: #f4df9f; font-size: 11px; white-space: nowrap; }
.grant-result { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border-radius: 12px; color: #e8cf8b; background: linear-gradient(120deg, #112f2a, #1e443b); }
.grant-result > span { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #c5a14d; border-radius: 50%; font-weight: 700; }
.grant-result div { display: grid; gap: 4px; }
.grant-result small { color: rgba(255,255,255,.61); line-height: 1.45; }
.grant-course-field { min-width: 0; margin: 0; padding: 0; border: 0; }
.grant-course-field legend { margin-bottom: 8px; color: #59584f; font-size: 13px; font-weight: 700; }
.grant-course-list { max-height: 310px; overflow-y: auto; display: grid; gap: 10px; padding: 10px; border: 1px solid #d9d0bc; border-radius: 14px; background: #f7f1e3; }
.grant-course-group { display: grid; gap: 7px; }
.grant-course-group + .grant-course-group { margin-top: 4px; padding-top: 12px; border-top: 1px solid #ded2b8; }
.grant-course-group h3 { margin: 0 4px 2px; color: #987126; font-size: 11px; letter-spacing: .08em; }
.grant-course-option { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 12px; border: 1px solid #e3dac7; border-radius: 11px; background: #fffdf8; cursor: pointer; }
.grant-course-option:has(input:checked) { border-color: #b08a3d; background: #fff5d8; box-shadow: inset 3px 0 #1f4a40; }
.grant-course-option span { min-width: 0; display: grid; gap: 3px; }
.grant-course-option strong { color: #253b35; font-size: 14px; }
.grant-course-option small { color: #918979; font-size: 10px; }
.grant-course-option input { flex: none; width: 21px; height: 21px; accent-color: #1f4a40; }
#grantCourseSummary { display: block; margin-top: 8px; color: #8f6b2c; font-size: 11px; }

@media (max-width: 900px) {
  .course-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { margin-inline: 20px; padding: 55px 45px; }
  .hero-copy { width: 66%; }
  .hero-art { right: -8%; }
  .admin-layout { grid-template-columns: 74px 1fr; }
  .admin-sidebar { width: 74px; padding-inline: 10px; }
  .admin-sidebar .brand > span:last-child, .side-item:not(.active) { font-size: 0; }
  .side-item { text-align: center; }
  .side-item span { width: auto; font-size: 20px; }
  .sidebar-bottom { overflow: hidden; font-size: 0; }
  .admin-main { grid-column: 2; padding: 32px 24px; }
  .admin-course-row { grid-template-columns: 74px 1fr 80px 170px; }
  .admin-course-row .row-cell { display: none; }
  .admin-thumb { width: 74px; }
  .table-head { display: none; }
  .category-admin-grid { grid-template-columns: 1fr; }
  .placement-guide { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .learner-stats { grid-template-columns: repeat(2, 1fr); }
  .chapter-admin-list article { grid-template-columns: 22px 1fr auto; }
  .chapter-admin-list button { grid-column: auto; }
}

@media (max-width: 640px) {
  body { padding-bottom: 76px; }
  .admin-body { padding-bottom: 0; }
  .cover-position-shell { padding: 20px 14px; }
  .cover-adjust-entry { align-items: flex-start; flex-direction: column; gap: 8px; }
  .site-header { height: 64px; padding: 0 18px; justify-content: center; }
  .site-header .brand { position: absolute; left: 18px; }
  .site-header .brand > span:last-child { display: grid; }
  .header-nav { display: none; }
  .admin-link { margin-left: auto; font-size: 12px; padding: 7px 11px; }
  .hero { min-height: 320px; margin: 14px 14px 42px; padding: 34px 28px; border-radius: 20px; }
  .hero-copy { width: 100%; }
  .hero .eyebrow { font-size: 10px; }
  .hero h1 { font-size: 40px; max-width: 270px; }
  .hero p { max-width: 270px; font-size: 13px; line-height: 1.65; }
  .hero-art { right: -36%; opacity: .65; width: 88%; }
  .floating-card { display: none; }
  .course-section { padding: 0 14px; margin-bottom: 40px; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 18px; margin-bottom: 20px; }
  .section-heading h2 { font-size: 29px; }
  .search-box { order: -1; width: 100%; height: 46px; }
  .course-grid { grid-template-columns: 1fr; gap: 14px; }
  .course-card { display: grid; grid-template-columns: 124px 1fr; border-radius: 17px; }
  .course-cover { aspect-ratio: auto; min-height: 170px; }
  .course-cover.placeholder::after { writing-mode: vertical-rl; font-size: 20px; }
  .level-badge { left: 8px; top: 8px; padding: 4px 7px; }
  .course-body { padding: 16px; min-width: 0; }
  .course-body h3 { font-size: 21px; }
  .course-body p { margin-bottom: 12px; height: 39px; font-size: 12px; }
  .course-info { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .course-info span + span::before { content: " / "; margin: 0 4px; }
  .course-footer { margin-top: 15px; padding-top: 12px; }
  .watch-button { padding: 8px 11px; font-size: 12px; }
  .mini-progress { grid-column: 1 / -1; }
  .learning-strip { margin: 0 14px 40px; padding: 28px 24px; border-radius: 18px; }
  .learning-strip h2 { font-size: 26px; }
  .learning-strip p { font-size: 12px; }
  .learning-stat { display: none; }
  .course-dialog { width: 100vw; max-height: 96vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .dialog-content { padding: 24px 20px 30px; }
  .dialog-content h2 { font-size: 28px; }
  .admin-layout { display: block; padding: 213px 0 0; }
  .admin-sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 0 auto;
    width: 100%;
    height: 213px;
    padding: 10px 12px 12px;
    flex-direction: row;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(180deg, #fffaf0, #eee2c6);
    border-bottom: 1px solid rgba(150,112,39,.24);
    box-shadow: 0 8px 24px rgba(82,61,20,.12);
  }
  .admin-sidebar .brand, .sidebar-bottom { display: none; }
  .admin-sidebar nav {
    display: grid;
    width: 100%;
    gap: 8px;
    overflow: visible;
  }
  .admin-sidebar .side-group {
    min-width: 0;
    height: 57px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 6px;
    border: 1px solid rgba(118,92,40,.13);
    border-radius: 13px;
    background: rgba(255,255,255,.48);
  }
  .admin-sidebar .side-group + .side-group { margin-top: 0; border-top-color: rgba(118,92,40,.13); }
  .admin-sidebar .side-group-label { flex: 0 0 70px; padding: 0 4px; color: #8a6a2f; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-align: center; }
  .admin-sidebar #newCourseSide, .admin-sidebar #manualGrantSide { display: none; }
  .side-item, .side-item:not(.active) {
    flex: 0 0 auto;
    width: auto;
    min-width: 55px;
    height: 43px;
    display: grid;
    place-items: center;
    padding: 0 11px;
    border: 1px solid rgba(118,92,40,.16);
    border-radius: 12px;
    background: rgba(255,255,255,.66);
    color: #4f554d;
    font-size: 0;
    text-align: center;
    white-space: nowrap;
  }
  .side-item::after { content: attr(data-short); font-size: 14px; font-weight: 700; letter-spacing: .08em; }
  .side-item span { display: none; }
  .side-item.active { color: #f8e7b2; border-color: #315047; background: linear-gradient(135deg,#123c34,#28584c); box-shadow: 0 5px 14px rgba(24,61,53,.22); }
  .admin-main { padding: 22px 14px 36px; }
  .admin-topbar h1 { font-size: 25px; }
  .admin-topbar .primary-button { font-size: 0; width: 42px; height: 42px; padding: 0; }
  .admin-topbar .primary-button::after { content: "+"; font-size: 23px; }
  .stats-row { gap: 8px; }
  .stats-row article { display: grid; gap: 5px; padding: 14px 12px; }
  .stats-row strong { font-size: 22px; }
  .admin-panel { padding: 15px; }
  .panel-heading { align-items: stretch; flex-direction: column; }
  .search-box.compact { width: 100%; }
  .admin-course-row { grid-template-columns: 62px 1fr; gap: 11px; }
  .banner-admin-list article { grid-template-columns: 110px minmax(0,1fr); gap: 11px; }
  .banner-admin-list img { width: 110px; }
  .banner-admin-actions { grid-column: 2; justify-content: flex-start; flex-wrap: wrap; }
  .admin-thumb { width: 62px; }
  .status-pill, .row-actions { grid-column: 2; }
  .row-actions { justify-content: start; flex-wrap: wrap; }
  .login-card { padding: 32px 24px; }
  .editor-dialog { width: 100vw; max-height: 96vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .editor-dialog form { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .span-two { grid-column: auto; }
  .editor-actions { flex-wrap: wrap; }
  .upload-status { width: 100%; }
}

/* 玄衡阁课程系统高保真页面 */
.learner-body { padding-bottom: 0; }
.learner-main { min-height: calc(100vh - 76px); }
.site-footer { padding: 28px 20px 34px; text-align: center; color: #817a69; font-size: 13px; letter-spacing: .06em; }
.site-header .brand-image { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; box-shadow: 0 4px 14px rgba(11,41,36,.16); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font: 700 20px "STKaiti", "KaiTi", serif; letter-spacing: .12em; }
.brand-copy small { color: #887b62; font-size: 9px; letter-spacing: .28em; }
.top-nav { position: relative; height: 100%; border: 0; background: transparent; color: #726f65; padding: 0 8px; }
.top-nav.active { color: var(--red); font-weight: 700; }
.top-nav.active::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 28px; height: 3px; border-radius: 3px; background: var(--red); transform: translateX(-50%); }
.header-wallet { margin-left: auto; display: flex; align-items: center; gap: 7px; border: 1px solid #d7c69e; border-radius: 999px; padding: 6px 12px 6px 7px; color: #574521; background: #fff8e7; }
.header-wallet img { width: 27px; height: 27px; object-fit: contain; }
.header-wallet span { font-weight: 800; }
.header-wallet small { color: #9a8760; }
.header-wallet.simple-account { padding: 9px 15px; color: #fff4d1; background: #173a33; border-color: #b88b35; }
.header-wallet.simple-account span { font-size: 13px; }
.app-view { animation: view-in .32s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.learner-body .hero {
  background-image: linear-gradient(90deg, rgba(4,33,29,.97) 0%, rgba(4,33,29,.9) 50%, rgba(4,33,29,.45) 100%), url('/assets/ink-landscape.webp');
  background-size: cover;
  background-position: center;
}
.learner-body .hero-copy { width: 64%; }
.promo-hero .hero-copy { padding-top: 22px; }
.learner-body .hero h1 { font-size: clamp(46px, 5.6vw, 74px); margin-top: 15px; }
.promo-ribbon { position: absolute; z-index: 3; left: 0; top: 28px; padding: 7px 16px 7px 20px; border-radius: 0 999px 999px 0; color: #361e0b; background: linear-gradient(135deg, #f4d98e, #c99431); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.promo-dots { position: absolute; z-index: 3; left: 50%; bottom: 18px; display: flex; gap: 7px; transform: translateX(-50%); }
.promo-dots button { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 999px; background: rgba(255,255,255,.38); transition: width .25s, background .25s; }
.promo-dots button.active { width: 23px; background: #edcd77; }
.hero-seal { position: absolute; top: 32px; right: 34px; z-index: 2; border: 2px solid #a94232; color: #d7634c; padding: 8px 7px; font: 700 12px/1.25 "STKaiti", "KaiTi", serif; border-radius: 4px; }
.hero-compass { position: absolute; right: 8%; top: 50%; width: 250px; height: 250px; transform: translateY(-50%); border: 1px solid rgba(239,207,123,.55); border-radius: 50%; box-shadow: 0 0 0 12px rgba(227,193,103,.06), inset 0 0 0 12px rgba(227,193,103,.06); }
.hero-compass::before, .hero-compass::after { content: ""; position: absolute; inset: 26px; border: 1px solid rgba(239,207,123,.36); border-radius: 50%; }
.hero-compass::after { inset: 58px; }
.hero-compass span { position: absolute; color: rgba(245,220,155,.75); font: 15px "KaiTi", serif; }
.hero-compass span:nth-child(1) { left: 50%; top: 8px; }
.hero-compass span:nth-child(2) { right: 12px; top: 50%; }
.hero-compass span:nth-child(3) { left: 50%; bottom: 8px; }
.hero-compass span:nth-child(4) { left: 12px; top: 50%; }
.hero-compass i { position: absolute; inset: 82px; display: grid; place-items: center; border-radius: 50%; border: 1px solid #d6a941; color: #f6df9e; font: normal 700 35px "KaiTi", serif; }

.quick-actions { max-width: 1080px; margin: -102px auto 72px; padding: 0 25px; position: relative; z-index: 4; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.mine-entry-wrap { max-width: 1080px; margin: 38px auto 0; padding: 0 16px; }
.mine-entry-wrap .mine-quick-actions { max-width: none; margin: 0; padding: 0; }
.mine-entry-wrap + .profile-wrap { margin-top: 20px; }
.quick-card { min-height: 110px; display: grid; grid-template-columns: 70px 1fr auto; align-items: center; gap: 16px; border: 1px solid rgba(201,154,61,.35); border-radius: 19px; padding: 18px 22px; text-align: left; box-shadow: 0 18px 36px rgba(39,31,15,.13); overflow: hidden; position: relative; }
.quick-card::after { content: ""; position: absolute; width: 140px; height: 140px; border: 1px solid currentColor; opacity: .12; border-radius: 50%; right: -50px; top: -60px; }
.quick-card img { width: 68px; height: 68px; object-fit: contain; }
.quick-symbol { width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid #ba8d35; border-radius: 50%; color: #9c261e; background: #fff3ce; font: 700 30px "KaiTi", serif; }
.quick-card > span:not(.vip-emblem) { display: grid; gap: 5px; }
.quick-card small { opacity: .65; }
.quick-card strong { font: 700 21px "KaiTi", serif; }
.quick-card b { font-size: 12px; border-radius: 999px; padding: 8px 11px; }
.ingot-card { background: linear-gradient(135deg, #fffaf0, #f0dfb6); color: #593d16; }
.ingot-card b { color: white; background: #a61f18; }
.vip-card { color: #f7dfa5; background: linear-gradient(135deg, #7f1915, #b3281f); }
.vip-card b { color: #6f1b16; background: #f3d892; }
.vip-emblem { width: 68px; height: 68px; display: grid; place-items: center; border: 1px solid #e8c979; border-radius: 18px 18px 18px 5px; font-family: Georgia, serif; font-weight: 800; box-shadow: inset 0 0 0 4px rgba(255,255,255,.07); }

.section-heading.ornamental { align-items: center; }
.section-heading.ornamental h2 { font-size: 40px; color: #19322d; }
.section-heading.ornamental p { color: #888172; margin: 6px 0 0; font-size: 13px; }
.section-heading.ornamental .eyebrow { color: #b18a3d; letter-spacing: .26em; }
.single-column { max-width: 980px; grid-template-columns: 1fr; margin: 0 auto; gap: 17px; }
.single-column .course-card { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 210px; background: linear-gradient(135deg, #0b302b, #102521); position: relative; }
.single-column .course-card::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(231,201,125,.26); border-radius: 16px; pointer-events: none; }
.single-column .course-cover { aspect-ratio: auto; min-height: 100%; }
.single-column .course-cover::after { font-size: 25px; }
.single-column .course-cover img { transition: transform .45s ease; }
.single-column .course-card:hover .course-cover img { transform: scale(1.035); }
.single-column .course-body { padding: 26px 30px; display: flex; flex-direction: column; }
.single-column .course-body h3 { font-size: 29px; }
.single-column .course-body p { height: auto; max-width: 570px; margin-bottom: 15px; }
.single-column .course-footer { margin-top: auto; }
.unlock-badge { position: absolute; z-index: 2; left: 14px; top: 14px; min-width: 72px; padding: 9px 15px; border-radius: 999px; border: 1px solid rgba(255,226,150,.82); font-size: 14px; font-weight: 800; line-height: 1; text-align: center; letter-spacing: .05em; box-shadow: 0 5px 15px rgba(0,0,0,.25); }
.unlock-badge.is-open { color: #123b33; background: linear-gradient(135deg, #ffe7a0, #d4a83e); border-color: #ffe8a2; }
.unlock-badge.is-locked { color: #fff1c8; background: linear-gradient(135deg, #a5221c, #c63a2d); border-color: #f1c36c; }
.unlock-badge.is-free { color: #fff0b5; background: linear-gradient(135deg, #135347, #0a362f); border-color: #d8ad52; }
.premium-grid .course-card { border-color: #b7862c; background: linear-gradient(135deg, #151b19, #263029); }
.premium-grid .course-card[data-tier="premium"] { box-shadow: 0 16px 44px rgba(65,43,10,.2); }
.premium-grid .course-card[data-tier="premium"] .course-body h3 { color: #f5d579; }
.single-column .premium-poster-card { display: block; width: 100%; min-height: 0; cursor: pointer; background: #111d1a; }
.single-column .premium-poster-card .course-cover { min-height: 0; aspect-ratio: 1200 / 520; }
.single-column .premium-poster-card .course-cover img { object-fit: cover; }
.single-column .premium-poster-card .unlock-badge { left: auto; right: 14px; top: 14px; }
.single-column .premium-poster-card:focus-visible { outline: 3px solid #b88b35; outline-offset: 4px; }
.premium-clean-cover { background-size: cover; background-position: center; color: #f7e4a7; display: flex; align-items: center; padding: 42px 48px; }
.premium-clean-copy { display: grid; gap: 11px; max-width: 67%; position: relative; z-index: 1; }
.premium-clean-copy small { color: #d9b95d; letter-spacing: .12em; }
.premium-clean-copy strong { font: 700 40px "STKaiti", "KaiTi", serif; letter-spacing: .08em; }
.premium-clean-copy em { color: rgba(255,255,255,.78); font-style: normal; font-size: 16px; }
.premium-clean-copy b { width: max-content; margin-top: 8px; padding: 9px 16px; border: 1px solid rgba(223,190,91,.75); border-radius: 999px; color: #f3d47b; font-size: 13px; }
.single-column .series-entry-card { display: block; width: 100%; min-height: 0; cursor: pointer; background: #0b2c27; }
.single-column .series-entry-card .course-cover { aspect-ratio: 1200 / 520; min-height: 0; }
.single-column .series-entry-card .course-cover img { object-fit: cover; }
.single-column .series-entry-card .unlock-badge { left: auto; right: 14px; top: 14px; }
.single-column .series-entry-card:focus-visible { outline: 3px solid #b88b35; outline-offset: 4px; }

.path-banner { max-width: 1180px; margin: 0 auto 80px; padding: 36px 44px; color: #f7e4ad; background: linear-gradient(115deg, #0b2e29, #173a33); border: 1px solid #b68d3c; border-radius: 24px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 42px; box-shadow: var(--shadow); }
.path-heading { display: grid; gap: 7px; }
.path-heading span { color: #c9a859; font-size: 11px; letter-spacing: .17em; }
.path-heading strong { font: 700 24px "KaiTi", serif; }
.path-steps { display: flex; align-items: center; justify-content: center; gap: 16px; }
.path-steps span { display: grid; grid-template-columns: 34px auto; align-items: center; gap: 8px; color: rgba(255,255,255,.66); font-size: 13px; }
.path-steps b { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #907c4f; border-radius: 50%; color: #d8bd79; }
.path-steps .done { color: white; }
.path-steps i { color: #8c815f; font-style: normal; }
.path-banner > button { border: 1px solid #d0ad5e; border-radius: 999px; padding: 10px 15px; background: transparent; color: #e9ce8a; font-size: 12px; }

.inner-hero { max-width: 1180px; margin: 36px auto 0; min-height: 270px; border-radius: 28px; padding: 55px 64px; color: #f6e0a5; background: linear-gradient(90deg, rgba(6,41,36,.97), rgba(6,41,36,.68)), url('/assets/ink-landscape.webp') center 58%/cover; box-shadow: var(--shadow); }
.inner-hero .eyebrow { color: #d7ad50; }
.inner-hero h1 { font: 700 45px "KaiTi", serif; margin: 17px 0 12px; }
.inner-hero p { color: rgba(255,255,255,.68); margin: 0; }
.course-library { margin-top: 40px; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.segmented { display: flex; gap: 7px; padding: 5px; border-radius: 999px; background: rgba(30,49,43,.08); }
.segmented button { border: 0; border-radius: 999px; padding: 10px 21px; background: transparent; color: #787368; }
.segmented button.active { color: #fff5d6; background: #173a33; box-shadow: 0 7px 18px rgba(22,53,47,.14); }
.tier-intro { max-width: 980px; margin: 0 auto 18px; padding: 18px 22px; border-left: 3px solid var(--gold); background: rgba(255,253,247,.62); color: #635f55; line-height: 1.7; }
.tier-intro strong { color: #253b35; margin-right: 8px; }
.advanced-category-row { max-width: 980px; margin: 0 auto; }

.profile-wrap { max-width: 1080px; margin: 38px auto 80px; padding: 0 16px; }
.profile-card { position: relative; min-height: 230px; display: grid; grid-template-columns: 115px 1fr auto; align-items: center; gap: 28px; padding: 40px 44px; border-radius: 26px; color: white; background: linear-gradient(110deg, #092d28, #16453d); border: 1px solid #b8954e; box-shadow: var(--shadow); }
.profile-card > img { width: 110px; height: 110px; border-radius: 26px; }
.profile-card > div > span { color: #e0be6e; font-size: 12px; letter-spacing: .15em; }
.profile-card h1 { font: 700 34px "KaiTi", serif; margin: 9px 0; color: #ffe9ac; }
.profile-card p { margin: 0; color: rgba(255,255,255,.6); }
.profile-card > button { align-self: start; border: 1px solid rgba(236,205,125,.55); border-radius: 999px; padding: 9px 13px; color: #edcf83; background: transparent; }
.account-active-badge { position: absolute; right: 44px; bottom: 38px; min-width: 122px; display: grid; grid-template-columns: 10px auto; align-items: center; gap: 2px 9px; padding: 10px 14px; border: 1px solid rgba(236,205,125,.43); border-radius: 14px; color: #f4dda2; background: rgba(240,207,121,.08); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); backdrop-filter: blur(6px); }
.account-active-badge i { grid-row: 1 / span 2; width: 8px; height: 8px; border-radius: 50%; background: #d9b352; box-shadow: 0 0 0 4px rgba(217,179,82,.14); }
.account-active-badge small { color: rgba(255,255,255,.48); font-size: 9px; line-height: 1.1; letter-spacing: .08em; }
.account-active-badge strong { color: #ffe9ac; font-size: 15px; line-height: 1.15; }
.account-assets { width: calc(100% - 28px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px auto 20px; }
.asset-heading { display: none; }
.asset-heading span { color: #7d291f; font-size: 18px; font-weight: 700; letter-spacing: .08em; }
.asset-heading small { color: #a18e68; font-size: 9px; letter-spacing: .18em; }
.account-assets article { position: relative; min-height: 110px; display: grid; grid-template-columns: 36px 1fr; grid-template-rows: auto auto auto; align-content: center; column-gap: 12px; row-gap: 3px; overflow: hidden; padding: 16px 20px; border: 1px solid rgba(211,174,91,.72); border-radius: 17px; background: linear-gradient(135deg, #0a312c 0%, #155047 100%); box-shadow: 0 9px 22px rgba(15,55,48,.14), inset 0 1px 0 rgba(255,255,255,.08); }
.account-assets article::after { content: ""; position: absolute; right: -38px; bottom: -55px; width: 145px; height: 145px; border: 1px solid rgba(246,218,145,.14); border-radius: 50%; box-shadow: 0 0 0 22px rgba(246,218,145,.035), 0 0 0 44px rgba(246,218,145,.025); }
.account-assets article:last-child { border-color: rgba(225,182,91,.72); background: linear-gradient(135deg, #6f1915 0%, #a02c23 100%); box-shadow: 0 13px 30px rgba(111,25,21,.16), inset 0 1px 0 rgba(255,255,255,.09); }
.account-assets article > i { position: relative; z-index: 1; grid-row: 1 / span 3; align-self: center; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(244,210,126,.56); border-radius: 50%; color: #f2d581; background: rgba(5,27,24,.32); font-style: normal; font-family: "KaiTi", serif; font-size: 15px; box-shadow: 0 5px 13px rgba(0,0,0,.14); }
.account-assets article > span { position: relative; z-index: 1; color: rgba(255,248,224,.7); font-size: 12px; }
.account-assets article > strong { position: relative; z-index: 1; color: #ffe8a8; font-size: 20px; line-height: 1.15; }
.account-assets article > strong b { font-size: 26px; font-weight: 700; }
.account-assets article > strong em { margin-left: 6px; color: rgba(255,244,211,.68); font-size: 12px; font-style: normal; font-weight: 500; }
.account-assets article > small { position: relative; z-index: 1; color: rgba(255,255,255,.52); font-size: 11px; }
.continue-panel, .mine-menu { padding: 26px; background: #fffdf7; border: 1px solid #e1dbc9; border-radius: 19px; }
.panel-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.panel-title span { display: grid; gap: 3px; }
.panel-title small { color: #ad8739; letter-spacing: .16em; }
.panel-title strong { font: 700 24px "KaiTi", serif; }
.panel-title button { border: 0; background: transparent; color: #8c6a27; }
.continue-course { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 20px; }
.continue-course img { width: 130px; aspect-ratio: 16/9; object-fit: cover; border-radius: 12px; }
.continue-course > div { display: grid; gap: 7px; }
.continue-course span, .continue-course small { color: #8b867c; font-size: 12px; }
.continue-course > button { border: 0; border-radius: 999px; padding: 11px 16px; color: #fff2cc; background: #173a33; }
.line-progress { height: 5px; background: #e5e0d4; border-radius: 9px; overflow: hidden; }
.line-progress i { display: block; height: 100%; background: #b4852e; }
.mine-menu { margin-top: 20px; display: grid; padding-block: 8px; }
.mine-menu button { display: grid; grid-template-columns: 65px 1fr auto; gap: 14px; align-items: center; text-align: left; padding: 18px 8px; border: 0; border-bottom: 1px solid #eee8dc; background: transparent; }
.mine-menu button:last-child { border-bottom: 0; }
.mine-menu span { color: #a1762c; font-weight: 700; }
.mine-menu b { color: #514f48; font-weight: 500; }
.mine-menu i { color: #aaa398; font: normal 28px serif; }
.auth-wrap { max-width: 620px; }
.auth-card { padding: 38px 42px; border: 1px solid #d8c99f; border-radius: 24px; background: rgba(255,253,247,.96); box-shadow: var(--shadow); }
.auth-card h1 { margin: 12px 0 9px; color: #173a33; font: 700 34px "KaiTi", serif; }
.auth-card > p { margin: 0 0 24px; color: #777064; line-height: 1.75; }
.auth-tabs { margin-bottom: 22px; }
.auth-form { display: grid; gap: 15px; }
.auth-form .field-label { margin: 0; }
.auth-form .form-error { min-height: 20px; margin: 0 !important; }
.offline-help { margin-top: 20px; padding: 15px 17px; display: grid; gap: 5px; border-left: 3px solid #b78b36; background: #f5efdf; color: #746b59; font-size: 12px; }
.offline-help strong { color: #4b493f; }
.activation-result { margin-top: 16px; padding: 18px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 7px 14px; border: 1px solid #d2a84d; border-radius: 14px; background: #fff5d6; }
.activation-result > span { color: #75613b; font-size: 12px; }
.activation-result > strong { grid-column: 1; color: #8f241d; font: 800 34px Georgia, serif; letter-spacing: .16em; }
.activation-result > button { grid-column: 2; grid-row: 1 / span 2; border: 0; border-radius: 999px; padding: 9px 13px; color: white; background: #173a33; }
.activation-result > small { grid-column: 1 / -1; color: #7e725e; line-height: 1.6; }
.my-course-list { display: grid; gap: 12px; }
.my-course-empty { padding: 28px 16px; border: 1px dashed #d7ccb3; border-radius: 14px; text-align: center; color: #81796b; }
.my-course-item { display: grid; grid-template-columns: 150px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 12px; border: 1px solid #e1d7c0; border-radius: 15px; background: #fbf8ef; cursor: pointer; }
.my-course-item img { width: 150px; aspect-ratio: 16/7; object-fit: cover; border-radius: 10px; }
.my-course-item div { display: grid; gap: 6px; }
.my-course-item strong { color: #243d37; font: 700 21px "KaiTi", serif; }
.my-course-item span { color: #8a8172; font-size: 12px; }
.my-course-item button { border: 0; border-radius: 999px; padding: 9px 14px; color: #fff2cc; background: #173a33; }

.bottom-nav { position: fixed; z-index: 40; left: 50%; bottom: 16px; transform: translateX(-50%); width: min(430px, calc(100vw - 28px)); height: 62px; padding: 5px 12px; display: none; justify-content: space-around; border: 1px solid rgba(161,132,73,.26); border-radius: 20px; background: rgba(255,253,246,.94); box-shadow: 0 12px 40px rgba(50,40,20,.17); backdrop-filter: blur(18px); }
.bottom-nav button { min-width: 76px; display: grid; place-items: center; gap: 1px; border: 0; color: #817c71; background: transparent; }
.bottom-nav span { font-size: 23px; line-height: 1; }
.bottom-nav b { font-size: 11px; font-weight: 600; }
.bottom-nav button.active { color: var(--red); }

.detail-cover { min-height: 320px; position: relative; background-position: center; background-size: cover; display: flex; align-items: end; }
.detail-cover-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(3,24,21,.94), rgba(3,24,21,.12) 75%); }
.detail-cover-copy { position: relative; z-index: 1; padding: 32px 34px; color: white; }
.detail-cover-copy > span { display: inline-flex; padding: 5px 10px; border-radius: 999px; background: #a5211a; color: #ffe8b0; font-size: 11px; }
.detail-cover-copy h2 { margin: 12px 0 7px; color: #ffe7a9; font: 700 35px "KaiTi", serif; }
.detail-cover-copy p { margin: 0; color: rgba(255,255,255,.7); }
.detail-summary { display: flex; justify-content: space-between; gap: 20px; }
.detail-summary > strong { flex: none; color: var(--red); font-size: 24px; padding-top: 20px; }
.detail-tabs { display: flex; gap: 24px; margin: 26px 0 12px; border-bottom: 1px solid #ded7c8; }
.detail-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 10px 0; color: #8b867a; background: transparent; }
.detail-tabs button.active { border-color: #a82119; color: #a82119; font-weight: 700; }
.chapter-list { display: grid; gap: 10px; }
.chapter { border: 1px solid #e1dacb; border-radius: 12px; overflow: hidden; background: #fffdf8; }
.chapter > button { width: 100%; display: flex; justify-content: space-between; border: 0; padding: 14px 16px; color: #273832; background: #f3eddf; font-weight: 700; }
.chapter-lessons { display: grid; }
.lesson-row { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; padding: 13px 16px; border: 0; border-top: 1px solid #eee8dc; background: white; text-align: left; color: #5e5a51; }
.lesson-row span:first-child { color: #b18738; }
.lesson-row small { color: #a49d90; }
.lesson-sequence { display: grid; gap: 13px; }
.lesson-cover-row { width: 100%; display: grid; grid-template-columns: 180px minmax(0,1fr) auto; align-items: center; gap: 18px; padding: 11px; border: 1px solid #dfd6c4; border-radius: 15px; color: #343b37; background: #fffdf8; text-align: left; transition: transform .2s, box-shadow .2s; }
.lesson-cover-row:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(48,42,27,.10); }
.lesson-cover-mini { min-height: 95px; display: flex; align-items: center; justify-content: space-between; padding: 15px; border: 1px solid #caa658; border-radius: 11px; background-position: center; background-size: cover; color: #f9df9f; overflow: hidden; }
.lesson-cover-mini b { font: 700 35px "KaiTi", serif; }
.lesson-cover-mini i { align-self: end; color: rgba(255,255,255,.72); font: normal 11px "KaiTi", serif; letter-spacing: .12em; }
.lesson-row-copy { min-width: 0; display: grid; gap: 6px; }
.lesson-row-copy small { color: #a17a2d; font-size: 10px; letter-spacing: .08em; }
.lesson-row-copy strong { color: #243a34; font-size: 16px; line-height: 1.55; }
.lesson-row-copy em { color: #9d978b; font-size: 11px; font-style: normal; }
.lesson-row-state { flex: none; padding: 7px 10px; border-radius: 999px; color: #8c641b; background: #f5ead0; font-size: 11px; }
.detail-cta { width: 100%; margin-top: 18px; border: 0; border-radius: 12px; padding: 15px; color: #fff2c9; background: linear-gradient(135deg, #8f1c16, #b62c22); font-weight: 700; box-shadow: 0 10px 24px rgba(151,31,24,.18); }
.lesson-dialog { width: min(900px, 100vw); max-height: 96vh; padding: 0; overflow-y: auto; border: 0; border-radius: 22px; background: var(--paper); }
.lesson-topbar { height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; background: #fffaf0; border-bottom: 1px solid #ded5c2; }
.lesson-topbar > button { border: 0; background: transparent; color: #574d3d; }
.lesson-back { min-width: 112px; display: inline-flex; align-items: center; gap: 6px; padding: 9px 8px; text-align: left; }
.lesson-back span { font-size: 23px; line-height: 1; }
.lesson-back b { font-size: 14px; white-space: nowrap; }
.lesson-more { width: 38px; font-size: 21px; }
.lesson-brand { display: flex; align-items: center; gap: 8px; font: 700 18px "KaiTi", serif; }
.lesson-brand img { width: 30px; height: 30px; border-radius: 8px; }
.lesson-content { padding: 30px 34px 36px; }
.lesson-content h2 { font: 700 31px "KaiTi", serif; margin: 8px 0 14px; }
.lesson-content p { color: #625e55; line-height: 1.9; white-space: pre-line; }
.lesson-actions { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lesson-actions button { border: 1px solid #cdbd98; border-radius: 12px; padding: 12px; color: #735b2c; background: #fffaf0; }

@media (max-width: 640px) {
  .learner-body { padding-bottom: 92px; }
  .mobile-view-back { margin: 12px 16px 0; min-height: 42px; display: inline-flex; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid rgba(119,95,45,.24); border-radius: 999px; color: #3e4a44; background: rgba(255,253,247,.88); box-shadow: 0 5px 14px rgba(55,45,25,.07); font-weight: 700; }
  .mobile-view-back span { font-size: 21px; line-height: 1; }
  .learner-main { min-height: calc(100vh - 64px); }
  .site-footer { padding-bottom: 98px; }
  .site-header { justify-content: space-between; }
  .site-header .brand { position: static; }
  .site-header .brand-image { width: 38px; height: 38px; }
  .site-header .brand-copy { display: grid; }
  .brand-copy strong { font-size: 16px; letter-spacing: .05em; }
  .brand-copy small { display: none; }
  .header-wallet { margin-left: 0; padding-right: 9px; }
  .header-wallet img { width: 24px; height: 24px; }
  .header-wallet small { display: none; }
  .bottom-nav { display: flex; }
  .learner-body .hero { min-height: 345px; margin-bottom: 20px; background-position: 61% center; }
  .learner-body .hero-copy { width: 78%; }
  .promo-hero .hero-copy { padding-top: 28px; }
  .learner-body .hero h1 { font-size: 42px; }
  .learner-body .hero p { max-width: 245px; }
  .hero-compass { width: 190px; height: 190px; right: -68px; opacity: .62; }
  .hero-compass i { inset: 62px; }
  .hero-seal { top: 20px; right: 18px; }
  .quick-actions { margin: 0 auto 42px; padding: 0 14px; grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick-card { min-height: 104px; grid-template-columns: 47px 1fr; gap: 9px; padding: 14px 12px; }
  .quick-card img, .vip-emblem { width: 46px; height: 46px; border-radius: 12px; }
  .quick-symbol { width: 46px; height: 46px; font-size: 22px; }
  .quick-card strong { font-size: 16px; }
  .quick-card small { font-size: 9px; }
  .quick-card > b { grid-column: 2; justify-self: start; padding: 5px 8px; font-size: 9px; }
  .section-heading.ornamental { gap: 14px; }
  .section-heading.ornamental h2 { font-size: 31px; }
  .single-column .course-card { grid-template-columns: 118px minmax(0, 1fr); min-height: 176px; }
  .single-column .series-entry-card { display: block; min-height: 0; }
  .single-column .series-entry-card .course-cover { min-height: 0; aspect-ratio: 1200 / 520; }
  .single-column .premium-poster-card { display: block; min-height: 0; }
  .single-column .premium-poster-card .course-cover { min-height: 0; aspect-ratio: 1200 / 520; }
  .premium-clean-cover { padding: 22px 24px; }
  .premium-clean-copy { max-width: 76%; gap: 6px; }
  .premium-clean-copy strong { font-size: 26px; }
  .premium-clean-copy em { font-size: 12px; }
  .premium-clean-copy b { margin-top: 3px; padding: 6px 10px; font-size: 10px; }
  .single-column .course-cover { min-height: 176px; }
  .single-column .course-body { padding: 17px 15px; }
  .single-column .course-body h3 { font-size: 21px; margin-right: 5px; }
  .single-column .course-body p { font-size: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .single-column .course-info { display: flex; white-space: normal; }
  .single-column .course-footer { margin-top: auto; padding-top: 11px; }
  .single-column .course-price { font-size: 12px; }
  .single-column .watch-button { white-space: nowrap; }
  .unlock-badge { left: 9px; top: 10px; min-width: 68px; padding: 8px 12px; font-size: 12px; }
  .path-banner { margin: 0 14px 42px; padding: 25px 20px; display: block; }
  .path-heading { text-align: center; }
  .path-steps { gap: 6px; margin: 22px 0; }
  .path-steps span { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 5px; font-size: 10px; }
  .path-steps i { font-size: 11px; }
  .path-banner > button { width: 100%; }
  .inner-hero { min-height: 220px; margin: 14px; padding: 38px 28px; border-radius: 20px; }
  .inner-hero h1 { font-size: 34px; max-width: 280px; }
  .inner-hero p { max-width: 280px; font-size: 12px; line-height: 1.7; }
  .course-library { margin-top: 24px; }
  .library-toolbar { align-items: stretch; flex-direction: column-reverse; gap: 13px; }
  .segmented { width: 100%; }
  .segmented button { flex: 1; padding-inline: 8px; }
  .tier-intro { font-size: 12px; }
  .profile-wrap { margin-top: 14px; padding: 0 14px; }
  .mine-entry-wrap { margin-top: 14px; padding: 0 14px; }
  .auth-card { padding: 28px 20px; border-radius: 20px; }
  .auth-card h1 { font-size: 28px; }
  .profile-card { min-height: 210px; grid-template-columns: 72px 1fr; gap: 17px; padding: 28px 20px; }
  .profile-card > img { width: 72px; height: 72px; border-radius: 18px; }
  .profile-card h1 { font-size: 25px; }
  .profile-card p { font-size: 11px; line-height: 1.5; }
  .profile-card > button { grid-column: 1 / -1; justify-self: start; }
  .account-active-badge { right: 20px; bottom: 28px; min-width: 106px; padding: 8px 10px; border-radius: 12px; }
  .account-active-badge small { font-size: 8px; }
  .account-active-badge strong { font-size: 14px; }
  .account-assets { width: calc(100% - 16px); grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 13px; }
  .account-assets article { min-width: 0; min-height: 106px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 11px 5px; border-radius: 14px; text-align: center; }
  .account-assets article > i { width: 30px; height: 30px; font-size: 13px; }
  .account-assets article > span { font-size: 10px; }
  .account-assets article > strong { font-size: 15px; }
  .account-assets article > strong b { font-size: 22px; }
  .account-assets article > strong em { margin-left: 3px; font-size: 9px; }
  .account-assets article > small { font-size: 8px; }
  .continue-panel, .mine-menu { padding: 18px; }
  .continue-course { grid-template-columns: 88px 1fr; gap: 12px; }
  .continue-course img { width: 88px; }
  .continue-course > button { grid-column: 2; justify-self: start; }
  .my-course-item { grid-template-columns: 92px minmax(0,1fr); gap: 12px; }
  .my-course-item img { width: 92px; }
  .my-course-item strong { font-size: 17px; }
  .my-course-item button { grid-column: 2; justify-self: start; }
  .course-dialog, .lesson-dialog {
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    overflow-x: hidden;
  }
  .course-dialog::backdrop, .lesson-dialog::backdrop { background: var(--paper); }
  .course-dialog .dialog-back { top: calc(env(safe-area-inset-top, 0px) + 12px); left: 14px; }
  .detail-cover { min-height: 250px; padding-top: env(safe-area-inset-top, 0px); }
  .lesson-topbar { height: calc(58px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); position: sticky; top: 0; z-index: 3; }
  .video-shell.portrait { width: 100%; max-height: calc(100dvh - 58px - env(safe-area-inset-top, 0px)); }
  .detail-cover { min-height: 230px; }
  .detail-cover-copy { padding: 24px 20px; }
  .detail-cover-copy h2 { font-size: 27px; }
  .detail-summary { display: block; }
  .detail-summary > strong { display: block; padding: 0 0 8px; }
  .chapter > button { font-size: 13px; }
  .lesson-row { font-size: 12px; }
  .lesson-cover-row { grid-template-columns: 105px minmax(0,1fr); gap: 11px; padding: 8px; }
  .lesson-cover-mini { min-height: 78px; padding: 10px; }
  .lesson-cover-mini b { font-size: 27px; }
  .lesson-cover-mini i { display: none; }
  .lesson-row-copy strong { font-size: 13px; }
  .lesson-row-copy em { display: none; }
  .lesson-row-state { grid-column: 2; justify-self: start; padding: 4px 8px; }
  .lesson-content { padding: 24px 20px 30px; }
  .admin-topbar { align-items: flex-start; gap: 16px; }
  .admin-topbar h1 { font-size: 24px; }
  .topbar-actions { align-items: stretch; flex-direction: column-reverse; }
  .topbar-actions button { white-space: nowrap; padding-inline: 12px; font-size: 11px; }
  .grant-dialog { width: 100vw; max-height: 96vh; margin: auto 0 0; border-radius: 24px 24px 0 0; }
  .grant-dialog form { padding: 22px 18px; }
  .grant-dialog .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .grant-dialog .span-two { grid-column: auto; }
  .grant-dialog .editor-actions { flex-wrap: wrap; }
  .grant-dialog .upload-status { width: 100%; }
  .activation-guide { grid-template-columns: auto 1fr; }
  .admin-main { padding: 25px 14px; }
  .admin-panel { padding: 18px 14px; }
  .stats-row { grid-template-columns: 1fr; gap: 9px; }
  .banner-stats { grid-template-columns: repeat(3, 1fr); }
  .learner-stats { grid-template-columns: repeat(2, 1fr); }
  .panel-heading { align-items: stretch; flex-direction: column; }
  .search-box.compact { width: 100%; }
  .course-picker { grid-template-columns: 1fr; }
  .chapter-admin-list article { grid-template-columns: 20px 1fr auto; gap: 8px; }
  .chapter-admin-list article button { grid-column: 2 / -1; }
  .panel-actions { width: 100%; }
  .panel-actions button { flex: 1; }
  .log-list article { grid-template-columns: 55px 1fr; }
  .log-list p, .log-list i { grid-column: 2; }
}
