:root {
  color-scheme: light;
  --ink: #2b2119;
  --paper: #fffaf3;
  --muted: #7a6a59;
  --wood: #9b551d;
  --wood-dark: #542909;
  --wood-light: #d58b35;
  --accent: #1f8a84;
  --gold: #d59d3b;
  --shadow: 0 22px 55px rgba(39, 18, 3, .32);
}

.landing-page {
  overflow: auto;
  overflow-x: hidden;
  background: #fffaf3;
  color: #4a3421;
  user-select: auto;
}

.landing-page a {
  color: inherit;
}

.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1480px, calc(100% - 64px));
  margin: 0 auto;
  padding: 26px 0 20px;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: #5c4129;
  text-decoration: none;
}

.landing-logo img {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 8px 16px rgba(97, 62, 25, .14);
}

.landing-logo strong {
  font-size: clamp(28px, 3.4vw, 42px);
  line-height: 1;
  font-weight: 900;
}

.landing-header-links {
  display: flex;
  justify-content: flex-end;
}

.landing-header-links a,
.info-nav a {
  border: 1px solid rgba(139, 94, 47, .18);
  border-radius: 999px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .7);
  color: #6a4b32;
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(97, 62, 25, .08);
}

.landing-header-links a:hover,
.landing-header-links a:focus-visible,
.info-nav a:hover,
.info-nav a:focus-visible {
  background: #8b5b2a;
  color: #fff8ef;
  outline: none;
}

.landing-main {
  width: min(1480px, calc(100% - 64px));
  margin: 0 auto 54px;
}

.landing-hero {
  position: relative;
  min-height: 318px;
  display: block;
  overflow: hidden;
  border-radius: 18px;
  padding: 0;
  background:
    linear-gradient(90deg, rgba(255, 250, 243, .98) 0 42%, rgba(255, 250, 243, .72) 62%, rgba(255, 250, 243, .18) 100%),
    url("images/background.png") center right / cover no-repeat,
    #d9a866;
  box-shadow: 0 18px 44px rgba(97, 62, 25, .15);
}

.landing-hero-copy {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 318px;
  width: min(760px, 64%);
  padding: 44px min(8vw, 132px);
}

.landing-hero-copy h1 {
  margin: 0;
  color: #4b3321;
  font-size: clamp(34px, 4vw, 58px);
  line-height: 1.16;
  text-shadow: none;
  overflow-wrap: anywhere;
}

.landing-hero-copy p {
  max-width: 650px;
  margin: 22px 0 0;
  color: #6a4b32;
  font-size: clamp(16px, 1.7vw, 22px);
  line-height: 1.8;
  font-weight: 800;
}

.landing-hero-actions {
  display: grid;
  justify-items: start;
  gap: 12px;
  margin-top: 30px;
}

.landing-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 260px;
  min-height: 58px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(#d79a49, #bd741f);
  color: #fffaf3;
  text-decoration: none;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(146, 91, 30, .26);
}

.landing-install-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: min(100%, 520px);
  min-height: 42px;
  border: 1px solid rgba(139, 94, 47, .22);
  border-radius: 999px;
  padding: 0 18px;
  background: rgba(255, 250, 243, .72);
  color: #6a4b32;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(97, 62, 25, .1);
}

.landing-install-link:hover,
.landing-install-link:focus-visible {
  transform: translateY(-1px);
  outline: 3px solid rgba(139, 94, 47, .16);
  outline-offset: 3px;
}

.landing-primary::before {
  content: "⌕";
  margin-right: 10px;
  font-size: 24px;
  line-height: 1;
}

.landing-primary:hover,
.landing-primary:focus-visible {
  transform: translateY(-2px);
  outline: 3px solid rgba(194, 121, 34, .24);
  outline-offset: 4px;
}

.landing-section {
  margin-top: 22px;
}

.landing-section h2,
.landing-section-head h2 {
  margin: 0;
  color: #4b3321;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.2;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.landing-feature {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 164px;
  border: 1px solid rgba(139, 94, 47, .13);
  border-radius: 12px;
  padding: 22px 16px;
  background: rgba(255, 255, 255, .86);
  color: #49321f;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(97, 62, 25, .1);
}

.landing-feature span {
  color: #b9772f;
  font-size: 44px;
  line-height: 1;
}

.landing-feature strong {
  font-size: 20px;
  line-height: 1.35;
}

.landing-feature small {
  color: #7b6048;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.landing-feature:hover,
.landing-feature:focus-visible {
  transform: translateY(-3px);
  outline: none;
  border-color: rgba(185, 118, 44, .34);
}

.landing-genre-list {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  margin-top: 16px;
  padding: 2px 0 14px;
  border-bottom: 1px solid rgba(139, 94, 47, .16);
}

.landing-genre-list::-webkit-scrollbar {
  display: none;
}

.landing-genre-list a {
  flex: 0 0 auto;
  min-width: 116px;
  border-radius: 999px;
  padding: 12px 18px;
  background: #f4ece2;
  color: #80592f;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
}

.landing-genre-list a:hover,
.landing-genre-list a:focus-visible {
  background: #8b5b2a;
  color: #fff8ef;
  outline: none;
}

.landing-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.landing-section-head a {
  color: #b06c24;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.landing-section-head a::after {
  content: "›";
  margin-left: 10px;
  font-size: 28px;
  line-height: 0;
  vertical-align: -2px;
}

.landing-carousel {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  cursor: grab;
  scrollbar-width: none;
  margin-top: 18px;
  padding: 10px 0 20px;
  overscroll-behavior-x: contain;
  touch-action: pan-x;
}

.landing-carousel::-webkit-scrollbar {
  display: none;
}

.landing-carousel.is-dragging {
  cursor: grabbing;
}

.landing-carousel::before,
.landing-carousel::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 2;
  width: 84px;
  pointer-events: none;
}

