/* Cloud Gallery: a recommendation, the options, and the reasons. Tokens first, then layout. */

:root {
  color-scheme: light dark;
  --bg: #f3f3f1;
  --bg-elev: #ffffff;
  --fg: #141414;
  --fg-muted: #6b6b68;
  --fg-faint: #9a9a96;
  --line: rgba(20, 20, 20, 0.1);
  --line-strong: rgba(20, 20, 20, 0.22);
  --accent: #0f5f52;
  --accent-fg: #ffffff;
  --accent-soft: rgba(15, 95, 82, 0.1);
  --image-fallback: #dcdcd8;
  --overlay: rgba(10, 10, 10, 0.55);
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 9px;
  --gutter: 16px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, system-ui, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 220ms;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1011;
    --bg-elev: #17181a;
    --fg: #ececea;
    --fg-muted: #a3a39f;
    --fg-faint: #6f6f6b;
    --line: rgba(236, 236, 234, 0.1);
    --line-strong: rgba(236, 236, 234, 0.24);
    --accent: #6fd3bc;
    --accent-fg: #0f1011;
    --accent-soft: rgba(111, 211, 188, 0.14);
    --image-fallback: #26282b;
    --overlay: rgba(0, 0, 0, 0.7);
  }
}

:root[data-theme="dark"] {
  --bg: #0f1011;
  --bg-elev: #17181a;
  --fg: #ececea;
  --fg-muted: #a3a39f;
  --fg-faint: #6f6f6b;
  --line: rgba(236, 236, 234, 0.1);
  --line-strong: rgba(236, 236, 234, 0.24);
  --accent: #6fd3bc;
  --accent-fg: #0f1011;
  --accent-soft: rgba(111, 211, 188, 0.14);
  --image-fallback: #26282b;
  --overlay: rgba(0, 0, 0, 0.7);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.sheet-open {
  overflow: hidden;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Shell */

.shell {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.masthead {
  padding: 44px 0 20px;
  display: grid;
  gap: 8px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.subtitle {
  margin: 4px 0 0;
  max-width: 60ch;
  font-size: 16px;
  color: var(--fg-muted);
}

.meta {
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 13px;
  color: var(--fg-muted);
}

.meta strong {
  color: var(--fg);
  font-weight: 500;
}

/* Our pick */

.pick {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 8px 0 28px;
  padding: 14px;
  border-radius: calc(var(--radius-lg) + 6px);
  background: var(--bg-elev);
  border: 1px solid var(--line);
}

.pick[hidden] {
  display: none;
}

.pick-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--image-fallback);
  cursor: pointer;
}

.pick-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease);
}

.pick-media:hover img {
  transform: scale(1.02);
}

.pick-copy {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 4px 6px 6px;
  min-width: 0;
}

.overline {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.pick-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.pick-sub {
  margin: 0;
  color: var(--fg-muted);
}

.pick-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px 16px;
  padding: 4px 0 2px;
}

.pick-price .price {
  font-family: var(--font-display);
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.pick-price .price small {
  margin-left: 8px;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--fg-muted);
}

.pick-rating {
  font-size: 13px;
  color: var(--fg-muted);
}

.pick-reasons {
  list-style: none;
  margin: 4px 0 0;
  padding: 14px 0 0;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
}

.pick-reasons li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  font-size: 15px;
  line-height: 1.45;
}

.pick-reasons .num {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.2;
  color: var(--accent);
}

.pick-runner {
  margin: 4px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  color: var(--fg-muted);
}

.pick-runner .label {
  color: var(--fg);
  font-weight: 500;
}

.pick-runner p {
  flex-basis: 100%;
  margin: 0;
}

.pick-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

/* Toolbar */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px;
  margin: -2px;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--fg-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.tab:hover {
  color: var(--fg);
}

.tab[aria-pressed="true"] {
  background: var(--fg);
  color: var(--bg);
}

.tab .count {
  margin-left: 6px;
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.sort {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-muted);
  font-size: 13px;
}

.sort select {
  min-height: 44px;
  padding: 0 34px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--fg);
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}

/* Group intro */

.group-intro {
  margin: 26px 0 12px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.group-intro h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.005em;
}

.group-intro p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
}

