:root {
  color-scheme: light;
  --ink: #111217;
  --paper: #f3ecdc;
  --white: #fffdf5;
  --line: rgba(17, 18, 23, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(90deg, rgba(17, 18, 23, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(17, 18, 23, 0.055) 1px, transparent 1px),
    var(--paper);
  background-size: 26px 26px;
}

.poster-header {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 22px 0 16px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
}

.poster-header span,
.poster-type span,
.poster-footer,
.poster-no {
  font-weight: 1000;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.poster-header span {
  color: #55584f;
  font-size: 0.78rem;
}

.poster-header h1 {
  margin: 2px 0 0;
  max-width: 880px;
  font-size: clamp(2.5rem, 7vw, 7.4rem);
  line-height: 0.84;
  letter-spacing: 0;
}

.poster-header a {
  border: 3px solid var(--ink);
  background: var(--white);
  color: var(--ink);
  padding: 10px 12px;
  box-shadow: 4px 4px 0 var(--ink);
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.poster-grid {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto 32px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.poster {
  position: relative;
  min-height: 520px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 4px solid var(--ink);
  background: var(--white);
  box-shadow: 7px 7px 0 var(--ink);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.poster::before,
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.poster::before {
  background:
    linear-gradient(90deg, var(--left), transparent 34%, transparent 66%, var(--right)),
    repeating-linear-gradient(0deg, transparent 0 18px, rgba(17, 18, 23, 0.08) 18px 20px);
  mix-blend-mode: multiply;
  opacity: 0.24;
}

.poster::after {
  inset: 12px;
  border: 2px solid rgba(17, 18, 23, 0.3);
}

.poster-no {
  position: relative;
  z-index: 3;
  margin: 14px;
  justify-self: start;
  border: 3px solid var(--ink);
  background: var(--accent);
  padding: 5px 8px;
  font-size: 0.8rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.poster-type {
  position: relative;
  z-index: 3;
  min-width: 0;
  padding: 0 18px 16px;
  display: grid;
  align-content: end;
}

.poster-type span {
  width: fit-content;
  border: 3px solid var(--ink);
  background: var(--white);
  padding: 4px 7px;
  font-size: 0.7rem;
  box-shadow: 3px 3px 0 var(--ink);
}

.poster-type h2 {
  margin: 8px 0 0;
  max-width: 100%;
  font-size: clamp(3.1rem, 8vw, 6.2rem);
  line-height: 0.78;
  letter-spacing: 0;
  text-wrap: balance;
}

.poster-type p {
  width: fit-content;
  max-width: 82%;
  margin: 12px 0 0;
  border: 3px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  padding: 7px 9px;
  font-size: clamp(0.92rem, 1.5vw, 1.2rem);
  font-weight: 900;
  line-height: 1.05;
}

.noun-stack {
  position: absolute;
  inset: 62px 12px 62px;
  z-index: 2;
}

.noun-stack img {
  position: absolute;
  width: 35%;
  image-rendering: pixelated;
  filter: drop-shadow(6px 8px 0 rgba(17, 18, 23, 0.24));
}

.noun-stack img:nth-child(1) { left: 0; top: 3%; width: 46%; }
.noun-stack img:nth-child(2) { right: 1%; top: 0; width: 38%; }
.noun-stack img:nth-child(3) { left: 26%; top: 25%; width: 52%; }
.noun-stack img:nth-child(4) { left: 2%; bottom: 1%; width: 35%; }
.noun-stack img:nth-child(5) { right: 1%; bottom: 6%; width: 42%; }
.noun-stack img:nth-child(6) { left: 42%; bottom: 0; width: 28%; }

.poster-footer {
  position: relative;
  z-index: 3;
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 7px;
  align-items: center;
  padding: 12px 14px 14px;
  font-size: 0.64rem;
}

.poster-footer b,
.poster-footer span {
  min-width: 0;
  overflow: hidden;
  border: 2px solid var(--ink);
  background: var(--white);
  padding: 5px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.poster-footer span {
  background: var(--accent);
}

.theme-0 { background: #fffdf5; }
.theme-1 { background: #101217; color: #fffdf5; }
.theme-1 .poster-type span,
.theme-1 .poster-footer b { color: #101217; }
.theme-1 .poster-type h2 { text-shadow: 4px 4px 0 var(--left), 8px 8px 0 var(--right); }
.theme-2 { background: linear-gradient(135deg, #fffdf5 0 52%, var(--accent) 52%); }
.theme-3 { background: repeating-linear-gradient(90deg, #fffdf5 0 24px, color-mix(in srgb, var(--left) 24%, #fffdf5) 24px 48px); }
.theme-4 { background: color-mix(in srgb, var(--right) 24%, #fffdf5); }
.theme-4 .poster-type h2 { writing-mode: vertical-rl; max-height: 360px; }
.theme-5 { background: radial-gradient(circle at 50% 38%, var(--accent), #fffdf5 44%); }
.theme-6 { background: linear-gradient(180deg, color-mix(in srgb, var(--left) 32%, #fffdf5), #fffdf5 42%, color-mix(in srgb, var(--right) 32%, #fffdf5)); }
.theme-7 { background: #fffdf5; }
.theme-7 .poster-type h2 { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.theme-8 { background: conic-gradient(from 45deg, var(--accent), #fffdf5, color-mix(in srgb, var(--right) 35%, #fffdf5), #fffdf5, var(--accent)); }
.theme-9 { background: color-mix(in srgb, var(--deep) 18%, #fffdf5); }
.theme-9 .poster-type h2 { transform: skew(-8deg); }

@media (max-width: 1180px) {
  .poster-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .poster-header {
    align-items: start;
    flex-direction: column;
  }

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

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