:root { color-scheme: light; --ink: #233f40; --muted: #52615a; --paper: #fff9eb; }
* { box-sizing: border-box; }
html { scroll-padding-top: 1.5rem; }
body { margin: 0; background: linear-gradient(180deg, #e5f4f8 0, #fff9eb 21rem, #fff9eb 75%, #f3f5de 100%); color: var(--ink); font: 1.0625rem/1.6 "Trebuchet MS", system-ui, -apple-system, "Segoe UI", sans-serif; }
a { color: inherit; text-underline-offset: .25em; }
a:focus-visible, summary:focus-visible { outline: 4px solid #173f6b; outline-offset: 6px; }
.skip-link { position: absolute; top: .75rem; left: 1rem; z-index: 2; transform: translateY(-200%); background: white; padding: .65rem 1rem; border-radius: .5rem; }
.skip-link:focus { transform: translateY(0); }
.site-header, main, footer { width: min(100% - 3rem, 68rem); margin-inline: auto; }
.site-header { display: flex; justify-content: center; padding-block: 1.1rem .6rem; }
.account-header { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 1rem; }
.account-header .wordmark { grid-column: 2; }
.account-header .account-link { grid-column: 3; justify-self: end; }
.account-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .45rem 1rem; border: 2px solid #6c895e; border-radius: 2rem; background: #fffdf4; font-weight: 700; text-decoration: none; white-space: nowrap; }
.account-link:hover { background: #fff3cd; }
[hidden] { display: none !important; }
.wordmark { display: inline-flex; gap: .55rem; align-items: center; min-height: 3rem; font: 700 1.4rem/1.2 Georgia, serif; text-decoration: none; border-radius: .5rem; }
.brand-sun { width: 2.2rem; height: 2.2rem; color: #976016; }
.welcome { padding-top: .45rem; text-align: center; }
.eyebrow { margin: .25rem 0 .25rem; font-size: 1rem; font-weight: 700; color: #49634c; }
h1 { margin: 0 auto 1.5rem; max-width: 55rem; font: 700 clamp(2rem, 4.3vw, 3.2rem)/1.18 Georgia, "Times New Roman", serif; letter-spacing: -.025em; text-wrap: balance; }
.storybook-window { margin: 0; overflow: hidden; border: 6px solid #fffdf4; border-radius: 1.5rem; outline: 1px solid #d4cda9; box-shadow: 0 12px 32px #6e64351c; background: #dce9bb; }
.storybook-window img { display: block; width: 100%; height: auto; }
.invitation { margin: 1.35rem 0 1rem; font-size: clamp(1.15rem, 2.5vw, 1.5rem); font-weight: 700; }
.collections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; max-width: 47rem; margin-inline: auto; text-align: left; align-items: start; }
.collection { min-width: 0; border: 2px solid var(--edge); border-radius: 1.25rem; background: var(--card); box-shadow: 0 5px 0 var(--edge); color: var(--card-ink); }
.storybooks { --card: #ffdd8c; --edge: #b47a25; --card-ink: #513810; }
.games { --card: #ddd6fa; --edge: #8a77b3; --card-ink: #3c2b64; }
summary { display: flex; align-items: center; gap: 1rem; min-height: 6.8rem; padding: 1rem 1.2rem; border-radius: 1.1rem; list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::marker { content: ""; }
summary:hover { background: #ffffff30; }
.choice-picture { flex: 0 0 3.75rem; width: 3.75rem; height: 3.4rem; }
.choice-copy { min-width: 0; flex: 1; }
.choice-title { display: block; font-size: clamp(1.35rem, 2.4vw, 1.75rem); font-weight: 700; line-height: 1.25; }
.choice-status { display: block; margin-top: .25rem; font-size: .9375rem; }
.disclosure-mark { font: 1.75rem/1 system-ui, sans-serif; }
details[open] .disclosure-mark { transform: rotate(45deg); }
.collection-message { border-top: 1px solid var(--edge); padding: .8rem 1.3rem 1rem; background: #ffffff66; border-radius: 0 0 1.1rem 1.1rem; }
.collection-message p { margin: .2rem 0; }
.collection-message p + p { font-size: .9375rem; }
.family-note { margin: 1.7rem 0 2rem; color: var(--muted); font-size: 1rem; }
footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; border-top: 1px solid #d9dcc4; padding-block: 1rem 1.5rem; color: var(--muted); font-size: .9375rem; }
.introduction { max-width: 38rem; margin: 1rem auto 2rem; }
@media (max-width: 38rem) {
  .site-header, main, footer { width: calc(100% - 2rem); }
  .site-header { padding-top: .85rem; }
  .account-header { display: flex; justify-content: space-between; flex-wrap: wrap; }
  h1 { margin-bottom: 1.1rem; }
  .storybook-window { border-width: 4px; border-radius: 1rem; }
  .collections { grid-template-columns: minmax(0, 1fr); max-width: 26rem; gap: 1.15rem; }
  summary { min-height: 5.4rem; padding: .8rem 1.1rem; }
  .invitation { margin-top: 1.15rem; }
}
@media (forced-colors: active) {
  .collection, .storybook-window { border: 2px solid CanvasText; }
  a:focus-visible, summary:focus-visible { outline-color: Highlight; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }

.collection-link { display: flex; align-items: center; gap: 1rem; min-height: 6.8rem; padding: 1rem 1.2rem; text-decoration: none; }
.collection-link:hover { background: #ffe7ab; }
.archive-heading { text-align: center; margin-block: 1.2rem 1.8rem; }
.archive-home { display: inline-flex; align-items: center; min-height: 44px; }
/* Storybooks entrances and the Archive’s first shelf. */
.storybook-entrances { max-width: 60rem; margin-bottom: 3rem; }
.curated-collections { --card: #dcebd4; --edge: #6c895e; --card-ink: #2d4924; }
.spellbooks { --card: #ddd6fa; --edge: #8a77b3; --card-ink: #3c2b64; }
.grimoires { --card: #d4eafa; --edge: #6289aa; --card-ink: #244964; }
/* Identity colours stay with each Storybooks entrance at every breakpoint. */
.storybook-entrances .collection { --edge: var(--card-ink); }
.storybook-entrances .archive-entrance, .storybook-entrances .maker-entrance { --card: #fbd5e5; --card-ink: #a52332; }
.storybook-entrances .curated-collections { --card: #ffe2c2; --card-ink: #934600; }
.storybook-entrances .spellbooks { --card: #fff0a8; --card-ink: #766000; }
.storybook-entrances .grimoires { --card: #dcf0cf; --card-ink: #315f29; }
.storybook-entrances .wordless-entrance { --card: #d6edff; --card-ink: #235781; }
.storybook-entrances .more-entrance { --card: #eadcfa; --card-ink: #633887; }
.storybook-entrances .collection-link:hover { background: linear-gradient(#ffffff30, #ffffff30), var(--card); }
/* Public Wordless shelves retain their identity colours without offering a destination. */
.wordless-entrances button.collection { width: 100%; font: inherit; text-align: left; }
.wordless-entrances .collection:disabled {
  --edge: color-mix(in srgb, var(--card-ink) 15%, #a8a8a8);
  background: color-mix(in srgb, var(--card) 15%, #eeeeee);
  color: color-mix(in srgb, var(--card-ink) 20%, #666666);
  cursor: not-allowed;
  opacity: 1;
}
@media (forced-colors: active) {
  .wordless-entrances .collection:disabled { --edge: GrayText; color: GrayText; border-color: GrayText; }
}
.archive-path { margin: 0 0 1.6rem; font-size: 1.125rem; }
.archive-path p { margin: .15rem 0; }
.archive-path p:last-child { font-weight: 700; }
.collection-ancestors p:last-child { font-weight: inherit; }
.storybook-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); align-items: start; gap: 2rem; margin-bottom: 3rem; }
.archive-book { min-width: 0; }
.published-books { display: contents; }
.storyarc-links { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 2rem; }
.storyarc-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .7rem 1.1rem; border: 2px solid #627d71; border-radius: .7rem; color: #254c3b; background: #fffdf5; font-weight: 700; text-align: center; text-decoration: none; touch-action: manipulation; }
.storyarc-button:focus-visible { outline: 3px solid #006b75; outline-offset: 4px; }
#storyarcs-heading { outline: none; }
.storybook-cover { display: block; padding: .65rem; color: var(--ink); text-align: center; text-decoration: none; border: 2px solid transparent; border-radius: 1rem; }
.storybook-cover:hover { background: #fff3cd; border-color: #b47a25; }
.storybook-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; border: 2px solid #d4cda9; border-radius: .6rem; box-shadow: 0 7px 18px #6e643522; }
.storybook-number { display: block; margin: .9rem 0 .3rem; font-weight: 700; color: #49634c; }
.archive-book h2, .archive-book h3 { margin: 0; font: 700 1.25rem/1.3 Georgia, serif; text-wrap: balance; }
.archive-book p { margin: .5rem 0 .15rem; font-size: .875rem; }
@media (max-width: 38rem) { .collection-link { min-height: 5.4rem; padding: .8rem 1.1rem; } .storybook-entrances { max-width: 26rem; } }
