
/*! Bundled Bree Serif license:
Copyright (c) 2011, TypeTogether (www.type-together.com),
with Reserved Font Names "Bree" and "Bree Serif"

This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

*/
* {
  box-sizing: border-box;
}
html {
  color-scheme: light;
}
body {
  margin: 0;
  background: #ba3829;
  color: #202923;
}
.sf-reader {
  --sf-paper:#fffdf6;
  --sf-ink:#202923;
  --sf-accent:#9f2e24;
  --sf-background:#ba3829;
  min-height: 100svh;
  background-color: var(--sf-background);
  color: var(--sf-ink);
  font-family: var(--sf-reading,Georgia), serif;
  padding: clamp(12px, 3vw, 42px);
  accent-color: var(--sf-accent);
}
.sf-reader::selection,
.sf-reader ::selection {
  background: #f2cd67;
  color: #202923;
}
.sf-reader button,
.sf-reader input {
  font: inherit;
  color: inherit;
}
.sf-reader button,
.sf-reader a {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.sf-reader button {
  cursor: pointer;
  min-height: 44px;
}
.sf-reader a {
  color: inherit;
  text-underline-offset: 4px;
}
.sf-reader :is(button, a, input):focus-visible {
  outline: 3px solid #145c62;
  outline-offset: 5px;
}
.sf-reader button:disabled {
  opacity: .4;
  cursor: default;
}
.sf-reader svg {
  width: 22px;
  height: 22px;
  flex: none;
}
.sf-visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  border: 0;
}
.sf-skip {
  position: fixed;
  left: 12px;
  top: -100px;
  padding: 12px;
  background: var(--sf-paper);
  z-index: 30;
}
.sf-skip:focus {
  top: 12px;
}
.sf-stage {
  min-height: calc(100svh - clamp(24px, 6vw, 84px));
  display: flex;
  align-items: center;
  justify-content: center;
}
.sf-stage:focus {
  outline: none;
}
.sf-page[hidden] {
  display: none !important;
}
.sf-page {
  width: 100%;
  max-width: 1280px;
  position: relative;
}
.sf-paper {
  background: var(--sf-paper);
  border-radius: 3px;
  box-shadow: 0 12px 28px #50180f30;
  position: relative;
  overflow: hidden;
}
.sf-book-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 92px;
  padding: 22px 7% 22px 4.5%;
  border-bottom: 0;
}
.sf-book-name {
  font-size: clamp(18px, 1.8vw, 25px);
  line-height: 1.3;
  font-weight: 600;
  text-decoration: none;
  max-width: 70%;
  text-wrap: balance;
}
.sf-tools {
  display: flex;
  align-items: center;
  gap: 14px;
  font: 14px/1.2 Arial, sans-serif;
}
.sf-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 6px 8px;
}
.sf-tools button:hover {
  color: var(--sf-accent);
}
.sf-tools svg {
  width: 18px;
  height: 18px;
}
.sf-bookmark {
  position: absolute;
  right: 2%;
  top: 0;
  width: 17px;
  height: 48px;
  background: #efbc43;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
}
.sf-scene-body {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
  padding: clamp(30px, 4vw, 56px) 4.5%;
  min-height: min(620px, 66svh);
}
.sf-art {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.sf-image {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.sf-author {
  font: 12px/1.4 Arial, sans-serif;
  width: 100%;
  margin: 0;
  color: #405048;
}
.sf-author > a,
.sf-author > span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-decoration: none;
  min-height: 44px;
}
.sf-author img {
  display: block;
  width: 130px;
  height: auto;
  max-height: 47px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.sf-author strong {
  font-size: 21px;
}
.sf-story {
  min-width: 0;
}
.sf-story-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.sf-chapter-title {
  font-size: clamp(21px, 2.1vw, 30px);
  line-height: 1.2;
  font-weight: 500;
  margin: 0;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.sf-listen {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 11px;
  border: 1px solid #20292338;
  border-radius: 100px;
  background: transparent;
  font: 14px/1.2 Arial, sans-serif !important;
  white-space: nowrap;
}
.sf-listen svg {
  width: 17px;
  height: 17px;
}
.sf-listen:hover {
  background: #f1e9d5;
}
.sf-prose {
  font-size: clamp(19px, 1.55vw, 23px);
  line-height: 1.55;
  letter-spacing: -.012em;
  overflow-wrap: anywhere;
  white-space: normal;
  user-select: text;
  -webkit-user-select: text;
}
.sf-prose p {
  margin: 0 0 .86em;
  white-space: pre-line;
}
.sf-prose p:last-child {
  margin-bottom: 0;
}
.sf-prose p:first-child {
  font-weight: 500;
}
.sf-large .sf-prose {
  font-size: clamp(23px, 1.9vw, 28px);
}
.sf-audio-status {
  display: block;
  font: 13px/1.5 Arial, sans-serif;
  color: var(--sf-accent);
}
.sf-audio-status:empty {
  display: none;
}
.sf-audio-status:not(:empty) {
  margin-top: 16px;
}
.sf-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 22px 4.5%;
  border-top: 0;
  font: 14px/1.2 Arial, sans-serif;
}
.sf-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 18px;
  border: 1px solid #20292330;
  border-radius: 100px;
  text-decoration: none;
  justify-self: start;
}
.sf-nav a:last-child {
  justify-self: end;
}
.sf-nav a:hover {
  background: #f1e9d5;
  border-color: var(--sf-ink);
}
.sf-progress {
  font: 16px/1.2 var(--sf-reading,Georgia), serif;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: #49564e;
}
.sf-progress small {
  display: none;
}
.sf-chapter-front {
  text-align: center;
  padding: 40px 0;
}
.sf-chapter-front > span {
  font-size: 100px;
  line-height: 1;
  color: var(--sf-accent);
}
.sf-chapter-front h2 {
  font-size: 32px;
  font-weight: 400;
}
.sf-cover .sf-book-name {
  visibility: hidden;
}
.sf-cover-content {
  padding: 38px 6% 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}
.sf-cover-title {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.1;
  max-width: 800px;
  margin: 0;
  text-wrap: balance;
  font-weight: 500;
  letter-spacing: -.035em;
}
.sf-cover-image {
  display: block;
  width: min(100%, 680px);
  height: auto;
  max-height: 55svh;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.sf-description {
  font-size: 17px;
  line-height: 1.6;
  max-width: 52ch;
  margin: 0;
  color: #49564e;
}
.sf-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 52px;
  padding: 14px 25px;
  border-radius: 100px;
  background: var(--sf-accent);
  color: #fffdf6 !important;
  font: 16px/1.2 Arial, sans-serif;
  text-decoration: none;
  border: 1px solid transparent;
}
.sf-primary:hover {
  filter: brightness(.9);
}
.sf-ending-content {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(30px, 5vw, 72px) 5%;
  min-height: min(590px, 65svh);
}
.sf-ending-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.sf-ending-story {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
}
.sf-ending h2 {
  font-size: clamp(32px, 3.4vw, 52px);
  line-height: 1.1;
  font-weight: 500;
  margin: 0;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.sf-ending-story > p {
  font-size: 21px;
  line-height: 1.5;
  margin: 0;
}
.sf-invitation {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  text-decoration: none;
  font: 14px/1.4 Arial, sans-serif;
}
.sf-invitation img {
  width: 200px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}
.sf-ending-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 18px 5%;
  border-top: 0;
}
.sf-ending-footer .sf-author {
  width: auto;
}
.sf-last {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font: 13px/1.4 Arial, sans-serif;
  text-decoration: none;
}
.sf-last:hover {
  text-decoration: underline;
}
.sf-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  overflow: auto;
  background: var(--sf-paper);
  color: var(--sf-ink);
  border: 0;
  border-radius: 4px;
  max-width: 540px;
  width: calc(100vw - 28px);
  max-height: 88svh;
  padding: 24px;
  box-shadow: 0 18px 55px #20100c50;
}
.sf-dialog::backdrop {
  background: #3f140f99;
}
.sf-dialog:not([open]) {
  display: none;
}
.sf-dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}
.sf-dialog h2 {
  font: 500 29px/1.2 var(--sf-reading,Georgia), serif;
  margin: 0;
}
.sf-dialog-heading button {
  border: 0;
  background: transparent;
  padding: 10px;
  display: grid;
  place-items: center;
}
.sf-dialog ol {
  list-style: none;
  padding: 0;
  margin: 18px 0;
}
.sf-dialog li > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  min-height: 48px;
  text-decoration: none;
  border-radius: 3px;
  font: 15px/1.4 Arial, sans-serif;
}
.sf-dialog li > a:hover {
  background: #f2ead8;
}
.sf-dialog a[aria-current=page] {
  background: #eadba6;
}
.sf-dialog li > a > span {
  min-width: 22px;
  color: #58634d;
}
.sf-dialog li img {
  object-fit: contain;
  flex: none;
}
.sf-type {
  padding: 10px 18px;
  border: 1px solid #8b815f;
  background: transparent;
  border-radius: 100px;
  font: 15px Arial, sans-serif;
}
.sf-dialog label {
  display: block;
  font: 15px Arial, sans-serif;
  margin: 24px 0;
}
.sf-dialog input[type=range] {
  display: block;
  width: 100%;
  accent-color: var(--sf-accent);
  min-height: 38px;
}
.sf-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 20px 0;
  font: 17px Arial, sans-serif;
}
.sf-setting button {
  min-width: 66px;
  border: 1px solid #a59b81;
  border-radius: 100px;
  padding: 5px 14px;
  background: #eee5d4;
}
.sf-setting button[aria-pressed=true] {
  background: #efcd77;
}
.sf-note {
  font: 13px/1.6 Arial, sans-serif;
  color: #49564e;
}
.sf-reader:not(.sf-ready) :is(.sf-tools, .sf-listen) {
  display: none;
}
.sf-layout-dialogue .sf-prose p:nth-child(even) {
  font-style: italic;
}
@media (max-width: 1000px) {
  .sf-reader {
    padding: 18px;
  }
  .sf-stage {
    min-height: calc(100svh - 36px);
  }
  .sf-page {
    max-width: 780px;
  }
  .sf-book-header {
    padding: 18px 48px 18px 24px;
    min-height: 78px;
    gap: 12px;
  }
  .sf-book-name {
    font-size: 19px;
    max-width: 62%;
  }
  .sf-bookmark {
    right: 16px;
    width: 14px;
    height: 40px;
  }
  .sf-tools {
    gap: 4px;
  }
  .sf-tools button {
    padding: 8px;
  }
  .sf-tools button > svg {
    display: none;
  }
  .sf-scene-body {
    grid-template-columns: 1fr;
    gap: 30px;
    min-height: 0;
    padding: 28px 7% 36px;
  }
  .sf-art {
    gap: 12px;
  }
  .sf-image {
    max-height: 52svh;
    width: 100%;
    object-fit: contain;
  }
  .sf-author img {
    width: 115px;
  }
  .sf-story-top {
    margin-bottom: 22px;
  }
  .sf-chapter-title {
    font-size: 27px;
  }
  .sf-prose {
    font-size: 22px;
    line-height: 1.6;
  }
  .sf-large .sf-prose {
    font-size: 26px;
  }
  .sf-nav {
    padding: 20px 7%;
  }
  .sf-cover-content {
    padding: 28px 7%;
    gap: 22px;
  }
  .sf-cover-image {
    max-height: none;
    width: 100%;
  }
  .sf-description {
    font-size: 16px;
  }
  .sf-ending-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 32px 7%;
    min-height: 0;
  }
  .sf-ending-image {
    max-height: 48svh;
    object-fit: contain;
  }
  .sf-ending-story {
    align-items: center;
    text-align: center;
    gap: 24px;
  }
  .sf-ending h2 {
    font-size: 40px;
  }
  .sf-invitation {
    align-items: center;
  }
  .sf-ending-footer {
    padding: 20px 7%;
    flex-direction: column;
    gap: 10px;
  }
}
@media (max-width: 520px) {
  .sf-reader {
    padding: 8px;
  }
  .sf-stage {
    min-height: calc(100svh - 16px);
    align-items: flex-start;
  }
  .sf-paper {
    border-radius: 2px;
  }
  .sf-stage:has(.sf-cover:not([hidden])) {
    align-items: center;
  }
  .sf-book-header {
    min-height: 76px;
    padding: 14px 36px 14px 18px;
    gap: 6px;
  }
  .sf-book-name {
    font-size: 16px;
    max-width: 64%;
    line-height: 1.25;
  }
  .sf-tools {
    gap: 0;
  }
  .sf-tools button {
    width: 40px;
    min-width: 40px;
    padding: 8px;
  }
  .sf-tools button > svg {
    display: block;
    width: 19px;
    height: 19px;
  }
  .sf-tools button > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .sf-bookmark {
    right: 10px;
    width: 11px;
    height: 33px;
  }
  .sf-scene-body {
    padding: 20px 20px 30px;
    gap: 25px;
  }
  .sf-art {
    gap: 8px;
  }
  .sf-image {
    max-height: none;
    width: 100%;
    height: auto;
  }
  .sf-author {
    font-size: 10px;
  }
  .sf-author > a,
  .sf-author > span {
    min-height: 34px;
    gap: 9px;
  }
  .sf-author img {
    width: 98px;
    max-height: 34px;
  }
  .sf-story-top {
    gap: 10px;
    align-items: center;
    margin-bottom: 22px;
  }
  .sf-chapter-title {
    font-size: 24px;
    max-width: calc(100% - 95px);
  }
  .sf-listen {
    min-height: 44px;
    font-size: 13px !important;
    padding: 7px 10px;
  }
  .sf-prose {
    font-size: 20px;
    line-height: 1.6;
    letter-spacing: -.018em;
  }
  .sf-prose p {
    margin-bottom: .9em;
  }
  .sf-large .sf-prose {
    font-size: 24px;
  }
  .sf-nav {
    padding: 18px 14px;
    gap: 8px;
    font-size: 12px;
  }
  .sf-nav a {
    gap: 5px;
    padding: 9px 11px;
    min-height: 44px;
  }
  .sf-nav svg {
    width: 18px;
    height: 18px;
  }
  .sf-progress {
    font-size: 14px;
  }
  .sf-cover .sf-book-header {
    min-height: 62px;
  }
  .sf-cover-content {
    padding: 16px 16px 24px;
    gap: 22px;
  }
  .sf-cover-title {
    font-size: 32px;
  }
  .sf-cover-image {
    max-height: none;
    width: 100%;
  }
  .sf-description {
    font-size: 16px;
    line-height: 1.55;
  }
  .sf-primary {
    font-size: 15px;
    padding: 12px 22px;
    min-height: 48px;
  }
  .sf-cover-content .sf-author {
    font-size: 11px;
  }
  .sf-cover-content .sf-author img {
    width: 115px;
  }
  .sf-ending-content {
    padding: 22px 20px 32px;
    gap: 28px;
  }
  .sf-ending h2 {
    font-size: 35px;
  }
  .sf-ending-story > p {
    font-size: 19px;
  }
  .sf-ending-footer {
    padding: 18px 20px;
  }
  .sf-invitation img {
    width: 175px;
  }
  .sf-dialog {
    padding: 20px;
  }
  .sf-dialog li > a {
    font-size: 14px;
    gap: 9px;
  }
  .sf-dialog li img {
    width: 45px;
    height: 30px;
  }
}
.sf-ready.sf-reader {
  height: 100svh;
  min-height: 0;
}
.sf-ready .sf-stage {
  height: 100%;
  min-height: 0;
  position: relative;
  overflow: clip;
}
.sf-ready .sf-page {
  height: 100%;
  max-height: 860px;
  min-height: 0;
}
.sf-ready .sf-paper {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.sf-ready .sf-book-header,
.sf-ready .sf-nav,
.sf-ready .sf-ending-footer {
  flex: none;
}
.sf-ready .sf-scene-body,
.sf-ready .sf-cover-content,
.sf-ready .sf-ending-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #9f2e2466 transparent;
  scrollbar-gutter: stable;
}
.sf-ready .sf-cover-content {
  justify-content: safe center;
}
.sf-ready .sf-cover-image {
  flex-shrink: 0;
}
.sf-ready .sf-ending-content {
  align-content: safe center;
}
.sf-ready .sf-story,
.sf-ready .sf-art {
  min-height: 0;
}
.sf-ready .sf-transition-ghost {
  position: absolute;
  inset: 0;
  margin: auto;
  pointer-events: none;
  z-index: 2;
}
.sf-ready .sf-transition-ghost * {
  pointer-events: none;
}
@media (max-width: 1000px) {
  .sf-ready .sf-scene-body,
  .sf-ready .sf-ending-content {
    display: block;
  }
  .sf-ready .sf-art {
    margin-bottom: 28px;
  }
  .sf-ready .sf-story {
    padding-bottom: 2px;
  }
  .sf-ready .sf-ending-image {
    display: block;
    margin-bottom: 28px;
    max-height: none;
  }
  .sf-ready .sf-cover-image {
    max-height: none;
  }
  .sf-ready .sf-ending-story {
    margin: 0 auto;
  }
  .sf-ready .sf-scene-body {
    padding-top: 22px;
  }
  .sf-ready .sf-image {
    max-height: none;
  }
}
@media (max-width: 520px) {
  .sf-ready .sf-book-header {
    min-height: 66px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .sf-ready .sf-nav {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .sf-ready .sf-scene-body {
    padding-top: 18px;
  }
  .sf-ready .sf-art {
    margin-bottom: 22px;
  }
  .sf-ready .sf-ending-footer {
    padding-top: 10px;
    padding-bottom: 10px;
    gap: 3px;
  }
}
.sf-reader {
  --sf-book-height:min(860px,calc(100svh - clamp(24px,6vw,84px)));
}
.sf-title-art {
  display: block;
  width: 300px;
  max-width: 100%;
  height: 72px;
  object-fit: contain;
  object-position: left center;
}
.sf-book-name:has(.sf-title-art) {
  width: 300px;
}
.sf-cover {
  max-width: calc(var(--sf-book-height)*.666667);
}
.sf-cover .sf-paper {
  height: var(--sf-book-height);
  background: #fffff1;
  isolation: isolate;
}
.sf-cover .sf-paper:before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 2%;
  background: #bb2d25;
  z-index: 1;
}
.sf-cover .sf-book-header {
  position: absolute;
  inset: 0 0 auto;
  min-height: 48px;
  padding: 3px 5% 0;
  z-index: 3;
  border: 0;
  background: transparent;
}
.sf-cover .sf-book-name,
.sf-cover .sf-bookmark {
  display: none;
}
.sf-cover .sf-tools {
  width: 100%;
  justify-content: space-between;
}
.sf-cover .sf-tools button {
  font-size: 13px;
  min-height: 44px;
  padding: 5px 6px;
}
.sf-cover .sf-tools svg {
  display: block;
}
.sf-cover .sf-cover-content {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  scrollbar-gutter: auto;
}
.sf-cover .sf-cover-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.sf-cover .sf-description {
  display: none;
}
.sf-cover .sf-primary {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 3;
  min-height: 48px;
  padding: 12px 25px;
  font-size: 16px;
}
.sf-cover .sf-author {
  position: absolute;
  bottom: 7px;
  left: 5%;
  width: 90%;
  z-index: 3;
  font-size: 11px;
}
.sf-cover .sf-author > a {
  min-height: 36px;
  gap: 10px;
}
.sf-cover .sf-author img {
  width: 110px;
  max-height: 32px;
}
@media (max-width: 1000px) {
  .sf-reader {
    --sf-book-height:min(860px,calc(100svh - 36px));
  }
  .sf-title-art {
    width: 230px;
    height: 60px;
  }
  .sf-book-name:has(.sf-title-art) {
    width: 230px;
  }
}
@media (max-width: 520px) {
  .sf-reader {
    --sf-book-height:calc(100svh - 16px);
  }
  .sf-title-art {
    width: 175px;
    height: 56px;
  }
  .sf-book-name:has(.sf-title-art) {
    max-width: 64%;
    width: 175px;
  }
  .sf-cover .sf-tools button {
    width: auto;
    min-width: 44px;
  }
  .sf-cover .sf-tools button > span {
    position: static;
    clip-path: none;
    width: auto;
    height: auto;
    overflow: visible;
  }
  .sf-cover .sf-tools {
    gap: 12px;
  }
  .sf-cover .sf-primary {
    font-size: 15px;
    padding: 12px 23px;
  }
  .sf-cover .sf-author img {
    width: 110px;
    max-height: 32px;
  }
}
@media (max-width: 520px) and (max-aspect-ratio: 1/2) {
  .sf-cover .sf-description {
    display: block;
    position: absolute;
    bottom: 120px;
    left: 9%;
    right: 7%;
    font-size: 14px;
    line-height: 1.4;
    color: #3b4941;
    text-wrap: balance;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
  }
}
.sf-contents {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(900px, calc(100vw - 40px));
  max-width: none;
  max-height: calc(100svh - 40px);
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}
.sf-contents[open] {
  display: flex;
  flex-direction: column;
}
.sf-contents .sf-dialog-heading {
  flex: none;
  position: relative;
  justify-content: center;
  padding: 26px 60px 20px;
}
.sf-contents h2 {
  font-size: 38px;
  letter-spacing: -.025em;
}
.sf-contents .sf-dialog-heading button {
  position: absolute;
  right: 20px;
  top: 22px;
  width: 44px;
  height: 44px;
  border: 1px solid #20292345;
  border-radius: 50%;
}
.sf-index-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 6px 26px 20px;
  scrollbar-width: thin;
  scrollbar-color: #a79b7e transparent;
}
.sf-contents .sf-index {
  display: grid;
  grid-template-rows: repeat(var(--sf-index-rows), minmax(74px, auto));
  grid-auto-flow: column;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 28px;
  row-gap: 6px;
  margin: 0;
}
.sf-contents li {
  min-width: 0;
}
.sf-contents li > a {
  height: 100%;
  gap: 14px;
  padding: 8px 10px;
  min-height: 74px;
  border-radius: 6px;
  font-family: var(--sf-reading,Georgia), serif;
}
.sf-contents li img {
  width: 84px;
  height: 56px;
  object-fit: contain;
  border-radius: 3px;
}
.sf-contents li > a > .sf-index-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--sf-ink);
  min-width: 0;
}
.sf-index-number {
  font: 12px/1.2 Arial, sans-serif;
  font-variant-numeric: tabular-nums;
  color: #58634d;
}
.sf-index-title {
  font-size: 17px;
  line-height: 1.25;
  text-wrap: balance;
}
.sf-contents a[aria-current=page] {
  background: #f6e8bc;
}
.sf-contents a[aria-current=page] .sf-index-number {
  color: #9f2e24;
  font-weight: 700;
}
.sf-index-footer {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 26px;
  padding: 14px 4px 20px;
  border-top: 0;
  font: 15px/1.3 var(--sf-reading,Georgia), serif;
}
.sf-index-footer > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.sf-index-footer > a:hover {
  text-decoration: underline;
}
.sf-index-footer .sf-type {
  font: inherit;
  padding: 8px 16px;
}
.sf-index-scroll a:focus-visible {
  outline-offset: -3px;
}
@media (max-width: 650px) {
  .sf-contents {
    width: calc(100vw - 24px);
    max-height: calc(100svh - 24px);
    border-radius: 10px;
  }
  .sf-contents .sf-dialog-heading {
    padding: 22px 60px 18px;
  }
  .sf-contents h2 {
    font-size: 32px;
  }
  .sf-contents .sf-dialog-heading button {
    top: 17px;
    right: 15px;
  }
  .sf-index-scroll {
    padding: 4px 14px 14px;
  }
  .sf-contents .sf-index {
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .sf-contents li > a {
    min-height: 78px;
    gap: 14px;
    padding: 8px 10px;
  }
  .sf-contents li img {
    width: 84px;
    height: 56px;
  }
  .sf-index-title {
    font-size: 17px;
  }
  .sf-index-footer {
    margin: 0 18px;
    padding: 12px 0 16px;
    gap: 8px;
    font-size: 14px;
  }
  .sf-index-footer .sf-type {
    padding: 8px 12px;
  }
}
.sf-scene-body {
  align-items: start;
  align-content: start;
}
.sf-art > .sf-image {
  aspect-ratio: 3/2;
  height: auto;
  object-fit: contain;
  object-position: top center;
}
.sf-index img {
  object-position: center;
}
.sf-media {
  background: var(--sf-paper);
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 3/2;
}
.sf-media > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}
.sf-loader {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 20px;
  font: 14px/1.5 var(--sf-reading,Georgia), serif;
  color: var(--sf-ink);
  text-align: center;
  padding: 20px;
}
.sf-media-loading > .sf-loader,
.sf-media-failed > .sf-loader {
  display: flex;
}
.sf-media-loading > img,
.sf-media-failed > img {
  visibility: hidden;
}
.sf-loader-book {
  position: relative;
  display: block;
  width: 58px;
  height: 38px;
  border: 2px solid currentColor;
  border-radius: 4px 4px 9px 9px;
  transform: rotate(-5deg);
}
.sf-loader-book:before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  border-left: 2px solid currentColor;
}
.sf-loader-book:after {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 25px;
  height: 37px;
  background: var(--sf-paper);
  border: 2px solid var(--sf-accent);
  border-radius: 2px 8px 3px 2px;
  transform-origin: left center;
  animation: sf-loading-page 1.25s ease-in-out infinite;
}
.sf-media-failed .sf-loader-book:after {
  animation: none;
}
@keyframes sf-loading-page {
  0%, 100% {
    transform: perspective(100px) rotateY(0deg);
  }
  50% {
    transform: perspective(100px) rotateY(-155deg);
  }
}
.sf-cover {
  max-width: 1280px;
}
.sf-cover .sf-paper:before {
  display: none;
}
.sf-cover .sf-book-header {
  position: relative;
  inset: auto;
  min-height: 70px;
  padding: 14px 4.5%;
  flex: none;
}
.sf-cover .sf-tools {
  justify-content: flex-end;
}
.sf-cover .sf-cover-content {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 30px;
  padding: 20px 4.5% 50px;
  overflow: auto;
}
.sf-cover-copy {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 26px;
  text-align: center;
  min-width: 0;
}
.sf-cover-wordmark {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  max-height: 260px;
  object-fit: contain;
}
.sf-cover .sf-description {
  display: block;
  position: static;
  font-size: 18px;
  line-height: 1.55;
  max-width: 32ch;
  color: var(--sf-ink);
  text-wrap: balance;
}
.sf-cover .sf-primary {
  position: static;
  transform: none;
  min-height: 52px;
  font-size: 17px;
  padding: 14px 28px;
}
.sf-cover .sf-author {
  position: static;
  width: 100%;
  font-size: 12px;
}
.sf-cover .sf-author img {
  width: 130px;
  max-height: 44px;
}
.sf-cover-visual {
  min-width: 0;
}
.sf-cover .sf-cover-image {
  position: static;
  inset: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}
