/*
 * Grid & Card — 全站共用样式
 * 三块结构：① Screen UI ② 首页/闪卡页扩展 ③ @media print（封版打印规则）
 * 打印版式来自 christmas-word-search 试验版封版样张，勿随意改动 print 区。
 */

/* ---------------- ① Screen UI ---------------- */
:root {
  --bg: #fbf7f0;
  --ink: #2f2a24;
  --muted: #857c70;
  --card: #ffffff;
  --line: #e8e0d4;
  --brand: #c0392b;
  --brand-soft: #fbe9e6;
  --green: #2f8f5b;
  --green-soft: #e5f5ed;
  --blue-soft: #e7f0fb;
  --amber: #d98a1f;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(60, 45, 30, 0.06);

  /* 按钮专用色：与首页定稿 .gc-btn 对齐，色值满足 WCAG AA（白字 4.56:1），不影响 --brand 等非按钮元素 */
  --btn-primary: #c94e2b;
  --btn-primary-dark: #b93f20;
  --btn-primary-tint: #fdf0e9;
  --btn-sage: #4f6b4a;
  --btn-sage-soft: #edf3e9;
  --btn-line: #ece2d4;
  --btn-hover-line: #f6cdbf;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

a { color: #8a3329; }
.page { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; }
h1 { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.3px; }
h2 { margin: 0; font-size: 18px; font-weight: 700; }

/* 全站导航 */
.site-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding-bottom: 14px; margin-bottom: 22px; border-bottom: 1px solid var(--line);
}
.site-nav .brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 16px; color: var(--ink); text-decoration: none; }
.site-nav .brand-star { color: var(--brand); font-size: 22px; line-height: 1; }
.site-nav .nav-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-left: auto; }
.site-nav .nav-links a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.site-nav .nav-links a:hover { color: var(--brand); }
.site-nav .nav-links a[aria-current="page"] { color: var(--brand); }

/* 顶部控制栏：主操作保持一行，More 收高阶项 */
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--line);
}
.brand-inline { display: flex; align-items: center; gap: 10px; }
.brand-star { color: var(--brand); font-size: 26px; line-height: 1; }
.controls { display: flex; flex-wrap: nowrap; align-items: flex-end; gap: 8px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field span {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); font-weight: 700;
}
select, .field input, .field textarea {
  font: inherit; font-size: 12px; color: var(--ink);
  padding: 7px 9px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--card);
}
select { padding-right: 24px; cursor: pointer; }
.field input { width: 112px; font-variant-numeric: tabular-nums; }
.advanced { position: relative; }
.advanced > summary {
  list-style: none; white-space: nowrap; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--muted);
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced[open] > summary { background: var(--btn-primary-tint); border-color: var(--btn-hover-line); color: var(--btn-primary-dark); }
.advanced > label {
  position: absolute; right: 52px; top: calc(100% + 6px); z-index: 5;
  padding: 8px; background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: var(--shadow);
}
/* 按钮：统一到首页定稿视觉（珊瑚主按钮 + 鼠尾草绿 hint + 圆角 10px + hover 轻上浮） */
.btn {
  font: inherit; font-size: 12px; font-weight: 700;
  padding: 8px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--btn-line); background: var(--card); color: var(--ink);
  transition: transform .18s ease, background .15s ease, border-color .15s ease, box-shadow .18s ease;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover { background: var(--btn-primary-tint); border-color: var(--btn-hover-line); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--btn-primary); color: #fff; border-color: var(--btn-primary); }
