:root {
  color-scheme: light;
  --ink: #17211d;
  --muted: #65736d;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --green: #0f8a54;
  --red: #c32234;
  --gold: #e7b84a;
  --line: #d9dfd8;
  --shadow: 0 24px 70px rgba(23, 33, 29, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 138, 84, 0.12), transparent 34%),
    radial-gradient(circle at 80% 10%, rgba(195, 34, 52, 0.16), transparent 28%),
    var(--paper);
}

a {
  color: var(--green);
  font-weight: 700;
}

.shell,
.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.site-header {
  display: flex;
  align-items: center;
  min-height: 76px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  display: block;
  width: min(240px, 58vw);
  height: auto;
}

.hero {
  min-height: 300px;
  display: flex;
  align-items: center;
  padding: 36px 0 28px;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
  color: var(--red);
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.5rem, 6vw, 5.4rem);
  line-height: 0.95;
}

.lead {
  max-width: 660px;
  margin: 22px 0 0;
  font-size: 1.12rem;
  line-height: 1.65;
  color: var(--muted);
}

.form-card,
.admin-panel,
.admin-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.form-card {
  padding: 28px;
}

.prize-panel {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.2fr);
  gap: 20px;
  align-items: start;
  padding: 22px;
  margin-bottom: 28px;
  border: 1px solid rgba(15, 138, 84, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 138, 84, 0.1), rgba(231, 184, 74, 0.16)),
    #fffdfa;
}

.draw-times-panel {
  padding: 18px 20px;
  margin: -10px 0 28px;
  border: 1px solid rgba(195, 34, 52, 0.22);
  border-radius: 8px;
  background: #fff;
}

.draw-times-panel ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
  font-weight: 800;
}

.prize-panel h2 {
  font-size: 1.35rem;
}

.prize-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prize-list li {
  position: relative;
  min-height: 44px;
  padding: 12px 14px 12px 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  font-weight: 800;
}

.prize-list li::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 15px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: radial-gradient(circle, var(--red) 0 42%, var(--green) 43% 100%);
  box-shadow: 0 0 0 3px rgba(23, 33, 29, 0.12);
}

.form-section + .form-section {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid var(--line);
}

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

.section-title p {
  margin: 0;
  color: var(--red);
  font-weight: 800;
}

.question {
  min-width: 0;
  margin: 0;
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.question legend {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  font-size: 1rem;
  font-weight: 800;
}

.question legend span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  font-size: 0.84rem;
}

.hint {
  margin: 8px 0 0 42px;
  color: var(--muted);
}

.choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.choice,
.checkline {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
  font-weight: 700;
}

.choice input,
.checkline input {
  accent-color: var(--green);
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.field-label {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  font-weight: 800;
}

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

textarea {
  resize: vertical;
}

.other-input {
  margin-top: 12px;
}

.primary-button,
.ghost-button {
  border: 0;
  border-radius: 8px;
  min-height: 48px;
  padding: 0 20px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  width: 100%;
  margin-top: 22px;
  color: white;
  background: linear-gradient(135deg, var(--green), #0a6d43);
}

.ghost-button {
  color: var(--ink);
  background: #eef3ed;
}

.alert {
  padding: 14px 16px;
  border: 1px solid rgba(195, 34, 52, 0.28);
  border-radius: 8px;
  margin-bottom: 18px;
  background: rgba(195, 34, 52, 0.08);
  color: #8e1624;
  font-weight: 800;
}

.thanks-page,
.admin-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.thanks-page {
  text-align: center;
}

.thanks-logo,
.admin-logo,
.admin-header-logo {
  display: block;
  height: auto;
}

.thanks-logo {
  width: min(260px, 70vw);
  margin-bottom: 24px;
}

.admin-logo {
  width: min(220px, 70vw);
  margin: 0 auto 18px;
}

.admin-header-logo {
  width: 190px;
  margin-bottom: 14px;
}

.thanks-mark {
  font-size: 4rem;
}

.thanks-page h1 {
  font-size: clamp(2rem, 8vw, 4rem);
}

.thanks-page p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
}

.admin-card {
  width: min(420px, 100%);
  padding: 28px;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 26px 0;
}

.admin-header p:last-child {
  color: var(--muted);
}

.admin-panel {
  padding: 22px;
  margin: 18px 0;
}

.panel-head,
.draw-form {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-head {
  justify-content: space-between;
}

.small {
  max-width: 120px;
}

.draw-form .primary-button,
.settings-form .primary-button {
  width: auto;
  margin-top: 0;
}

.settings-form {
  display: grid;
  gap: 12px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

th {
  background: #f0f5ef;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.compact {
  width: min(720px, calc(100% - 32px));
}

.draw-result ol {
  padding-left: 22px;
}

.draw-result li {
  margin: 14px 0;
  font-size: 1.12rem;
}

.draw-result span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .hero {
    min-height: 0;
  }

  .form-card {
    padding: 18px;
  }

  .prize-panel {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .section-title,
  .admin-header,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

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

  .hint {
    margin-left: 0;
  }

  .draw-form {
    align-items: stretch;
    flex-direction: column;
  }

  .small,
  .draw-form .primary-button {
    max-width: none;
    width: 100%;
  }
}
