/* A warmer visual layer for the existing DreamScript site.
   Book data, cover files, URLs, navigation and interaction code are unchanged. */
:root {
  --ivory: #F5E6D4;
  --coral: #C98672;
  --gold: #A77B43;
  --teal: #244C47;
  --plum: #7D5875;
  --ink: var(--teal);
  --body: #35433F;
  --cream: var(--ivory);
  --paper: #FFF8EE;
  --line: #D4B99A;
  --soft: #EED6C4;
}
body {
  background: var(--ivory);
  background-image: radial-gradient(ellipse at 0 14%, #C9867210, transparent 40%);
}
::selection { background: #E8C4B3; color: var(--teal); }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible {
  outline-color: #794657;
}
.preview-bar { background: var(--teal); color: var(--ivory); letter-spacing: .05em; }
.lock { color: #E8C68E; }
.preview-separator { color: #CAB28F; }
.site-header {
  background: #F5E6D4F7;
  border-bottom: 1px solid #A77B4360;
  box-shadow: 0 5px 22px #7D587508;
}
.brand-mark { color: var(--gold); }
.brand-name { color: var(--teal); }
.brand-subtitle { color: #6C4A60; }
.header-inner nav a { font-weight: 500; }
.header-inner nav a:hover { color: #704A68; border-color: var(--plum); }
.text-size { border-color: #A77B4380; background: #FFF8EE88; }
.text-size:hover { background: #ECD3C4; }
.text-size[aria-pressed=true] { background: var(--plum); color: var(--paper); }
.eyebrow { color: #75512D; }
.hero { padding-top: 68px; padding-bottom: 64px; position: relative; }
.hero-copy:before {
  content: '';
  position: absolute;
  width: 110px;
  height: 3px;
  background: linear-gradient(90deg, var(--coral) 0 68%, var(--gold) 68% 84%, transparent 84% 90%, var(--plum) 90%);
  top: -23px;
}
.hero h1 { color: var(--teal); }
.hero h1 em { color: var(--plum); }
.hero-description { color: #3C4841; }
.hero-footnote { color: #5F514A; line-height: 1.8; }
.hero-footnote>span { color: #845A2D; }
.primary {
  background: var(--teal);
  border-color: #244C47;
  color: #FFF8EE;
  box-shadow: 0 5px 13px #244C4712;
}
.primary:hover { background: #65415D; border-color: #65415D; }
.quiet-link { color: #6D4564; border-bottom-color: #A77B4380; }
.quiet-link:hover { color: var(--teal); border-bottom-color: var(--coral); }
.hero-display:before {
  background: radial-gradient(ellipse at 30% 15%, #E8BBA0 0, #D69A85 52%, #C98672 100%);
  border: 1px solid #A77B4380;
  border-radius: 48% 48% 3px 3px;
  box-shadow: inset 0 0 0 12px #F5E6D433;
}
.hero-display:after {
  content: '';
  position: absolute;
  inset: 30px 11% 18% 13%;
  border-radius: 48% 48% 2px 2px;
  border: 1px solid #FFF1DA80;
  z-index: -2;
  pointer-events: none;
}
.orbit { border-color: #A77B4380; }
.orbit-two { border-color: #7D58754D; }
.display-star { color: var(--plum); text-shadow: 0 1px #FFF8EE; }
.hero-book { box-shadow: -8px 9px 0 #B59D83, 17px 20px 35px #5A32433D; }
.book-plinth { background: #B98C6E; border-top: 1px solid #F6DFC1; box-shadow: 0 22px 35px #704B4820; }
.featured-label {
  background: #FFF8EE;
  border: 1px solid #B48C5C;
  border-left: 4px solid var(--gold);
  box-shadow: 0 9px 22px #6A38451A;
}
.featured-label>span:nth-child(2) { color: #623F58; }
.featured-label a { color: var(--teal); }
.intro-line {
  background: #ECD2C3;
  border-block-color: #C18E6B80;
  border-radius: 3px;
  box-shadow: inset 0 4px 0 #F5E6D4, inset 0 -4px 0 #F5E6D4;
}
.intro-line p { color: #66475D; }
.intro-line>span { color: #77512C; }
.section-heading>p { color: #5B4D49; }
.browse-tools { border-color: #BA976D99; }
.filter { color: #4F4B43; border-radius: 3px; }
.filter.active { background: var(--plum); color: #FFF8EE; box-shadow: 0 3px 8px #7D58751A; }
.filter:not(.active):hover { background: #EAC9B8; border-color: #B18A5D; }
.search-box { background: #FFF8EEA6; border: 1px solid #B9956F; padding: 6px 12px; border-radius: 3px; }
.search-box input::placeholder { color: #635C53; opacity: 1; }
.result-count { color: #62564D; }
.book-grid { gap: 27px; align-items: stretch; }
.book-card {
  background: #FFF8EE;
  border: 1px solid #BC9C75;
  border-radius: 7px 7px 3px 3px;
  padding: 9px;
  box-shadow: 0 10px 24px #754A5212, 0 2px 3px #75512D0A;
  overflow: hidden;
}
.book-card .cover-stage { border: 1px solid #FFF8EEB3; border-radius: 3px 3px 0 0; }
.cover-stage.dreams { background: linear-gradient(145deg, #CBB6CA, #BDA5BB); }
.cover-stage.fiction { background: linear-gradient(145deg, #E4B69F, #C98672); }
.cover-stage.puzzles { background: linear-gradient(145deg, #BED1C6, #93B2A4); }
.cover-stage:before {
  content: '';
  position: absolute;
  inset: 13px;
  border: 1px solid #FFF8EE80;
  border-radius: 48% 48% 2px 2px;
  pointer-events: none;
}
.cover-stage:after { background: #72533160; bottom: 20px; }
.cover-stage img { box-shadow: 7px 12px 19px #3A263B40; }
.card-content { padding: 24px 15px 13px; }
.book-category { color: #76512D; line-height: 1.7; }
.book-card h3 { color: var(--teal); }
.book-subtitle { color: #714D66; }
.book-description { color: #3B4540; }
.book-author, .link-explainer { color: #5C574E; }
.detail-link { color: #704867; border-color: #A77B4370; }
.card-purchase { border: 1px solid #244C47; border-bottom: 3px solid var(--gold); border-radius: 2px; }
.card-bottom .link-explainer { min-height: 3em; }
.purchase-note { border-color: #B79A7499; color: #58594D; }
.empty-state { background: #EDD1C1; border: 1px solid #B99065; }
.author-section {
  background: linear-gradient(110deg, #E7BBAA 0%, #EFD3C4 46%, #F0DACA 100%);
  border-block: 1px solid #B6885A80;
  position: relative;
}
.author-layout { gap: 86px; }
.author-art {
  aspect-ratio: .84;
  max-width: 355px;
  background: #C98672;
  border: 1px solid #A77B43;
  border-radius: 5px;
  padding: 16px;
  box-shadow: 12px 15px 0 #F5E6D480, 18px 20px 30px #7D58751A;
  transform: rotate(-2deg);
}
.author-art-border {
  background: #F1D9C6;
  border: 1px solid #96714B;
  padding: 26px 18px 20px;
  gap: 9px;
}
.art-kicker { color: #65422B; font-size: .49rem; }
.author-monogram {
  width: 82%;
  flex: 1;
  min-height: 160px;
  max-height: 230px;
  margin: 6px 0 0;
  border: 1px solid #A77B4390;
  border-radius: 100px 100px 5px 5px;
  background: radial-gradient(ellipse at 40% 20%, #FFF8EE 0%, #EBD4CA 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7D5875;
  letter-spacing: -.1em;
  font-size: 4.5rem;
}
.author-monogram>span { top: 25px; right: 4px; color: #9D7240; font-size: 1.8rem; }
.author-signature { color: #5E3B54; margin-top: 5px; }
.portrait-note { font-size: .55rem; line-height: 1.6; color: #604F45; max-width: 180px; text-align: center; }
.art-bottom { color: #624A3D; font-size: .54rem; margin-top: 4px; text-align: center; }
.author-copy h2 { color: #4E3B4C; }
.author-copy p:not(.eyebrow) { color: #3C413B; }
.studio-section {
  width: 100%;
  max-width: none;
  padding: 84px max(48px, calc((100vw - 1240px) / 2));
  color: #F5E6D4;
  background: radial-gradient(ellipse at 83% 48%, #7D5875 0%, #583D56 43%, #3D303F 100%);
  border-block: 1px solid #A77B43;
  position: relative;
  overflow: hidden;
}
.studio-section:before {
  content: '';
  position: absolute;
  right: 8%;
  top: -130px;
  width: 350px;
  height: 350px;
  border: 1px solid #C49C6933;
  border-radius: 50%;
  box-shadow: 0 0 0 35px #C49C6908, 0 0 0 70px #C49C6905;
  pointer-events: none;
}
.studio-section .eyebrow { color: #F5E6D4; }
.studio-section h2 { color: #FFF2E0; }
.studio-intro>p { color: #F4E5D6; }
.studio-topics { border-color: #B68A5D99; color: #F5E6D4; }
.studio-topics span:before { color: #D7AC72; }
.in-progress {
  background: #302C38;
  border: 1px solid #B48B5D;
  box-shadow: 0 15px 30px #21162240;
  border-radius: 3px;
  overflow: hidden;
}
.project-art {
  background: radial-gradient(ellipse at 50% 48%, #A77B4355, transparent 55%), linear-gradient(170deg, #49354F, #283E3D);
  border-right: 1px solid #A77B4380;
  isolation: isolate;
}
.project-art:before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 19% 28%, #E6C392 0 1px, transparent 2px), radial-gradient(circle at 78% 21%, #E6C392 0 1px, transparent 2px), radial-gradient(circle at 84% 64%, #E6C39280 0 1px, transparent 2px), radial-gradient(circle at 25% 73%, #E6C39280 0 1px, transparent 2px);
  pointer-events: none;
  z-index: -1;
}
.project-art:after {
  content: '';
  width: 80%;
  height: 50px;
  position: absolute;
  bottom: 42px;
  background: radial-gradient(ellipse, #D1A4692B, transparent 68%);
  transform: perspective(150px) rotateX(35deg);
  z-index: -1;
}
.project-moon { color: #E0BE88; left: 22%; top: 6px; }
.door {
  border-color: #D0AD76;
  background: linear-gradient(90deg, #C9995F 0%, #E8CE9D 46%, #F5E6D4 49%, #7A5B51 50%, #644953 100%);
  box-shadow: 0 0 0 9px #3E3643, 0 0 0 10px #B98E5F, 0 0 0 19px #3D3542, 0 0 0 20px #A77B4366, 0 0 40px #E6C39222;
  position: relative;
}
.door>span { color: #FFF2E0; margin-left: 53px; font-size: 1rem; letter-spacing: .05em; }
.door:after { background: #B9986A70; bottom: -20px; width: 250%; }
.project-art-caption { color: #E8D3B1; position: relative; z-index: 1; }
.project-copy h3 { color: #F5E6D4; }
.project-copy .project-subtitle { color: #E0B295; }
.project-copy>p:not(.eyebrow,.project-subtitle,.project-note) { color: #EEE2D7; }
.project-copy .project-note { color: #D8C8BB; }
.status-dot { background: #D9B27B; }
.project-copy .outline {
  border-color: #D5AF7C;
  color: #FFF5E6;
  background: #7D587540;
}
.project-copy .outline:hover { background: #7D5875; }
.closing-section {
  background: var(--teal);
  background-image: radial-gradient(ellipse at 0 100%, #A77B4319, transparent 60%);
  border-top: 4px double #A77B43;
  border-bottom: 1px solid #A77B43;
  color: #F5E6D4;
  padding-top: 60px;
}
.closing-star { color: #E1BC82; }
.closing-section p em { color: #E5C7B4; }
.closing-section .light { border-color: #C3A06F; color: #FFF4E4; }
.closing-section .light:hover { background: #365D57; }
footer { position: relative; }
footer:before { content: ''; height: 1px; width: 75px; background: var(--gold); position: absolute; top: 20px; left: 0; }
.footer-brand { color: var(--teal); }
.footer-brand span { color: #76512D; }
footer p, footer p>span, .private-footer { color: #5A514A; }
dialog { background: #FFF8EE; border: 1px solid #A77B43; }
dialog::backdrop { background: #302137BB; }
.dialog-toolbar { background: #F5E6D4; border-color: #C3A47E; }
.dialog-toolbar>span { color: #704D30; }
.dialog-toolbar button { background: #FFF8EE; border-color: #B38B5B; }
.dialog-copy .dialog-subtitle { color: #744B69; }
.book-facts { border-color: #C8AE8B; }
.book-facts dt, .excerpt-text .excerpt-label { color: #73512E; }
.project-dialog-note { color: #503A4B; background: #ECD8E1; border-color: var(--plum); }
.dialog-project-art { border-right: 0; border: 1px solid #A77B43; }
.excerpt { border-color: #C4A984; }
@media (min-width:1600px) { .studio-section { padding-inline: calc((100vw - 1240px) / 2); } }
@media (max-width:1100px) {
  .studio-section { padding-inline: 32px; }
  .card-content { padding-inline: 10px; }
  .author-layout { gap: 56px; }
  .author-art { max-width: 320px; }
}
@media (max-width:850px) {
  .hero { padding-top: 54px; padding-bottom: 55px; }
  .hero-copy:before { top: -20px; }
  .hero-display { padding-top: 30px; }
  .book-card, .book-card:last-child { border: 1px solid #BC9C75; padding: 10px; gap: 22px; }
  .book-card .cover-stage { align-self: stretch; min-height: 315px; }
  .card-content { padding: 13px 14px 13px 0; }
  .book-card .book-description { font-size: .9em; }
  .author-layout { gap: 35px; }
  .author-art { aspect-ratio: .72; padding: 12px; }
  .author-art-border { padding: 21px 9px 17px; gap: 7px; }
  .author-monogram { font-size: 3.6rem; width: 90%; min-height: 160px; }
  .author-monogram>span { font-size: 1.5rem; top: 22px; right: -2px; }
  .art-kicker { font-size: .4rem; }
  .portrait-note { font-size: .5rem; }
  .art-bottom { font-size: .49rem; }
  .studio-section { padding: 65px 24px; }
  .project-art { min-height: 360px; }
  .project-art-caption { font-size: .38rem; letter-spacing: .11em; }
  .project-moon { left: 14%; }
}
@media (max-width:620px) {
  .hero { padding-top: 45px; padding-bottom: 40px; }
  .hero h1 { font-size: 3.35rem; }
  .hero-footnote { font-size: .7em; }
  .hero-display { padding-top: 17px; }
  .book-card, .book-card:last-child { padding: 9px; gap: 0; }
  .book-card .cover-stage { min-height: 330px; }
  .card-content { padding: 23px 15px 16px; }
  .book-card .book-description { font-size: .95em; }
  .author-art { max-width: 280px; aspect-ratio: .84; padding: 13px; }
  .author-monogram { min-height: 130px; font-size: 3.5rem; width: 80%; }
  .author-art-border { padding: 18px 10px; }
  .portrait-note { font-size: .52rem; }
  .author-signature { font-size: 1.2rem; }
  .studio-section { padding: 52px 18px; }
  .studio-intro>p { font-size: .95em; }
  .project-art { min-height: 285px; border-right: 0; border-bottom: 1px solid #A77B4380; }
  .project-art-caption { font-size: .43rem; }
  .project-moon { left: 27%; top: 0; }
  .door>span { margin-left: 48px; }
  .project-copy { padding: 28px 23px; }
  .project-copy h3 { font-size: 1.8em; }
  footer:before { top: 16px; }
}
@media print {
  .studio-section, .author-section, .closing-section, .in-progress { background: white; color: #222; }
  .studio-section h2, .project-copy h3, .project-copy p, .studio-intro p, .studio-topics { color: #222; }
}

/* Keep the opening phrase clearly separated in the italic headline. */
.hero-dream-word { margin-inline-start: .12em; }
