:root {
  color-scheme: light;
  --paper: #f4efe3;
  --paper-deep: #eae1d0;
  --ink: #292c2c;
  --muted: #77766e;
  --quiet: #a19b8c;
  --line: #d8cebc;
  --red: #a94d3d;
  --red-soft: #c67b68;
  --sage: #b9c9bf;
  --sage-deep: #829b90;
  --gold: #a88950;
  --card: rgba(255, 252, 244, .78);
  --shadow: 0 18px 50px rgba(74, 66, 51, .09);
  --serif: 'Noto Serif SC', 'Songti SC', STSong, serif;
  --hand: 'Ma Shan Zheng', 'Kaiti SC', STKaiti, cursive;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 14% 19%, rgba(255,255,255,.44), transparent 28rem),
    radial-gradient(ellipse at 82% 65%, rgba(210,198,176,.13), transparent 35rem),
    var(--paper);
  font-family: var(--serif);
  font-size: 15px;
  letter-spacing: .055em;
  line-height: 1.8;
  transition: background-color .3s, color .3s;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: '';
  opacity: .15;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.13'/%3E%3C/svg%3E");
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; letter-spacing: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 2px solid var(--red-soft); outline-offset: 3px; }
::selection { background: #d9c4a4; color: #202321; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1280px, calc(100% - 64px));
  height: 82px;
  margin: 0 auto;
  border-bottom: 1px solid rgba(172, 157, 129, .22);
  backdrop-filter: blur(12px);
  background: rgba(244, 239, 227, .76);
}
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 194px; }
.seal {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #f4d8c6;
  outline: 1px solid rgba(255,255,255,.5);
  outline-offset: -4px;
  border-radius: 5px;
  color: #f8ead4;
  background: var(--red);
  box-shadow: 0 3px 10px rgba(130, 58, 43, .15);
  font-size: 18px;
  line-height: 1;
  writing-mode: vertical-rl;
}
.brand-name { display: block; font-size: 21px; font-weight: 600; letter-spacing: .15em; line-height: 1.15; }
.brand-sub { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; letter-spacing: .25em; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: clamp(13px, 2vw, 32px); }
.nav-link { position: relative; padding: 9px 0; color: #5a5a54; font-size: 14px; white-space: nowrap; transition: color .2s; }
.nav-link:hover, .nav-link.active { color: var(--red); }
.nav-link.active::after { position: absolute; right: 0; bottom: 1px; left: 0; width: 5px; height: 5px; margin: auto; border-radius: 50%; background: var(--red); content: ''; }
.header-tools { display: flex; align-items: center; gap: 9px; min-width: 195px; justify-content: flex-end; }
.header-btn, .icon-btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(255,252,244,.42);
  cursor: pointer;
  transition: transform .2s, border-color .2s, background .2s;
}
.header-btn { font-size: 12px; white-space: nowrap; }
.header-btn:hover, .button:hover, .icon-btn:hover { transform: translateY(-2px); border-color: var(--red-soft); }
.kbd { padding: 0 5px; border-radius: 2px; color: var(--muted); background: rgba(130,120,100,.1); font-size: 10px; }
.menu-toggle { display: none; }

