/* Shared tokens. Original local artwork, no web fonts or frontend build step. */
:root {
  --page: #f6faf2; --surface: #fff; --primary: #27673b; --primary-hover: #1d4f2e;
  --primary-soft: #e8f5df; --ink: #17342b; --muted: #4c655a; --border: #d1e0cb;
  --button-fill: #69c650; --button-hover: #7bd65e; --button-edge: #3c7a31;
  --warm: #fff4e4; --success: #247b58; --danger: #a13e49;
  --radius-card: 14px; --radius-button: 6px; --content-width: 1120px;
  --world-image: url('images/pixel-landscape-v1.png');
  --font: "Noto Sans TC", "PingFang TC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; isolation: isolate; }
/* One static scene, softened per page. The fixed layer avoids mobile background-attachment quirks. */
.world-quiet { --world-wash: #f6faf2cc; }
.world-home, .world-catalogue, .world-writing { --world-wash: #f6faf25c; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-color: var(--page); background-image: linear-gradient(var(--world-wash), var(--world-wash)), var(--world-image); background-size: cover; background-position: center bottom; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button, a { touch-action: manipulation; }
button:disabled { cursor: not-allowed; opacity: .55; }
button, a, .category-card { transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 5px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 650; }
h1 { font-size: clamp(32px, 3.05vw, 44px); line-height: 1.5; letter-spacing: -.045em; }
h2 { font-size: 23px; line-height: 1.5; letter-spacing: -.025em; }
h3 { font-size: 17px; }
mark { color: var(--primary-hover); background: #d9efe1; padding: 0 5px 3px; border-radius: 5px; }
.container { width: min(var(--content-width), calc(100% - 64px)); margin-inline: auto; }
.icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 20; background: var(--primary); color: #fff; padding: 12px 20px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.site-header { position: sticky; top: 14px; z-index: 20; pointer-events: none; }
.nav-shell { pointer-events: auto; width: min(860px, calc(100% - 64px)); min-height: 60px; padding: 7px 8px 7px 18px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: rgba(252, 254, 249, 0.80); backdrop-filter: blur(14px) saturate(1.35); -webkit-backdrop-filter: blur(14px) saturate(1.35); border: 1px solid rgba(203, 221, 196, 0.9); border-radius: 16px; box-shadow: 0 8px 24px rgba(23, 52, 43, 0.08), 0 1px 0 rgba(255, 255, 255, 0.85) inset; }
.brand { display: flex; align-items: center; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 21px; letter-spacing: -1px; font-weight: 800; line-height: 1; color: var(--ink); }
.brand-light { font-weight: 650; }
.brand-dot { color: var(--button-fill); }
.brand-mark { display: grid; grid-template-columns: 7px 7px; grid-template-rows: 7px 7px; gap: 3px; margin-right: 10px; transition: transform 180ms ease; }
.brand:hover .brand-mark { transform: scale(1.06); }
.brand-mark span { background: var(--primary); border-radius: 1.5px; }
.brand-mark span:last-child { background: var(--button-fill); }
#main-nav { display: flex; align-items: center; gap: 4px; padding: 4px; background: rgba(23, 52, 43, 0.05); border-radius: 12px; }
#main-nav a { display: flex; align-items: center; gap: 6px; padding: 8px 14px; min-height: 38px; border-radius: 9px; font-size: 13.5px; font-weight: 650; color: var(--muted); white-space: nowrap; }
#main-nav a span { font-size: 11.5px; font-weight: 500; opacity: 0.72; }
#main-nav a:hover { background: rgba(255, 255, 255, 0.65); color: var(--ink); }
#main-nav a[aria-current] { color: var(--primary-hover); background: #fff; box-shadow: 0 2px 6px rgba(23, 52, 43, 0.09), 0 0 0 1px rgba(39, 103, 59, 0.14); }
#main-nav a[aria-current] span { color: var(--primary); opacity: 0.9; }
.menu-toggle { padding: 8px; min-height: 40px; min-width: 40px; border: 1px solid rgba(203, 221, 196, 0.9); border-radius: 10px; background: rgba(255, 255, 255, 0.85); color: var(--ink); }
.menu-toggle:hover { background: #fff; border-color: #a9c69f; }
main { min-height: calc(100vh - 202px); }
.eyebrow { font-size: 10px; font-weight: 650; line-height: 1.5; letter-spacing: .15em; color: var(--primary); }
.ink-accent { color: var(--primary); }
.hero { min-height: 100svh; margin-top: -74px; display: flex; align-items: center; justify-content: center; padding: 112px 24px 64px; background-color: #c5eff8; background-image: linear-gradient(180deg, #effbff66, #effbff40 65%, #effbff00), var(--world-image); background-size: cover; background-position: center bottom; border-bottom: 1px solid #bfd8a9; }
.hero-inner { width: min(100%, 900px); text-align: center; }
.hero h1 { font-size: clamp(38px, 4.2vw, 60px); line-height: 1.3; letter-spacing: -.045em; font-weight: 800; }
.hero-description { max-width: 620px; margin: 20px auto 24px; color: #294c42; font-size: 16px; line-height: 1.85; text-wrap: pretty; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .actions { justify-content: center; gap: 16px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 10px; min-height: 48px; padding: 12px 18px; border: 1px solid transparent; border-radius: var(--radius-button); font-size: 13px; font-weight: 650; line-height: 1.6; }
.button .icon { width: 17px; height: 17px; }
.button-primary { background: var(--button-fill); border-color: var(--button-edge); color: var(--ink); box-shadow: 0 4px 0 var(--button-edge); }
.button-primary:hover { background: var(--button-hover); box-shadow: 0 5px 0 var(--button-edge); transform: translateY(-1px); }
.button-secondary { background: var(--surface); border-color: #b8cdb0; color: var(--ink); box-shadow: 0 4px 0 #c3d4ba; }
.button-secondary:hover { background: #f4ffe9; border-color: #8bac7f; transform: translateY(-1px); }
.button-danger { background: var(--danger); color: white; }
.button-danger:hover { background: #822d37; }
.button:active { transform: translateY(3px); box-shadow: none; }
.hero .button { min-height: 52px; padding: 12px 22px; font-size: 15px; }
.hero-example { max-width: 560px; margin: 32px auto 0; padding: 23px 28px; text-align: left; background: #fff; border: 1px solid #c6d9bb; border-radius: 12px; box-shadow: 0 6px 0 #3b763325, 0 14px 36px #245e2814; }
.example-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 16px; }
.example-heading h2 { font-size: 15px; letter-spacing: 0; }
.example-tag { font-size: 10px; color: var(--muted); background: #f0f4ec; border: 1px solid #e3e9df; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
.example-line { display: flex; align-items: center; gap: 17px; padding: 12px 0; }
.example-line p { flex: 1; font-size: 25px; line-height: 1.5; letter-spacing: -.025em; }
.sentence-label { flex-shrink: 0; color: var(--muted); font-size: 12px; }
.example-before p { color: #5c6c62; }
.example-before del { text-decoration-color: #a14e3b; text-decoration-thickness: 2px; }
.example-after { color: var(--primary-hover); border-top: 1px solid #e6eee0; }
.example-after .icon { width: 19px; height: 19px; }
.example-rule { display: flex; align-items: center; gap: 9px; padding-top: 15px; margin-top: 7px; border-top: 1px dashed #d3e0c9; font-size: 13px; color: var(--muted); }
.example-rule strong { color: var(--primary); margin-right: 5px; }
.example-rule .icon { width: 17px; height: 17px; }
.home-details { padding-top: 12px; }
.home-details .progress-section { padding-top: 32px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin-top: 7px; }
.section-heading.compact { margin-bottom: 20px; }
.text-button { background: none; border: 0; padding: 10px 0 10px 10px; min-height: 44px; color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.text-button:hover { color: var(--primary-hover); }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { border: 1px solid var(--border); background: var(--surface); border-radius: 15px; padding: 21px 24px; display: grid; grid-template-columns: 44px 1fr; column-gap: 15px; align-items: center; }
.stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0; color: var(--primary); }
.mint { --tint: #e6f3eb; --tone-ink: #307b63; }
.blue { --tint: #e9f0f8; --tone-ink: #416f99; }
.peach { --tint: #fbefe4; --tone-ink: #95643d; }
.lilac { --tint: #eeebf5; --tone-ink: #756095; }
.warm { --tint: #f6eddb; --tone-ink: #8d6d32; }
.stat-icon, .category-symbol { background: var(--tint, var(--primary-soft)); color: var(--tone-ink, var(--primary)); }
.stat-card p { font-size: 11px; color: var(--muted); margin-bottom: 2px; }
.stat-card strong { font-size: 30px; font-weight: 550; line-height: 1.4; font-variant-numeric: tabular-nums; }
.stat-unit { color: var(--muted); font-size: 11px; }
.stat-caption { grid-column: 2; font-size: 11px; color: var(--muted); }
.storage-note { color: var(--muted); font-size: 12px; margin-top: 14px; }
.next-step { display: flex; align-items: center; gap: 26px; padding: 24px 30px; border-radius: var(--radius-card); background: #eaf3eb; border: 1px solid #dce8dc; margin-top: 24px; }
.next-art { width: 85px; height: 76px; flex-shrink: 0; position: relative; }
.next-art span { display: flex; align-items: center; justify-content: center; position: absolute; background: #fffffb; border: 1px solid #d2e1d1; border-radius: 9px; width: 48px; height: 56px; font: 27px Georgia, serif; color: #4c795a; box-shadow: 0 3px 4px #42684706; }
.next-art span:first-child { top: 0; left: 0; transform: rotate(-12deg); }
.next-art span:last-child { top: 15px; left: 35px; transform: rotate(9deg); background: #f9f4e5; }
.next-copy { flex: 1; }
.next-copy h2 { font-size: 20px; margin: 5px 0; }
.next-copy p:last-child { font-size: 12px; color: var(--muted); }
.next-step .button { white-space: nowrap; }
.learning-path { margin-top: 28px; padding: 32px 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); }
.inline-link { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 12px; font-weight: 600; color: var(--primary); }
.inline-link:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 4px; }
.inline-link .icon { width: 16px; height: 16px; }
.path-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.path-grid article { display: flex; gap: 16px; align-items: start; }
.step-number { font: 650 20px ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--primary); line-height: 1.5; border-top: 3px solid #b7d39c; padding-top: 7px; }
.path-grid h3 { font-size: 14px; margin: 9px 0 5px; }
.path-grid p { font-size: 12px; color: var(--muted); }
.preview-note { border: 1px solid var(--border); border-radius: 10px; background: var(--surface); margin-top: 24px; padding: 16px 20px; color: var(--muted); font-size: 11px; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 42px; margin-bottom: 24px; padding: 24px 20px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); color: var(--muted); font-size: 10px; }
.site-footer > div { display: flex; align-items: center; gap: 15px; }
.footer-brand { font-size: 15px; font-weight: 650; letter-spacing: -.5px; color: var(--ink); }
.footer-brand > span { color: var(--primary); }
.site-footer p { display: flex; align-items: center; gap: 6px; }
.site-footer .icon { width: 13px; height: 13px; }
.edition { font-size: 9px; }
.page-intro { padding: 48px 0 32px; }
.page-intro h1 { margin: 12px 0 14px; font-size: clamp(30px, 2.6vw, 37px); }
.page-intro > p:last-child, .page-intro > div > p:last-child { color: var(--muted); font-size: 13px; }
.catalogue-intro { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.collection-count { display: flex; flex-direction: column; align-items: center; padding: 0 16px; flex-shrink: 0; }
.collection-count strong { font: italic 58px Georgia, serif; color: #587966; line-height: 1.1; }
.collection-count > span { font-size: 10px; letter-spacing: .12em; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.category-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); display: flex; position: relative; min-height: 281px; }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 10px 25px #2146350b; border-color: #a6c7b4; }
.category-card:active { transform: translateY(0); }
.card-content { display: flex; flex-direction: column; padding: 24px; width: 100%; min-width: 0; }
.card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.category-symbol { display: inline-flex; justify-content: center; align-items: center; height: 46px; min-width: 48px; padding: 0 9px; border-radius: 13px; font: 21px Georgia, serif; letter-spacing: -.03em; }
.card-index { font-family: Georgia, serif; font-size: 12px; color: var(--muted); }
.category-english { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.category-card h2 { font-size: 20px; line-height: 1.6; margin-bottom: 9px; }
.category-description { font-size: 13px; line-height: 1.9; color: var(--muted); margin-bottom: 20px; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 13px; border-top: 1px solid #e6eee8; font-size: 12px; color: var(--primary); font-weight: 600; }
.round-arrow { display: inline-flex; justify-content: center; align-items: center; width: 27px; height: 27px; border-radius: 50%; background: #f1f6f2; transition: background-color 180ms; }
.round-arrow .icon { width: 16px; height: 16px; }
.category-card:hover .round-arrow { background: var(--primary-soft); }
.featured { grid-column: span 2; background: #fffbf2; border-color: #e8e2d2; }
.featured .card-content { width: 54%; }
.featured-example { width: 46%; align-self: stretch; margin: 24px 24px 24px 0; border-left: 1px solid #e9e1d1; padding: 15px 0 15px 24px; display: flex; flex-direction: column; justify-content: center; }
.featured-example > span { font-size: 10px; color: #7b6e52; margin-bottom: 12px; }
.featured-example p { font-family: Georgia, serif; font-size: 21px; line-height: 1.45; letter-spacing: -.02em; }
.featured-example p:first-of-type { margin-bottom: 14px; color: #756957; }
.featured-example del { text-decoration-color: #a56850; }
.catalogue-note { display: flex; align-items: center; gap: 17px; padding: 24px 26px; margin-top: 28px; border-radius: 15px; background: #edf4ee; }
.catalogue-note h2 { font-size: 14px; margin-bottom: 4px; }
.catalogue-note p { font-size: 11px; color: var(--muted); }
.note-decoration { margin-left: auto; padding-left: 20px; color: #587966; font: italic 18px Georgia, serif; white-space: nowrap; }
.detail-shell { max-width: 760px; margin: 0 auto; padding: 30px 0 20px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; color: var(--muted); font-size: 12px; }
.back-link .icon { transform: rotate(180deg); width: 16px; height: 16px; }
.back-link:hover { color: var(--primary); }
.topic-header { padding: 26px 0; }
.topic-header .eyebrow { margin-top: 20px; }
.topic-header h1 { margin: 7px 0 12px; }
.topic-header > p:last-child { color: var(--muted); }
.example-panel { padding: 28px; background: white; border: 1px solid var(--border); border-radius: var(--radius-card); }
.example-panel h2 { font-size: 17px; }
.example-panel .section-heading { align-items: center; }
.sentence-row { display: flex; align-items: center; gap: 20px; padding: 20px; background: #f7f8f5; border-radius: 10px; margin-top: 12px; }
.sentence-row > span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sentence-row p { font-size: 20px; font-family: Georgia, serif; flex: 1; }
.sentence-row.corrected { background: var(--primary-soft); color: var(--primary-hover); }
.example-explanation { display: flex; align-items: start; gap: 10px; margin-top: 22px; font-size: 13px; color: var(--muted); }
.example-explanation .icon { margin-top: 2px; }
.availability-note { border: 1px solid var(--border); border-left: 3px solid #bfd6c7; border-radius: 10px; background: var(--surface); margin: 24px 0 0; padding: 20px 22px; }
.availability-note h2 { font-size: 16px; }
.availability-note p { color: var(--muted); font-size: 13px; margin: 8px 0; }
.unavailable-panel { display: flex; flex-direction: column; align-items: center; text-align: center; background: white; border: 1px solid var(--border); border-radius: var(--radius-card); padding: 48px 32px 30px; margin: 12px auto 54px; max-width: 840px; }
.large-icon { width: 68px; height: 68px; border-radius: 22px; margin-bottom: 20px; }
.large-icon .icon { width: 30px; height: 30px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; background: var(--warm); color: #7e653a; border-radius: 20px; padding: 4px 10px; font-size: 11px; margin-bottom: 14px; }
.status-pill .icon { width: 13px; height: 13px; }
.unavailable-panel > p:not(.eyebrow) { color: var(--muted); margin: 16px 0 24px; line-height: 1.9; font-size: 14px; }
.scope-note { font-size: 11px; border-top: 1px solid var(--border); color: var(--muted); margin-top: 38px; padding-top: 20px; width: 100%; }
.error-panel { margin-top: 72px; }
.error-panel h1 { margin-top: 16px; font-size: 30px; }
dialog { width: min(440px, calc(100% - 40px)); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 30px; color: var(--ink); box-shadow: 0 24px 80px #20313b30; }
dialog::backdrop { background: #20392e65; backdrop-filter: blur(3px); }
dialog h2 { font-size: 21px; margin-top: 16px; }
dialog p { font-size: 14px; color: var(--muted); margin: 12px 0 24px; }
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 30; background: var(--ink); color: white; padding: 12px 24px; border-radius: 12px; font-size: 13px; max-width: calc(100% - 32px); box-shadow: 0 5px 20px #20313b25; }
.sample-banner { position: sticky; top: 0; z-index: 15; background: #fff3d4; color: #684b1d; border-bottom: 1px solid #dec995; font-size: 12px; padding: 10px 0; }
.sample-banner > div { display: flex; gap: 12px; align-items: center; }
.sample-banner strong { flex-shrink: 0; letter-spacing: .04em; }
.writing-intro { padding-bottom: 28px; }
.writing-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 24px; }
.writing-card, .writing-guide, .diagnosis-result { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.writing-card { padding: 28px; }
.writing-card-heading { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.writing-card-heading label { font-weight: 650; font-size: 17px; cursor: text; }
#writing-hint { color: var(--muted); font-size: 12px; margin-top: 3px; }
#sentence-input { display: block; width: 100%; min-height: 186px; resize: vertical; border: 1px solid #a7bf9b; border-radius: 9px; background: #fcfefb; padding: 20px; color: var(--ink); font: 21px/1.8 var(--font); overflow-wrap: anywhere; }
#sentence-input::placeholder { color: #607363; opacity: 1; font-size: 18px; }
#sentence-input:disabled { opacity: 1; color: var(--muted); background: #f4f7f0; }
#sentence-input[aria-invalid="true"] { border-color: var(--danger); }
.writing-input-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; color: var(--muted); font-size: 11px; }
.writing-input-meta > span { display: flex; align-items: center; gap: 5px; }
.writing-input-meta .icon { width: 13px; height: 13px; }
#writing-count { font-variant-numeric: tabular-nums; white-space: nowrap; }
#writing-count.over-limit { color: var(--danger); font-weight: 650; }
.writing-submit-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.service-indicator { display: flex; align-items: center; gap: 7px; color: #76603b; font-size: 11px; }
.service-indicator > span[aria-hidden] { width: 7px; height: 7px; border-radius: 50%; background: #b9954b; }
.service-indicator.is-ready { color: var(--primary); }
.service-indicator.is-ready > span[aria-hidden] { background: var(--primary); }
.sentence-bank { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e5dfcf; }
.sentence-bank h3 { font-size: 15px; margin-bottom: 14px; }
.sentence-bank label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sentence-bank select { width: 100%; min-width: 0; min-height: 46px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-button); background: #fff; color: var(--ink); font: inherit; font-size: 13px; }
.sentence-bank #bank-note { font-size: 12px; margin-top: 10px; }
.reviewer-banner { padding: 12px 0; background: #fff2cc; color: #5b4818; border-bottom: 1px solid #d8c58c; font-size: 12px; }
.reviewer-banner strong { margin-right: 12px; }
.reviewer-explanation { margin: 20px 0; padding: 20px; border: 1px solid #d8c58c; background: #fffbeb; border-radius: var(--radius-card); }
.reviewer-explanation h3 { font-size: 14px; margin-bottom: 8px; }
.reviewer-explanation p { font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.explanation-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.writing-scope p { margin: 0; }
.writing-scope p + p { margin-top: 6px; }
.writing-scope [lang="en"] { display: block; margin-top: 5px; font-size: 11px; }
.writing-guide { padding: 26px; background: #fffdf6; }
.writing-guide h2 { font-size: 20px; margin: 12px 0; text-wrap: balance; }
.writing-guide > p:not(.lesson-kicker), .writing-guide li { color: var(--muted); font-size: 13px; line-height: 1.9; }
.writing-guide ol { margin: 16px 0 20px; padding-left: 22px; }
.writing-guide li + li { margin-top: 9px; }
.writing-guide .live-availability { padding-top: 18px; border-top: 1px solid #e5dfcf; font-size: 12px; }
.sample-options { display: grid; gap: 9px; margin-top: 20px; }
.sample-option { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 11px 13px; text-align: left; border: 1px solid #d5dec9; border-radius: 7px; background: white; color: var(--primary); font-size: 13px; }
.sample-option .icon { width: 15px; height: 15px; }
.sample-option:hover { background: #eff7e7; border-color: #93ae7e; transform: translateY(-1px); }
.sample-option:active { transform: translateY(1px); }
.more-samples { margin-top: 18px; font-size: 12px; color: var(--muted); }
.more-samples summary { min-height: 44px; cursor: pointer; display: list-item; padding-block: 12px; }
.more-samples .sample-options { margin-top: 3px; }
.writing-scope { display: flex; align-items: start; gap: 9px; margin-top: 20px; padding: 14px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--muted); font-size: 12px; line-height: 1.9; }
.writing-scope .icon { width: 16px; height: 16px; margin-top: 3px; }
.analysis-loading { margin-top: 28px; transition: border-color 220ms ease, background-color 220ms ease; }
.analysis-loading-row { display: flex; align-items: center; gap: 12px; color: var(--primary); font-size: 14px; margin-bottom: 24px; }
.analysis-loading.is-generating { border-color: #e4be63; border-top: 4px solid #d4961a; background: linear-gradient(180deg, #fffaf0 0%, #ffffff 55%); }
.analysis-generating-banner { margin-bottom: 22px; }
.analysis-generating-head { display: flex; align-items: flex-start; gap: 16px; }
.analysis-generating-kicker { font: 700 10px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .12em; color: #9a6507; margin-bottom: 6px; }
.analysis-generating-banner h2 { font-size: 20px; line-height: 1.45; color: #5c3a04; margin: 0; }
.analysis-generating-detail { font-size: 13px; color: #785a26; margin-top: 6px; line-height: 1.75; }
.analysis-generating-category { display: inline-flex; align-items: center; margin-top: 14px; padding: 5px 12px; border-radius: 999px; background: #fef0cd; border: 1px solid #e7c97c; color: #6e4606; font-size: 12px; font-weight: 650; }
.analysis-spinner { width: 20px; height: 20px; flex-shrink: 0; border: 2px solid #d6e5cb; border-top-color: var(--primary); border-radius: 50%; animation: analysis-spin 800ms linear infinite; }
.analysis-spinner.large { width: 28px; height: 28px; border-width: 3px; border-color: #f3dfb0; border-top-color: #c8860f; margin-top: 4px; }
.skeleton-line { display: block; height: 13px; width: 83%; margin-top: 13px; border-radius: 4px; background: #eef3e9; animation: analysis-fade 1200ms ease-in-out infinite alternate; }
.skeleton-line.short { width: 59%; }
.diagnosis-result { padding: 30px; margin-top: 28px; border-top: 4px solid #c3d1b9; scroll-margin-top: 75px; animation: diagnosis-enter 280ms cubic-bezier(.22, 1, .36, 1); }
.diagnosis-result.is-success { border-top-color: #79ac57; }
.diagnosis-result.is-clean { border-color: #9dd1b1; border-top-color: var(--success); background: linear-gradient(180deg, #effaf3 0%, #ffffff 48%); }
.diagnosis-result.is-clean #result-symbol { background: #d4f2e0; color: var(--success); }
.diagnosis-result.is-clean .diagnosis-heading h2 { color: var(--success); }
.diagnosis-result.is-clean #result-kicker { color: var(--success); }
.diagnosis-result.is-error { border-color: #e8b4ae; border-top-color: #c94a3c; background: linear-gradient(180deg, #fff4f2 0%, #ffffff 48%); }
.diagnosis-result.is-error #result-symbol { background: #fce2df; color: #b53a2d; }
.diagnosis-result.is-error .diagnosis-heading h2 { color: #9f2d21; }
.diagnosis-result.is-error #result-kicker { color: #b53a2d; }
.clean-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: #daf4e4; border: 1px solid #9dd1b1; color: #195f42; font-size: 12px; font-weight: 650; white-space: nowrap; align-self: start; }
.clean-badge .icon { width: 15px; height: 15px; }
.diagnosis-heading { display: flex; align-items: center; gap: 14px; }
.diagnosis-heading > div { flex: 1; min-width: 0; }
.diagnosis-heading h2 { font-size: 22px; margin-top: 6px; text-wrap: balance; }
.diagnosis-heading .example-tag { align-self: start; }
.diagnosis-message { color: var(--muted); font-size: 14px; margin: 18px 0 0; line-height: 1.9; }
.diagnosis-sentences { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 24px; }
.diagnosis-sentence { padding: 22px; background: #f7f8f4; border: 1px solid #e5e9df; border-radius: 10px; min-width: 0; }
.diagnosis-sentence > span, .diagnosis-sentence > div > span:first-child { color: var(--muted); font-size: 11px; }
.diagnosis-sentence > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.diagnosis-sentence p { font-size: 22px; line-height: 1.85; margin-top: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.diagnosis-sentence.corrected { background: #f0f8e9; border-color: #d2e3c4; }
.diagnosis-sentence mark { padding-inline: 3px; }
.diagnosis-sentence .original-error { color: #874b2c; background: #fbe8d6; text-decoration: underline; text-decoration-color: #bd8154; text-underline-offset: 5px; }
.insertion-caret { color: #874b2c; background: #fbe8d6; border-bottom: 2px solid #bd8154; border-radius: 2px; font-weight: 700; }
.diagnosis-explanation { margin-top: 24px; }
.category-label { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.category-label strong { font-size: 13px; color: var(--primary); border: 1px solid #cddfc2; background: #f1f8e9; border-radius: 6px; padding: 4px 10px; }
.category-label > span { color: var(--muted); font-size: 12px; }
.diagnosis-explanation h3 { margin: 20px 0 9px; font-size: 16px; }
.diagnosis-explanation .explanation-pair p { max-width: 84ch; color: var(--muted); font-size: 14px; line-height: 1.95; overflow-wrap: anywhere; }
.diagnosis-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.copy-status { color: var(--muted); font-size: 12px; margin-top: 14px; }
#try-another { margin-top: 14px; padding-left: 0; }
@keyframes analysis-spin { to { transform: rotate(360deg); } }
@keyframes analysis-fade { to { opacity: .45; } }
@keyframes diagnosis-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) {
  .writing-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .writing-guide > .sample-options, .writing-guide .more-samples .sample-options { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .explanation-pair { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sample-banner { font-size: 11px; padding-block: 9px; }
  .sample-banner > div { gap: 9px; align-items: start; }
  .writing-card, .writing-guide, .diagnosis-result { padding: 22px; }
  .writing-card-heading { align-items: start; gap: 11px; margin-bottom: 18px; }
  .writing-card-heading .stat-icon { width: 34px; height: 34px; border-radius: 10px; }
  .writing-card-heading .icon { width: 18px; height: 18px; }
  .writing-card-heading label { font-size: 14px; }
  #writing-hint { font-size: 11px; }
  #sentence-input { min-height: 174px; padding: 15px; font-size: 18px; }
  #sentence-input::placeholder { font-size: 16px; }
  .writing-input-meta { font-size: 10px; gap: 7px; }
  .writing-input-meta > span { gap: 3px; }
  .writing-submit-row { gap: 16px; margin-top: 20px; }
  .writing-submit-row .button { width: 100%; }
  .writing-guide > .sample-options, .writing-guide .more-samples .sample-options { grid-template-columns: minmax(0, 1fr); }
  .writing-guide h2 { font-size: 19px; }
  .diagnosis-heading { gap: 10px; flex-wrap: wrap; }
  .diagnosis-heading .stat-icon { display: none; }
  .diagnosis-heading h2 { font-size: 20px; }
  .diagnosis-heading .example-tag { font-size: 9px; }
  .diagnosis-message { font-size: 13px; }
  .diagnosis-sentences { grid-template-columns: minmax(0, 1fr); }
  .diagnosis-sentence { padding: 17px; }
  .diagnosis-sentence p { font-size: 19px; }
  .diagnosis-explanation > p:last-child { font-size: 13px; }
  .diagnosis-actions > * { width: 100%; }
}
.lesson-kicker { font: 650 10px ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .1em; color: var(--primary); }
.lesson-rule { padding: 28px 30px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid #85b863; border-radius: var(--radius-card); }
.lesson-rule h2 { font-size: 20px; margin: 9px 0 14px; }
.lesson-rule p { color: var(--muted); font-size: 14px; line-height: 1.95; }
.lesson-examples { margin-top: 32px; }
.lesson-examples > .section-heading { margin-bottom: 16px; }
.lesson-examples h2 { font-size: 19px; }
.lesson-examples .example-panel + .example-panel { margin-top: 16px; }
.lesson-examples .example-panel { padding: 20px; }
.lesson-examples .sentence-row:first-child { margin-top: 0; }
.lesson-examples .example-explanation { margin-top: 16px; }
.transfer-note { border-left: 3px solid #9ab6a4; padding: 6px 0 6px 20px; margin: 28px 0; }
.transfer-note h2 { font-size: 15px; margin-bottom: 8px; }
.transfer-note p { font-size: 13px; color: var(--muted); line-height: 1.9; }
.practice-launch { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 26px 28px; background: #edf6e6; border: 1px solid #c9ddb9; border-radius: var(--radius-card); }
.practice-launch h2 { font-size: 21px; margin: 8px 0; }
.practice-launch p:last-child { color: var(--muted); font-size: 12px; }
.practice-launch .button { flex-shrink: 0; }
#practice-session { padding-top: 20px; }
.quiz-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#quiz-title { font-size: 32px; margin: 12px 0 6px; }
.quiz-subtitle { color: var(--muted); font-size: 14px; }
.quiz-progress-label { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12px; margin-top: 28px; color: var(--muted); }
.quiz-progress-label span:first-child { color: var(--primary); font-weight: 650; }
.quiz-steps { display: flex; gap: 7px; margin: 12px 0 24px; }
.quiz-steps > span { flex: 1; height: 7px; background: #dde6d8; border-radius: 2px; transition: background-color 180ms; }
.quiz-steps > .done { background: var(--primary); }
.quiz-steps > .current { background: #8dbd62; }
.quiz-card { background: var(--surface); padding: 32px; border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: 0 6px 0 #21463508; }
.quiz-card fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
.quiz-card legend { font-size: 15px; font-weight: 600; width: 100%; margin-bottom: 20px; }
#question-sentence { font-size: clamp(21px, 2.5vw, 29px); line-height: 1.7; letter-spacing: -.02em; margin-bottom: 24px; overflow-wrap: anywhere; }
#answer-controls { display: grid; gap: 10px; }
.choice-option { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 13px 16px; min-height: 56px; border: 1px solid #d5dfd0; border-radius: 9px; font-size: 15px; line-height: 1.7; transition: border-color 180ms, background-color 180ms; }
.choice-option:hover { border-color: #81a66f; background: #f6fbf2; }
.choice-option:has(input:checked) { border: 2px solid var(--primary); padding: 12px 15px; background: #edf7e5; }
.choice-option input { accent-color: var(--primary); width: 17px; height: 17px; margin: 0; flex-shrink: 0; }
.choice-letter { color: var(--muted); font: 12px ui-monospace, monospace; }
.choice-option > span:last-child { overflow-wrap: anywhere; min-width: 0; }
fieldset:disabled .choice-option { cursor: default; }
.fill-label { font-size: 13px; font-weight: 600; }
#typed-answer { width: 100%; min-height: 54px; border: 1px solid #9bb58d; border-radius: 8px; padding: 12px 16px; color: var(--ink); background: #fbfdf9; font-size: 19px; }
#typed-answer:disabled { background: #f2f5ef; color: #4c655a; opacity: 1; }
.fill-hint { font-size: 12px; color: var(--muted); }
.quiz-actions { display: flex; justify-content: flex-end; padding-top: 24px; }
.quiz-actions .button { min-width: 150px; }
.form-error { padding: 14px 16px; border: 1px solid #dbb4b7; background: #fff4f2; border-radius: 8px; color: #82313c; font-size: 13px; margin-top: 20px; }
.answer-feedback { padding: 20px; background: #edf7e7; border: 1px solid #bad4a8; border-radius: 10px; margin-top: 24px; }
.answer-feedback.incorrect { background: #fff7e9; border-color: #e4cda5; }
.answer-feedback h2 { color: var(--primary-hover); font-size: 16px; margin-bottom: 9px; }
.answer-feedback.incorrect h2 { color: #785022; }
#feedback-answer { font-size: 17px; font-weight: 600; overflow-wrap: anywhere; }
#feedback-explanation { color: var(--muted); margin-top: 8px; font-size: 13px; line-height: 1.9; }
.quiz-footnote { color: var(--muted); font-size: 11px; text-align: center; margin: 20px 0 0; }
.quiz-results { text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card); padding: 32px; margin-top: 28px; }
.result-celebration { width: 66px; height: 66px; display: grid; place-items: center; background: #e8f5df; border: 2px solid #9ac882; border-radius: 14px; box-shadow: 0 4px 0 #d5e7c8; margin: 0 auto 24px; color: var(--primary); animation: result-arrive 220ms ease-out; }
.result-celebration .icon { width: 32px; height: 32px; }
.quiz-results h2 { font-size: 25px; margin: 12px 0 0; }
.result-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 24px 0; margin: 24px 0 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.result-stats > div { display: flex; flex-direction: column; gap: 4px; }
.result-stats > div + div { border-left: 1px solid var(--border); }
.result-stats strong { font-size: clamp(21px, 3vw, 32px); font-weight: 650; color: var(--primary); font-variant-numeric: tabular-nums; }
.result-stats span { color: var(--muted); font-size: 12px; }
.quiz-results > .actions { justify-content: center; margin-top: 24px; }
.missed-review { margin-top: 32px; text-align: left; border-top: 1px solid var(--border); padding-top: 24px; }
.missed-review h3 { font-size: 17px; }
.review-item { padding: 20px; background: #f8faf5; border: 1px solid #e0e8db; border-radius: 10px; margin-top: 16px; overflow-wrap: anywhere; }
.review-item h4 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.review-item p { font-size: 13px; line-height: 1.9; color: var(--muted); margin-top: 8px; }
.review-item .review-sentence { font-size: 18px; color: var(--ink); }
.review-item .review-correct { color: var(--primary); font-weight: 650; }
@keyframes result-arrive { from { transform: translateY(6px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 560px) {
  .lesson-rule, .practice-launch { padding: 22px; }
  .lesson-rule p { font-size: 13px; }
  .lesson-examples > .section-heading { gap: 8px; }
  .lesson-examples h2 { font-size: 17px; }
  .practice-launch .button { width: 100%; }
  .quiz-card, .quiz-results { padding: 22px; }
  #quiz-title { font-size: 29px; }
  .quiz-card legend { font-size: 14px; }
  .choice-option { padding: 12px; gap: 9px; font-size: 14px; }
  .choice-option:has(input:checked) { padding: 11px; }
  .quiz-actions .button { width: 100%; }
  .quiz-progress-label { font-size: 10px; }
  .answer-feedback { padding: 16px; }
  .quiz-results h2 { font-size: 21px; }
  .quiz-results > .actions > * { width: 100%; }
  .result-stats { margin-top: 20px; gap: 4px; }
  .result-stats span { font-size: 10px; }
  .review-item { padding: 16px; }
}
@media (max-width: 1080px) {
  .note-decoration { display: none; }
  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-card { min-height: 270px; }
  .featured .card-content { width: 50%; }
  .featured-example { width: 50%; }
  .stat-card { padding: 18px; gap: 12px; }
  .stat-caption { grid-column: 1 / -1; margin-top: 6px; }
}
@media (max-width: 800px) {
  .hero h1 { font-size: 46px; }
  .stats-grid { gap: 12px; }
  .stat-card { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 18px 12px; gap: 10px; }
  .stat-card p { font-size: 11px; }
  .stat-caption { font-size: 9px; }
  .next-step { gap: 20px; padding: 24px; flex-wrap: wrap; }
  .next-step .button { margin-left: 105px; }
  .next-copy h2 { font-size: 19px; }
  .path-grid { gap: 18px; }
  .path-grid article { gap: 10px; }
  .footer-tagline { display: none; }
  .page-intro h1 { max-width: 560px; }
  .collection-count { display: none; }
  #main-nav a { flex-direction: column; gap: 1px; padding: 6px 12px; font-size: 12px; }
  #main-nav a span { font-size: 10px; }
}
@media (max-width: 560px) {
  .container { width: calc(100% - 32px); }
  .site-header { top: 10px; }
  .nav-shell { width: calc(100% - 32px); min-height: 56px; padding: 8px 10px 8px 14px; flex-wrap: wrap; gap: 0; border-radius: 14px; }
  .brand { font-size: 20px; }
  .menu-toggle:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; }
  #main-nav { width: 100%; justify-content: center; border-top: 1px solid rgba(203, 221, 196, 0.7); padding: 8px 4px 4px; margin-top: 10px; background: transparent; border-radius: 0; }
  #main-nav a { flex: 1; padding: 8px 6px; }
  .nav-shell.menu-ready #main-nav { display: none; }
  .nav-shell.menu-open #main-nav { display: flex; }
  .hero { min-height: 100svh; margin-top: -66px; padding: 96px 20px 44px; }
  .eyebrow { font-size: 9px; letter-spacing: .12em; }
  .hero h1 { font-size: clamp(27px, 8.2vw, 36px); line-height: 1.4; letter-spacing: -.045em; }
  .hero-description { font-size: 14px; line-height: 1.9; margin: 16px auto 22px; }
  .desktop-break { display: none; }
  .hero .actions { gap: 12px; }
  .hero .button { flex: 1; min-width: 0; padding: 12px 10px; font-size: 13px; gap: 7px; }
  .hero .button > .icon:first-child { display: none; }
  .hero-example { padding: 19px 20px; margin-top: 28px; }
  .example-heading { gap: 8px; padding-bottom: 12px; }
  .example-heading h2 { font-size: 13px; }
  .example-line { gap: 10px; padding-block: 12px; }
  .example-line p { font-size: 20px; }
  .sentence-label { font-size: 11px; }
  .example-after .icon { display: none; }
  .example-rule { font-size: 12px; line-height: 1.8; align-items: start; padding-top: 12px; }
  .example-rule .icon { margin-top: 2px; }
  .example-rule strong { display: block; }
  .home-details { padding-top: 4px; }
  .section-heading { align-items: center; gap: 12px; }
  .section-heading h2 { font-size: 21px; }
  .stats-grid { gap: 8px; }
  .stat-card { padding: 16px 7px; border-radius: 12px; gap: 9px; }
  .stat-card .stat-icon { width: 36px; height: 36px; border-radius: 11px; }
  .stat-card .icon { width: 18px; height: 18px; }
  .stat-card p { font-size: 9px; min-height: 15px; }
  .stat-card strong { font-size: 25px; }
  .stat-unit { font-size: 9px; }
  .stat-caption { display: none; }
  .text-button { font-size: 10px; }
  .next-step { gap: 16px; padding: 21px; border-radius: 15px; align-items: start; }
  .next-art { width: 62px; height: 70px; }
  .next-art span { width: 37px; height: 47px; font-size: 23px; }
  .next-art span:last-child { left: 24px; }
  .next-copy { min-width: 0; }
  .next-copy h2 { font-size: 17px; line-height: 1.7; }
  .next-copy p:last-child { font-size: 11px; }
  .next-step .button { margin: 0; width: 100%; }
  .learning-path { padding: 24px 20px; }
  .learning-path .section-heading { flex-wrap: wrap; gap: 4px; }
  .path-grid { grid-template-columns: 1fr; gap: 20px; }
  .path-grid article { gap: 20px; }
  .path-grid h3 { margin-top: 2px; }
  .path-grid p { font-size: 12px; }
  .step-number { width: 34px; flex-shrink: 0; text-align: center; }
  .preview-note { font-size: 10px; line-height: 1.9; }
  .site-footer { flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 30px; padding-block: 23px; font-size: 9px; }
  .edition { width: 100%; }
  .page-intro { padding-top: 32px; padding-bottom: 24px; }
  .page-intro h1 { font-size: 29px; line-height: 1.6; margin: 12px 0; }
  .page-intro h1 .ink-accent { display: block; }
  .page-intro > p:last-child, .page-intro > div > p:last-child { font-size: 12px; }
  .category-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .category-card { min-height: 262px; }
  .card-content { padding: 23px; }
  .card-top { margin-bottom: 14px; }
  .category-description { margin-bottom: 18px; }
  .category-english { font-size: 11px; }
  .category-card h2 { font-size: 22px; }
  .category-description { font-size: 13px; }
  .featured { grid-column: auto; }
  .featured .card-content { width: 100%; }
  .featured-example { display: none; }
  .catalogue-note { padding: 20px; gap: 12px; align-items: start; }
  .catalogue-note .stat-icon { width: 32px; height: 32px; border-radius: 10px; }
  .catalogue-note .icon { width: 17px; height: 17px; }
  .catalogue-note h2 { font-size: 13px; }
  .catalogue-note p { font-size: 11px; line-height: 1.9; }
  .detail-shell { padding-top: 20px; }
  .topic-header h1 { font-size: 30px; }
  .topic-header > p:last-child { font-size: 13px; }
  .example-panel { padding: 20px; }
  .example-panel .section-heading { gap: 6px; }
  .example-panel h2 { font-size: 16px; }
  .sentence-row { flex-wrap: wrap; gap: 7px; padding: 16px; }
  .sentence-row > span { width: 100%; }
  .sentence-row p { font-size: 19px; line-height: 1.7; }
  .example-explanation { font-size: 12px; }
  .unavailable-panel { padding: 32px 22px 24px; margin-top: 0; }
  .unavailable-panel > p:not(.eyebrow) { font-size: 13px; }
  .error-panel { margin-top: 40px; }
  .error-panel h1 { font-size: 26px; }
}
@media (max-width: 360px) {
  .hero .actions { flex-direction: column; }
  .hero .button { flex: auto; }
  .hero-example { padding-inline: 16px; }
  .example-line { flex-wrap: wrap; gap: 3px; }
  .example-line > .sentence-label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
