/* ──────────────────────────────────────────────────────────
 * Daisy × Unlock · 看课网站 · 大屏视觉系统
 * 继承小程序 v1 token（暖米 / 墨蓝 / 砖红 / 墨绿 / 金）
 * Fraunces 标题 · IBM Plex Mono 数字 · 出版克制风
 * ────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;1,9..144,400;1,9..144,500;1,9..144,600&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@400;500;600&family=Noto+Sans+SC:wght@400;500;600&display=swap');

:root {
  --bg:           #F0EEE8;
  --surface:      #FCFBF7;
  --surface-alt:  #EDE9DE;
  --ink:          #14232E;
  --ink-soft:     #2E3C49;
  --muted:        #6E6A60;
  --faint:        #A09B8E;
  --border:       #E0DBCD;
  --border-soft:  #EAE6D9;
  --brick:        #B23A3A;
  --brick-soft:   #F2DDD6;
  --brick-deep:   #8C2828;
  --sage:         #2F5D62;
  --sage-soft:    #D9E2DE;
  --gold:         #B58A3F;
  --gold-soft:    #EDDFBE;

  /* lesson type colors */
  --c-reading:    #14232E;
  --c-wlistening: #2F5D62;
  --c-listen1:    #5C4A82;
  --c-listen2:    #7C6BA0;
  --c-speak:      #B23A3A;
  --c-grammar:    #A85240;
  --c-writing:    #B58A3F;

  --font-display: 'Fraunces', Georgia, 'Songti SC', serif;
  --font-body:    'Inter', -apple-system, 'PingFang SC', 'Noto Sans SC', sans-serif;
  --font-mono:    'IBM Plex Mono', 'SF Mono', Menlo, monospace;

  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20,35,46,.05);
  --shadow-md: 0 6px 22px rgba(20,35,46,.07);
  --shadow-lg: 0 24px 64px rgba(20,35,46,.12);
}

html, body { overflow-x: hidden; }

.d-screen * { box-sizing: border-box; margin: 0; padding: 0; }
.d-screen {
  width: 100%; height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── primitives ── */
.d-kicker {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.d-kicker.brick { color: var(--brick); font-weight: 600; }
.d-kicker.faint { color: var(--faint); }
.d-kicker.sage  { color: var(--sage); }
.d-display { font-family: var(--font-display); font-weight: 500; letter-spacing: -.4px; }
.d-it      { font-family: var(--font-display); font-style: italic; font-weight: 400; }
.d-mono    { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.d-rule-ink   { height: 2px; background: var(--ink); }
.d-rule-brick { width: 26px; height: 2px; background: var(--brick); }
.d-hair       { height: 1px; background: var(--border); }
.d-hair-dash  { border-top: 1px dashed var(--border-soft); }

.d-avatar {
  border-radius: 50%;
  background: var(--brick-soft) url('daisy-idle.png') center/cover;
  border: 1.5px solid var(--border);
  flex-shrink: 0;
}

/* ── buttons ── */
.d-btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: var(--pill);
  font-weight: 600; font-size: 16px;
  cursor: pointer; border: none;
  transition: transform .14s ease, background .14s ease, box-shadow .14s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}
.d-btn .ar { transition: transform .18s ease; }
.d-btn:hover .ar { transform: translateX(3px); }
.d-btn-brick { background: var(--brick); color: #FAF7F0; padding: 15px 30px; box-shadow: 0 8px 20px rgba(178,58,58,.22); }
.d-btn-brick:hover { background: var(--brick-deep); transform: translateY(-1px); }
.d-btn-ink   { background: var(--ink); color: var(--bg); padding: 15px 30px; }
.d-btn-ink:hover { background: #0c1922; transform: translateY(-1px); }
.d-btn-ghost { background: var(--surface); color: var(--ink); border: 1px solid var(--border); padding: 14px 26px; }
.d-btn-ghost:hover { background: var(--surface-alt); }
.d-btn .em { font-family: var(--font-display); font-style: italic; font-weight: 500; }

/* ══════════════ TOP BAR ══════════════ */
.d-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 48px 0;
}
.d-brand { display: flex; align-items: baseline; gap: 18px; }
.d-brand-name { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: 0; }
.d-brand-name .it { font-style: italic; }
.d-brand-name .dot { color: var(--brick); margin: 0 5px; }
.d-brand-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--faint); text-transform: uppercase; }
.d-top-rule { margin: 14px 48px 0; height: 2px; background: var(--ink); }

.d-login-chip {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--ink); border-radius: var(--pill);
  padding: 9px 18px 9px 14px; cursor: pointer; background: transparent;
  transition: background .14s;
}
.d-login-chip:hover { background: var(--surface); }
.d-login-chip .qr-glyph {
  width: 18px; height: 18px; border-radius: 4px;
  display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px;
}
.d-login-chip .qr-glyph i { background: var(--ink); border-radius: 1px; }
.d-login-chip .qr-glyph i:nth-child(4) { background: var(--brick); }
.d-login-chip span { font-size: 14px; font-weight: 600; }

.d-user { display: flex; align-items: center; gap: 12px; }
.d-user .nm { text-align: right; }
.d-user .nm .hi { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; color: var(--faint); text-transform: uppercase; }
.d-user .nm .who { display: block; font-family: var(--font-display); font-size: 17px; font-weight: 600; margin-top: 1px; }
.d-user .d-avatar { width: 44px; height: 44px; }

/* ══════════════ HERO · RESUME ══════════════ */
.d-hero { padding: 30px 48px 0; }
.d-resume {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 30px 34px;
  display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center;
  overflow: hidden;
}
.d-resume::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--brick);
}
.d-resume-kick { display: flex; align-items: center; gap: 12px; }
.d-resume-title { font-family: var(--font-display); font-size: 40px; font-weight: 500; line-height: 1.08; margin-top: 14px; letter-spacing: -.6px; }
.d-resume-title .unit { color: var(--muted); font-weight: 500; }
.d-resume-sub { font-family: var(--font-display); font-style: italic; font-size: 19px; color: var(--muted); margin-top: 6px; }

.d-resume-progress { margin-top: 22px; padding: 16px 0; border-top: 1px dashed var(--border-soft); border-bottom: 1px dashed var(--border-soft); display: flex; align-items: center; gap: 28px; }
.d-prog-stat .lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.d-prog-stat .val { font-family: var(--font-mono); font-size: 22px; font-weight: 600; margin-top: 3px; }
.d-prog-stat .val .of { color: var(--faint); font-size: 15px; }
.d-film { display: flex; gap: 2px; height: 7px; flex: 1; }
.d-film i { flex: 1; background: var(--border-soft); border-radius: 1px; }
.d-film i.on { background: var(--ink); }
.d-film i.now { background: var(--brick); }

