.rf {
  font-size: 1rem;
  min-height: 100vh;
}

.rf-mast {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 0.8rem 1.2rem;
  background: var(--paper);
  border-bottom: 1px solid var(--ash);
}

.rf-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.rf-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ash);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.rf-back:hover,
.rf-back:focus {
  background: #fff;
  color: var(--ink);
}

.rf-back svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.rf-logo {
  display: block;
  line-height: 0;
}

.rf-logo img {
  display: block;
  height: 42px;
  width: auto;
}

.rf-search {
  display: flex;
  min-width: 0;
  border: 1px solid var(--ash);
  border-radius: 999px;
  background: #fff;
  overflow: hidden;
}

.rf-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  margin: 0;
  padding: 0.75rem 1rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.rf-search input:focus {
  outline: none;
}

.rf-search button,
.rf-cookie button {
  border: 0;
  margin: 0;
  padding: 0.75rem 1.1rem;
  background: var(--salmon);
  color: #fff;
  font: inherit;
  cursor: pointer;
}

.rf-login {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.rf-login svg {
  width: 1.6rem;
  height: 1.6rem;
}

.rf-banners {
  --rf-banner-w: calc(1180px - 2.4rem);
  --rf-banner-h: calc(var(--rf-banner-w) / 4);
  position: relative;
  margin: 1.2rem auto 0;
  max-width: 1180px;
  padding: 0 1.2rem;
}

.rf-banners__stage {
  position: relative;
}

.rf-banners__viewport {
  overflow: hidden;
  border-radius: 16px;
  aspect-ratio: 4 / 1;
}

.rf-banners__track {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.rf-banner {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  min-height: 0;
  padding: 2rem calc(2.4rem + 19rem) 2rem calc(2.4rem + 30px);
  color: #fff;
  overflow: hidden;
}

.rf-banner__copy {
  position: relative;
  z-index: 1;
}

.rf-banner__art {
  position: absolute;
  z-index: 0;
  right: 3.2rem;
  top: 50%;
  height: 74%;
  width: auto;
  transform: translateY(-50%);
  pointer-events: none;
  user-select: none;
}

.rf-banner h2 {
  margin: 0.3rem 0 0.6rem;
  font-size: 2.4rem;
  line-height: 1.15;
}

.rf-banner p {
  margin: 0;
  font-size: 1.2rem;
  max-width: 36rem;
}

.rf-banner .kicker {
  margin: 0;
  color: #fff;
  opacity: 0.85;
}

.rf-banner--a {
  background: linear-gradient(105deg, #1c2822 0%, #2d3a32 36%, #6d8a78 100%);
}
.rf-banner--b {
  background: linear-gradient(105deg, #4a2622 0%, #6d3b36 36%, #c4897e 100%);
}
.rf-banner--c {
  background: linear-gradient(105deg, #24303c 0%, #3d4a5c 36%, #8aa0b8 100%);
}

.rf-banners__nav {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(from var(--paper) r g b / 0.6);
  color: var(--ink);
  cursor: pointer;
}

.rf-banners__nav:hover {
  background: rgb(from var(--paper) r g b / 0.6);
}

.rf-banners__nav svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

.rf-banners__nav--prev { left: 0; }
.rf-banners__nav--next { right: 0; }

.rf-banners__dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.rf-banners__dots button {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ash);
  cursor: pointer;
}

.rf-banners__dots button.is-on {
  background: var(--salmon);
}

.rf-disclaimer {
  max-width: 1180px;
  margin: 1.2rem auto 0;
  padding: 0 1.2rem;
}

.rf-disclaimer p {
  margin: 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--ash);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(32, 32, 32, 0.12);
  line-height: 1.45;
}

.rf-disclaimer a {
  color: var(--salmon);
}

.rf-shelf,
.rf-authors,
.rf-catalog,
.rf-plain {
  max-width: 1180px;
  margin: 0 auto;
  padding: 1.6rem 1.2rem 0;
}

.rf-news {
  padding-bottom: 2.4rem;
}

.rf-shelf h2,
.rf-authors h2,
.rf-catalog h2,
.rf-plain h2 {
  margin: 0 0 0.8rem;
  font-size: 1.6rem;
}

.rf-authors__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin: 0 0 0.8rem;
}

.rf-authors__head h2 {
  margin: 0;
}

.rf-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  margin-left: auto;
}

.rf-chip {
  margin: 0;
  padding: 0.18rem 0.6rem;
  border: 1px solid var(--ash);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
}

.rf-chip:hover,
.rf-chip:focus {
  background: #fff;
  color: var(--ink);
}

.rf-chip.is-active,
.rf-chip.is-active:hover,
.rf-chip.is-active:focus {
  background: var(--salmon);
  border-color: var(--salmon);
  color: #fff;
  outline: none;
}

.rf-resident-wrap {
  max-width: 1180px;
  margin: 1.6rem auto 2.4rem;
  padding: 0 1.2rem;
}

.rf-resident {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.15rem 1.3rem;
  border: 1px solid var(--salmon);
  border-radius: 12px;
  background: var(--salmon);
  box-shadow: 0 8px 24px rgba(32, 32, 32, 0.12);
  color: #fff;
  text-decoration: none;
}

.rf-resident__text {
  flex: 1;
  min-width: 0;
}

.rf-resident__go {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 1px solid #fff;
  border-radius: 50%;
  background: transparent;
  color: #fff;
}

.rf-resident__go svg {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
}

.rf-resident:hover,
.rf-resident:focus {
  background: #d15a52;
  border-color: #d15a52;
  color: #fff;
  text-decoration: none;
}

.rf-resident h2 {
  margin: 0 0 0.55rem;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
}

.rf-resident p {
  margin: 0;
  line-height: 1.45;
}

.rf-rail {
  display: flex;
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.6rem;
  scroll-snap-type: x proximity;
}

.rf-book {
  flex: 0 0 calc(148px * 1.33);
  width: calc(148px * 1.33);
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}

.rf-book__cover {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1.33;
  border-radius: 4px;
  overflow: hidden;
  background: #333;
  color: #fff;
  text-align: center;
  padding: 3px;
  font-weight: 500;
}

.rf-book__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rf-book__title,
.rf-book__author,
.rf-book__year {
  display: block;
  margin-top: 0.35rem;
  padding-inline: 4px;
}

.rf-book__title {
  font-weight: 500;
  line-height: 1.25;
}

.rf-book__author,
.rf-book__year {
  color: var(--muted);
  font-size: 0.92rem;
}

.rf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, calc(148px * 1.33));
  gap: 1.1rem 0.9rem;
}