.btn-primary:hover { background: var(--btn-primary-dark); border-color: var(--btn-primary-dark); transform: translateY(-2px); box-shadow: 0 6px 14px rgba(185, 63, 32, 0.22); }
.btn-hint { background: var(--btn-sage-soft); border-color: #cfe0c6; color: #4f6b4a; font-size: 14px; padding: 8px 14px; }
.btn-hint:hover { background: #e3eddc; border-color: var(--btn-sage); }
.btn-print { border-color: var(--btn-line); color: #6b6258; }
.btn-print:hover { border-color: var(--btn-hover-line); background: var(--btn-primary-tint); }
.btn-ghost { background: transparent; color: var(--btn-primary); border-color: transparent; }
.btn-ghost:hover { background: var(--btn-primary-tint); color: var(--btn-primary-dark); border-color: var(--btn-hover-line); }
.timer-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--muted); font-weight: 700; cursor: pointer; padding-bottom: 9px;
}
.timer-toggle input { accent-color: var(--brand); margin: 0; }

/* 大小写显示开关：只改字形，不改题面数据 / 判题 / 答案数据。
   小写 x-height 比大写小，单独放大字号并收紧字距，网格与词库才不会显得发虚。 */
.case-lower .grid .cell,
.case-lower .word-card .word,
.case-lower .print-grid .cell,
.case-lower .print-words li,
.case-lower .flash-word,
.case-lower .pf-word { text-transform: lowercase; letter-spacing: 0; }
/* 上下伸部（b/d/h/k/l 与 g/j/p/y）靠固定格宽 + 弹性居中 + line-height:1 稳住基线 */
.case-lower .grid .cell,
.case-lower .print-grid .cell {
  display: flex; align-items: center; justify-content: center;
  line-height: 1; padding: 0;
}
.case-lower .grid .cell { font-size: calc(var(--cell, 54px) * .58); }
.case-lower .word-card .word { font-size: 15px; }
.case-lower .flash-card .flash-word { font-size: 23px; }
.case-lower .print-grid .cell { font-size: calc(var(--cell, 30px) * .5); }
.case-lower .print-words li { font-size: 12px; }
.case-lower .print-flashcard .pf-word { font-size: 17px; }

/* 词卡区 */
.word-panel {
  margin: 18px 0 20px; background: #fffdf8; border: 1px solid var(--line);
  border-radius: 18px; padding: 18px; box-shadow: var(--shadow);
}
.word-panel-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px;
}
.word-panel-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.word-panel-actions { display: flex; align-items: center; gap: 12px; }
.progress {
  font-size: 15px; font-weight: 700; color: #316a4a;
  background: var(--green-soft); border: 1px solid #c9e6d5;
  border-radius: 999px; padding: 6px 12px; font-variant-numeric: tabular-nums;
}
.word-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 7px; }
.word-card {
  position: relative; flex: 0 1 118px; min-width: 82px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; min-height: 62px; padding: 7px 4px;
  background: var(--card); border: 1px solid var(--line); border-radius: 9px; cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.word-card:hover { transform: translateY(-1px); border-color: #d9c7ae; }
.word-card .icon { font-size: 21px; line-height: 1; }
.word-card .word { font-size: 13px; font-weight: 800; letter-spacing: .8px; color: #332c24; }
.word-card .check { position: absolute; top: 3px; right: 5px; font-size: 12px; opacity: 0; }
.word-card.done { background: var(--green-soft); border-color: #8ccfac; color: #1f6b43; }
.word-card.done .check { opacity: 1; }
.word-card.done .word { color: #1f6b43; text-decoration: line-through; }
.word-card.hinted { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(217, 138, 31, .18); }
.word-card.plain { flex-basis: 96px; min-width: 76px; min-height: 32px; padding: 5px 4px; }
.word-card.plain .word { font-size: 12px; letter-spacing: .4px; }
.timer-wrap { margin-top: 12px; display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--muted); }
.stat-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); font-weight: 700; }
.stat-value { font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.win-banner {
  background: var(--green-soft); color: #1f6b43; border: 1px solid #bfe3cf;
  border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; font-weight: 700; text-align: center;
}
.win-star { color: var(--green); }

/* 棋盘区 */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.board-wrap { min-width: 0; }
.board-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 12px;
}
.board-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.board-scroll { overflow-x: auto; }
.grid {
  display: grid; gap: 3px; background: var(--card); padding: 14px;
  border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); width: max-content;
}
.cell {
  display: flex; align-items: center; justify-content: center;
  width: var(--cell, 54px); height: var(--cell, 54px); border-radius: 8px;
  font-size: calc(var(--cell, 54px) * 0.48); font-weight: 700; color: #3b342c;
  background: #f8f4ec; border: 1px solid transparent; user-select: none; cursor: pointer;
  transition: background .1s ease, color .1s ease, border-color .1s ease;
}
.cell:hover { background: #f0e9dc; }
.cell.preview { background: var(--blue-soft); color: #185a9d; }
.cell.hint { background: #ffe9b8; color: #8a5a06; border-color: var(--amber); box-shadow: 0 0 0 2px rgba(217, 138, 31, .28); }
.cell.found { background: var(--green-soft); color: #175c38; border-color: #8ccfac; box-shadow: inset 0 0 0 1px #8ccfac; animation: cellPop .3s ease; }
@keyframes cellPop { 0% { transform: scale(.86); } 100% { transform: scale(1); } }
.tip { color: var(--muted); font-size: 12px; margin: 12px 2px 0; }
.foot {
  margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--muted);
}
.print-sheets { display: none; }
.seo-note {
  margin-top: 22px; padding: 14px 16px; background: #fffdf8; border: 1px solid var(--line);
  border-radius: 12px; color: var(--muted);
}
.seo-note h2 { font-size: 15px; margin-bottom: 4px; color: var(--ink); }
.seo-note p { margin: 0; font-size: 12px; }

/* ---------------- ② 首页 / 闪卡页扩展 ---------------- */

/* 首页 hero */
.hero {
  background: linear-gradient(160deg, #fffdf8 0%, #fbf1e6 100%);
  border: 1px solid var(--line); border-radius: 20px; padding: 40px 36px; box-shadow: var(--shadow);
}
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.12; letter-spacing: -1px; margin-bottom: 14px; max-width: 20ch; }
.hero h1 .accent { color: var(--brand); }
.hero .lead { font-size: 17px; color: #4a4238; max-width: 62ch; margin: 0 0 22px; }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.hero .cta-row .btn { font-size: 14px; padding: 12px 18px; }
.section-title { font-size: 20px; margin: 36px 0 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.tool-card {
  display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: inherit;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px; box-shadow: var(--shadow); transition: transform .12s ease, border-color .12s ease;
}
.tool-card:hover { transform: translateY(-2px); border-color: #d9c7ae; }
.tool-card .tool-icon { font-size: 30px; line-height: 1; }
.tool-card h3 { margin: 0; font-size: 17px; color: var(--ink); }
.tool-card p { margin: 0; font-size: 13px; color: var(--muted); }
.tool-card .tool-tag { align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--green); background: var(--green-soft); border-radius: 999px; padding: 3px 9px; }
.value-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 16px; }
.value-strip .v { background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.value-strip .v b { display: block; font-size: 14px; margin-bottom: 2px; }
.value-strip .v span { font-size: 12px; color: var(--muted); }

/* 首屏 / 工具下方 100–200 字意图说明（供搜索引擎与 AI 抓取） */
.intent-text {
  margin: 28px 0 0; padding: 20px 22px; background: #fffdf8;
  border: 1px solid var(--line); border-radius: 14px;
}
.intent-text h2 { font-size: 16px; margin-bottom: 8px; }
.intent-text p { margin: 0 0 8px; font-size: 13px; color: #554d42; max-width: 78ch; }
.intent-text p:last-child { margin-bottom: 0; }

/* 套包本地预览（不接支付） */
.pack-preview {
  margin: 28px 0 24px; padding: 22px 24px;
  background: #fffdf8; border: 1px solid var(--line); border-radius: 16px;
}
.pack-preview-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pack-preview-tag {
  display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.6px; color: var(--btn-primary-dark); background: var(--btn-primary-tint);
  border-radius: 999px; padding: 4px 10px; margin-bottom: 6px;
}
.pack-preview-head h2 { font-size: 18px; margin-bottom: 4px; }
.pack-preview-head p { margin: 0; font-size: 12px; color: var(--muted); }
.pack-price { font-size: 20px; font-weight: 800; color: var(--btn-primary-dark); }
.pack-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 12px; }
.pack-item { margin: 0; min-width: 0; }
.pack-item figcaption { display: grid; gap: 3px; margin-top: 7px; }
.pack-item strong { font-size: 12px; }
.pack-item figcaption span { font-size: 11px; color: var(--muted); }
.pack-page-preview { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.pack-preview .download-actions { margin: 16px 0 10px; }
.pack-note { margin: 0; font-size: 11px; color: var(--muted); }

/* 现成 PDF 下载优先区（Nativity / 一年级题单共用） */
.download-hero {
  margin: 18px 0 20px; padding: 20px 22px;
  background: #fffdf8; border: 1px solid var(--line); border-radius: 16px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
}
.download-badge {
  display: inline-block; font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.6px; color: #365830; background: var(--btn-sage-soft);
  border: 1px solid #cfe0c6; border-radius: 999px; padding: 4px 10px; margin-bottom: 8px;
}
.download-specs { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.download-detail { margin: 0; font-size: 12px; color: var(--muted); max-width: 56ch; }
.download-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.download-actions .btn { font-size: 13px; padding: 11px 16px; text-decoration: none; }
.download-hero-secondary { margin-top: -6px; padding: 16px 22px; }
.download-hero-secondary .download-badge { background: #fdf0e9; border-color: #f6cdbf; color: #a9431f; }

.grade-links {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 4px 0 18px; padding: 12px 16px; font-size: 12px;
  background: #fffdf8; border: 1px solid var(--line); border-radius: 12px;
}
.grade-links span { color: var(--muted); font-weight: 700; }
.grade-links a { color: var(--brand); font-weight: 700; text-decoration: none; }
.grade-links a:hover { text-decoration: underline; }
.grade-links a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

.print-check {
  margin: 0 0 14px; padding: 9px 14px; background: var(--btn-sage-soft);
  border: 1px solid #cfe0c6; border-radius: 10px;
  font-size: 12px; color: #3f5b39;
}
.print-check strong { color: #365830; }

.quick-help {
  margin-top: 12px; padding: 12px 16px; background: #fffdf8;
  border: 1px solid var(--line); border-radius: 12px;
}
.quick-help p { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.quick-help p:last-child { margin-bottom: 0; }
.quick-help strong { color: var(--ink); }
.winter-help { margin: 0 0 18px; }

/* 生成器：贴词优先布局 */
.topbar-sub { margin: 0; font-size: 13px; color: var(--muted); text-align: right; }
.start-panel { margin-top: 18px; }
.start-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.start-head h2 { font-size: 17px; }
.btn-sm { font-size: 11px; padding: 6px 10px; }
.word-input-panel .title-input { width: 100%; font-size: 13px; }
.word-input-panel .print-hint {
  margin: 10px 0 0; font-size: 12px; color: var(--muted);
  border-left: 3px solid var(--btn-sage); padding-left: 10px;
}
.options-panel { margin: 0 0 18px; padding: 12px 0 0; border-top: 1px dashed var(--line); }

/* 自定义词表输入（maker 页） */
.word-input-panel {
  margin: 18px 0 20px; background: #fffdf8; border: 1px solid var(--line);
  border-radius: 16px; padding: 16px 18px; box-shadow: var(--shadow);
}
.word-input-panel .field { width: 100%; }
.word-input-panel textarea {
  width: 100%; min-height: 74px; resize: vertical; font-size: 13px; line-height: 1.6;
}
.word-input-panel .input-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.word-input-panel .input-note { font-size: 11px; color: var(--muted); }
.word-input-panel .input-note.err { color: #a93226; font-weight: 700; }

/* 闪卡预览（屏幕） */
.flash-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 8px; }
.flash-card {
  aspect-ratio: 3 / 2; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow); padding: 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
}
.flash-card .flash-word { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.flash-card .flash-icon { font-size: 26px; line-height: 1; }
.flash-card .flash-index { align-self: flex-start; font-size: 10px; color: var(--muted); font-weight: 700; }

@media (max-width: 760px) {
  .pack-items { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-hero { padding: 16px 18px; }
}
@media (max-width: 480px) {
  .pack-items { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .page { padding: 16px 14px 30px; }
  .controls { width: 100%; flex-wrap: wrap; }
  .word-card { flex: 0 1 calc(33.333% - 5px); min-width: 0; }
  .board-head { align-items: flex-start; }
  .hero { padding: 28px 22px; }
}

/* ---------------- ②b 首页视觉层（.gc-home-page 作用域，Screen Only） ---------------- */
/* =========================================================
   Grid & Card — Modern Stationery Home Refresh (Screen Only)
   Palette: Light & lively — Cream (#FFFDF8) + accessible coral (#C94E2B) + sage (#4F6B4A)
   ========================================================= */
.gc-home-page {
  --gc-bg: #fffdf8;
  --gc-surface: #ffffff;
  --gc-surface-soft: #fbf5ec;
  --gc-ink: #453f37;
  --gc-muted: #736a60;
  --gc-line: #ece2d4;
  --gc-ink-blue: #c94e2b;
  --gc-ink-blue-dark: #b93f20;
  --gc-ink-blue-tint: #fdf0e9;
  --gc-sage: #4f6b4a;
  --gc-sage-tint: #edf3e9;
  --gc-font-serif: "Fraunces", Georgia, serif;
  --gc-font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  background: var(--gc-bg);
  color: var(--gc-ink);
  font-family: var(--gc-font-sans);
  line-height: 1.6;
  margin: 0;
}

.gc-home-page .gc-shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.gc-home-page .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* 顶部导航 */
.gc-home-page .gc-nav {
  border-bottom: 1px solid var(--gc-line);
  background: rgba(255, 253, 248, 0.92);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.gc-home-page .gc-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 16px;
}

.gc-home-page .gc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gc-ink);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.gc-home-page .gc-brand-mark {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--gc-ink);
  background: linear-gradient(135deg, var(--gc-ink-blue) 0 50%, var(--gc-sage-tint) 50% 100%);
  box-shadow: 2px 2px 0 var(--gc-line);
}

.gc-home-page .gc-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.gc-home-page .gc-nav-links a {
  text-decoration: none;
  color: var(--gc-muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.gc-home-page .gc-nav-links a:hover {
  color: var(--gc-ink-blue);
}

/* Hero 左右双栏 */
.gc-home-page .gc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 44px;
  align-items: center;
  padding: 52px 0 36px;
}

.gc-home-page .gc-pill {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gc-sage);
  background: var(--gc-sage-tint);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.gc-home-page .gc-hero-title {
  font-family: var(--gc-font-serif);
  font-size: clamp(2.1rem, 4vw, 3.15rem);
  line-height: 1.14;
  letter-spacing: -0.025em;
  font-weight: 600;
  margin: 0 0 18px;
  color: var(--gc-ink);
}

.gc-home-page .gc-hero-lead {
  font-size: 1.04rem;
  color: var(--gc-muted);
  margin: 0 0 26px;
  max-width: 54ch;
}

.gc-home-page .gc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.gc-home-page .gc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--gc-font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px 20px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.18s ease;
}

.gc-home-page .gc-btn-sm {
  padding: 10px 16px;
  font-size: 0.88rem;
}

.gc-home-page .gc-btn-primary {
  background: var(--gc-ink-blue);
  color: #ffffff;
}

.gc-home-page .gc-btn-primary:hover {
  background: var(--gc-ink-blue-dark);
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(185, 63, 32, 0.22);
}

.gc-home-page .gc-btn-secondary {
  background: var(--gc-surface);
  color: var(--gc-ink);
  border-color: var(--gc-line);
}

.gc-home-page .gc-btn-secondary:hover {
  border-color: #f6cdbf;
  background: var(--gc-ink-blue-tint);
  color: var(--gc-ink-blue-dark);
}

.gc-home-page .gc-hero-note {
  font-size: 0.84rem;
  color: var(--gc-muted);
  margin: 0;
}

/* 三件套纸张叠放预览 */
.gc-home-page .gc-hero-stack {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gc-home-page .gc-sheet {
  background: var(--gc-surface);
  border: 1px solid var(--gc-line);
  border-radius: 12px;
  box-shadow: 0 1px 0 #ffffff inset, 0 14px 32px rgba(90, 72, 58, 0.07);
  padding: 14px;
  width: 240px;
  transition: transform 0.25s ease;
}

.gc-home-page .gc-sheet-front {
  position: relative;
  z-index: 3;
  transform: rotate(-1.2deg);
}

.gc-home-page .gc-sheet-back-right {
  position: absolute;
  right: 10px;
  top: 10px;
  transform: rotate(9deg);
  background: #fffaf3;
  z-index: 2;
}

.gc-home-page .gc-sheet-back-left {
  position: absolute;
  left: 10px;
  bottom: 10px;
  transform: rotate(-10deg);
  background: var(--gc-surface-soft);
  z-index: 1;
}

.gc-home-page .gc-hero-stack:hover .gc-sheet-front {
  transform: rotate(-0.4deg) translateY(-4px);
}

.gc-home-page .gc-hero-stack:hover .gc-sheet-back-right {
  transform: rotate(12deg) translate(6px, -4px);
}

.gc-home-page .gc-hero-stack:hover .gc-sheet-back-left {
  transform: rotate(-13deg) translate(-6px, 4px);
}

.gc-home-page .gc-sheet-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.72rem;
  margin-bottom: 8px;
  color: var(--gc-ink);
}

.gc-home-page .gc-sheet-top span,
.gc-home-page .gc-sheet-tag {
  font-size: 0.66rem;
  color: var(--gc-muted);
  margin-bottom: 6px;
  display: block;
}

.gc-home-page .gc-mini-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
  margin-bottom: 8px;
}

.gc-home-page .gc-mini-grid span {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  font-weight: 600;
  border: 1px solid #ece2d4;
  border-radius: 3px;
  color: var(--gc-ink);
}

.gc-home-page .gc-mini-grid-key span.hit {
  background: var(--gc-sage-tint);
  border-color: #cfe0c6;
  color: var(--gc-sage);
}

.gc-home-page .gc-sheet-bank {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px 8px;
  font-size: 0.62rem;
  color: var(--gc-muted);
}

.gc-home-page .gc-mini-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}

.gc-home-page .gc-mini-cards span {
  border: 1px dashed #e8d8c8;
  border-radius: 6px;
  padding: 10px 6px;
  text-align: center;
  font-size: 0.66rem;
  font-weight: 600;
  background: var(--gc-surface);
}

/* 即贴即试条 */
.gc-home-page .gc-quicktry {
  background: var(--gc-surface);
  border: 1px solid var(--gc-line);
  border-radius: 14px;
  padding: 18px 22px;
  margin-bottom: 44px;
}

.gc-home-page .gc-quicktry-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.gc-home-page .gc-quicktry-head h2 {
  font-size: 0.92rem;
  font-weight: 700;
  margin: 0;
}

.gc-home-page .gc-link-reset {
  background: none;
  border: none;
  color: var(--gc-ink-blue);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.gc-home-page .gc-link-reset:hover {
  color: var(--gc-ink-blue-dark);
  text-decoration: underline;
}

.gc-home-page .gc-quicktry-form {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.gc-home-page #gc-quick-words {
  flex: 1 1 320px;
  padding: 10px 14px;
  border: 1px solid var(--gc-line);
  border-radius: 10px;
  font-family: var(--gc-font-sans);
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--gc-ink);
  background: var(--gc-bg);
  min-height: 84px;
  resize: vertical;
}
.gc-home-page .gc-quicktry-btns { align-self: center; }

.gc-home-page #gc-quick-words:focus {
  outline: 2px solid rgba(201, 78, 43, 0.22);
  border-color: var(--gc-ink-blue);
  background: var(--gc-surface);
}

.gc-home-page .gc-quicktry-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 三工具卡片 */
.gc-home-page .gc-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 48px;
}

.gc-home-page .gc-tool-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  background: var(--gc-surface);
  border: 1px solid var(--gc-line);
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.gc-home-page .gc-tool-card:hover {
  transform: translateY(-2px);
  border-color: #f6cdbf;
}

.gc-home-page .gc-tool-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gc-ink-blue);
  background: var(--gc-ink-blue-tint);
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.gc-home-page .gc-tool-badge.gc-badge-sage {
  color: var(--gc-sage);
  background: var(--gc-sage-tint);
}

.gc-home-page .gc-tool-card h3 {
  font-family: var(--gc-font-serif);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 8px;
}

.gc-home-page .gc-tool-card p {
  font-size: 0.92rem;
  color: var(--gc-muted);
  margin: 0 0 18px;
  flex: 1;
}

.gc-home-page .gc-tool-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--gc-ink-blue);
}

/* 现成题单直达区 */
.gc-home-page .gc-printables { margin-bottom: 44px; }
.gc-home-page .gc-printables-head { margin-bottom: 16px; }
.gc-home-page .gc-printables-head h2 {
  font-family: var(--gc-font-serif); font-size: 1.3rem; font-weight: 600;
  margin: 0 0 4px; color: var(--gc-ink);
}
.gc-home-page .gc-printables-head p { margin: 0; font-size: 0.9rem; color: var(--gc-muted); }
.gc-home-page .gc-printables-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
}
.gc-home-page .gc-printable-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit;
  background: var(--gc-surface); border: 1px solid var(--gc-line);
  border-radius: 14px; padding: 18px 20px;
  transition: transform 0.16s ease, border-color 0.16s ease;
}
.gc-home-page .gc-printable-card:hover { transform: translateY(-2px); border-color: var(--gc-ink-blue); }
.gc-home-page .gc-printable-tag {
  align-self: flex-start; font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--gc-sage); background: var(--gc-sage-tint);
  padding: 3px 9px; border-radius: 6px; margin-bottom: 2px;
}
.gc-home-page .gc-printable-card strong { font-size: 1rem; color: var(--gc-ink); }
.gc-home-page .gc-printable-meta { font-size: 0.82rem; color: var(--gc-muted); flex: 1; }
.gc-home-page .gc-printable-cta { font-size: 0.85rem; font-weight: 600; color: var(--gc-ink-blue); }

/* 四个核心体验点 */
.gc-home-page .gc-values {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--gc-line);
  border-bottom: 1px solid var(--gc-line);
  margin-bottom: 44px;
}