/* Grid and cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 26px 20px;
  padding: 0 0 8px;
  list-style: none;
  margin: 0;
}

.grid > * {
  min-width: 0;
}

.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 12px;
  border-radius: var(--radius-lg);
}

.card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--image-fallback);
  border: 1px solid var(--line);
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}

.card:hover .card-media img {
  transform: scale(1.025);
}

.card-media.is-missing img {
  display: none;
}

.card-media.is-missing::after {
  content: attr(data-initial);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--fg-faint);
}

.card-open {
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  border-radius: var(--radius-lg);
  cursor: pointer;
}

.card-open:focus-visible {
  outline-offset: -3px;
}

.card-tags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 6px;
  pointer-events: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: var(--bg-elev);
  color: var(--fg);
  border: 1px solid var(--line);
}

.tag[data-tone="accent"] {
  background: var(--accent);
  color: var(--accent-fg);
  border-color: transparent;
}

.tag[data-tone="muted"] {
  color: var(--fg-muted);
}

.save {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.save svg {
  width: 22px;
  height: 22px;
  fill: rgba(0, 0, 0, 0.35);
  stroke: currentColor;
  stroke-width: 1.8;
  transition: fill var(--dur) var(--ease), transform var(--dur) var(--ease);
}

.save[aria-pressed="true"] svg {
  fill: #ffffff;
}

.save:active svg {
  transform: scale(0.9);
}

.card-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 14px;
  padding: 0 4px;
  pointer-events: none;
}

.card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.005em;
}

.card-sub {
  margin: 0;
  grid-column: 1;
  color: var(--fg-muted);
  font-size: 14px;
}

.card-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  text-align: right;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.card-price small {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-muted);
}

.card-facts {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 13px;
  color: var(--fg-muted);
}

.card-facts .rating {
  color: var(--fg);
}

.card-facts .dot::before {
  content: "\00B7";
  margin-right: 12px;
  color: var(--fg-faint);
}

.card-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  padding: 0 4px;
  margin-top: -4px;
}

.best-for {
  font-size: 13px;
  color: var(--fg-muted);
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn:hover {
  border-color: var(--fg);
}

.btn-primary {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.btn-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-fg);
}

.btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.chip-btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}

.chip-btn:hover {
  border-color: var(--fg);
}

.chip-btn[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn svg,
.chip-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.btn[data-save][aria-pressed="true"] svg {
  fill: currentColor;
}

/* Book with: the same option from several sellers */

.book-with {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.book-label {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-right: 2px;
}

.offer .offer-label {
  font-weight: 500;
}

.offer .offer-price {
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

/* States */

.state {
  padding: 60px 0;
  text-align: center;
  color: var(--fg-muted);
}

.state h2 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--fg);
}

.state p {
  margin: 0;
}

.foot {
  margin: 36px 0 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--fg-muted);
  max-width: 70ch;
}

body.has-tray .foot {
  margin-bottom: 110px;
}

/* Compare tray */

.tray {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(calc(100vw - 32px), 560px);
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  background: var(--fg);
  color: var(--bg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
}

.tray[hidden] {
  display: none;
}

.tray-count {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tray .btn {
  border-color: transparent;
}

.tray .btn-quiet {
  background: transparent;
  color: var(--bg);
}

.tray .btn-quiet:hover {
  opacity: 0.75;
}

.tray .btn-primary {
  background: var(--bg);
  color: var(--fg);
}

.tray .btn-primary:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Sheet */

.sheet {
  border: 0;
  padding: 0;
  margin: auto;
  width: min(100vw, 980px);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--bg-elev);
  color: var(--fg);
  overflow: hidden;
}

.sheet-wide {
  width: min(100vw, 1180px);
}

.sheet::backdrop {
  background: var(--overlay);
}

.sheet[open] {
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.sheet-wide[open] {
  grid-template-rows: auto 1fr;
}

.sheet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 8px 8px 20px;
  border-bottom: 1px solid var(--line);
}

.sheet-bar .crumb {
  font-size: 13px;
  color: var(--fg-muted);
  font-variant-numeric: tabular-nums;
}

.controls {
  display: flex;
  gap: 2px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  color: var(--fg);
  transition: background var(--dur) var(--ease);
}

.icon-btn:hover {
  background: var(--accent-soft);
}

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

.icon-btn svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sheet-scroll {
  overflow-y: auto;
  overscroll-behavior: contain;
  min-height: 0;
}

.strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding: 0 20px;
  margin-top: 16px;
}

.strip::-webkit-scrollbar {
  display: none;
}

.strip-photo {
  position: relative;
  flex: 0 0 min(100%, 720px);
  aspect-ratio: 3 / 2;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--image-fallback);
  scroll-snap-align: start;
  cursor: zoom-in;
}

.strip-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.strip-photo.is-missing img {
  display: none;
}

.strip-expand {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  opacity: 0;
  transition: opacity var(--dur) var(--ease);
}

.strip-photo:hover .strip-expand,
.strip-photo:focus-visible .strip-expand {
  opacity: 1;
}