.hero {
  position: relative;
  display: grid;
  min-height: 490px;
  overflow: hidden;
  place-items: center;
  isolation: isolate;
  padding: 45px 24px 80px;
  text-align: center;
}
.hero::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background: url('/assets/mountain.svg') center bottom / 100% 82% no-repeat;
  content: '';
}
.hero::after {
  position: absolute;
  z-index: -1;
  top: 15px;
  left: max(0px, calc((100vw - 1380px) / 2));
  width: min(290px, 30vw);
  height: 230px;
  background: url('/assets/plum-branch.svg') left top / contain no-repeat;
  opacity: .9;
  content: '';
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; width: min(830px, 100%); padding-top: 28px; }
.eyebrow { display: flex; align-items: center; justify-content: center; gap: 13px; color: var(--gold); font-size: 12px; letter-spacing: .32em; }
.eyebrow::before, .eyebrow::after { width: 38px; height: 1px; background: #b99e6a; content: ''; }
.hero-title { margin: 15px 0 5px; color: #24292a; font-family: var(--hand); font-size: clamp(60px, 9vw, 106px); font-weight: 400; letter-spacing: .18em; line-height: 1.25; text-shadow: 0 2px 0 rgba(255,255,255,.4); }
.hero-title .seal { display: inline-grid; width: 39px; height: 48px; margin-left: -11px; vertical-align: top; transform: rotate(5deg); font-family: var(--serif); font-size: 17px; }
.hero-poem { margin: 0 0 10px; color: #555952; font-family: var(--hand); font-size: clamp(20px, 3vw, 29px); letter-spacing: .11em; }
.hero-desc { max-width: 610px; margin: 20px auto 25px; color: #696a62; font-size: 14px; letter-spacing: .15em; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.button-primary { border-color: var(--red); color: #fff9ee; background: var(--red); }
.button-primary:hover { border-color: #8e3c30; background: #8e3c30; }
.button-plain { background: rgba(255,252,244,.58); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); width: min(620px, 100%); margin: 33px auto 0; border-top: 1px solid rgba(153,139,114,.28); border-bottom: 1px solid rgba(153,139,114,.28); }
.stat { padding: 11px 8px 9px; color: var(--muted); font-size: 11px; }
.stat + .stat { border-left: 1px solid rgba(153,139,114,.24); }
.stat strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: 19px; font-weight: 500; letter-spacing: .08em; }
.birds { position: absolute; top: 89px; right: 13%; color: rgba(66,79,77,.38); font-size: 25px; letter-spacing: .15em; transform: rotate(-8deg); }

.content-wrap { width: min(1160px, calc(100% - 48px)); margin: 0 auto; padding: 8px 0 80px; }
.section { margin: 50px 0 68px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-kicker { margin: 0 0 3px; color: var(--gold); font-size: 11px; letter-spacing: .28em; }
.section-title { margin: 0; font-family: var(--hand); font-size: 32px; font-weight: 400; letter-spacing: .14em; }
.section-title small { margin-left: 9px; color: var(--muted); font-family: var(--serif); font-size: 12px; letter-spacing: .1em; }
.text-link { color: var(--red); font-size: 12px; white-space: nowrap; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card {
  position: relative;
  overflow: hidden;
  padding: 23px 23px 21px;
  border: 1px solid rgba(193,181,157,.64);
  border-radius: 4px;
  background: var(--card);
  box-shadow: 0 4px 18px rgba(73,63,45,.035);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.card:hover { transform: translateY(-4px); border-color: #c8a79b; box-shadow: var(--shadow); }
.card::before { position: absolute; top: 0; right: 0; left: 0; height: 2px; background: linear-gradient(90deg, var(--red), transparent 82%); content: ''; opacity: .5; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; color: var(--muted); font-size: 11px; }
.category-mark { display: inline-flex; align-items: center; gap: 7px; color: var(--red); }
.category-mark::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ''; }
.card h3 { margin: 0 0 9px; font-size: 18px; font-weight: 600; letter-spacing: .08em; line-height: 1.55; }
.card p { margin: 0; color: #6e706a; font-size: 13px; line-height: 1.9; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 12px; border-top: 1px solid rgba(193,181,157,.45); color: var(--muted); font-size: 11px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { display: inline-flex; padding: 3px 9px; border: 1px solid rgba(183,169,142,.52); border-radius: 99px; color: #69675f; background: rgba(246,241,230,.68); font-size: 10px; letter-spacing: .04em; }
.tag:hover, button.tag:hover { border-color: var(--red-soft); color: var(--red); }
.quote-panel { display: grid; grid-template-columns: 65px 1fr auto; align-items: center; gap: 19px; padding: 25px 30px; border: 1px solid var(--line); background: rgba(230,223,207,.4); }
.quote-seal { display: grid; place-items: center; width: 49px; height: 49px; border: 1px solid var(--red); color: var(--red); font-family: var(--hand); font-size: 22px; transform: rotate(-4deg); }
.quote-text { margin: 0; font-family: var(--hand); font-size: 22px; letter-spacing: .1em; }
.quote-author { color: var(--muted); font-size: 12px; white-space: nowrap; }

.page-hero { position: relative; padding: 85px 20px 77px; overflow: hidden; text-align: center; }
.page-hero::before { position: absolute; z-index: -1; inset: 0; background: url('/assets/mountain.svg') center bottom / 100% 96% no-repeat; content: ''; opacity: .88; }
.page-hero h1 { margin: 8px 0 10px; font-family: var(--hand); font-size: clamp(48px, 7vw, 76px); font-weight: 400; letter-spacing: .2em; line-height: 1.25; }
.page-hero p { max-width: 690px; margin: 0 auto; color: #64675f; font-size: 14px; letter-spacing: .13em; }
.page-body { width: min(1080px, calc(100% - 48px)); min-height: 42vh; margin: 0 auto; padding: 8px 0 85px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.search-input { width: min(390px, 100%); min-height: 44px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: rgba(255,252,244,.72); }
.filter-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 13px 0 22px; }
.filter-pill { padding: 7px 12px; border: 1px solid var(--line); border-radius: 99px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; }
.filter-pill.active, .filter-pill:hover { border-color: var(--red); color: var(--red); background: rgba(169,77,61,.05); }
.timeline { position: relative; margin: 18px 0 0 15px; padding-left: 26px; border-left: 1px solid var(--line); }
.timeline-year { position: relative; margin: 29px 0 14px; color: var(--gold); font-size: 15px; }
.timeline-year::before { position: absolute; top: 10px; left: -31px; width: 9px; height: 9px; border: 1px solid var(--gold); border-radius: 50%; background: var(--paper); content: ''; }
.timeline-card { display: grid; grid-template-columns: 105px 1fr auto; align-items: start; gap: 15px; padding: 17px 0; border-bottom: 1px dashed var(--line); }
.timeline-date { color: var(--muted); font-size: 12px; }
.timeline-card h3 { margin: 0 0 5px; font-size: 16px; }
.timeline-card p { margin: 0; color: var(--muted); font-size: 12px; }
.tag-cloud { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; padding: 18px 0 35px; }
.tag-cloud .tag { padding: 8px 16px; font-size: 13px; }
.empty-state { padding: 45px 15px; color: var(--muted); text-align: center; }

.style-filters { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 16px 0 27px; }
.style-card { padding: 0; text-align: left; cursor: pointer; }
.style-preview { display: flex; align-items: end; justify-content: center; height: 145px; margin: 0 0 17px; padding: 16px; overflow: hidden; background: var(--preview-bg, #ede7db); }
.style-preview span { width: 78%; padding: 12px; border: 1px solid var(--preview-accent, #a94d3d); color: var(--preview-ink, #282c2a); background: var(--preview-paper, #faf6ed); font-family: var(--preview-font, var(--serif)); text-align: center; }
.style-card .card-meta, .style-card h3, .style-card p { margin-right: 19px; margin-left: 19px; }
.style-card .card-foot { margin-right: 19px; margin-left: 19px; }
.palette { display: flex; gap: 4px; }
.palette i { display: block; width: 12px; height: 12px; border: 1px solid rgba(0,0,0,.08); border-radius: 50%; }
.gallery-note { margin: 8px 0 28px; color: var(--muted); font-size: 12px; text-align: center; }

.game-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.game-card { min-height: 220px; cursor: pointer; }
.game-icon { display: grid; place-items: center; width: 47px; height: 47px; margin-bottom: 16px; border: 1px solid rgba(169,77,61,.4); color: var(--red); background: rgba(169,77,61,.055); font-size: 23px; }
.record { color: var(--gold); font-size: 11px; }
.game-hint { margin: 25px 0 0; color: var(--muted); font-size: 12px; text-align: center; }
.game-board { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; width: min(330px, 100%); margin: 17px auto; padding: 9px; border-radius: 6px; background: #b9aa95; touch-action: manipulation; }
.tile { display: grid; min-height: 65px; place-items: center; border-radius: 4px; color: #5b554d; background: #ece4d4; font-size: 23px; font-weight: 600; }
.tile[data-value="0"] { background: rgba(238,230,215,.42); }
.tile[data-value="4"], .tile[data-value="8"] { color: #fffaf0; background: #c98b63; }
.tile[data-value="16"], .tile[data-value="32"] { color: #fffaf0; background: #b96c4e; }
.tile[data-value="64"], .tile[data-value="128"], .tile[data-value="256"], .tile[data-value="512"], .tile[data-value="1024"], .tile[data-value="2048"] { color: #fffaf0; background: #968655; font-size: 18px; }
.game-controls { display: grid; grid-template-columns: repeat(3, 42px); justify-content: center; gap: 5px; margin: 12px auto; }
.game-controls button { min-height: 37px; border: 1px solid var(--line); border-radius: 4px; background: var(--card); cursor: pointer; }
.memory-grid { display: grid; grid-template-columns: repeat(4, minmax(55px, 70px)); justify-content: center; gap: 9px; margin: 20px 0; }
.memory-tile { aspect-ratio: 1; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #e8deca; cursor: pointer; font-size: 25px; }
.memory-tile.open, .memory-tile.matched { color: var(--red); background: #fffaf0; }
.game-score { color: var(--muted); font-size: 13px; text-align: center; }

.tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-card { display: block; min-height: 206px; }
.tool-order { display: block; color: var(--quiet); font-size: 10px; letter-spacing: .2em; }
.tool-seal { display: grid; place-items: center; width: 47px; height: 47px; margin: 12px auto 10px; border: 1px solid #c28d74; color: #fff4e4; background: #a94d3d; font-size: 21px; transform: rotate(-3deg); }
.tool-card h3 { text-align: center; }
.tool-card p { text-align: center; }
.tool-badge { display: block; margin-top: 9px; color: var(--red); font-size: 10px; text-align: center; }
.tool-page { max-width: 820px; }
.tool-workbench { padding: clamp(20px, 4vw, 38px); border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); }
.field-label { display: block; margin: 14px 0 6px; color: #575950; font-size: 12px; }
.field, .field-area, .field-select { width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 3px; color: var(--ink); background: rgba(255,255,255,.56); }
.field-area { min-height: 170px; resize: vertical; line-height: 1.75; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tool-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.tool-output { min-height: 48px; margin-top: 16px; padding: 13px; border: 1px dashed var(--line); color: #51574f; background: rgba(237,232,219,.53); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 13px; overflow-wrap: anywhere; white-space: pre-wrap; }
.tool-note { margin-top: 18px; color: var(--muted); font-size: 11px; }
.checkbox-row { display: flex; gap: 13px; flex-wrap: wrap; margin: 10px 0; color: var(--muted); font-size: 12px; }
.checkbox-row label { display: inline-flex; align-items: center; gap: 6px; }
.color-swatch { width: 100%; height: 100px; border: 1px solid var(--line); background: #a94d3d; }
.color-picker { width: 65px; height: 42px; padding: 2px; border: 1px solid var(--line); background: transparent; cursor: pointer; }
.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; margin-top: 15px; }
.stat-box { padding: 11px 6px; border: 1px solid var(--line); text-align: center; }
.stat-box strong { display: block; color: var(--red); font-size: 17px; font-weight: 500; }
.stat-box span { color: var(--muted); font-size: 10px; }

.about-layout { display: grid; grid-template-columns: 1.4fr .8fr; gap: 24px; align-items: start; }
.about-paper { padding: 28px; border: 1px solid var(--line); background: var(--card); }
.about-paper h2 { margin: 0 0 13px; font-family: var(--hand); font-size: 29px; font-weight: 400; }
.about-paper p { color: #686a63; }
.about-facts { display: grid; gap: 9px; }
.fact-row { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.fact-row span:first-child { color: var(--muted); }
.profile-mark { display: grid; place-items: center; width: 100%; min-height: 190px; margin-bottom: 17px; color: var(--red); background: linear-gradient(145deg, rgba(169,77,61,.09), rgba(185,201,191,.38)); font-family: var(--hand); font-size: 56px; }

.site-footer { position: relative; padding: 44px 24px 29px; border-top: 1px solid rgba(172,157,129,.3); background: rgba(232,224,208,.42); text-align: center; }
.footer-couplet { display: flex; justify-content: center; gap: 35px; margin-bottom: 18px; color: var(--gold); font-family: var(--hand); font-size: 17px; }
.footer-brand { margin: 0 0 7px; font-size: 19px; letter-spacing: .2em; }
.footer-desc { margin: 0 auto 18px; color: var(--muted); font-size: 12px; }
.footer-nav { display: flex; justify-content: center; gap: 19px; flex-wrap: wrap; margin: 18px auto; color: #68675f; font-size: 12px; }
.footer-nav a:hover { color: var(--red); }
.copyright { margin-top: 21px; color: #8b877e; font-size: 10px; letter-spacing: .08em; }
.back-top { position: fixed; right: 22px; bottom: 22px; z-index: 10; display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; color: var(--red); background: rgba(255,252,244,.86); box-shadow: 0 6px 22px rgba(51,47,37,.12); cursor: pointer; opacity: 0; pointer-events: none; transition: opacity .2s; }
.back-top.visible { opacity: 1; pointer-events: auto; }

.overlay { position: fixed; z-index: 50; inset: 0; display: none; align-items: flex-start; justify-content: center; padding: min(12vh, 90px) 18px 24px; overflow-y: auto; background: rgba(32,34,31,.48); backdrop-filter: blur(5px); }
.overlay.open { display: flex; }
.dialog { position: relative; width: min(640px, 100%); padding: 25px; border: 1px solid rgba(255,255,255,.52); border-radius: 5px; background: var(--paper); box-shadow: 0 25px 90px rgba(14,17,15,.32); animation: dialog-in .18s ease-out; }
@keyframes dialog-in { from { transform: translateY(10px); opacity: .2; } to { transform: translateY(0); opacity: 1; } }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.dialog-head h2 { margin: 0; font-family: var(--hand); font-size: 29px; font-weight: 400; letter-spacing: .12em; }
.dialog-close { width: 35px; min-height: 35px; padding: 0; }
.search-results { display: grid; gap: 7px; margin-top: 12px; }
.search-result { display: block; padding: 11px 13px; border: 1px solid transparent; border-radius: 3px; }
.search-result:hover { border-color: var(--line); background: var(--card); }
.search-result small { display: block; color: var(--muted); font-size: 10px; }
.search-result strong { font-size: 14px; }
.toast { position: fixed; z-index: 70; right: 24px; bottom: 24px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 3px; color: #fbf4e7; background: #333a35; box-shadow: var(--shadow); opacity: 0; transform: translateY(8px); transition: .2s; pointer-events: none; font-size: 12px; }
.toast.show { opacity: 1; transform: translateY(0); }
.theme-dark {
  color-scheme: dark;
  --paper: #242927;
  --paper-deep: #303733;
  --ink: #e9e2d4;
  --muted: #aaa99c;
  --quiet: #81857c;
  --line: #4d554e;
  --red: #cf806a;
  --red-soft: #dc9c85;
  --sage: #667970;
  --sage-deep: #91a69a;
  --gold: #c8ab72;
  --card: rgba(45, 52, 47, .86);
  --shadow: 0 18px 50px rgba(0,0,0,.22);
  background:
    radial-gradient(ellipse at 14% 19%, rgba(93,108,98,.13), transparent 28rem),
    #242927;
}
.theme-dark .site-header { border-color: rgba(180,174,152,.13); background: rgba(36,41,39,.84); }
.theme-dark .hero-title, .theme-dark .stat strong { color: #ece3d3; }
.theme-dark .hero-desc, .theme-dark .hero-poem, .theme-dark .page-hero p, .theme-dark .card p, .theme-dark .about-paper p { color: #b7b4a8; }
.theme-dark .page-hero::before, .theme-dark .hero::before { opacity: .26; }
.theme-dark .site-footer { background: rgba(21,25,23,.38); }
.theme-dark .field, .theme-dark .field-area, .theme-dark .field-select, .theme-dark .search-input { color: var(--ink); background: rgba(22,26,24,.45); }
.theme-dark .tool-output { color: #d6d5c8; background: rgba(21,25,23,.55); }
.theme-dark .tag { color: #c6c1b4; background: rgba(35,41,37,.8); }

@media (max-width: 1000px) {
  .site-header { width: calc(100% - 36px); }
  .brand { min-width: 154px; }
  .brand-name { font-size: 18px; }
  .main-nav { gap: 14px; }
  .nav-link { font-size: 12px; }
  .header-tools { min-width: 151px; }
  .header-btn { padding: 7px 9px; }
  .header-btn .kbd { display: none; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .site-header { width: 100%; height: 70px; padding: 0 17px; }
  .brand { min-width: 0; }
  .brand .seal { width: 37px; height: 37px; font-size: 15px; }
  .brand-name { font-size: 17px; }
  .brand-sub { font-size: 9px; }
  .menu-toggle { display: inline-flex; min-width: 37px; padding: 5px 10px; }
  .main-nav { position: absolute; top: 70px; right: 0; left: 0; display: none; flex-direction: column; gap: 0; padding: 8px 18px 17px; border-bottom: 1px solid var(--line); background: var(--paper); box-shadow: 0 12px 20px rgba(48,42,31,.08); }
  .main-nav.open { display: flex; }
  .nav-link { width: 100%; padding: 9px; text-align: center; font-size: 14px; }
  .nav-link.active::after { display: none; }
  .header-tools { min-width: 0; gap: 5px; }
  .header-btn { min-height: 34px; padding: 5px 8px; font-size: 11px; }
  .header-btn .label-theme { display: none; }
  .hero { min-height: 455px; padding: 44px 18px 60px; }
  .hero::before { background-size: auto 76%; }
  .hero::after { top: 15px; left: -23px; width: 180px; height: 150px; opacity: .65; }
  .hero-inner { padding-top: 33px; }
  .hero-title { font-size: clamp(56px, 14vw, 79px); letter-spacing: .12em; }
  .hero-title .seal { width: 30px; height: 38px; margin-left: -6px; font-size: 13px; }
  .hero-poem { font-size: 21px; }
  .hero-desc { max-width: 400px; font-size: 12px; line-height: 2; }
  .birds { top: 50px; right: 6%; }
  .stats { margin-top: 26px; }
  .stat { padding: 8px 4px; font-size: 9px; }
  .stat strong { font-size: 16px; }
  .content-wrap { width: calc(100% - 34px); padding-bottom: 54px; }
  .section { margin: 39px 0 48px; }
  .section-title { font-size: 28px; }
  .card-grid, .tool-grid { grid-template-columns: 1fr; gap: 12px; }
  .card { padding: 20px; }
  .game-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .game-card { min-height: 205px; padding: 16px; }
  .game-card h3 { font-size: 16px; }
  .game-card p { font-size: 11px; }
  .page-hero { padding: 65px 18px 54px; }
  .page-hero h1 { font-size: 51px; }
  .page-hero p { font-size: 12px; line-height: 1.9; }
  .page-body { width: calc(100% - 34px); padding-bottom: 55px; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .timeline-card { grid-template-columns: 72px 1fr; gap: 9px; }
  .timeline-card .tag-row { grid-column: 2; }
  .timeline-card h3 { font-size: 14px; }
  .quote-panel { grid-template-columns: 48px 1fr; gap: 13px; padding: 18px; }
  .quote-seal { width: 42px; height: 42px; font-size: 18px; }
  .quote-text { font-size: 19px; }
  .quote-author { grid-column: 2; }
  .about-layout { grid-template-columns: 1fr; }
  .about-paper { padding: 22px; }
  .field-row { grid-template-columns: 1fr; gap: 2px; }
  .stat-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-couplet { gap: 18px; font-size: 14px; }
  .footer-nav { gap: 12px; }
}
