:root {
  --ink: #18312c;
  --ink-soft: #41554f;
  --paper: #f3eee3;
  --paper-deep: #e8dfcf;
  --cream: #fbf8f0;
  --rust: #9a4636;
  --gold: #b98a4b;
  --sage: #71816b;
  --line: rgba(24, 49, 44, 0.18);
  --shadow: 0 28px 70px rgba(36, 38, 30, 0.18);
  --serif: "Noto Serif SC", "Songti SC", STSong, SimSun, Georgia, serif;
  --sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 6%, rgba(185, 138, 75, 0.12), transparent 26rem),
    var(--paper);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  content: "";
  pointer-events: none;
  opacity: 0.25;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(154, 70, 54, 0.55);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 8px 12px;
  color: var(--cream);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.announcement {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 9px 20px;
  color: var(--cream);
  background: var(--ink);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.site-header {
  display: flex;
  position: relative;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
  padding: 22px 0 18px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 39px;
  height: 39px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 22px;
  font-style: italic;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-copy strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 9px;
  font-style: italic;
  letter-spacing: 0.1em;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.header-actions,
.checkout-header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.order-shortcut {
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: none;
}

.order-shortcut:hover {
  color: var(--ink);
}

.desktop-nav a {
  position: relative;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.desktop-nav a::after {
  position: absolute;
  right: 0;
  bottom: -7px;
  left: 0;
  height: 1px;
  content: "";
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 220ms ease;
}

.desktop-nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0 9px 14px;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.cart-count {
  display: grid;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border-radius: 100px;
  color: var(--cream);
  background: var(--rust);
  place-items: center;
  font-size: 11px;
}

.hero {
  display: grid;
  position: relative;
  overflow: hidden;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  width: min(1240px, calc(100% - 56px));
  min-height: 700px;
  margin: 0 auto;
  padding: 78px 0 70px;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 670px;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(45px, 5.4vw, 76px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.22;
}

.hero-intro {
  max-width: 520px;
  margin: 26px 0 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.9;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition:
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: var(--cream);
  background: var(--ink);
}

.button-primary:hover {
  background: #274840;
}

.button-light {
  color: var(--ink);
  background: var(--cream);
}

.text-link {
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.text-link span {
  margin-left: 5px;
}

.hero-notes {
  display: flex;
  gap: 0;
  margin: 50px 0 0;
}

.hero-notes div {
  min-width: 112px;
  padding: 0 24px;
  border-left: 1px solid var(--line);
}

.hero-notes div:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-notes dt {
  font-family: Georgia, serif;
  font-size: 27px;
  font-style: italic;
}

.hero-notes dd {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.hero-art {
  position: relative;
  min-height: 550px;
}

.hero-art::before {
  position: absolute;
  top: 50%;
  left: 53%;
  width: 430px;
  height: 430px;
  border-radius: 50%;
  content: "";
  background: rgba(232, 223, 207, 0.65);
  transform: translate(-50%, -50%);
}

.hero-orbit {
  position: absolute;
  top: 50%;
  left: 53%;
  border: 1px solid rgba(24, 49, 44, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.orbit-one {
  width: 520px;
  height: 520px;
}

.orbit-two {
  width: 610px;
  height: 610px;
}

.floating-book {
  position: absolute;
  margin: 0;
  filter: drop-shadow(0 24px 20px rgba(42, 36, 28, 0.2));
  animation: book-float 6s ease-in-out infinite;
}

.floating-book img {
  border-radius: 2px 6px 6px 2px;
}

.book-one {
  z-index: 3;
  top: 105px;
  left: 22%;
  width: 218px;
  transform: rotate(-8deg);
}

.book-two {
  z-index: 4;
  top: 65px;
  right: 8%;
  width: 227px;
  animation-delay: -2s;
  transform: rotate(7deg);
}

.book-three {
  z-index: 2;
  right: 25%;
  bottom: 44px;
  width: 210px;
  animation-delay: -4s;
  transform: rotate(-2deg);
}

.art-caption {
  position: absolute;
  right: -3px;
  bottom: 75px;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.18em;
  writing-mode: vertical-rl;
}

@keyframes book-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}

.marquee {
  overflow: hidden;
  padding: 15px 0;
  border-top: 1px solid rgba(251, 248, 240, 0.15);
  border-bottom: 1px solid rgba(251, 248, 240, 0.15);
  color: var(--cream);
  background: var(--ink);
}

.marquee div {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: max-content;
  gap: 24px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.15em;
}

.marquee i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.section {
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
}

.books-section {
  padding: 120px 0 105px;
}

.section-heading {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: end;
  margin-bottom: 55px;
}

.section-heading h2,
.shipping-card h2,
.closing-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 4.2vw, 62px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.section-heading > p {
  max-width: 440px;
  margin: 0 0 5px auto;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--line);
  background: rgba(251, 248, 240, 0.56);
  transition:
    box-shadow 250ms ease,
    transform 250ms ease;
}

.product-card:hover {
  box-shadow: 0 18px 44px rgba(36, 41, 31, 0.1);
  transform: translateY(-5px);
}

.product-visual {
  display: grid;
  position: relative;
  overflow: hidden;
  min-height: 430px;
  padding: 44px 52px;
  place-items: center;
}

.product-anna .product-visual {
  background: #dfd4c4;
}

.product-razor .product-visual {
  background: #cdd5cf;
}

.product-golden .product-visual {
  background: #ead5ae;
}

.product-generic .product-visual {
  background: #d8ddd5;
}

.product-visual::before,
.product-visual::after {
  position: absolute;
  border: 1px solid rgba(24, 49, 44, 0.12);
  border-radius: 50%;
  content: "";
}

.product-visual::before {
  top: -90px;
  right: -90px;
  width: 260px;
  height: 260px;
}

.product-visual::after {
  bottom: -120px;
  left: -100px;
  width: 300px;
  height: 300px;
}

.product-visual img {
  position: relative;
  z-index: 2;
  width: 205px;
  filter: drop-shadow(0 20px 16px rgba(42, 36, 28, 0.18));
  transition: transform 300ms ease;
}

.product-card:hover .product-visual img {
  transform: rotate(-2deg) translateY(-5px);
}

.volume-no {
  position: absolute;
  top: 23px;
  left: 24px;
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.theme-tag {
  position: absolute;
  right: 22px;
  bottom: 20px;
  font-size: 10px;
  letter-spacing: 0.15em;
}

.product-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px 26px 24px;
}

.product-author {
  margin: 0 0 5px;
  color: var(--rust);
  font-size: 11px;
  letter-spacing: 0.09em;
}

.product-copy h3 {
  margin: 0 0 15px;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
}

.product-copy h3 a {
  color: inherit;
  text-decoration: none;
}

.book-detail-main {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: 62px 0 90px;
}

.book-detail-loading {
  padding: 100px 20px;
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
}

.book-detail {
  display: grid;
  grid-template-columns: minmax(300px, 0.85fr) minmax(0, 1.15fr);
  gap: 70px;
  align-items: center;
}

.book-detail-gallery {
  padding: 45px;
  background: var(--paper-deep);
}

.book-detail-cover-frame {
  display: grid;
  min-height: 480px;
  place-items: center;
}

.book-detail-cover-frame img {
  width: min(280px, 80%);
  filter: drop-shadow(0 24px 18px rgba(42, 36, 28, 0.22));
}

.book-detail-thumbs {
  display: flex;
  overflow-x: auto;
  gap: 10px;
  margin-top: 24px;
}

.book-detail-thumbs button {
  width: 54px;
  height: 62px;
  overflow: hidden;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}

.book-detail-thumbs button:hover {
  border-color: var(--ink);
}

.book-detail-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-detail-copy h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 76px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
}

.book-detail-author {
  margin: 0 0 12px;
  color: var(--rust);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.book-detail-isbn {
  margin: 10px 0 0;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 11px;
}

.book-detail-description {
  margin: 30px 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 2;
}

.book-detail-description p {
  margin: 0 0 15px;
}

.book-detail-buy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 23px;
  border-top: 1px solid var(--line);
}

.book-detail-buy strong {
  font-family: Georgia, serif;
  font-size: 30px;
  font-weight: 400;
}

.book-detail-state {
  padding: 100px 20px;
  text-align: center;
}

.book-detail-state h1 {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 500;
}

.book-detail-state p:not(.eyebrow) {
  color: var(--ink-soft);
}

.book-preview-videos {
  margin-top: 75px;
  padding-top: 50px;
  border-top: 1px solid var(--line);
}

.book-preview-videos h2 {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 500;
}

.book-video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.book-video-item {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--cream);
}

.book-video-item video {
  display: block;
  width: 100%;
  max-height: 380px;
  background: #101916;
}

.book-video-item figcaption {
  padding-top: 9px;
  color: var(--ink-soft);
  font-size: 10px;
}

.product-description {
  min-height: 100px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.price {
  font-family: Georgia, serif;
  font-size: 20px;
}

.price small {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.test-price-note {
  margin: 15px 0 0;
  padding: 9px 11px;
  color: #773d29;
  background: rgba(185, 138, 75, 0.13);
  font-size: 10px;
  line-height: 1.6;
}

.add-button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.add-button span {
  display: grid;
  width: 27px;
  height: 27px;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  transition:
    background 180ms ease,
    color 180ms ease;
}

.add-button:hover span {
  color: var(--cream);
  background: var(--ink);
}

.cover-disclaimer {
  margin: 18px 0 0;
  color: rgba(24, 49, 44, 0.58);
  font-size: 10px;
  text-align: right;
}

.editorial {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 105px 0;
  border-top: 1px solid var(--line);
}

.editorial-quote {
  padding-right: 80px;
}

blockquote {
  margin: 35px 0 0;
  font-family: var(--serif);
  font-size: clamp(34px, 3.5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.45;
}

.editorial-copy {
  max-width: 530px;
  padding: 38px 0 0 80px;
  border-left: 1px solid var(--line);
}

.editorial-copy p {
  margin: 0 0 22px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.95;
}

.editorial-copy .dropcap {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.9;
}

.dropcap::first-letter {
  float: left;
  margin: 5px 8px 0 0;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 62px;
  line-height: 0.8;
}

.editorial-lines {
  display: flex;
  justify-content: space-between;
  margin-top: 45px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
  letter-spacing: 0.08em;
}

.shipping-section {
  padding: 20px 0 105px;
}

.shipping-card {
  display: grid;
  grid-template-columns: 0.6fr 1.4fr;
  overflow: hidden;
  align-items: center;
  background: var(--paper-deep);
}

.shipping-number {
  padding: 55px;
  color: var(--cream);
  background: var(--rust);
  font-family: Georgia, serif;
  font-size: clamp(72px, 8vw, 120px);
  font-style: italic;
  line-height: 1;
  text-align: center;
}

.shipping-card > div:last-child {
  padding: 62px 70px;
}

.shipping-card .eyebrow {
  color: var(--ink-soft);
}

.shipping-card h2 {
  font-size: clamp(34px, 3.5vw, 48px);
}

.shipping-card p:last-child {
  max-width: 570px;
  margin: 19px 0 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.9;
}

.shipping-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.shipping-steps div {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 16px;
  padding: 28px 30px;
  border-left: 1px solid var(--line);
}

.shipping-steps div:first-child {
  border-left: 0;
}

.shipping-steps span {
  grid-row: 1 / 3;
  color: var(--rust);
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
}

.shipping-steps strong {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
}

.shipping-steps small {
  color: var(--ink-soft);
  font-size: 11px;
}

.closing-section {
  padding: 110px 40px;
  color: var(--cream);
  background:
    radial-gradient(circle at 27% 30%, rgba(185, 138, 75, 0.23), transparent 23rem),
    var(--ink);
  text-align: center;
}

.closing-section .eyebrow {
  color: #c9a46f;
}

.closing-section h2 {
  margin-bottom: 32px;
  font-size: clamp(40px, 6vw, 72px);
}

.site-footer {
  display: grid;
  grid-template-columns: 1.1fr 1fr auto;
  gap: 20px;
  align-items: center;
  width: min(1240px, calc(100% - 56px));
  margin: 0 auto;
  padding: 45px 0 20px;
}

.brand-footer .brand-mark {
  width: 33px;
  height: 33px;
  font-size: 18px;
}

.site-footer > p {
  color: var(--ink-soft);
  font-size: 11px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a {
  color: var(--ink-soft);
  font-size: 11px;
  text-decoration: none;
}

.copyright {
  grid-column: 1 / -1;
  padding-top: 17px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 10px;
  font-style: italic;
}

.cart-dialog {
  width: min(480px, calc(100% - 24px));
  max-height: min(760px, calc(100dvh - 30px));
  padding: 0;
  border: 0;
  color: var(--ink);
  background: var(--cream);
  box-shadow: var(--shadow);
}

.cart-dialog::backdrop {
  background: rgba(12, 25, 22, 0.58);
  backdrop-filter: blur(3px);
}

.cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 30px 22px;
  border-bottom: 1px solid var(--line);
}

.cart-head .eyebrow {
  margin-bottom: 8px;
}

.cart-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 500;
}

.dialog-close {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-size: 20px;
}

.cart-body {
  min-height: 150px;
  max-height: 450px;
  overflow-y: auto;
  padding: 8px 30px;
}

.empty-cart {
  padding: 55px 16px;
  color: var(--ink-soft);
  text-align: center;
}

.empty-cart strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.cart-item {
  display: grid;
  grid-template-columns: 62px 1fr auto;
  gap: 15px;
  align-items: center;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.cart-item img {
  width: 54px;
  box-shadow: 0 7px 12px rgba(35, 30, 24, 0.16);
}

.cart-item h3 {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
}

.cart-item small {
  color: var(--ink-soft);
}

.cart-item-side {
  text-align: right;
}

.cart-item-side > strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 15px;
}

.quantity {
  display: inline-flex;
  overflow: hidden;
  align-items: center;
  margin-top: 7px;
  border: 1px solid var(--line);
}

.quantity button {
  width: 25px;
  height: 25px;
  border: 0;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.quantity span {
  min-width: 20px;
  font-size: 11px;
  text-align: center;
}

.cart-foot {
  padding: 20px 30px 30px;
  border-top: 1px solid var(--line);
}

.cart-totals {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3px;
  margin-bottom: 18px;
  font-size: 13px;
}

.cart-totals small {
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: 10px;
}

.cart-checkout {
  width: 100%;
}

.toast {
  position: fixed;
  z-index: 90;
  right: 28px;
  bottom: 28px;
  padding: 12px 18px;
  color: var(--cream);
  background: var(--ink);
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(15px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Checkout */
.checkout-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 15%, rgba(185, 138, 75, 0.11), transparent 25rem),
    var(--paper);
}

.checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.back-link {
  color: var(--ink-soft);
  font-size: 12px;
  text-decoration: none;
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.13fr) minmax(340px, 0.87fr);
  gap: 70px;
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
  padding: 58px 0 80px;
}

.checkout-form-wrap h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4.6vw, 56px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.checkout-lede {
  margin: 13px 0 35px;
  color: var(--ink-soft);
  font-size: 13px;
}

.customer-orders-main {
  width: min(900px, calc(100% - 48px));
  margin: 0 auto;
  padding: 68px 0 90px;
}

.customer-orders-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.customer-orders-heading h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 500;
  letter-spacing: -0.04em;
}

.customer-orders-heading p:last-child {
  max-width: 330px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.7;
}

.customer-order-state {
  padding: 70px 24px;
  text-align: center;
}

.customer-order-state-mark {
  display: grid;
  width: 60px;
  height: 60px;
  margin: 0 auto 20px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--rust);
  place-items: center;
  font-family: Georgia, serif;
  font-size: 26px;
  font-style: italic;
}

.customer-order-state h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 500;
}

.customer-order-state p {
  color: var(--ink-soft);
  font-size: 12px;
}

.customer-order-card {
  margin-top: 30px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 240, 0.72);
}

.customer-order-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 26px 28px;
  border-bottom: 1px solid var(--line);
}

.customer-order-summary h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
}

