/* The library's illustrated edition. Hand-authored shapes and existing character art only. */
:root {
  --ink: #382c28;
  --muted: #675d55;
  --paper: #fffaf0;
  --line: #d9c6a8;
  --rust: #a64d3e;
  --forest: #355b46;
  --serif: "Yu Mincho", "Hiragino Mincho ProN", Georgia, serif;
  background: #f8f2e7;
  color: var(--ink);
}
body {
  background: radial-gradient(circle at 3% 24%, #f1e5ce 0, transparent 26rem),
    radial-gradient(circle at 100% 55%, #f3e4cf 0, transparent 32rem), #f8f2e7;
}
button, .button { border-radius: 999px; border-color: #bfa98b; padding-inline: 20px; }
button:hover:not(:disabled), .button:hover { background: #eaddc9; }
.primary, .navigator-choice.active { background: var(--forest); border-color: var(--forest); color: #fffdf8; }
.primary:hover:not(:disabled) { background: #254834; border-color: #254834; color: #fffdf8; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
summary:focus-visible, textarea:focus-visible { outline: 3px solid #174f65; outline-offset: 3px; }
.preview-header { border-bottom: 1px solid #ebddc9; background: #fffaf0; }
.header-inner { max-width: 1200px; min-height: 82px; }
.brand img { width: 52px; height: 52px; }
.brand strong { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .04em; }
.brand small { letter-spacing: .09em; }
.local-badge { border-radius: 999px; background: #f1eadc; }
.annex-nav { background: #fffaf0; box-shadow: 0 4px 20px #634a2b0b; }
.annex-nav > div { max-width: 1200px; }
.annex-nav a { min-height: 56px; border-radius: 12px 12px 0 0; }
.annex-nav a:hover { background: #f3eada; color: var(--forest); }
.annex-nav a[aria-current=page] { color: var(--forest); background: #f1eadc; }
.annex-nav a[aria-current=page]:after { background: var(--forest); height: 4px; border-radius: 4px 4px 0 0; }
.nav-number { color: #a78360; }
.page { max-width: 1200px; padding-top: 38px; }
.eyebrow { color: #9c5540; }
.introduction h1, .page > h1 { color: #3b302b; text-wrap: balance; }
.field input, .field select, textarea { border-radius: 10px; background: #fffdf8; }
.searchbar { border: 1px solid #e2d1b6; border-radius: 22px; background: #fffaf0; padding: 22px; margin: 28px 0 18px; box-shadow: 0 7px 24px #604c3220; }
.searchbar .text-button { padding-inline: 14px; }
.storybook-hero { min-height: 480px; display: grid; grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr); align-items: stretch; background: #efe0c7; border: 1px solid #dfc59f; border-radius: 26px; box-shadow: 0 15px 0 -8px #e2d0b5, 0 24px 35px #5e432222; overflow: hidden; }
.storybook-hero-copy { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 72px); background: radial-gradient(circle at 0 0, #fff5e5, transparent 70%), #f7e8d1; }
.storybook-hero-copy:before { content: '✦'; color: #c68a47; font-size: 2rem; margin-bottom: 12px; }
.storybook-hero .introduction { padding: 0; }
.storybook-hero .introduction h1 { font-size: clamp(2rem, 3.7vw, 3.5rem); line-height: 1.38; letter-spacing: .055em; }
.storybook-hero .intro-copy { font-size: clamp(.88rem, 1.15vw, 1rem); line-height: 2.15; }
.storybook-hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.storybook-hero-actions > * { min-width: 152px; }
.storybook-hero-scene { position: relative; min-height: 430px; background: url('./assets/illustrations/library-scene.svg') center center / cover no-repeat; }
.storybook-hero-jikky { position: absolute; bottom: 1%; left: 7%; width: min(25%, 148px); height: auto; max-height: 40%; object-fit: contain; filter: drop-shadow(7px 9px 5px #40230d55); }
.section-line { border-bottom: 2px solid #c89c66; font-weight: 700; }
.library-layout { gap: 32px; grid-template-columns: minmax(0, 1fr) 270px; }
.shelf-row { background: linear-gradient(145deg, #f8e9c9 0%, #e9d4aa 49%, #ddc191 100%); border: 1px solid #d1b18a; border-radius: 12px 12px 3px 3px; box-shadow: inset 0 2px 3px #fff9e5, 0 7px 16px #795a2b1c; }
.books-on-shelf { background: linear-gradient(180deg, #fff9e03d 0%, transparent 28%, #8a633019 100%); }
.book { overflow: hidden; background-image: linear-gradient(115deg, #fff9e522 0%, transparent 33%, #271b1a24 100%); box-shadow: inset 5px 0 0 #24180f24, inset 9px 0 7px #fff3d321, inset -3px 0 6px #1d151721, 6px 0 0 -1px #e8dfcf, 9px 5px 10px -5px #4532245e; }
.book.binding-1 { background-image: repeating-linear-gradient(0deg, transparent 0 7px, #ffffff08 7px 8px), linear-gradient(115deg, #fff9e522 0%, transparent 33%, #271b1a24 100%); }
.book::after { content: ''; position: absolute; inset: 3px 3px auto 10px; height: 38%; border-radius: 2px 5px 0 0; background: linear-gradient(180deg, #ffffff18, transparent); pointer-events: none; }
.book-title { max-width: 100%; max-height: 172px; overflow: hidden; word-break: break-word; }
.book-title.latin { font-size: 1.08rem; line-height: 1.32; margin-top: 25px; }
.wood-edge { background: linear-gradient(180deg, #edc693 0%, #b97b49 24%, #92582f 78%, #744424 100%); border-top-color: #ffe0a4; box-shadow: inset 0 2px 2px #fff6d9a8, inset 0 -2px 2px #482a1f55, 0 5px 11px #6a492e42; }
.bookmark-note { background: #e2e9d5; border: 1px solid #adc2a0; border-top: 4px solid var(--forest); border-radius: 16px; }
.workshop-note, .recent-list { padding-inline: 18px; }
.season-invitation { margin-top: 46px; border-radius: 22px; padding: 34px 42px; background: linear-gradient(125deg, #dfe9d9 0%, #fff4e3 75%); box-shadow: 0 8px 24px #5b48241a; }
.season-invitation:after { content: '✦'; color: #b7795030; }
.feature-links a { border-radius: 999px; }
.exhibit-card { border-radius: 12px; box-shadow: 5px 6px 0 #e4d5bd; }
.guide-stage { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 20px; align-items: stretch; margin: 22px 0 30px; }
.guide-desk { max-width: none; width: 100%; margin: 0; border-radius: 22px; padding: 36px clamp(22px, 4vw, 48px); box-shadow: 7px 8px 0 #e8d8be; }
.guide-navigator { display: flex; flex-direction: column; max-width: none; min-width: 0; min-height: 0; height: 100%; margin: 0; padding: 23px 18px 0; border-radius: 22px; background: linear-gradient(155deg, #e1eadb, #fff1d9 80%); }
.navigator-copy { padding: 0; }
.navigator-copy h2 { font-size: 1.2rem; }
.navigator-switch { gap: 5px; }
.navigator-choice { padding: 7px 10px; font-size: .75rem; }
.navigator-portrait { flex: 1; min-height: 180px; max-height: 260px; align-items: end; }
.navigator-portrait img { object-fit: contain; object-position: center bottom; }
.guide-filters { border: 1px solid #e2d1b6; border-radius: 18px; background: #fffaf0; padding: 24px; }
.guide-filters h2 { font-family: var(--serif); }
.answer-grid button { border-radius: 12px; }
.story-sheet, .submission-editor, .submission-preview, .review-card, .member-record, .reading-form, .cross-search-form, .backup-section { border-radius: 16px; }
.member-welcome, .member-transfer, .public-export-section { border-radius: 16px; }
.paper-dialog { border-radius: 18px; }
.footer { max-width: 1200px; }
@media (max-width: 1050px) {
  .guide-stage { grid-template-columns: minmax(0, 1fr) 265px; }
  .library-layout { grid-template-columns: minmax(0, 1fr) 235px; gap: 24px; }
}
@media (max-width: 750px) {
  .storybook-hero { grid-template-columns: 1fr; }
  .storybook-hero-copy { padding: 32px 30px; }
  .storybook-hero-scene { min-height: 300px; background-position: center 42%; }
  .storybook-hero-jikky { max-height: 45%; }
  .guide-stage { grid-template-columns: 1fr; }
  .guide-navigator { flex-direction: row; gap: 16px; min-height: 230px; }
  .navigator-copy { flex: 1; align-self: center; }
  .navigator-portrait { flex: 0 0 32%; min-height: 210px; max-height: 260px; }
  .library-layout { grid-template-columns: 1fr; }
  .shelf-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .recent-list { grid-column: 1 / -1; }
}
@media (max-width: 650px) {
  .header-inner, .page, .footer { margin-left: 16px; margin-right: 16px; }
  .header-inner { min-height: 72px; }
  .brand img { width: 38px; height: 38px; }
  .brand strong { font-size: .88rem; }
  .annex-nav > div { margin: 0 8px; }
  .annex-nav a { min-height: 49px; padding: 8px 3px; }
  .page { padding-top: 20px; }
  .storybook-hero { border-radius: 18px; min-height: 0; }
  .storybook-hero-copy { padding: 28px 22px; }
  .storybook-hero .introduction h1 { font-size: clamp(1.9rem, 7vw, 2.5rem); }
  .storybook-hero-actions > * { flex: 1; min-width: 130px; }
  .storybook-hero-scene { min-height: 235px; }
  .searchbar { padding: 18px; margin: 20px 0; }
  .shelf-aside { grid-template-columns: 1fr; }
  .recent-list { grid-column: auto; }
  .guide-stage { margin: 16px 0 25px; }
  .guide-desk { padding: 24px 18px; }
  .guide-navigator { min-height: 0; padding: 18px 12px 0; }
  .navigator-copy h2 { font-size: 1rem; }
  .navigator-portrait { flex-basis: 28%; min-height: 160px; }
  .navigator-choice { min-height: 38px; }
  .guide-filters { padding: 18px; }
  .season-invitation { padding: 24px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
