:root {
  --ink: #0b0a07;
  --muted: #6f674e;
  --gold: #c9a84c;
  --gold-deep: #b98a2e;
  --ivory: #f9f4e8;
  --surface: #fffdf8;
  --line: #e6dcc6;
  --green: #5e7c52;
  --shadow: 0 18px 60px rgba(46, 35, 13, .11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 168, 76, .16), transparent 28rem),
    linear-gradient(135deg, rgba(255, 255, 255, .72), transparent 45%),
    var(--ivory);
  font-family: Arimo, Inter, Arial, sans-serif;
  line-height: 1.45;
}

button,
input {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid rgba(230, 220, 198, .82);
  background: rgba(249, 244, 232, .9);
  backdrop-filter: blur(16px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand strong {
  display: block;
  font-family: Tinos, Georgia, serif;
  font-size: 28px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand small,
.eyebrow {
  color: var(--gold-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.mark {
  display: grid;
  grid-template-columns: repeat(2, 18px);
  gap: 2px;
}

.mark span {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  clip-path: polygon(25% 4%, 75% 4%, 100% 50%, 75% 96%, 25% 96%, 0 50%);
}

.limit {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 248, .72);
}

main {
  width: min(1500px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 28px;
  align-items: stretch;
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 253, 248, .94), rgba(255, 253, 248, .78)),
    url("/assets/designs/bee-yard-homepage-concept-23.png") center / cover;
  box-shadow: var(--shadow);
}

.hero h1 {
  max-width: 850px;
  margin: 8px 0 16px;
  font-family: Tinos, Georgia, serif;
  font-size: clamp(42px, 5vw, 76px);
  line-height: .95;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: #403823;
  font-size: 18px;
}

.vote-panel {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 22px;
  border: 1px solid rgba(201, 168, 76, .42);
  border-radius: 12px;
  background: rgba(255, 253, 248, .92);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.primary,
.toolbar button {
  min-height: 42px;
  border: 1px solid var(--gold);
  border-radius: 8px;
  cursor: pointer;
}

.primary {
  color: #fff;
  background: linear-gradient(180deg, #d6aa35, #b98412);
  font-weight: 800;
}

.primary:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.message {
  min-height: 22px;
  margin: 0;
  color: var(--green);
  font-size: 14px;
}

.toolbar {
  position: sticky;
  top: 78px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin: 18px 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, .91);
  backdrop-filter: blur(12px);
}

.toolbar div {
  margin-right: auto;
  color: var(--muted);
}

.toolbar button {
  padding: 0 14px;
  color: var(--ink);
  background: #fff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px;
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(46, 35, 13, .06);
}

.card.selected {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 168, 76, .18), var(--shadow);
}

.preview-button {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: transparent;
}

.preview-button:focus-visible,
.select-button:focus-visible,
.dialog-close:focus-visible {
  outline: 3px solid rgba(201, 168, 76, .56);
  outline-offset: 3px;
}

.open-label {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .64);
  border-radius: 999px;
  color: #fff;
  background: rgba(11, 10, 7, .68);
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s ease, transform .18s ease;
}

.preview-button:hover .open-label,
.preview-button:focus-visible .open-label {
  opacity: 1;
  transform: translateY(0);
}

.card img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: top center;
  border-bottom: 1px solid var(--line);
}

.card-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.card h3 {
  margin: 0;
  font-size: 16px;
}

.card small {
  color: var(--muted);
}

.select-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 10px 0 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink);
  background: #fff;
  font-weight: 800;
}

.check {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
}

.selected .check {
  border-color: var(--gold);
  color: #fff;
  background: var(--gold-deep);
}

.image-dialog {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: clamp(12px, 3vw, 34px);
  background: rgba(11, 10, 7, .86);
}

.image-dialog[hidden] {
  display: none;
}

.dialog-open {
  overflow: hidden;
}

.dialog-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 21;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  background: rgba(0, 0, 0, .42);
  font-size: 30px;
  line-height: 1;
}

.dialog-frame {
  display: grid;
  gap: 12px;
  width: min(100%, 1600px);
  max-height: calc(100vh - 48px);
  margin: 0;
}

.dialog-frame img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 96px);
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 22px 90px rgba(0, 0, 0, .46);
}

.dialog-frame figcaption {
  color: #fff;
  text-align: center;
  font-weight: 800;
}

.stats {
  margin-top: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 253, 248, .94);
}

.stats-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.stats h2 {
  margin: 0;
  font-family: Tinos, Georgia, serif;
  font-size: 34px;
}

.stats-list {
  display: grid;
  gap: 10px;
}

.stat-row {
  display: grid;
  grid-template-columns: 44px minmax(180px, 1fr) minmax(90px, 6fr) 80px;
  gap: 10px;
  align-items: center;
}

.bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #efe7d4;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

@media (max-width: 820px) {
  main {
    width: min(100% - 24px, 1500px);
  }

  .topbar,
  .hero,
  .stats-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .hero {
    display: grid;
  }

  .toolbar {
    top: 92px;
    flex-wrap: wrap;
  }

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

  .stat-row {
    grid-template-columns: 38px 1fr 54px;
  }

  .bar {
    grid-column: 2 / -1;
  }
}
