:root {
  --pattern-bows: url("assets/brand/holiday-bow-paper.webp");
  --ornament-bow: url("assets/brand/ribbon-ornament.webp");
  --gift-shadow: 0 8px 28px rgba(83, 45, 44, .07);
}

body {
  position: relative;
  isolation: isolate;
  background: var(--paper);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(247, 241, 232, .62), rgba(247, 241, 232, .62)),
    var(--pattern-bows);
  background-size: auto, 840px auto;
  background-position: center top;
  filter: blur(8px);
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(83, 45, 44, .04);
}

.brand-mark {
  width: 48px;
  height: 32px;
  object-fit: contain;
}

.hero {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  gap: 32px;
}

.hero-copy {
  min-width: 0;
  position: relative;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--gift-shadow);
}

.hero-copy::before {
  content: "";
  position: absolute;
  top: -24px;
  left: calc(50% - 44px);
  width: 88px;
  height: 48px;
  background: var(--ornament-bow) center / contain no-repeat;
  pointer-events: none;
}

.hero h1 { color: var(--accent); }
.hero-facts div, .math-facts p, .value-layout > div, .purchase-layout > div { min-width: 0; }
.hero-facts dt, .math-facts span { overflow-wrap: anywhere; }
.math-facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); }
.calculator-result { flex-wrap: wrap; }

.hero-figure {
  border-color: var(--line);
  background: var(--white);
  box-shadow: var(--gift-shadow);
}

.hero-figure > img { z-index: 1; padding: 72px 24px; }
.hero-figure::before, .hero-figure figcaption { z-index: 2; }
.hero-figure::before { top: 28px; left: 28px; }
.hero-figure figcaption { bottom: 28px; left: 28px; right: 28px; }

.button {
  box-shadow: inset 0 1px rgba(255, 246, 232, .22);
}

.status-note {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--gift-shadow);
}

.container.section, .editorial-note, .videos-section {
  position: relative;
  margin-block: 32px;
  padding: 64px 32px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--gift-shadow);
}

.section-heading h2::after, .section-title::after, .editorial-note h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 40px;
  margin-top: 12px;
  background: var(--ornament-bow) center / contain no-repeat;
}

#contents.section { padding-top: 56px; }
.section-number { color: var(--accent); }

.contents-photo {
  border: 1px solid var(--line);
  background: var(--white);
}

.contents-stage { background: var(--white); }
.contents-stage > img { mix-blend-mode: multiply; }

.content-item {
  border: 1px solid var(--line);
  background: var(--white);
}

.contents-popover {
  --popover-ink: var(--ink);
  --popover-muted: var(--muted);
  border-color: #d9b7bd;
  padding: 8px;
  background: linear-gradient(145deg, #f6e6e8, #f0dfe0);
}

.popover-paper { border-color: var(--line); background: var(--white); }
.popover-heading, .popover-paper > a { border-color: var(--line); }
.popover-paper > p:not(.popover-quantity) { color: var(--muted); }
.popover-paper > a { color: var(--accent); }
.contents-popover .popover-quantity { color: var(--muted); background: var(--blush); }
.popover-close:hover { background: var(--blush); }

.verdict-card, .purchase-update {
  border: 1px solid var(--line);
  background: var(--white);
}

.comparison-product:first-child {
  border: 1px solid var(--line);
  padding: 24px;
  background: var(--white);
}

.videos-section {
  width: min(1240px, calc(100% - 104px));
  margin-inline: auto;
  color: var(--ink);
}

.videos-section > .container { width: 100%; }
.videos-section .section-heading { align-items: flex-end; }
.video-feature {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.featured-player { border-radius: 7px; }
.video-feature figcaption { padding: 24px; }
.play-circle { background: var(--accent); }
.video-playlist { padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.playlist-heading { margin-top: 4px; }
.playlist-item:hover, .playlist-item[aria-current="true"] { background: var(--blush); }
.playlist-thumb { background: var(--blush); }
.video-metadata, .video-description, .playlist-channel, .playlist-stats, .video-note { color: var(--muted); }
.video-original-link { color: var(--accent); }
.table-scroll, .value-calculator { background: var(--white); }
.comparison-table thead th { background: var(--blush); }

.site-footer {
  position: relative;
  padding-block: 56px 32px;
  border-top: 1px solid var(--line);
  background: var(--paper);
}

.footer-wordmark::before {
  content: "";
  display: inline-block;
  width: 48px;
  height: 28px;
  margin-right: 12px;
  vertical-align: middle;
  background: var(--ornament-bow) center / contain no-repeat;
}

@media (max-width: 1050px) {
  .videos-section { width: calc(100% - 64px); }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-figure { min-height: 0; aspect-ratio: 1.4; }
}

@media (max-width: 780px) {
  .container.section, .editorial-note, .videos-section { padding: 48px 24px; }
  .videos-section { width: calc(100% - 40px); }
  .hero-copy { padding: 28px; }
  .hero-figure { aspect-ratio: 1.3; }
  .brand-mark { width: 40px; height: 28px; }
}

@media (max-width: 520px) {
  body::before { background-size: auto, 600px auto; }
  .hero { padding-block: 32px; gap: 24px; }
  .hero-copy { padding: 24px 20px; }
  .hero-figure { aspect-ratio: 1.1; }
  .hero-figure > img { padding: 68px 20px; }
  .hero-figure::before { left: 24px; font-size: var(--text-label); }
  .hero-figure figcaption { left: 24px; right: 24px; }
  .brand-mark { width: 36px; height: 26px; }
  .status-note { padding: 20px; }
  .container.section, .editorial-note, .videos-section { margin-block: 24px; padding: 44px 12px 32px; }
  .videos-section { width: calc(100% - 36px); }
  #contents.section { padding-top: 44px; }
  .section-heading h2::after, .section-title::after { width: 64px; height: 36px; margin-top: 8px; }
  .contents-photo { padding: 4px; }
  .content-item { padding: 20px 16px; }
  .comparison-product:first-child { padding: 20px; }
  .verdict-card, .purchase-update { padding: 20px; }
  .video-feature figcaption { padding: 16px; }
  .video-playlist { padding: 12px; }
  .playlist-item { grid-template-columns: 116px minmax(0,1fr); gap: 12px; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 50px; }
  .playlist-item { grid-template-columns: 1fr; }
  .playlist-title { -webkit-line-clamp: unset; }
  .playlist-thumb { max-width: 100%; }
}

@media print {
  body::before { display: none; }
  body, .hero-figure, .contents-photo, .content-item, .contents-popover, .verdict-card, .purchase-update, .comparison-product:first-child, .video-feature { background-image: none; }
  .container.section, .editorial-note, .videos-section { margin-block: 0; box-shadow: none; }
}
