/* 妖精的女儿 · 公开页 */
:root {
  --paper: #faf4ec; --paper-deep: #eee2dc; --card: #fffaf3;
  --ink: #34272f; --ink-soft: #705f66; --wine: #74384f; --wine-deep: #4c2437;
  --lavender: #7c6890; --gold: #aa7d42; --gold-light: #d9bb8b; --line: #ddcbb9;
  --font-display: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --font-body: "Microsoft YaHei", "PingFang SC", sans-serif;
  --ease: cubic-bezier(.22, .61, .36, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 104px; }
body {
  margin: 0; overflow-x: hidden; color: var(--ink); background-color: var(--paper);
  background-image: radial-gradient(circle at 5% 22%, #e8d6e65c, transparent 26%), radial-gradient(circle at 95% 58%, #ecd0d447, transparent 24%), radial-gradient(circle at 50% 100%, #e9ddcb70, transparent 35%);
  font: 16px/1.85 var(--font-body); -webkit-text-size-adjust: 100%;
}
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; }
a { color: var(--wine); text-underline-offset: 5px; }
a:hover { color: var(--wine-deep); }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
img { max-width: 100%; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { color: var(--wine-deep); background: #ead3b0; }
:focus-visible { outline: 3px solid var(--wine); outline-offset: 4px; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 120; padding: 10px 20px; background: var(--card); }
.skip-link:focus { top: 10px; }
.no-script { padding: 16px; text-align: center; }

.topbar {
  position: sticky; top: 0; z-index: 60; border-top: 3px solid var(--wine);
  border-bottom: 1px solid #d8c2ae99; background: #fffaf3e8;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 6px 28px #4c24370a;
}
.topbar__inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 24px; width: min(100% - 56px, 1240px); min-height: 78px; margin-inline: auto; }
.brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; color: var(--wine-deep); text-decoration: none; }
.brand__emblem { width: 43px; height: 43px; filter: drop-shadow(0 3px 5px #4c24371a); }
.brand__emblem svg { width: 100%; height: 100%; }
.brand__words { display: flex; flex-direction: column; }
.brand__name { font: 700 22px/1.35 var(--font-display); letter-spacing: .07em; }
.brand__tagline { margin-top: 2px; color: var(--lavender); font: 9px/1.4 Georgia, serif; letter-spacing: .15em; }
.topnav { display: flex; align-items: center; gap: clamp(14px, 1.7vw, 25px); }
.topnav__link { position: relative; display: inline-flex; align-items: center; min-height: 46px; color: var(--ink-soft); font-size: 14px; text-decoration: none; white-space: nowrap; transition: color .2s; }
.topnav__link::after { content: ""; position: absolute; right: 50%; bottom: 4px; left: 50%; height: 2px; background: var(--gold); transition: left .25s var(--ease), right .25s var(--ease); }
.topnav__link:hover, .topnav__link[aria-current="location"] { color: var(--wine); }
.topnav__link:hover::after, .topnav__link[aria-current="location"]::after { right: 12%; left: 12%; }
.edit-entry { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding-left: 19px; border-left: 1px solid var(--line); color: var(--wine); font-size: 13px; text-decoration: none; white-space: nowrap; }
.edit-entry span { color: var(--gold); }
.nav-toggle { display: none; align-items: center; gap: 8px; min-height: 44px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); background: var(--card); font-size: 13px; }
.nav-toggle__icon { display: flex; flex-direction: column; gap: 3px; width: 16px; }
.nav-toggle__icon span { width: 100%; height: 1px; background: currentColor; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon span:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 11px; min-height: 50px; padding: 12px 27px; border: 1px solid var(--wine); border-radius: 999px; color: var(--wine); background: transparent; font-size: 15px; font-weight: 700; line-height: 1.5; text-decoration: none; white-space: nowrap; transition: color .22s, background .22s, box-shadow .22s, transform .22s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 9px 24px #4c24371c; }
.btn--primary { color: var(--card); background: var(--wine); border-color: var(--wine); box-shadow: inset 0 0 0 3px var(--wine), inset 0 0 0 4px #d9bb8b70; }
.btn--primary::after { content: "↗"; font-size: 18px; font-weight: 400; }
.btn--primary:hover { color: white; background: var(--wine-deep); }
.btn--outline { background: #fffaf3c9; }
.btn--outline:hover, .btn--secondary:hover { background: #f1e2d7; }
.btn--small { min-height: 44px; padding: 9px 19px; font-size: 14px; }
.text-button { padding: 3px 0; border: 0; border-bottom: 1px solid var(--gold-light); color: var(--wine); background: transparent; font-size: 13px; line-height: 1.6; }
.text-button:hover { border-color: var(--wine); }

.hero { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: clamp(610px, calc(100svh - 81px), 820px); padding: 58px 32px 88px; overflow: hidden; border-bottom: 1px solid var(--line); background-color: #c6b1bd; background-image: var(--hero-image, url("/assets/hero-room.webp")); background-position: center 22%; background-repeat: no-repeat; background-size: cover; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #f9efeef5 0%, #f9efeee6 29%, #f8efee9e 52%, #58435412 76%, #4c24372b 100%), linear-gradient(0deg, #faf4ec 0%, transparent 17%, transparent 87%, #4c243714 100%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 22px; z-index: 0; border: 1px solid #fff9ef85; box-shadow: inset 0 0 0 1px #aa7d4240; pointer-events: none; }
.hero__inner { position: relative; z-index: 1; width: min(100%, 1180px); margin-inline: auto; }
.hero__stage { display: flex; justify-content: flex-start; }
.hero__panel { position: relative; width: min(100%, 550px); margin-left: clamp(0px, 3vw, 44px); padding: 35px 38px 36px; border: 1px solid #b68a55; border-radius: 24px; background: #fffaf3e3; -webkit-backdrop-filter: blur(13px); backdrop-filter: blur(13px); text-align: center; box-shadow: 0 0 0 6px #fff9ef59, 0 24px 70px #4c243733; }
.hero__panel::before { content: ""; position: absolute; inset: 9px; border: 1px solid #aa7d4245; border-radius: 16px; pointer-events: none; }
.hero__panel::after { content: "◆"; position: absolute; bottom: -14px; left: calc(50% - 17px); width: 34px; color: var(--gold); background: var(--card); font-size: 13px; line-height: 26px; }
.hero__eyebrow { margin-bottom: 13px; color: var(--lavender); font: 10px/1.6 Georgia, serif; letter-spacing: .25em; text-indent: .25em; }
.hero__crest { display: flex; align-items: center; justify-content: center; gap: 16px; width: min(100%, 250px); margin: 0 auto 15px; color: var(--gold); }
.hero__crest-rule { flex: 1; height: 1px; background: var(--gold-light); }
.hero__crest-orn { width: 100px; height: 25px; }
.hero__title { color: var(--wine-deep); font-size: clamp(46px, 5.2vw, 70px); line-height: 1.28; letter-spacing: .065em; text-indent: .065em; overflow-wrap: anywhere; text-shadow: 0 2px #fffcf5; }
.hero__subtitle { margin-top: 15px; color: var(--wine); font-size: 17px; letter-spacing: .13em; text-indent: .13em; overflow-wrap: anywhere; }
.hero__rule { display: flex; align-items: center; gap: 10px; width: 140px; margin: 20px auto 0; }
.hero__rule-line { height: 1px; flex: 1; background: var(--gold-light); }
.hero__rule-diamond { width: 5px; height: 5px; background: var(--gold); transform: rotate(45deg); }
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 25px; }
.hero__actions .btn { min-width: 164px; }
.hero__divider { position: absolute; bottom: 20px; left: 50%; z-index: 1; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; width: min(340px, 70%); color: var(--gold); }
.hero__divider-line { flex: 1; height: 1px; background: var(--gold-light); }
.hero__divider-orn { width: 120px; height: 30px; padding-inline: 7px; }

.section { width: min(100% - 72px, 1140px); margin: 0 auto; padding-top: 92px; }
.section__head { margin-bottom: 36px; text-align: center; }
.section__eyebrow { margin-bottom: 6px; color: var(--lavender); font: 10px/1.7 Georgia, serif; letter-spacing: .26em; text-indent: .26em; }
.section__title { color: var(--wine-deep); font-size: clamp(29px, 3.1vw, 40px); line-height: 1.4; letter-spacing: .09em; text-indent: .09em; }
.section__rule { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 9px; color: var(--gold); }
.section__rule span { width: 62px; height: 1px; background: var(--line); }
.section__rule svg { width: 90px; height: 23px; }
.section__hint { margin-top: 11px; color: var(--ink-soft); font-size: 13px; letter-spacing: .05em; }
.info-grid { display: grid; grid-template-columns: 1.45fr .9fr; gap: 24px; }
.card, .story-card { border: 1px solid var(--line); border-radius: 20px; background: #fffaf3d9; box-shadow: 0 13px 38px #4c24370b, inset 0 1px #fff; }
.story-card { padding: 31px; }
.card--story { order: -1; }
.story-card__head { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.story-card__badge { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid var(--gold-light); border-radius: 50%; color: var(--gold); background: #f7ecdf; }
.story-card__badge svg { width: 29px; height: 29px; }
.story-card__title { color: var(--wine); font-size: 21px; letter-spacing: .04em; }
.story-card__text { color: var(--ink); white-space: pre-line; overflow-wrap: anywhere; }
.card--story .story-card__text::first-letter { float: left; margin: 4px 9px 0 0; color: var(--wine); font: 49px/1.1 var(--font-display); }
.card--credits .story-card__text { color: var(--ink-soft); line-height: 2.2; }
.grimoire { position: relative; padding: 27px; overflow: hidden; }
.grimoire__spine { position: absolute; inset: 0 auto 0 0; width: 4px; background: linear-gradient(var(--lavender), var(--wine)); }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin: 0; padding: 0; list-style: none; counter-reset: feature; }
.feature-list li { display: flex; align-items: center; gap: 16px; min-height: 90px; padding: 19px 21px; border: 1px solid #ddcbb999; border-radius: 14px; background: #faf4ec9c; counter-increment: feature; overflow-wrap: anywhere; }
.feature-list li::before { content: counter(feature, decimal-leading-zero); flex: 0 0 38px; color: var(--gold); font: italic 24px/1 Georgia, serif; }
.feature-list li.empty::before { content: none; }

.section--download { padding-top: 96px; }
.download-panel { position: relative; padding: 40px 28px 44px; overflow: hidden; border: 1px solid var(--gold-light); border-radius: 24px; color: #fdf4e9; background: radial-gradient(circle at 50% 0, #95637c60, transparent 55%), linear-gradient(135deg, #4c2437, #603047 60%, #422033); text-align: center; box-shadow: 0 22px 55px #4c243724, inset 0 0 0 7px #ffffff05; }
.download-panel::before, .download-panel::after { content: "✦"; position: absolute; top: calc(50% - 15px); color: var(--gold-light); font-size: 20px; }
.download-panel::before { left: 28px; }
.download-panel::after { right: 28px; }
.download-panel__icon { width: 45px; height: 45px; margin: 0 auto 11px; color: var(--gold-light); }
.download-panel .section__title { color: #fff7ed; }
.download-panel .section__rule span { background: #d9bb8b60; }
.download-panel__button { min-width: 205px; margin-top: 24px; color: var(--wine-deep); background: var(--card); border-color: var(--gold-light); box-shadow: inset 0 0 0 3px var(--card), inset 0 0 0 4px #aa7d4250; }
.download-panel__button:hover { color: var(--wine-deep); background: #f6e7da; }
.download-panel__empty { margin-top: 20px; color: #ead9df; font-size: 14px; }

.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 28px; counter-reset: artwork; }
.gallery-item { min-width: 0; counter-increment: artwork; }
.gallery-item__button { position: relative; display: block; width: 100%; margin: 0; padding: 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: 0 12px 30px #4c24370b; transition: border-color .25s, box-shadow .25s, transform .25s var(--ease); }
.gallery-item__button::after { content: "↗"; position: absolute; right: 18px; bottom: 18px; display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid #d9bb8b90; border-radius: 50%; color: var(--card); background: #74384fd9; font: 21px/1 var(--font-body); opacity: 0; transition: opacity .2s; }
.gallery-item__button:hover { border-color: var(--gold); box-shadow: 0 17px 36px #4c24371a; transform: translateY(-3px); }
.gallery-item__button:hover::after, .gallery-item__button:focus-visible::after { opacity: 1; }
.gallery-item img { display: block; width: 100%; aspect-ratio: 4 / 3; border-radius: 11px; object-fit: contain; background: #332b35; }
.gallery-item figcaption { display: flex; align-items: baseline; gap: 13px; padding: 14px 5px 0; color: var(--ink); font-size: 14px; overflow-wrap: anywhere; }
.gallery-item figcaption::before { content: counter(artwork, decimal-leading-zero); flex-shrink: 0; color: var(--gold); font: italic 14px/1 Georgia, serif; }
.gallery-item.is-broken img { min-height: 200px; }
.empty { padding: 28px; color: var(--ink-soft); text-align: center; }

.characters-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 25px; }
.characters-grid[data-count="one"] { grid-template-columns: minmax(0, 850px); justify-content: center; }
.character-card { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; background: #fffaf3e8; box-shadow: 0 16px 40px #4c243710; transition: transform .3s var(--ease), box-shadow .3s; }
.character-card:hover { transform: translateY(-4px); box-shadow: 0 21px 48px #4c243719; }
.characters-grid[data-count="one"] .character-card { display: grid; grid-template-columns: 310px minmax(0, 1fr); }
.character-card__portrait { display: grid; place-items: center; min-height: 310px; overflow: hidden; background: radial-gradient(circle at 50% 38%, #eee3f2 0, #dac9df 48%, #b4a1b7 100%); }
.character-card__portrait img { display: block; width: 100%; height: 100%; max-height: 370px; object-fit: contain; }
.character-card__portrait img[src*="nanami"] { image-rendering: pixelated; }
.characters-grid[data-count="one"] .character-card__portrait { min-height: 370px; }
.character-card__body { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 30px; }
.character-card__number { margin-bottom: 12px; color: var(--lavender); font: 10px/1.5 Georgia, serif; letter-spacing: .2em; }
.character-card__heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.character-card__name { color: var(--wine-deep); font-size: 28px; letter-spacing: .07em; overflow-wrap: anywhere; }
.character-card__gender { display: inline-flex; align-items: center; min-height: 26px; padding: 3px 11px; border: 1px solid #cdb7cf; border-radius: 999px; color: var(--lavender); background: #f2e8f1; font-size: 12px; }
.character-card__rule { width: 45px; height: 1px; margin: 19px 0; background: var(--gold-light); }
.character-card__description { color: var(--ink-soft); line-height: 2; white-space: pre-line; overflow-wrap: anywhere; }

.guestbook { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 24px; background: var(--card); box-shadow: 0 18px 48px #4c243712; }
.guestbook__compose { padding: 31px; border-right: 1px solid var(--line); background: linear-gradient(145deg, #f3e7ee8c, #fffaf3 58%); }
.guestbook__letters { min-width: 0; padding: 31px; }
.guestbook__subtitle { color: var(--wine); font-size: 21px; letter-spacing: .04em; }
.message-form { position: relative; display: flex; flex-direction: column; gap: 18px; margin-top: 23px; }
.message-field { display: block; }
.message-field > span { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 7px; color: var(--ink); font-size: 14px; font-weight: 700; }
.message-field small { color: var(--ink-soft); font-size: 11px; font-weight: 400; }
.message-field input, .message-field textarea { display: block; width: 100%; border: 1px solid #d4bda9; border-radius: 12px; outline: 0; color: var(--ink); background: #fffdf9; transition: border-color .2s, box-shadow .2s; }
.message-field input { min-height: 47px; padding: 10px 13px; }
.message-field textarea { min-height: 162px; padding: 12px 13px; line-height: 1.8; resize: vertical; }
.message-field input::placeholder, .message-field textarea::placeholder { color: #9a858b; }
.message-field input:focus, .message-field textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 3px #74384f14; }
.message-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.message-form__meta { display: flex; justify-content: space-between; margin-top: -10px; color: var(--ink-soft); font-size: 11px; }
.message-form__submit { align-self: flex-start; min-width: 154px; }
.message-form__status { min-height: 24px; color: var(--ink-soft); font-size: 13px; }
.message-form__status.is-ok { color: #386349; }
.message-form__status.is-error, .module-error { color: #8a344a; }
.message-list__head { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.message-list__head span { color: var(--gold); font: 12px/1.5 var(--font-body); letter-spacing: 0; }
.message-list { max-height: 485px; padding-right: 9px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--gold-light) transparent; }
.message-card { padding: 20px 2px; border-bottom: 1px dashed #ddcbb9; }
.message-card:last-child { border-bottom: 0; }
.message-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.message-card__author { display: flex; align-items: center; min-width: 0; gap: 10px; }
.message-card__avatar { display: grid; place-items: center; flex: 0 0 33px; height: 33px; border: 1px solid #d4bfd3; border-radius: 50%; color: var(--wine); background: #f0e3ed; font-family: var(--font-display); font-size: 14px; }
.message-card__name { color: var(--wine-deep); font-size: 14px; overflow-wrap: anywhere; }
.message-card__time { flex-shrink: 0; color: #8b777e; font-size: 11px; }
.message-card__content { margin-top: 12px; color: var(--ink); font-size: 14px; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.module-loading { padding: 32px 10px; color: var(--ink-soft); text-align: center; }
.module-error { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 12px; padding: 24px; border: 1px solid #d8a8b3; border-radius: 14px; background: #fff2f2; font-size: 13px; }

#links { padding-bottom: 92px; }
.letter { position: relative; padding: 38px 32px 32px; border: 1px solid var(--line); border-radius: 20px; background: #fffaf3b8; }
.letter__seal { position: absolute; top: -22px; left: calc(50% - 23px); display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); color: var(--gold); }
.letter__seal svg { width: 29px; height: 29px; }
.link-list { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 0; list-style: none; margin: 0; padding: 0; }
.link-item { flex: 1 1 230px; display: flex; align-items: center; justify-content: center; padding: 0 16px; border-right: 1px solid var(--line); text-align: center; }
.link-item:last-child { border-right: 0; }
.link-item__anchor, .link-item__plain { display: inline-flex; align-items: center; gap: 11px; min-height: 49px; color: var(--wine-deep); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.link-item__anchor:hover { text-decoration: underline; }
.link-item__arrow { color: var(--gold); font-size: 19px; }
.site-footer { color: var(--card); background: var(--wine-deep); border-top: 3px double var(--gold-light); }
.site-footer__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 30px 24px 32px; text-align: center; }
.site-footer__orn { color: var(--gold-light); font-size: 18px; }
.site-footer__copy { font-size: 12px; letter-spacing: .08em; }

.lightbox { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 52px minmax(0, 1fr) 52px; align-items: center; gap: 18px; padding: 70px 30px 30px; color: var(--card); background: #211b24f2; }
.lightbox__figure { display: flex; flex-direction: column; align-items: center; min-width: 0; gap: 18px; }
.lightbox__image { display: block; width: auto; height: auto; max-width: 100%; max-height: calc(100dvh - 190px); object-fit: contain; }
.lightbox__caption { font-size: 14px; text-align: center; }
.lightbox__close, .lightbox__nav { display: grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 1px solid #d9bb8b80; border-radius: 50%; color: var(--card); background: #4c243780; font: 31px/1 Georgia, serif; }
.lightbox__close { position: absolute; top: 16px; right: 22px; }
.lightbox__nav:disabled { opacity: .3; cursor: default; }
.lightbox :focus-visible { outline-color: var(--gold-light); }
.load-error { position: fixed; left: 50%; bottom: 20px; z-index: 110; transform: translateX(-50%); width: min(90%, 440px); padding: 14px 22px; border: 1px solid var(--wine); border-radius: 12px; color: var(--wine-deep); background: var(--card); text-align: center; box-shadow: 0 12px 35px #4c24372b; }
.reveal-ready { opacity: 0; transform: translateY(20px); transition: opacity .65s var(--ease), transform .65s var(--ease); }
.reveal-ready.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1120px) {
  .topbar__inner { width: calc(100% - 40px); gap: 16px; }
  .topnav { gap: 14px; }
  .brand__name { font-size: 20px; }
  .brand__tagline { font-size: 8px; }
  .section { width: calc(100% - 56px); }
  .hero__panel { margin-left: 0; }
}
@media (max-width: 980px) {
  html { scroll-padding-top: 90px; }
  .topbar__inner { flex-wrap: wrap; min-height: 70px; }
  .js .nav-toggle { display: inline-flex; }
  .topnav { width: 100%; justify-content: center; flex-wrap: wrap; padding-bottom: 12px; }
  .js .topnav { position: absolute; top: calc(100% + 8px); right: 0; left: 0; display: flex; flex-direction: column; align-items: stretch; gap: 3px; width: auto; max-height: calc(100dvh - 100px); padding: 12px; overflow-y: auto; border: 1px solid var(--line); border-radius: 18px; background: #fffaf3fa; box-shadow: 0 18px 45px #4c243726; opacity: 0; visibility: hidden; transform: translateY(-9px); pointer-events: none; transition: opacity .22s, transform .22s, visibility .22s; }
  .js .topnav[data-open="true"] { opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto; }
  .js .topnav__link { justify-content: center; min-height: 43px; border-radius: 10px; }
  .js .topnav__link::after { display: none; }
  .js .topnav__link:hover, .js .topnav__link[aria-current="location"] { background: #f2e5eb; }
  .edit-entry { justify-content: center; padding: 10px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .hero__panel { width: min(100%, 520px); }
  .info-grid { grid-template-columns: 1fr; }
  .characters-grid[data-count="one"] .character-card { grid-template-columns: 260px minmax(0, 1fr); }
  .guestbook { grid-template-columns: 1fr; }
  .guestbook__compose { border-right: 0; border-bottom: 1px solid var(--line); }
  .message-list { max-height: 520px; }
  .link-item { flex-basis: 100%; border-right: 0; }
}
@media (max-width: 680px) {
  .topbar__inner { width: calc(100% - 30px); }
  .brand__emblem { width: 37px; height: 37px; }
  .brand__name { font-size: 18px; }
  .brand__tagline { font-size: 7px; }
  .hero { min-height: 720px; padding: 110px 20px 78px; background-position: 66% 50%; }
  .hero::before { background: linear-gradient(180deg, #4c243714 0%, #f9efee3b 25%, #f9efeec9 48%, #faf4ecf2 100%); }
  .hero::after { inset: 12px; }
  .hero__inner { margin-top: 110px; }
  .hero__panel { width: 100%; padding: 29px 19px 31px; border-radius: 20px; background: #fffaf3ed; }
  .hero__eyebrow { font-size: 8px; letter-spacing: .18em; }
  .hero__crest { width: 170px; margin-bottom: 13px; }
  .hero__title { font-size: clamp(37px, 11vw, 53px); letter-spacing: .035em; text-indent: .035em; }
  .hero__subtitle { margin-top: 12px; font-size: 14px; letter-spacing: .04em; text-indent: .04em; }
  .hero__actions { gap: 10px; margin-top: 21px; }
  .hero__actions .btn { flex: 1 1 115px; min-width: 0; padding: 11px 10px; font-size: 13px; }
  .hero__divider { bottom: 18px; width: 200px; }
  .section { width: calc(100% - 32px); padding-top: 65px; }
  .section__head { margin-bottom: 27px; }
  .section__title { font-size: 29px; }
  .section__hint { font-size: 12px; }
  .story-card { padding: 24px 21px; }
  .story-card__title { font-size: 20px; }
  .story-card__text { font-size: 16px; line-height: 2; }
  .grimoire { padding: 15px; }
  .feature-list { grid-template-columns: 1fr; gap: 11px; }
  .feature-list li { min-height: 78px; padding: 16px; }
  .section--download { padding-top: 70px; }
  .download-panel { padding: 32px 20px 36px; }
  .download-panel::before { left: 15px; }
  .download-panel::after { right: 15px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 27px; }
  .gallery-item__button::after { right: 15px; bottom: 15px; width: 31px; height: 31px; opacity: 1; font-size: 18px; }
  .characters-grid[data-count="one"] { grid-template-columns: 1fr; }
  .characters-grid[data-count="one"] .character-card { display: block; }
  .character-card__portrait, .characters-grid[data-count="one"] .character-card__portrait { min-height: 330px; max-height: 390px; }
  .character-card__body { padding: 25px 22px; }
  .character-card__name { font-size: 25px; }
  .guestbook__compose, .guestbook__letters { padding: 24px 20px; }
  .message-list { max-height: none; padding-right: 0; overflow: visible; }
  .message-card__head { align-items: flex-start; }
  .message-card__time { padding-top: 3px; font-size: 10px; }
  .message-form__submit { width: 100%; }
  .letter { padding: 32px 12px 25px; }
  #links { padding-bottom: 65px; }
  .lightbox { grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 5px; padding: 70px 8px 20px; }
  .lightbox__nav { width: 40px; height: 47px; border-radius: 5px; }
  .lightbox__close { right: 13px; }
  .lightbox__caption { font-size: 12px; }
}
@media (max-width: 380px) {
  .brand__tagline { display: none; }
  .message-field > span { align-items: flex-start; flex-direction: column; gap: 0; }
  .message-card__head { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready { opacity: 1; transform: none; }
}
