*, *::before, *::after { box-sizing: border-box; }
:root { color-scheme: light; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  --surface: #faf9f6;
  --paper: #fffdf9;
  --ink: #231f22;
  --soft: #575057;
  --line: #ddd7d3;
  --accent: #76372d;
  --on-accent: #fff;
  --hero: #efded4;
  --hero-ink: #3b241d;
  --hero-muted: #59423a;
  --mark: #a34d38;
  --tones: #f0e5de;
  --radius: 14px;
  --heading: Georgia, 'Times New Roman', serif;
  --body: 'Segoe UI', system-ui, sans-serif;
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 1rem/1.58 var(--body);
}
.theme-writing {
  --surface: #f9f8ff; --paper: #fff; --ink: #251d38; --soft: #514862;
  --line: #dcd6ed; --accent: #5531a4; --hero: #e8e1ff; --hero-ink: #291c4f;
  --hero-muted: #51426f; --mark: #6d46c8; --tones: #efe9ff;
  --radius: 20px; --heading: 'Segoe UI', system-ui, sans-serif;
}
.theme-design {
  --surface: #f7f7f4; --paper: #fff; --ink: #18191b; --soft: #47484f;
  --line: #d5d6d8; --accent: #202bc0; --hero: #ebebff; --hero-ink: #15192b;
  --hero-muted: #3e435a; --mark: #2934e3; --tones: #e9eaff;
  --radius: 0px; --heading: 'Segoe UI', Arial, sans-serif;
}
.theme-games {
  --surface: #f6f2e7; --paper: #fffdf6; --ink: #1e2c24; --soft: #485449;
  --line: #d7d4c4; --accent: #2b6043; --hero: #203a2d; --hero-ink: #fcf5e4;
  --hero-muted: #e6e7d6; --mark: #356a4d; --tones: #e4eadc;
  --radius: 10px;
}
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
a:hover { text-decoration-thickness: 0.13em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
img { display: block; max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.12; }
h1, h2 { font-family: var(--heading); }
h1 { font-size: clamp(2.35rem, 5.1vw, 4.35rem); letter-spacing: -0.047em; }
h2 { font-size: clamp(1.58rem, 2.8vw, 2.24rem); letter-spacing: -0.035em; }
h3 { font-size: 1.15rem; }
main { min-height: 57vh; }
main:focus { outline: none; }
.container { width: min(100% - clamp(2rem, 8vw, 7.5rem), 75rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: 0.6rem; left: 1rem; padding: 0.6rem 1rem; background: var(--paper); transform: translateY(-180%); }
.skip-link:focus { transform: none; }
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead { min-height: 4.55rem; display: flex; justify-content: space-between; align-items: center; gap: 1.15rem; }
.brand, .footer-brand { font-family: var(--heading); font-weight: 750; font-size: clamp(1.25rem, 2.6vw, 1.94rem); letter-spacing: -0.055em; line-height: 1; text-decoration: none; }
.brand { display: inline-flex; align-items: center; gap: 0.65rem; }
.brand-mark { display: inline-flex; position: relative; justify-content: center; align-items: center; gap: 2px; background: var(--mark); width: 2rem; height: 2rem; flex: 0 0 2rem; border-radius: 50%; }
.brand-mark i { display: block; background: #fff; width: 3px; height: 12px; border-radius: 2px; transform: rotate(24deg); }
.theme-writing .brand-mark { border-radius: 8px; }
.theme-writing .brand-mark i { transform: none; height: 8px; }
.theme-writing .brand-mark i:nth-child(2) { height: 14px; }
.theme-design .brand-mark { border-radius: 0; }
.theme-design .brand-mark i { transform: rotate(34deg); border-radius: 0; height: 19px; }
.theme-games .brand-mark { border-radius: 7px; transform: rotate(-7deg); }
.theme-games .brand-mark i { width: 3px; height: 3px; transform: none; }
.theme-games .brand-mark i:first-child { margin-top: 8px; }
.theme-games .brand-mark i:last-child { margin-bottom: 8px; }
.search-link { display: inline-flex; min-height: 2.55rem; align-items: center; justify-content: center; gap: 0.55rem; border: 1px solid var(--line); border-radius: var(--radius); padding: 0.43rem 0.82rem; font-size: 0.92rem; white-space: nowrap; font-weight: 650; text-decoration: none; }
.search-link:hover, .search-link[aria-current] { background: var(--tones); border-color: var(--accent); }
.search-icon { position: relative; display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid currentColor; margin: 0 3px 3px 0; }
.search-icon::after { content: ''; position: absolute; height: 1.5px; width: 6px; right: -5px; bottom: -2px; background: currentColor; transform: rotate(47deg); }
.primary-nav { display: flex; flex-wrap: wrap; column-gap: clamp(1rem, 2vw, 2.25rem); }
.primary-nav a { display: block; color: var(--soft); font-size: 0.92rem; font-weight: 650; padding: 0.55rem 0.06rem 0.65rem; white-space: nowrap; text-decoration: none; border-bottom: 3px solid transparent; }
.primary-nav a:hover, .primary-nav a[aria-current] { border-bottom-color: var(--accent); color: var(--accent); }
.primary-nav a:focus-visible { outline-offset: -3px; }
.mobile-topics { display: none; }
.theme-design .site-header { border-bottom: 2px solid var(--ink); }
.theme-games .site-header { background: #1c2d25; color: var(--hero-ink); }
.theme-games .primary-nav a { color: var(--hero-muted); }
.theme-games .primary-nav a:hover, .theme-games .primary-nav a[aria-current] { color: #ecd18f; border-bottom-color: #ecd18f; }
.theme-games .site-header .search-link { border-color: #708474; }
.theme-games .site-header .search-link:hover, .theme-games .site-header .search-link[aria-current] { background: #32523f; }
.theme-games .site-header a:focus-visible { outline-color: #e9cb87; }

.hero { display: grid; grid-template-columns: 1fr 1fr; min-height: 25rem; margin-block: clamp(1.45rem, 4vw, 3.35rem) 0; color: var(--hero-ink); background: var(--hero); border-radius: var(--radius); overflow: hidden; }
.hero-copy { align-self: center; padding: clamp(1.75rem, 4.6vw, 4.1rem); }
.eyebrow { font-size: 0.88rem; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 0.72rem; }
.hero .eyebrow { color: inherit; }
.hero h1 { max-width: 11.2ch; }
.hero-intro { max-width: 32rem; margin-top: 1.18rem; color: var(--hero-muted); font-size: clamp(1rem, 1.75vw, 1.19rem); }
.button { display: inline-flex; min-height: 2.8rem; justify-content: center; align-items: center; padding: 0.58rem 1.05rem; background: var(--accent); color: var(--on-accent); border: 1px solid var(--accent); border-radius: max(0px, calc(var(--radius) - 4px)); text-decoration: none; font: 700 0.98rem/1.35 var(--body); cursor: pointer; }
.button:hover { filter: brightness(0.89); text-decoration: none; }
.hero .button { margin-top: 1.45rem; }
.hero-media { position: relative; min-height: 18rem; background: var(--tones); }
.hero-media img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.theme-care .hero { grid-template-columns: 0.95fr 1.05fr; }
.theme-care .hero h1 { font-weight: 600; }
.theme-writing .hero { grid-template-columns: 1fr; grid-template-rows: auto clamp(9rem, 21vw, 15rem); }
.theme-writing .hero-copy { padding-block: clamp(1.8rem, 4vw, 3.5rem) 1.9rem; text-align: center; }
.theme-writing .hero h1, .theme-writing .hero-intro { max-width: 36rem; margin-inline: auto; }
.theme-writing .hero-media { min-height: 0; margin: 0 1.2rem 1.2rem; border-radius: 12px; overflow: hidden; }
.theme-writing .hero-media img { object-position: center 52%; }
.theme-design .hero { background: var(--surface); grid-template-columns: 1.1fr 0.9fr; border-block: 2px solid var(--ink); }
.theme-design .hero-copy { padding-right: 0; }
.theme-design .hero-media { margin-block: 0.8rem; }
.theme-design .hero h1 { font-weight: 850; line-height: 0.99; font-size: clamp(2.45rem, 5.45vw, 4.65rem); }
.theme-design .hero .eyebrow { color: var(--accent); }
.theme-games .hero { position: relative; grid-template-columns: 1fr; min-height: clamp(27rem, 46vw, 37rem); align-items: end; }
.theme-games .hero-copy { position: relative; z-index: 1; align-self: end; padding-block-end: clamp(1.85rem, 4vw, 3.6rem); }
.theme-games .hero-intro { max-width: 24rem; color: #fbf4e4; }
.theme-games .hero-media { position: absolute; inset: 0; background: var(--hero); }
.theme-games .hero-media img { object-position: center 54%; }
.theme-games .hero-media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #142419f5, #142419eb 25%, #142419aa 47%, #14241915 76%), linear-gradient(0deg, #142419c4, transparent 68%); }
.theme-games .hero .button { --accent: #e9cb87; --on-accent: #263123; }
.theme-games .hero .button:focus-visible { outline-color: #fff1cd; }

.topic-section, .guide-section { padding-block-start: clamp(2.1rem, 4.7vw, 3.7rem); }
.topic-section { scroll-margin-top: 1.45rem; }
.guide-section { padding-bottom: clamp(2.8rem, 6vw, 5.2rem); }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem 1.3rem; flex-wrap: wrap; margin-bottom: 1rem; }
.section-heading > a, .text-link { font-weight: 700; color: var(--accent); }
.topic-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.8rem; }
.tone-0 { --tone: var(--tones); --stripe: var(--mark); }
.tone-1 { --tone: #f1e7d9; --stripe: #985f23; }
.tone-2 { --tone: #e5ebe3; --stripe: #587a60; }
.tone-3 { --tone: #eee7ed; --stripe: #8b557e; }
.tone-4 { --tone: #e5e9eb; --stripe: #4e7383; }
.theme-writing .tone-1 { --tone: #e9edf9; --stripe: #4e62a0; }
.theme-writing .tone-3 { --tone: #f8e9ee; --stripe: #a64864; }
.theme-design .tone-1 { --tone: #ffe7e1; --stripe: #b73521; }
.theme-design .tone-2 { --tone: #f9edc8; --stripe: #8b6906; }
.theme-design .tone-3 { --tone: #edf0e1; --stripe: #4d7933; }
.theme-games .tone-3 { --tone: #f0e6d2; --stripe: #96622f; }
.topic-card { display: flex; flex-direction: column; align-items: flex-start; gap: 0.56rem; min-height: 11.7rem; padding: 1.1rem 0.95rem 0.9rem; color: var(--ink); background: var(--tone); border: 1px solid transparent; border-radius: var(--radius); text-decoration: none; }
.topic-card:hover { border-color: var(--stripe); }
.topic-card:hover h3 { text-decoration: underline; text-underline-offset: 0.2em; }
.topic-card p { color: var(--soft); line-height: 1.47; }
.topic-count { margin-top: auto; font-size: 0.875rem; font-weight: 750; }
.theme-design .topic-card { border-top: 4px solid var(--stripe); }
.theme-writing .topic-card { background: var(--paper); border-color: var(--line); }
.theme-writing .topic-card:hover { background: var(--tone); border-color: var(--stripe); }
.theme-games .topic-card { box-shadow: inset 0 -3px var(--stripe); }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.95rem; }
.guide-card { padding: 1.25rem; background: var(--paper); border: 1px solid var(--line); border-top: 3px solid var(--stripe); border-radius: var(--radius); }
.guide-category { display: inline-block; font-size: 0.875rem; color: var(--accent); font-weight: 700; margin-bottom: 0.35rem; }
.guide-card h3 { font-size: 1.25rem; margin: 0.12rem 0 0.55rem; }
.guide-card h3 a { text-decoration: none; }
.guide-card h3 a:hover { text-decoration: underline; }
.guide-card p, .list-item p { color: var(--soft); }

.theme-writing .home-library,
.theme-games .home-library { display: grid; align-items: start; gap: clamp(1.55rem, 4vw, 3.5rem); }
.theme-writing .home-library { grid-template-columns: minmax(15rem, 1fr) minmax(0, 2fr); }
.theme-writing .topic-grid, .theme-writing .guide-grid, .theme-games .topic-grid { grid-template-columns: 1fr; }
.theme-writing .topic-card { min-height: 0; padding: 0.9rem 1rem; border-left: 4px solid var(--stripe); border-radius: 8px; gap: 0.34rem; }
.theme-writing .guide-grid { gap: 0; }
.theme-writing .guide-card { background: transparent; border: 0; border-block-start: 1px solid var(--line); border-radius: 0; padding: 1.05rem 0; }
.theme-writing .guide-card:last-child { border-bottom: 1px solid var(--line); }
.theme-design .topic-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.8rem; }
.theme-design .topic-card { grid-column: span 2; min-height: 9rem; }
.theme-design .topic-card:nth-child(-n + 2) { grid-column: span 3; }
.theme-design .guide-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.theme-design .guide-card:first-child, .theme-design .guide-card:last-child { grid-column: span 2; }
.theme-design .guide-card:first-child { background: var(--tone); }
.theme-design .guide-card:first-child h3, .theme-design .guide-card:last-child h3 { font-size: 1.48rem; }
.theme-games .home-library { grid-template-columns: minmax(0, 2.05fr) minmax(15rem, 1fr); }
.theme-games .topic-section { padding-bottom: 2.2rem; }
.theme-games .topic-grid { gap: 0; border-block-start: 1px solid var(--line); }
.theme-games .topic-card { background: transparent; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 0.85rem 0; gap: 0.32rem; min-height: 0; }
.theme-games .topic-card:hover { background: var(--tone); }
.theme-games .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.theme-games .guide-card { border-top: 1px solid var(--line); border-inline-start: 4px solid var(--stripe); }

.inner-page { padding-block: 1.5rem clamp(3rem, 7vw, 6rem); }
.breadcrumbs { color: var(--soft); font-size: 0.875rem; margin-bottom: clamp(1.3rem, 3.5vw, 2.8rem); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; list-style: none; padding: 0; margin: 0; }
.breadcrumbs li + li::before { content: '/'; padding-inline: 0.57rem; }
.page-heading { padding: clamp(1.5rem, 3vw, 2.55rem); background: var(--tone, var(--tones)); border-radius: var(--radius); margin-bottom: 1.4rem; }
.page-heading h1, .article-heading h1, .missing-page h1 { font-size: clamp(2.25rem, 5.25vw, 3.9rem); }
.dek { max-width: 68ch; margin-top: 0.9rem; color: var(--soft); font-size: clamp(1.05rem, 2vw, 1.25rem); }
.topic-articles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.6rem; }
.list-item { border-bottom: 1px solid var(--line); padding: clamp(0.9rem, 2.2vw, 1.45rem) 0; }
.list-item h2 { font: 750 clamp(1.13rem, 2.2vw, 1.35rem)/1.25 var(--body); letter-spacing: -0.02em; }
.list-item h2 a { text-decoration: none; }
.list-item h2 a:hover { color: var(--accent); text-decoration: underline; }
.list-item p { margin-top: 0.44rem; }
.other-topics { margin-top: 2.5rem; }
.other-topics h2 { margin-bottom: 0.9rem; }
.pill-links { display: flex; gap: 0.65rem; flex-wrap: wrap; }
.pill-links a { padding: 0.45rem 0.72rem; border: 1px solid var(--line); background: var(--paper); border-radius: var(--radius); }
.reading-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(15rem, 19rem); gap: clamp(1.5rem, 5.1vw, 4.75rem); align-items: start; }
.prose { max-width: 73ch; font-size: 1.09rem; }
.article-heading { border-top: 4px solid var(--stripe, var(--accent)); padding-top: 1.12rem; }
.prose section { margin-top: 1.9rem; }
.prose section h2 { font-size: 1.49rem; margin-bottom: 0.65rem; }
.prose section p + p { margin-top: 0.68rem; }
.guide-figure { margin: 1rem 0 0; }
.guide-comparison { display: flex; flex-wrap: wrap; gap: 0.8rem; }
.guide-comparison > div {
  flex: 1 1 12rem;
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid var(--line);
  background: var(--paper);
}
.guide-comparison dl { margin: 0; }
.guide-comparison dt { margin-top: 0.5rem; font-weight: 600; }
.guide-comparison dd { margin-inline-start: 0; }
.guide-comparison code { display: block; overflow-wrap: anywhere; }
.guide-figure figcaption { margin-top: 0.55rem; font-size: 0.9em; }
.contrast-sample { display: block; padding: 0.55rem; background: #fff; }
.contrast-light { color: #999; }
.contrast-dark { color: #333; }
.button-sample {
  display: table;
  margin: 0.65rem 0.25rem 0.25rem;
  padding: 0.35rem 0.7rem;
  background: #18306e;
  color: #fff;
  border-radius: 0.3rem;
}
.button-sample-focus { outline: 2px solid #18306e; outline-offset: 3px; }
.long-guide section { scroll-margin-top: 1.3rem; }
.long-guide section p + p { margin-top: 0.95rem; }
.long-guide .source-link { color: var(--accent); overflow-wrap: anywhere; }
.article-nav {
  margin-top: 1.6rem;
  padding: 1.1rem 1.25rem;
  background: var(--tone, var(--tones));
  border-left: 3px solid var(--stripe, var(--accent));
  border-radius: 0 var(--radius) var(--radius) 0;
}
.article-nav h2 { font-size: 1.27rem; margin-bottom: 0.56rem; }
.article-nav ol { margin: 0; padding-left: 1.15rem; }
.article-nav li { margin: 0.28rem 0; }
.prose section ul, .prose section ol { margin: 0; padding-inline-start: 1.35rem; }
.prose li { margin-bottom: 0.6rem; padding-inline-start: 0.2rem; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.article-callout { border-inline-start: 4px solid var(--stripe); background: var(--tone); padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; }
.related { background: var(--paper); border: 1px solid var(--line); padding: 1.2rem; border-radius: var(--radius); }
.related h2 { font-size: 1.3rem; }
.related ul { list-style: none; margin: 0.8rem 0; padding: 0; }
.related li { border-top: 1px solid var(--line); padding: 0.55rem 0; }
.related li a { text-decoration: none; }
.related li a:hover { text-decoration: underline; }
.info-page a { overflow-wrap: anywhere; }
.filter-panel { display: grid; grid-template-columns: minmax(12rem, 2fr) minmax(10rem, 1fr) auto; align-items: end; gap: 0.85rem; padding: 1rem; margin-bottom: 0.95rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.filter-panel label { display: block; margin-bottom: 0.23rem; font-weight: 650; }
.filter-panel input, .filter-panel select { width: 100%; min-height: 2.8rem; padding: 0.42rem 0.62rem; border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: max(0px, calc(var(--radius) - 5px)); font: inherit; }
.filter-panel select { appearance: none; padding-inline-end: 2rem; }
.filter-panel > div:nth-child(2) { position: relative; }
.filter-panel > div:nth-child(2)::after { content: ''; position: absolute; border: solid currentColor; border-width: 0 1.5px 1.5px 0; width: 7px; height: 7px; transform: rotate(45deg); bottom: 1.25rem; right: 0.85rem; pointer-events: none; }
.result-count { color: var(--soft); font-size: 0.92rem; margin-bottom: 0.35rem; }
.missing-page { padding-block: clamp(3rem, 11vw, 8rem); }
.page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.85rem 1.15rem; margin-top: 1.4rem; }

.site-footer { background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { min-height: 8rem; display: flex; justify-content: space-between; gap: 1rem 2rem; align-items: center; padding-block: 1.65rem; }
.footer-inner p { color: var(--soft); margin-top: 0.45rem; }
.footer-inner nav { display: flex; flex-wrap: wrap; gap: 0.7rem 1.1rem; font-size: 0.9rem; font-weight: 650; }
.footer-inner nav a { text-decoration: none; }
.footer-inner nav a:hover, .footer-inner nav a[aria-current] { text-decoration: underline; }
.theme-games .site-footer { background: var(--hero); color: var(--hero-ink); }
.theme-games .footer-inner p { color: var(--hero-muted); }
.theme-games .site-footer a:focus-visible { outline-color: #e9cb87; }

.theme-writing .reading-layout { display: block; max-width: 48rem; margin-inline: auto; }
.theme-writing .reading-layout .prose { max-width: none; }
.theme-writing .reading-layout .article-heading { border: 0; border-radius: var(--radius); background: var(--tone); padding: clamp(1.15rem, 3vw, 2rem); }
.theme-writing #example { padding: 1rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; }
.theme-writing .reading-layout .related { margin-top: 2rem; }
.theme-writing .topic-articles { grid-template-columns: 1fr; max-width: 60rem; }
.theme-design .reading-layout { grid-template-columns: minmax(13rem, 17rem) minmax(0, 1fr); }
.theme-design .reading-layout .related { grid-row: 1; grid-column: 1; border-top: 4px solid var(--accent); }
.theme-design .reading-layout .prose { grid-row: 1; grid-column: 2; }
.theme-design .page-heading { border-block: 2px solid var(--ink); padding-inline: 0; background: transparent; }
.theme-games .reading-layout .article-heading { color: var(--hero-ink); background: var(--hero); padding: clamp(1.2rem, 3vw, 2.15rem); border: 0; border-radius: var(--radius); }
.theme-games .reading-layout .article-heading .dek { color: var(--hero-muted); }
.theme-games .reading-layout .steps { display: grid; gap: 0.4rem; padding-left: 1.9rem; }
.theme-games .reading-layout .steps li { background: var(--paper); border-radius: 4px; border-left: 2px solid var(--stripe); padding: 0.6rem 0.85rem; }

@media (max-width: 960px) {
  .topic-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topic-card { min-height: 9.8rem; }
  .reading-layout { gap: 1.55rem; }
  .theme-design .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-design .guide-card:last-child { grid-column: auto; }
}
@media (max-width: 820px) {
  .primary-nav { display: none; }
  .mobile-topics { display: block; margin-bottom: 0.4rem; }
  .mobile-topics summary { cursor: pointer; display: flex; min-height: 2.75rem; align-items: center; gap: 0.65rem; list-style: none; width: max-content; font-size: 0.92rem; font-weight: 700; }
  .mobile-topics summary::-webkit-details-marker { display: none; }
  .mobile-topics summary::after { content: ''; width: 7px; height: 7px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
  .mobile-topics[open] summary::after { transform: translateY(2px) rotate(225deg); }
  .mobile-topics nav { display: grid; padding-bottom: 0.45rem; }
  .mobile-topics nav a { display: flex; align-items: center; min-height: 2.75rem; padding: 0.44rem 0; font-size: 0.95rem; }
  .mobile-topics a[aria-current] { font-weight: 750; }
  .theme-games .mobile-topics summary:focus-visible { outline-color: #e9cb87; }
}
@media (max-width: 680px) {
  .container { width: calc(100% - 2rem); }
  .masthead { min-height: 3.8rem; }
  .hero, .theme-care .hero, .theme-writing .hero, .theme-design .hero, .theme-games .hero { grid-template-columns: 1fr; }
  .hero-copy { padding: 1.55rem; }
  .hero h1 { max-width: 13ch; }
  .hero-media { min-height: 0; aspect-ratio: 1.65; }
  .theme-writing .hero { grid-template-rows: auto auto; }
  .theme-writing .hero-media { margin: 0 0.75rem 0.75rem; aspect-ratio: 2.2; }
  .theme-design .hero { min-height: 0; }
  .theme-design .hero-media { margin: 0.6rem 0 0; }
  .theme-design .hero-copy { padding: 1.15rem 0 1.5rem; }
  .theme-games .hero { min-height: 27rem; }
  .theme-games .hero-media { aspect-ratio: auto; }
  .theme-games .hero-media::after { background: linear-gradient(0deg, #142419 0%, #142419f0 32%, #142419b0 62%, #14241918 100%); }
  .theme-writing .home-library, .theme-games .home-library { display: block; }
  .theme-games .guide-section { padding-bottom: 0; }
  .theme-design .topic-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-design .topic-card, .theme-design .topic-card:nth-child(-n + 2) { grid-column: auto; }
  .theme-design .topic-card:last-child { grid-column: span 2; }
  .topic-grid, .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topic-card { min-height: initial; }
  .reading-layout, .topic-articles { grid-template-columns: 1fr; }
  .theme-design .reading-layout { grid-template-columns: 1fr; }
  .theme-design .reading-layout .related, .theme-design .reading-layout .prose { grid-row: auto; grid-column: 1; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .filter-panel { grid-template-columns: minmax(0, 1fr) auto; }
  .filter-panel > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 420px) {
  .masthead { gap: 0.6rem; }
  .brand { font-size: 1.15rem; gap: 0.4rem; }
  .brand-mark { width: 1.55rem; height: 1.55rem; flex-basis: 1.55rem; }
  .search-link { padding-inline: 0.45rem; font-size: 0.875rem; }
  .search-link .search-icon { display: none; }
  .guide-grid, .theme-design .guide-grid, .theme-games .guide-grid { grid-template-columns: 1fr; }
  .theme-design .guide-card:first-child { grid-column: auto; }
  .hero h1 { font-size: clamp(2rem, 10.2vw, 2.6rem); }
  .theme-design .hero h1 { font-size: clamp(2.05rem, 10.3vw, 2.7rem); }
  .theme-care .topic-grid { grid-template-columns: 1fr; }
  .theme-care .topic-card { gap: 0.35rem; }
}
@media (max-width: 360px) {
  .theme-games .brand { font-size: clamp(1rem, 5.5vw, 1.13rem); }
  .theme-games .masthead { gap: 0.45rem; }
  .theme-games .brand-mark { flex-basis: 1.35rem; width: 1.35rem; height: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .related, .skip-link, .breadcrumbs { display: none; }
  .reading-layout { display: block; }
  .container { width: 100%; }
}