.landing-carousel::before {
  left: 0;
  background: linear-gradient(90deg, #fffaf3, rgba(255, 250, 243, 0));
}

.landing-carousel::after {
  right: 0;
  background: linear-gradient(270deg, #fffaf3, rgba(255, 250, 243, 0));
}

.landing-recommendation-track {
  display: flex;
  align-items: start;
  gap: 42px;
  width: max-content;
  min-height: 250px;
}

.landing-book-card {
  display: grid;
  justify-items: center;
  align-content: start;
  width: 150px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #4a3421;
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}

.landing-book-card .book-cover-frame {
  width: 118px;
  height: 178px;
  border-radius: 3px;
  background: #fff;
  box-shadow: 8px 0 0 rgba(0, 0, 0, .16), 0 12px 18px rgba(97, 62, 25, .16);
}

.landing-book-card .book-cover {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.landing-book-card strong {
  width: 100%;
  margin-top: 14px;
  color: #4a3421;
  font-size: 16px;
  line-height: 1.45;
}

.landing-book-card small {
  width: 100%;
  margin-top: 6px;
  color: #7a6048;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.landing-loading {
  min-width: min(520px, calc(100vw - 64px));
  margin: 0;
  border: 1px dashed rgba(139, 94, 47, .24);
  border-radius: 10px;
  padding: 28px;
  background: white;
  color: #7a6048;
  font-weight: 900;
}

.landing-footer {
  width: min(1480px, calc(100% - 64px));
  margin: 20px auto 56px;
  border-top: 1px solid rgba(139, 94, 47, .16);
  padding-top: 24px;
  color: #6c5540;
  font-size: 14px;
  line-height: 1.8;
}

.landing-footer nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.landing-footer a {
  color: #9b5c20;
  font-weight: 900;
  text-decoration: none;
}

.landing-footer section {
  max-width: 920px;
  margin-top: 18px;
}

.landing-footer h2 {
  margin: 0 0 8px;
  color: #4b3321;
  font-size: 18px;
}

.landing-footer p {
  margin: 6px 0;
}

.landing-book-dialog .dialog-cover-wrap {
  background: #fffaf3;
}

.info-page {
  scroll-behavior: smooth;
  overflow: auto;
  background: #fffaf3;
  color: #4a3421;
  user-select: auto;
}

.info-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 18px;
}

.info-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.info-main {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto 56px;
}

.info-card {
  border: 1px solid rgba(139, 94, 47, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .9);
  padding: clamp(24px, 5vw, 56px);
  box-shadow: 0 18px 44px rgba(97, 62, 25, .13);
}

.info-kicker {
  margin: 0 0 8px;
  color: #b9772f;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.info-card h1 {
  margin: 0;
  color: #4b3321;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.15;
}

.info-lead {
  max-width: 860px;
  margin: 20px 0 0;
  color: #6a4b32;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.8;
  font-weight: 800;
}

.info-section {
  margin-top: 34px;
  scroll-margin-top: 18px;
}

.info-section h2 {
  margin: 0 0 12px;
  color: #4b3321;
  font-size: clamp(24px, 3vw, 34px);
}

.info-section p,
.info-list {
  color: #6a4b32;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.8;
}

.info-toc {
  margin-top: 30px;
  border: 1px solid rgba(139, 94, 47, .16);
  border-radius: 12px;
  background: #fff8ef;
  padding: 18px;
}

.info-toc h2 {
  margin: 0 0 12px;
  color: #5a3b20;
  font-size: 22px;
}

.info-toc-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.info-toc-grid a {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid rgba(139, 94, 47, .18);
  border-radius: 8px;
  background: white;
  color: #5f3b19;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
}

.info-toc-grid a:hover,
.info-toc-grid a:focus-visible {
  border-color: rgba(185, 119, 47, .55);
  background: #fff2df;
  outline: none;
}

.howto-figure {
  margin: 18px 0 0;
  border-radius: 12px;
  background: #f4ece2;
  padding: 16px;
}

.howto-image-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.howto-figure img {
  display: block;
  width: min(100%, 430px);
  max-height: 760px;
  margin: 0 auto;
  border-radius: 12px;
  object-fit: contain;
  box-shadow: 0 12px 26px rgba(97, 62, 25, .18);
}

.howto-figure-pair img {
  width: min(100%, 360px);
}

.howto-figure figcaption {
  margin-top: 12px;
  color: #7b6048;
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.info-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.3em;
}

.info-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 34px;
}

.info-secondary,
.contact-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border: 1px solid rgba(139, 94, 47, .2);
  border-radius: 999px;
  padding: 0 22px;
  background: #fffaf3;
  color: #6a4b32;
  text-decoration: none;
  font-weight: 900;
  cursor: pointer;
}

.contact-card {
  max-width: 820px;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: #5f442d;
  font-weight: 900;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(139, 94, 47, .18);
  border-radius: 10px;
  background: #fffaf3;
  color: #3e2b1d;
  font: inherit;
  font-weight: 800;
  padding: 12px 14px;
}

.contact-form textarea {
  min-height: 180px;
  resize: vertical;
}

.contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-note {
  margin: 0;
  color: #7b6048;
  font-size: 13px;
  font-weight: 800;
}

