:root {
  color-scheme: light;
  --ink: #2c211c;
  --muted: #6f5c50;
  --paper: #fffdf9;
  --sand: #f5ecdf;
  --line: #decbbb;
  --terracotta: #92592f;
  --terracotta-dark: #6d3e20;
  --sage: #52665a;
  --shadow: 0 20px 48px rgba(79, 49, 30, 0.13);
}

* { box-sizing: border-box; }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at 12% 4%, rgba(255, 255, 255, 0.9), transparent 26rem),
    radial-gradient(circle at 85% 15%, rgba(213, 177, 136, 0.22), transparent 22rem),
    linear-gradient(155deg, #f9f4ec 0%, #ecdec9 100%);
}

button, input, textarea, select { font: inherit; }

.shell { width: min(720px, calc(100% - 24px)); margin: 0 auto; padding: 24px 0 48px; }
.brand { margin: 4px 2px 18px; color: var(--terracotta-dark); font-size: 0.98rem; font-weight: 700; letter-spacing: 0.03em; }
.brand-mark { color: var(--terracotta); font-size: 1.2rem; }
.contest-card, .social-step, .form-card, .hero { margin-bottom: 16px; padding: 28px; border: 1px solid rgba(146, 89, 47, 0.16); border-radius: 22px; background: rgba(255, 253, 249, 0.9); box-shadow: var(--shadow); }
.hero--simple, .hero--success { max-width: 620px; margin: 12vh auto 0; }
.eyebrow { margin: 0 0 9px; color: var(--terracotta); font-family: "Segoe UI", sans-serif; font-size: 0.73rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
h1, h2 { margin: 0; line-height: 1.07; }
h1 { font-size: clamp(2rem, 9vw, 3.65rem); letter-spacing: -0.035em; }
h2 { font-size: clamp(1.45rem, 5vw, 2.1rem); }
.subtitle, .prize-description, .social-step p, .form-hint, .success-note { color: var(--muted); font-size: 1.04rem; line-height: 1.58; }
.subtitle { max-width: 43rem; margin: 16px 0 0; }
.prize-image { display: block; width: 100%; max-height: 360px; margin: 22px 0; border-radius: 15px; object-fit: cover; background: var(--sand); }
.prize-description { margin: 0 0 14px; white-space: pre-line; }
.prize-value { margin: 0; color: var(--terracotta-dark); font-size: 1.05rem; }
.contest-details { display: grid; gap: 12px; margin: 24px 0 0; padding-top: 18px; border-top: 1px solid var(--line); }
.contest-details div { display: grid; gap: 3px; }
dt { color: var(--muted); font-family: "Segoe UI", sans-serif; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
dd { margin: 0; font-size: 0.98rem; }
.social-step { border-left: 4px solid var(--sage); }
.social-step h2 { margin-bottom: 10px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; margin-top: 8px; padding: 11px 18px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-family: "Segoe UI", sans-serif; font-size: 0.97rem; font-weight: 700; text-align: center; text-decoration: none; transition: background 150ms ease, transform 150ms ease; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: 0.65; transform: none; }
.button--primary { width: 100%; color: #fff; background: var(--terracotta); }
.button--primary:hover { background: var(--terracotta-dark); }
.button--secondary { color: var(--sage); border-color: currentColor; background: transparent; }
.field-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; margin: 17px 0; }
label { font-family: "Segoe UI", sans-serif; font-size: 0.93rem; font-weight: 700; }
input[type="text"], input[type="tel"], input[type="email"], input[type="url"], input[type="number"], input[type="datetime-local"], textarea, select { width: 100%; min-height: 48px; padding: 10px 12px; border: 1px solid #bda997; border-radius: 9px; color: var(--ink); background: #fff; }
input[type="file"] { width: 100%; padding: 9px 0; color: var(--muted); }
textarea { min-height: 110px; resize: vertical; }
input:focus-visible, summary:focus-visible, .button:focus-visible { outline: 3px solid #ddb475; outline-offset: 3px; }
small { color: var(--muted); font-family: "Segoe UI", sans-serif; font-size: 0.8rem; line-height: 1.4; }
.rules { margin: 22px 0 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
summary { padding: 14px 0; cursor: pointer; color: var(--terracotta-dark); font-family: "Segoe UI", sans-serif; font-weight: 700; }
.rules div { padding: 0 0 16px; color: var(--muted); line-height: 1.55; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0; line-height: 1.42; }
.checkbox input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--terracotta); }
.checkbox--social { margin-top: 22px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fffaf4; }
.form-message { margin: 14px 0; padding: 12px; border-left: 4px solid #a33f32; color: #73261f; background: #fff1ed; line-height: 1.45; }
.notice { color: var(--muted); font-style: italic; }
.hero--success { border-color: rgba(82, 102, 90, 0.36); }
.admin-panel { max-width: 480px; }
.admin-form { margin-top: 24px; }
.admin-header { margin: 12px 0 22px; }
.admin-header .admin-actions { margin-top: 18px; }
.admin-contest-list { display: grid; gap: 16px; }
.admin-status-group { display: grid; gap: 12px; }
.admin-status-group > h2 { margin: 12px 4px 0; color: var(--terracotta-dark); font-size: 1.25rem; }
.admin-contest-card { padding: 22px; border: 1px solid rgba(146, 89, 47, 0.2); border-radius: 18px; background: rgba(255, 253, 249, 0.92); box-shadow: var(--shadow); }
.admin-card-heading { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.admin-card-heading h2 { font-size: 1.45rem; }
.admin-card-heading strong { color: var(--terracotta-dark); white-space: nowrap; }
.admin-details { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; margin: 20px 0; padding-top: 17px; border-top: 1px solid var(--line); }
.admin-details div { display: grid; gap: 3px; }
.admin-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-actions .button { width: auto; margin-top: 0; }
.admin-empty { text-align: center; }
.admin-public-link { display: grid; gap: 8px; margin-top: 25px; padding-top: 20px; border-top: 1px solid var(--line); }
.admin-public-link code { overflow-wrap: anywhere; padding: 9px; border-radius: 7px; background: var(--sand); font-family: "Segoe UI", sans-serif; font-size: 0.85rem; }
.admin-status-note { margin: 18px 0; padding: 12px; border-left: 4px solid var(--sage); background: #f2f6f1; line-height: 1.45; }
.admin-lifecycle-actions { margin-top: 18px; }
.admin-prize-preview { display: block; width: min(100%, 360px); max-height: 260px; margin-top: 8px; border-radius: 12px; object-fit: cover; background: var(--sand); }
.access-block { display: grid; gap: 10px; margin: 24px 0; padding: 19px 0; border-top: 1px solid var(--line); }
.access-block code { overflow-wrap: anywhere; padding: 10px; border-radius: 8px; background: var(--sand); font-family: "Segoe UI", sans-serif; font-size: 0.88rem; }
.access-block p { margin: 0; color: var(--muted); line-height: 1.5; }
.qr-preview { display: block; width: min(100%, 360px); margin: 4px auto; border: 12px solid #fff; background: #fff; image-rendering: pixelated; }
.participant-list { display: grid; gap: 14px; }
.participant-card { padding: 21px; border: 1px solid rgba(82, 102, 90, 0.25); border-radius: 16px; background: rgba(255, 253, 249, 0.92); box-shadow: var(--shadow); }
.participant-card h2 { font-size: 1.3rem; }
.participant-details { display: grid; gap: 13px; margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--line); }
.participant-details div { display: grid; gap: 3px; }
.participant-details dd { overflow-wrap: anywhere; }

@media (min-width: 600px) {
  .shell { padding-top: 44px; }
  .contest-card, .social-step, .form-card, .hero { padding: 38px; }
  .field-grid { grid-template-columns: 1fr 1fr; }
  .participant-details { grid-template-columns: 1fr 1fr; }
}
