:root {
  --surface: #fffdfa;
  --surface-warm: #fffefb;
  --text: #1b1a18;
  --muted: #6d675d;
  --muted-sub: #7c7468;
  --line: #d4ccbe;
  --accent: #b96d15;
  --accent-light: #c97a1d;
  --ok: #22663a;
  --ghost-bg: #ece6d8;
  --ghost-text: #4b453d;
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Fira Sans", system-ui, sans-serif;
  color: var(--text);
  background: #fff;
  margin: 0;
  padding: 0;
}

.embed-wrap {
  width: 100%;
  height: 650px;
  overflow: hidden;
  border-radius: 16px;
}

.poll {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #fffcf7, var(--surface));
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  animation: reveal 560ms ease both;
}

.poll.is-thanks {
  grid-template-rows: minmax(0, 1fr);
}

.poll.is-thanks .top,
.poll.is-thanks .category-bar,
.poll.is-thanks .footer {
  display: none;
}

.poll.is-thanks .content {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  overflow: auto;
  background: linear-gradient(180deg, rgba(185, 109, 21, 0.08), transparent 75%);
}

@keyframes reveal {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Top / Header --- */

.top {
  padding: 20px 24px 6px;
  background: linear-gradient(180deg, rgba(185, 109, 21, 0.08), transparent 75%);
  text-align: center;
}

.category-bar {
  text-align: center;
  padding: 6px 24px 10px;
  border-bottom: 1px solid var(--line);
}

.brand-logo {
  width: clamp(160px, 25vw, 260px);
  height: auto;
  display: block;
  margin: 0 auto 12px;
}

.title {
  margin: 6px 0 8px;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1.1;
}

.subtitle {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: clamp(14px, 1.6vw, 18px);
}

.progress-wrap {
  margin-top: 0;
}

.bar {
  display: flex;
  gap: 6px;
  height: 6px;
}

.bar-segment {
  flex: 1;
  border-radius: 3px;
  background: var(--line);
  transition: background 300ms ease;
}

.bar-segment.is-active {
  background: var(--accent);
}

.bar-segment.is-current {
  background: #a89880;
}

/* --- Intro state --- */

.poll.is-intro {
  grid-template-rows: minmax(0, 1fr) 0fr 0fr;
}

.poll.is-intro .top {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom-color: transparent;
}

.poll.is-intro .progress-wrap {
  opacity: 0;
  pointer-events: none;
}

.poll.is-intro .content {
  overflow: hidden;
  padding: 0;
  opacity: 0;
}

.poll.is-intro .category-bar {
  border-bottom-color: transparent;
}

.poll.is-intro .footer {
  overflow: hidden;
  padding: 0;
  border-top-color: transparent;
  opacity: 0;
  pointer-events: none;
}

.intro-start {
  margin-top: 28px;
  padding: 14px 32px;
  font-size: 17px;
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  color: #fff;
  border: 0;
  border-radius: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 250ms ease;
}

.intro-start:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(185, 109, 21, 0.3);
}

.intro-start:disabled {
  background: #a7a7a7;
  color: #f2f2f2;
  cursor: default;
  box-shadow: none;
  transform: none;
}

.intro-start:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* --- Content --- */

.content {
  padding: 20px 24px 0;
  overflow: hidden;
}

.options::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.options::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #cc8a31, var(--accent));
  border-radius: 999px;
}

.options::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #d5963d, #c1751c);
}

.options::-webkit-scrollbar-track {
  background: transparent;
}

.options::-webkit-scrollbar-button:single-button,
.options::-webkit-scrollbar-button {
  display: block;
  height: 0;
  width: 0;
  background: none;
  border: none;
}

.options::-webkit-scrollbar-corner {
  display: none;
}

.category {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.category-sub {
  font-weight: 400;
  color: var(--muted-sub);
}

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  align-content: start;
  gap: 12px;
  height: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-bottom: 20px;
  overscroll-behavior: contain;
  touch-action: pan-y;
  scrollbar-width: thin;
  scrollbar-color: #b88033 transparent;
}