.rf-author {
  flex: 0 0 175px;
  width: 175px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: inherit;
  text-decoration: none;
  scroll-snap-align: start;
}

.rf-author__avatar {
  width: 175px;
  height: 175px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
}

.rf-author__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rf-author__name {
  margin-top: 0.55rem;
  font-weight: 500;
}

.rf-author__count {
  color: var(--muted);
  font-size: 0.92rem;
}

.rf-authorpage:last-child,
.rf-authors--others {
  padding-bottom: 2.4rem;
}

.rf-authors--others .rf-author {
  flex-basis: 100px;
  width: 100px;
}

.rf-authors--others .rf-author__avatar {
  width: 100px;
  height: 100px;
}

.rf-authorpage__hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.rf-authorpage__avatar {
  width: min(300px, 100%);
  aspect-ratio: 1;
  margin-bottom: 0.9rem;
  border-radius: 16px;
  overflow: hidden;
  background: var(--ash);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
}

.rf-authorpage__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rf-authorpage h2 {
  margin-bottom: 0.55rem;
  font-size: 2rem;
}

.rf-authorpage__birth {
  display: inline-flex;
  margin: 0;
  padding: 0.15rem 0.75rem;
  border: 1px solid var(--ash);
  border-radius: 999px;
  background: #fff;
  font-size: 0.95rem;
}

.rf-authorpage__bio {
  margin: 1.4rem 0 0;
  white-space: pre-line;
}

.rf-authorpage__blog {
  margin-top: 0;
  padding: 1rem 1.2rem;
  border: 1px solid var(--ash);
  border-radius: 12px;
  background: #fff;
}

.rf-authorpage__blog h3 {
  margin: 0 0 0.55rem;
  font-size: 1.15rem;
}

.rf-authorpage__blog p {
  margin: 0;
}

.rf-notice {
  color: var(--muted);
}

.rf-bookpage {
  display: flex;
  gap: 1.4rem;
  align-items: flex-start;
  padding-bottom: 0.2rem;
}

.rf-book__cover--large {
  width: 100%;
  flex: none;
}

.rf-bookside {
  flex: 0 0 calc(100% / 3);
  width: calc(100% / 3);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.rf-bookmeta {
  margin: 0 0 0.75rem;
}

.rf-age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background: #666;
  color: #faf8f3;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.4;
}

.rf-copies {
  margin: 0;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: #666;
  color: #fff;
}

.rf-copies p {
  margin: 0;
}

.rf-copies p + p {
  margin-top: 0.45rem;
}

.rf-bookpage h3 {
  margin: 1.1rem 0 0.45rem;
  font-size: 1.15rem;
}