.gc-home-page .gc-value-item h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 6px;
}

.gc-home-page .gc-value-item p {
  font-size: 0.88rem;
  color: var(--gc-muted);
  margin: 0;
}

/* 意图说明 + FAQ */
.gc-home-page .gc-editorial {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  margin-bottom: 56px;
}

.gc-home-page .gc-editorial h2 {
  font-family: var(--gc-font-serif);
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0 0 12px;
}

.gc-home-page .gc-intent-box p {
  font-size: 0.92rem;
  color: var(--gc-muted);
  margin: 0;
}

.gc-home-page .gc-faq-list details {
  background: var(--gc-surface);
  border: 1px solid var(--gc-line);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
}

.gc-home-page .gc-faq-list summary {
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
}

.gc-home-page .gc-faq-list details p {
  font-size: 0.88rem;
  color: var(--gc-muted);
  margin: 8px 0 0;
}

/* 页脚 */
.gc-home-page .gc-footer {
  border-top: 1px solid var(--gc-line);
  padding: 24px 0;
  font-size: 0.86rem;
  color: var(--gc-muted);
}

.gc-home-page .gc-footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.gc-home-page .gc-footer-links {
  display: flex;
  gap: 18px;
}

.gc-home-page .gc-footer-links a {
  color: var(--gc-muted);
  text-decoration: none;
}