.contact-submit {
  width: min(220px, 100%);
  border: 0;
  background: linear-gradient(#d79a49, #bd741f);
  color: #fffaf3;
  font-size: 16px;
}

.contact-alert {
  margin: 22px 0 0;
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 900;
}

.contact-alert.is-success {
  background: #edf8ed;
  color: #275f2e;
}

.contact-alert.is-error {
  background: #fff1ee;
  color: #8a3023;
}

@media (max-width: 900px) {
  .landing-header,
  .landing-main,
  .landing-footer {
    width: calc(100% - 28px);
    max-width: 720px;
  }

  .landing-header {
    padding: 18px 0 14px;
  }

  .landing-header-links a {
    padding: 8px 12px;
    font-size: 12px;
  }

  .landing-hero {
    min-height: 0;
    background:
      linear-gradient(180deg, rgba(255, 250, 243, .92) 0 40%, rgba(255, 250, 243, .5) 100%),
      url("images/background.png") right center / auto 82% no-repeat,
      #d9a866;
  }

  .landing-hero-copy {
    width: auto;
    min-height: 380px;
    padding: 34px 26px;
  }

  .landing-hero-copy h1 {
    font-size: 36px;
    max-width: 100%;
  }

  .landing-primary {
    width: 100%;
    max-width: 300px;
    min-width: 0;
  }

  .landing-hero-actions {
    width: 100%;
    justify-items: start;
  }

  .landing-install-link {
    width: 100%;
    max-width: 300px;
    min-height: 46px;
    padding: 8px 14px;
    line-height: 1.45;
    text-align: center;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-feature {
    min-height: 126px;
  }

  .landing-carousel::before,
  .landing-carousel::after {
    width: 28px;
  }

  .landing-recommendation-track {
    gap: 28px;
  }

  .info-header,
  .info-main {
    width: min(100% - 24px, 1120px);
  }

  .info-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-nav {
    justify-content: flex-start;
  }

  .info-card {
    padding: 22px 16px;
  }

  .info-toc-grid {
    grid-template-columns: 1fr;
  }

  .info-toc-grid a {
    min-height: 46px;
    justify-items: start;
    text-align: left;
  }

  .howto-image-pair {
    grid-template-columns: 1fr;
  }

  .info-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .info-actions .landing-primary,
  .info-secondary {
    width: 100%;
    box-sizing: border-box;
  }
}

.legal-main {
  width: min(960px, calc(100% - 64px));
  margin: 0 auto 64px;
}

.legal-card {
  border: 1px solid rgba(139, 94, 47, .14);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 14px 34px rgba(97, 62, 25, .1);
  padding: clamp(24px, 5vw, 48px);
  color: #4a3421;
  line-height: 1.9;
}

.legal-card h1 {
  margin: 0 0 24px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.2;
}

.legal-card h2 {
  margin: 28px 0 8px;
  color: #5a3b20;
  font-size: 22px;
}

.legal-card p {
  margin: 8px 0;
}

.legal-card a {
  color: #9b5c20;
  font-weight: 900;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #24150c;
  color: var(--ink);
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  overflow: hidden;
  user-select: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 88px 1fr;
  height: 100vh;
  min-height: 0;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(40, 24, 12, .62), rgba(40, 24, 12, .18) 26%, rgba(40, 24, 12, .56)),
    url("images/background.png") center / cover no-repeat,
    #6c421f;
}

.rail {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: rgba(255, 250, 243, .96);
  border-right: 1px solid rgba(139, 94, 47, .16);
  box-shadow: 8px 0 20px rgba(80, 45, 18, .08);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(139, 94, 47, .42) rgba(255, 250, 243, .72);
}

.rail-nav {
  min-height: 96px;
  border: 0;
  border-bottom: 1px solid rgba(139, 94, 47, .13);
  border-radius: 0;
  color: #7a6148;
  background: transparent;
  text-decoration: none;
  display: grid;
  align-content: center;
  place-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 800;
}

.rail-nav span {
  font-size: 27px;
  line-height: 1;
}

.rail-nav strong {
  font-size: 13px;
  line-height: 1.2;
}

.rail-nav.is-active,
.rail-nav:hover {
  color: #a45c16;
  background: rgba(255, 246, 229, .96);
  box-shadow: inset 4px 0 0 #de7a22;
}

.bookstore {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  padding: 18px 24px 16px;
  gap: 14px;
}

.store-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  color: #6a4a2b;
  background: rgba(255, 250, 242, .9);
  border: 1px solid rgba(139, 94, 47, .14);
  border-radius: 8px;
  padding: 16px 10px;
  box-shadow: 0 12px 30px rgba(97, 62, 25, .1);
}

.shelf-hint-button {
  justify-self: center;
  width: min(360px, 100%);
  border: 1px solid rgba(139, 94, 47, .22);
  border-radius: 8px;
  background: rgba(255, 250, 243, .92);
  color: #7b5c3d;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.3;
  padding: 6px 10px;
  text-align: center;
  box-shadow: 0 6px 14px rgba(97, 62, 25, .1);
}

.shelf-hint-button:hover,
.shelf-hint-button:focus-visible {
  background: #fffaf1;
  color: #5b3a20;
  outline: 2px solid rgba(186, 123, 50, .34);
  outline-offset: 2px;
}

.brand-block {
  min-width: 330px;
  margin-right: auto;
}

.store-kicker {
  margin: 0 0 2px;
  color: #ffe2b6;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 45px);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}

.brand-copy {
  margin: 7px 0 0;
  color: #8a725d;
  font-size: 13px;
  font-weight: 800;
}

.view-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: end;
  margin-left: 0;
}

.zoom-control {
  display: flex;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  background: rgba(255, 250, 243, .92);
  color: var(--ink);
  padding: 5px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .16);
}

.zoom-control {
  flex: 0 0 auto;
  padding: 8px 10px;
  font-size: 16px;
  font-weight: 800;
}

.zoom-control span {
  flex: 0 0 auto;
  min-width: 118px;
  white-space: nowrap;
}

.zoom-control input {
  width: 210px;
  accent-color: var(--accent);
}

