* {
  box-sizing: border-box;
}

:root {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: Verdana, Arial, Helvetica, sans-serif;
  color: #111;
  background: #f6f6f6;
  line-height: 1.5;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.page {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 12px;
}

.hero-card,
.viewer-card,
.thumbs-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.hero-card {
  padding: 18px;
  margin-bottom: 14px;
}

.eyebrow {
  margin: 0 0 6px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #666;
}

h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  line-height: 1.15;
}

.price {
  margin: 8px 0 12px;
  font-size: clamp(1.15rem, 3vw, 1.4rem);
  font-weight: 700;
}

.lead,
.event-note {
  margin: 0 0 12px;
  font-size: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 14px;
}

.viewer-card {
  padding: 14px;
}

.viewer-frame {
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #fafafa;
  border: 1px solid #e1e1e1;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.viewer-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.viewer-caption {
  padding-top: 12px;
}

.viewer-caption h2,
.thumbs-card h2 {
  margin: 0 0 6px;
  font-size: 1.1rem;
}

.viewer-caption p {
  margin: 0;
}

.controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
  flex-wrap: wrap;
}

.controls button,
.thumb {
  font: inherit;
}

.controls button {
  border: 1px solid #bbb;
  background: #fff;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
}

.controls button:hover,
.controls button:focus-visible,
.thumb:hover,
.thumb:focus-visible {
  border-color: #666;
}

#positionText {
  font-weight: 700;
  min-width: 56px;
  text-align: center;
}

.thumbs-card {
  padding: 14px;
}

.thumb-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.thumb {
  width: 100%;
  border: 1px solid #d0d0d0;
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.thumb img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 8px;
}

.thumb span {
  display: block;
  font-size: 0.94rem;
}

.thumb.is-active {
  border-color: #111;
  box-shadow: inset 0 0 0 1px #111;
}

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

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

@media (max-width: 540px) {
  .page {
    padding: 8px;
  }

  .hero-card,
  .viewer-card,
  .thumbs-card {
    border-radius: 12px;
  }

  .hero-card,
  .viewer-card,
  .thumbs-card {
    padding: 12px;
  }

  .viewer-frame {
    aspect-ratio: 1 / 1;
  }

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

  .controls {
    justify-content: space-between;
  }

  .controls button {
    flex: 1 1 0;
  }
}