.sf-cover-visual .sf-media {
  aspect-ratio: 3/2;
}
.sf-cover .sf-paper {
  background: var(--sf-paper);
}
@media (max-width: 1000px) {
  .sf-cover .sf-cover-content {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding-bottom: 30px;
  }
  .sf-cover-copy {
    gap: 22px;
  }
  .sf-cover .sf-description {
    font-size: 17px;
  }
}
@media (max-width: 650px) {
  .sf-cover .sf-book-header {
    min-height: 58px;
    padding: 6px 18px;
  }
  .sf-cover .sf-cover-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    padding: 12px 24px 24px;
    overflow: auto;
  }
  .sf-cover-copy {
    display: contents;
  }
  .sf-cover-wordmark {
    order: 0;
    width: min(100%, 320px);
    max-height: 155px;
  }
  .sf-cover .sf-description {
    order: 1;
    font-size: 15px;
    max-width: 30ch;
    margin: 0;
  }
  .sf-cover-visual {
    order: 2;
    width: min(100%, 350px);
  }
  .sf-cover .sf-primary {
    order: 3;
    min-height: 48px;
    padding: 12px 26px;
    font-size: 16px;
  }
  .sf-cover .sf-author {
    order: 4;
    font-size: 11px;
  }
  .sf-cover .sf-author img {
    width: 110px;
    max-height: 34px;
  }
  .sf-cover .sf-author > a {
    min-height: 34px;
  }
  .sf-cover .sf-cover-content > h1 {
    order: 0;
  }
}
@media (max-width: 650px) and (max-height: 650px) {
  .sf-cover .sf-cover-content {
    gap: 10px;
    padding: 4px 22px 14px;
  }
  .sf-cover-wordmark {
    max-height: 105px;
  }
  .sf-cover .sf-description {
    font-size: 13px;
    line-height: 1.4;
  }
  .sf-cover-visual {
    width: min(100%, 240px);
  }
  .sf-cover .sf-primary {
    min-height: 44px;
    padding: 10px 24px;
  }
  .sf-cover .sf-author > a {
    min-height: 28px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sf-loader-book:after {
    animation: none;
  }
}
.sf-opening {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--sf-paper);
  color: var(--sf-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 30px;
  font: 20px/1.4 var(--sf-reading,Georgia), serif;
  animation: sf-opening-safety 0s 12s forwards;
}
.sf-opening .sf-loader-book {
  width: 78px;
  height: 52px;
}
.sf-opening .sf-loader-book:after {
  width: 35px;
  height: 51px;
}
@keyframes sf-opening-safety {
  to {
    visibility: hidden;
    pointer-events: none;
  }
}
.sf-sound-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #20292338;
  border-radius: 100px;
  background: transparent;
  padding: 8px 14px;
  min-height: 44px;
  font: 14px/1.2 Arial, sans-serif !important;
}
.sf-sound-button:hover {
  background: #f1e9d5;
}
.sf-sound-button svg {
  width: 18px;
  height: 18px;
}
.sf-story-actions,
.sf-cover-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.sf-cover-actions {
  justify-content: center;
}
.sf-cover .sf-cover-content {
  padding-top: 40px;
}
.sf-reader:not(.sf-ready) .sf-sound-button {
  display: none;
}
.sf-cover-actions .sf-sound-button {
  min-height: 48px;
}
.sf-story-top {
  align-items: flex-start;
}
.sf-cover .sf-primary {
  white-space: nowrap;
}
@media (max-width: 650px) {
  .sf-cover-actions {
    order: 3;
  }
  .sf-cover .sf-cover-content {
    padding-top: 20px;
  }
  .sf-story-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .sf-chapter-title {
    max-width: none;
  }
  .sf-cover-actions .sf-primary {
    padding: 12px 22px;
  }
  .sf-cover-actions .sf-sound-button {
    padding: 10px 12px;
  }
}
@media (max-width: 650px) and (max-height: 650px) {
  .sf-cover .sf-cover-content {
    padding-top: 10px;
  }
  .sf-cover-actions .sf-primary {
    padding: 10px 18px;
  }
  .sf-cover-actions .sf-sound-button {
    min-height: 44px;
  }
}
.sf-reader {
  font-synthesis: none;
}
.sf-prose {
  letter-spacing: 0;
  line-height: 1.65;
  font-weight: 400;
}
.sf-prose p:first-child {
  font-weight: 400;
}
.sf-chapter-title,
.sf-ending h2,
.sf-dialog h2 {
  font-weight: 400;
}
.sf-ready .sf-transition-ghost {
  backface-visibility: hidden;
  will-change: transform;
  overflow: hidden;
}
.sf-transition-ghost:after { content:none; }
.sf-page-curl {
  position:absolute;left:0;top:-2%;height:104%;width:clamp(24px,4vw,64px);
  pointer-events:none;opacity:0;transform-origin:right center;will-change:transform;
  border-radius:45% 6% 6% 45%;
}
@media (max-width: 520px) {
  .sf-prose {
    letter-spacing: 0;
    line-height: 1.6;
  }
}
@media print {
  .sf-opening {
    display: none !important;
  }
}

