/* V0.5 reading room. Source paragraphs and historical content stay intact. */
:root {
  --paper: #f5eee4;
  --card: #fffbf5;
  --ink: #574436;
  --accent: #936555;
  --muted: #807365;
  --line: #dacebd;
  --soft: #eee3d7;
  --rose: #bd7d80;
  --rose-soft: #ead3ce;
  --olive: #85876c;
  --shadow: 0 18px 65px #684d3610;
  --ease: cubic-bezier(.2,.7,.2,1);
}
html { scroll-padding-top: 100px; }
body {
  background-color: var(--paper);
  background-image: radial-gradient(ellipse at 90% 5%, #ead4cc55, transparent 55%), radial-gradient(#745b3424 .45px, transparent .65px);
  background-size: 100% 100%, 5px 5px;
  color: var(--ink);
}
a, button, input, select, textarea { touch-action: manipulation; }
a, button { transition: color .2s, background-color .2s, border-color .2s, transform .25s var(--ease); }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--rose); outline-offset: 4px; }
button, input, textarea, select { font: inherit; }
button:disabled { cursor: default; }
::selection { background: #e4b9b8a8; color: #423125; }
.skip-link { z-index: 120; border-radius: 3px; }
.site-header { background: transparent; border-bottom: 0; position: relative; z-index: 10; }
.header-inner { max-width: 1420px; padding: 0 clamp(24px,5vw,80px); min-height: 92px; gap: 24px; }
.brand { font-size: 20px; letter-spacing: 3px; white-space: nowrap; gap: 11px; }
.brand .brand-mark { color: var(--olive); width: 25px; height: 25px; }
.header-right { gap: 30px; }
.directory-link { color: var(--muted); font-size: 12px; letter-spacing: 1px; }
.global-search { width: min(250px, 29vw); display: flex; border-bottom: 1px solid #a9937b70; align-items: center; }
.global-search:focus-within { border-color: var(--rose); }
.global-search input { width: 100%; min-width: 0; border: 0; background: transparent; padding: 10px 4px; font-size: 13px; color: var(--ink); outline: none; }
.global-search input::placeholder { color: var(--muted); }
.global-search button { border: 0; background: none; min-width: 44px; min-height: 44px; display: grid; place-items: center; color: var(--accent); }
.global-search .icon { width: 18px; height: 18px; }
main { min-height: calc(100svh - 192px); }
main > section:not(.game-home), main > .detail-wrap { animation: page-arrive .35s var(--ease) both; }
@keyframes page-arrive { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.site-footer { max-width: 1260px; margin: 0 auto; padding: 18px 30px 25px; border-top: 1px solid #dacebd80; display: flex; justify-content: space-between; gap: 24px; align-items: center; text-align: left; font-size: 10px; letter-spacing: 1px; }
.site-footer p { margin: 0; }
.footer-edition { font-family: Georgia, serif; font-size: 9px; letter-spacing: 2px; }
.publish-memory { position: fixed; z-index: 25; right: max(28px, env(safe-area-inset-right)); bottom: max(24px, env(safe-area-inset-bottom)); border: 1px solid #b27474; border-radius: 50px; background: #b67c7e; color: #fffaf4; box-shadow: 0 5px 22px #71504122; padding: 13px 23px; min-height: 50px; display: flex; align-items: center; gap: 9px; font-size: 13px; letter-spacing: 1px; }
.publish-memory .icon { width: 18px; height: 18px; }
.publish-memory:hover { background: #a86b70; transform: translateY(-2px); }
.publish-memory:active { transform: translateY(0); }
/* The entrance is one composition, not a grid of cards. */
.game-home { position: relative; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(0,.95fr); align-items: center; gap: clamp(45px,8vw,130px); max-width: 1280px; min-height: calc(100svh - 156px); margin: 0 auto; padding: 32px clamp(30px,5vw,65px) 65px; isolation: isolate; }
.home-brand { position: relative; min-width: 0; padding-bottom: 42px; }
.home-eyebrow { display: flex; align-items: center; gap: 13px; font: 11px/1.6 Georgia, serif; color: var(--accent); letter-spacing: 3px; margin: 0 0 28px; }
.home-eyebrow::before { content: ''; width: 32px; height: 1px; background: var(--rose); }
.home-title { font: 500 clamp(62px,7.3vw,100px)/1.35 var(--serif); letter-spacing: .09em; margin: 0 0 19px; white-space: nowrap; color: #654b3e; }
.home-subtitle { font: 16px/1.9 var(--serif); letter-spacing: 2px; margin: 0; }
.home-quote { margin: 32px 0 0; font: 14px/2 var(--serif); color: var(--muted); letter-spacing: 2px; }
.home-credit { position: relative; font-size: 11px; line-height: 1.9; color: var(--muted); letter-spacing: 1px; margin: 90px 0 0; max-width: 330px; }
.home-credit::before { content: ''; display: block; width: 30px; height: 1px; background: var(--line); margin-bottom: 13px; }
.home-botanical { position: absolute; width: min(43vw,490px); height: auto; left: -105px; bottom: 0; opacity: .3; transform: rotate(-9deg); pointer-events: none; z-index: -1; }
.home-stamp { display: inline-grid; place-items: center; width: 52px; height: 52px; color: #af7471; border: 1px solid #ba85817a; border-radius: 3px; font: 13px/1.4 var(--serif); letter-spacing: 2px; transform: rotate(-7deg); margin-top: 30px; }
.home-menu { display: flex; flex-direction: column; min-width: 0; padding-top: 8px; }
.menu-option { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; column-gap: 17px; min-height: 98px; padding: 16px 4px; position: relative; border-bottom: 1px solid #bfae982e; }
.menu-option:last-child { border-bottom: 0; }
.menu-option::before { content: ''; position: absolute; left: -24px; top: 50%; width: 5px; height: 5px; border: 1px solid var(--rose); transform: translateY(-50%) rotate(45deg) scale(0); transition: transform .25s var(--ease); }
.menu-number { color: #aa8c77; font: italic 13px/1.5 Georgia, serif; align-self: start; margin-top: 11px; }
.menu-copy { display: flex; flex-direction: column; gap: 4px; }
.menu-name { display: block; font: 500 27px/1.4 var(--serif); letter-spacing: 4px; color: #614a3c; }
.menu-english { display: block; font: 9px/1.7 Georgia, serif; letter-spacing: 2px; color: #988573; text-transform: uppercase; }
.menu-arrow { justify-self: end; opacity: .45; transform: translateX(-4px); transition: opacity .25s, transform .25s var(--ease); font-size: 22px; color: var(--rose); }
.menu-option:hover, .menu-option:focus-visible { transform: translateX(8px); }
.menu-option:hover .menu-name, .menu-option:focus-visible .menu-name { color: var(--rose); }
.menu-option:hover::before, .menu-option:focus-visible::before { transform: translateY(-50%) rotate(45deg) scale(1); }
.menu-option:hover .menu-arrow, .menu-option:focus-visible .menu-arrow { opacity: 1; transform: translateX(0); }
body:has(.game-home) .site-footer { border: 0; max-width: 1280px; padding: 5px 65px 25px; }
body:has(.game-home) .site-footer .footer-edition { margin-right: 140px; }
/* A short, interruptible title sequence. JS owns dismissal and reduced motion. */
.opening-scene { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; background: var(--paper); background-image: radial-gradient(ellipse at 50% 45%, #fffaf5, transparent 70%); transition: opacity .55s ease, visibility .55s; }
.opening-scene.is-leaving { opacity: 0; visibility: hidden; pointer-events: none; }
.opening-skip { position: absolute; z-index: 2; top: max(26px, env(safe-area-inset-top)); right: max(34px, env(safe-area-inset-right)); padding: 10px 0 10px 14px; background: none; border: 0; color: var(--muted); font-size: 12px; letter-spacing: 2px; }
.opening-skip span { margin-left: 10px; color: var(--rose); }
.opening-content { text-align: center; position: relative; padding: 35px 20px; }
.opening-branch { width: 290px; height: auto; position: absolute; right: -70px; top: -165px; opacity: 0; animation: opening-leaf 1.9s .2s var(--ease) forwards; pointer-events: none; }
.opening-edition { font: 10px/1.5 Georgia, serif; letter-spacing: 4px; color: var(--muted); opacity: 0; animation: opening-text 1s .5s ease forwards; }
.opening-title { font: 500 clamp(48px,8vw,82px)/1.5 var(--serif); letter-spacing: .16em; text-indent: .16em; margin: 18px 0; opacity: 0; animation: opening-text 1.3s .8s ease forwards; }
.opening-subtitle { font: 15px/1.8 var(--serif); letter-spacing: 2px; margin: 0; opacity: 0; animation: opening-text 1.1s 1.5s ease forwards; }
.opening-rule { display: block; width: 55px; height: 1px; margin: 34px auto 0; background: var(--rose); transform: scaleX(0); animation: opening-line 1.1s 2s ease forwards; }
@keyframes opening-text { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes opening-leaf { from { opacity: 0; transform: translate(10px,8px); } to { opacity: .45; transform: translate(0,0); } }
@keyframes opening-line { to { transform: scaleX(1); } }
/* The catalogue has the rhythm and hierarchy of a book's contents page. */
.catalog-page, .search-page { max-width: 1100px; margin: 0 auto; padding: 38px 45px 90px; }
.page-heading { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.page-heading h1 { font: 500 39px/1.5 var(--serif); letter-spacing: 5px; margin: 9px 0 8px; }
.page-heading p { color: var(--muted); font-size: 13px; margin: 0; letter-spacing: .8px; }
.page-heading > a { font-size: 12px; color: var(--accent); }
.page-eyebrow, .catalog-eyebrow { color: var(--rose); letter-spacing: 3px; font: 10px/1.8 Georgia, serif; }
.catalog-list { list-style: none; padding: 0; margin: 0; }
.catalog-list > li { border-bottom: 1px solid #dacebd85; }
.catalog-list > li > a { display: grid; grid-template-columns: 47px 1fr auto; align-items: center; gap: 22px; padding: 22px 4px; min-height: 78px; }
.catalog-list > li > a:hover { color: var(--rose); padding-left: 10px; }
.catalog-number { font: italic 17px/1.5 Georgia, serif; color: #a68a71; }
.catalog-title { font: 500 18px/1.7 var(--serif); overflow-wrap: anywhere; }
.catalog-meta { color: var(--muted); font-size: 10px; letter-spacing: .4px; white-space: nowrap; }
.catalog-page .toolbar { background: none; border-top: 0; }
.search-result-list { list-style: none; padding: 0; }
.search-result-list li { border-bottom: 1px solid var(--line); padding: 23px 0; }
.search-result-list a { display: block; overflow-wrap: anywhere; }
.search-result-list h2, .search-result-list h3 { font: 500 19px/1.7 var(--serif); margin: 0 0 7px; }
.search-result-list p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.9; }
.search-result-list .search-topic { font-size: 11px; color: var(--rose); margin-bottom: 6px; }
.search-result-list mark { background: #e9c7bd88; color: inherit; }
/* Familiar reading tools remain quiet, with clearer room for the original text. */
.detail-wrap { max-width: 1050px; padding: 24px 45px 90px; }
.detail-paper { border: 1px solid #d9cab585; border-radius: 3px; padding: 48px 58px; box-shadow: var(--shadow); background: #fffbf5dd; }
.detail-heading h1 { font-weight: 500; font-size: 30px; }
.reading-menu { border-radius: 3px; box-shadow: none; background: #f1e8d9f5; }
.reading-content { font-size: 17px; line-height: 2; }
.memory-entry { padding-top: 7px; }
.memory-entry + .memory-entry { border-top: 1px solid #dacebd5e; padding-top: 26px; margin-top: 20px; }
.memory-actions { margin-top: 14px; margin-bottom: 22px; }
.memory-like[aria-pressed=true] { color: #b56d79; }
.memory-actions button { min-height: 44px; }
.memory-menu-items { background: var(--card); box-shadow: 0 4px 15px #61472e10; }
.memory-comments { border-left-color: #d8bbb1; border-radius: 2px; background: #f3e8df66; padding: 15px 19px; }
.comment-credit { color: #867361; }
.nested-comments { border-left-color: #d8c5b7; }
.memory-submission { border-top: 1px solid var(--line); padding: 28px 0 12px; }
.memory-submission h2 { font: 500 25px/1.7 var(--serif); letter-spacing: 2px; }
.memory-submission input, .memory-submission textarea, .memory-submission select, .contribution-form input, .contribution-form textarea { max-width: none; border-color: #d8c5b6; border-radius: 3px; padding: 12px 14px; background: #fffdf8; }
.memory-submission textarea, .contribution-form textarea { resize: vertical; min-height: 140px; line-height: 1.8; }
.memory-submission button, .contribution-form button { border-radius: 3px; padding: 10px 19px; min-height: 44px; }
.memory-submission button[type=submit], .contribution-form button[type=submit] { color: #fffaf3; background: #a46d70; border-color: #a46d70; }
.contribution-dialog, .publish-dialog, .comments-drawer { border: 1px solid var(--line); border-radius: 5px; box-shadow: 0 22px 80px #4c362733; color: var(--ink); background: var(--card); padding: 27px; max-height: min(90svh,900px); }
.contribution-dialog::backdrop, .publish-dialog::backdrop, .comments-drawer::backdrop { background: #4b3b2c55; backdrop-filter: blur(3px); }
.publish-dialog { width: min(650px,calc(100vw - 32px)); overflow: auto; }
.publish-dialog .memory-submission { padding-top: 0; margin-top: 0; border-top: 0; }
.publish-dialog .memory-submission h2 { margin-top: 0; }
.dialog-close, .drawer-close { color: var(--muted); border: 0; background: none; min-height: 44px; min-width: 44px; }
.comments-drawer { width: min(500px,calc(100vw - 32px)); height: 100svh; max-height: 100svh; margin: 0 0 0 auto; border-radius: 0; overflow: auto; padding: 22px 28px 35px; }
.comments-drawer .memory-comments { margin: 0; border: 0; background: transparent; padding: 10px 0; }
.comments-drawer .memory-comments p { font-size: 16px; line-height: 1.9; }
.comments-drawer h2 { font: 500 25px/1.5 var(--serif); }
/* One story at a time, with a separate place for conversation. */
.discovery-page { max-width: 1180px; margin: 0 auto; padding: 22px 45px 80px; }
.discovery-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-end; padding-bottom: 20px; }
.discovery-heading h1 { font: 500 30px/1.5 var(--serif); letter-spacing: 4px; margin: 0 0 5px; }
.discovery-heading p { color: var(--muted); font-size: 12px; margin: 0; }
.discovery-heading a { font-size: 12px; color: var(--accent); }
.discovery-stage { position: relative; }
.discovery-reader { position: relative; background: #fffbf5d9; border: 1px solid #dacebdc9; border-radius: 4px; box-shadow: var(--shadow); padding: 34px 82px 26px 38px; min-width: 0; }
.discovery-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 12px; margin-bottom: 22px; }
.discovery-meta a { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }
.discovery-scroll { overflow: auto; min-height: 0; scrollbar-width: thin; scrollbar-color: #cdb8a2 transparent; overscroll-behavior: contain; padding: 0 8px 5px 0; }
.discovery-reader .memory-entry { border: 0; padding: 0; margin: 0; }
.discovery-reader .memory-entry > .source-paragraph, .discovery-reader .contributed-text { font: 18px/2 var(--sans); }
.discovery-reader .memory-actions { position: absolute; right: 13px; top: 80px; width: 55px; display: flex; flex-direction: column; flex-wrap: nowrap; gap: 11px; margin: 0; }
.discovery-reader .memory-actions button { min-width: 48px; min-height: 48px; padding: 7px 5px; font-size: 12px; }
.discovery-reader .memory-menu { margin-left: 0; position: relative; }
.discovery-reader .memory-menu-items { position: absolute; right: 0; top: 48px; width: 155px; z-index: 4; }
.discovery-reader .memory-menu-items button { width: 100%; text-align: left; }
.discovery-reader .signature-list { margin-top: 25px; font-size: 12px; color: var(--muted); }
.discovery-reader .photo { margin: 20px 0; }
.discovery-reader .photo img { max-height: 58svh; width: auto; object-fit: contain; }
.discovery-controls { display: flex; gap: 15px; align-items: center; justify-content: center; padding: 22px 0 0; }
.discovery-controls button, .discovery-next, .discovery-previous { background: var(--card); border: 1px solid #cbb5a1; border-radius: 3px; padding: 10px 23px; min-height: 44px; color: var(--ink); font-size: 13px; }
.discovery-controls button:hover { background: #ecd9ce; }
.discovery-controls button:disabled { opacity: .4; }
.discovery-status, .discovery-hint { font-size: 11px; color: var(--muted); text-align: center; margin: 12px 0 0; }
.feed-viewport { height: min(690px,calc(100svh - 215px)); min-height: 340px; overflow-y: auto; scroll-snap-type: y mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior: contain; }
.feed-viewport::-webkit-scrollbar { display: none; }
.feed-snap-page { height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: flex; align-items: stretch; justify-content: center; padding: 1px; }
.feed-snap-page > .discovery-reader { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.feed-snap-page .discovery-scroll { flex: 1; }
.feed-snap-page:not(:has(.discovery-reader)) { align-items: center; color: var(--muted); font: 17px var(--serif); }
body:has(.feed-viewport) .site-footer { display: none; }
.community-page { max-width: 800px; min-height: calc(100svh - 200px); margin: auto; padding: 65px 35px 100px; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.community-page > .icon { color: var(--olive); width: 42px; height: 42px; margin-bottom: 18px; }
.community-page h1 { font: 500 40px/1.7 var(--serif); letter-spacing: 5px; margin: 10px 0; }
.community-page p { max-width: 440px; line-height: 2; color: var(--muted); }
.community-page a { border-bottom: 1px solid var(--rose); padding: 8px 2px; margin-top: 20px; }
.community-branch { width: 180px; opacity: .6; }
/* Tablet: retain the split composition without squeezing the text. */
@media (min-width: 761px) and (max-width: 1050px) {
  .game-home { gap: 50px; padding-right: 45px; padding-left: 45px; }
  .home-title { font-size: 64px; }
  .home-subtitle { font-size: 14px; letter-spacing: 1px; }
  .menu-name { font-size: 24px; }
  .menu-option { min-height: 90px; }
  .home-credit { margin-top: 70px; }
  .global-search { width: 220px; }
  .catalog-page, .search-page, .discovery-page { padding-left: 35px; padding-right: 35px; }
  .detail-paper { padding: 35px; }
}
@media (max-height: 720px) and (min-width: 761px) {
  .header-inner { min-height: 75px; }
  .game-home { min-height: calc(100svh - 128px); padding-top: 12px; padding-bottom: 25px; }
  .home-credit { margin-top: 45px; }
  .home-quote { margin-top: 22px; }
  .menu-option { min-height: 81px; padding-block: 11px; }
  .home-title { font-size: 66px; }
  .home-brand { padding-bottom: 15px; }
  .feed-viewport { height: calc(100svh - 195px); min-height: 260px; }
}
/* Mobile is its own reading composition. */
@media (max-width: 760px) {
  .header-inner { min-height: 77px; padding: 0 23px; gap: 15px; }
  .brand { font-size: 17px; letter-spacing: 1px; gap: 7px; }
  .brand .brand-mark { width: 21px; height: 21px; }
  .header-right { gap: 15px; }
  .directory-link { display: none; }
  .global-search { width: min(220px,42vw); }
  .global-search input { font-size: 12px; padding: 7px 0; }
  .global-search button { min-width: 36px; }
  .game-home { display: flex; flex-direction: column; align-items: stretch; gap: 15px; min-height: calc(100svh - 120px); padding: 28px 43px 67px; max-width: 600px; }
  .home-brand { padding-bottom: 0; }
  .home-eyebrow { font-size: 9px; letter-spacing: 2px; margin-bottom: 16px; gap: 10px; }
  .home-eyebrow::before { width: 22px; }
  .home-title { font-size: clamp(45px,10vw,64px); letter-spacing: .1em; margin-bottom: 10px; }
  .home-subtitle { font-size: 13px; letter-spacing: 1px; }
  .home-quote { margin-top: 13px; font-size: 12px; letter-spacing: 1px; }
  .home-credit { position: absolute; bottom: -450px; margin: 0; font-size: 9px; letter-spacing: .5px; max-width: 240px; }
  .home-credit::before { display: none; }
  .home-botanical { left: auto; right: -55px; top: 25px; bottom: auto; width: 240px; opacity: .2; transform: rotate(15deg); }
  .home-menu { padding-top: 2px; }
  .menu-option { min-height: 76px; grid-template-columns: 26px 1fr 24px; gap: 15px; padding: 11px 0; }
  .menu-number { font-size: 12px; margin-top: 7px; }
  .menu-name { font-size: 23px; letter-spacing: 3px; }
  .menu-english { font-size: 8px; letter-spacing: 1.7px; }
  .menu-copy { gap: 2px; }
  .menu-option::before { left: -15px; }
  .menu-arrow { font-size: 19px; }
  .menu-option:hover, .menu-option:focus-visible { transform: translateX(4px); }
  .home-stamp { display: none; }
  .site-footer { padding: 20px 24px 95px; margin: 0 23px; font-size: 9px; justify-content: center; text-align: center; }
  .footer-edition { display: none; }
  body:has(.game-home) .site-footer { padding: 6px 24px 82px; margin-top: 0; }
  .publish-memory { right: max(18px, env(safe-area-inset-right)); bottom: max(18px, env(safe-area-inset-bottom)); min-height: 48px; padding: 11px 18px; font-size: 12px; box-shadow: 0 4px 18px #71504120; }
  .catalog-page, .search-page { padding: 23px 25px 60px; }
  .page-heading { margin-bottom: 14px; padding-bottom: 22px; }
  .page-heading h1 { font-size: 31px; letter-spacing: 4px; }
  .page-heading p { font-size: 12px; line-height: 1.8; }
  .catalog-list > li > a { grid-template-columns: 29px 1fr; column-gap: 12px; row-gap: 3px; padding: 18px 2px; }
  .catalog-title { font-size: 16px; line-height: 1.75; }
  .catalog-number { font-size: 14px; align-self: start; margin-top: 3px; }
  .catalog-meta { grid-column: 2; font-size: 10px; }
  .search-result-list h2, .search-result-list h3 { font-size: 17px; }
  .search-result-list p { font-size: 13px; }
  .detail-wrap { padding: 16px 16px 60px; }
  .detail-paper { padding: 27px 22px; }
  .detail-heading h1 { font-size: 25px; }
  .reading-content { font-size: 16px; }
  .memory-entry + .memory-entry { padding-top: 20px; margin-top: 13px; }
  .memory-comments { padding: 10px; }
  .memory-submission h2 { font-size: 22px; }
  .opening-branch { width: 200px; top: -135px; right: -20px; }
  .opening-title { font-size: 49px; }
  .opening-subtitle { font-size: 12px; letter-spacing: 1px; }
  .opening-edition { font-size: 8px; }
  .opening-skip { top: max(15px,env(safe-area-inset-top)); right: 23px; }
  .comments-drawer { width: 100%; max-width: 100%; height: 78svh; max-height: 90svh; margin: auto 0 0; padding: 14px 23px calc(25px + env(safe-area-inset-bottom)); border-radius: 16px 16px 0 0; border-bottom: 0; }
  .comments-drawer::before { content: ''; display: block; height: 3px; width: 32px; border-radius: 10px; background: #cbb8a6; margin: 0 auto 6px; }
  .publish-dialog { padding: 20px; max-height: 88svh; }
  .discovery-page { padding: 16px 16px 85px; }
  .discovery-heading { gap: 12px; padding: 0 6px 16px; }
  .discovery-heading h1 { font-size: 25px; letter-spacing: 3px; }
  .discovery-heading p { font-size: 11px; }
  .discovery-reader { padding: 24px 65px 23px 21px; }
  .discovery-meta { font-size: 11px; margin-bottom: 20px; }
  .discovery-reader .memory-entry > .source-paragraph, .discovery-reader .contributed-text { font-size: 16px; line-height: 1.95; }
  .discovery-reader .memory-actions { right: 7px; width: 48px; gap: 6px; }
  .discovery-reader .memory-actions button { font-size: 11px; min-width: 44px; padding-inline: 2px; }
  .discovery-controls { padding-top: 15px; gap: 11px; }
  .discovery-controls button { font-size: 12px; padding: 9px 19px; }
  .feed-viewport { height: calc(100svh - 210px); min-height: 330px; }
  .feed-snap-page .discovery-reader { border-radius: 3px; box-shadow: none; }
  body:has(.feed-viewport) .publish-memory { padding: 12px; width: 48px; justify-content: center; bottom: max(16px,env(safe-area-inset-bottom)); }
  body:has(.feed-viewport) .publish-memory span { display: none; }
  .community-page { padding: 50px 30px 110px; min-height: calc(100svh - 180px); }
  .community-page h1 { font-size: 34px; }
}
@media (max-width: 370px) {
  .header-inner { padding: 0 17px; }
  .global-search { width: 43vw; }
  .brand { font-size: 15px; }
  .game-home { padding: 22px 29px 65px; }
  .home-title { font-size: 44px; }
  .menu-option { min-height: 72px; }
  .home-credit { bottom: -425px; }
  .catalog-page, .search-page { padding-inline: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .opening-branch, .opening-title, .opening-edition, .opening-subtitle { opacity: 1; transform: none; }
}
/* Keep the swipe viewport inside the visible page; only its story body scrolls. */
.discovery-page[data-mode="browse"] { height: calc(100svh - 92px); padding-bottom: 20px; display: flex; flex-direction: column; }
.discovery-page[data-mode="browse"] .discovery-heading, .discovery-page[data-mode="browse"] .discovery-controls { flex-shrink: 0; }
.discovery-page[data-mode="browse"] .discovery-stage { flex: 1; min-height: 0; }
.discovery-page[data-mode="browse"] .feed-viewport { height: 100%; min-height: 0; }
@media (max-width:760px) {
  .home-brand { position: static; }
  .home-credit { bottom: 16px; left: 43px; right: 90px; }
  .discovery-page[data-mode="browse"] { height: calc(100svh - 77px); padding-bottom: max(14px,env(safe-area-inset-bottom)); }
  .discovery-page[data-mode="browse"] .discovery-controls { padding-right: 44px; }
}
@media (max-width:370px) { .home-credit { left:29px; bottom:16px; } }
@media (max-height:720px) and (min-width:761px) { .discovery-page[data-mode="browse"] { height: calc(100svh - 75px); } }
/* Keep botanical artwork inside the composition and leave controls room to breathe. */
.game-home { overflow: clip; }
body { background-image: radial-gradient(ellipse at 90% 5%, #ead4cc55, transparent 55%), radial-gradient(#745b3412 .45px, transparent .65px); }
.catalog-list > li > a { grid-template-columns: 47px 1fr auto 24px; }
.catalog-arrow { color: var(--rose); text-align: right; }
.result-kicker { display: block; margin-bottom: 7px; font-size: 11px; color: var(--accent); }
.catalog-end { margin-top: 32px; text-align: center; color: var(--muted); font: 13px var(--serif); }
.discovery-heading { display: block; }
.discovery-heading .page-eyebrow { color: var(--rose); font: 10px/1.8 Georgia, serif; letter-spacing: 3px; margin-bottom: 5px; }
.discovery-heading h1 { margin: 0 0 6px; }
.discovery-heading .discovery-status:empty { display: none; }
.discovery-reader { min-height: 350px; }
.discovery-reader .memory-menu-toggle { white-space: nowrap; letter-spacing: -2px; }
.discovery-position { font-size: 12px; color: var(--muted); }
.discovery-retry { margin-top: 12px; padding: 8px 18px; border: 1px solid var(--line); background: var(--card); }
.discovery-catalog { margin-left: 20px; }
.drawer-heading { display: flex; justify-content: space-between; gap: 16px; align-items: center; position: sticky; top: 0; background: var(--card); z-index: 2; }
.drawer-heading h2 { margin: 8px 0; }
.drawer-heading .dialog-close { margin: 0; }
body.opening-active { overflow: hidden; }
@media (max-width: 760px) {
  .catalog-list > li > a { grid-template-columns: 29px 1fr 20px; }
  .catalog-meta { grid-column: 2; }
  .catalog-arrow { grid-column: 3; grid-row: 1 / span 2; }
  .site-footer { padding-bottom: 105px; }
  body:has(.game-home) .site-footer { padding-bottom: 105px; }
  .discovery-reader { min-height: 330px; }
  .feed-snap-page .discovery-reader { min-height: 0; }
  .discovery-controls { gap: 8px; }
  .discovery-controls button { padding-inline: 13px; }
  .discovery-position { font-size: 10px; }
  .discovery-heading > p:not(.page-eyebrow):not(.discovery-status) { max-width: 32em; line-height: 1.8; }
  .discovery-hint { font-size: 9px; margin: 8px 0 0; }
}
@media (max-width: 760px) and (max-height: 740px) {
  .game-home { padding-top: 14px; gap: 9px; }
  .home-title { font-size: 43px; }
  .home-eyebrow { margin-bottom: 9px; }
  .home-quote { margin-top: 8px; }
  .menu-option { min-height: 63px; padding-block: 7px; }
  .menu-name { font-size: 21px; }
  .home-credit { bottom: 10px; max-width: 180px; }
  body:has(.game-home) .publish-memory { width: 48px; padding: 12px; justify-content: center; }
  body:has(.game-home) .publish-memory span { display: none; }
}
@media (max-height: 600px) {
  .discovery-page[data-mode="browse"] { height: auto; }
  .discovery-page[data-mode="browse"] .discovery-stage { flex: none; height: 450px; }
}
@media (max-width: 760px) {
  .site-footer { justify-content: flex-start; text-align: left; }
  .site-footer p { max-width: calc(100% - 108px); }
  .comments-drawer .drawer-heading { margin: -14px -23px 0; padding: 14px 23px 8px; }
}
