/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
  box-sizing: border-box;
}
/* 2. Remove default margin */
* {
  margin: 0;
}
/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}
body {
  /* 4. Add accessible line-height */
  line-height: 1.5;
  /* 5. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}
/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}
/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
  font: inherit;
}
/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}
/* 9. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}
/*
  10. Create a root stacking context
*/
#root,
#__next {
  isolation: isolate;
}
.spacer {
  height: 30px;
}
.spacer--small {
  height: 15px;
}
.spacer--large {
  height: 60px;
}
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}
.text-center {
  text-align: center;
}
.header {
  height: 40px;
}
@media only screen and (min-width: 540px) {
  .header {
    height: 80px;
  }
}
.footer {
  height: 40px;
}
@media only screen and (min-width: 540px) {
  .footer {
    height: 80px;
  }
}
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}
@media only screen and (min-width: 540px) {
  .container {
    width: 80%;
    padding: 0;
  }
}
.container--narrow {
  width: 100%;
  padding: 0 20px;
  margin: 0 auto;
}
@media only screen and (min-width: 540px) {
  .container--narrow {
    width: 50%;
    max-width: 600px;
    padding: 0;
  }
}
.hidden {
  display: none;
}
.admin-nav {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1000;
  list-style: none;
  padding: 10px;
  margin: 0;
}
.manual-story-container {
  text-align: right;
  margin-bottom: 20px;
}
.form-group {
  margin-bottom: 40px;
}
.form-label {
  display: block;
  font-size: 18px;
  margin-bottom: 12px;
}
.form-input {
  width: 100%;
  border-radius: 5px;
  border: 1px solid rgb(238, 238, 238);
  padding: 12px;
}
.form-input:focus,.form-input:active {
    border-color: purple;
    outline: purple;
    box-shadow: 0 0 0 0.2rem rgba(251, 0, 255, 0.25);
  }
.button {
  background-color: purple;
  outline: none;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 18px;
  font-weight: 500;
}
.button:hover {
    cursor: pointer;
  }
/* Forward navigation - slide in from right */
@keyframes slide-from-right {
  from { transform: translateX(100%); }
}
@keyframes slide-to-left {
  to { transform: translateX(-100%); }
}
/* Back navigation - slide in from left */
@keyframes slide-from-left {
  from { transform: translateX(-100%); }
}
@keyframes slide-to-right {
  to { transform: translateX(100%); }
}
/* Default (forward) */
::view-transition-old(root) {
  animation: slide-to-left 0.3s ease-in-out;
}
::view-transition-new(root) {
  animation: slide-from-right 0.3s ease-in-out;
}
/* Back navigation - reverse the direction */
.turbo-visit-direction-back::view-transition-old(root) {
  animation: slide-to-right 0.3s ease-in-out;
}
.turbo-visit-direction-back::view-transition-new(root) {
  animation: slide-from-left 0.3s ease-in-out;
}
:root {
  --base-font-size: 18px;
  --font-serif-family: serif;
  --font-sans-serif-family: sans-serif;
}
body {
  font-family: var(--font-sans-serif-family);
}
h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: var(--base-font-size);
}
p {
  font-size: var(--base-font-size);
}
.fixed-height-container {
  height: calc(var(--viewport-inner-height, 1vh) * 100);
}
.title-container {
  display: flex;
  font-size: 18px;
  padding: 12px 12px 0 12px;
  align-items: center;
  justify-content: space-between;
}
.title-container a,.title-container a:hover {
    text-decoration: none;
    color: black;
  }
.title {
  font-size: 18px;
  text-align: center;
  padding: 0;
  margin: 0;
}
.back-button {
  text-decoration: none;
}
.story-delete {
  text-decoration: none;
  border: 0;
  outline: 0;
  background: none;
  color: black;
  cursor: pointer;
}
.story-delete svg {
    width: 24px;
    height: 24px;
  }