/* Paper-tab audio controls and the closing invitation. */
.sf-story-top { flex-direction:column;align-items:flex-start;gap:18px;margin-bottom:28px; }
.sf-story-actions { gap:12px; }
.sf-listen { position:relative;overflow:hidden;min-height:48px;padding:11px 19px;border:1px solid #b79434;border-radius:13px 5px 13px 5px;background:#f2cd67;font:18px/1.2 var(--sf-reading,Georgia),serif!important;gap:10px; }
.sf-listen:after,.sf-invitation:after { content:'';position:absolute;right:0;top:0;width:12px;height:12px;background:var(--sf-paper);clip-path:polygon(0 0,100% 0,100% 100%);pointer-events:none; }
.sf-listen:hover { background:#edc052; }
.sf-listen svg { width:21px;height:21px; }
.sf-sound-button { min-height:48px;padding:10px 15px;border:1px solid #20292345;border-radius:11px 5px 11px 5px;background:transparent;font:16px/1.2 var(--sf-reading,Georgia),serif!important;gap:8px; }
.sf-sound-button:hover { background:#f4e6bd; }
.sf-ending-content { gap:clamp(36px,5vw,72px);padding:38px 5%; }
.sf-ending-image { margin:0!important; }
.sf-ending-story { align-items:flex-start;text-align:left;gap:24px; }
.sf-ending h2 { font-size:clamp(34px,3.5vw,50px);max-width:13ch;letter-spacing:-.02em;line-height:1.12; }
.sf-ending-story>p { font-size:21px;line-height:1.5;max-width:28ch; }
.sf-invitation { position:relative;display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:28px;width:min(100%,370px);padding:18px 24px;border-radius:17px 5px 17px 5px;background:var(--sf-accent);color:#fff3d6;text-decoration:none;font:16px/1.4 var(--sf-reading,Georgia),serif; }
.sf-ending .sf-invitation { color:#fff3d6; }
.sf-invitation-copy { display:flex;flex-direction:column;gap:7px;align-items:flex-start; }
.sf-invitation img { width:180px;max-width:100%;height:auto;filter:invert(1);mix-blend-mode:screen; }
.sf-invitation>svg { width:30px;height:30px; }
.sf-invitation:hover { background:#84271f; }
.sf-invitation:after { width:17px;height:17px; }
.sf-ending-actions { display:flex;align-items:center;flex-wrap:wrap;gap:20px; }
.sf-replay { display:inline-flex;align-items:center;gap:10px;min-height:48px;padding:8px 0;text-decoration:none;font:17px/1.3 var(--sf-reading,Georgia),serif; }
.sf-replay:hover { text-decoration:underline; }
@media(max-width:1000px) { .sf-ending-story{align-items:center;text-align:center}.sf-ending h2{max-width:17ch}.sf-ending-actions{justify-content:center} }
@media(max-width:650px) {
 .sf-ending-content { display:flex!important;flex-direction:column;align-items:center;gap:22px;padding:24px 20px 30px; }
 .sf-ending-story { display:contents; }
 .sf-ending h2 { order:0;text-align:center;font-size:34px;max-width:15ch; }
 .sf-ending-story>p { order:1;text-align:center;font-size:18px;max-width:27ch; }
 .sf-ending-content>.sf-media { order:2;width:100%; }
 .sf-ending .sf-invitation { order:3;width:min(100%,340px); }
 .sf-ending-actions { order:4;gap:18px;justify-content:center; }
 .sf-invitation { padding:17px 21px;gap:18px; }
 .sf-invitation img { width:163px; }
 .sf-story-top{gap:16px;margin-bottom:25px}
 .sf-chapter-title{max-width:none}
 .sf-listen{font-size:17px!important;padding:10px 16px}
 .sf-sound-button{font-size:15px!important;padding:10px 13px}
 .sf-ending-actions .sf-sound-button{min-height:44px}
}

/* Side navigation leaves the full page height for centered reading. */
.sf-reader { padding:clamp(16px,2vw,28px); }
.sf-page { max-width:1536px; }
.sf-ready .sf-scene .sf-paper { display:grid;grid-template-columns:92px minmax(0,1fr);grid-template-rows:minmax(0,1fr); }
.sf-ready .sf-scene-body { grid-column:2;grid-row:1;display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);align-items:center;align-content:stretch;padding:32px;gap:40px;overflow:hidden; }
.sf-scene .sf-nav { grid-column:1;grid-row:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:28px;padding:16px 10px;font-size:13px; }
.sf-scene .sf-nav a { flex-direction:column;justify-content:center;gap:8px;width:100%;padding:12px 4px;border:0;border-radius:10px;text-align:center; }
.sf-scene .sf-nav a:hover { background:#f4e6bd; }
.sf-scene .sf-nav svg { width:27px;height:27px; }
.sf-scene .sf-nav a:focus-visible { outline-offset:-3px; }
.sf-scene .sf-progress { font-size:17px; }
.sf-ready .sf-scene .sf-art { height:100%;justify-content:center;margin:0;gap:20px; }
.sf-scene .sf-art>.sf-media { flex:none;max-height:calc(100% - 72px); }
.sf-scene .sf-art>.sf-media>img { object-position:center; }
.sf-scene .sf-author img { width:150px;max-height:52px; }
.sf-ready .sf-story { height:100%;max-height:100%;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#9f2e2466 transparent;display:flex;flex-direction:column;justify-content:safe center;padding:12px 6px; }
.sf-story-top { align-items:center;text-align:center; }
.sf-story-actions { justify-content:center;width:100%; }
.sf-chapter-title { font-size:clamp(27px,2.3vw,34px);text-align:center;width:100%; }
/* Page turns focus this heading for assistive reading; controls keep their visible focus rings. */
.sf-chapter-title:focus, .sf-ending h2[tabindex="-1"]:focus { outline:none; }
.sf-prose { font-size:clamp(22px,1.75vw,27px);line-height:1.6;text-align:center; }
.sf-prose p { max-width:35ch;margin-left:auto;margin-right:auto;text-wrap:pretty; }
.sf-large .sf-prose { font-size:clamp(26px,2vw,31px); }
.sf-ending .sf-paper { padding-left:92px; }
.sf-ending-story { align-items:center;text-align:center; }
.sf-ending-actions { justify-content:center; }
.sf-ending-footer { justify-content:center; }
.sf-ending-footer .sf-last { position:absolute;left:12px;top:50%;transform:translateY(-50%);width:68px;display:flex;flex-direction:column;gap:10px;text-align:center;font-size:13px;line-height:1.4; }
.sf-ending-footer .sf-last:focus-visible { outline-offset:-3px; }
@media(max-width:1000px) {
 .sf-ready .sf-scene .sf-paper { grid-template-columns:68px minmax(0,1fr); }
 .sf-ready .sf-scene-body { display:block;overflow:auto;padding:28px 6%; }
 .sf-ready .sf-scene .sf-art { height:auto;margin-bottom:32px; }
 .sf-scene .sf-art>.sf-media { max-height:none; }
 .sf-ready .sf-story { height:auto;max-height:none;overflow:visible;padding:0; }
 .sf-prose { font-size:24px; }
 .sf-chapter-title { font-size:30px; }
 .sf-ending .sf-paper { padding-left:68px; }
 .sf-ending-footer .sf-last { left:7px;width:54px;font-size:12px; }
}
@media(max-width:520px) {
 .sf-reader { padding:0;--sf-book-height:100svh; }
 .sf-ready .sf-page { max-height:none; }
 .sf-ready .sf-scene .sf-paper { grid-template-columns:44px minmax(0,1fr); }
 .sf-ready .sf-scene-body { padding:24px 12px 32px; }
 .sf-scene .sf-nav { padding:0;gap:24px; }
 .sf-scene .sf-nav a { min-height:48px;min-width:44px;width:44px;padding:10px 0; }
 .sf-scene .sf-nav a span { position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%); }
 .sf-scene .sf-nav svg { width:25px;height:25px; }
 .sf-scene .sf-progress { font-size:12px; }
 .sf-scene .sf-art { gap:12px; }
 .sf-scene .sf-author img { width:118px;max-height:40px; }
 .sf-ready .sf-scene .sf-art { margin-bottom:30px; }
 .sf-chapter-title { font-size:27px; }
 .sf-prose { font-size:22px;line-height:1.55; }
 .sf-large .sf-prose { font-size:26px; }
 .sf-story-actions { gap:9px; }
 .sf-listen { font-size:16px!important;padding:10px 13px; }
 .sf-sound-button { font-size:15px!important;padding:10px 11px; }
 .sf-ending .sf-paper { padding-left:44px; }
 .sf-ending-footer .sf-last { left:0;width:44px;min-height:48px;font-size:0;padding:10px 0; }
 .sf-ending-footer .sf-last svg { width:25px;height:25px; }
 .sf-ending-content { padding-left:14px;padding-right:14px; }
 .sf-ending h2 { font-size:32px; }
 .sf-cover .sf-cover-content { padding-left:22px;padding-right:22px; }
}

.sf-reader { --sf-book-height:min(860px,calc(100svh - clamp(32px,4vw,56px))); }
.sf-transition-ghost.sf-scene .sf-paper { grid-template-columns:minmax(0,1fr); }
.sf-transition-ghost.sf-scene .sf-scene-body { grid-column:1; }
.sf-transition-ghost.sf-ending .sf-paper { padding-left:0; }
@media(max-width:520px) { .sf-reader{--sf-book-height:100svh}.sf-scene .sf-progress{font-size:14px} }

@media(min-width:1001px){.sf-cover-wordmark{max-width:520px;max-height:280px}.sf-cover .sf-description{font-size:20px}.sf-cover .sf-author img{width:150px;max-height:50px}}
@media print{.sf-ready .sf-scene .sf-paper{display:block}.sf-ending .sf-paper{padding-left:0}.sf-ready .sf-story{height:auto;max-height:none;overflow:visible}}
/* Little paper reactions: feedback follows a gesture, reading stays still. */
.sf-reader :is(.sf-primary,.sf-listen,.sf-sound-button,.sf-replay,.sf-invitation) {
  transition:transform 140ms ease-out,background-color 160ms ease-out,border-color 160ms ease-out;
}
.sf-reader :is(.sf-nav a,.sf-primary,.sf-invitation,.sf-last) svg,
.sf-author img { transition:transform 180ms cubic-bezier(.2,.7,.3,1); }
.sf-reader :is(.sf-primary,.sf-listen,.sf-sound-button,.sf-replay,.sf-invitation):active { transform:translateY(2px) scale(.98); }
.sf-nav a:active svg { transform:scale(.86); }
.sf-audio-meter { display:none;position:absolute;right:7px;bottom:6px;height:9px;gap:2px;align-items:end;pointer-events:none; }
.sf-audio-meter i { display:block;width:2px;height:9px;background:currentColor;transform-origin:bottom;animation:sf-speaking 700ms ease-in-out infinite alternate; }
.sf-audio-meter i:nth-child(2) { animation-delay:-420ms; }
.sf-audio-meter i:nth-child(3) { animation-delay:-210ms; }
.sf-listen[data-audio-state="playing"] .sf-audio-meter { display:flex; }
.sf-listen[data-audio-state="playing"] { border-color:#756324; }
.sf-transition-ghost .sf-audio-meter i { animation:none; }
.sf-dialog[open] { animation:sf-sound-open 180ms ease-out; }
@keyframes sf-speaking { from{transform:scaleY(.25)}to{transform:scaleY(1)} }
@keyframes sf-sound-open { from{opacity:.5;translate:0 6px}to{opacity:1;translate:0 0} }
@media(hover:hover) and (pointer:fine) {
 .sf-nav [data-sf-turn="1"]:hover svg,.sf-primary:hover svg,.sf-invitation:hover svg { transform:translateX(4px); }
 .sf-nav [data-sf-turn="-1"]:hover svg,.sf-last:hover svg { transform:translateX(-4px); }
 .sf-listen:hover { transform:rotate(-1deg); }
 .sf-sound-button:hover svg { animation:sf-sound-wiggle 320ms ease-out; }
 .sf-author a:hover img { transform:rotate(-2deg); }
}
@keyframes sf-sound-wiggle { 25%{transform:rotate(-9deg)}65%{transform:rotate(6deg)}100%{transform:none} }
@media(prefers-reduced-motion:reduce) {
 .sf-reader :is(.sf-primary,.sf-listen,.sf-sound-button,.sf-replay,.sf-invitation,.sf-nav a,.sf-last) *, .sf-author img { animation:none!important;transition:none!important; }
 .sf-reader :is(.sf-primary,.sf-listen,.sf-sound-button,.sf-replay,.sf-invitation):is(:hover,:active),.sf-reader :is(.sf-primary,.sf-nav a,.sf-last,.sf-invitation):hover svg,.sf-author a:hover img { transform:none; }
 .sf-dialog[open] { animation:none; }
 .sf-audio-meter i { animation:none;transform:scaleY(.6); }
}
/* Pencil Hand: the selected light, hand-printed book typography. */
.sf-reader[data-sf-type="pencil-hand"] .sf-story-top { align-items:flex-start;text-align:left;gap:20px;margin-bottom:26px; }
.sf-reader[data-sf-type="pencil-hand"] .sf-story-actions { justify-content:center; }
.sf-reader[data-sf-type="pencil-hand"] .sf-chapter-title { font-size:clamp(46px,5vw,76px);line-height:1.1;letter-spacing:0;text-align:left;font-weight:400; }
.sf-reader[data-sf-type="pencil-hand"] .sf-prose { font-size:clamp(27px,2.2vw,34px);line-height:1.42;letter-spacing:0;text-align:left;font-weight:400; }
.sf-reader[data-sf-type="pencil-hand"] .sf-prose p { max-width:none;margin:0 0 .82em;text-wrap:pretty;font-weight:400; }
.sf-reader[data-sf-type="pencil-hand"] .sf-prose p:last-child { margin-bottom:0; }
.sf-reader[data-sf-type="pencil-hand"].sf-large .sf-prose { font-size:clamp(31px,2.6vw,40px); }
.sf-reader[data-sf-type="pencil-hand"] :is(.sf-nav,.sf-progress,.sf-author,.sf-description,.sf-last,.sf-note,.sf-audio-status) { font-family:var(--sf-reading),cursive;font-weight:400;letter-spacing:0; }
.sf-reader[data-sf-type="pencil-hand"] .sf-nav { font-size:17px; }
.sf-reader[data-sf-type="pencil-hand"] .sf-nav a span { white-space:nowrap; }
.sf-reader[data-sf-type="pencil-hand"] .sf-progress { font-size:24px; }
.sf-reader[data-sf-type="pencil-hand"] :is(.sf-listen,.sf-sound-button) { font-size:21px!important; }
.sf-reader[data-sf-type="pencil-hand"] .sf-description { font-size:24px;line-height:1.4; }
.sf-reader[data-sf-type="pencil-hand"] .sf-ending h2 { font-size:clamp(42px,4vw,58px);font-weight:400;letter-spacing:0; }
.sf-reader[data-sf-type="pencil-hand"] .sf-ending-story>p { font-size:28px;line-height:1.4; }
.sf-reader[data-sf-type="pencil-hand"] :is(.sf-primary,.sf-replay) { font-family:var(--sf-reading),cursive;font-size:22px; }
.sf-reader[data-sf-type="pencil-hand"] .sf-author { font-size:18px; }
.sf-reader[data-sf-type="pencil-hand"] .sf-dialog { font-family:var(--sf-reading),cursive;font-size:22px; }
.sf-reader[data-sf-type="pencil-hand"] .sf-dialog h2 { font-size:36px;font-weight:400; }
@media(max-width:1000px) {
 .sf-reader[data-sf-type="pencil-hand"] .sf-prose { font-size:28px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-chapter-title { font-size:44px; }
}
@media(max-width:520px) {
 .sf-reader[data-sf-type="pencil-hand"] .sf-story-top { gap:18px;margin-bottom:24px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-prose { font-size:25px;line-height:1.4; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-chapter-title { font-size:38px;line-height:1.13; }
 .sf-reader[data-sf-type="pencil-hand"].sf-large .sf-prose { font-size:29px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-progress { font-size:14px;white-space:nowrap; }
 .sf-reader[data-sf-type="pencil-hand"] :is(.sf-listen,.sf-sound-button) { font-size:20px!important; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-ending h2 { font-size:40px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-ending-story>p { font-size:25px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-description { font-size:22px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-author { font-size:16px; }
}
/* Narration lives with the illustration, in place of the scene credit. */
.sf-art-actions { flex:none;display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;width:100%;margin:0; }
.sf-scene .sf-art>.sf-media { max-height:calc(100% - 92px); }
@media(max-width:1000px) { .sf-scene .sf-art>.sf-media { max-height:none; } }
@media(max-width:520px) { .sf-art-actions { gap:9px; } }
/* Fit complete scenes to the page; only the unenhanced HTML uses document flow. */
.sf-ready .sf-story { overflow:hidden;justify-content:center;scrollbar-gutter:auto; }
.sf-ready .sf-story-top,.sf-ready .sf-prose { flex:none; }
.sf-ready .sf-scene-body { scrollbar-gutter:auto; }
.sf-scene .sf-nav { gap:22px; }
.sf-scene .sf-nav a { position:relative;min-height:76px;gap:7px;background:transparent;border:0;border-radius:0;transition:color 140ms ease; }
.sf-scene .sf-nav a svg { box-sizing:content-box;padding:10px;border:1px solid #20292335;border-radius:50%;background:var(--sf-paper);transition:background-color 150ms ease,border-color 150ms ease,translate 150ms ease; }
.sf-scene .sf-nav a:hover { background:transparent; }
.sf-scene .sf-nav a:last-child { flex-direction:column-reverse; }
.sf-scene .sf-nav a:is(:hover,:active) svg { transform:none; }
.sf-scene .sf-nav a:active svg { background:#e8bf52;translate:0 1px; }
.sf-scene .sf-nav a:focus-visible { outline:2px solid #926f20;outline-offset:-2px;border-radius:14px; }
.sf-reader :is(.sf-listen,.sf-sound-button):hover { transform:none; }
.sf-reader .sf-sound-button:hover svg { animation:none; }
@media(hover:hover) and (pointer:fine) {
 .sf-scene .sf-nav a:hover svg { background:#f2cd67;border-color:#967b30; }
 .sf-scene .sf-nav [data-sf-turn="1"]:hover svg { translate:2px 0; }
 .sf-scene .sf-nav [data-sf-turn="-1"]:hover svg { translate:-2px 0; }
 .sf-reader :is(.sf-listen,.sf-sound-button):hover { translate:0 -1px; }
}
@media(max-width:1000px) {
 .sf-ready .sf-scene-body { display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,.85fr) minmax(0,1.15fr);gap:20px;overflow:hidden;padding:20px 5%; }
 .sf-ready .sf-scene .sf-art { height:100%;margin:0;gap:12px; }
 .sf-ready .sf-scene .sf-art>.sf-media { min-height:0;max-height:calc(100% - 60px);width:100%; }
 .sf-ready .sf-scene .sf-art>.sf-media>img { height:100%;width:100%;object-fit:contain; }
 .sf-ready .sf-story { height:100%;max-height:100%;padding:0;overflow:hidden; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-story-top { margin-bottom:16px; }
}
@media(max-width:520px) {
 .sf-ready .sf-scene-body { grid-template-rows:minmax(0,.62fr) minmax(0,1.38fr);gap:16px;padding:16px 12px 20px 6px; }
 .sf-ready .sf-scene .sf-art { gap:8px; }
 .sf-scene .sf-nav a { min-height:54px; }
 .sf-scene .sf-nav a svg { width:22px;height:22px;padding:7px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-story-top { margin-bottom:12px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-chapter-title { font-size:32px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-prose { font-size:23px;line-height:1.32; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-prose p { margin-bottom:.6em; }
 .sf-art-actions { gap:8px; }
 .sf-art-actions :is(.sf-listen,.sf-sound-button) { min-height:44px;padding:8px 10px; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-art-actions :is(.sf-listen,.sf-sound-button) { font-size:18px!important; }
}
@media(max-width:1000px) and (min-height:601px) {
 .sf-ready.sf-large .sf-scene-body { grid-template-rows:minmax(0,.55fr) minmax(0,1.45fr); }
}
@media(max-width:520px) {
 .sf-ready.sf-large .sf-scene-body { grid-template-rows:minmax(0,.4fr) minmax(0,1.6fr); }
}
@media(min-width:600px) and (max-width:1000px) and (max-height:600px) {
 .sf-ready .sf-scene-body { grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:24px;padding:18px; }
}
@media(prefers-reduced-motion:reduce) {
 .sf-reader :is(.sf-listen,.sf-sound-button):hover,.sf-scene .sf-nav a:is(:hover,:active) svg { translate:none;transition:none; }
}
/* Phone page turns stay within a thumb's reach and free the full reading width. */
@media(max-width:520px) {
 .sf-ready .sf-scene .sf-paper { grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(0,1fr) auto; }
 .sf-ready .sf-scene-body { grid-column:1;grid-row:1;padding:16px 20px 12px; }
 .sf-scene .sf-nav { grid-column:1;grid-row:2;flex-direction:row;justify-content:space-between;gap:8px;padding:6px 12px calc(8px + env(safe-area-inset-bottom,0px));min-height:62px;background:var(--sf-paper); }
 .sf-scene .sf-nav a,.sf-scene .sf-nav a:last-child { flex-direction:row;gap:6px;width:auto;min-width:44px;min-height:48px;padding:4px 2px; }
 .sf-scene .sf-nav a span { position:static;width:auto;height:auto;overflow:visible;clip-path:none; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-scene .sf-nav a span { font-size:15px; }
 .sf-scene .sf-nav a svg { width:20px;height:20px;padding:7px;flex:none; }
 .sf-reader[data-sf-type="pencil-hand"] .sf-scene .sf-progress { font-size:16px; }
}
/* Artwork opens in a native modal; the book keeps its place underneath. */
.sf-image-open { display:none; }
.sf-ready .sf-image-open { display:block;position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:transparent;cursor:zoom-in;color:var(--sf-ink); }
.sf-zoom-mark { position:absolute;right:10px;bottom:10px;display:grid;place-items:center;width:32px;height:32px;border:1px solid #20292350;border-radius:50%;background:var(--sf-paper); }
.sf-zoom-mark svg { width:18px;height:18px; }
.sf-reader .sf-image-open:focus-visible { outline:3px solid #926f20;outline-offset:-4px; }
.sf-image-viewer { position:fixed;inset:0;margin:auto;box-sizing:border-box;width:calc(100vw - 32px);max-width:1440px;height:calc(100svh - 32px);max-height:none;padding:14px;border:1px solid #20292340;border-radius:12px;background:var(--sf-paper);color:var(--sf-ink);overflow:hidden; }
.sf-image-viewer[open] { display:flex;flex-direction:column;gap:12px; }
.sf-image-viewer::backdrop { background:#152621d9; }
.sf-image-toolbar { display:flex;justify-content:space-between;align-items:center;gap:12px;flex:none; }
.sf-image-toolbar button { display:inline-flex;align-items:center;justify-content:center;gap:8px;min-width:44px;min-height:44px;padding:8px 12px;border:1px solid #20292345;border-radius:9px;background:var(--sf-paper);color:var(--sf-ink);font:20px/1.2 var(--sf-reading),sans-serif; }
.sf-image-toolbar svg { width:22px;height:22px; }
.sf-image-canvas { flex:1;min-height:0;min-width:0;position:relative;display:block;overflow:auto;overscroll-behavior:contain; }
.sf-image-canvas:focus-visible { outline:2px solid #926f20;outline-offset:-2px; }
.sf-image-canvas img { position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;mix-blend-mode:multiply; }
.sf-image-viewer[data-zoomed] .sf-image-canvas { display:block; }
.sf-image-viewer[data-zoomed] .sf-image-canvas img { position:static;width:200%;height:auto;max-width:none;max-height:none; }
@media(hover:hover) and (pointer:fine) { .sf-image-open:hover .sf-zoom-mark,.sf-image-toolbar button:hover { background:#f2cd67; } }
@media(max-width:520px) { .sf-image-viewer { width:100vw;height:100svh;border:0;border-radius:0;padding:12px 12px calc(12px + env(safe-area-inset-bottom,0px)); } }
@media print { .sf-image-open,.sf-image-viewer { display:none!important; } }
@media print {
  .sf-tools,
  .sf-nav,
  .sf-primary,
  .sf-dialog,
  .sf-skip,
  .sf-listen,
  .sf-bookmark {
    display: none !important;
  }
  .sf-reader {
    padding: 0;
    background: white;
  }
  .sf-stage {
    display: block;
    height: auto !important;
  }
  .sf-ready.sf-reader {
    height: auto;
  }
  .sf-ready .sf-page,
  .sf-ready .sf-paper {
    height: auto;
    max-height: none;
  }
  .sf-ready .sf-scene-body,
  .sf-ready .sf-cover-content,
  .sf-ready .sf-ending-content {
    overflow: visible;
  }
  .sf-page[hidden],
  .sf-page {
    display: block !important;
    width: 100% !important;
    page-break-after: always;
  }
  .sf-paper {
    box-shadow: none;
  }
  .sf-scene-body {
    display: block;
  }
  .sf-art {
    max-width: 60%;
    margin: 0 auto 24px;
  }
}

body{background:#fff3d6}.sf-paper{box-shadow:none}.sf-bookmark{display:none}.sf-cover .sf-paper{background:var(--sf-paper)}.sf-image,.sf-cover .sf-cover-image,.sf-ending-image,.sf-index img{mix-blend-mode:darken;filter:brightness(1.025)}