.search-machine-button {
  flex: 0 1 200px;
  max-width: 200px;
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(139, 94, 47, .24);
  border-radius: 8px;
  background: linear-gradient(#fffaf1, #f1dfc4);
  color: #5b3a20;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 10px 20px rgba(97, 62, 25, .12);
  cursor: pointer;
  font-weight: 900;
}

.search-machine-button span {
  font-size: 24px;
  line-height: 1;
}

.search-machine-dialog {
  width: min(1040px, calc(100vw - 28px));
  border: 2px solid rgba(232, 235, 232, .78);
  border-radius: 42px;
  padding: 26px 44px;
  background:
    radial-gradient(circle at 16px 50%, #050505 0 10px, transparent 11px),
    linear-gradient(145deg, #161717, #050505 62%, #1a1a1a);
  color: #f8efe2;
  box-shadow: 0 34px 80px rgba(0, 0, 0, .48), inset 0 0 0 7px #101010;
}

.search-machine-dialog::backdrop {
  background:
    linear-gradient(rgba(24, 14, 8, .42), rgba(24, 14, 8, .52)),
    url("images/background.png") center / cover no-repeat;
}

.search-machine-panel {
  position: relative;
  overflow: auto;
  min-height: 540px;
  max-height: min(760px, calc(100vh - 86px));
  border-radius: 18px;
  padding: 34px 56px 26px;
  background:
    linear-gradient(180deg, rgba(42, 80, 63, .96) 0 146px, rgba(255, 250, 240, .97) 146px 100%),
    #fffaf0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.search-machine-panel::before {
  content: "";
  position: absolute;
  right: 40px;
  top: 36px;
  width: 260px;
  height: 118px;
  opacity: .22;
  background:
    linear-gradient(#d8c19b, #d8c19b) 0 100% / 100% 2px no-repeat,
    repeating-linear-gradient(90deg, transparent 0 16px, rgba(216, 193, 155, .9) 16px 20px, transparent 20px 32px);
  border-bottom: 2px solid rgba(216, 193, 155, .5);
  pointer-events: none;
}

.search-machine-panel::after {
  content: "お探しの一冊が、きっと見つかります。";
  position: absolute;
  left: 42%;
  bottom: 30px;
  color: #4e6f60;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: .08em;
}

.search-machine-head {
  position: relative;
  z-index: 1;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 0 16px;
  box-shadow: none;
}

.search-machine-head h2 {
  margin: 0;
  color: #fffaf1;
  font-size: 42px;
  letter-spacing: 0;
  line-height: 1;
}

.search-machine-fields {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: 4px;
  border-radius: 16px;
  background: rgba(255, 250, 240, .96);
  padding: 24px 36px 84px;
  box-shadow: 0 18px 40px rgba(79, 51, 24, .1);
}

.search-machine-field {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 6px;
}

.search-machine-field::before,
.search-machine-field:nth-child(2)::before,
.search-machine-field:nth-child(3)::before,
.search-machine-field:nth-child(4)::before {
  content: none;
  display: none;
}

.search-machine-field span {
  color: #3d3027;
  font-weight: 900;
}

.search-machine-field input,
.search-machine-field select {
  width: 100%;
  min-height: 46px;
  border: 1px solid rgba(118, 82, 44, .18);
  border-radius: 8px;
  background: rgba(255, 255, 255, .74);
  color: #2b2119;
  font: inherit;
  font-weight: 800;
  padding: 0 18px;
}

.search-field-note {
  color: #8a725d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.search-machine-actions {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: end;
  margin-top: -70px;
  padding: 0 36px 12px;
}

.search-machine-submit {
  min-width: 230px;
  min-height: 54px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 18px;
  background: linear-gradient(#38675a, #244c43);
  color: white;
  cursor: default;
  font-size: 20px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(45, 73, 60, .22);
  padding: 0 26px;
}

.search-machine-results {
  position: relative;
  z-index: 1;
  margin-top: 18px;
  border-radius: 14px;
  background: rgba(255, 250, 240, .98);
  padding: 18px;
  color: #2b2119;
}

.search-results-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.search-results-head h3 {
  margin: 0;
  color: #3d3027;
  font-size: 20px;
}

.search-results-head span {
  color: #7a6654;
  font-weight: 900;
}

.search-results-grid {
  overflow: visible;
  padding: 8px;
}

.search-loading {
  position: sticky;
  top: 8px;
  z-index: 3;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 28px;
  border-radius: 10px;
  background: rgba(255, 250, 240, .92);
  color: #315a50;
  font-weight: 900;
}

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

.search-loading span {
  width: 34px;
  height: 34px;
  border: 4px solid rgba(49, 90, 80, .22);
  border-top-color: #315a50;
  border-radius: 50%;
  animation: search-spin .8s linear infinite;
}

@keyframes search-spin {
  to {
    transform: rotate(360deg);
  }
}

.search-page-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.search-page-button {
  min-height: 44px;
  border: 1px solid rgba(49, 90, 80, .25);
  border-radius: 8px;
  background: #315a50;
  color: white;
  cursor: pointer;
  font-weight: 900;
  padding: 0 20px;
}

.category-bar {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 0 6px;
  background: rgba(255, 250, 243, .9);
  border: 1px solid rgba(139, 94, 47, .14);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(97, 62, 25, .08);
}

.category-tab {
  flex: 0 0 auto;
  border: 0;
  border-right: 1px solid rgba(139, 94, 47, .16);
  border-radius: 0;
  padding: 8px 14px;
  background: transparent;
  color: #74553a;
  font-weight: 900;
  cursor: pointer;
}

.category-tab.is-active,
.category-tab:hover {
  background: #9b5c20;
  color: #fff8eb;
  border-radius: 7px;
}

.stage-wrap {
  position: relative;
  height: 100%;
  min-height: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.store-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 248, 232, .78), rgba(255, 238, 205, .76)),
    url("images/background.png") center / cover no-repeat;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: none;
  place-items: center;
  color: #fff8ee;
  font-size: 28px;
  font-weight: 900;
  text-shadow: 0 3px 14px rgba(0, 0, 0, .42);
  pointer-events: auto;
  cursor: wait;
}

.loading-overlay.is-visible {
  display: grid;
}

.loading-overlay span {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-radius: 8px;
  padding: 18px 28px;
  background: rgba(44, 22, 9, .82);
  box-shadow: 0 16px 35px rgba(0, 0, 0, .24);
}

.loading-overlay img {
  width: auto;
  height: 1.265em;
  object-fit: contain;
}

.stage-scroller {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  touch-action: none;
  cursor: grab;
  scrollbar-color: rgba(255, 255, 255, .6) rgba(0, 0, 0, .25);
}

.stage-scroller::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.stage-scroller::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, .22);
}

.stage-scroller::-webkit-scrollbar-thumb {
  border: 3px solid rgba(0, 0, 0, .22);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  background-clip: padding-box;
}

.stage-scroller.is-dragging {
  cursor: grabbing;
}

.stage-scroller.is-dragging .book,
.stage-scroller.is-zooming .book,
.stage-scroller.is-dragging .genre-card-small,
.stage-scroller.is-zooming .genre-card-small {
  transition: none;
}

.stage-scroller.is-dragging .book:hover,
.stage-scroller.is-dragging .book:focus-visible,
.stage-scroller.is-zooming .book:hover,
.stage-scroller.is-zooming .book:focus-visible,
.stage-scroller.is-dragging .genre-card-small:hover,
.stage-scroller.is-dragging .genre-card-small:focus-visible,
.stage-scroller.is-zooming .genre-card-small:hover,
.stage-scroller.is-zooming .genre-card-small:focus-visible {
  transform: none;
  filter: none;
  outline: none;
}

.stage-scroller.is-dragging .book-cover-frame,
.stage-scroller.is-dragging .book-spine,
.stage-scroller.is-zooming .book-cover-frame,
.stage-scroller.is-zooming .book-spine {
  box-shadow: none;
}

.stage-scroller.is-zooming .shelf-zoom {
  transition: none;
}

.shelf-stage {
  --zoom: 1;
  --stage-width: 1720px;
  --stage-height: 1010px;
  position: relative;
  width: var(--stage-width);
  min-width: var(--stage-width);
  height: var(--stage-height);
  min-height: var(--stage-height);
  overflow: hidden;
}

.shelf-zoom {
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  grid-template-rows: repeat(5, 178px);
  gap: 14px;
  width: max(var(--stage-width), 100%);
  min-width: max(var(--stage-width), 100%);
  min-height: var(--stage-height);
  padding: 18px 32px 34px;
  transform: scale(var(--zoom));
  transform-origin: top left;
  transition: transform .18s ease;
}

.shelf-row-wide {
  position: relative;
  display: flex;
  align-items: end;
  gap: 18px;
  min-width: max-content;
  padding: 0 20px 30px;
  background:
    linear-gradient(90deg, rgba(188, 130, 58, .14), rgba(255, 248, 229, .88), rgba(188, 130, 58, .14));
}

.shelf-row-wide::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(#e3bd7a, #b87528 46%, #8b4c13);
  box-shadow: 0 -7px 14px rgba(255, 236, 184, .46), 0 8px 14px rgba(95, 48, 13, .28);
}

.genre-block {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: end;
  gap: 7px;
  flex: 0 0 auto;
}

.genre-card-small {
  display: grid;
  align-content: center;
  justify-items: center;
  width: 126px;
  height: 154px;
  flex: 0 0 auto;
  border: 1px solid rgba(146, 92, 34, .38);
  border-radius: 4px;
  padding: 14px 12px;
  background:
    linear-gradient(rgba(255, 253, 247, .96), rgba(255, 244, 219, .94)),
    linear-gradient(90deg, rgba(169, 103, 40, .16), transparent 18%, transparent 82%, rgba(169, 103, 40, .16));
  color: #5f3b19;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .22), 0 8px 16px rgba(92, 53, 18, .18);
  cursor: pointer;
  font: inherit;
  text-align: center;
}

.genre-card-small span {
  display: block;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.genre-card-small small {
  margin-top: 18px;
  border-radius: 999px;
  padding: 7px 13px;
  background: #ba7b32;
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.genre-card-small:hover,
.genre-card-small:focus-visible {
  transform: translateY(-3px);
  outline: none;
  filter: brightness(1.04);
}

.genre-popover {
  position: fixed;
  z-index: 35;
  transform: translate(-50%, -100%);
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: rgba(49, 36, 26, .86);
  color: white;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .28);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.book {
  position: relative;
  z-index: 1;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-origin: bottom center;
  transition: transform .18s ease, filter .18s ease;
}

.book:hover,
.book:focus-visible {
  z-index: 5;
  transform: translateY(-10px) rotate(-1.2deg) scale(1.03);
  filter: drop-shadow(0 14px 14px rgba(0, 0, 0, .26));
  outline: none;
}

.book-cover-frame,
.book-spine {
  display: block;
  overflow: hidden;
  border-radius: 3px 5px 2px 2px;
  box-shadow: 5px 0 0 rgba(0, 0, 0, .18), 0 8px 12px rgba(0, 0, 0, .18);
}

.book-cover-frame {
  width: 96px;
  height: 145px;
  background: var(--paper);
}

.book-cover {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 auto;
}

.ranking-block .book:hover .book-cover-frame,
.ranking-block .book:focus-visible .book-cover-frame {
  box-shadow: 6px 0 0 rgba(0, 0, 0, .2), 0 10px 16px rgba(0, 0, 0, .2);
}

.rank-badge {
  position: absolute;
  left: 50%;
  bottom: -22px;
  min-width: 34px;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 6px 9px;
  background: linear-gradient(#2a2a2a, #050505);
  color: #fff8eb;
  font-size: 12px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(54, 26, 5, .32);
  box-shadow: 0 5px 10px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.rank-badge::before {
  display: inline-block;
  margin-right: 2px;
}

.rank-badge.has-rank-image {
  width: 40px;
  height: 28px;
  min-width: 40px;
  padding: 3px 5px;
  overflow: hidden;
}

.rank-badge.has-rank-image::before {
  content: none;
}

.rank-badge.has-rank-image img {
  display: block;
  width: 100%;
  height: auto;
  transform: translateY(-0%);
}

.rank-1 {
  min-width: 40px;
  background: linear-gradient(#ffe78a, #d18a13 55%, #8e520e);
  color: #4a2a06;
}

.rank-1::before {
  content: "金";
}

.rank-2 {
  min-width: 40px;
  background: linear-gradient(#f5f7fb, #b9c0c8 58%, #727a85);
  color: #303743;
}

.rank-2::before {
  content: "銀";
}

.rank-3 {
  min-width: 40px;
  background: linear-gradient(#f2c28a, #b86b2c 56%, #6d3719);
}

.rank-3::before {
  content: "銅";
}

.rank-badge.has-rank-image {
  background: linear-gradient(#2a2a2a, #050505);
  color: #fff8eb;
}

.ranking-block .rank-badge {
  background: linear-gradient(#2a2a2a, #050505);
  color: #fff8eb;
}

.ranking-block {
  margin-right: 18px;
}

.ranking-card-small {
  width: 138px;
  height: 166px;
  background:
    linear-gradient(rgba(255, 253, 247, .96), rgba(255, 239, 199, .94)),
    linear-gradient(90deg, rgba(196, 126, 33, .2), transparent 18%, transparent 82%, rgba(196, 126, 33, .2));
}

.book-spine {
  width: var(--spine-width);
  height: var(--book-height);
  max-width: 55px;
  background: var(--book-color);
  color: var(--label-color);
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 10px;
  line-height: 1.2;
  font-weight: 800;
  padding: 8px 3px;
  text-align: start;
  overflow: hidden;
}

.shelf-spacer {
  min-height: 840px;
  border: 2px dashed rgba(255, 223, 163, .28);
  background:
    linear-gradient(90deg, rgba(72, 35, 12, .2), rgba(173, 103, 38, .18)),
    repeating-linear-gradient(90deg, rgba(255, 223, 163, .1) 0 4px, transparent 4px 60px);
}

.book-spine::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 14px;
  background: rgba(255, 255, 255, .2);
}

.status-bar {
  display: flex;
  justify-content: center;
  gap: 16px;
  color: #fff5e6;
  font-size: 13px;
  font-weight: 800;
  align-items: center;
  background: rgba(255, 250, 243, .94);
  color: #8a725d;
  border: 1px solid rgba(139, 94, 47, .13);
  border-radius: 8px;
  padding: 10px 14px;
}

.status-bar > :not(#statusText):not(.status-help),
.bottom-favorite {
  display: none !important;
}

.status-help {
  color: #9a8068;
  font-size: inherit;
  font-weight: 800;
}

.book-dialog {
  width: min(980px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 25px 80px rgba(0, 0, 0, .42);
  overflow: auto;
}

.book-dialog::backdrop {
  background: rgba(20, 11, 7, .66);
}

.close-button {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #2f2118;
  color: white;
  font-size: 25px;
  cursor: pointer;
}

.book-dialog > .close-button {
  right: auto;
  left: 10px;
}

.dialog-grid {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  gap: 34px;
  padding: 34px;
}

.dialog-cover-wrap {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 430px;
  border-radius: 3px;
  background: #f8f8f8;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.dialog-label-actions {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  display: flex;
  gap: 8px;
  align-items: start;
}

.favorite-toggle,
.purchased-toggle {
  width: 46px;
  height: 46px;
  border: 1px solid rgba(185, 134, 47, .5);
  background: rgba(255, 255, 255, .94);
  color: #b9862f;
  cursor: pointer;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(80, 45, 18, .18);
}

.favorite-toggle {
  border-radius: 50%;
  font-size: 28px;
}

.purchased-toggle {
  width: auto;
  min-width: 82px;
  border-radius: 999px;
  padding: 0 13px;
  color: #7b5c3d;
  font-size: 13px;
  font-weight: 900;
}

.purchased-toggle::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 14px;
  margin-right: 7px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%);
  transform: translateY(2px);
}

.favorite-toggle.active {
  background: #fff4d6;
  color: #d29218;
}

.purchased-toggle.active {
  background: #e7f7ef;
  border-color: rgba(31, 138, 104, .42);
  color: #1f8a68;
}

#dialogCover {
  width: min(225px, 76%);
  max-height: 430px;
  border-radius: 2px;
  object-fit: contain;
  box-shadow: none;
}

.dialog-genre,
.dialog-meta,
.dialog-caption {
  color: var(--muted);
}

.dialog-genre {
  margin: 5px 0 6px;
  font-weight: 900;
  color: var(--accent);
}

.dialog-body h2 {
  margin: 0;
  color: #1f8cff;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.35;
}

.dialog-meta {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 700;
}

.dialog-caption-wrap {
  margin-top: 18px;
}

.dialog-caption {
  margin: 0;
  line-height: 1.8;
  max-height: 118px;
  overflow: hidden;
  white-space: pre-wrap;
}

.dialog-caption.is-expanded {
  max-height: 210px;
  overflow: auto;
  padding-right: 8px;
}

.more-button {
  margin-top: 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-weight: 900;
  padding: 6px 0;
}

.dialog-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.stat-pill {
  border-radius: 999px;
  background: #efe3d1;
  padding: 7px 11px;
  color: #5d4935;
  font-size: 13px;
  font-weight: 800;
}

.book-primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(430px, 100%);
  min-height: 66px;
  border-radius: 8px;
  padding: 0 24px;
  background: #81cad8;
  color: white;
  text-decoration: none;
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 5px 11px rgba(0, 0, 0, .18);
}

.book-primary-link::before {
  content: "📖";
  margin-right: 10px;
}

.kobo-note {
  position: relative;
  width: min(430px, 100%);
  margin-top: 8px;
  padding: 10px 38px 10px 12px;
  border: 1px solid rgba(139, 94, 47, .16);
  border-radius: 8px;
  background: rgba(255, 250, 243, .94);
  color: #6f6257;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.kobo-help {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(139, 94, 47, .28);
  border-radius: 50%;
  background: #fff8ef;
  color: #8b5e2f;
  cursor: help;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.kobo-tooltip {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 8px);
  z-index: 4;
  display: none;
  width: min(280px, 80vw);
  border: 1px solid rgba(139, 94, 47, .22);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffaf3;
  color: #5d4935;
  box-shadow: 0 12px 24px rgba(80, 45, 18, .18);
  font-size: 12px;
  line-height: 1.6;
}

.kobo-tooltip::after {
  content: "";
  position: absolute;
  right: 15px;
  bottom: -7px;
  width: 12px;
  height: 12px;
  background: #fffaf3;
  border-right: 1px solid rgba(139, 94, 47, .22);
  border-bottom: 1px solid rgba(139, 94, 47, .22);
  transform: rotate(45deg);
}

.kobo-help:hover + .kobo-tooltip,
.kobo-help:focus-visible + .kobo-tooltip {
  display: block;
}

.amazon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(430px, 100%);
  min-height: 54px;
  margin-top: 10px;
  border-radius: 8px;
  padding: 0 24px;
  background: #f5a623;
  color: #2f2118;
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 5px 11px rgba(0, 0, 0, .15);
}

.yahoo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(430px, 100%);
  min-height: 54px;
  margin-top: 10px;
  border-radius: 8px;
  padding: 0 24px;
  background: #f03;
  color: white;
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 5px 11px rgba(0, 0, 0, .15);
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 420px;
  color: #fff6e8;
  font-weight: 900;
  font-size: 20px;
}

.genre-list-view {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  background:
    linear-gradient(rgba(255, 248, 232, .86), rgba(255, 238, 205, .84)),
    url("images/background.png") center / cover fixed no-repeat,
    #6c421f;
  color: #3c2d21;
  overflow: auto;
}

.genre-list-view.is-open {
  display: block;
}

.genre-list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 74px;
  padding: 0 28px;
  border-bottom: 1px solid rgba(139, 94, 47, .16);
  background: rgba(255, 250, 243, .96);
  color: #5b3219;
  box-shadow: 0 10px 24px rgba(83, 49, 18, .16);
}

.genre-list-close {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  color: #8b5e2f;
  font-size: 44px;
  line-height: 1;
  cursor: pointer;
}

.genre-list-header h2 {
  margin: 0;
  font-size: 27px;
  line-height: 1.2;
  color: #5b3219;
}

.genre-list-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  padding: 24px 32px 40px;
}

.genre-card {
  position: relative;
  display: grid;
  grid-template-rows: 330px auto auto auto auto;
  min-height: 580px;
  border: 1px solid rgba(139, 94, 47, .16);
  border-radius: 8px;
  padding: 24px;
  background:
    linear-gradient(rgba(255, 253, 247, .98), rgba(255, 246, 231, .96)),
    #fffaf3;
  box-shadow: 0 12px 26px rgba(97, 62, 25, .16);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.genre-card:hover,
.genre-card:focus-visible {
  border-color: rgba(185, 134, 47, .42);
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(80, 45, 18, .22);
  outline: none;
}

.genre-card-cover {
  place-self: center;
  max-width: 220px;
  max-height: 320px;
  object-fit: contain;
}

.genre-card-title {
  margin: 12px 0 6px;
  font-size: 22px;
  line-height: 1.35;
  font-weight: 800;
  color: #3c2d21;
}

.genre-card-meta {
  margin: 0 0 8px;
  color: #6f6257;
  font-size: 15px;
  line-height: 1.6;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.genre-card-link {
  align-self: end;
  justify-self: end;
  color: #0f8f82;
  text-decoration: none;
  font-size: 18px;
  font-weight: 900;
}

.genre-card-amazon {
  justify-self: end;
  color: #b36a00;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
}

.genre-card-yahoo {
  justify-self: end;
  color: #d6002a;
  text-decoration: none;
  font-size: 16px;
  font-weight: 800;
}

.favorite-remove {
  justify-self: end;
  border: 1px solid rgba(139, 94, 47, .2);
  border-radius: 8px;
  background: #fff8ef;
  color: #7b5c3d;
  cursor: pointer;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 900;
}

.purchased-shelf-stage {
  position: relative;
  overflow: visible;
  width: max(var(--stage-width), 100%);
  min-width: max(var(--stage-width), 100%);
}

.purchased-shelf-book {
  z-index: 1;
}

.purchased-shelf-stage.is-editing .purchased-shelf-book {
  cursor: pointer;
  touch-action: none;
}

.purchased-shelf-stage.is-editing .purchased-shelf-book:hover,
.purchased-shelf-stage.is-editing .purchased-shelf-book:focus-visible {
  transform: translateY(-8px) scale(1.02);
}

.purchased-shelf-book.is-selected-for-swap {
  z-index: 20;
  transform: translateY(-10px) scale(1.04);
  filter: drop-shadow(0 16px 16px rgba(0, 0, 0, .28));
}

.purchased-shelf-book.is-selected-for-swap::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 4px solid #0f8f82;
  border-radius: 9px;
  box-shadow: 0 0 0 4px rgba(255, 250, 240, .92), 0 12px 20px rgba(15, 143, 130, .24);
  pointer-events: none;
}

.purchased-cover-frame {
  display: grid;
  place-items: center;
}

.purchased-cover-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 10px;
  background:
    linear-gradient(rgba(255, 253, 247, .96), rgba(255, 244, 219, .94)),
    linear-gradient(90deg, rgba(169, 103, 40, .16), transparent 18%, transparent 82%, rgba(169, 103, 40, .16));
  color: #5f3b19;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
  overflow: hidden;
}

.placeholder-panel,
.favorites-panel {
  min-height: 0;
  overflow: auto;
  border: 1px solid rgba(139, 94, 47, .14);
  border-radius: 8px;
  background: rgba(255, 250, 243, .96);
  padding: 28px;
  box-shadow: 0 14px 34px rgba(97, 62, 25, .12);
}

.placeholder-panel h2,
.favorites-panel h2 {
  margin: 0;
  color: #6a4a2b;
  font-size: 28px;
}

.placeholder-panel p {
  color: #8a725d;
  font-weight: 800;
}

.storage-note {
  margin: -6px 4px 18px;
  color: #7a6048;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.panel-close {
  border: 1px solid rgba(139, 94, 47, .2);
  border-radius: 8px;
  background: white;
  color: #7b5c3d;
  cursor: pointer;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 900;
}

.purchased-edit-toggle.is-active {
  border-color: rgba(107, 66, 31, .55);
  background: #7a4a22;
  color: #fff8ec;
  box-shadow: inset 0 2px 6px rgba(45, 24, 10, .28);
}

.empty-list {
  grid-column: 1 / -1;
  border: 1px dashed rgba(139, 94, 47, .24);
  border-radius: 8px;
  padding: 28px;
  color: #8a725d;
  background: white;
  font-weight: 900;
}

.settings-grid {
  display: grid;
  gap: 16px;
  max-width: 760px;
}

.settings-note {
  margin: 0;
  color: #6f5844;
  font-weight: 800;
  line-height: 1.7;
}

.settings-performance-note {
  margin: -6px 0 0;
  border: 1px solid rgba(186, 123, 50, .24);
  border-radius: 8px;
  background: rgba(255, 250, 243, .72);
  color: #7a6048;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.7;
  padding: 12px 14px;
}

.settings-field {
  display: grid;
  gap: 9px;
  border: 1px solid rgba(139, 94, 47, .18);
  border-radius: 8px;
  background: rgba(255, 248, 239, .86);
  padding: 16px;
}

.settings-field span {
  color: #5f3b20;
  font-weight: 900;
}

.settings-control-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.settings-field select {
  width: min(110px, 100%);
  min-height: 44px;
  border: 1px solid rgba(139, 94, 47, .28);
  border-radius: 8px;
  background: white;
  color: #4a2d17;
  font: inherit;
  font-weight: 900;
  padding: 0 12px;
}

.settings-reset {
  min-height: 44px;
  border: 1px solid rgba(139, 94, 47, .24);
  border-radius: 8px;
  background: #fff;
  color: #7b5c3d;
  cursor: pointer;
  font-weight: 900;
  padding: 0 14px;
}

.settings-field small {
  color: #7a6654;
  font-weight: 700;
  line-height: 1.6;
}

.genre-card-detail {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(139, 94, 47, .2);
  border-radius: 999px;
  background: rgba(255, 248, 239, .95);
  color: #8b5e2f;
  font-size: 22px;
  box-shadow: 0 8px 18px rgba(80, 45, 18, .16);
  cursor: pointer;
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .rail {
    position: sticky;
    top: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
  }

  .rail-nav {
    min-width: 58px;
    min-height: 48px;
    writing-mode: horizontal-tb;
  }

  .bookstore {
    padding: 12px;
    height: auto;
    min-height: 0;
  }

  .favorites-panel {
    padding: 9px;
  }

  .store-header {
    align-items: center;
    flex-direction: column;
    gap: 14px;
  }

  .shelf-hint-button {
    width: 100%;
  }

  .brand-block {
    min-width: 0;
    width: 100%;
    margin-right: 0;
  }

  .search-machine-button {
    flex: none;
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 8px 10px;
  }

  .search-machine-dialog {
    width: calc(100vw - 18px);
    border-radius: 28px;
    padding: 18px 18px 22px;
  }

  .search-machine-panel {
    min-height: 0;
    border-radius: 14px;
    padding: 30px 6px 24px;
    background:
      linear-gradient(180deg, rgba(42, 80, 63, .96) 0 150px, rgba(255, 250, 240, .97) 150px 100%),
      #fffaf0;
  }

  .search-machine-panel::before {
    display: none;
  }

  .search-machine-panel::after {
    position: static;
    display: block;
    margin: 16px 0 0;
    text-align: center;
    font-size: 12px;
  }

  .search-machine-head h2 {
    font-size: 34px;
  }

  .search-machine-fields {
    gap: 14px;
    padding: 22px 16px 18px;
  }

  .search-machine-field {
    grid-template-columns: 1fr;
  }

  .search-machine-actions {
    margin-top: 14px;
    padding: 0;
  }

  .search-machine-submit {
    width: 100%;
    min-width: 0;
  }

  .search-results-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-results-grid {
    justify-items: stretch;
    padding: 4px 0;
  }

  .search-results-grid .genre-card {
    width: auto;
  }

  .genre-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px 8px 24px;
  }

  .genre-list-header {
    gap: 14px;
    min-height: 62px;
    padding: 0 14px;
  }

  .genre-list-close {
    width: 34px;
    height: 34px;
    font-size: 38px;
  }

  .genre-list-header h2 {
    font-size: 21px;
  }

  .genre-card {
    grid-template-rows: 128px auto auto auto auto;
    align-content: start;
    min-width: 0;
    min-height: 284px;
    padding: 8px;
  }

  .genre-card-cover {
    max-width: 86px;
    max-height: 124px;
  }

  .genre-card-title {
    display: -webkit-box;
    height: 35px;
    min-height: 0;
    margin: 6px 0 3px;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .genre-card-meta {
    margin-bottom: 5px;
    font-size: 10px;
  }

  .genre-card-link,
  .genre-card-amazon,
  .genre-card-yahoo {
    justify-self: start;
    font-size: 11px;
    line-height: 1.35;
  }

  .genre-card-link {
    margin-top: 4px;
  }

  .genre-card-detail {
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    font-size: 18px;
  }

  .favorite-remove {
    justify-self: stretch;
    padding: 7px 6px;
    font-size: 11px;
  }

  .view-controls {
    width: 100%;
    justify-content: center;
  }

  .zoom-control {
    box-sizing: border-box;
    width: 100%;
  }

  .stage-scroller {
    height: 100%;
    min-height: 0;
  }

  .stage-wrap {
    height: min(54svh, 560px);
    min-height: 440px;
  }

  .shelf-stage {
    --stage-height: 1010px;
  }

  .shelf-zoom {
    grid-template-rows: repeat(5, 178px);
  }

  .genre-card-small {
    width: 112px;
    height: 146px;
  }

  .genre-card-small span {
    font-size: 15px;
  }

  .shelf-spacer {
    min-height: 820px;
  }

  .dialog-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .dialog-cover-wrap {
    min-height: 250px;
    padding: 36px 12px 14px;
  }

  #dialogCover {
    width: min(165px, 64%);
    max-height: 220px;
  }

  .dialog-label-actions {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  .favorite-toggle,
  .purchased-toggle {
    height: 42px;
  }

  .favorite-toggle {
    width: 42px;
    font-size: 25px;
  }

  .purchased-toggle {
    min-width: 78px;
    padding: 0 11px;
  }

  .book-primary-link {
    min-height: 52px;
    padding: 0 18px;
    font-size: 20px;
  }

  .dialog-meta {
    font-size: 13px;
  }

  .status-bar {
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border: 1px solid rgba(139, 94, 47, .13);
    border-radius: 8px;
    background: rgba(255, 250, 243, .94);
    padding: 10px 14px;
    white-space: nowrap;
  }

  .genre-popover {
    max-width: calc(100vw - 28px);
    font-size: 17px;
    white-space: normal;
  }

  .genre-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px 6px 22px;
  }
}
