:root {
  color-scheme: dark;
  --bg: #030407;
  --surface: #0a0d13;
  --surface-2: #111622;
  --line: rgba(226, 232, 255, 0.16);
  --line-bright: rgba(120, 238, 255, 0.42);
  --text: #f8fbff;
  --muted: #aab3c8;
  --faint: #6e7890;
  --cyan: #78eeff;
  --lilac: #c9b8ff;
  --danger: #ff9ca8;
  --ok: #99f7d7;
  --shadow: rgba(0, 0, 0, 0.38);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

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

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

.site-shell {
  width: min(100% - 32px, 960px);
  margin: 0 auto;
  padding: 32px 0 56px;
}

.site-shell--viewer {
  width: min(100% - 20px, 1120px);
}

.top-nav,
.hero,
.footer,
.section,
.status-panel,
.viewer-toolbar,
.viewer-stage,
.notice,
.empty-state {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 13, 19, 0.92);
  box-shadow: 0 18px 70px var(--shadow);
}

.top-nav {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 12px 14px;
}

.brand {
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.nav-links a:focus-visible,
.button:focus-visible,
.ghost-button:focus-visible,
.viewer-button:focus-visible {
  outline: 3px solid rgba(120, 238, 255, 0.45);
  outline-offset: 3px;
}

.hero {
  padding: 28px 18px;
}

.hero h1,
.page-title {
  max-width: 760px;
  margin: 0 0 12px;
  font-size: 2.65rem;
  line-height: 1;
  letter-spacing: 0;
}

.hero p,
.section p,
.notice p,
.empty-state p,
.footer p {
  margin-top: 0;
  color: var(--muted);
}

.eyebrow,
.section-kicker,
.meta-label,
.status-label,
.card-kicker {
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero-actions,
.actions,
.viewer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.button,
.ghost-button,
.viewer-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.button {
  padding: 0 16px;
  border: 1px solid var(--line-bright);
  background: var(--cyan);
  color: #031015;
  font-weight: 850;
}

.ghost-button,
.viewer-button {
  padding: 0 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  font-weight: 750;
}

.viewer-button:disabled {
  cursor: default;
  opacity: 0.36;
}

.button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.icon-button {
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 1.45rem;
  line-height: 1;
}

.ghost-button[aria-disabled="true"] {
  color: var(--faint);
  pointer-events: none;
}

.section {
  margin-top: 18px;
  padding: 18px;
}

.grid {
  display: grid;
  gap: 14px;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.card-body {
  padding: 14px;
}

.card h2,
.card h3,
.section h2,
.section h3,
.empty-state h1,
.empty-state h2 {
  margin: 0 0 8px;
  line-height: 1.18;
  letter-spacing: 0;
}

.card p {
  margin: 0 0 12px;
  color: var(--muted);
}

.series-stack {
  display: grid;
  gap: 18px;
}

.archive-series {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.archive-series-head {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.archive-series-head h2,
.archive-series-head p {
  margin-top: 0;
}

.archive-series-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.archive-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 0 14px 16px;
  border-top: 1px solid var(--line);
  background: #05070b;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.archive-series-controls {
  display: grid;
  grid-template-columns: 44px auto 44px;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}

.archive-series-controls .viewer-counter {
  min-width: 48px;
  text-align: center;
}

.archive-strip.is-pointer-active,
.sample-slider.is-pointer-active,
.viewer-stage.is-pointer-active {
  cursor: grabbing;
}

.archive-strip-item {
  position: relative;
  flex: 0 0 100%;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.archive-strip-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: #000;
}

.archive-photo-label {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border: 1px solid rgba(226, 232, 255, 0.22);
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(3, 4, 7, 0.72);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 800;
}

.archive-strip-item--locked {
  display: grid;
  min-height: 360px;
  place-items: center;
  padding: 22px;
  background:
    linear-gradient(rgba(3, 4, 7, 0.72), rgba(3, 4, 7, 0.92)),
    radial-gradient(circle at 50% 18%, rgba(120, 238, 255, 0.16), transparent 45%),
    #05070b;
}

.locked-panel {
  width: min(100%, 420px);
  text-align: center;
}

.locked-panel h3 {
  margin: 0 0 8px;
  font-size: 1.6rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.locked-panel p {
  margin: 0;
  color: var(--muted);
}

.locked-panel .actions {
  justify-content: center;
}

.card-image,
.sample-image {
  background: #05070b;
}

.badge-row,
.meta-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.badge,
.price,
.owned,
.not-owned {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.84rem;
  font-weight: 760;
}

.badge,
.price {
  border: 1px solid var(--line);
  color: var(--muted);
}

.owned {
  border: 1px solid rgba(153, 247, 215, 0.35);
  color: var(--ok);
}

.not-owned {
  border: 1px solid rgba(201, 184, 255, 0.35);
  color: var(--lilac);
}

.sample-grid,
.sample-slider {
  display: grid;
  gap: 10px;
}

.sample-slider {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #05070b;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.sample-slider-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  align-items: center;
  padding: 10px;
  background: var(--surface-2);
}

.sample-slider-toolbar .viewer-button:last-child {
  justify-self: end;
}

.sample-grid img,
.sample-slider img {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sample-slider img {
  border: 0;
  border-radius: 0;
}

.notice,
.purchase-warning,
.empty-state {
  margin-top: 18px;
  padding: 16px;
}

.purchase-warning {
  border: 1px solid rgba(255, 156, 168, 0.44);
  border-radius: 8px;
  background: rgba(255, 156, 168, 0.08);
  color: var(--text);
  box-shadow: 0 18px 70px var(--shadow);
}

.purchase-warning strong {
  display: block;
  margin-bottom: 6px;
  color: var(--danger);
  line-height: 1.28;
}

.purchase-warning p {
  margin: 0;
  color: var(--muted);
}

.purchase-warning-actions {
  margin-top: 12px;
}

.notice strong {
  color: var(--text);
}

.notice-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.footer {
  margin-top: 22px;
  padding: 14px;
}

.footer p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.loading {
  margin: 0;
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.status-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 14px;
}

.status-value {
  margin: 0;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 820;
}

.css-hdr-high {
  display: none;
  color: var(--cyan);
}

@media (dynamic-range: high) {
  .css-hdr-standard {
    display: none;
  }

  .css-hdr-high {
    display: block;
  }
}

.viewer-layout {
  display: grid;
  gap: 12px;
}

.viewer-toolbar {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.viewer-heading {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.viewer-heading h1 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.viewer-counter {
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.viewer-actions {
  margin-top: 0;
}

.viewer-stage {
  overflow: hidden;
  min-height: 260px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.viewer-image {
  width: 100%;
  max-height: calc(100vh - 210px);
  object-fit: contain;
  background: #000;
}

.viewer-image--hdr {
  dynamic-range-limit: no-limit;
}

.card-image.viewer-image--hdr,
.archive-image.viewer-image--hdr,
.sample-image.viewer-image--hdr {
  dynamic-range-limit: no-limit;
}

.viewer-stage--landscape {
  background: #000;
}

.viewer-image--landscape {
  max-height: min(72vh, 760px);
}

.hdr-check-stage {
  margin-top: 18px;
}

.hdr-check-image {
  max-height: min(74vh, 920px);
}

.hdr-compare {
  display: grid;
  gap: 14px;
}

.hdr-compare-item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #000;
}

.hdr-compare-image {
  width: 100%;
  max-height: min(68vh, 720px);
  object-fit: contain;
  background: #000;
}

.hdr-compare-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--surface-2);
}

.hdr-compare-caption strong {
  color: var(--text);
}

.hdr-compare-caption span {
  color: var(--muted);
  font-size: 0.9rem;
}

.slide-caption {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dev-note {
  margin-top: 10px;
  color: var(--faint);
  font-size: 0.88rem;
}

@media (min-width: 760px) {
  .site-shell {
    padding-top: 48px;
    padding-bottom: 72px;
  }

  .hero {
    padding: 44px 34px;
  }

  .hero h1,
  .page-title {
    font-size: 4.4rem;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .archive-series-head {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .sample-grid,
  .status-panel {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .viewer-toolbar {
    grid-template-columns: 1fr auto;
    align-items: center;
  }

  .viewer-actions {
    justify-content: flex-end;
  }
}

body[data-page="series-list"] .site-shell {
  width: 100%;
  max-width: none;
  padding: 0 0 56px;
}

body[data-page="series-list"] .top-nav {
  width: min(100% - 32px, 960px);
  margin: 16px auto 18px;
}

body[data-page="series-list"] .section {
  margin-top: 0;
  padding: 18px 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

body[data-page="series-list"] .section > .section-kicker,
body[data-page="series-list"] .section > .page-title,
body[data-page="series-list"] .section > p {
  padding-right: 16px;
  padding-left: 16px;
}

body[data-page="series-list"] .archive-series {
  border-right: 0;
  border-left: 0;
  border-radius: 0;
}

body[data-page="series-list"] .archive-strip {
  gap: 0;
  padding: 0;
  scroll-snap-type: x mandatory;
}

body[data-page="series-list"] .archive-series-controls {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}

body[data-page="series-list"] .archive-strip-item {
  flex-basis: 100vw;
  margin-top: 0;
  border: 0;
  border-radius: 0;
  scroll-snap-align: start;
}

body[data-page="series-list"] .archive-strip-item img {
  width: 100vw;
}

body[data-page="series-list"] .archive-strip-item--locked {
  min-height: min(134vw, 760px);
}

@media (min-width: 900px) {
  body[data-page="series-list"] .site-shell {
    width: min(100% - 40px, 1120px);
    max-width: 1120px;
    padding: 32px 0 64px;
  }

  body[data-page="series-list"] .top-nav {
    width: 100%;
    margin: 0 0 18px;
  }

  body[data-page="series-list"] .section {
    padding: 22px;
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 8px;
  }

  body[data-page="series-list"] .section > .section-kicker,
  body[data-page="series-list"] .section > .page-title,
  body[data-page="series-list"] .section > p {
    padding-right: 0;
    padding-left: 0;
  }

  body[data-page="series-list"] .archive-series {
    border-right: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 8px;
  }

  body[data-page="series-list"] .archive-strip {
    gap: 12px;
    padding: 14px;
    scroll-padding-inline: 14px;
  }

  body[data-page="series-list"] .archive-series-controls {
    border-top: 1px solid var(--line);
  }

  body[data-page="series-list"] .archive-strip-item {
    flex-basis: min(78vw, 860px);
    max-width: 860px;
    border: 1px solid var(--line);
    border-radius: 8px;
    scroll-snap-align: center;
  }

  body[data-page="series-list"] .archive-strip-item img {
    width: 100%;
    height: min(62vh, 560px);
    object-fit: contain;
  }

  body[data-page="series-list"] .archive-strip-item--locked {
    min-height: min(62vh, 560px);
  }
}
