.rf {
  display: flex;
  flex-direction: column;
  font-size: 1rem;
  min-height: 100vh;
  min-height: 100dvh;
}

.rf #rf-main {
  flex: 1 0 auto;
}

.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-progress {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 5px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--salmon);
  overflow: hidden;
  pointer-events: none;
}

.rf-search-progress[hidden] {
  display: none;
}

.rf-search-progress::after {
  content: "";
  display: block;
  height: 100%;
  width: 35%;
  background: rgba(255, 255, 255, 0.35);
  animation: rf-search-progress 1s linear infinite;
}

@keyframes rf-search-progress {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}

.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-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-catalog .rf-collection-banners > .rf-banners {
  max-width: none;
  margin: 0 0 2.4rem;
  padding-left: 0;
  padding-right: 0;
}

.rf-collection-banners + .rf-shelf {
  padding-top: 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-shelf__head {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 0.8rem;
  color: var(--ink);
  text-decoration: none;
}

.rf-shelf__head:hover,
.rf-shelf__head:focus {
  color: var(--ink);
  text-decoration: none;
}

.rf-shelf__head h2 {
  margin: 0;
}

.rf-shelf__chevron {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
}

.rf-shelf__note {
  display: block;
  margin: -0.45rem 0 0.9rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.35;
}

.rf-order-book {
  padding-bottom: 1.2rem;
}

.rf-order-book .rf-bookside {
  flex: 0 0 25%;
  width: 25%;
  max-width: 25%;
}

.rf-order-book .rf-bookinfo > h2 {
  margin: 0 0 0.35rem;
  font-size: 2rem;
  line-height: 1.15;
}

.rf-book__subtitle {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.35;
}

.rf-order-book__notice {
  margin: 0;
}

.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;
  font-weight: 500;
}

.rf-book--more .rf-book__cover {
  padding: 3px;
}

.rf-book__cover--placeholder {
  position: relative;
  box-sizing: border-box;
  padding: 0.85rem;
  background: #909090;
  color: #808080;
}

.rf-book__cover-author {
  position: absolute;
  top: 8px;
  left: 0.7rem;
  right: 0.7rem;
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  word-break: break-word;
}

.rf-book__cover-title {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  word-break: break-word;
}

.rf-book__cover--large.rf-book__cover--placeholder {
  padding: 1.2rem;
}

.rf-book__cover--large .rf-book__cover-author {
  left: 1rem;
  right: 1rem;
  font-size: 1.2325rem;
}

.rf-book__cover--large .rf-book__cover-title {
  font-size: 1.885rem;
}

.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-home-skel {
  grid-template-columns: repeat(3, minmax(0, calc(148px * 1.33)));
  justify-content: start;
}

.rf-home-skel > .rf-book {
  width: 100%;
  flex-basis: auto;
}

.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-search-empty {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.rf-search-empty__cover {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(148px * 1.33);
  aspect-ratio: 1 / 1.33;
  border-radius: 4px;
  background: #e4e4e4;
  color: #555;
  font-size: 4.5rem;
  font-weight: 500;
  line-height: 1;
}

.rf-search-empty p {
  margin: 0;
  color: var(--ink);
}

.rf-book--skeleton .rf-book__cover,
.rf-skel {
  background: linear-gradient(90deg, #e7e5e1 0%, #f6f4f0 45%, #e7e5e1 100%);
  background-size: 220% 100%;
  animation: rf-skel 1.2s ease-in-out infinite;
}

.rf-skel--line {
  display: block;
  height: 0.8rem;
  margin: 0.55rem 4px 0;
  border-radius: 4px;
}

.rf-skel--short {
  width: 62%;
}

@keyframes rf-skel {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.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-bookpage__author {
  margin: 0 0 0.65rem;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.3;
}

.rf-bookpage__author-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.rf-bookpage__author-link:hover,
.rf-bookpage__author-link:focus-visible {
  color: #b5453d;
}

.rf-bookpage__written {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.35;
}

.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-main.rf-boot {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  display: block;
  padding: 0;
  overflow: hidden;
  isolation: isolate;
}

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

body.rf-read #rf-main > flutter-view,
body.rf-read #rf-main > flt-glass-pane {
  z-index: 1;
}

body.rf-read #rf-main flutter-view,
body.rf-read #rf-main flt-glass-pane {
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.rf-read #rf-main > flutter-view {
  position: absolute;
  inset: 0;
}

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--primary {
  font-weight: 600;
}

.rf-deeplink-note {
  color: var(--rf-muted, #666);
  font-size: 0.92rem;
  margin-top: 0.5rem;
}

.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 {
  margin-top: 2rem;
  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;
  margin-top: -0.575rem;
}

.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-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);
  }

  .rf-home-skel {
    grid-template-columns: repeat(3, minmax(0, 148px));
  }
}