.d-resume-cta { margin-top: 22px; display: flex; align-items: center; gap: 22px; }
.d-resume-meta { display: flex; flex-direction: column; gap: 3px; }
.d-resume-meta .m { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.d-resume-meta .m.faint { color: var(--faint); }

.d-resume-daisy { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 220px; }
.d-resume-daisy .d-avatar { width: 116px; height: 116px; border: 2px solid var(--gold); }
.d-daisy-quote {
  position: relative; background: var(--brick-soft); border-radius: 14px;
  padding: 14px 16px; font-family: var(--font-display); font-style: italic;
  font-size: 14.5px; line-height: 1.45; color: var(--ink); text-align: center;
}
.d-daisy-quote::after { content: ''; position: absolute; top: -7px; left: 50%; transform: translateX(-50%) rotate(45deg); width: 12px; height: 12px; background: var(--brick-soft); }
.d-daisy-quote .accent { font-family: var(--font-mono); font-style: normal; font-size: 8.5px; letter-spacing: 2px; color: var(--brick); text-transform: uppercase; display: block; margin-bottom: 5px; }

/* ══════════════ LOGIN CARD (logged-out hero) ══════════════ */
.d-login {
  position: relative;
  background: var(--ink);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-md);
  padding: 36px 40px;
  display: grid; grid-template-columns: 1fr auto; gap: 44px; align-items: center;
  overflow: hidden; color: var(--bg);
}
.d-login-copy .kick { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px; color: #E5A09B; text-transform: uppercase; font-weight: 600; }
.d-login-copy h2 { font-family: var(--font-display); font-size: 38px; font-weight: 500; line-height: 1.1; margin-top: 14px; letter-spacing: -.5px; color: #FAF7F0; }
.d-login-copy h2 .it { font-style: italic; color: #E5A09B; }
.d-login-copy .lede { font-size: 15px; color: #C3C9CC; margin-top: 14px; max-width: 440px; line-height: 1.6; }
.d-login-daisy-row { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); }
.d-login-daisy-row .d-avatar { width: 52px; height: 52px; border-color: var(--gold); }
.d-login-daisy-row .q { font-family: var(--font-display); font-style: italic; font-size: 15px; color: #EDE9DE; line-height: 1.4; }
.d-login-daisy-row .q b { color: #E5A09B; font-weight: 600; font-style: normal; }

.d-qr-panel { display: flex; flex-direction: column; align-items: center; gap: 14px; background: var(--surface); border-radius: var(--r-lg); padding: 22px 22px 18px; color: var(--ink); }
.d-qr {
  width: 168px; height: 168px; border-radius: 12px; background: #fff;
  border: 1px solid var(--border); padding: 12px; position: relative;
}
.d-qr .qr-img { width: 100%; height: 100%; background-image:
  repeating-conic-gradient(var(--ink) 0% 25%, transparent 0% 50%);
  background-size: 14px 14px; border-radius: 3px; }
.d-qr .qr-corner { position: absolute; width: 36px; height: 36px; border: 5px solid var(--ink); border-radius: 8px; }
.d-qr .qr-corner.tl { top: 14px; left: 14px; }
.d-qr .qr-corner.tr { top: 14px; right: 14px; }
.d-qr .qr-corner.bl { bottom: 14px; left: 14px; }
.d-qr .qr-logo { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); width: 40px; height: 40px; border-radius: 50%; background: var(--brick-soft) url('daisy-idle.png') center/cover; border: 3px solid #fff; }
.d-qr-panel .scan-lbl { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.d-qr-panel .scan-lbl b { color: var(--brick); }

/* ══════════════ NEW STUDENT (no resume) ══════════════ */
.d-fresh::before { background: var(--sage); }
.d-fresh .d-resume-title .unit { color: var(--sage); }
.d-start-badge {
  display: inline-flex; align-items: center; gap: 8px; background: var(--sage-soft);
  color: var(--sage); border-radius: var(--pill); padding: 6px 14px; font-size: 12px; font-weight: 600;
  font-family: var(--font-mono); letter-spacing: 1px; text-transform: uppercase;
}

/* ══════════════ COURSE LIBRARY (accordion) ══════════════ */
.d-lib { padding: 34px 48px 0; }
.d-section-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 18px; }
.d-section-head .num { font-family: var(--font-display); font-style: italic; font-size: 22px; font-weight: 600; color: var(--brick); }
.d-section-head .lbl { font-family: var(--font-mono); font-size: 12px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--ink); font-weight: 600; }
.d-section-head .meta { margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--faint); text-transform: uppercase; }

.d-units { display: flex; flex-direction: column; gap: 10px; }
.d-unit {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: box-shadow .18s ease;
}
.d-unit.open { box-shadow: var(--shadow-md); }
.d-unit-head {
  display: flex; align-items: center; gap: 22px; padding: 18px 26px; cursor: pointer;
  border-radius: var(--r-lg);
  transition: background .14s;
}
.d-unit.open .d-unit-head { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.d-unit-head:hover { background: var(--surface-alt); }
.d-unit-idx {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  background: var(--surface-alt); color: var(--ink); border: 1px solid var(--border);
}
.d-unit.open .d-unit-idx { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.d-unit-tt { flex: 1; min-width: 0; }
.d-unit-tt .u { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.d-unit-tt .nm { font-family: var(--font-display); font-size: 21px; font-weight: 500; margin-top: 1px; letter-spacing: -.2px; }
.d-unit-prog { display: flex; align-items: center; gap: 14px; width: 240px; }
.d-unit-prog .film { display: flex; gap: 2px; height: 6px; flex: 1; }
.d-unit-prog .film i { flex: 1; background: var(--border-soft); border-radius: 1px; }
.d-unit-prog .film i.on { background: var(--ink); }
.d-unit-prog .film i.now { background: var(--brick); }
.d-unit-prog .ct { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.d-unit-prog .ct .of { color: var(--faint); }
.d-unit-chev { width: 22px; height: 22px; color: var(--faint); transition: transform .22s ease; flex-shrink: 0; }
.d-unit.open .d-unit-chev { transform: rotate(180deg); color: var(--ink); }
.d-unit-lock { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1px; color: var(--faint); text-transform: uppercase; }

.d-lessons {
  display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px;
  padding: 4px 26px 24px; position: relative;
}
.d-lesson {
  position: relative; background: var(--bg); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 13px 13px; min-height: 150px;
  display: flex; flex-direction: column; cursor: pointer;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s;
  border-top: 3px solid var(--lt, var(--ink));
}
.d-lesson:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.d-lesson .ln { font-family: var(--font-mono); font-size: 10px; color: var(--faint); letter-spacing: 1px; }
.d-lesson .lt { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.2; margin-top: 7px; }
.d-lesson .lt .sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); font-family: var(--font-body); margin-top: 2px; letter-spacing: 0; }
.d-lesson .spacer { flex: 1; }
.d-lesson-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.d-status { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; letter-spacing: .5px; font-weight: 600; }
.d-status.done { color: var(--sage); }
.d-status.prog { color: var(--brick); }
.d-status.todo { color: var(--faint); }
.d-status .tick { width: 14px; height: 14px; border-radius: 50%; background: var(--sage); color: #fff; display: inline-flex; align-items: center; justify-content: center; }
.d-mini-ring { --p: 0; width: 16px; height: 16px; border-radius: 50%;
  background: conic-gradient(var(--brick) calc(var(--p) * 1%), var(--border-soft) 0); position: relative; }
.d-mini-ring::after { content: ''; position: absolute; inset: 3px; background: var(--bg); border-radius: 50%; }
.d-badge-free { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 1px; font-weight: 700; color: var(--sage); border: 1px solid var(--sage); border-radius: 4px; padding: 2px 5px; text-transform: uppercase; }
.d-lock-ic { width: 15px; height: 15px; color: var(--faint); }

.d-lesson.locked { background: var(--surface); border-style: solid; }
.d-lesson.locked .lt, .d-lesson.locked .ln { opacity: .55; }
.d-lesson.locked .lt .sub { opacity: .8; }
.d-lesson.locked::after {
  content: ''; position: absolute; inset: 0; border-radius: 13px;
  background: repeating-linear-gradient(135deg, transparent, transparent 9px, rgba(160,155,142,.06) 9px, rgba(160,155,142,.06) 10px);
  pointer-events: none;
}
.d-lesson.cur { box-shadow: 0 0 0 2px var(--brick), var(--shadow-md); }
.d-lesson.cur-now-tag { position: absolute; top: -9px; right: 12px; background: var(--brick); color: #fff; font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 1px; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; font-weight: 600; }

/* ══════════════ MINI-PROGRAM FOOTER ══════════════ */
.d-mp { margin: 30px 48px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.d-mp-card {
  display: flex; align-items: center; gap: 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px 24px; cursor: pointer;
  transition: transform .14s, box-shadow .14s;
}
.d-mp-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.d-mp-glyph { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; border: 1.5px solid currentColor; flex-shrink: 0; }
.d-mp-glyph.brick { color: var(--brick); }
.d-mp-glyph.sage  { color: var(--sage); }

.legal-footer {
  margin: 0 48px 28px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .4px;
}
.legal-footer a { color: inherit; text-decoration: none; }
.legal-footer a:hover { color: var(--brick); text-decoration: underline; }
.legal-sep { color: var(--faint); }

@media (max-width: 700px) {
  .d-top { padding: 18px 16px 0; align-items: flex-start; }
  .d-brand { gap: 0; }
  .d-brand-name { font-size: 22px; }
  .d-brand-tag { display: none; }
  .d-user .nm .hi { font-size: 8px; }
  .d-user .nm .who { font-size: 14px; }
  .d-user .d-avatar { width: 38px !important; height: 38px !important; }
  .d-top-rule { margin: 12px 16px 0; }

  .d-hero { padding: 18px 16px 0; }
  .d-resume, .d-login {
    grid-template-columns: 1fr;
    padding: 24px 20px;
    gap: 20px;
  }
  .d-resume-title, .d-login-copy h2 { font-size: 30px; }
  .d-resume-sub { font-size: 16px; }
  .d-resume-progress { gap: 14px; }
  .d-resume-cta { align-items: flex-start; flex-direction: column; gap: 12px; }
  .d-resume-daisy, .d-login-daisy-row { display: none; }
  .d-btn-brick { width: 100%; justify-content: center; padding: 14px 18px; }
  .d-qr-panel { width: 100%; box-sizing: border-box; }

  .d-lib { padding: 24px 16px 0 !important; }
  .d-section-head { align-items: flex-start; }
  .d-section-head .meta { display: none; }
  .d-map { height: auto !important; min-height: 0; overflow: visible; }
  .d-map-inner { height: auto !important; min-height: 0; overflow: visible !important; }
  .d-map-bg, .d-map-banner { display: none; }
  #stops-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 10px;
    padding: 28px 12px 24px;
  }
  .d-map-inner .d-stop {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    opacity: 1 !important;
    animation: none !important;
  }
  .d-stop-ring { width: 78px; height: 78px; }
  .d-stop-medal .d-emblem-img { width: 54px; height: 54px; }
  .d-stop-flag { display: none; }
  .d-stop-label .sl-th { font-size: 15px; }
  .d-map-scrim { position: fixed; inset: 0; }
  .d-drawer {
    position: fixed !important;
    inset: 0 0 0 auto !important;
    width: min(90vw, 460px) !important;
    padding: 22px 18px !important;
  }

  .d-mp { margin: 22px 16px 26px; grid-template-columns: 1fr; }
  .d-mp-card { padding: 17px 16px; }
  .d-mp-qr { display: none; }
  .legal-footer { margin: 0 16px 22px; font-size: 10px; }
  .modal-box { padding: 30px 20px; width: calc(100% - 24px); }
}
.d-mp-card .tx { flex: 1; }
.d-mp-card .tx .t { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.d-mp-card .tx .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.d-mp-qr { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; color: var(--faint); text-transform: uppercase; display: flex; align-items: center; gap: 6px; }
.d-mp-qr .mini-qr { width: 30px; height: 30px; border-radius: 6px; background:
  repeating-conic-gradient(var(--ink) 0% 25%, transparent 0% 50%); background-size: 7px 7px; opacity: .85; }

/* ══════════════ ② PLAYER CHROME ══════════════ */
.d-player { width: 100%; height: 100%; background: #0c171f; position: relative; overflow: hidden; }

/* teaching canvas (representation — 成品不可改) */
.d-canvas { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background:
  radial-gradient(120% 90% at 50% 0%, #16252f 0%, #0c171f 70%); }
.d-spread {
  width: 90%; max-width: none; aspect-ratio: 16 / 10; background: var(--surface);
  border-radius: 8px; box-shadow: 0 40px 120px rgba(0,0,0,.5); display: grid; grid-template-columns: 1fr 1fr;
  position: relative; overflow: hidden;
}
.d-spread::after { content: ''; position: absolute; left: 50%; top: 5%; bottom: 5%; width: 2px; transform: translateX(-50%);
  background: linear-gradient(var(--border), var(--border-soft), var(--border)); }
.d-page { padding: 38px 40px; position: relative; }
.d-page .pg-kick { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; color: var(--brick); text-transform: uppercase; font-weight: 600; }
.d-page h3 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-top: 8px; color: var(--ink); letter-spacing: -.3px; }
.d-page p { font-size: 15.5px; line-height: 1.9; color: var(--ink-soft); margin-top: 16px; }
.d-page p .hl { background: linear-gradient(transparent 55%, var(--gold-soft) 55%); padding: 0 2px; font-weight: 600; color: var(--ink); }
.d-img-slot { margin-top: 18px; height: 140px; border-radius: 8px; background: var(--surface-alt); border: 1px dashed var(--border); display: flex; align-items: center; justify-content: center; }
.d-img-slot span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--faint); text-transform: uppercase; }
.d-sticky {
  position: absolute; bottom: 30px; right: -14px; width: 168px; background: #FBEFB6;
  padding: 14px 16px; transform: rotate(-3deg); box-shadow: 0 8px 22px rgba(0,0,0,.18);
  font-family: var(--font-display); font-style: italic; font-size: 14px; color: #6a5a2a; line-height: 1.4;
}
.d-canvas-tag { position: absolute; top: 14px; right: 18px; left: auto; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; color: rgba(255,255,255,.32); text-transform: uppercase; z-index: 6; }

/* top · 返回 + 当前节 */
.d-pl-top { position: absolute; top: 22px; left: 26px; right: 26px; display: flex; align-items: center; gap: 16px; z-index: 6; }
.d-pl-return { display: inline-flex; align-items: center; gap: 8px; background: rgba(12,23,31,.5); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14); border-radius: var(--pill); padding: 9px 16px 9px 11px; color: #EDE9DE; cursor: pointer; transition: background .14s; font-size: 13px; font-weight: 600; }
.d-pl-return:hover { background: rgba(12,23,31,.82); }
.d-pl-return svg { width: 16px; height: 16px; }
.d-pl-title { display: flex; flex-direction: column; line-height: 1.18; }
.d-pl-title .k { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 1.8px; color: rgba(237,233,222,.5); text-transform: uppercase; }
.d-pl-title .n { font-family: var(--font-display); font-size: 15px; font-weight: 600; color: #F5F1E8; }

/* subtitle */
.d-subtitle { position: absolute; left: 50%; bottom: 132px; transform: translateX(-50%); z-index: 5; text-align: center; max-width: 720px; width: 80%; }
.d-subtitle .en { font-family: var(--font-display); font-size: 23px; font-weight: 500; color: #FAF7F0; line-height: 1.35; text-shadow: 0 2px 14px rgba(0,0,0,.5); }
.d-subtitle .zh { font-size: 16px; color: #C3C9CC; margin-top: 6px; text-shadow: 0 2px 12px rgba(0,0,0,.6); }

/* ── reel console (control bar) ── */
.d-console {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 7;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 34px;
  padding: 32px 32px 18px;
  background: linear-gradient(transparent, rgba(8,14,19,.62) 38%, rgba(8,14,19,.92));
}
.cz { display: flex; align-items: center; }
.cz-left { gap: 4px; }
.cz-right { gap: 6px; }
.cz-mid { flex-direction: column; align-items: stretch; gap: 9px; }
.cz-div { width: 1px; height: 26px; background: rgba(255,255,255,.14); margin: 0 4px; }

.ct { position: relative; width: 44px; height: 44px; border-radius: 50%; border: none; background: transparent; color: #DCD9CF; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .14s, color .14s; }
.ct:hover { background: rgba(255,255,255,.12); color: #fff; }
.ct svg { width: 20px; height: 20px; }
.ct.play { background: var(--brick); color: #fff; width: 52px; height: 52px; box-shadow: 0 6px 18px rgba(178,58,58,.4); }
.ct.play:hover { background: var(--brick-deep); }
.ct.play svg { width: 24px; height: 24px; }
.ct[data-cap]::after { content: attr(data-cap); position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 6px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .14s; box-shadow: var(--shadow-md); }
.ct[data-cap]:hover::after { opacity: 1; }

.reel-head { display: flex; align-items: baseline; justify-content: space-between; }
.reel-lbl { font-family: var(--font-mono); font-size: 9px; letter-spacing: 2.5px; text-transform: uppercase; color: rgba(220,217,207,.5); }
.reel-count { font-family: var(--font-mono); font-size: 12px; color: rgba(237,233,222,.8); letter-spacing: 1px; }
.reel-count b { color: #fff; font-weight: 600; }
.reel { display: flex; gap: 3px; height: 13px; }
.reel .cell { flex: 1; background: rgba(255,255,255,.16); border-radius: 2px; cursor: pointer; transition: background .12s, transform .12s; }
.reel .cell:hover { background: rgba(255,255,255,.42); transform: scaleY(1.25); }
.reel .cell.on { background: rgba(237,233,222,.72); }
.reel .cell.now { background: var(--brick); box-shadow: 0 0 0 2px rgba(178,58,58,.35); }

/* subtitle segmented */
.d-seg { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 11px; padding: 4px; gap: 3px; }
.d-seg button { border: none; background: transparent; color: rgba(220,217,207,.7); font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 7px 11px; border-radius: 8px; cursor: pointer; transition: background .14s, color .14s; letter-spacing: .5px; }
.d-seg button.on { background: var(--surface); color: var(--ink); }
.d-seg .seg-lbl { font-family: var(--font-mono); font-size: 8px; letter-spacing: 1px; color: rgba(220,217,207,.5); align-self: center; padding: 0 6px 0 4px; text-transform: uppercase; }

/* (lesson steps integrated into console reel) */

/* ── immersive state ── */
.d-immersive .d-pl-top, .d-immersive .d-console { opacity: 0; pointer-events: none; }
.d-imm-bar {
  position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 7;
  display: flex; align-items: center; gap: 4px; background: rgba(18,30,39,.5);
  backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--pill); padding: 7px 9px;
}
.d-imm-bar .ct { width: 40px; height: 40px; }
.d-imm-bar .ct svg { width: 18px; height: 18px; }
.d-imm-bar .ct.play { width: 46px; height: 46px; }
.d-imm-bar .cz-div { width: 1px; height: 22px; background: rgba(255,255,255,.14); margin: 0 5px; }
.d-imm-hint { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 6; font-family: var(--font-mono); font-size: 10px; letter-spacing: 1.5px; color: rgba(255,255,255,.4); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.d-imm-hint .dot { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.4); }

/* ══════════════ ③ POST-LESSON ══════════════ */
.d-post { width: 100%; height: 100%; position: relative; overflow: hidden; }
.d-post-bg { position: absolute; inset: 0; background:
  radial-gradient(72% 55% at 50% 16%, rgba(181,138,63,.16), transparent 62%),
  radial-gradient(120% 92% at 50% 26%, #F7F0E2 0%, #EFE6D4 52%, #E6DBC4 100%); }
.d-post-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 100% at 50% 48%, transparent 58%, rgba(20,35,46,.07)); }
.d-post-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 40px; z-index: 2; }

.d-complete-head { text-align: center; }
.d-seal { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px; background: var(--sage); display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px rgba(47,93,98,.18); animation: sealPop .5s cubic-bezier(.2,.9,.3,1.2) both; }
.d-seal svg { width: 36px; height: 36px; color: #fff; }
@keyframes sealPop { from { transform: scale(.5); opacity: 0; } }
.d-complete-head .kk { font-family: var(--font-mono); font-size: 11px; letter-spacing: 3px; color: var(--brick); text-transform: uppercase; font-weight: 600; }
.d-complete-head h2 { font-family: var(--font-display); font-size: 36px; font-weight: 500; color: var(--ink); margin-top: 10px; letter-spacing: -.4px; }
.d-complete-head h2 .it { font-style: italic; color: var(--brick); }
.d-complete-head .sync { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 1.5px; color: var(--sage); text-transform: uppercase; }
.d-complete-head .sync .pip { width: 6px; height: 6px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 3px rgba(47,93,98,.18); }

.d-post-actions { display: flex; align-items: center; gap: 14px; }

/* ── Summary card A · 藏书票 / bookplate ── */
.d-plate {
  position: relative; width: 460px; background: var(--surface);
  border-radius: 6px; box-shadow: var(--shadow-lg); padding: 0;
  --lt: var(--c-reading);
}
.d-plate-frame { position: absolute; inset: 14px; border: 1.5px solid var(--ink); border-radius: 4px; pointer-events: none; }
.d-plate-frame2 { position: absolute; inset: 20px; border: 1px solid var(--lt); border-radius: 2px; pointer-events: none; opacity: .5; }
.d-plate-in { position: relative; padding: 38px 40px 30px; }
.d-plate-press { text-align: center; }
.d-plate-press .mark { font-family: var(--font-mono); font-size: 9px; letter-spacing: 4px; color: var(--muted); text-transform: uppercase; }
.d-plate-press .press { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 2.5px; color: var(--lt); text-transform: uppercase; font-weight: 700; margin-top: 3px; }
.d-plate-head { text-align: center; margin-top: 16px; }
.d-plate-head . unit { font-family: var(--font-mono); }
.d-plate-head .u { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; }
.d-plate-head .nm { font-family: var(--font-display); font-size: 27px; font-weight: 600; color: var(--ink); margin-top: 5px; letter-spacing: -.3px; }
.d-plate-head .nm .it { font-style: italic; color: var(--lt); }
.d-plate-divider { width: 64px; height: 1.5px; background: var(--lt); margin: 14px auto 0; }

.d-plate-block { margin-top: 20px; }
.d-plate-block .bk-lbl { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.d-plate-block .bk-lbl::before { content: ''; width: 12px; height: 1.5px; background: var(--lt); }
.d-plate-point { font-family: var(--font-display); font-size: 17px; line-height: 1.4; color: var(--ink); margin-top: 8px; font-weight: 500; }
.d-plate-point .hl { color: var(--lt); font-style: italic; }

.d-words { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.d-word { display: flex; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border-soft); }
.d-word:last-child { border-bottom: none; }
.d-word .w { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); }
.d-word .ph { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }
.d-word .zh { margin-left: auto; font-size: 13px; color: var(--ink-soft); }

.d-plate-sum { margin-top: 20px; padding: 16px 18px; background: var(--bg); border-radius: 10px; border-left: 3px solid var(--lt); }
.d-plate-sum .q { font-family: var(--font-display); font-style: italic; font-size: 18px; line-height: 1.4; color: var(--ink); }

.d-plate-foot { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.d-plate-foot .d-avatar { width: 46px; height: 46px; border-color: var(--gold); }
.d-plate-foot .by { flex: 1; }
.d-plate-foot .by .k { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: 2px; color: var(--lt); text-transform: uppercase; font-weight: 600; }
.d-plate-foot .by .nm { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--ink); margin-top: 2px; }
.d-plate-stamp { width: 54px; height: 60px; border: 1.5px dashed var(--lt); border-radius: 4px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--lt); position: relative; }
.d-plate-stamp .st-n { font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.d-plate-stamp .st-l { font-family: var(--font-mono); font-size: 6.5px; letter-spacing: 1px; text-transform: uppercase; margin-top: 1px; }
.d-save-hint { text-align: center; margin-top: 14px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.5px; color: var(--faint); text-transform: uppercase; display: flex; align-items: center; justify-content: center; gap: 7px; }

/* ── Summary card B · 明信片 / postcard ── */
.d-postcard {
  position: relative; width: 760px; background: var(--surface); border-radius: 8px;
  box-shadow: var(--shadow-lg); display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden;
  --lt: var(--c-reading);
}
.d-postcard::after { content: ''; position: absolute; top: 24px; bottom: 24px; left: 58.5%; width: 1px; border-left: 1.5px dashed var(--border); }
.d-pc-left { padding: 30px 30px 26px; }
.d-pc-kick { display: flex; align-items: center; gap: 10px; }
.d-pc-kick .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--lt); }
.d-pc-kick span { font-family: var(--font-mono); font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; font-weight: 600; }
.d-pc-title { font-family: var(--font-display); font-size: 25px; font-weight: 600; margin-top: 12px; letter-spacing: -.3px; }
.d-pc-title .it { font-style: italic; color: var(--lt); }
.d-pc-note { font-family: var(--font-display); font-style: italic; font-size: 16px; line-height: 1.5; color: var(--ink-soft); margin-top: 14px; }
.d-pc-words { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.d-pc-word { background: var(--bg); border: 1px solid var(--border); border-radius: var(--pill); padding: 7px 14px; font-family: var(--font-display); font-weight: 600; font-size: 14px; color: var(--ink); display: inline-flex; align-items: baseline; gap: 7px; }
.d-pc-word .ph { font-family: var(--font-mono); font-size: 10px; font-weight: 400; color: var(--muted); }

.d-pc-right { padding: 26px 28px; display: flex; flex-direction: column; position: relative; }
.d-pc-stamp { align-self: flex-end; width: 78px; height: 92px; border-radius: 5px; background: var(--lt); position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; box-shadow: 0 4px 14px rgba(20,35,46,.18); }
.d-pc-stamp::before { content: ''; position: absolute; inset: -5px; border: 2px dotted var(--surface); border-radius: 8px; -webkit-mask: radial-gradient(circle at center, transparent 0, transparent 0); }
.d-pc-stamp .av { width: 48px; height: 48px; border-radius: 50%; background: var(--brick-soft) url('daisy-idle.png') center/cover; border: 2px solid rgba(255,255,255,.7); }
.d-pc-stamp .ct { font-family: var(--font-mono); font-size: 7px; letter-spacing: 1px; color: rgba(255,255,255,.85); text-transform: uppercase; }
.d-pc-lines { margin-top: auto; }
.d-pc-addr { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; color: var(--faint); text-transform: uppercase; }
.d-pc-sum { font-family: var(--font-display); font-style: italic; font-size: 17px; line-height: 1.4; color: var(--ink); margin-top: 10px; padding-bottom: 4px; border-bottom: 1.5px solid var(--border); }
.d-pc-from { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.d-pc-from .frm { font-family: var(--font-display); font-style: italic; font-size: 14px; color: var(--lt); }
.d-pc-from .frm b { font-weight: 600; font-style: normal; font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase; display: block; color: var(--muted); }
.d-pc-from .pm { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1px; color: var(--faint); text-transform: uppercase; }

/* ── Layout B · split rail ── */
.d-split { display: grid; grid-template-columns: 296px 1fr; gap: 18px; align-items: start; }
.d-rail { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px; box-shadow: var(--shadow-sm); }
.d-rail-item { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 13px; cursor: pointer; transition: background .14s; }
.d-rail-item:hover { background: var(--surface-alt); }
.d-rail-item.active { background: var(--ink); }
.d-rail-item.active .rail-idx { background: var(--brick); color: #fff; border-color: var(--brick); }
.d-rail-item.active .rail-tt .u { color: rgba(237,233,222,.55); }
.d-rail-item.active .rail-tt .nm { color: #FAF7F0; }
.d-rail-item.active .rail-prog { color: var(--bg); }
.d-rail-item .rail-idx { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 16px; background: var(--surface-alt); color: var(--ink); border: 1px solid var(--border); }
.d-rail-item .rail-tt { flex: 1; min-width: 0; }
.d-rail-item .rail-tt .u { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 1.5px; color: var(--muted); text-transform: uppercase; }
.d-rail-item .rail-tt .nm { font-family: var(--font-display); font-size: 18px; font-weight: 500; margin-top: 1px; }
.d-rail-item .rail-prog { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.d-rail-item .rail-prog .of { color: var(--faint); font-size: 11px; }
.d-rail-item .d-lock-ic { width: 16px; }

.d-detail { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 26px 30px 24px; box-shadow: var(--shadow-md); }
.d-detail-head { display: flex; align-items: flex-end; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.d-detail-nm { font-family: var(--font-display); font-size: 30px; font-weight: 600; letter-spacing: -.4px; margin-top: 4px; }
.d-detail-prog { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.d-detail-prog .film { display: flex; gap: 3px; width: 160px; height: 6px; }
.d-detail-prog .film i { flex: 1; background: var(--border-soft); border-radius: 1px; }
.d-detail-prog .film i.on { background: var(--ink); }
.d-detail-prog .film i.now { background: var(--brick); }
.d-detail-prog .d-mono { font-size: 12px; font-weight: 600; }

.d-lrows { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 22px; margin-top: 14px; }
.d-lrow { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 14px 14px 20px; border-radius: 12px; cursor: pointer; transition: background .14s; }
.d-lrow:hover { background: var(--bg); }
.d-lrow .lrow-bar { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--lt); }
.d-lrow .lrow-n { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--faint); width: 22px; }
.d-lrow .lrow-tt { flex: 1; min-width: 0; }
.d-lrow .lrow-tt .t { font-family: var(--font-display); font-size: 17px; font-weight: 600; }
.d-lrow .lrow-tt .s { font-size: 12px; color: var(--muted); margin-top: 1px; }
.d-lrow .lrow-status { flex-shrink: 0; }
.d-lrow .lrow-go { width: 16px; height: 16px; color: var(--faint); flex-shrink: 0; }
.d-lrow.cur { background: var(--brick-soft); }
.d-lrow.cur:hover { background: var(--brick-soft); }
.d-lrow.cur .lrow-go { color: var(--brick); }

/* ── completion layout (two-column overlay) ── */
.d-complete-layout { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 72px; padding: 56px; }
.cl-left { width: 460px; }
.cl-left .d-seal { margin: 0 0 22px; }
.cl-daisy { display: flex; gap: 16px; margin-top: 26px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-sm); }
.cl-daisy .d-avatar { width: 56px; height: 56px; border-color: var(--gold); }
.cl-daisy .q { font-family: var(--font-display); font-style: italic; font-size: 15.5px; line-height: 1.5; color: var(--ink-soft); }
.cl-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cl-next-hint { margin-top: 20px; font-size: 10px; letter-spacing: 2px; color: var(--muted); text-transform: uppercase; font-family: var(--font-mono); }
.cl-right { display: flex; flex-direction: column; align-items: center; }
.d-complete-layout .d-save-hint { color: var(--faint); }

/* ── standalone card stage ── */
.d-card-stage { width: 100%; height: 100%; background:
  radial-gradient(72% 55% at 50% 14%, rgba(181,138,63,.16), transparent 62%),
  radial-gradient(130% 100% at 50% 24%, #F7F0E2 0%, #EFE6D4 52%, #E6DBC4 100%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px; }
.d-card-stage .d-save-hint { color: var(--muted); }

/* ══════════════ ① 升级 · 矩阵学习地图 ATLAS ══════════════ */
.d-atlas { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-md); padding: 24px 30px 28px; }
.d-atlas-bg { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; pointer-events: none; }
.d-atlas-bg::before { content: ''; position: absolute; inset: 0; background:
  radial-gradient(120% 80% at 10% -15%, rgba(178,58,58,.045), transparent 58%),
  radial-gradient(110% 95% at 102% 115%, rgba(47,93,98,.05), transparent 55%); }
.d-atlas-bg::after { content: ''; position: absolute; inset: -45%; background:
  repeating-radial-gradient(circle at 16% 0%, transparent 0 48px, rgba(20,35,46,.02) 48px 49px); }

.d-atlas-cols { position: relative; z-index: 1; display: grid; grid-template-columns: 168px 1fr; align-items: end; padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.d-atlas-corner { display: flex; flex-direction: column; gap: 2px; padding-left: 6px; }
.d-atlas-corner .cc { font-family: var(--font-display); font-style: italic; font-size: 13px; color: var(--muted); }
.d-atlas-headtrack { display: grid; grid-template-columns: repeat(8, 1fr); }
.d-colhead { display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.ch-ic { position: relative; width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--lt);
  background: color-mix(in srgb, var(--lt) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--lt) 24%, var(--border)); }
.ch-ic svg { width: 22px; height: 22px; }
.ch-n { position: absolute; right: -5px; top: -5px; width: 16px; height: 16px; border-radius: 50%; background: var(--lt); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ch-name { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .4px; text-transform: uppercase; color: var(--ink-soft); font-weight: 600; line-height: 1.25; max-width: 100px; }

.d-atlas-rows { position: relative; z-index: 1; }
.d-atlas-row { display: grid; grid-template-columns: 168px 1fr; align-items: center; min-height: 78px; border-radius: 14px; transition: background .14s; }
.d-atlas-row + .d-atlas-row { border-top: 1px dashed var(--border-soft); }
.d-atlas-row:hover { background: color-mix(in srgb, var(--surface-alt) 55%, transparent); }
.d-atlas-row.active { background: var(--brick-soft); box-shadow: inset 3px 0 0 var(--brick); }
.d-atlas-row.active + .d-atlas-row { border-top-color: transparent; }

.d-atlas-spine { display: flex; align-items: center; gap: 11px; padding: 0 14px 0 8px; }
.sp-n { font-family: var(--font-display); font-size: 30px; font-weight: 600; color: var(--ink); line-height: 1; width: 30px; letter-spacing: -1px; }
.d-atlas-row.active .sp-n { color: var(--brick); }
.sp-tx { flex: 1; min-width: 0; }
.sp-u { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; color: var(--faint); text-transform: uppercase; }
.sp-theme { font-family: var(--font-display); font-size: 17px; font-weight: 500; line-height: 1.1; letter-spacing: -.2px; }
.sp-prog { font-family: var(--font-mono); font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.sp-prog .of { color: var(--faint); }
.sp-lock { color: var(--faint); display: flex; } .sp-lock svg { width: 13px; height: 13px; }

.d-atlas-track { position: relative; display: grid; grid-template-columns: repeat(8, 1fr); align-items: center; height: 100%; }
.d-atlas-track::before { content: ''; position: absolute; left: calc(100% / 16); right: calc(100% / 16); top: 50%; height: 2px; transform: translateY(-50%); z-index: 0;
  background: repeating-linear-gradient(90deg, var(--border) 0 5px, transparent 5px 9px); }
.d-atlas-row.active .d-atlas-track::before { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--brick) 40%, var(--border)) 0 5px, transparent 5px 9px); }

.d-cell { position: relative; display: flex; align-items: center; justify-content: center; height: 78px; z-index: 1; }
.cell-dot { position: relative; width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; }
.cell-glyph { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: transform .16s ease, box-shadow .16s ease; background: var(--surface); }
.cell-glyph svg { width: 23px; height: 23px; }
.d-cell:hover { z-index: 21; }
.d-cell:hover .cell-glyph { transform: translateY(-3px) scale(1.07); }

.d-cell.todo .cell-glyph { background: var(--surface); border: 1px solid var(--border); color: var(--faint); }
.d-cell.done .cell-glyph { background: color-mix(in srgb, var(--lt) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--lt) 32%, transparent); color: var(--lt); }
.d-cell.prog .cell-glyph, .d-cell.cur .cell-glyph { background: var(--brick-soft); border: 1px solid var(--brick); color: var(--brick); box-shadow: 0 0 0 3px rgba(178,58,58,.14); }
.d-cell.free .cell-glyph { background: var(--sage-soft); border: 1px solid var(--sage); color: var(--sage); }
.d-cell.locked .cell-glyph { background: transparent; border: 1px dashed var(--border); color: color-mix(in srgb, var(--faint) 65%, transparent); }
.d-cell.locked { opacity: .9; }

.cell-badge { position: absolute; right: -2px; bottom: -2px; width: 17px; height: 17px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.cell-badge svg { width: 10px; height: 10px; }
.cell-badge.done { background: var(--sage); color: #fff; }
.cell-badge.lock { background: var(--surface-alt); color: var(--faint); }
.cell-badge.free { background: var(--sage); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 700; }

.cell-pulse { position: absolute; right: -3px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--brick); animation: cellpulse 1.9s infinite; }
@keyframes cellpulse { 0% { box-shadow: 0 0 0 0 rgba(178,58,58,.5); } 70% { box-shadow: 0 0 0 8px rgba(178,58,58,0); } 100% { box-shadow: 0 0 0 0 rgba(178,58,58,0); } }

.cell-tip { position: absolute; bottom: calc(100% - 6px); left: 50%; transform: translateX(-50%) translateY(4px); background: var(--ink); color: var(--bg); font-size: 11px; font-weight: 500; padding: 5px 10px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .14s, transform .14s; z-index: 30; }
.cell-tip::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--ink); }
.d-cell:hover .cell-tip { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Atlas variants ── */
/* spine bar (B) + medallion (D) */
.sp-bar { width: 5px; height: 36px; border-radius: 3px; flex-shrink: 0; margin-right: -3px; }
.sp-medal { position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--th) 14%, var(--surface)); border: 1.5px dashed color-mix(in srgb, var(--th) 50%, var(--border)); }
.sp-medal .medal-init { font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--th); }
.sp-medal .medal-u { position: absolute; right: -3px; bottom: -3px; width: 16px; height: 16px; border-radius: 50%; background: var(--th); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--surface); }

/* B · 主题色行 — done 单元站点用主题色，路径与单元号染色 */
.d-atlas.var-B .d-cell.done .cell-glyph { background: color-mix(in srgb, var(--th) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--th) 34%, transparent); color: var(--th); }
.d-atlas.var-B .sp-n { color: var(--th); }
.d-atlas.var-B .d-atlas-track::before { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--th) 34%, var(--border)) 0 5px, transparent 5px 9px); }

/* C · 填充大据点 — 实心彩盘 + 白色 icon，站点更大，地图据点感 */
.d-atlas.var-C .d-atlas-row { min-height: 92px; }
.d-atlas.var-C .d-cell { height: 92px; }
.d-atlas.var-C .cell-dot { width: 56px; height: 56px; }
.d-atlas.var-C .cell-glyph { width: 56px; height: 56px; }
.d-atlas.var-C .cell-glyph svg { width: 27px; height: 27px; }
.d-atlas.var-C .d-cell.done .cell-glyph { background: var(--lt); border: none; color: #fff; box-shadow: 0 5px 14px color-mix(in srgb, var(--lt) 34%, transparent); }
.d-atlas.var-C .d-cell.todo .cell-glyph { background: var(--surface); border: 1.5px solid var(--border); color: var(--faint); }
.d-atlas.var-C .cell-badge { width: 18px; height: 18px; right: -1px; bottom: -1px; }
.d-atlas.var-C .d-cell.prog .cell-glyph, .d-atlas.var-C .d-cell.cur .cell-glyph { box-shadow: 0 0 0 4px rgba(178,58,58,.16); }
.d-atlas.var-C .cell-pulse { width: 11px; height: 11px; }

/* D · 主题徽章 — 单元用主题色徽章（插画位），站点保持中性留白 */
.d-atlas.var-D .d-atlas-track::before { background: repeating-linear-gradient(90deg, color-mix(in srgb, var(--th) 26%, var(--border)) 0 5px, transparent 5px 9px); }

/* compare card head */
.d-atlas-compare { padding: 26px 30px 20px; background: var(--bg); }
.d-compare-head { display: flex; align-items: baseline; gap: 14px; padding: 0 18px 18px; }
.d-compare-head .ct { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -.3px; }
.d-compare-head .cn { font-family: var(--font-body); font-size: 13.5px; color: var(--muted); }

/* ══════════════ ① 重做 · 学习地图 THE JOURNEY ══════════════ */
.d-map {
  position: relative; height: 720px; border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  background:
    linear-gradient(180deg, rgba(63,107,140,.10) 0%, rgba(63,107,140,0) 26%),
    linear-gradient(0deg, rgba(94,112,72,.16) 0%, rgba(94,112,72,0) 30%),
    radial-gradient(120% 86% at 50% 6%, #FCF8EE 0%, #F6F1E2 50%, #F1ECDA 100%);
}
/* topographic / endpaper texture — warm sage + gold contours (no grey) */
.d-map::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .65;
  background:
    repeating-radial-gradient(circle at 20% 116%, transparent 0 44px, rgba(94,112,72,.07) 44px 45px, transparent 45px 90px),
    repeating-radial-gradient(circle at 86% -16%, transparent 0 38px, rgba(181,138,63,.06) 38px 39px, transparent 39px 78px);
}
.d-map::after { /* warm paper grain */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .45;
  background-image: radial-gradient(rgba(120,90,50,.05) 1px, transparent 1px);
  background-size: 22px 22px;
}
.d-map-bg { position: absolute; inset: 0; pointer-events: none; }
.d-map-trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.d-map-trail .trail-line {
  stroke: #C7A55E; stroke-width: 3.2; stroke-dasharray: 1 13; stroke-linecap: round; fill: none;
}
/* lit route — the traveled path, drawn up to the current unit */
.d-map-trail .trail-lit {
  stroke: var(--brick); stroke-width: 4.5; stroke-linecap: round; fill: none;
  stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--lit, 0));
  filter: drop-shadow(0 1px 4px rgba(178,58,58,.35));
}
@media (prefers-reduced-motion: no-preference) {
  .d-map-trail .trail-lit { stroke-dashoffset: 100; animation: trailDraw 1.9s .35s cubic-bezier(.45,0,.15,1) forwards; }
  @keyframes trailDraw { to { stroke-dashoffset: calc(100 - var(--lit, 0)); } }
}

/* decorative storybook motifs (subtle, sparse) */
.d-motif { position: absolute; color: var(--ink); opacity: .12; }
.m-hills  { width: 200px; bottom: 30px; left: 28%; opacity: .1; color: var(--sage); }
.m-tree   { width: 38px; top: 96px; left: 22.5%; opacity: .16; color: var(--sage); }
.m-cloud  { width: 100px; top: 54px; left: 47%; opacity: .13; color: var(--sage); }
.m-waves  { width: 130px; bottom: 96px; left: 47%; opacity: .12; color: #3F6B8C; }
.d-compass { position: absolute; width: 76px; right: 28px; bottom: 24px; color: var(--ink); opacity: .26; }
.d-compass-n { position: absolute; right: 60px; bottom: 92px; font-size: 9px; letter-spacing: 1px; color: var(--ink); opacity: .4; }

.d-map-banner {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 3px; text-transform: uppercase; color: var(--muted);
}
.d-map-banner .bn-l, .d-map-banner .bn-r { width: 40px; height: 1px; background: var(--border); }

/* ── stop (destination medallion) ── */
.d-stop { position: absolute; transform: translate(-50%, -50%); z-index: 4; display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (prefers-reduced-motion: no-preference) {
  .d-stop { opacity: 0; animation: stopIn .52s cubic-bezier(.2,.8,.3,1.25) forwards; animation-delay: calc(var(--i, 0) * .13s + .25s); }
  @keyframes stopIn { from { opacity: 0; transform: translate(-50%, -50%) scale(.55); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
}
.d-stop-ring {
  --p: 0; width: 104px; height: 104px; border-radius: 50%; padding: 5px;
  background: conic-gradient(var(--th) calc(var(--p) * 1%), rgba(20,35,46,.1) 0);
  display: flex; align-items: center; justify-content: center; transition: transform .18s ease;
}
.d-stop-medal {
  position: relative; width: 100%; height: 100%; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm), inset 0 0 0 1.5px color-mix(in srgb, var(--th) 18%, transparent);
  cursor: pointer; transition: box-shadow .18s ease;
}
.d-stop-clip { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; pointer-events: none; }
.d-stop-hill { position: absolute; left: -28%; right: -28%; bottom: -14%; height: 58%; border-radius: 50% 50% 0 0; background: color-mix(in srgb, var(--th) 17%, transparent); }
.d-stop-medal svg { position: relative; z-index: 1; width: 66px; height: 66px; color: var(--th); transform: translateY(-2px); }
.d-stop-medal .d-emblem-img { position: relative; z-index: 1; width: 72px; height: 72px; transform: translateY(-1px); }
.d-stop:hover .d-stop-ring { transform: scale(1.05); }
.d-stop:hover .d-stop-medal { box-shadow: var(--shadow-md); }

/* status fills */
.d-stop.done .d-stop-medal { background: color-mix(in srgb, var(--th) 12%, var(--surface)); border-color: color-mix(in srgb, var(--th) 30%, transparent); }
.d-stop.open .d-stop-ring { background: rgba(20,35,46,.12); }
.d-stop.current .d-stop-ring { box-shadow: 0 0 0 6px color-mix(in srgb, var(--th) 16%, transparent); animation: stopPulse 2.4s ease-in-out infinite; }
.d-stop.current .d-stop-medal { background: var(--surface); border-color: var(--th); border-width: 1.5px; }
@keyframes stopPulse { 0%,100% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--th) 16%, transparent); } 50% { box-shadow: 0 0 0 11px color-mix(in srgb, var(--th) 5%, transparent); } }
.d-stop.locked .d-stop-ring { background: rgba(20,35,46,.07); }
.d-stop.locked .d-stop-medal { background: var(--surface-alt); border-style: dashed; box-shadow: none; }
.d-stop.locked .d-stop-hill { display: none; }
.d-stop.locked .d-stop-medal svg { color: var(--faint); opacity: .55; }
.d-stop.free .d-stop-ring { background: var(--sage); }
.d-stop.free .d-stop-medal { border-color: var(--sage); }

.d-stop-mark { position: absolute; right: 2px; bottom: 2px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 3px solid var(--surface); }
.d-stop-mark svg { width: 13px !important; height: 13px !important; color: #fff !important; }
.d-stop-mark.done { background: var(--th); }
.d-stop-mark.lock { background: var(--surface-alt); }
.d-stop-mark.lock svg { color: var(--faint) !important; }
.d-stop-mark.free { width: auto; height: auto; right: -6px; bottom: -4px; padding: 3px 8px; border-radius: var(--pill); background: var(--sage); color: #fff; font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .5px; }

.d-stop-label { display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; }
.d-stop-label .sl-u { font-family: var(--font-mono); font-size: 9px; letter-spacing: 1.5px; color: var(--faint); text-transform: uppercase; }
.d-stop-label .sl-th { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.05; letter-spacing: -.2px; }
.d-stop.locked .sl-th { color: var(--muted); }
.d-stop-label .sl-prog { font-size: 11px; font-weight: 600; color: var(--th); margin-top: 2px; }
.d-stop.locked .sl-prog, .d-stop.open .sl-prog { color: var(--muted); }

/* current flag (Daisy planted) */
.d-stop-flag { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; background: var(--ink); color: var(--bg); padding: 5px 12px 5px 6px; border-radius: var(--pill); white-space: nowrap; box-shadow: var(--shadow-md); }
.d-stop-flag::after { content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%); border: 6px solid transparent; border-top-color: var(--ink); }
.d-stop-flag .flag-av { width: 24px; height: 24px; border-radius: 50%; background: var(--brick-soft) url('daisy-idle.png') center/cover; border: 1.5px solid var(--gold); }
.d-stop-flag .flag-tx { font-size: 11px; font-weight: 600; letter-spacing: .3px; }
@keyframes flagFloat { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-4px); } }

/* ── unit drawer ── */
.d-map-scrim { position: absolute; inset: 0; z-index: 8; background: rgba(20,35,46,.32); backdrop-filter: blur(2px); opacity: 1; }
.d-drawer {
  position: absolute; top: 0; right: 0; bottom: 0; width: 460px; z-index: 9;
  background: var(--surface); box-shadow: -24px 0 60px rgba(20,35,46,.18);
  display: flex; flex-direction: column; padding: 26px 28px;
}
.d-drawer-top { display: flex; align-items: center; gap: 14px; }
.dr-emblem { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--th) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--th) 28%, transparent); flex-shrink: 0; }
.dr-emblem svg { width: 28px; height: 28px; color: var(--th); }
.dr-emblem .d-emblem-img { width: 40px; height: 40px; }
.dr-tt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dr-tt .dr-u { color: var(--th); }
.dr-tt .dr-th { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -.4px; line-height: 1; }
.dr-close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: background .14s; }
.dr-close:hover { background: var(--surface-alt); }
.dr-close svg { width: 16px; height: 16px; }
.dr-meta { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.dr-ct { font-size: 13px; font-weight: 600; } .dr-ct .of { color: var(--faint); }
.dr-film { display: flex; gap: 3px; flex: 1; height: 6px; }
.dr-film i { flex: 1; background: var(--border-soft); border-radius: 1px; }
.dr-film i.on { background: var(--th); } .dr-film i.now { background: var(--brick); }

.dr-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; overflow: auto; }
.dr-lesson { position: relative; display: flex; align-items: center; gap: 14px; padding: 13px 12px; border-radius: 12px; cursor: pointer; transition: background .14s; }
.dr-lesson:hover { background: var(--bg); }
.dr-lesson .dl-ic { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: var(--bg); border: 1px solid var(--border); color: var(--muted); flex-shrink: 0; }
.dr-lesson .dl-ic svg { width: 22px; height: 22px; }
.dr-lesson.done .dl-ic { background: color-mix(in srgb, var(--th) 12%, var(--surface)); border-color: color-mix(in srgb, var(--th) 26%, transparent); color: var(--th); }
.dr-lesson.prog .dl-ic, .dr-lesson.cur .dl-ic { background: var(--brick-soft); border-color: var(--brick); color: var(--brick); }
.dr-lesson .dl-tx { flex: 1; min-width: 0; }
.dr-lesson .dl-tx .t { display: block; font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.dr-lesson .dl-tx .s { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
.dr-lesson .dl-status { flex-shrink: 0; }
.dr-lesson .dl-go { position: absolute; right: 12px; bottom: 9px; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .5px; color: var(--brick); font-weight: 600; }
.dr-lesson.cur { background: var(--brick-soft); }
.dr-lesson.cur:hover { background: var(--brick-soft); }

/* focus-overlay scroll helper: let tall artboards scroll inside focus */