.status {
}
.open-book {
  display: flex;
  flex-wrap: nowrap;
  height: calc(100% - 39px);
  padding: 12px;
  overflow-y: hidden;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-padding: 12px;
}
.open-book__card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  width: calc(100vw - 48px);
  margin-right: 12px;
  scroll-snap-align: start;
}
.open-book__cover-container {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  height: 100%;
  width: calc(100vw - 48px);
  scroll-snap-align: start;
}
.open-book__cover-card {
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  aspect-ratio: 2 / 3;
  margin-right: 12px;
  background-color: rgb(228, 228, 228);
  background-size: cover;
  background-position: center;
}
.open-book__card__title {
  font-size: 48px;
  text-align: center;
  line-height: 56px;
  margin-bottom: 18px;
}
.open-book__card__subtitle {
  font-size: 24px;
  line-height: 30px;
  font-weight: 400;
  text-align: center;
}
.open-book__card--placeholder {
  justify-content: center;
  align-items: center;
}
.skeleton {
  background-color: rgb(228, 228, 228);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  background-size: 250px 100%;
  background-repeat: no-repeat;
  background-position: left -40px top 0;
  animation: shine 1s linear infinite;
}
.skeleton__title {
  width: 30%;
  height: 24px;
}
.skeleton__subtitle {
  width: 40%;
  margin-top: 12px;
  height: 24px;
}
.skeleton__page {
  width: 100%;
  height: 100%;
}
.open-book__card__image {
  flex-grow: 1;
  background: rgb(228, 228, 228);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  cursor: zoom-in;
}
.open-book__card__image--zoomed {
  background-size: cover;
  cursor: zoom-out;
}
.open-book__card__image--loading {
  background-color: rgb(228, 228, 228);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  background-size: 250px 100%;
  background-repeat: no-repeat;
  background-position: left -40px top 0;
  animation: shine 1s linear infinite;
}
@keyframes shine {
  to {
    background-position: right -40px top 0;
  }
}
.open-book__card__text {
  flex-basis: content;
  padding: 21px 18px;
}
.open-book__card__text p {
    font-size: 24px;
  }
.the-end-container {
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
}
.the-end {
  font-size: 48px;
  font-weight: bold;
}
.delete-button {
  background: none;
  border: none;
}
.delete-button:hover {
    cursor: pointer;
  }
.story-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  margin: 80px 0 80px;
  gap: 20px 40px;
}
.story-card {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  aspect-ratio: 2/3;
  width: 100%;
  background-color: rgb(238, 238, 238);
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  border: 4px solid white;
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.2);
  transition: all 0.1s ease-in-out;
  text-decoration: none;
}
.story-card:hover {
  transform: scale(1.05);
  box-shadow: 0px 0px 10px 1px rgba(0, 0, 0, 0.3);
}
.story-card__add {
  color: black;
  font-size: 24px;
  text-align: center;
}
.story-card--cover-generating {
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  background-size: 100px 100%;
  background-repeat: no-repeat;
  background-position: left -80px top 0;
  animation: shine 1s linear infinite;
}
@keyframes shine {
  to {
    background-position: right -80px top 0;
  }
}
.story-card__title {
  font-size: 24px;
  color: black;
  font-weight: 500;
  text-align: center;
}
::view-transition-old(story-cover-card-*),
::view-transition-new(story-cover-card-*) {
  animation-duration: 0.4s;
  animation-timing-function: ease-out;
}
.family-title {
  font-weight: 500;
  font-size: 24px;
}
.family-container {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 20px 20px;
  margin: 18px 0 80px;
}
.family-member {
  text-decoration: none;
  cursor: pointer;
}
.family-member--unselectable {
  cursor: not-allowed;
  opacity: 0.5;
}
.family-member--selected {
  color: purple;
}
.family-member--selected .family-member__avatar {
    box-shadow: 0 0 0 0.2rem rgba(251, 0, 255, 0.25);
  }
.family-member__avatar--add {
  display: flex;
  color: black;
  font-size: 24px;
  justify-content: center;
  align-items: center;
}
.family-member__avatar {
  width: 80px;
  height: 80px;
  border-radius: 40px;
  background-color: rgb(238, 238, 238);
  box-shadow: 0px 0px 5px 1px rgba(0, 0, 0, 0.2);
  background-size: cover;
  background-position: center;
  border: solid 4px white;
}
.family-member__avatar--generating {
  display: flex;
  font-size: 24px;
  color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0),
    rgba(255, 255, 255, 0.3),
    rgba(255, 255, 255, 0)
  );
  background-size: 100px 100%;
  background-repeat: no-repeat;
  background-position: left -80px top 0;
  animation: shine 1s linear infinite;
}
@keyframes shine {
  to {
    background-position: right -80px top 0;
  }
}
.family-member__name {
  margin-top: 8px;
  font-size: 16px;
  text-align: center;
}
