:root {
  --ink: #17362b;
  --green: #155d42;
  --green-dark: #0c4631;
  --lime: #d7f06a;
  --cream: #f6f1e6;
  --paper: #fffdf7;
  --muted: #63736b;
  --line: #d8ddd4;
  --orange: #f4a261;
  --shadow: 0 24px 70px rgba(27, 67, 50, 0.13);
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 14%, rgba(215, 240, 106, 0.32), transparent 22rem),
    radial-gradient(circle at 92% 70%, rgba(244, 162, 97, 0.15), transparent 24rem),
    var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { color: inherit; }

.site-header {
  width: min(1180px, calc(100% - 40px));
  height: 88px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-dark);
  text-decoration: none;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 46px;
  height: 46px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 2px solid rgba(21, 93, 66, .18);
  border-radius: 50%;
  background: #faf5e9;
  box-shadow: 0 4px 12px rgba(21, 93, 66, .1);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  transform: scale(1.65) translateY(7%);
  object-fit: cover;
  object-position: center;
  mix-blend-mode: multiply;
}

.desktop-nav { display: flex; gap: 4px; }
.nav-link {
  border: 0;
  background: transparent;
  padding: 11px 15px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 650;
}
.nav-link:hover, .nav-link.is-active { background: rgba(255,255,255,.62); color: var(--green); }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.connection-banner {
  width: min(700px, 100%);
  margin: 12px auto 0;
  padding: 11px 15px;
  border: 1px solid #ddc473;
  border-radius: 13px;
  background: #fff5ce;
  color: #654f0e;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.connection-banner.is-error { border-color: #e1a098; background: #fff0ed; color: #7a2920; }
.connection-banner.is-connected { border-color: #a8ceb7; background: #e9f6ed; color: var(--green-dark); }
.view { display: none; animation: enter .35s ease both; }
.view.is-visible { display: block; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } }

.hero-zone {
  width: min(980px, 100%);
  min-height: 390px;
  margin: 30px auto 10px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
  align-items: center;
  gap: 14px;
}
.hero-copy { max-width: 690px; min-width: 0; margin: 0; text-align: left; }
.eyebrow {
  margin: 0 0 13px;
  color: var(--green);
  font-size: 12px;
  line-height: 1;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

h1, h2 { font-family: Georgia, "Times New Roman", serif; letter-spacing: -.035em; }
.hero-copy h1 { margin: 0; overflow-wrap: anywhere; font-size: clamp(42px, 5.7vw, 68px); line-height: .98; font-weight: 700; }
.hero-copy h1 span { color: var(--green); font-style: italic; }
.hero-copy > p:last-child { max-width: 560px; margin: 20px 0 0; color: var(--muted); font-size: 16px; }

.mascot-wrap {
  position: relative;
  width: 100%;
  max-width: 330px;
  justify-self: end;
  transform: rotate(1.5deg);
}
.hero-mascot {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 42% 46% 40% 45%;
  filter: drop-shadow(0 20px 25px rgba(21, 93, 66, .12));
  mix-blend-mode: multiply;
}
.mascot-bubble {
  position: absolute;
  top: 18px;
  right: -18px;
  z-index: 1;
  padding: 11px 16px;
  transform: rotate(5deg);
  border: 2px solid var(--green);
  border-radius: 50% 50% 48% 45%;
  background: var(--paper);
  color: var(--green);
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 800;
  box-shadow: 4px 5px 0 var(--lime);
}
.mascot-bubble::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: -9px;
  width: 13px;
  height: 13px;
  transform: rotate(34deg);
  border-right: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  background: var(--paper);
}

.poll-card {
  width: min(700px, 100%);
  max-width: 100%;
  min-width: 0;
  margin: 0 auto;
  padding: 34px 38px 0;
  overflow: hidden;
  border: 1px solid rgba(21,93,66,.12);
  border-radius: 28px;
  background: rgba(255,253,247,.94);
  box-shadow: var(--shadow);
}

.poll-meta { display: flex; align-items: center; justify-content: space-between; }
.category-pill {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
}
.poll-number { color: #849087; font-size: 12px; font-weight: 700; }
.poll-card h2 { margin: 28px 0; font-size: clamp(29px, 5vw, 42px); line-height: 1.08; text-align: center; }
.option-list { display: grid; gap: 12px; }
.option-button {
  width: 100%;
  min-height: 68px;
  padding: 10px 16px;
  display: grid;
  grid-template-columns: 42px 1fr 30px;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--line);
  border-radius: 17px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  font-size: 17px;
  font-weight: 750;
  transition: .18s ease;
}
.option-button:hover { border-color: var(--green); transform: translateY(-2px); box-shadow: 0 10px 22px rgba(21,93,66,.09); }
.option-letter {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; background: var(--cream); color: var(--green); font-size: 13px; font-weight: 900;
}
.option-arrow { justify-self: end; color: var(--green); font-size: 20px; }
.privacy-note { display: flex; justify-content: center; align-items: center; gap: 7px; margin: 19px 0 27px; color: #7c8982; font-size: 12px; }
.privacy-note svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

.poll-footer {
  margin: 0 -38px;
  min-height: 82px;
  padding: 17px 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #edf2e8;
  border-top: 1px solid #e0e6dc;
}
.footer-label { display: block; margin-bottom: 3px; color: #6f7d75; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.countdown { font-variant-numeric: tabular-nums; font-size: 21px; letter-spacing: .05em; }
.participants { display: flex; align-items: center; gap: 9px; color: #617068; font-size: 12px; }
.avatar-stack { display: flex; }
.avatar-stack i { width: 25px; height: 25px; margin-left: -7px; border: 2px solid #edf2e8; border-radius: 50%; background: var(--green); }
.avatar-stack i:nth-child(2) { background: var(--orange); }
.avatar-stack i:nth-child(3) { background: var(--lime); }

.confirmation { padding: 20px 10px 42px; text-align: center; }
.confirmation-icon { width: 54px; height: 54px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: white; font-size: 25px; font-weight: 900; }
.confirmation h2 { margin: 8px 0 15px; }
.confirmation > p:not(.eyebrow) { max-width: 490px; margin: 0 auto; color: var(--muted); line-height: 1.6; }
.share-button { margin-top: 24px; padding: 14px 22px; border: 0; border-radius: 14px; background: var(--green); color: #fff; cursor: pointer; font-weight: 800; }

.daily-teasers {
  width: min(700px, 100%);
  margin: 18px auto 80px;
  display: grid;
  gap: 11px;
}
.yesterday-card {
  width: 100%;
  min-height: 88px;
  margin: 0;
  padding: 15px 22px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  border: 1px solid rgba(21,93,66,.13);
  border-radius: 20px;
  background: rgba(255,255,255,.5);
  cursor: pointer;
  text-align: left;
}
.yesterday-card small { display: block; margin-bottom: 5px; color: var(--muted); font-weight: 650; }
.yesterday-card strong { font-family: Georgia, serif; font-size: 18px; }
.yesterday-dog { font-size: 30px; }
.text-link { color: var(--green); font-size: 13px; font-weight: 800; }

.tomorrow-card {
  min-height: 88px;
  padding: 15px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  overflow: hidden;
  border: 1px solid rgba(21, 93, 66, .16);
  border-radius: 20px;
  background:
    linear-gradient(105deg, rgba(215, 240, 106, .48), rgba(255, 253, 247, .78) 68%),
    var(--paper);
  position: relative;
}
.tomorrow-card::after {
  content: "";
  position: absolute;
  width: 95px;
  height: 95px;
  right: -35px;
  top: -45px;
  border: 18px solid rgba(21, 93, 66, .06);
  border-radius: 50%;
}
.tomorrow-card small { display: block; margin-bottom: 5px; color: var(--green); font-weight: 800; }
.tomorrow-card strong { font-family: Georgia, serif; font-size: 18px; }
.tomorrow-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--green);
  font-size: 20px;
}
.tomorrow-time {
  position: relative;
  z-index: 1;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.content-view { padding: 70px 0 100px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 45px; }
.section-heading h1, .about-layout h1 { max-width: 720px; margin: 0; font-size: clamp(42px, 6vw, 70px); line-height: 1; }
.section-heading > p { max-width: 390px; margin: 0; color: var(--muted); line-height: 1.6; }

.result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.result-card { min-height: 260px; padding: 24px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 22px; background: rgba(255,253,247,.86); cursor: pointer; text-align: left; transition: .2s ease; }
.result-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(21,93,66,.1); }
.result-card .date { color: var(--muted); font-size: 12px; font-weight: 700; }
.result-card h2 { margin: 25px 0 auto; font-size: 26px; line-height: 1.08; }
.result-bar { height: 9px; margin: 23px 0 10px; overflow: hidden; border-radius: 99px; background: #e7e4da; }
.result-bar span { display: block; height: 100%; border-radius: inherit; background: var(--green); }
.result-card footer { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.result-card footer strong { color: var(--green); }

.stats-card, .empty-card { padding: 34px; border: 1px solid var(--line); border-radius: 25px; background: var(--paper); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { padding: 25px; border-radius: 18px; background: #edf2e8; }
.stat strong { display: block; font-family: Georgia, serif; font-size: 42px; color: var(--green); }
.stat span { color: var(--muted); font-size: 13px; }
.my-list { margin-top: 30px; border-top: 1px solid var(--line); }
.my-item { padding: 18px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.my-item small { display: block; color: var(--muted); margin-top: 4px; }
.ghost-button { margin-top: 25px; border: 0; background: transparent; color: var(--muted); text-decoration: underline; cursor: pointer; }

.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.steps { margin: 0; padding: 0; list-style: none; }
.steps li { padding: 24px 0; display: grid; grid-template-columns: 48px 1fr; gap: 16px; border-bottom: 1px solid var(--line); }
.steps li > span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--lime); font-weight: 900; }
.steps strong { font-family: Georgia, serif; font-size: 24px; }
.steps p { margin: 7px 0 0; color: var(--muted); line-height: 1.55; }

.back-button { margin-bottom: 35px; padding: 0; border: 0; background: transparent; color: var(--green); cursor: pointer; font-weight: 800; }
.detail-card { padding: 45px; border-radius: 28px; background: var(--paper); box-shadow: var(--shadow); }
.detail-card h1 { max-width: 760px; margin: 10px 0 35px; font-size: clamp(38px, 6vw, 64px); line-height: 1.02; }
.detail-options { display: grid; gap: 18px; }
.detail-option { position: relative; min-height: 75px; padding: 17px 20px; overflow: hidden; border-radius: 16px; background: #e8ece6; }
.detail-option .fill { position: absolute; inset: 0 auto 0 0; background: var(--lime); }
.detail-option.is-winner .fill { background: #b9dc6c; }
.detail-option .label { position: relative; display: flex; justify-content: space-between; align-items: center; font-weight: 800; }
.detail-option .label strong { font-size: 26px; }
.detail-footer { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); }
.detail-footer .share-button { margin: 0; }

.mobile-nav { display: none; }
.toast { position: fixed; left: 50%; bottom: 25px; z-index: 20; padding: 12px 18px; transform: translate(-50%, 20px); border-radius: 12px; background: var(--ink); color: white; opacity: 0; pointer-events: none; transition: .25s ease; font-size: 13px; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 800px) {
  .site-header { width: calc(100% - 28px); height: 72px; }
  .desktop-nav { display: none; }
  main { width: calc(100% - 28px); }
  .hero-zone { min-height: 0; margin: 30px auto 22px; grid-template-columns: minmax(0, 1fr) 155px; gap: 8px; }
  .hero-copy { margin: 0; text-align: left; }
  .hero-copy h1 { font-size: 39px; }
  .hero-copy > p:last-child { max-width: 330px; margin: 15px 0 0; font-size: 14px; line-height: 1.5; }
  .mascot-wrap { width: 145px; max-width: 100%; margin-right: 0; align-self: end; }
  .mascot-bubble { top: 2px; right: 0; padding: 7px 11px; font-size: 14px; box-shadow: 3px 3px 0 var(--lime); }
  .poll-card { padding: 24px 20px 0; border-radius: 23px; }
  .poll-card h2 { margin: 24px 0; overflow-wrap: anywhere; font-size: 31px; }
  .poll-footer { margin: 0 -20px; padding: 16px 20px; }
  .participants .avatar-stack { display: none; }
  .daily-teasers { margin-bottom: 100px; }
  .yesterday-card { grid-template-columns: 1fr auto; gap: 10px; }
  .yesterday-card .text-link { grid-column: 1 / -1; }
  .tomorrow-card { grid-template-columns: auto 1fr; }
  .tomorrow-time { grid-column: 2; justify-self: start; }
  .content-view { padding: 42px 0 100px; }
  .section-heading { display: block; margin-bottom: 30px; }
  .section-heading h1, .about-layout h1 { font-size: 43px; }
  .section-heading > p { margin-top: 18px; }
  .result-grid { grid-template-columns: 1fr; }
  .result-card { min-height: 220px; }
  .about-layout { grid-template-columns: 1fr; gap: 30px; }
  .stats-row { grid-template-columns: 1fr; }
  .detail-card { padding: 27px 20px; }
  .detail-footer { align-items: flex-start; flex-direction: column; gap: 20px; }
  .mobile-nav {
    position: fixed; inset: auto 0 0; z-index: 10;
    min-height: 72px; padding: 8px max(10px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
    display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(255,253,247,.96); border-top: 1px solid var(--line); backdrop-filter: blur(14px);
  }
  .mobile-nav button { display: grid; gap: 3px; place-items: center; border: 0; background: transparent; color: #7e8a83; font-size: 10px; font-weight: 750; }
  .mobile-nav button span { font-size: 18px; }
  .mobile-nav button.is-active { color: var(--green); }
  .toast { bottom: 88px; }
}

@media (max-width: 430px) {
  .brand { font-size: 20px; }
  .brand-mark { width: 39px; height: 39px; }
  .hero-zone { grid-template-columns: minmax(0, 1fr) 110px; gap: 4px; }
  .hero-copy h1 { font-size: 32px; }
  .hero-copy > p:last-child { max-width: 255px; }
  .mascot-wrap { width: 106px; max-width: 100%; margin-right: 0; }
  .mascot-bubble { display: none; }
  .poll-card h2 { font-size: 28px; }
  .option-button { min-height: 62px; font-size: 15px; }
  .poll-footer { gap: 15px; }
  .participants { text-align: right; }
  .privacy-note { align-items: flex-start; text-align: center; line-height: 1.4; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
