:root {
  --paper: #f2ecdf;
  --paper-light: #fbf7ef;
  --paper-deep: #e7decd;
  --ink: #20251f;
  --ink-soft: #4e544c;
  --muted: #6b655c;
  --red: #b14732;
  --red-dark: #8f3627;
  --jade: #53665a;
  --line: rgba(35, 40, 34, 0.12);
  --line-strong: rgba(35, 40, 34, 0.22);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --display: "Kaiti SC", "STKaiti", "KaiTi", "Songti SC", serif;
  --shadow-paper: 0 24px 80px rgba(35, 40, 34, 0.12);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 92% 6%, rgba(177, 71, 50, 0.08), transparent 25%),
    radial-gradient(circle at 5% 55%, rgba(93, 113, 100, 0.06), transparent 26%),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button, input, a { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
svg { display: block; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
::selection { color: var(--paper-light); background: var(--red); }
:focus-visible { outline: 3px solid rgba(177, 71, 50, 0.58); outline-offset: 4px; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(32, 37, 31, 0.22); border: 3px solid var(--paper); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("./assets/paper-noise.svg");
}

.brand { display: inline-flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand-button { padding: 0; background: transparent; text-align: left; }
.brand-seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 48px;
  border: 1px solid rgba(255, 248, 236, 0.62);
  border-radius: 5px;
  color: var(--paper-light);
  background: var(--red);
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
}
.brand-name { display: flex; flex-direction: column; gap: 1px; font-family: var(--serif); font-size: 20px; letter-spacing: 0.11em; white-space: nowrap; }
.brand-name small { color: var(--muted); font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }

.entry-gate { min-height: 100vh; padding: 0 32px 44px; }
.entry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1340px, 100%);
  min-height: 92px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.entry-version { color: var(--muted); font-size: 13px; letter-spacing: 0.06em; white-space: nowrap; }
.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: clamp(50px, 9vw, 132px);
  align-items: center;
  width: min(1240px, 100%);
  min-height: calc(100vh - 136px);
  margin: 0 auto;
  padding: 52px 0 24px;
}
.entry-intro { position: relative; min-height: 670px; padding: 38px 0 20px; }
.entry-stamp { margin: 0 0 20px; color: var(--red); font-size: 14px; font-weight: 700; letter-spacing: 0.35em; }
.entry-intro h1 {
  position: relative;
  z-index: 2;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(64px, 7vw, 104px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.035em;
}
.entry-intro h1 em { color: var(--red); font-family: var(--display); font-style: normal; font-weight: 500; }
.entry-lead { position: relative; z-index: 3; max-width: 560px; margin: 30px 0 0; color: var(--ink-soft); font-size: 17px; line-height: 1.9; }
.entry-proof { position: relative; z-index: 3; display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 33px; color: var(--muted); font-size: 13px; }
.entry-proof span { padding-bottom: 5px; border-bottom: 1px solid var(--line-strong); }
.entry-proof strong { margin-right: 4px; color: var(--ink); font-family: var(--serif); font-size: 22px; font-weight: 500; }
.entry-art { position: absolute; z-index: 1; right: 0; bottom: -4px; width: min(460px, 78%); height: 400px; pointer-events: none; }
.entry-art::before { content: ""; position: absolute; inset: 42px 26px 26px 62px; border: 1px solid rgba(32, 37, 31, 0.16); background: rgba(251, 247, 239, 0.58); transform: rotate(2deg); }
.entry-art img { position: absolute; right: 94px; bottom: 18px; width: 255px; height: 255px; object-fit: contain; opacity: 0.88; }
.entry-art-line { position: absolute; top: 58px; left: 13px; color: var(--ink-soft); font-family: var(--display); font-size: 25px; letter-spacing: 0.18em; writing-mode: vertical-rl; }
.entry-art-seal { position: absolute; right: 61px; bottom: 39px; display: grid; place-items: center; width: 42px; height: 42px; color: var(--paper-light); background: var(--red); font-family: var(--display); font-size: 24px; transform: rotate(-4deg); }
.entry-art-note { position: absolute; left: 14px; bottom: 45px; max-width: 145px; color: var(--muted); font-family: var(--display); font-size: 14px; line-height: 1.7; }

.entry-sheet {
  position: relative;
  padding: 30px 34px 32px;
  border: 1px solid var(--line-strong);
  background: rgba(251, 247, 239, 0.86);
  box-shadow: 0 25px 70px rgba(35, 40, 34, 0.1);
}
.entry-sheet::after { content: ""; position: absolute; top: 10px; right: 10px; bottom: -10px; left: -10px; z-index: -1; border: 1px solid rgba(35, 40, 34, 0.08); }
.entry-sheet-head { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; letter-spacing: 0.12em; }
.entry-sheet h2 { margin: 16px 0 7px; font-family: var(--serif); font-size: 34px; font-weight: 500; }
.entry-sheet-desc { margin: 0 0 24px; color: var(--muted); font-size: 14px; }
.role-options { display: grid; gap: 12px; }
.role-option {
  display: grid;
  grid-template-columns: 52px 1fr 24px;
  gap: 14px;
  align-items: center;
  width: 100%;
  padding: 17px 16px;
  border: 1px solid var(--line);
  background: rgba(242, 236, 223, 0.62);
  text-align: left;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
}
.role-option:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.role-option[aria-pressed="true"] { border-color: var(--red); background: rgba(177, 71, 50, 0.055); }
.role-char { display: grid; place-items: center; width: 48px; height: 48px; color: var(--paper-light); background: var(--ink); font-family: var(--display); font-size: 28px; }
.role-option[aria-pressed="true"] .role-char { background: var(--red); }
.role-copy { display: flex; flex-direction: column; gap: 2px; }
.role-copy strong { font-size: 17px; }
.role-copy small { color: var(--muted); font-size: 13px; }
.role-check { width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 50%; }
.role-option[aria-pressed="true"] .role-check { border: 5px solid var(--red); }
.teacher-code-panel { margin-top: 16px; padding: 15px 16px; border: 1px solid rgba(177, 71, 50, 0.22); background: rgba(177, 71, 50, 0.045); }
.teacher-code-panel label { display: block; margin-bottom: 6px; color: var(--red-dark); font-size: 13px; font-weight: 700; }
.teacher-code-panel input { width: 100%; min-height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 0; color: var(--ink); background: var(--paper-light); font-size: 16px; letter-spacing: 0.08em; }
.teacher-code-panel p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.mode-block { margin-top: 24px; }
.mode-heading { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; font-size: 14px; }
.mode-heading span { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.mode-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mode-options button { display: flex; flex-direction: column; gap: 2px; min-height: 62px; padding: 11px 14px; border: 1px solid var(--line); background: transparent; text-align: left; }
.mode-options button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--paper-light); }
.mode-options strong { font-size: 15px; }
.mode-options small { color: var(--muted); font-size: 12px; }
.mode-options button[aria-pressed="true"] small { color: rgba(251, 247, 239, 0.64); }
.entry-confirm { width: 100%; min-height: 56px; margin-top: 22px; color: var(--paper-light); background: var(--ink); font-size: 16px; font-weight: 600; letter-spacing: 0.08em; transition: background 180ms ease, transform 180ms ease; }
.entry-confirm:not(:disabled):hover { background: var(--red); transform: translateY(-1px); }
.entry-confirm:disabled { cursor: not-allowed; opacity: 0.42; }
.entry-footnote { margin: 11px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

.app-shell { min-height: 100vh; padding-bottom: 0; }
.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 30px;
  align-items: center;
  min-height: 86px;
  padding: 0 max(28px, calc((100vw - 1320px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(242, 236, 223, 0.9);
  backdrop-filter: blur(18px) saturate(1.15);
}
.desk-nav { display: flex; justify-content: center; gap: 6px; }
.desk-nav button { position: relative; min-height: 42px; padding: 0 18px; color: var(--ink-soft); background: transparent; font-size: 14px; font-weight: 600; }
.desk-nav button::after { content: ""; position: absolute; right: 18px; bottom: 4px; left: 18px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease; }
.desk-nav button:hover, .desk-nav button.is-active { color: var(--ink); }
.desk-nav button.is-active::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 13px; }
.role-badge { padding: 6px 10px; color: var(--red-dark); background: rgba(177, 71, 50, 0.08); font-size: 12px; font-weight: 600; }
.account-button { display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 12px; border: 1px solid var(--line); background: transparent; font-size: 13px; }
.account-button svg { width: 19px; height: 19px; }

.app-main { width: min(1320px, calc(100% - 56px)); margin: 0 auto; padding: 38px 0 130px; }
.app-view { animation: view-in 380ms cubic-bezier(.22, 1, .36, 1) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view-kicker { margin: 0 0 10px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.12em; }
.view-heading { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.55fr); gap: 50px; align-items: end; margin: 24px 0 52px; }
.view-heading h1, .library-hero h1, .course-hero h1 { margin: 0; font-family: var(--serif); font-size: clamp(48px, 5.4vw, 78px); font-weight: 500; line-height: 1.12; letter-spacing: -0.035em; }
.view-heading > p, .view-heading-side > p { max-width: 510px; margin: 0 0 7px; color: var(--ink-soft); font-size: 17px; line-height: 1.9; }

.library-hero { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(370px, 0.68fr); gap: clamp(40px, 7vw, 100px); align-items: center; min-height: 570px; padding: 22px 0 60px; }
.library-hero-copy { padding-top: 20px; }
.library-hero-copy > p:not(.view-kicker) { max-width: 630px; margin: 26px 0 0; color: var(--ink-soft); font-size: 18px; line-height: 1.9; }
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 34px; }
.quick-actions button { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; min-height: 82px; padding: 14px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); background: rgba(251, 247, 239, 0.38); text-align: left; transition: background 160ms ease, transform 160ms ease; }
.quick-actions button:hover { background: rgba(251, 247, 239, 0.85); transform: translateY(-2px); }
.quick-actions button > span { grid-row: 1 / 3; display: grid; place-items: center; width: 38px; height: 38px; color: var(--paper-light); background: var(--ink); font-family: var(--display); font-size: 22px; }
.quick-actions strong { font-size: 15px; }
.quick-actions small { color: var(--muted); font-size: 12px; }
.library-hero-art { position: relative; min-height: 480px; }
.library-hero-art::before { content: ""; position: absolute; top: 50px; right: 36px; width: min(330px, 78%); height: 370px; border: 1px solid var(--line); background: rgba(251, 247, 239, 0.54); transform: rotate(2.4deg); }
.vertical-note { position: absolute; top: 30px; left: 18px; z-index: 2; color: var(--ink-soft); font-family: var(--display); font-size: 23px; letter-spacing: 0.04em; writing-mode: vertical-rl; }
.hero-paper { position: absolute; top: 86px; right: 66px; z-index: 1; display: flex; align-items: center; justify-content: center; width: min(295px, 70%); height: 300px; }
.hero-paper img { width: 250px; height: 250px; object-fit: contain; }
.hero-paper-label { position: absolute; right: 0; bottom: 0; color: var(--muted); font-size: 12px; letter-spacing: 0.14em; }
.hero-paper-seal { position: absolute; right: 17px; top: 7px; display: grid; place-items: center; width: 38px; height: 38px; color: var(--paper-light); background: var(--red); font-family: var(--display); font-size: 15px; writing-mode: vertical-rl; }
.hero-paper-note { position: absolute; right: 7px; bottom: 29px; color: var(--muted); font-family: var(--display); font-size: 14px; line-height: 1.8; text-align: right; }

