:root {
  --ink: #18213a;
  --ink-soft: #263250;
  --paper: #fff7df;
  --paper-strong: #ffffff;
  --line: rgba(24, 33, 58, 0.16);
  --muted: #6e6070;
  --yellow: #ffcf33;
  --coral: #f15a40;
  --teal: #29a6a6;
  --mint: #b8f2d0;
  --pink: #ff8fb3;
  --shadow: 0 24px 70px rgba(24, 33, 58, 0.2);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #ffefad;
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(24, 33, 58, 0.09) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, #ffe76b 0%, #ffb069 36%, #8ce6d1 72%, #d9c7ff 100%);
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
}

.hero {
  min-height: 330px;
  padding: 34px;
  border: 2px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.45fr);
  gap: 26px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 247, 223, 0.86));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(62px, 12vw, 138px);
  line-height: 0.86;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.04;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 750;
}

.ticket {
  min-height: 220px;
  padding: 24px;
  border: 3px dashed rgba(24, 33, 58, 0.28);
  border-radius: 8px;
  display: grid;
  place-items: center;
  text-align: center;
  transform: rotate(2deg);
  background:
    linear-gradient(135deg, var(--yellow), #fff4a3);
  box-shadow: 12px 12px 0 rgba(41, 166, 166, 0.2);
}

.ticket span,
.ticket em {
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.ticket strong {
  font-size: clamp(42px, 7vw, 70px);
  line-height: 0.9;
}

.notice {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 8px;
  font-weight: 850;
  background: var(--paper-strong);
  box-shadow: 0 10px 30px rgba(24, 33, 58, 0.11);
}

.notice.success {
  border-left: 7px solid var(--teal);
}

.notice.error {
  border-left: 7px solid var(--coral);
}

.poll-layout {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.score-card,
.poll-card {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow);
}

.score-card {
  padding: 24px;
  position: sticky;
  top: 18px;
  display: grid;
  gap: 8px;
  background:
    linear-gradient(180deg, var(--ink), var(--ink-soft));
  color: #fff;
}

.score-card strong {
  font-size: 52px;
  line-height: 0.9;
}

.score-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.poll-card {
  padding: 30px;
}

.poll-head {
  margin-bottom: 24px;
}

.answer-list,
.results-list {
  display: grid;
  gap: 12px;
}

.answer-option {
  min-height: 64px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--paper);
  cursor: pointer;
}

.answer-option:hover {
  border-color: rgba(241, 90, 64, 0.5);
  background: #fff;
}

.answer-option input {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  accent-color: var(--coral);
}

.answer-option span {
  font-size: 18px;
  font-weight: 760;
}

.actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 12px 18px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-weight: 950;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  background: var(--coral);
  color: #fff;
}

.button.secondary {
  background: var(--mint);
}

.button.add {
  background: var(--ink);
  color: #fff;
}

.result-row {
  padding: 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.result-row.is-current {
  border-color: rgba(41, 166, 166, 0.55);
  background: #ecfff7;
}

.result-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 850;
}

.result-top span {
  white-space: nowrap;
  color: var(--muted);
}

.bar {
  height: 16px;
  margin-top: 10px;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(24, 33, 58, 0.1);
}

.bar span {
  min-width: 4px;
  height: 100%;
  border-radius: inherit;
  display: block;
  background: linear-gradient(90deg, var(--teal), var(--yellow), var(--coral));
}

.add-form {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.add-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 950;
  text-transform: uppercase;
}

.add-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.add-row input {
  min-height: 48px;
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
}

@media (hover: hover) {
  .answer-option,
  .button,
  .result-row {
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
  }

  .answer-option:hover,
  .button:hover {
    transform: translateY(-1px);
  }
}

@media (max-width: 840px) {
  .hero,
  .poll-layout {
    grid-template-columns: 1fr;
  }

  .score-card {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ticket {
    min-height: 160px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 20px, 1120px);
    padding: 18px 0 30px;
  }

  .hero,
  .poll-card,
  .score-card {
    padding: 20px;
  }

  .answer-option span {
    font-size: 16px;
  }

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

  .actions,
  .button {
    width: 100%;
  }
}
