:root {
  --ao3: #990000;
  --ao3-deep: #7a0000;
  --ao3-soft: #f4e8e8;
  --ink: #2a2a2a;
  --muted: #666666;
  --line: #dddddd;
  --paper: #ffffff;
  --wash: #f5f5f5;
  --sand: #f9ece1;
  --font-serif: "Libre Baskerville", "Songti SC", "Noto Serif SC", Georgia, serif;
  --font-sans: "Source Sans 3", "PingFang SC", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 18px 40px rgba(40, 0, 0, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background:
    linear-gradient(180deg, #faf7f5 0%, var(--paper) 18%, var(--wash) 100%);
  line-height: 1.65;
}

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

a {
  color: var(--ao3);
  text-decoration: none;
}

button {
  font: inherit;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem clamp(1rem, 4vw, 2.5rem);
  background: #111;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.topbar b {
  color: #8fdb8f;
  font-weight: 600;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ao3);
  flex-shrink: 0;
}

.logo img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  line-height: 1;
}

.logo-text strong {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.logo-url {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.28rem;
  margin: 0;
  padding: 0.12rem 0.45rem 0.12rem 0.35rem;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ao3);
  background: linear-gradient(180deg, #fff8f4, var(--sand));
  border: 1px solid #edd4c4;
  border-radius: 999px;
}

.logo-url::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--ao3);
  box-shadow: 0 0 0 2px rgba(153, 0, 0, 0.12);
}

.logo:hover .logo-url {
  background: var(--ao3);
  border-color: var(--ao3);
  color: #fff;
}

.logo:hover .logo-url::before {
  background: #fff;
  box-shadow: none;
}

.nav {
  display: flex;
  gap: 1.15rem;
  margin-left: auto;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink);
  transition: color 0.2s ease;
}