.option {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  display: grid;
  gap: 8px;
  cursor: pointer;
  background: var(--surface-warm);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.option:hover {
  transform: translateY(-1px);
  border-color: #b7ab98;
  background: #fffbf3;
}

.option:has(input:checked) {
  border-color: var(--accent);
  background: #fff6e7;
  box-shadow: 0 0 0 1px rgba(185, 109, 21, 0.22) inset;
}

.option:has(input:checked)::after {
  content: "";
  position: absolute;
  top: 6px;
  right: -12px;
  width: 80px;
  height: 80px;
  background: url("assets/oscar.png") center/contain no-repeat;
  transform: rotate(-14deg);
  transform-origin: center;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

.option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  border: none;
  background: linear-gradient(140deg, #f6ecdb, #efe1c7);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.thumb.thumb--square {
  aspect-ratio: 1 / 1;
}

.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-label {
  color: var(--muted-sub);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.option-title {
  display: grid;
  gap: 3px;
  line-height: 1.25;
}

.option-main {
  font-weight: 700;
  text-wrap: balance;
}

.option-sub {
  font-size: 12px;
  color: var(--muted-sub);
  font-weight: 400;
  text-wrap: balance;
}

/* --- Footer --- */

.footer {
  border-top: 1px solid var(--line);
  padding: 14px 24px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  background: linear-gradient(180deg, transparent, rgba(185, 109, 21, 0.06));
}

.btns {
  display: flex;
  gap: 10px;
  margin-left: auto;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 140ms ease, transform 140ms ease;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

button:not(:disabled):active { transform: translateY(1px); }

.ghost {
  background: var(--ghost-bg);
  color: var(--ghost-text);
}

.solid {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  color: #fff;
}

.ok {
  color: var(--ok);
  font-weight: 700;
}

@keyframes thanksIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes thanksItemIn {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.thanks-title {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1;
  animation: thanksIn 500ms ease both;
}

.thanks-logo {
  width: clamp(88px, 12vw, 120px);
  height: auto;
  display: block;
  margin: 0 auto 10px;
  animation: thanksIn 500ms ease 50ms both;
}

.thanks-text {
  margin: 12px 0 0;
  font-size: clamp(16px, 2.3vw, 20px);
  color: var(--muted);
  font-weight: 600;
  animation: thanksIn 500ms ease 150ms both;
}

.thanks-summary {
  width: min(720px, 100%);
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  text-align: left;
}

.thanks-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: 100%;
  max-width: calc(50% - 5px);
  justify-self: center;
}

.thanks-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: var(--surface-warm);
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 8px;
  align-items: stretch;
  animation: thanksItemIn 400ms ease both;
}

.thanks-item:nth-child(1) { animation-delay: 300ms; }
.thanks-item:nth-child(2) { animation-delay: 370ms; }
.thanks-item:nth-child(3) { animation-delay: 440ms; }
.thanks-item:nth-child(4) { animation-delay: 510ms; }
.thanks-item:nth-child(5) { animation-delay: 580ms; }
.thanks-item:nth-child(6) { animation-delay: 650ms; }
.thanks-item:nth-child(7) { animation-delay: 720ms; }

.thanks-oscar {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  align-self: stretch;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.2));
}

.thanks-item-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  text-align: justify;
  text-justify: inter-word;
}

.thanks-item-head {
  margin: 0;
  font-size: 11px;
  color: var(--muted-sub);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.01em;
}

.thanks-pick {
  margin: 0;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.25;
}

@media (max-width: 640px) {
  .embed-wrap { height: 550px; }
  .top { padding: 14px 14px 12px; }
  .top .brand-logo { width: clamp(130px, 20vw, 180px); margin-bottom: 8px; }
  .top .title { font-size: clamp(32px, 5vw, 48px); }
  .top .subtitle { font-size: 13px; }
  .progress-wrap { margin-top: 10px; }
  .content { padding: 14px; gap: 12px; }
  .footer { padding: 10px 14px 14px; }
  .btns { width: 100%; }
  .btns button { flex: 1; }
  .options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .option { padding: 6px; gap: 6px; border-radius: 10px; }
  .option-main { font-size: 13px; }
  .option-sub { font-size: 11px; }
  .category { font-size: clamp(18px, 2.2vw, 24px); }

  .poll.is-thanks .content { padding: 14px; }
  .thanks-summary { grid-template-columns: 1fr; }
  .thanks-item:last-child:nth-child(odd) { max-width: 100%; }
  .thanks-item { padding: 6px; gap: 6px; }
  .thanks-oscar { width: 18px; }
  .thanks-item-head { font-size: 10px; }
  .thanks-pick { font-size: 12px; }
}