.customer-order-summary p {
  margin: 5px 0 0;
  color: var(--ink-soft);
  font-family: Georgia, serif;
  font-size: 11px;
}

.customer-order-summary-side {
  text-align: right;
}

.customer-order-summary-side strong {
  display: block;
  font-family: Georgia, serif;
  font-size: 28px;
  font-weight: 400;
}

.customer-order-status {
  display: inline-flex;
  margin-top: 8px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 10px;
}

.customer-order-status.is-paid {
  color: #386a43;
  border-color: rgba(56, 106, 67, 0.3);
  background: rgba(56, 106, 67, 0.07);
}

.customer-order-status.is-failed {
  color: #8e3b2d;
  border-color: rgba(142, 59, 45, 0.3);
  background: rgba(142, 59, 45, 0.07);
}

.customer-order-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.customer-order-section {
  padding: 25px 28px;
}

.customer-order-section + .customer-order-section {
  border-left: 1px solid var(--line);
}

.customer-order-section h3 {
  margin: 0 0 15px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.customer-order-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 7px 0;
  font-size: 13px;
}

.customer-order-line span:last-child {
  white-space: nowrap;
}

.customer-order-field {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 10px;
  padding: 5px 0;
  font-size: 11px;
}

.customer-order-field dt {
  color: var(--ink-soft);
}