.nav a:hover {
  color: var(--ao3);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ao3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s var(--ease), background 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary,
.btn-download {
  background: var(--ao3);
  color: #fff;
  box-shadow: 0 8px 18px rgba(153, 0, 0, 0.18);
}

.btn-primary:hover,
.btn-download:hover {
  background: var(--ao3-deep);
  color: #fff;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(2.5rem, 7vh, 4.5rem) clamp(1rem, 4vw, 2.5rem);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--ao3);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.15;
  color: var(--ao3);
}

.hero h1 span {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 400;
}

.lead {
  margin: 0 0 1.5rem;
  max-width: 34rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.reading-desk {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: riseIn 0.8s var(--ease) both;
}

.desk-head,
.desk-list li,
.desk-current {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.desk-head {
  justify-content: space-between;
  padding: 0.85rem 1.1rem;
  background: var(--ao3);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.desk-current {
  padding: 1.15rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.desk-current img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.desk-current h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.desk-current p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.desk-chip {
  margin-left: auto;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: var(--sand);
  color: var(--ao3);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.desk-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.desk-list li {
  padding: 0.95rem 1.1rem;
  border-top: 1px solid #efefef;
}

.desk-list .num {
  width: 2rem;
  color: var(--ao3);
  font-family: var(--font-serif);
  font-weight: 700;
}

.desk-list b {
  display: block;
  font-size: 0.98rem;
}

.desk-list small {
  color: var(--muted);
}

.desk-list em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: #999;
}

.section {
  padding: clamp(3rem, 8vh, 5rem) clamp(1rem, 4vw, 2.5rem);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.section-head small {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--ao3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
}

.section-head p {
  margin: 0;
  max-width: 22rem;
  color: var(--muted);
}

.product {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.product-carousel {
  position: relative;
}

.carousel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.carousel-dots {
  display: flex;
  gap: 0.45rem;
}

.carousel-dots button {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #d0d0d0;
  cursor: pointer;
  transition: width 0.25s ease, background 0.25s ease, border-radius 0.25s ease;
}

.carousel-dots button.is-active {
  width: 22px;
  border-radius: 999px;
  background: var(--ao3);
}

.carousel-nav {
  display: flex;
  gap: 0.45rem;
}

.carousel-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ao3);
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.carousel-btn:hover {
  background: var(--sand);
  border-color: #e2c9b5;
}

.carousel-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.carousel-track {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 0.25rem 0.15rem 1rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: #c9a0a0 transparent;
}

.carousel-track:focus-visible {
  outline: 2px solid var(--ao3);
  outline-offset: 3px;
}

.carousel-track::-webkit-scrollbar {
  height: 6px;
}

.carousel-track::-webkit-scrollbar-thumb {
  background: #d8b4b4;
  border-radius: 999px;
}

.carousel-item {
  margin: 0;
  flex: 0 0 min(72vw, 260px);
  background: var(--wash);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.04);
  scroll-snap-align: start;
}

.carousel-item img {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-height: 420px;
  object-fit: cover;
  object-position: top center;
  background: #fff;
}

.carousel-item figcaption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.95rem;
  background: #fff;
  border-top: 1px solid var(--line);
}

.carousel-item b {
  font-family: var(--font-serif);
}

.carousel-item span {
  color: var(--ao3);
  font-size: 0.85rem;
  font-weight: 700;
}

@media (min-width: 981px) {
  .carousel-item {
    flex-basis: calc((100% - 3rem) / 4);
  }

  .carousel-item img {
    max-height: 480px;
  }
}

.feature-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
  align-items: start;
}

.feature-tabs {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.feature-tabs strong {
  margin-bottom: 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.feature-tabs button {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.feature-tabs button.is-active {
  background: var(--sand);
  color: var(--ao3);
}

.feature-tabs em {
  font-style: normal;
  font-size: 0.8rem;
  color: #999;
}

.feature-tabs button.is-active em {
  color: var(--ao3);
}

.feature-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.feature-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: var(--wash);
}

.feature-panel > header b {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.feature-panel > header span {
  color: var(--muted);
  font-size: 0.9rem;
}

.work-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  padding: 1.1rem 1.15rem;
  border-bottom: 1px solid #efefef;
}

.work-card:last-child {
  border-bottom: 0;
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ao3-soft);
  color: var(--ao3);
  font-family: var(--font-serif);
  font-weight: 700;
}

.work-card h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--ao3);
}

.work-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.tags span {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: #555;
}

.meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  min-width: 6.5rem;
  text-align: right;
  font-size: 0.82rem;
  color: var(--muted);
}

.meta b {
  color: var(--ink);
}

.meta em {
  font-style: normal;
  color: var(--ao3);
  font-weight: 600;
}

.searches {
  background: #fff;
  border-top: 1px solid var(--line);
}

.search-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.search-grid article {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, #faf7f5);
}

.search-grid span {
  color: var(--ao3);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.search-grid h3 {
  margin: 0.55rem 0 0.45rem;
  font-family: var(--font-serif);
  font-size: 1.15rem;
}

.search-grid p {
  margin: 0;
  color: var(--muted);
  min-height: 3rem;
}

.search-grid footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #eee;
  color: var(--muted);
  font-size: 0.88rem;
}

.search-grid b {
  color: var(--ao3);
}

/* Reviews */
.reviews {
  border-top: 1px solid var(--line);
  background: var(--wash);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
}

.review-no {
  color: var(--ao3);
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.review-card > p {
  margin: 0;
  flex: 1;
  color: #444;
  font-size: 0.96rem;
  line-height: 1.7;
}

.review-card > p a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.review-card footer {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding-top: 0.85rem;
  border-top: 1px solid #efefef;
}

.review-card .avatar {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.review-card b {
  display: block;
  font-size: 0.92rem;
  color: var(--ink);
}

.review-card time {
  color: var(--muted);
  font-size: 0.78rem;
}

.faq-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 1.25rem;
  align-items: start;
}

.faq-list details {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 0.7rem;
  padding: 0.2rem 1rem 0.2rem;
}

.faq-list summary {
  cursor: pointer;
  list-style: none;
  padding: 0.95rem 0;
  font-family: var(--font-serif);
  font-size: 1.05rem;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary span {
  display: inline-block;
  margin-right: 0.55rem;
  color: var(--ao3);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 700;
}

.faq-list p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.faq-cta {
  padding: 1.5rem;
  border-radius: 16px;
  background: var(--ao3);
  color: #fff;
  text-align: center;
  box-shadow: var(--shadow);
}

.faq-cta img {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.faq-cta h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-serif);
  font-size: 1.4rem;
}

.faq-cta p {
  margin: 0 0 1.2rem;
  color: rgba(255, 255, 255, 0.82);
}

.faq-cta .btn-primary {
  background: #fff;
  color: var(--ao3);
  box-shadow: none;
}

.faq-cta .btn-primary:hover {
  background: var(--sand);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 2rem;
  border-top: 1px solid var(--line);
  background: #111;
  color: rgba(255, 255, 255, 0.7);
}

.footer-brand {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.footer-brand img {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #fff;
}

.footer-brand strong {
  display: block;
  color: #fff;
  font-family: var(--font-serif);
}

.footer-brand p,
.site-footer > p {
  margin: 0;
  font-size: 0.88rem;
}

.site-footer a {
  color: #ffb3b3;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .hero,
  .feature-layout,
  .faq-layout,
  .search-grid {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .meta {
    grid-column: 2;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
  }
}

@media (max-width: 760px) {
  .nav,
  .header-actions {
    display: none;
  }

  .nav.open {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(78vw, 300px);
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 4.5rem 0 1rem;
    background: #fff;
    border-left: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 45;
  }

  .nav.open a {
    padding: 0.95rem 1.35rem;
    border-top: 1px solid #f0f0f0;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
    z-index: 46;
  }

  .desk-current {
    flex-wrap: wrap;
  }

  .desk-chip {
    margin-left: 0;
  }
}

@media (max-width: 560px) {
  .review-grid {
    grid-template-columns: 1fr;
  }

  .carousel-item {
    flex-basis: min(78vw, 240px);
  }

  .carousel-item img {
    max-height: 360px;
  }

  .topbar {
    flex-direction: column;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reading-desk,
  .carousel-track {
    scroll-behavior: auto;
  }

  .carousel-item {
    transition: none;
  }
}