.library-workbench { padding-top: 25px; border-top: 1px solid var(--line-strong); }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.search-box { display: flex; align-items: center; gap: 10px; width: min(460px, 100%); min-height: 50px; padding: 0 15px; border: 1px solid var(--line); background: rgba(251, 247, 239, 0.62); }
.search-box svg { width: 20px; height: 20px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 15px; }
.search-box input::placeholder { color: var(--muted); }
.library-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.category-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 1px 0 15px; scrollbar-width: none; }
.category-tabs::-webkit-scrollbar { display: none; }
.category-tabs button { flex: 0 0 auto; display: flex; align-items: baseline; gap: 8px; min-height: 42px; padding: 0 14px; border: 1px solid var(--line); background: transparent; white-space: nowrap; }
.category-tabs button strong { font-size: 14px; font-weight: 600; }
.category-tabs button small { color: var(--muted); font-family: var(--serif); font-size: 12px; }
.category-tabs button.is-active { color: var(--paper-light); border-color: var(--ink); background: var(--ink); }
.category-tabs button.is-active small { color: rgba(251, 247, 239, 0.62); }
.glyph-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.glyph-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; min-height: 156px; padding: 14px 8px 11px; border: 1px solid var(--line); background: rgba(251, 247, 239, 0.58); transition: border-color 160ms ease, transform 160ms cubic-bezier(.22,1,.36,1), background 160ms ease; }
.glyph-tile:hover { z-index: 1; border-color: rgba(177, 71, 50, 0.56); background: var(--paper-light); transform: translateY(-3px); }
.glyph-tile[aria-pressed="true"] { border-color: var(--red); background: rgba(177, 71, 50, 0.055); }
.glyph-tile[aria-pressed="true"]::after { content: "选"; position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 22px; height: 22px; color: var(--paper-light); background: var(--red); font-family: var(--display); font-size: 12px; animation: seal-stamp 240ms cubic-bezier(.22,1,.36,1) both; }
@keyframes seal-stamp { from { opacity: 0; transform: scale(1.5) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
.glyph-tile img { width: 86px; height: 86px; object-fit: contain; }
.glyph-tile[data-style="stroke"] img, .glyph-tile[data-style="radical"] img { width: 96px; height: 84px; }
.glyph-name { display: block; max-width: 100%; margin-top: 4px; overflow: hidden; color: var(--ink-soft); font-family: var(--display); font-size: 18px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.glyph-index { position: absolute; top: 8px; left: 9px; color: rgba(32, 37, 31, 0.52); font-size: 12px; letter-spacing: 0.03em; }
.empty-state { padding: 82px 20px; text-align: center; }
.empty-state > span { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 18px; border: 1px solid var(--line-strong); font-family: var(--display); font-size: 34px; }
.empty-state strong { display: block; font-family: var(--serif); font-size: 27px; font-weight: 500; }
.empty-state p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.selection-dock { position: fixed; right: 24px; bottom: calc(22px + var(--safe-bottom)); left: 24px; z-index: 75; display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; width: min(860px, calc(100% - 48px)); margin: 0 auto; padding: 12px 14px 12px 19px; color: var(--paper-light); background: rgba(32, 37, 31, 0.96); box-shadow: 0 18px 55px rgba(15, 18, 15, 0.28); backdrop-filter: blur(12px); }
.selection-summary { display: flex; align-items: center; gap: 18px; min-width: 0; }
.selection-summary > span { flex: 0 0 auto; color: rgba(251, 247, 239, 0.68); font-size: 12px; letter-spacing: 0.08em; }
.selection-summary > div { display: flex; gap: 7px; min-width: 0; overflow: hidden; }
.selection-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; max-width: 100px; padding: 4px 8px; border: 1px solid rgba(251, 247, 239, 0.18); color: var(--paper-light); font-family: var(--display); font-size: 17px; }
.clear-selection { min-height: 42px; padding: 0 12px; color: rgba(251, 247, 239, 0.6); background: transparent; font-size: 12px; }
.make-copybook { min-height: 48px; padding: 0 20px; color: var(--ink); background: var(--paper-light); font-size: 14px; font-weight: 700; }
.make-copybook:hover { background: #fffaf1; }
.bottom-nav { display: none; }

.review-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(420px, 1.1fr); gap: clamp(36px, 7vw, 90px); align-items: start; }
.upload-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 420px; padding: 40px; border: 1px dashed rgba(32, 37, 31, 0.36); background: rgba(251, 247, 239, 0.52); text-align: center; cursor: pointer; transition: border-color 170ms ease, background 170ms ease; }
.upload-panel:hover { border-color: var(--red); background: rgba(251, 247, 239, 0.9); }
.upload-panel input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.upload-mark, .upload-action { display: inline-grid; place-items: center; }
.upload-mark { width: 72px; height: 72px; margin-bottom: 23px; color: var(--paper-light); background: var(--ink); font-family: var(--display); font-size: 24px; }
.upload-panel strong { font-family: var(--serif); font-size: 28px; font-weight: 500; }
.upload-panel small { max-width: 390px; margin-top: 9px; color: var(--muted); font-size: 14px; }
.upload-action { min-height: 45px; margin-top: 24px; padding: 0 19px; color: var(--paper-light); background: var(--red); font-size: 14px; }
.upload-preview { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); min-height: 420px; border: 1px solid var(--line); background: rgba(251, 247, 239, 0.64); }
.upload-preview-image { display: grid; place-items: center; padding: 18px; background: var(--paper-deep); }
.upload-preview-image img { width: 100%; height: 380px; object-fit: contain; }
.upload-preview-copy { display: flex; flex-direction: column; justify-content: center; padding: 30px; }
.upload-preview-copy strong { font-family: var(--serif); font-size: 25px; font-weight: 500; overflow-wrap: anywhere; }
.upload-preview-copy small { margin-top: 9px; color: var(--muted); font-size: 14px; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 25px; }
.review-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.review-steps li { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 23px 0; border-bottom: 1px solid var(--line); }
.review-steps li:first-child { padding-top: 7px; }
.review-steps li > span { display: grid; place-items: center; width: 44px; height: 44px; color: var(--red); border: 1px solid rgba(177, 71, 50, 0.28); font-family: var(--display); font-size: 20px; }
.review-steps strong { font-size: 18px; }
.review-steps p { margin: 5px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.member-strip { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: 62px; padding: 26px 30px; color: var(--paper-light); background: var(--ink); }
.member-strip > div { display: flex; align-items: center; gap: 22px; }
.member-strip > div > span { color: #dfbd7c; font-family: var(--serif); font-size: 58px; line-height: 1; }
.member-strip p { display: flex; flex-direction: column; margin: 0; }
.member-strip strong { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.member-strip small { color: rgba(251, 247, 239, 0.74); font-size: 13px; }
.member-strip button { flex: 0 0 auto; min-height: 45px; padding: 0 17px; color: var(--ink); background: var(--paper-light); font-size: 13px; }

.course-hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.2fr) 300px; gap: 60px; align-items: center; min-height: 480px; padding: 54px 56px; color: var(--paper-light); background: var(--ink); overflow: hidden; }
.course-hero::after { content: "课"; position: absolute; right: 28px; bottom: -96px; color: rgba(251, 247, 239, 0.035); font-family: var(--display); font-size: 450px; line-height: 1; pointer-events: none; }
.course-hero > div:first-child { position: relative; z-index: 2; }
.course-hero .view-kicker { color: #d5ae71; }
.course-hero h1 { max-width: 800px; font-size: clamp(47px, 5vw, 74px); }
.course-hero h1 em { color: #d7b778; font-family: var(--display); font-style: normal; font-weight: 500; }
.course-hero p:not(.view-kicker) { max-width: 660px; margin: 24px 0 28px; color: rgba(251, 247, 239, 0.76); font-size: 16px; line-height: 1.85; }
.course-seal { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; width: 230px; height: 230px; padding: 24px; margin-left: auto; border: 1px solid rgba(251, 247, 239, 0.28); }
.course-seal > span { color: #d7b778; font-family: var(--display); font-size: 118px; line-height: 1; }
.course-seal small { margin-top: 12px; color: rgba(251, 247, 239, 0.74); font-size: 12px; letter-spacing: 0.1em; text-align: center; }
.ink-button, .outline-button, .text-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 19px; font-size: 14px; font-weight: 600; }
.ink-button { color: var(--paper-light); background: var(--ink); }
.ink-button:hover { background: var(--red); }
.light-button { color: var(--ink); background: var(--paper-light); }
.light-button:hover { color: var(--paper-light); background: var(--red); }
.outline-button { border: 1px solid var(--line-strong); background: transparent; }
.text-button { min-height: 42px; padding: 0; color: var(--red-dark); background: transparent; }
.section-line { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin: 58px 0 20px; }
.section-line h2 { margin: 0; font-family: var(--serif); font-size: 36px; font-weight: 500; }
.section-line p { margin: 0; color: var(--muted); font-size: 14px; }
.course-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.course-card { position: relative; min-height: 300px; padding: 25px 24px; border: 1px solid var(--line); background: rgba(251, 247, 239, 0.62); overflow: hidden; }
.course-card::after { content: attr(data-mark); position: absolute; right: 12px; bottom: -44px; color: rgba(32, 37, 31, 0.05); font-family: var(--display); font-size: 190px; line-height: 1; }
.course-card-head { display: flex; justify-content: space-between; gap: 15px; color: var(--muted); font-size: 12px; letter-spacing: 0.05em; }
.course-card h3 { position: relative; z-index: 1; margin: 35px 0 8px; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.course-card p { position: relative; z-index: 1; margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.course-card-foot { position: absolute; right: 24px; bottom: 22px; left: 24px; z-index: 2; display: flex; align-items: center; justify-content: space-between; padding-top: 17px; border-top: 1px solid var(--line); }
.course-card-foot strong { color: var(--red-dark); font-family: var(--serif); font-size: 23px; font-weight: 500; }
.course-card-foot button { padding: 0; color: var(--ink-soft); background: transparent; font-size: 13px; }
.demo-lesson { display: grid; grid-template-columns: 180px 1fr 52px; gap: 28px; align-items: center; width: 100%; margin-top: 18px; padding: 18px 25px 18px 18px; border: 1px solid var(--line); background: rgba(251, 247, 239, 0.72); text-align: left; }
.demo-lesson:hover { border-color: var(--line-strong); background: var(--paper-light); }
.demo-lesson-art { position: relative; display: grid; place-items: center; height: 145px; background: var(--paper-deep); }
.demo-lesson-art img { width: 120px; height: 120px; object-fit: contain; }
.play-mark { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid rgba(251, 247, 239, 0.45); border-radius: 50%; background: rgba(32, 37, 31, 0.82); }
.play-mark svg { width: 18px; height: 18px; color: var(--paper-light); }
.demo-lesson-copy { display: flex; flex-direction: column; gap: 5px; }
.demo-lesson-copy small { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; }
.demo-lesson-copy strong { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.demo-lesson-copy > span { color: var(--muted); font-size: 14px; }
.demo-lesson-arrow { color: var(--red); font-size: 28px; }

.shop-heading-side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.cart-button { display: inline-flex; align-items: center; gap: 10px; min-height: 45px; padding: 0 15px; border: 1px solid var(--line-strong); background: transparent; font-size: 14px; }
.cart-button strong { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; color: var(--paper-light); background: var(--red); border-radius: 999px; font-size: 12px; }
.shop-filters { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 22px; padding-bottom: 8px; scrollbar-width: none; }
.shop-filters::-webkit-scrollbar { display: none; }
.shop-filters button { flex: 0 0 auto; min-height: 40px; padding: 0 15px; border: 1px solid var(--line); background: transparent; font-size: 13px; }
.shop-filters button.is-active { color: var(--paper-light); border-color: var(--ink); background: var(--ink); }
.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.product-card { display: flex; flex-direction: column; min-height: 390px; border: 1px solid var(--line); background: rgba(251, 247, 239, 0.64); }
.product-art { position: relative; display: grid; place-items: center; height: 210px; background: var(--paper-deep); overflow: hidden; }
.product-art::after { content: attr(data-mark); color: rgba(32, 37, 31, 0.82); font-family: var(--display); font-size: 128px; line-height: 1; transform: rotate(-3deg); }
.product-art .product-tag { position: absolute; top: 12px; left: 12px; padding: 4px 8px; color: var(--red-dark); background: rgba(251, 247, 239, 0.9); font-size: 12px; font-weight: 700; letter-spacing: 0.07em; }
.product-copy { display: flex; flex: 1; flex-direction: column; padding: 20px 18px 18px; }
.product-copy h3 { margin: 0; font-family: var(--serif); font-size: 23px; font-weight: 500; }
.product-copy p { flex: 1; margin: 8px 0 18px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.product-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.product-bottom strong { color: var(--red-dark); font-family: var(--serif); font-size: 24px; font-weight: 500; }
.add-product { min-height: 40px; padding: 0 13px; color: var(--paper-light); background: var(--ink); font-size: 12px; }
.booking-banner { display: grid; grid-template-columns: 70px 1fr 40px; gap: 22px; align-items: center; width: 100%; margin-top: 44px; padding: 22px 26px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); background: rgba(93, 113, 100, 0.065); text-align: left; }
.booking-mark { display: grid; place-items: center; width: 62px; height: 62px; color: var(--paper-light); background: var(--jade); font-family: var(--display); font-size: 30px; }
.booking-banner > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.booking-banner small { color: var(--jade); font-size: 12px; font-weight: 700; letter-spacing: 0.07em; }
.booking-banner strong { font-family: var(--serif); font-size: 24px; font-weight: 500; }
.booking-banner > span:last-child { color: var(--jade); font-size: 27px; }

.sheet-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(20, 24, 20, 0.34); backdrop-filter: blur(3px); }
.account-sheet { position: fixed; top: 0; right: 0; bottom: 0; z-index: 90; width: min(430px, 92vw); padding: 28px 27px calc(30px + var(--safe-bottom)); overflow-y: auto; background: var(--paper-light); box-shadow: -20px 0 70px rgba(20, 24, 20, 0.18); transform: translateX(105%); transition: transform 280ms cubic-bezier(.22,1,.36,1); }
.account-sheet.is-open { transform: translateX(0); }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.sheet-head small { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.sheet-head h2 { margin: 5px 0 0; font-family: var(--serif); font-size: 34px; font-weight: 500; }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 26px; font-weight: 300; line-height: 1; }
.account-profile { display: flex; align-items: center; gap: 15px; margin: 28px 0; padding: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.account-seal { display: grid; place-items: center; width: 58px; height: 58px; color: var(--paper-light); background: var(--red); font-family: var(--display); font-size: 34px; }
.account-profile > div { display: flex; flex-direction: column; gap: 2px; }
.account-profile strong { font-family: var(--serif); font-size: 22px; font-weight: 500; }
.account-profile small { color: var(--muted); font-size: 12px; }
.account-section { margin: 0 0 24px; }
.account-label { display: block; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.account-mode-options button { background: transparent; }
.account-links { display: grid; padding-top: 6px; border-top: 1px solid var(--line); }
.account-links button, .account-links a { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; min-height: 66px; padding: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.account-links span { font-size: 15px; font-weight: 600; }
.account-links small { color: var(--muted); font-size: 12px; }
.account-links button:hover span, .account-links a:hover span { color: var(--red); }
.account-note { margin: 26px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }

.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(20, 24, 20, 0.53); backdrop-filter: blur(8px); }
.copybook-sheet { width: min(1180px, 100%); max-height: calc(100vh - 40px); overflow-y: auto; background: var(--paper-light); box-shadow: var(--shadow-paper); }
.copybook-head { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-bottom: 1px solid var(--line); background: rgba(251, 247, 239, 0.95); backdrop-filter: blur(12px); }
.copybook-head small { color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: 0.04em; }
.copybook-head h2 { margin: 2px 0 0; font-family: var(--serif); font-size: 28px; font-weight: 500; }
.copybook-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 26px; padding: 24px; }
.copybook-settings { min-width: 0; }
.setting-group { margin-bottom: 19px; }
.setting-group > span { display: block; margin-bottom: 7px; color: var(--muted); font-size: 13px; letter-spacing: 0.02em; }
.segmented { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); }
.segmented.three { grid-template-columns: repeat(3, 1fr); }
.segmented button { min-height: 42px; padding: 5px 8px; border-right: 1px solid var(--line); background: transparent; font-size: 12px; }
.segmented button:last-child { border-right: 0; }
.segmented button.is-active { color: var(--paper-light); background: var(--ink); }
.copybook-summary { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.copybook-summary > span { color: var(--muted); font-size: 12px; }
.copybook-summary > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.copybook-summary i { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); font-family: var(--display); font-size: 19px; font-style: normal; }
.copybook-summary i img { width: 25px; height: 25px; object-fit: contain; }
.print-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.copybook-actions { display: grid; gap: 9px; margin-top: 20px; }
.copybook-actions button { width: 100%; }
.copybook-preview-column { min-width: 0; }
.preview-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 42px; margin-bottom: 9px; color: var(--muted); font-size: 12px; }
.preview-toolbar > div { display: flex; align-items: center; gap: 7px; }
.preview-toolbar button { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line); background: transparent; font-size: 20px; }
.preview-toolbar strong { min-width: 45px; color: var(--ink); font-size: 12px; text-align: center; }
.preview-viewport { display: grid; place-items: center; height: min(68vh, 710px); padding: 20px; overflow: hidden; border: 1px solid var(--line); background: #dcd3c3; cursor: grab; touch-action: none; }
.preview-viewport.is-dragging { cursor: grabbing; }
.preview-paper { position: relative; display: flex; flex-direction: column; flex: 0 0 auto; width: 465px; height: 658px; padding: 42px 37px 33px; background: #fbf7ee; box-shadow: 0 18px 45px rgba(32, 37, 31, 0.17); transform: translate(var(--pan-x, 0), var(--pan-y, 0)) scale(var(--preview-scale, 1)); transform-origin: center; will-change: transform; }
.preview-paper-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.preview-paper-head strong { font-family: var(--display); font-size: 19px; font-weight: 500; }
.preview-paper-head span { color: var(--muted); font-size: 12px; white-space: nowrap; text-align: right; }
.preview-paper-foot { display: flex; justify-content: space-between; gap: 15px; margin-top: auto; color: var(--muted); font-size: 7px; letter-spacing: 0.04em; }
.practice-grid { display: grid; margin: 40px auto auto; border-top: 1px solid rgba(177, 71, 50, 0.55); border-left: 1px solid rgba(177, 71, 50, 0.55); }
.practice-grid[data-paper="soft"] { grid-template-columns: repeat(2, 1fr); width: 340px; height: 340px; }
.practice-grid[data-paper="hard"] { grid-template-columns: repeat(10, 1fr); width: 390px; height: 498px; }
.practice-cell { position: relative; display: grid; place-items: center; border-right: 1px solid rgba(177, 71, 50, 0.55); border-bottom: 1px solid rgba(177, 71, 50, 0.55); }
.practice-cell::before, .practice-cell::after { content: ""; position: absolute; pointer-events: none; }
.practice-grid[data-grid="tian"] .practice-cell::before, .practice-grid[data-grid="mi"] .practice-cell::before { top: 50%; right: 0; left: 0; border-top: 1px dashed rgba(177, 71, 50, 0.3); }
.practice-grid[data-grid="tian"] .practice-cell::after, .practice-grid[data-grid="mi"] .practice-cell::after { top: 0; bottom: 0; left: 50%; border-left: 1px dashed rgba(177, 71, 50, 0.3); }
.practice-grid[data-grid="mi"] .practice-cell .cell-x { position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 0.5px), rgba(177, 71, 50, 0.22) 50%, transparent calc(50% + 0.5px)), linear-gradient(to bottom right, transparent calc(50% - 0.5px), rgba(177, 71, 50, 0.22) 50%, transparent calc(50% + 0.5px)); }
.practice-cell img { position: relative; z-index: 1; width: 78%; height: 78%; object-fit: contain; }
.practice-grid[data-print="trace"] .practice-cell img { opacity: 0.17; filter: grayscale(1); }
.practice-grid[data-paper="hard"] .practice-cell img { width: 82%; height: 82%; }
#copybookCanvas { display: none; }

.compact-overlay { place-items: center; }
.miniapp-sheet { position: relative; width: min(430px, 100%); padding: 38px 36px 30px; background: var(--paper-light); text-align: center; box-shadow: var(--shadow-paper); }
.miniapp-sheet > .icon-button, .cart-sheet > .sheet-head .icon-button { position: absolute; top: 13px; right: 13px; }
.miniapp-qr { width: 230px; height: 230px; margin: 4px auto 25px; padding: 12px; border: 1px solid var(--line); background: #fff; }
.miniapp-qr img { width: 100%; height: 100%; object-fit: contain; }
.miniapp-sheet h2 { margin: 7px 0 10px; font-family: var(--serif); font-size: 32px; font-weight: 500; }
.miniapp-sheet > p:not(.view-kicker):not(.miniapp-tip) { margin: 0 0 22px; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.miniapp-tip { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.cart-sheet { width: min(520px, 100%); max-height: calc(100vh - 40px); padding: 28px; overflow-y: auto; background: var(--paper-light); box-shadow: var(--shadow-paper); }
.cart-items { display: grid; margin-top: 21px; border-top: 1px solid var(--line); }
.cart-item { display: grid; grid-template-columns: 52px 1fr auto auto; gap: 13px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item-mark { display: grid; place-items: center; width: 48px; height: 48px; background: var(--paper-deep); font-family: var(--display); font-size: 28px; }
.cart-item strong { display: block; font-size: 14px; }
.cart-item small { color: var(--muted); font-size: 12px; }
.cart-qty { display: flex; align-items: center; gap: 6px; }
.cart-qty button { width: 29px; height: 29px; border: 1px solid var(--line); background: transparent; }
.cart-item-price { font-family: var(--serif); font-size: 18px; }
.cart-total { display: flex; align-items: center; justify-content: space-between; padding: 20px 0 16px; }
.cart-total strong { color: var(--red-dark); font-family: var(--serif); font-size: 29px; font-weight: 500; }
.wide-button { width: 100%; }
.toast { position: fixed; right: 50%; bottom: calc(27px + var(--safe-bottom)); z-index: 150; max-width: min(420px, calc(100% - 36px)); padding: 11px 17px; color: var(--paper-light); background: rgba(32, 37, 31, 0.94); box-shadow: 0 12px 35px rgba(20, 24, 20, 0.24); font-size: 13px; text-align: center; transform: translateX(50%); }

html[data-ui-mode="senior"] { font-size: 19px; }
html[data-ui-mode="senior"] body { line-height: 1.72; }
html[data-ui-mode="senior"] .entry-sheet-desc,
html[data-ui-mode="senior"] .role-copy small,
html[data-ui-mode="senior"] .entry-footnote,
html[data-ui-mode="senior"] .view-heading > p,
html[data-ui-mode="senior"] .library-hero-copy > p:not(.view-kicker),
html[data-ui-mode="senior"] .review-steps p,
html[data-ui-mode="senior"] .product-copy p,
html[data-ui-mode="senior"] .course-card p { font-size: 1.08rem; }
html[data-ui-mode="senior"] .role-option,
html[data-ui-mode="senior"] .mode-options button,
html[data-ui-mode="senior"] .category-tabs button,
html[data-ui-mode="senior"] .quick-actions button { min-height: 68px; }
html[data-ui-mode="senior"] .glyph-tile { min-height: 184px; }
html[data-ui-mode="senior"] .entry-confirm,
html[data-ui-mode="senior"] .ink-button,
html[data-ui-mode="senior"] .outline-button { min-height: 58px; font-size: 1rem; }
html[data-ui-mode="senior"] .bottom-nav button { min-height: 72px; font-size: 13px; }
html[data-ui-mode="senior"] .desk-nav button { font-size: 16px; }

@media (max-width: 1180px) {
  .glyph-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .entry-layout { grid-template-columns: minmax(0, 1fr) minmax(390px, 0.82fr); gap: 55px; }
  .entry-art { opacity: 0.78; }
}

@media (max-width: 960px) {
  .entry-gate { padding: 0 22px 34px; }
  .entry-layout { grid-template-columns: 1fr; gap: 30px; padding-top: 26px; }
  .entry-intro { min-height: 570px; }
  .entry-intro h1 { font-size: clamp(64px, 12vw, 94px); }
  .entry-art { width: 52%; }
  .entry-sheet { width: min(560px, 100%); margin: 0 auto 30px; }
  .app-header { grid-template-columns: auto 1fr; min-height: 76px; padding: 0 22px; }
  .desk-nav { justify-content: flex-end; }
  .header-actions .role-badge { display: none; }
  .app-main { width: min(100% - 40px, 820px); padding-bottom: 145px; }
  .library-hero { grid-template-columns: 1fr; min-height: auto; padding-bottom: 80px; }
  .library-hero-art { width: min(470px, 100%); min-height: 450px; margin: 10px auto 0; }
  .glyph-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .review-layout { grid-template-columns: 1fr; }
  .upload-panel { min-height: 360px; }
  .course-list { grid-template-columns: 1fr 1fr; }
  .course-card:last-child { grid-column: 1 / -1; min-height: 260px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .copybook-layout { grid-template-columns: 250px minmax(0, 1fr); }
  .preview-paper { width: 398px; height: 563px; padding: 35px 30px 27px; }
  .practice-grid[data-paper="soft"] { width: 290px; height: 290px; }
  .practice-grid[data-paper="hard"] { width: 330px; height: 422px; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .entry-header { min-height: 78px; }
  .entry-version { font-size: 12px; }
  .entry-layout { min-height: auto; }
  .entry-intro { min-height: 0; padding-top: 30px; padding-bottom: 10px; }
  .entry-stamp { font-size: 12px; }
  .entry-intro h1 { font-size: clamp(54px, 15vw, 78px); }
  .entry-lead { margin-top: 22px; font-size: 16px; }
  .entry-proof { gap: 10px 18px; margin-top: 24px; }
  .entry-proof strong { font-size: 19px; }
  .entry-art { display: none; }
  .entry-art img { right: 53px; width: 205px; height: 205px; }
  .entry-art-line { left: 3px; font-size: 20px; }
  .entry-art-note { display: none; }
  .entry-sheet { padding: 24px 20px 25px; }
  .entry-sheet h2 { font-size: 30px; }
  .app-header { position: sticky; grid-template-columns: 1fr auto; gap: 12px; min-height: 70px; padding: 0 16px; }
  .brand-seal { width: 38px; height: 41px; font-size: 24px; }
  .brand-name { font-size: 18px; }
  .brand-name small { display: none; }
  .desk-nav { display: none; }
  .header-actions { gap: 5px; }
  .account-button { border: 0; padding: 0 5px; }
  .account-button span { display: none; }
  .app-main { width: calc(100% - 28px); padding-top: 24px; padding-bottom: calc(140px + var(--safe-bottom)); }
  .view-heading { grid-template-columns: 1fr; gap: 18px; margin: 12px 0 36px; }
  .view-heading h1, .library-hero h1, .course-hero h1 { font-size: clamp(42px, 12vw, 62px); }
  .view-heading > p, .view-heading-side > p, .library-hero-copy > p:not(.view-kicker) { font-size: 16px; }
  .library-hero { padding: 4px 0 64px; gap: 26px; }
  .library-hero-art { display: none; }
  .library-hero-art::before { right: 7px; width: 88%; height: 320px; }
  .vertical-note { left: 3px; font-size: 19px; }
  .hero-paper { right: 34px; width: 76%; }
  .hero-paper img { width: 210px; height: 210px; }
  .hero-paper-note { right: 1px; bottom: 15px; }
  .quick-actions { grid-template-columns: 1fr; gap: 7px; margin-top: 26px; }
  .quick-actions button { min-height: 70px; }
  .library-workbench { margin-inline: -14px; padding: 23px 14px 0; }
  .library-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  .search-box { width: 100%; min-height: 52px; }
  .category-tabs { margin-right: -14px; padding-right: 14px; }
  .glyph-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .glyph-tile { min-height: 136px; padding: 12px 5px 9px; }
  .glyph-tile img { width: 72px; height: 72px; }
  .glyph-name { font-size: 17px; }
  .selection-dock { bottom: calc(72px + var(--safe-bottom)); grid-template-columns: 1fr auto; width: calc(100% - 24px); right: 12px; left: 12px; padding: 10px 10px 10px 13px; }
  .selection-summary { gap: 9px; }
  .selection-summary > span { font-size: 12px; }
  .selection-chip { padding: 2px 5px; font-size: 16px; }
  .clear-selection { display: none; }
  .make-copybook { min-height: 45px; padding: 0 13px; font-size: 12px; }
  .bottom-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 70; display: grid; grid-template-columns: repeat(4, 1fr); padding-bottom: var(--safe-bottom); border-top: 1px solid var(--line); background: rgba(251, 247, 239, 0.95); backdrop-filter: blur(18px); }
  .bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 62px; color: var(--muted); background: transparent; font-size: 12px; }
  .bottom-nav button svg { width: 23px; height: 23px; }
  .bottom-nav button.is-active { color: var(--red-dark); }
  .review-layout { gap: 31px; }
  .upload-panel { min-height: 340px; padding: 25px; }
  .upload-panel strong { font-size: 24px; }
  .upload-preview { grid-template-columns: 1fr; }
  .upload-preview-image img { height: 300px; }
  .upload-preview-copy { padding: 22px; }
  .member-strip { align-items: flex-start; flex-direction: column; padding: 22px; }
  .member-strip > div { gap: 15px; }
  .member-strip > div > span { font-size: 46px; }
  .member-strip strong { font-size: 19px; }
  .course-hero { grid-template-columns: 1fr; min-height: 460px; padding: 35px 25px; }
  .course-seal { display: none; }
  .course-hero h1 { font-size: clamp(40px, 11.5vw, 58px); }
  .section-line { align-items: flex-start; flex-direction: column; gap: 5px; margin-top: 44px; }
  .section-line h2 { font-size: 31px; }
  .course-list { grid-template-columns: 1fr; }
  .course-card, .course-card:last-child { grid-column: auto; min-height: 285px; }
  .demo-lesson { grid-template-columns: 95px 1fr; gap: 15px; padding: 13px; }
  .demo-lesson-art { height: 115px; }
  .demo-lesson-art img { width: 88px; height: 88px; }
  .demo-lesson-copy strong { font-size: 19px; }
  .demo-lesson-copy > span { font-size: 12px; }
  .demo-lesson-arrow { display: none; }
  .shop-heading { grid-template-columns: 1fr; }
  .shop-heading-side { align-items: flex-start; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .product-card { min-height: 350px; }
  .product-art { height: 175px; }
  .product-art::after { font-size: 104px; }
  .product-copy { padding: 16px 13px 14px; }
  .product-copy h3 { font-size: 20px; }
  .product-bottom { align-items: flex-start; flex-direction: column; }
  .add-product { width: 100%; }
  .booking-banner { grid-template-columns: 54px 1fr; gap: 14px; padding: 18px 15px; }
  .booking-mark { width: 50px; height: 50px; }
  .booking-banner strong { font-size: 19px; }
  .booking-banner > span:last-child { display: none; }
  .copybook-sheet { max-height: calc(100vh - 12px); }
  .copybook-layout { grid-template-columns: 1fr; padding: 16px; }
  .copybook-settings { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
  .setting-group { min-width: 0; }
  .copybook-summary, .copybook-settings .print-note, .copybook-actions { grid-column: 1 / -1; }
  .copybook-actions { grid-template-columns: 1fr 1fr; }
  .copybook-preview-column { order: -1; margin-top: 0; margin-bottom: 10px; }
  .preview-viewport { height: 500px; padding: 15px; }
  .preview-paper { width: 330px; height: 467px; padding: 29px 25px 22px; }
  .preview-paper-head { flex-direction: column; align-items: flex-start; gap: 4px; }\n  .preview-paper-head strong { font-size: 15px; }\n  .preview-paper-head span { text-align: left; white-space: normal; }
  .practice-grid[data-paper="soft"] { width: 242px; height: 242px; margin-top: 35px; }
  .practice-grid[data-paper="hard"] { width: 276px; height: 353px; margin-top: 28px; }
  .preview-paper-foot { font-size: 5.5px; }
  .miniapp-sheet { padding: 34px 20px 24px; }
  .miniapp-qr { width: 210px; height: 210px; }
  .cart-sheet { padding: 22px 18px; }
  .cart-item { grid-template-columns: 46px 1fr auto; }
  .cart-item-price { grid-column: 2; }
  .cart-qty { grid-column: 3; grid-row: 1; }
  .account-sheet { width: min(390px, 95vw); padding-inline: 20px; }
}

@media (max-width: 390px) {
  .entry-gate { padding-inline: 14px; }
  .entry-version { max-width: 135px; text-align: right; }
  .entry-intro h1 { font-size: 51px; }
  .mode-options { grid-template-columns: 1fr; }
  .glyph-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .glyph-tile { min-height: 132px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { min-height: 330px; }
  .copybook-settings { grid-template-columns: 1fr; }
  .copybook-summary, .copybook-settings .print-note, .copybook-actions { grid-column: auto; }
  .copybook-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body.has-overlay { overflow: hidden; }