.strip-expand svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
}

.sheet-body {
  padding: 20px 20px 28px;
  display: grid;
  gap: 18px;
  max-width: 760px;
}

.sheet-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 18px;
  align-items: start;
}

.sheet-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.sheet-head .sub {
  margin: 0;
  grid-column: 1;
  color: var(--fg-muted);
}

.sheet-head .price {
  grid-column: 2;
  grid-row: 1 / span 2;
  text-align: right;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.sheet-head .price small {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-muted);
  margin-top: 4px;
}

.sheet-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin: 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.facts div {
  display: grid;
  gap: 2px;
}

.facts dt {
  font-size: 12px;
  color: var(--fg-muted);
  letter-spacing: 0.02em;
}

.facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 13px;
}

.prose {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  max-width: 62ch;
}

.why {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.why h3 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

.why p {
  margin: 0;
  font-size: 15px;
}

/* Pros and cons */

.pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.pc {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}

.pc h3 {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.pc ul,
.cmp-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.pc li,
.cmp-list li {
  position: relative;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.45;
}

.pc li::before,
.cmp-list li::before {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
}

.pc[data-tone="pro"] li::before,
.cmp-list[data-tone="pro"] li::before {
  content: "+";
  color: var(--accent);
}

.pc[data-tone="con"] li::before,
.cmp-list[data-tone="con"] li::before {
  content: "\2212";
  color: var(--fg-muted);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
}

.sheet-actions .book-with {
  margin-right: auto;
}

/* Compare */

.compare-scroll {
  overflow: auto;
  padding: 16px 20px 24px;
}

.cmp {
  border-collapse: collapse;
  width: 100%;
  min-width: calc(110px + var(--cols, 2) * 230px);
  table-layout: fixed;
}

.cmp th,
.cmp td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.cmp th {
  width: 110px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--fg-muted);
  position: sticky;
  left: 0;
  background: var(--bg-elev);
  z-index: 1;
}

.cmp tr:last-child th,
.cmp tr:last-child td {
  border-bottom: 0;
}

.cmp-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--image-fallback);
  cursor: pointer;
}

.cmp-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cmp-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
  font-size: 16px;
}

.cmp-name strong {
  font-weight: 500;
}

.cmp-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--fg-muted);
}

.cmp-price,
.cmp-num {
  font-family: var(--font-display);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
}

.cmp-price small {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  color: var(--fg-muted);
}

.cmp td small {
  color: var(--fg-muted);
}

.cmp-best {
  display: inline-block;
  margin: 6px 0 0 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  background: var(--accent-soft);
  color: var(--accent);
  vertical-align: middle;
}

.cmp-price .cmp-best {
  margin-left: 0;
}

.cmp-empty {
  color: var(--fg-faint);
  font-size: 13px;
}

.cmp .book-label {
  display: none;
}

/* Photo viewer */

.lightbox {
  width: 100vw;
  height: 100dvh;
  max-width: 100vw;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0a0a0a;
  color: #f2f2f0;
  overflow: hidden;
}

.lightbox[open] {
  display: grid;
  grid-template-rows: 1fr auto;
}

.lightbox::backdrop {
  background: #0a0a0a;
}

.lightbox img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 20px;
  padding-bottom: max(8px, env(safe-area-inset-bottom));
  font-size: 13px;
  color: #b8b8b4;
}

.lightbox .icon-btn {
  color: #f2f2f0;
}

.lightbox .icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

@media (min-width: 720px) {
  :root {
    --gutter: 28px;
  }

  .pick {
    grid-template-columns: 1.35fr 1fr;
    gap: 28px;
    padding: 16px;
  }

  .pick-copy {
    padding: 14px 10px 10px 0;
  }

  .sheet {
    height: auto;
    max-height: min(92dvh, 960px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
  }

  .sheet-body {
    padding: 24px 28px 32px;
  }

  .strip {
    padding: 0 28px;
    margin-top: 20px;
  }

  .sheet-actions {
    padding: 14px 28px;
  }

  .sheet-bar {
    padding-left: 28px;
  }

  .compare-scroll {
    padding: 20px 28px 28px;
  }
}

@media (max-width: 719px) {
  .toolbar {
    flex-wrap: wrap;
  }

  .tabs {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent);
    padding-right: 28px;
  }

  .sort {
    width: 100%;
  }

  .sort select {
    flex: 1 1 auto;
  }

  .sheet-actions .book-with {
    width: 100%;
  }

  .sheet-actions .book-with .btn {
    flex: 1 1 auto;
  }
}

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

  .card:hover .card-media img,
  .pick-media:hover img {
    transform: none;
  }
}
