:root {
  --ink: #4b3542;
  --muted: #887782;
  --forest: #70445f;
  --forest-2: #985f7d;
  --mint: #ead7e4;
  --mint-light: #fbeef4;
  --coral: #df86a5;
  --coral-dark: #bd6486;
  --paper: #fff9f7;
  --surface: #fffdfd;
  --line: #eadde4;
  --shadow: 0 22px 64px rgba(103, 61, 86, .14);
  --reader-size: 18px;
  --reader-line: 1.9;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 8% 8%, rgba(244,198,216,.38), transparent 27%), radial-gradient(circle at 92% 16%, rgba(218,207,240,.42), transparent 25%), radial-gradient(circle at 72% 88%, rgba(248,220,202,.3), transparent 28%), linear-gradient(180deg, #fffafa 0%, #fff7f6 52%, #fdf8fb 100%); background-attachment: fixed; color: var(--ink); }
button, input, select { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.hidden { display: none !important; }
.eyebrow { margin: 0 0 12px; color: var(--coral-dark); font-size: 11px; font-weight: 800; letter-spacing: .18em; }

.access-view { position: relative; min-height: 100vh; overflow: hidden; display: grid; place-items: center; padding: 38px 20px; background: radial-gradient(circle at 16% 18%, rgba(255,218,231,.24), transparent 27%), radial-gradient(circle at 84% 72%, rgba(218,205,239,.22), transparent 30%), linear-gradient(145deg, #56354d, #80516d 58%, #9a6b82); }
.access-view::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.18) 0 1px, transparent 1px), radial-gradient(circle at 80% 60%, rgba(255,255,255,.12) 0 1px, transparent 1px); background-size: 34px 34px, 52px 52px; }
.access-orbit { position: absolute; border: 1px solid rgba(255, 225, 236, .2); border-radius: 50%; }
.orbit-one { width: 560px; height: 560px; right: -210px; top: -240px; }
.orbit-two { width: 420px; height: 420px; left: -220px; bottom: -190px; }
.access-card { z-index: 1; width: min(100%, 620px); padding: clamp(30px, 7vw, 58px); border: 1px solid rgba(255,255,255,.5); border-radius: 30px; background: rgba(255, 250, 250, .96); box-shadow: 0 38px 100px rgba(69,35,56,.34); }
.wordmark { display: flex; align-items: center; gap: 9px; margin-bottom: 35px; }
.wordmark span { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 17px 17px 17px 5px; background: var(--coral); color: white; font-weight: 900; letter-spacing: -.08em; }
.wordmark i { font-style: normal; font-size: 20px; font-weight: 900; letter-spacing: .12em; }
.access-card h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(34px, 8vw, 56px); line-height: 1.13; letter-spacing: -.045em; }
.access-card h1 em { color: var(--forest-2); font-size: .56em; font-style: normal; letter-spacing: -.02em; }
.access-lead { margin: 24px 0 32px; color: #5c6e69; line-height: 1.8; }
.access-form label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 800; }
.code-input-wrap { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.code-input-wrap input { min-width: 0; height: 52px; padding: 0 17px; border: 1px solid #cad8d1; border-radius: 13px; background: white; color: var(--ink); letter-spacing: .08em; outline: none; text-transform: uppercase; }
.code-input-wrap input:focus { border-color: var(--forest-2); box-shadow: 0 0 0 4px rgba(29, 91, 80, .1); }
.primary-button, .secondary-button { min-height: 46px; padding: 0 20px; border: 0; border-radius: 13px; font-weight: 800; cursor: pointer; transition: transform .18s, background .18s; }
.primary-button { background: linear-gradient(135deg, var(--coral), var(--coral-dark)); color: white; box-shadow: 0 9px 24px rgba(189, 100, 134, .25); }
.primary-button:hover { background: var(--coral-dark); transform: translateY(-1px); }
.primary-button:disabled { opacity: .55; cursor: wait; transform: none; }
.secondary-button { border: 1px solid var(--line); background: white; }
.secondary-button:hover { background: var(--mint-light); }
.device-note { margin: 13px 2px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.shield-icon { display: inline-grid; place-items: center; width: 17px; height: 17px; margin-right: 4px; border-radius: 50%; background: var(--mint); color: var(--forest); font-weight: 900; }
.form-error { min-height: 20px; margin: 7px 0 0; color: #b44232; font-size: 13px; }
.access-features { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.access-features span { padding: 6px 10px; border-radius: 999px; background: var(--mint-light); color: var(--forest-2); font-size: 11px; font-weight: 700; }

.app-view { min-height: 100vh; padding-bottom: 74px; background: radial-gradient(circle at 16% 24%, rgba(246,212,225,.2), transparent 25%), radial-gradient(circle at 89% 52%, rgba(221,210,241,.22), transparent 25%); }
.app-header { position: sticky; z-index: 20; top: 0; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 max(20px, calc((100vw - 1180px)/2)); border-bottom: 1px solid rgba(229,211,221,.88); background: rgba(255,250,250,.86); box-shadow: 0 8px 28px rgba(103,61,86,.045); backdrop-filter: blur(20px); }
.brand-button { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 15px 15px 15px 5px; background: linear-gradient(145deg, #9d6683, #694059); color: white; box-shadow: 0 8px 18px rgba(112,68,95,.2); font-size: 13px; font-weight: 900; }
.brand-button strong, .brand-button small { display: block; }
.brand-button strong { font-size: 17px; letter-spacing: .12em; }
.brand-button small { margin-top: 1px; color: var(--muted); font-size: 9px; letter-spacing: .12em; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-button, .profile-chip { min-height: 38px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,253,.82); box-shadow: 0 5px 16px rgba(103,61,86,.05); cursor: pointer; }
.icon-button { min-width: 42px; padding: 0 11px; font-size: 13px; font-weight: 700; }
.profile-chip { display: flex; align-items: center; gap: 7px; padding: 0 12px; color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #40a679; box-shadow: 0 0 0 4px rgba(64,166,121,.12); }

#main-content { min-height: calc(100vh - 68px); outline: none; }
.page-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 60px; }
.hero-panel { position: relative; overflow: hidden; display: grid; grid-template-columns: 1.4fr .6fr; gap: 34px; padding: clamp(30px, 5vw, 54px); border: 1px solid rgba(255,255,255,.38); border-radius: 30px; background: radial-gradient(circle at 84% 16%, rgba(255,218,231,.24), transparent 27%), radial-gradient(circle at 68% 92%, rgba(218,205,239,.18), transparent 32%), linear-gradient(135deg, #5d3953 0%, #774a67 52%, #97677f 100%); color: white; box-shadow: 0 28px 70px rgba(92,53,77,.23); }
.hero-panel::after { content: "A a"; position: absolute; right: -12px; bottom: -58px; color: rgba(255,255,255,.055); font-family: Georgia, serif; font-size: 210px; font-weight: 900; letter-spacing: -.12em; }
.hero-panel .eyebrow { color: #ffd0df; }
.hero-panel h1 { max-width: 690px; margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(30px, 5vw, 54px); line-height: 1.2; }
.hero-panel h1 span { color: #f2cadb; }
.hero-panel p { max-width: 590px; color: #f6e9ef; line-height: 1.8; }
.continue-button { display: inline-flex; align-items: center; gap: 14px; margin-top: 8px; padding: 14px 17px; border: 1px solid rgba(255,255,255,.24); border-radius: 17px; background: rgba(255,255,255,.12); color: white; cursor: pointer; text-align: left; transition: transform .18s ease, background-color .18s ease; }
.continue-button:hover { transform: translateY(-2px); background: rgba(255,255,255,.19); }
.continue-button b, .continue-button small { display: block; }
.continue-button small { margin-top: 3px; color: #ead8e2; }
.continue-button i { margin-left: auto; font-style: normal; font-size: 24px; }
.hero-stats { z-index: 1; align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-card { display: flex; flex-direction: column; justify-content: end; min-height: 112px; padding: 17px; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; background: linear-gradient(145deg, rgba(255,255,255,.14), rgba(255,255,255,.075)); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
.stat-card strong { font-family: Georgia, serif; font-size: 34px; }
.stat-card small { margin-top: 5px; color: #ead8e2; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 44px 0 20px; }
.section-heading h2 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: 28px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.shelf-heading-copy { width: fit-content; max-width: 100%; }
.vocabulary-series { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.vocabulary-series-pill { appearance: none; display: inline-flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 5px; max-width: 100%; min-height: 52px; padding: 9px 18px; border: 1px solid #d9b7c7; border-radius: 999px; background: rgba(255,251,252,.76); line-height: 1; text-align: left; box-shadow: 0 6px 18px rgba(103,61,86,.07); cursor: pointer; transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease; }
.vocabulary-series-pill strong { color: var(--forest); font-size: 13px; font-weight: 800; letter-spacing: .02em; transition: color .18s ease; }
.vocabulary-series-description { color: var(--muted); font-size: 11px; font-weight: 500; white-space: nowrap; transition: color .18s ease; }
.vocabulary-series-pill:hover { transform: translateY(-3px); border-color: var(--forest); background: var(--forest); box-shadow: 0 10px 22px rgba(17,56,50,.18); }
.vocabulary-series-pill:hover strong { color: white; }
.vocabulary-series-pill:hover .vocabulary-series-description { color: #f0dce6; }
.vocabulary-series-pill:active { transform: translateY(-1px) scale(.985); }
.vocabulary-series-pill:focus-visible { outline: 3px solid rgba(238,118,93,.3); outline-offset: 3px; }
.shelf-tools { display: flex; gap: 8px; }
.shelf-tools input, .shelf-tools select, .word-tools input, .word-tools select { height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,253,253,.9); box-shadow: 0 6px 18px rgba(103,61,86,.045); outline: none; }
.shelf-tools input:focus, .shelf-tools select:focus, .word-tools input:focus, .word-tools select:focus { border-color: #c98aa6; box-shadow: 0 0 0 4px rgba(223,134,165,.12); }
.story-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.story-card { position: relative; overflow: hidden; min-height: 220px; display: flex; flex-direction: column; padding: 23px; border: 1px solid rgba(230,211,221,.95); border-radius: 23px; background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(255,248,251,.96)); box-shadow: 0 10px 30px rgba(103,61,86,.065); cursor: pointer; transition: transform .2s, box-shadow .2s, border .2s; }
.story-card:hover { transform: translateY(-5px); border-color: #d7a6bb; box-shadow: 0 22px 42px rgba(103,61,86,.13); }
.story-card::after { content: attr(data-no); position: absolute; right: -5px; bottom: -26px; color: rgba(151,91,123,.06); font-family: Georgia, serif; font-size: 100px; font-weight: 900; }
.story-meta { display: flex; justify-content: space-between; color: var(--coral-dark); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.story-card h3 { z-index: 1; margin: 25px 0 26px; font-family: Georgia, "Songti SC", serif; font-size: 21px; line-height: 1.45; }
.story-card footer { z-index: 1; margin-top: auto; }
.progress-track { appearance: none; display: block; width: 100%; height: 7px; overflow: hidden; border: 0; border-radius: 999px; background: #f2eaee; box-shadow: inset 0 1px 2px rgba(103,61,86,.07); }
.progress-track::-webkit-progress-bar { border-radius: inherit; background: #f2eaee; }
.progress-track::-webkit-progress-value { border-radius: inherit; background: linear-gradient(90deg, #8d5678 0%, #c86f92 58%, #e99ab5 100%); box-shadow: 0 1px 5px rgba(189,100,134,.32); }
.progress-track::-moz-progress-bar { border-radius: inherit; background: linear-gradient(90deg, #8d5678 0%, #c86f92 58%, #e99ab5 100%); box-shadow: 0 1px 5px rgba(189,100,134,.32); }
.progress-label { display: flex; justify-content: space-between; margin-top: 8px; color: var(--muted); font-size: 11px; }
.progress-label span:last-child { color: var(--coral-dark); font-weight: 800; }

.reader-page { --reader-bg: #fff9f7; min-height: calc(100vh - 68px); background: radial-gradient(circle at 12% 10%, rgba(244,205,220,.24), transparent 25%), radial-gradient(circle at 88% 38%, rgba(219,208,239,.22), transparent 27%), var(--reader-bg); }
.reader-page[data-reader-theme="mint"] { --reader-bg: #f8f4fb; }
.reader-page[data-reader-theme="night"] { --reader-bg: #172522; color: #dceae3; }
.reader-toolbar { position: sticky; z-index: 10; top: 68px; padding: 12px 20px 0; background: color-mix(in srgb, var(--reader-bg) 92%, transparent); backdrop-filter: blur(16px); }
.reader-toolbar-inner { width: min(860px, 100%); margin: 0 auto; }
.reader-storyline { display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.reader-storyline h1 { overflow: hidden; margin: 0; font-size: 15px; font-weight: 800; white-space: nowrap; text-overflow: ellipsis; }
.reader-storyline small { flex: none; color: var(--muted); }
.reader-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 12px; padding: 5px; border: 1px solid var(--line); border-radius: 15px 15px 0 0; background: rgba(255,255,255,.48); border-bottom: 0; }
.reader-page[data-reader-theme="night"] .reader-tabs { background: rgba(0,0,0,.18); border-color: #344b46; }
.reader-tabs button { min-height: 42px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; cursor: pointer; }
.reader-tabs button.active { background: linear-gradient(135deg, #83516f, #a26784); color: white; box-shadow: 0 7px 18px rgba(112,68,95,.2); }
.reader-container { width: min(820px, calc(100% - 36px)); margin: 0 auto; padding: 54px 0 120px; }
.chapter-kicker { color: var(--coral-dark); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.chapter-title { margin: 13px 0 15px; font-family: Georgia, "Songti SC", serif; font-size: clamp(27px, 5vw, 42px); line-height: 1.35; }
.chapter-guide { margin: 0 0 44px; padding-bottom: 26px; border-bottom: 1px solid var(--line); color: var(--muted); line-height: 1.7; }
.reader-page[data-reader-theme="night"] .chapter-guide { border-color: #344b46; color: #91a79f; }
.prose { font-family: Georgia, "Songti SC", "Microsoft YaHei", serif; font-size: var(--reader-size); line-height: var(--reader-line); letter-spacing: .025em; }
.prose p { margin: 0 0 1.25em; }
.target-word { display: inline; padding: 1px 3px 2px; border: 0; border-radius: 5px; background: linear-gradient(transparent 48%, rgba(223,134,165,.27) 48%); color: #b4557b; font-family: Inter, system-ui, sans-serif; font-size: .94em; font-weight: 800; cursor: pointer; }
.target-word.speaking { color: var(--forest); background: var(--mint); }
.reader-page[data-reader-theme="night"] .target-word { color: #ffad98; background: linear-gradient(transparent 48%, rgba(238,118,93,.2) 48%); }
.blank-meaning { color: var(--muted); letter-spacing: .12em; }
.recall-summary { position: sticky; z-index: 4; top: 178px; width: fit-content; margin: -24px 0 28px auto; padding: 7px 11px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--reader-bg) 92%, white); color: var(--muted); font-family: Inter,system-ui,sans-serif; font-size: 11px; font-weight: 800; }
.recall-blank { display: inline-flex; align-items: baseline; gap: 2px; white-space: nowrap; }
.recall-input { width: 6.6em; min-width: 76px; height: 1.85em; padding: 0 5px 1px; border: 0; border-bottom: 1.5px solid #879995; border-radius: 0; background: transparent; color: var(--ink); font-family: "PingFang SC","Microsoft YaHei",sans-serif; font-size: .82em; font-weight: 700; line-height: 1; text-align: center; outline: none; transition: border-color .18s,background .18s; }
.recall-input::placeholder { color: #aeb8b4; font-size: .78em; font-weight: 500; }
.recall-input:focus { border-bottom-color: var(--coral); background: rgba(238,118,93,.07); }
.recall-input.correct { border-bottom-color: #30936a; background: rgba(48,147,106,.08); color: #217551; }
.recall-input.wrong { border-bottom-color: #d85e48; background: rgba(216,94,72,.07); color: #a94432; }
.recall-input.saving { opacity: .65; }
.recall-status { min-width: 1.7em; color: var(--muted); font-family: Inter,system-ui,sans-serif; font-size: .58em; font-weight: 800; }
.recall-input.correct + .recall-status { color: #24805b; }
.recall-input.wrong + .recall-status { color: #bd4e3a; }
.reader-page[data-reader-theme="night"] .recall-input { color: #e0eee7; border-bottom-color: #789087; }
.reader-end { margin-top: 50px; padding: 30px; border: 1px solid #ecd9e3; border-radius: 24px; background: linear-gradient(135deg, #fff2f6, #f8f1fb); text-align: center; }
.reader-page[data-reader-theme="night"] .reader-end { background: #203631; }
.reader-end h3 { margin: 0 0 8px; }
.reader-end p { margin: 0 0 18px; color: var(--muted); }
.reader-end .primary-button { min-width: 180px; }
.reader-fab { position: fixed; z-index: 12; right: max(20px, calc((100vw - 940px)/2)); bottom: 92px; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }

.words-page, .review-page, .profile-page { width: min(1050px, calc(100% - 40px)); margin: 0 auto; padding: 42px 0 110px; }
.page-title h1 { margin: 0; font-family: Georgia, "Songti SC", serif; font-size: clamp(30px,5vw,46px); }
.page-title p { color: var(--muted); line-height: 1.7; }
.word-tools { position: sticky; z-index: 5; top: 76px; display: flex; gap: 9px; padding: 13px; border: 1px solid var(--line); border-radius: 19px; background: rgba(255,250,251,.88); box-shadow: 0 10px 28px rgba(103,61,86,.06); backdrop-filter: blur(14px); }
.word-tools input { flex: 1; min-width: 0; }
.word-count { margin: 18px 0 10px; color: var(--muted); font-size: 12px; }
.word-list { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.word-row { display: grid; grid-template-columns: 58px minmax(150px,1fr) minmax(150px,1.4fr) 130px 46px; align-items: center; min-height: 64px; padding: 7px 15px; border-bottom: 1px solid var(--line); }
.word-row:last-child { border-bottom: 0; }
.word-row .number { color: #9aa8a3; font-size: 11px; }
.word-row strong { font-family: Georgia, serif; font-size: 17px; }
.global-word-button { display: inline-flex; align-items: center; gap: 7px; padding: 3px 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.global-word-button .sound-mark { color: var(--muted); font-family: system-ui,sans-serif; font-size: 10px; opacity: .62; }
.global-word-button.speaking .sound-mark { color: var(--coral); opacity: 1; }
.word-row .meaning { color: #536963; }
.word-row .source { color: var(--muted); font-size: 11px; }
.word-row .star-button { width: 38px; height: 38px; border: 0; border-radius: 12px; background: transparent; color: #a0aca8; cursor: pointer; font-size: 21px; }
.word-row .star-button.active { color: var(--coral); }
.mastery-mini { display: flex; gap: 3px; margin-top: 5px; }
.mastery-mini i { width: 15px; height: 3px; border-radius: 99px; background: #dce4df; }
.mastery-mini i.on { background: var(--forest-2); }
.load-more { display: block; margin: 20px auto; }
.review-table-head { display: grid; grid-template-columns: 1fr auto; padding: 0 14px 10px 60px; color: var(--muted); font-size: 11px; font-weight: 800; }
.story-word-list { overflow: hidden; border: 1px solid var(--line); border-radius: 19px; background: var(--surface); }
.story-word-row { display: grid; grid-template-columns: 44px minmax(160px,1fr) auto 42px; align-items: center; min-height: 66px; padding: 7px 12px; border-bottom: 1px solid var(--line); }
.story-word-row:last-child { border-bottom: 0; }
.story-word-row .number { color: #9aa8a3; font-size: 10px; }
.word-link { display: flex; align-items: baseline; gap: 12px; min-width: 0; padding: 8px; border: 0; background: transparent; cursor: pointer; text-align: left; }
.word-link strong { min-width: 115px; font-family: Georgia,serif; font-size: 17px; }
.word-link small { overflow: hidden; color: #536963; text-overflow: ellipsis; white-space: nowrap; }
.rounds { display: flex; gap: 4px; }
.rounds button { width: 29px; height: 29px; padding: 0; border: 1px solid var(--line); border-radius: 9px; background: white; color: #95a39e; cursor: pointer; font-size: 10px; font-weight: 800; }
.rounds button.done { border-color: var(--forest-2); background: var(--forest-2); color: white; }
.story-word-row .star-button { width: 38px; height: 38px; border: 0; background: transparent; color: #a0aca8; cursor: pointer; font-size: 20px; }
.story-word-row .star-button.active { color: var(--coral); }

.review-layout { display: grid; grid-template-columns: 1fr 260px; gap: 24px; margin-top: 30px; }
.review-stage { min-height: 440px; display: flex; flex-direction: column; padding: clamp(26px,5vw,54px); border: 1px solid var(--line); border-radius: 26px; background: var(--surface); box-shadow: var(--shadow); }
.review-counter { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.review-word { display: block; margin: 55px auto 8px; padding: 3px 12px 7px; border: 0; border-radius: 15px; background: transparent; color: inherit; font-family: Georgia, serif; font-size: clamp(42px,9vw,78px); line-height: 1; text-align: center; cursor: pointer; transition: background .18s,color .18s; }
.review-word:hover, .review-word.speaking { background: var(--mint-light); color: var(--forest); }
.pronounce-tip { margin: 0 0 12px; color: #91a09b; font-size: 11px; text-align: center; }
.pronounce-tip span { margin-right: 4px; font-family: system-ui,sans-serif; }
.review-sentence { max-width: 650px; margin: 18px auto; color: #65756f; font-family: Georgia, "Songti SC", serif; line-height: 1.85; text-align: center; }
.review-answer { margin: 12px auto 20px; color: var(--coral-dark); font-size: 25px; font-weight: 900; text-align: center; }
.review-controls { display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; margin-top: auto; }
.review-controls button { min-height: 50px; border: 1px solid var(--line); border-radius: 13px; background: white; font-weight: 800; cursor: pointer; }
.review-controls button:last-child { border-color: var(--forest); background: var(--forest); color: white; }
.reveal-button { display: block; min-width: 180px; margin: auto auto 0; }
.review-aside { align-self: start; padding: 22px; border-radius: 22px; background: linear-gradient(145deg, #684059, #94647d); color: white; box-shadow: 0 18px 38px rgba(103,61,86,.18); }
.review-aside h3 { margin-top: 0; }
.review-aside p, .review-aside li { color: #c9ded5; font-size: 13px; line-height: 1.7; }
.review-aside ul { padding-left: 18px; }
.empty-state { padding: 55px 20px; border: 1px dashed #bdcbc4; border-radius: 20px; text-align: center; color: var(--muted); }

.profile-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; margin: 30px 0; }
.profile-card { padding: 24px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.profile-card strong { display: block; margin-top: 12px; font-family: Georgia, serif; font-size: 30px; }
.profile-card small { color: var(--muted); }
.profile-panel { padding: 25px; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.profile-panel dl { display: grid; grid-template-columns: 130px 1fr; gap: 14px; margin: 0 0 25px; }
.profile-panel dt { color: var(--muted); }
.profile-panel dd { margin: 0; font-weight: 700; }
.danger-button { min-height: 44px; padding: 0 16px; border: 1px solid #e2b7ae; border-radius: 12px; background: #fff7f4; color: #a94432; font-weight: 800; cursor: pointer; }

.bottom-nav { position: fixed; z-index: 30; left: 50%; bottom: max(10px, env(safe-area-inset-bottom)); width: min(460px, calc(100% - 22px)); height: 62px; display: grid; grid-template-columns: repeat(4,1fr); padding: 5px; border: 1px solid rgba(229,211,221,.94); border-radius: 21px; background: rgba(255,251,252,.9); box-shadow: 0 14px 42px rgba(103,61,86,.15); backdrop-filter: blur(20px); transform: translateX(-50%); }
.bottom-nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 14px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.bottom-nav button span { height: 19px; font-size: 16px; font-weight: 900; }
.bottom-nav button.active { background: var(--mint-light); color: var(--forest); }

dialog { color: var(--ink); }
dialog::backdrop { background: rgba(67,37,55,.5); backdrop-filter: blur(4px); }
.bottom-dialog { width: min(520px, calc(100% - 24px)); margin: auto auto 12px; padding: 31px; border: 0; border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
#word-dialog { margin: auto; }
#word-dialog .dialog-handle { display: none; }
.dialog-handle { position: absolute; top: 8px; left: 50%; width: 44px; height: 4px; border-radius: 99px; background: #d7dfdb; transform: translateX(-50%); }
.dialog-close { position: absolute; top: 15px; right: 16px; width: 35px; height: 35px; border: 0; border-radius: 50%; background: #edf1ee; color: #65756f; cursor: pointer; font-size: 22px; }
.bottom-dialog h2 { margin: 0 0 9px; font-family: Georgia, serif; font-size: 36px; }
.word-meaning { margin: 0; color: var(--coral-dark); font-size: 23px; font-weight: 900; }
.word-source { color: var(--muted); font-size: 12px; }
.mastery-dots { display: flex; gap: 6px; margin: 24px 0; }
.mastery-dots i { width: 28px; height: 5px; border-radius: 99px; background: #dae4de; }
.mastery-dots i.on { background: var(--forest-2); }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.side-dialog { width: min(430px, calc(100% - 18px)); max-height: calc(100vh - 20px); margin: 10px 10px 10px auto; padding: 25px; border: 0; border-radius: 24px; background: var(--surface); }
.side-dialog header { position: sticky; top: 0; z-index: 2; padding-bottom: 14px; background: var(--surface); }
.side-dialog h2 { margin: 0; font-family: Georgia,"Songti SC",serif; }
.catalog-list { display: grid; gap: 7px; }
.catalog-item { display: grid; grid-template-columns: 36px 1fr 52px; gap: 10px; align-items: center; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 13px; background: #f5f4ee; text-align: left; cursor: pointer; }
.catalog-item.active { border-color: var(--coral); background: #fff6f1; }
.catalog-item b { font-family: Georgia,serif; color: var(--coral-dark); }
.catalog-item span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; }
.catalog-item small { color: var(--muted); text-align: right; }
.settings-dialog label { display: grid; grid-template-columns: 1fr auto; gap: 12px; margin: 25px 0; font-weight: 800; }
.settings-dialog input { grid-column: 1/-1; width: 100%; accent-color: var(--coral); }
.theme-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.theme-options button { height: 44px; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.theme-options button.active { border-color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.toast { position: fixed; z-index: 100; left: 50%; top: 18px; max-width: calc(100% - 30px); padding: 11px 17px; border-radius: 12px; background: #17312e; color: white; box-shadow: var(--shadow); font-size: 13px; opacity: 0; pointer-events: none; transform: translate(-50%,-12px); transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%,0); }
.toast.error { background: #a94432; }
.loading-state { min-height: 60vh; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.loader { width: 34px; height: 34px; border: 3px solid #d5e2dc; border-top-color: var(--coral); border-radius: 50%; animation: spin 1.3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 900px) {
  .bottom-nav { position: sticky; top: calc(100vh - 74px); left: auto; bottom: auto; float: left; width: 74px; height: auto; grid-template-columns: 1fr; gap: 4px; margin: 18px 0 -300px max(12px, calc((100vw - 1340px)/2)); padding: 7px; border-radius: 20px; transform: none; }
  .bottom-nav button { min-height: 58px; }
}

@media (max-width: 820px) {
  .hero-panel { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(4,1fr); }
  .stat-card { min-height: 90px; padding: 12px; }
  .stat-card strong { font-size: 25px; }
  .story-grid { grid-template-columns: repeat(2,1fr); }
  .review-layout { grid-template-columns: 1fr; }
  .review-aside { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .access-view { padding: 0; align-items: stretch; }
  .access-card { min-height: 100vh; padding: 38px 23px max(35px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; }
  .wordmark { margin-bottom: 44px; }
  .code-input-wrap { grid-template-columns: 1fr; }
  .code-input-wrap .primary-button { height: 52px; }
  .app-header { height: 62px; padding: 0 14px; }
  .profile-chip { width: 36px; padding: 0; justify-content: center; }
  .profile-chip span:last-child { display: none; }
  .page-shell, .words-page, .review-page, .profile-page { width: min(100% - 26px, 1180px); padding-top: 22px; }
  .hero-panel { padding: 27px 21px; border-radius: 21px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .section-heading { align-items: start; margin-top: 34px; }
  .shelf-tools { width: 100%; flex-direction: column; }
  .section-heading:has(.shelf-tools) { flex-direction: column; }
  .story-grid { grid-template-columns: 1fr; gap: 11px; }
  .story-card { min-height: 178px; padding: 20px; }
  .story-card h3 { margin: 19px 0; font-size: 19px; }
  .reader-toolbar { top: 62px; padding: 8px 9px 0; }
  .reader-tabs { gap: 2px; }
  .reader-tabs button { font-size: 11px; }
  .reader-container { width: min(100% - 34px, 820px); padding-top: 38px; }
  .recall-summary { top: 164px; margin-top: -18px; }
  .recall-input { width: 5.8em; min-width: 76px; height: 34px; font-size: 16px; }
  .reader-fab { right: 15px; bottom: 86px; }
  .word-tools { top: 68px; display: grid; grid-template-columns: 1fr 110px; }
  .word-tools input { grid-column: 1/-1; }
  .word-row { grid-template-columns: 38px 1fr 40px; padding: 10px; }
  .word-row .meaning { grid-column: 2; }
  .word-row .source { grid-column: 2; margin-top: 5px; }
  .word-row .star-button { grid-column: 3; grid-row: 1/4; }
  .review-table-head { display: none; }
  .story-word-row { grid-template-columns: 34px 1fr 38px; padding: 10px 7px; }
  .word-link { display: block; }
  .word-link strong, .word-link small { display: block; min-width: 0; }
  .word-link small { margin-top: 4px; }
  .rounds { grid-column: 2; margin: 3px 8px 5px; }
  .story-word-row .star-button { grid-column: 3; grid-row: 1/3; }
  .review-stage { min-height: 460px; padding: 25px 19px; }
  .review-controls { grid-template-columns: 1fr; }
  .profile-panel dl { grid-template-columns: 1fr; gap: 4px; }
  .profile-panel dd { margin-bottom: 12px; }
  .bottom-dialog { width: 100%; margin-bottom: 0; border-radius: 24px 24px 0 0; }
  #word-dialog { margin: auto auto 0; }
  #word-dialog .dialog-handle { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
