:root {
  --bg: #f3efe6;
  --ink: #1c1915;
  --muted: #5f584e;
  --line: #e3d8c8;
  --card: #fffdf8;
  --accent: #8f3d22;
  --gold: #f0c36a;
  --shadow: 0 16px 40px rgba(28, 25, 21, 0.08);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 1.05rem;
  line-height: 1.55;
}

img { max-width: 100%; height: auto; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--ink);
  color: white;
  padding: 8px 12px;
  z-index: 5;
}

.skip:focus { top: 12px; }

.top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(243, 239, 230, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.brand {
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

main, footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  gap: 20px;
  padding: 28px 0 12px;
}

.kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 8vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.place {
  margin: 16px 0 0;
  font-size: 1.15rem;
}

.place a {
  color: var(--accent);
  font-weight: 700;
}

.reward-card {
  margin: 0;
  padding: 22px 20px;
  border-radius: 22px;
  background: var(--ink);
  color: #fffdf8;
  box-shadow: var(--shadow);
}

.reward-card p,
.reward-card span {
  margin: 0;
}

.reward-card p {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.reward-card strong {
  display: block;
  margin: 8px 0;
  font-size: clamp(2.8rem, 12vw, 4.6rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--gold);
}

.reward-card span { color: #e7e0d4; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

.btn-primary { background: var(--accent); color: white; }

.btn-ghost { border-color: var(--ink); }

.btn-small {
  min-height: 40px;
  padding: 8px 14px;
  background: var(--ink);
  color: white;
}

.btn:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

section { padding: 28px 0; }

section p { margin: 0 0 12px; }

.lead, .total { color: var(--muted); }

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.frame {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #f7f3ec;
  cursor: zoom-in;
}

.frame img {
  display: block;
  width: 100%;
  height: 230px;
  object-fit: contain;
}

.card-body { padding: 14px 14px 16px; }

.badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f8e7df;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.meta div + div { margin-top: 4px; }

.thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.thumbs button {
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f3ec;
  cursor: pointer;
}

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

.empty-photo {
  display: grid;
  place-items: center;
  height: 140px;
  color: var(--muted);
  background: #f7f3ec;
}

.feedback {
  display: grid;
  gap: 12px;
  margin-top: 8px;
  max-width: 640px;
}

.feedback label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.feedback input,
.feedback textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.feedback textarea { min-height: 140px; resize: vertical; }

.feedback .btn { justify-self: start; }

.form-status { min-height: 1.4em; color: var(--muted); }

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

footer {
  padding: 12px 0 36px;
  color: var(--muted);
  font-size: 0.92rem;
}

dialog {
  width: min(960px, calc(100% - 24px));
  border: 0;
  border-radius: 16px;
  padding: 12px;
  background: var(--ink);
}

dialog::backdrop { background: rgba(20, 16, 12, 0.72); }

dialog img {
  display: block;
  width: 100%;
  max-height: 75vh;
  object-fit: contain;
  background: white;
}

.viewer-bar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 8px;
}

.viewer-bar button {
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: #fffdf8;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 420px) {
  .actions .btn { width: 100%; }
}

@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .hero { grid-template-columns: 1.4fr 0.8fr; align-items: stretch; padding-top: 48px; }
}

@media (min-width: 1100px) {
  .cards { grid-template-columns: 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
