:root {
  color-scheme: light;
  --page: #f5f4f1;
  --paper: #fffefa;
  --directory: #eeefea;
  --ink: #282b29;
  --muted: #777b75;
  --line: #dfdfd8;
  --accent: #496b5b;
  --accent-soft: #e8eee8;
  --radius: 18px;
  font-family: "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--page); color: var(--ink); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.skip-link { position: fixed; z-index: 5; top: 10px; left: 10px; transform: translateY(-150%); background: var(--ink); color: white; padding: 9px 14px; border-radius: 8px; }
.skip-link:focus { transform: none; }
.site-header, .site-footer { max-width: 1120px; margin: auto; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; }
.site-header { border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .04em; }
.brand-mark { color: var(--accent); font-size: 24px; line-height: 1; }
.tent-icon { width: 27px; height: 27px; flex: 0 0 27px; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
nav { display: flex; gap: 28px; font-size: 14px; color: var(--muted); }
nav a:hover, nav a:focus-visible { color: var(--accent); }
.language-label { display: inline-flex; align-items: center; }
.language-select { min-height: 34px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); background: var(--paper); font: inherit; font-size: 12px; }
.language-select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hero { max-width: 1120px; min-height: 480px; margin: auto; padding: 82px 28px 72px; position: relative; }
.hero { isolation: isolate; }
.hero::before { content: ""; position: absolute; z-index: 0; inset: 10px 0 10px; border-radius: 28px; background-image: var(--hero-art); background-size: var(--hero-art-size, cover); background-position: var(--hero-art-position, center 45%); background-repeat: no-repeat; transform: translateX(var(--hero-art-shift, 0%)) scale(var(--hero-art-zoom, 1)) scaleX(var(--hero-art-flip, 1)); }
.hero::after { content: ""; position: absolute; z-index: 1; inset: 10px 0 10px; border-radius: 28px; pointer-events: none; background: linear-gradient(90deg, rgba(245,244,241,.96) 0%, rgba(245,244,241,.82) 39%, rgba(245,244,241,.16) 100%); }
.hero > * { position: relative; z-index: 2; }
.art-credit { display: inline-block; max-width: min(470px, 82%); margin: 21px 0 0; padding: 6px 10px; border-radius: 7px; background: #f5f4f1c9; color: #5e625d; font-size: 11px; line-height: 1.5; }
.art-credit a { text-decoration: underline; text-underline-offset: 2px; }
.eyebrow { margin: 0 0 16px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .15em; }
.eyebrow-dot { display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: #91aa96; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: clamp(44px, 7vw, 76px); line-height: 1.19; font-weight: 500; letter-spacing: .035em; }
h1 span { color: var(--accent); }
.hero-copy { max-width: 510px; margin-bottom: 28px; color: var(--muted); font-size: 16px; }
.primary-link { display: inline-flex; gap: 26px; align-items: center; padding: 11px 17px; border-radius: 999px; background: var(--accent); color: white; font-size: 14px; transition: transform .18s ease, background .18s ease; }
.primary-link:hover { transform: translateY(-2px); background: #385747; }
.hero-note { position: absolute; bottom: 76px; right: 44px; display: flex; align-items: center; gap: 12px; color: #8a8e86; font-family: Georgia, serif; font-size: 13px; }
.note-line { width: 48px; height: 1px; background: #b9bdb5; }
.business-info { padding: 76px max(28px, calc((100vw - 1064px) / 2)) 62px; background: var(--paper); }
.business-heading { max-width: 680px; margin: 0 auto 34px; text-align: center; }
.business-heading .eyebrow { margin-bottom: 9px; }
.business-heading h2 { margin: 0 0 14px; }
.business-lead { margin: 0; color: var(--muted); font-size: 15px; }
.business-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.business-card { min-height: 255px; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--page); }
.business-card-kicker { margin: 0 0 13px; color: var(--accent); font-size: 10px; font-weight: 750; letter-spacing: .13em; }
.business-card h3 { margin: 0 0 12px; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: 23px; font-weight: 550; line-height: 1.35; }
.business-card > p:not(.business-card-kicker):not(.payment-notice):not(.support-note) { margin: 0; color: var(--muted); font-size: 13px; }
.business-card--price { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 28%, var(--line)); }
.price-list { list-style: none; margin: 0; padding: 0; }
.price-list li { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.price-list li span { color: var(--muted); }
.price-list strong { white-space: nowrap; font-size: 16px; }
.price-list small { color: var(--muted); font-weight: 400; }
.launch-price { display: flex; flex-direction: column; gap: 4px; margin: 13px 0 0; }
.business-card--price h3 { color: var(--accent); font-size: clamp(25px, 2.7vw, 30px); }
.launch-price strong { color: var(--muted); font-size: 15px; font-weight: 650; letter-spacing: 0; }
.launch-price strong small { color: var(--muted); font-size: 12px; font-weight: 500; }
.launch-price span { color: var(--muted); font-size: 11px; }
.payment-notice { display: flex; align-items: start; gap: 8px; margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: #bd8966; flex: 0 0 7px; }
.contact-link { display: inline-flex; gap: 6px; margin-top: 17px; color: var(--accent); font-size: 15px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.support-note { margin: 14px 0 0; color: var(--muted); font-size: 11px; }
.business-policies { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-top: 28px; color: var(--muted); font-size: 12px; }
.business-policies a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.business-policies a:hover, .business-policies a:focus-visible { text-decoration-thickness: 2px; }
.directory { padding: 70px max(28px, calc((100vw - 1064px) / 2)) 90px; background: var(--directory); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { margin-bottom: 0; font-family: Georgia, "Noto Serif SC", "Songti SC", serif; font-size: clamp(30px, 4vw, 42px); line-height: 1.28; font-weight: 500; }
.section-intro { max-width: 350px; margin-bottom: 4px; color: var(--muted); font-size: 14px; }
.directory-tools { display: flex; gap: 10px; margin-bottom: 18px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.search-field { flex: 1; min-width: 0; }
.search-field input, .sort-field select { width: 100%; min-height: 42px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 13px; }
.search-field input:focus, .sort-field select:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.sort-field { width: 160px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 24px; }
.filter-chip { padding: 8px 14px; border: 1px solid #d6d9d1; border-radius: 999px; color: #60665e; background: transparent; cursor: pointer; font-size: 13px; }
.filter-chip:hover, .filter-chip.is-active { border-color: var(--accent); background: var(--accent); color: white; }
.filter-chip span { margin-left: 3px; opacity: .7; }
.quiz-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.quiz-card { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 278px; border: 1px solid #e3e3dc; border-radius: var(--radius); background: var(--paper); transition: transform .2s ease, box-shadow .2s ease; }
.quiz-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px #29372d12; }
.card-art { display: grid; min-height: 116px; place-items: center; background: var(--card-tone, var(--accent-soft)); color: var(--card-ink, var(--accent)); font-family: Georgia, serif; font-size: 36px; }
.card-art.has-cover { min-height: 116px; padding: 0; background: var(--card-tone, var(--accent-soft)); }
.card-cover-image { display: block; width: 100%; height: 116px; object-fit: contain; }
.quiz-card--bird .card-art.has-cover { background: var(--card-tone, var(--accent-soft)); }
.quiz-card--bird .card-cover-image { object-fit: contain; object-position: center; mix-blend-mode: multiply; }
.quiz-card--cover .card-cover-image { object-fit: cover; object-position: center; }
.quiz-card--history .card-art { position: relative; }
.history-card-portrait { position: absolute; left: 50%; top: 50%; width: 62px; height: 62px; transform: translate(-50%,-50%); border: 2px solid #68442c; border-radius: 50%; background: #dfc18c url("tests/history-twin/portraits-medieval.png") 0% 0% / 500% 200% no-repeat; box-shadow: 0 0 0 4px #ead5ad, 2px 3px 0 #503322; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 17px 18px 18px; }
.card-meta { margin: 0 0 7px; color: var(--accent); font-size: 11px; letter-spacing: .08em; }
.card-title { margin: 0 0 7px; font-size: 19px; font-weight: 650; }
.card-desc { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.card-details { margin: -7px 0 14px; color: var(--muted); font-size: 11px; letter-spacing: .01em; }
.card-link { align-self: flex-start; margin-top: auto; color: var(--accent); font-size: 13px; font-weight: 650; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:focus-visible::after { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: var(--radius); }
.card-public-link { position: relative; z-index: 1; align-self: flex-start; margin-top: 7px; color: var(--muted); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.card-public-link:hover, .card-public-link:focus-visible { color: var(--accent); }
.card-link[aria-disabled="true"] { color: #92968f; cursor: default; }
.empty-note { color: var(--muted); padding: 24px; text-align: center; }
.about { max-width: 1120px; margin: auto; padding: 90px 28px 95px; }
.about h2 { margin-bottom: 18px; }
.about > p:last-child { max-width: 570px; color: var(--muted); font-size: 14px; }
.site-footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 16px; }
.footer-links a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover, .footer-links a:focus-visible { color: var(--accent); }
.document-page { max-width: 820px; min-height: calc(100vh - 170px); margin: auto; padding: 70px 28px 88px; }
.document-kicker { margin: 0 0 12px; color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.document-page h1 { margin-bottom: 12px; font-size: clamp(38px, 6vw, 58px); }
.document-intro { margin-bottom: 38px; color: var(--muted); }
.document-section { padding: 26px 0; border-top: 1px solid var(--line); }
.document-section h2 { margin: 0 0 12px; font-size: 24px; }
.document-section p { max-width: 700px; margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.document-section p:last-child { margin-bottom: 0; }
.document-return { display: inline-flex; margin-top: 14px; color: var(--accent); font-size: 14px; font-weight: 650; text-decoration: underline; text-underline-offset: 4px; }
.footer-mark { white-space: nowrap; }
body[data-period="night"] { --page: #151a20; --paper: #222a30; --directory: #1b2228; --ink: #f1eee7; --muted: #bec2c4; --line: #39434a; --accent: #718A9A; --accent-soft: #28343d; }
body[data-period="night"] .hero::after { background: linear-gradient(90deg, rgba(16,21,28,.97) 0%, rgba(16,21,28,.85) 42%, rgba(16,21,28,.30) 100%); }
body[data-artwork="garden-reading"] .hero::before, body[data-artwork="garden-reading"] .hero::after { inset: 0; }
body[data-artwork="garden-reading"] .hero::after { background: linear-gradient(90deg, rgba(245,244,241,.86) 0%, rgba(245,244,241,.68) 39%, rgba(245,244,241,.08) 100%); }
body[data-artwork="lantern"] .hero::before { background-color: #17202a; background-image: linear-gradient(90deg, #151a20 0%, #151a20 51%, rgba(21,26,32,.9) 62%, rgba(21,26,32,.3) 76%, transparent 89%), var(--hero-art); background-size: 100% 100%, auto 100%; background-position: center, right center; }
body[data-artwork="sea-wind"] .hero::before { background-size: cover; }
body[data-period="night"][data-artwork="lantern"] .hero::after { background: linear-gradient(90deg, rgba(16,21,28,.98) 0%, rgba(16,21,28,.92) 49%, rgba(16,21,28,.36) 78%, rgba(16,21,28,.20) 100%); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); mask-image: linear-gradient(90deg, #000 0%, #000 54%, transparent 90%); -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 54%, transparent 90%); }
body[data-period="night"] .art-credit { background: #151a20c9; color: #e3dfd5; }
body[data-period="night"] .eyebrow-dot { background: #718A9A; }
body[data-period="night"] .primary-link:hover { background: #607889; }
body[data-period="night"] .filter-chip { color: #d5d9d5; border-color: #4a565a; }
body[data-period="night"] .filter-chip:hover, body[data-period="night"] .filter-chip.is-active { color: #151a20; background: #718A9A; border-color: #718A9A; }
body[data-period="night"] .quiz-card { border-color: #3a4448; }
body[data-period="night"] .card-art { filter: brightness(.74) saturate(.8); }
body[data-period="night"] .card-link { color: #718A9A; }
body[data-period="night"] .card-link[aria-disabled="true"] { color: #9da4a3; }
@media (max-width: 740px) {
  .site-header, .site-footer { padding-left: 20px; padding-right: 20px; }
  nav { gap: 15px; }
  .hero { min-height: 420px; padding: 68px 22px 65px; }
  .hero::before { inset: 10px 8px; }
  .hero-note { right: 22px; bottom: 35px; }
  .business-info { padding: 62px 20px 50px; }
  .business-grid { grid-template-columns: 1fr; }
  .business-card { min-height: 0; }
  .directory { padding: 60px 20px 70px; }
  .section-heading { align-items: start; flex-direction: column; gap: 12px; }
  .section-intro { margin: 0; }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { padding: 68px 22px 75px; }
}
@media (max-width: 480px) {
  .site-header { align-items: start; flex-direction: column; gap: 12px; }
  nav { font-size: 13px; }
  .language-select { font-size: 12px; }
  .hero { min-height: 430px; }
  .hero::before { background-position: 56% center; }
  body[data-artwork="lantern"] .hero::before { background-position: center, right center; background-size: 100% 100%, auto 100%; }
  .quiz-grid { grid-template-columns: 1fr; }
  .directory-tools { flex-direction: column; }
  .sort-field { width: 100%; }
  .quiz-card { min-height: 250px; }
  .site-footer { align-items: start; flex-wrap: wrap; gap: 8px 16px; }
  .footer-links { order: 4; width: 100%; }
  .business-policies { gap: 9px 14px; justify-content: flex-start; }
  .business-policies span { width: 100%; }
  .site-footer p { order: 3; width: 100%; }
  .document-page { padding: 52px 22px 68px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; } }