.customer-order-field dd {
  margin: 0;
}

.customer-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 28px;
  border-top: 1px solid var(--line);
}

.customer-order-actions p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 10px;
}

.customer-order-actions .button {
  min-height: 42px;
}

.customer-order-loading {
  display: grid;
  min-height: 320px;
  place-items: center;
  color: var(--ink-soft);
  font-size: 12px;
}

.form-section {
  margin-top: 28px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.form-section-title span {
  display: grid;
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 50%;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 11px;
  font-style: italic;
}

.form-section-title h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(251, 248, 240, 0.65);
  font-size: 14px;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--ink);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(24, 49, 44, 0.08);
}

.field-hint {
  color: var(--ink-soft);
  font-size: 10px;
}

.checkout-submit {
  width: 100%;
  margin-top: 28px;
}

.checkout-submit:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.form-message {
  display: none;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(154, 70, 54, 0.25);
  color: #7c3024;
  background: rgba(154, 70, 54, 0.07);
  font-size: 12px;
}

.form-message.is-visible {
  display: block;
}

.checkout-summary {
  position: sticky;
  top: 28px;
  align-self: start;
  padding: 28px;
  border: 1px solid var(--line);
  background: rgba(251, 248, 240, 0.65);
}

.summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.summary-head h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.summary-head a {
  color: var(--ink-soft);
  font-size: 11px;
}

