:root {
  --bg: #f4efe7;
  --surface: rgba(255, 250, 242, 0.86);
  --surface-strong: #fffaf2;
  --text: #2d241d;
  --muted: #6d5b4c;
  --accent: #b55233;
  --border: rgba(45, 36, 29, 0.12);
  --shadow: 0 24px 60px rgba(67, 44, 24, 0.12);
  --radius-lg: 3px;
  --radius-md: 3px;
  --radius-sm: 3px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Noto Serif JP", serif;
  background:
    radial-gradient(circle at top right, rgba(181, 82, 51, 0.22), transparent 30%),
    radial-gradient(circle at bottom left, rgba(111, 137, 103, 0.16), transparent 24%),
    linear-gradient(180deg, #f8f3eb 0%, var(--bg) 55%, #efe6d8 100%);
}

img {
  display: block;
  max-width: 100%;
}

button {
  font: inherit;
}

.page-shell {
  width: min(1100px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 28px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 250, 242, 0.92), rgba(248, 239, 228, 0.78));
  box-shadow: var(--shadow);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -30px -40px auto;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(181, 82, 51, 0.1);
  filter: blur(4px);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-kicker,
.work-index {
  margin: 0;
  color: var(--accent);
  font-family: "Urbanist", sans-serif;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero h1,
.section-head h2,
.work-title {
  margin: 0;
  font-weight: 700;
}

.hero h1 {
  margin-top: 10px;
  font-size: clamp(2rem, 8vw, 4.4rem);
  line-height: 1.05;
}

.hero-copy,
.gallery-status,
.lightbox-caption {
  color: var(--muted);
}

.hero-copy {
  max-width: 60rem;
  margin: 16px 0 0;
  font-size: 0.98rem;
  line-height: 1.8;
}

.hero-body {
  display: grid;
  gap: 18px;
}

.hero-key {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 926 / 741;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.gallery-section {
  margin-top: 22px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  padding: 0 4px;
}

.section-head h2 {
  font-size: 1.35rem;
}

.gallery-status {
  margin: 0;
  font-size: 0.92rem;
}

.vote-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 22rem);
  padding: 13px 22px;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #8f3d27);
  box-shadow: 0 10px 24px rgba(143, 61, 39, 0.22);
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, filter 180ms ease;
}

.section-head + .vote-link {
  margin: 0 auto 18px;
}

.gallery-grid + .vote-link {
  margin: 22px auto 0;
}

.vote-link:hover,
.vote-link:focus-visible {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.vote-link:focus-visible {
  outline: 3px solid rgba(181, 82, 51, 0.3);
  outline-offset: 3px;
}

.gallery-grid {
  display: grid;
  gap: 18px;
}

.work-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.work-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
}

.work-index {
  font-size: 1.3rem;
}

.work-title {
  font-size: 1.1rem;
}

.work-images {
  display: grid;
  grid-template-columns: minmax(0, 0.47fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.thumb-button {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.thumb-figure {
  margin: 0;
}

.thumb-frame {
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: inset 0 0 0 1px rgba(45, 36, 29, 0.06);
}

.thumb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: var(--aspect-width) / var(--aspect-height);
  transition: transform 180ms ease, filter 180ms ease;
}

.thumb-button:hover .thumb-frame img,
.thumb-button:focus-visible .thumb-frame img {
  transform: scale(1.03);
  filter: saturate(1.06);
}

.lightbox {
  width: min(100vw - 20px, 980px);
  padding: 44px 12px 16px;
  border: 0;
  border-radius: var(--radius-lg);
  background: rgba(31, 24, 18, 0.9);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.lightbox::backdrop {
  background: rgba(20, 16, 12, 0.76);
  backdrop-filter: blur(4px);
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  cursor: pointer;
}

.lightbox-figure {
  margin: 0;
}

.lightbox-image {
  width: 100%;
  max-height: min(78vh, 900px);
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-caption {
  margin-top: 10px;
  font-size: 0.94rem;
  line-height: 1.6;
  color: rgba(255, 245, 232, 0.8);
}

@media (min-width: 680px) {
  .page-shell {
    width: min(1200px, calc(100% - 40px));
    padding-top: 30px;
  }

  .hero {
    padding: 40px 36px;
  }

  .hero-body {
    grid-template-columns: minmax(0, 38rem) minmax(220px, 1fr);
    align-items: center;
    gap: 28px;
  }

  .hero-key {
    max-width: 360px;
    justify-self: end;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .vote-link,
  .thumb-frame img {
    transition: none;
  }
}
