.bedtime-jump { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 15px; border: 1px solid #b88a3e; border-radius: 4px; color: #27384d; background: #ffe6a9; font-weight: 800; font-size: 13px; cursor: pointer; }
.bedtime-jump:hover { background: #ffdc85; }
.bedtime-library-link { margin: 8px 0 24px; }
.together-inner .bedtime-family-intro { max-width: 540px; margin-bottom: 16px; }
.bedtime-reading { color: #293b4e; background: #fffaf0; }
.dialog-bedtime { padding: 42px clamp(22px,6vw,74px) 48px; border-top: 1px solid #decc9f; background: radial-gradient(ellipse at top right,#ffedc055,transparent 55%),#fffaf0; scroll-margin-top: 16px; }
.bedtime-kicker { display: flex; gap: 10px; align-items: center; color: #81602b; font-family: var(--sans); font-size: 10px; font-weight: 800; letter-spacing: .16em; line-height: 1.6; }
.bedtime-kicker > span { color: #b68a36; font-size: 22px; }
.bedtime-reading h3 { max-width: 650px; margin: 14px 0 10px; color: #18314a; font-family: var(--serif); font-size: clamp(29px,4.5vw,42px); line-height: 1.16; letter-spacing: -.025em; text-wrap: balance; }
.bedtime-meta { margin: 0 0 28px; color: #667465; font-size: 12px; line-height: 1.6; }
.bedtime-prose { max-width: 680px; font-family: var(--serif); font-size: clamp(18px,2vw,21px); line-height: 1.85; overflow-wrap: break-word; }
.bedtime-prose p { margin: 0 0 1.2em; }
.bedtime-prose p:last-child { margin-bottom: 0; }
.bedtime-status:empty { display: none; }
.bedtime-status { font-size: 14px; line-height: 1.7; }
.bedtime-prompt { max-width: 680px; margin: 32px 0 26px; padding: 22px 24px; border-left: 3px solid #a8c8ae; background: #edf4e9; }
.bedtime-prompt h4, .bedtime-prompt h2 { margin: 0 0 8px; color: #2e503f; font-family: var(--serif); font-size: 21px; line-height: 1.35; }
.bedtime-prompt p { margin: 0; color: #3f5d4d; font-size: 15px; line-height: 1.75; }
.bedtime-page-link { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; color: #294e57; font-size: 13px; font-weight: 800; text-underline-offset: 4px; }
.story-page { min-height: 100vh; background: #f9f3e7; }
.storybook-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: 84px; padding: 18px max(24px,calc((100% - 1120px)/2)); background: #08152a; color: #fffaf0; }
.storybook-header .brand { flex-shrink: 0; }
.storybook-header > a:last-child { color: #f7d68c; font-size: 13px; line-height: 1.5; text-underline-offset: 5px; text-align: right; }
.storybook-shell { width: min(1120px,calc(100% - 48px)); margin: 0 auto; padding: 36px 0 56px; }
.storybook-back { display: inline-flex; min-height: 44px; align-items: center; color: #596a68; font-size: 13px; text-underline-offset: 4px; }
.reading-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: clamp(36px,6vw,80px); align-items: start; margin-top: 24px; }
.storybook-art { position: sticky; top: 28px; margin: 0; }
.storybook-art > img { width: 100%; height: auto; aspect-ratio: 5/7; object-fit: contain; border-radius: 10px; box-shadow: 0 14px 36px #1e33472b; background: #13243b; }
.storybook-art figcaption { margin-top: 16px; color: #5b6d69; font-size: 12px; text-align: center; line-height: 1.65; }
.storybook-art a { display: inline-flex; min-height: 44px; align-items: center; margin-top: 8px; text-underline-offset: 4px; }
.storybook-article { min-width: 0; }
.storybook-article.bedtime-reading { background: transparent; }
.storybook-article h1 { margin: 15px 0 14px; color: #18314a; font-family: var(--serif); font-size: clamp(35px,4.5vw,56px); letter-spacing: -.035em; line-height: 1.08; text-wrap: balance; overflow-wrap: break-word; }
.storybook-article .bedtime-meta { margin-bottom: 34px; }
.storybook-end { display: flex; justify-content: center; gap: 18px; max-width: 680px; margin: 32px 0; color: #a38041; font-size: 16px; }
.storybook-next { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 38px; }
.storybook-next a { display: flex; flex-direction: column; justify-content: center; gap: 7px; min-height: 86px; padding: 17px; border: 1px solid #d6c6a7; border-radius: 6px; color: #213c50; text-decoration: none; background: #fffaf0; }
.storybook-next a:hover { border-color: #af8b48; background: #fff3d7; }
.storybook-next a span { color: #786546; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.storybook-next a strong { font-family: var(--serif); font-size: 18px; line-height: 1.35; }
.storybook-footer { padding: 30px 24px; border-top: 1px solid #d7cbb2; color: #61716b; text-align: center; font-size: 12px; line-height: 1.8; }
.storybook-footer p { margin: 0 0 9px; }
.storybook-footer nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px 24px; }
.storybook-footer a { text-underline-offset: 4px; }
.library-hero { padding: 60px max(24px,calc((100% - 1120px)/2)) 64px; color: #fffaf0; background: radial-gradient(ellipse at 85% 10%,#20434a 0,transparent 62%),#10233c; }
.library-hero .bedtime-kicker { color: #f0cf84; }
.library-hero h1 { max-width: 760px; margin: 16px 0 22px; font-family: var(--serif); font-size: clamp(42px,6vw,72px); letter-spacing: -.04em; line-height: 1.04; text-wrap: balance; }
.library-hero > p { max-width: 560px; margin: 0; color: #d4dfdc; font-size: 16px; line-height: 1.8; }
.story-library-heading { margin: 0 0 26px; color: #284554; font-family: var(--serif); font-size: 28px; }
.story-library-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 22px; }
.story-library-card { display: block; overflow: hidden; border: 1px solid #e1d4b8; border-radius: 9px; background: #fffaf0; color: #253c50; text-decoration: none; transition: box-shadow .2s ease,border-color .2s ease; }
.story-library-card:hover { border-color: #ba954e; box-shadow: 0 8px 24px #20374c14; }
.story-library-card > img { width: 100%; height: auto; aspect-ratio: 5/7; object-fit: contain; background: #15253c; }
.story-library-copy { padding: 18px 17px 20px; }
.story-library-copy .story-number { margin: 0 0 8px; color: #6f7b69; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.story-library-copy h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 23px; line-height: 1.2; }
.story-library-copy .story-hero-name { margin: 0; color: #5e7069; font-size: 13px; line-height: 1.6; }
.story-library-copy .story-read-link { display: block; margin-top: 15px; color: #466753; font-size: 12px; font-weight: 800; }
@media (max-width: 1000px) { .story-library-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; } }
@media (max-width: 800px) { .reading-layout { grid-template-columns: 180px minmax(0,1fr); gap: 30px; } }
@media (max-width: 650px) {
  .storybook-header { min-height: 76px; padding: 16px 20px; gap: 16px; }
  .storybook-header .brand-word { font-size: 17px; }
  .storybook-header .brand-byline { font-size: 7px; }
  .storybook-header > a:last-child { max-width: 130px; font-size: 12px; }
  .storybook-shell { width: calc(100% - 40px); padding-top: 24px; }
  .reading-layout { grid-template-columns: 1fr; gap: 28px; margin-top: 16px; }
  .storybook-art { position: static; width: min(58%,210px); margin: 0 auto; }
  .storybook-art figcaption { margin-top: 10px; }
  .storybook-art a { margin-top: 0; }
  .storybook-article h1 { font-size: 38px; }
  .bedtime-kicker { font-size: 9px; letter-spacing: .12em; }
  .bedtime-prose { font-size: 19px; line-height: 1.8; }
  .bedtime-prompt { padding: 18px; }
  .storybook-next { gap: 10px; }
  .storybook-next a { padding: 14px 12px; }
  .storybook-next a strong { font-size: 16px; }
  .library-hero { padding-top: 42px; padding-bottom: 46px; }
  .library-hero > p { font-size: 15px; }
  .story-library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
  .story-library-copy { padding: 14px 12px; }
  .story-library-copy h3 { font-size: 19px; }
  .story-library-copy .story-hero-name { font-size: 11px; }
}
@media print {
  .story-page { background: white; }
  .storybook-header, .storybook-back, .storybook-art, .storybook-next, .storybook-footer { display: none; }
  .storybook-shell { width: 100%; padding: 0; }
  .reading-layout { display: block; margin: 0; }
  .bedtime-prose { max-width: none; font-size: 13pt; line-height: 1.6; }
  .bedtime-prompt { break-inside: avoid; }
}
