:root {
  color-scheme: light;
  --bg: #f7f7f3;
  --panel: #ffffff;
  --panel-muted: #f1f1ec;
  --ink: #1f1f1b;
  --muted: #686862;
  --faint: #92928a;
  --line: #deded8;
  --line-strong: #c9c9c1;
  --black: #202018;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
}

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

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 10;
  transform: translateY(-140%);
  background: var(--black);
  color: var(--panel);
  padding: 0.65rem 0.85rem;
  text-decoration: none;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  border-bottom: 1px solid rgba(31, 31, 27, 0.08);
  background: rgba(247, 247, 243, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner,
.section-shell {
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 60px;
  gap: 1rem;
}

.brand,
.site-nav {
  display: inline-flex;
  align-items: center;
}

.brand {
  gap: 0.5rem;
  justify-self: start;
  font-weight: 680;
  text-decoration: none;
}

.brand-mark {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--black);
  transform: rotate(45deg);
}

.site-nav {
  justify-self: center;
  gap: clamp(1rem, 3vw, 2rem);
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav a {
  text-decoration: none;
}

.site-nav a:hover,
.brand:hover {
  color: var(--ink);
}

.current-section {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(3.5rem, 8vw, 6rem);
}

.up-next-section,
.history-section {
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1,
h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 520;
  line-height: 1.08;
}

h3 {
  font-size: 1rem;
  font-weight: 620;
  line-height: 1.25;
}

.current-layout {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.current-book {
  display: grid;
  grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
  gap: clamp(1.2rem, 3vw, 2.3rem);
  align-items: center;
  padding: clamp(1.2rem, 4vw, 2.4rem);
  border-right: 1px solid var(--line);
}

.cover-frame,
.history-cover {
  overflow: hidden;
  border: 1px solid rgba(31, 31, 27, 0.12);
  border-radius: 6px;
  background: var(--panel-muted);
}

.cover-frame {
  width: 100%;
  max-width: 190px;
  aspect-ratio: 2 / 3;
}

.cover-frame img,
.history-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.current-copy {
  max-width: 460px;
}

.current-copy h2 {
  margin-bottom: 0.6rem;
  font-size: clamp(1.8rem, 4.2vw, 3.15rem);
  font-weight: 560;
  line-height: 1.04;
}

.byline {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.book-meta,
.history-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.book-meta {
  margin: 1.25rem 0 1rem;
}

.meta-tile,
.history-stat {
  min-height: 31px;
  padding: 0.4rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  font-size: 0.86rem;
}

.meta-label,
.history-stat .history-label {
  display: none;
}

.book-description {
  max-width: 38rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.45;
}

.history-label,
.slot-label,
.book-detail-label {
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 680;
  letter-spacing: 0;
  text-transform: uppercase;
}

.book-links-panel {
  padding: clamp(1.2rem, 3vw, 1.6rem);
  background: #fbfbf8;
}

.book-links-panel h2 {
  margin: 0 0 1.1rem;
  font-size: 1rem;
  font-weight: 620;
}

.book-details {
  display: grid;
  gap: 0.75rem;
  margin: 0 0 1.3rem;
  padding: 0 0 1.3rem;
  border-bottom: 1px solid var(--line);
}

.book-detail {
  display: grid;
  gap: 0.2rem;
}

.book-detail-value {
  color: var(--ink);
  font-size: 0.94rem;
}

.book-links-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.book-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 28px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.2;
  text-decoration: none;
}

.book-link::after {
  content: ">";
  color: var(--faint);
  font-size: 0.86rem;
}

.book-link:hover {
  color: var(--muted);
}

.carousel-actions {
  display: flex;
  gap: 0.5rem;
}

.carousel-button {
  min-height: 32px;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.84rem;
  line-height: 1.15;
}

.carousel-button:hover {
  border-color: var(--ink);
  background: var(--panel-muted);
}

.up-next-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 31%);
  gap: 0;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--panel);
  scroll-snap-type: x mandatory;
  scrollbar-color: var(--line-strong) transparent;
}

.nomination-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 170px;
  padding: 1rem 1.1rem;
  border-right: 1px solid var(--line);
  scroll-snap-align: start;
}

.nomination-card h3 {
  margin-top: 0.6rem;
}

.nomination-card p {
  margin: 0.75rem 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.slot-chip {
  align-self: flex-start;
  margin-top: 1.1rem;
  color: var(--faint);
  font-size: 0.84rem;
}

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

.history-card {
  min-width: 0;
}

.history-cover {
  aspect-ratio: 2 / 3;
}

.history-body {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 0 0;
}

.history-card h3 {
  margin-top: 0.25rem;
  font-size: clamp(1.12rem, 2.4vw, 1.55rem);
}

.history-author {
  margin: 0.28rem 0 0;
  color: var(--muted);
}

.history-stat strong {
  font-weight: 520;
}

@media (max-width: 860px) {
  .current-layout {
    grid-template-columns: 1fr;
  }

  .current-book {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .up-next-track {
    grid-auto-columns: minmax(250px, 48%);
  }
}

@media (max-width: 640px) {
  .header-inner {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 0.85rem 0;
  }

  .site-nav {
    justify-self: start;
    gap: 1rem;
    font-size: 0.88rem;
  }

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

  .cover-frame {
    max-width: 150px;
  }

  .section-heading {
    align-items: start;
  }

  .up-next-track {
    grid-auto-columns: minmax(240px, 84%);
  }

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