.gc-home-page .gc-footer-links a:hover {
  color: var(--gc-ink-blue);
}

@media (max-width: 900px) {
  .gc-home-page .gc-hero,
  .gc-home-page .gc-editorial {
    grid-template-columns: 1fr;
  }

  .gc-home-page .gc-tools-grid,
  .gc-home-page .gc-printables-grid {
    grid-template-columns: 1fr;
  }

  .gc-home-page .gc-values {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .gc-home-page .gc-values,
  .gc-home-page .gc-printables-grid {
    grid-template-columns: 1fr;
  }

  .gc-home-page .gc-hero-stack {
    min-height: 290px;
  }

  .gc-home-page .gc-sheet {
    width: 205px;
  }
}

/* ---------------- ②c 可访问性收尾（Screen Only） ---------------- */
/* 键盘焦点：所有可交互元素在 Tab 导航时都要看得见（WCAG 2.4.7 / HIG Vision） */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #c94e2b;
  outline-offset: 2px;
}

/* 系统开启“减少动态效果”时：取消按钮上浮与纸张散开，保留静态纸张角度 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn-primary:hover,
  .gc-home-page .gc-btn-primary:hover,
  .gc-home-page .gc-tool-card:hover {
    transform: none;
  }
  .gc-home-page .gc-hero-stack:hover .gc-sheet-front {
    transform: rotate(-1.2deg);
  }
  .gc-home-page .gc-hero-stack:hover .gc-sheet-back-right {
    transform: rotate(9deg);
  }
  .gc-home-page .gc-hero-stack:hover .gc-sheet-back-left {
    transform: rotate(-10deg);
  }
}

/* ---------------- ③ 打印规则（封版，勿随意改动） ---------------- */
@media print {
  @page { margin: 14mm; }
  :root { --bg: #fff; }
  html, body { background: #fff !important; }
  .page { padding: 0; margin: 0; max-width: none; }
  /* 隐藏全站导航、控制按钮、说明与意图文本，只留打印页 */
  .site-nav, .topbar, .word-panel, .board-head, .tip, .win-banner,
  .foot, .seo-note, .intent-text, .word-input-panel,
  .flash-preview, .print-toolbar { display: none !important; }
  .page > *:not(.print-sheets) { display: none !important; }
  .print-sheets { display: block !important; }

  /* ---- 拼字：题单一页 + 答案一页 ---- */
  .print-sheet {
    break-after: page; page-break-after: always;
    display: flex; flex-direction: column; align-items: center; min-height: 230mm;
  }
  .print-sheet:last-child { break-after: auto; page-break-after: auto; }
  /* 页眉 / 规则 / 词库 / 页脚统一对齐到网格实际列宽 */
  .print-sheet-head, .print-instruction, .print-body, .print-foot { width: var(--print-col-w); }
  .print-sheet-head { margin-bottom: 0; }
  /* 主标题居中独占一行；Hard 档下方带极轻居中提示 */
  .print-title-row { display: flex; flex-direction: column; align-items: center; }
  .print-sheet-head h1 { font-size: 24px; margin: 0; text-align: center; }
  .print-title-hint { font-size: 10px; font-weight: 700; color: #8a99a8; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
  /* 题单页：左 Name / 右 Date 两端对齐，与网格左右齐平 */
  .print-name-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; margin: 8px 0 0; }
  .print-name-field { display: inline-flex; align-items: baseline; gap: 6px; }
  .print-handwrite { display: inline-block; width: 200px; border-bottom: 1px solid #333; transform: translateY(-2px); }
  .print-handwrite.short { width: 140px; }
  .print-word-icon { display: inline-flex; align-items: center; justify-content: center; width: 13px; height: 13px; color: #3b5d78; flex: 0 0 auto; }
  .print-word-icon svg { width: 100%; height: 100%; display: block; }
  .print-instruction { font-size: 14px; margin: 8px 0 0; color: #333; text-align: center; white-space: nowrap; }
  /* 网格在上、词表在下，留出呼吸间距 */
  .print-body { display: flex; flex-direction: column; align-items: center; gap: 18px; }
  .print-grid {
    display: grid !important; gap: 2px; background: #fff !important; padding: 0 !important;
    border: 1px solid #9aa8b5 !important; border-radius: 2px !important;
    box-shadow: none !important; width: max-content; margin: 0;
  }
  .print-grid .cell {
    width: var(--cell, 30px); height: var(--cell, 30px); font-size: calc(var(--cell, 30px) * .5);
    border: 1px solid #c3cfda !important; border-radius: 1px !important;
    background: #fff !important; color: #000 !important; box-shadow: none !important; animation: none !important;
  }
  .print-grid .cell.answer { background: #e8f1ec !important; border-color: #9fc4ad !important; color: #1f513d !important; }
  .print-words { width: 100%; }
  .word-bank { border-top: 1px solid #d6dde4; padding-top: 3px; width: 100%; }
  .word-bank-label {
    text-align: center; font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase;
    color: #3b5d78; font-weight: 700; margin-bottom: 4px;
  }
  .print-words ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
  .print-words li {
    display: flex; align-items: center; justify-content: flex-start; gap: 6px;
    font-size: 12px; font-weight: 700; background: #f6f9fc; border: 1px solid #dbe4ef;
    border-radius: 6px; padding: 5px 8px;
  }
  .print-box {
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 13px; width: 13px; height: 13px; border: 1px solid #666; border-radius: 2px;
    font-size: 9px; line-height: 1;
  }
  .print-words li.answer .print-box { background: var(--green); border-color: var(--green); color: #fff; }
  .print-foot {
    margin-top: auto; padding-top: 6px; border-top: 1px solid #e6ebf0;
    text-align: center; font-size: 8px; color: #8a99a8;
  }
  .print-words.hard ul { grid-template-columns: repeat(4, 1fr); gap: 3px; }
  .print-words.hard li { justify-content: center; font-size: 11px; padding: 2px 4px; background: transparent; border: 0; border-radius: 0; }
  .print-seed { margin: 8px 0 0; font-size: 10px; color: #555; }
  .print-coords { margin-left: auto; font-size: 8px; font-weight: 400; color: #555; }

  /* ---- 闪卡：正反两页，长边翻转左右镜像对齐 ---- */
  .card-sheet {
    break-after: page; page-break-after: always;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    min-height: 230mm;
  }
  .card-sheet:last-child { break-after: auto; page-break-after: auto; }
  .card-sheet-head { width: 100%; text-align: center; margin-bottom: 14px; }
  .card-sheet-head h1 { font-size: 20px; margin: 0; }
  .card-sheet-head .card-sheet-sub { font-size: 11px; color: #8a99a8; letter-spacing: 1px; text-transform: uppercase; margin-top: 2px; }
  .card-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
    width: 100%;
  }
  .card-grid.back { direction: rtl; }
  .card-grid.back .print-flashcard { direction: ltr; }
  .print-flashcard {
    aspect-ratio: 3 / 2; border: 1px solid #c3cfda; border-radius: 2px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    break-inside: avoid; page-break-inside: avoid; background: #fff;
  }
  .print-flashcard .pf-word { font-size: 17px; font-weight: 800; letter-spacing: 1px; color: #2f2a24; }
  .print-flashcard .pf-icon { width: 20px; height: 20px; color: #3b5d78; }
  .print-flashcard .pf-icon svg { width: 100%; height: 100%; display: block; }
  .card-sheet-foot { margin-top: auto; font-size: 8px; color: #8a99a8; text-align: center; width: 100%; }
}