.summary-items {
  padding: 10px 0;
}

.summary-item {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 11px 0;
}

.summary-item img {
  width: 42px;
  box-shadow: 0 5px 9px rgba(35, 30, 24, 0.15);
}

.summary-item strong {
  display: block;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.summary-item small {
  color: var(--ink-soft);
  font-size: 10px;
}

.summary-item > span {
  font-family: Georgia, serif;
  font-size: 13px;
}

.summary-lines {
  padding: 14px 0 17px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-line {
  display: flex;
  justify-content: space-between;
  padding: 5px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.summary-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-top: 13px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.summary-total strong {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
}

.summary-note {
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 10px;
  line-height: 1.7;
}

.checkout-empty {
  grid-column: 1 / -1;
  padding: 90px 20px;
  text-align: center;
}

.checkout-empty h1 {
  font-family: var(--serif);
  font-size: 45px;
  font-weight: 500;
}

.order-result {
  display: none;
  grid-column: 1 / -1;
  width: min(640px, 100%);
  margin: 60px auto;
  padding: 52px;
  border: 1px solid var(--line);
  background: var(--cream);
  text-align: center;
}

.order-result.is-visible {
  display: block;
}

.order-result-mark {
  display: grid;
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  border: 1px solid var(--ink);
  border-radius: 50%;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 26px;
  font-style: italic;
}

.order-result h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 500;
}

.order-result p {
  color: var(--ink-soft);
  font-size: 13px;
}

.order-result .button {
  margin-top: 16px;
}

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr 0.9fr;
  }

  .hero h1 {
    font-size: 56px;
  }

  .hero-art {
    transform: scale(0.86);
    transform-origin: center right;
  }

  .book-grid {
    gap: 16px;
  }

  .product-visual {
    min-height: 370px;
    padding: 45px 30px;
  }

  .product-visual img {
    width: 170px;
  }
}