.rf-bookdesc {
  margin: 0;
  max-width: 42rem;
  white-space: pre-line;
}

.rf-boot {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: var(--muted);
}

/* Flutter is hosted in #rf-main and measures that box, not the browser window. */
body.rf-read {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

body.rf-read .rf-mast {
  position: relative;
  flex: none;
}

body.rf-read .rf-boot {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: block;
  padding: 0;
  overflow: hidden;
}

body.rf-read .rf-boot__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  pointer-events: none;
}

body.rf-read flutter-view {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.rf-read .rf-cookie {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  flex: none;
  margin: 0 1rem 0.8rem;
}

.rf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  padding-top: 0.8rem;
  padding-bottom: 0.4rem;
}

.rf-reviews {
  padding-bottom: 2.4rem;
}

.rf-review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.rf-review {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border: 1px solid var(--ash);
  border-radius: 12px;
  background: #fff;
}

.rf-review__who {
  flex: none;
  width: 4.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.rf-review__avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--ash);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 500;
}

.rf-review__name {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.25;
  text-align: center;
  white-space: pre-line;
}

.rf-review__text {
  margin: 0;
  min-width: 0;
  white-space: pre-line;
}

.rf-reviews__empty {
  margin: 0;
  color: var(--muted);
}

.rf-reviews__empty + .rf-reviews__empty {
  margin-top: 0.45rem;
}

.rf-action {
  display: flex;
  flex: 1 1 16rem;
  align-items: center;
  justify-content: center;
  max-width: min(24rem, 100%);
  min-height: 3.25rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border: 0;
  border-radius: 12px;
  background: var(--salmon);
  color: #fff;
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0;
  line-height: 1.3;
  text-align: center;
  text-decoration: none;
  text-transform: none;
}

.rf-action:hover,
.rf-action:focus {
  background: #d15a52;
  color: #fff;
  text-decoration: none;
}

.rf-foot {
  background: var(--salmon);
  color: #fff;
  padding: 2.2rem 1.2rem 2rem;
}

.rf-foot__inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
  text-align: center;
}

.rf-foot__lead {
  margin: 0;
  max-width: 36rem;
  font-size: 1.2rem;
  line-height: 1.4;
}

.rf-foot__stores {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 1rem;
}

.rf-foot__stores a {
  display: block;
  line-height: 0;
}

.rf-foot__stores img {
  display: block;
  height: 4.6rem;
  width: auto;
}

.rf-foot__stores .rf-foot__rustore {
  height: 3.15rem;
}

.rf-foot__stores a:hover,
.rf-foot__stores a:focus {
  opacity: 0.86;
}

.rf-foot__colophon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin: 0.4rem 0 0;
}

.rf-foot__colophon img {
  height: 2.4rem;
  width: auto;
}

.rf-foot__colophon small {
  max-width: 28rem;
  color: #fff;
  font-size: 0.85rem;
  line-height: 1.35;
  text-align: left;
}

@media (max-width: 720px) {
  .rf-foot__colophon {
    flex-direction: column;
  }

  .rf-foot__colophon small {
    text-align: center;
  }
}

.rf-cookie {
  position: fixed;
  z-index: 6;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--ash);
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(32, 32, 32, 0.12);
}

.rf-cookie p {
  margin: 0;
}

.rf-cookie-ok .rf-cookie {
  display: none;
}

@media (max-width: 720px) {
  .rf-mast {
    grid-template-columns: auto auto;
  }

  .rf-search {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .rf-login span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }

  .rf-banners {
    padding: 0 1.2rem;
    container-type: inline-size;
  }

  .rf-banners__nav {
    display: none;
  }

  .rf-banners__stage {
    height: calc(var(--rf-banner-h) * 100cqi / var(--rf-banner-w));
    overflow: hidden;
  }

  .rf-banners__viewport {
    width: var(--rf-banner-w);
    height: var(--rf-banner-h);
    transform: scale(calc(100cqi / var(--rf-banner-w)));
    transform-origin: top left;
  }

  .rf-banner {
    height: var(--rf-banner-h);
    min-height: 0;
  }

  .rf-bookpage {
    flex-direction: column;
    align-items: center;
  }

  .rf-bookside,
  .rf-book__cover--large {
    width: 75vw;
  }

  .rf-bookinfo {
    width: 100%;
  }

  .rf-cookie {
    flex-direction: column;
    align-items: stretch;
  }

  .rf-book {
    flex-basis: 148px;
    width: 148px;
  }

  .rf-grid {
    grid-template-columns: repeat(auto-fill, 148px);
  }
}
