:root {
  --bg: #000;
  --ink: #f3efe6;
  --muted: #b7b1a6;
  --line: #2a2a2a;
  --accent: #fd5a1e;
  --heading: #e4d3a6;
  --plate: #0c0c0c;
  --stub: #2a2a2a;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
}

body {
  min-height: 100dvh;
  font-family: Palatino, "Palatino Linotype", Georgia, serif;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 16px 32px;
}

.top {
  display: flex;
  align-items: center;
  gap: 16px;
}

h1 {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  line-height: 1;
  color: var(--heading);
}

.search {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  background: var(--plate);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.search::placeholder {
  color: var(--muted);
  text-transform: none;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--plate);
  border: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}

a.card:hover .title {
  color: var(--accent);
}

.card.featured {
  position: relative;
  width: 300px;
  max-width: 100%;
  border-color: #3a3226;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.card.featured .cover {
  width: 300px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  transition: transform 0.45s ease;
}

.card.featured .body {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 18px 12px 10px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.82) 72%);
}

.card.featured .title {
  font-size: 18px;
  letter-spacing: 0.02em;
}

a.card.featured:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 16px 36px rgba(253, 90, 30, 0.18);
}

a.card.featured:hover .cover {
  transform: scale(1.03);
}

.cover,
.stub {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background: var(--stub);
}

.stub {
  border: 0;
}

.body {
  padding: 10px 12px 12px;
}

.title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--heading);
}

.back {
  margin: 0 0 14px;
  font-size: 15px;
}

.back a {
  color: var(--accent);
  text-decoration: none;
}

.back a:hover {
  color: var(--heading);
}

.group {
  margin-top: 22px;
}

.group h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
  color: var(--heading);
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.wrap.wide {
  max-width: 100%;
  box-sizing: border-box;
}

.shots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-start;
  max-width: 100%;
}

.shots img {
  display: block;
  width: auto;
  height: clamp(160px, 22vw, 260px);
  max-width: 100%;
  min-width: 0;
  flex: 0 1 auto;
  object-fit: contain;
}

.shots.small img {
  width: auto;
  height: auto;
  max-height: 120px;
  max-width: 100%;
  object-fit: unset;
}

.clip {
  display: block;
  width: 100%;
  max-width: 860px;
  height: auto;
  margin-top: 16px;
  background: #000;
}

.miss {
  min-height: calc(100dvh - 50px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.miss .code {
  margin: 0 0 10px;
  font-size: 92px;
  font-weight: 600;
  line-height: 0.9;
  color: var(--heading);
}

@media (max-width: 640px) {
  .top {
    flex-direction: column;
    align-items: stretch;
  }

  h1 {
    font-size: 28px;
  }

  .miss .code {
    font-size: 64px;
  }

  .card.featured .title {
    font-size: 16px;
  }

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