@media (max-width: 820px) {
  .desktop-nav {
    display: none;
  }

  .site-header,
  .hero,
  .section,
  .site-footer {
    width: min(100% - 34px, 640px);
  }

  .hero {
    display: block;
    min-height: auto;
    padding: 55px 0 20px;
  }

  .hero h1 {
    font-size: clamp(42px, 11vw, 61px);
  }

  .hero-art {
    min-height: 500px;
    margin-top: 20px;
    transform: none;
  }

  .section-heading {
    display: block;
  }

  .section-heading > p {
    margin: 20px 0 0;
  }

  .book-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
  }

  .product-visual {
    min-height: 100%;
  }

  .product-footer {
    margin-top: auto;
  }

  .editorial {
    grid-template-columns: 1fr;
    padding: 80px 0;
  }

  .editorial-quote {
    padding-right: 0;
  }

  .editorial-copy {
    max-width: none;
    margin-top: 40px;
    padding: 40px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .shipping-card {
    grid-template-columns: 1fr;
  }

  .shipping-number {
    padding: 35px;
  }

  .shipping-card > div:last-child {
    padding: 39px 30px;
  }

  .shipping-steps {
    grid-template-columns: 1fr;
  }

  .shipping-steps div,
  .shipping-steps div:first-child {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .site-footer > p {
    text-align: left;
  }

  .copyright {
    width: 100%;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
    gap: 38px;
    padding-top: 40px;
  }

  .checkout-summary {
    position: static;
    grid-row: 1;
  }

  .book-detail-main {
    width: calc(100% - 34px);
    padding-top: 42px;
  }

  .book-detail {
    grid-template-columns: 1fr;
    gap: 38px;
  }

  .book-detail-gallery {
    padding: 30px;
  }

  .book-detail-cover-frame {
    min-height: 390px;
  }

  .book-video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .announcement {
    gap: 7px;
    padding-inline: 8px;
    font-size: 9px;
    letter-spacing: 0.06em;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 15px;
  }

  .cart-trigger {
    padding-left: 0;
    font-size: 12px;
  }

  .header-actions {
    gap: 12px;
  }

  .order-shortcut {
    font-size: 11px;
  }

  .checkout-header-actions {
    gap: 12px;
  }

  .book-detail-main {
    width: calc(100% - 30px);
  }

  .book-detail-gallery {
    padding: 22px;
  }

  .book-detail-cover-frame {
    min-height: 340px;
  }

  .book-detail-cover-frame img {
    width: min(220px, 78%);
  }

  .book-detail-copy h1 {
    font-size: 43px;
  }

  .book-detail-buy {
    align-items: flex-start;
    flex-direction: column;
  }

  .customer-orders-main {
    width: calc(100% - 30px);
    padding-top: 45px;
  }

  .customer-orders-heading {
    display: block;
  }

  .customer-orders-heading p:last-child {
    margin-top: 15px;
  }

  .customer-order-summary,
  .customer-order-body {
    grid-template-columns: 1fr;
  }

  .customer-order-section + .customer-order-section {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .hero {
    padding-top: 43px;
  }

  .hero h1 {
    font-size: 43px;
  }

  .hero-intro {
    font-size: 14px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .hero-notes {
    margin-top: 35px;
  }

  .hero-notes div {
    min-width: 0;
    flex: 1;
    padding: 0 12px;
  }

  .hero-notes dt {
    font-size: 23px;
  }

  .hero-art {
    min-height: 420px;
    margin-inline: -20px;
  }

  .hero-art::before {
    width: 310px;
    height: 310px;
  }

  .orbit-one {
    width: 370px;
    height: 370px;
  }

  .orbit-two {
    width: 430px;
    height: 430px;
  }

  .book-one {
    top: 90px;
    left: 8%;
    width: 160px;
  }

  .book-two {
    top: 60px;
    right: 3%;
    width: 168px;
  }

  .book-three {
    right: 30%;
    bottom: 25px;
    width: 150px;
  }

  .art-caption {
    display: none;
  }

  .marquee div {
    justify-content: flex-start;
    padding-left: 20px;
  }

  .books-section {
    padding: 80px 0 75px;
  }

  .product-card {
    display: flex;
  }

  .product-visual {
    min-height: 360px;
  }

  .product-description {
    min-height: auto;
  }

  .closing-section {
    padding: 80px 23px;
  }

  .site-footer {
    padding-top: 35px;
  }

  .footer-links {
    flex-wrap: wrap;
  }

  .cart-dialog {
    width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
  }

  .cart-foot,
  .cart-head {
    padding-inline: 22px;
  }

  .cart-body {
    padding-inline: 22px;
  }

  .checkout-header,
  .checkout-layout {
    width: calc(100% - 30px);
  }

  .checkout-summary {
    padding: 21px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }

  .order-result {
    padding: 35px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
