/* =========================================================
   票迹 PIAOJI
   A small, opinionated design system for a voting site.
   ========================================================= */

:root {
  --ink: #181713;
  --ink-2: #2b2a24;
  --paper: #f2eee3;
  --paper-deep: #e9e3d4;
  --surface: #fbf9f3;
  --surface-strong: #ffffff;
  --lime: #d9f45f;
  --lime-strong: #c8ec36;
  --lime-soft: #eef9b8;
  --coral: #ff7659;
  --coral-soft: #ffe0d7;
  --violet: #8a7aff;
  --violet-soft: #e7e3ff;
  --blue: #69a7ff;
  --muted: #67635a;
  --muted-light: #99948a;
  --line: rgba(24, 23, 19, 0.13);
  --line-strong: rgba(24, 23, 19, 0.26);
  --shadow-sm: 0 4px 16px rgba(40, 35, 22, 0.06);
  --shadow-md: 0 18px 42px rgba(40, 35, 22, 0.09);
  --shadow-lg: 0 32px 80px rgba(40, 35, 22, 0.14);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 30px;
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --shell: 1180px;
  --header-height: 72px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 2%, rgba(217, 244, 95, 0.36), transparent 25rem),
    radial-gradient(circle at 95% 10%, rgba(255, 118, 89, 0.19), transparent 25rem),
    var(--paper);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image:
    linear-gradient(rgba(24, 23, 19, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 23, 19, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
  pointer-events: none;
  content: "";
}

::selection {
  color: var(--ink);
  background: var(--lime);
}

body.is-locked {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 16px;
  border-radius: 8px;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-150%);
  transition: transform 0.2s;
}

.skip-link:focus {
  transform: translateY(0);
}

:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.shell {
  display: flex;
  flex-direction: column;
  width: min(100% - 40px, var(--shell));
  min-height: 100vh;
  margin: 0 auto;
}

.page {
  flex: 1;
  padding: 24px 0 72px;
}

.sr-only {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  padding: 0;
  border: 0;
  margin: -1px;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ---------- Buttons & chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 0.25s var(--ease),
    background 0.25s,
    border-color 0.25s,
    box-shadow 0.25s,
    opacity 0.25s;
}

.btn .icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease);
}

.btn:hover .icon.icon-arrow {
  transform: translate(2px, -2px);
}

.btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.btn-primary {
  color: var(--surface);
  background: var(--ink);
  box-shadow: 0 6px 0 rgba(24, 23, 19, 0.12);
}

.btn-primary:hover {
  background: #2d2c25;
  box-shadow: 0 9px 0 rgba(24, 23, 19, 0.1);
  transform: translateY(-2px);
}

.btn-lime {
  color: var(--ink);
  background: var(--lime);
  box-shadow: 0 6px 0 rgba(24, 23, 19, 0.14);
}

.btn-lime:hover {
  background: var(--lime-strong);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line-strong);
  color: var(--ink);
  background: rgba(251, 249, 243, 0.46);
}

.btn-ghost:hover {
  border-color: var(--ink);
  background: var(--surface);
  transform: translateY(-2px);
}

.btn-quiet {
  min-height: 40px;
  padding: 0 15px;
  border-color: var(--line);
  color: var(--ink);
  background: transparent;
  box-shadow: none;
}

.btn-quiet:hover {
  border-color: var(--ink);
  background: rgba(255, 255, 255, 0.5);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  min-height: 42px;
  padding: 0 18px;
  font-size: 13px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

.text-link .icon {
  width: 16px;
  height: 16px;
}

.text-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.tag,
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
}

.tag {
  color: var(--ink-2);
  background: var(--paper-deep);
}

.tag--coral {
  background: var(--coral-soft);
}

.tag--violet {
  background: var(--violet-soft);
}

.tag--lime {
  background: var(--lime-soft);
}

.status-pill {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.38);
}

.status-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-pill--live {
  border-color: transparent;
  color: #4e6411;
  background: var(--lime);
}

.status-pill--live::before {
  background: #6f8c12;
  box-shadow: 0 0 0 3px rgba(111, 140, 18, 0.13);
  animation: live-pulse 2s ease-out infinite;
}

.status-pill--closed {
  color: var(--muted);
  background: rgba(24, 23, 19, 0.04);
}

.eyebrow,
.section-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 5px rgba(255, 118, 89, 0.13);
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  z-index: 50;
  top: 16px;
  display: flex;
  align-items: center;
  gap: 26px;
  min-height: var(--header-height);
  margin-top: 16px;
  padding: 10px 13px 10px 18px;
  border: 1px solid rgba(24, 23, 19, 0.1);
  border-radius: 22px;
  background: rgba(251, 249, 243, 0.77);
  box-shadow: 0 12px 36px rgba(44, 38, 24, 0.07);
  backdrop-filter: blur(18px) saturate(1.35);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: var(--lime);
  background: var(--ink);
  place-items: center;
  transform: rotate(-3deg);
  transition: transform 0.35s var(--ease);
}

.brand:hover .brand-mark {
  transform: rotate(4deg) scale(1.04);
}

.brand-mark .icon {
  width: 23px;
  height: 23px;
}

.brand-word {
  display: flex;
  flex-direction: column;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.brand-word small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.19em;
  line-height: 1;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 39px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  transition:
    color 0.2s,
    background 0.2s;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(24, 23, 19, 0.05);
}

.nav-link.is-active {
  color: var(--ink);
  background: var(--lime);
}

.nav-count {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  color: var(--surface);
  background: var(--ink);
  font-size: 10px;
  line-height: 18px;
  place-items: center;
}

.header-action {
  flex: 0 0 auto;
}

.mobile-tabbar {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: 52px;
  align-items: center;
  min-height: 560px;
  padding: 66px 10px 58px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  margin-bottom: 23px;
}

.hero h1 {
  max-width: 760px;
  font-size: clamp(62px, 8.4vw, 112px);
  font-weight: 900;
  letter-spacing: -0.085em;
  line-height: 0.95;
}

.hero-line {
  display: block;
  white-space: nowrap;
}

.marker-word {
  position: relative;
  display: inline-block;
  z-index: 0;
  padding: 0 0.065em;
  font-family: var(--font-serif);
  font-weight: 900;
  letter-spacing: -0.08em;
}

.marker-word::before {
  position: absolute;
  z-index: -1;
  right: -0.03em;
  bottom: 0.07em;
  left: -0.03em;
  height: 0.34em;
  border-radius: 5px 10px 6px 3px;
  background: var(--lime);
  content: "";
  transform: rotate(-1.8deg);
}

.marker-word::after {
  position: absolute;
  top: -0.22em;
  right: -0.34em;
  width: 26px;
  height: 26px;
  background:
    linear-gradient(var(--coral), var(--coral)) center / 2px 100% no-repeat,
    linear-gradient(var(--coral), var(--coral)) center / 100% 2px no-repeat;
  content: "";
  transform: rotate(16deg);
}

.hero-lead {
  max-width: 470px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

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

.hero-actions .btn {
  min-height: 54px;
  padding: 0 25px;
  font-size: 15px;
}

.hero-proof {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 36px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.avatar-stack {
  display: flex;
  padding-left: 7px;
}

.avatar {
  display: grid;
  width: 29px;
  height: 29px;
  margin-left: -7px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  place-items: center;
}

.avatar:nth-child(1) {
  background: var(--lime);
}

.avatar:nth-child(2) {
  background: var(--coral);
}

.avatar:nth-child(3) {
  background: var(--violet);
  color: #fff;
}

.avatar:nth-child(4) {
  background: var(--ink);
  color: var(--surface);
}

.hero-proof strong {
  color: var(--ink);
  font-weight: 800;
}

.hero-visual {
  position: relative;
  display: grid;
  min-height: 458px;
  place-items: center;
}

.hero-orbit {
  position: absolute;
  width: 430px;
  height: 430px;
  border: 1px solid rgba(24, 23, 19, 0.12);
  border-radius: 50%;
  animation: slow-spin 40s linear infinite;
}

.hero-orbit::before,
.hero-orbit::after {
  position: absolute;
  border-radius: 50%;
  content: "";
}

.hero-orbit::before {
  top: 42px;
  right: 32px;
  width: 19px;
  height: 19px;
  background: var(--violet);
  box-shadow: 0 0 0 7px rgba(138, 122, 255, 0.12);
}

.hero-orbit::after {
  bottom: 55px;
  left: 28px;
  width: 13px;
  height: 13px;
  background: var(--coral);
  box-shadow: 0 0 0 6px rgba(255, 118, 89, 0.13);
}

.hero-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 385px;
  height: 385px;
  border-radius: 47% 53% 56% 44% / 42% 43% 57% 58%;
  background: var(--lime);
  opacity: 0.72;
  transform: translate(-50%, -50%) rotate(9deg);
  animation: blob-morph 9s ease-in-out infinite alternate;
}

.live-ticket {
  position: relative;
  z-index: 3;
  width: min(100%, 380px);
  padding: 24px 24px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: 12px 14px 0 var(--ink);
  transform: rotate(-3.2deg);
  transition: transform 0.45s var(--ease);
  animation: ticket-float 6s ease-in-out infinite;
}

.hero-visual:hover .live-ticket {
  transform: rotate(-0.6deg) translateY(-5px);
}

.ticket-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.live-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--coral);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.live-flag::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(255, 118, 89, 0.14);
  animation: live-pulse 1.8s ease-out infinite;
  content: "";
}

.ticket-index {
  color: var(--muted-light);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.ticket-title {
  margin-bottom: 9px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.35;
}

.ticket-subtitle {
  color: var(--muted);
  font-size: 12px;
}

.ticket-options {
  display: grid;
  gap: 8px;
  margin-top: 19px;
}

.ticket-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 700;
}

.ticket-option::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--percent);
  background: var(--fill, var(--lime-soft));
  content: "";
}

.ticket-option span,
.ticket-option b {
  position: relative;
  z-index: 1;
}

.ticket-option b {
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 11px;
}

.ticket-option:nth-child(1) {
  --fill: var(--lime-soft);
}

.ticket-option:nth-child(2) {
  --fill: var(--coral-soft);
}

.ticket-option:nth-child(3) {
  --fill: var(--violet-soft);
}

.ticket-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.ticket-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.ticket-foot .icon {
  width: 13px;
  height: 13px;
}

.sticker {
  position: absolute;
  z-index: 4;
  right: -6px;
  bottom: 25px;
  display: grid;
  width: 112px;
  height: 112px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--coral);
  box-shadow: 5px 6px 0 var(--ink);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-align: center;
  place-items: center;
  transform: rotate(9deg);
}

.sticker::before {
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(24, 23, 19, 0.5);
  border-radius: 50%;
  content: "";
}

.sticker .icon {
  position: absolute;
  top: 18px;
  width: 21px;
  height: 21px;
}

.floating-note {
  position: absolute;
  z-index: 5;
  top: 14px;
  left: -10px;
  padding: 9px 14px;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: var(--violet);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  box-shadow: 3px 4px 0 var(--ink);
  transform: rotate(-8deg);
}

/* ---------- Stats ribbon ---------- */

.stats-ribbon {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: center;
  margin: 3px 0 72px;
  padding: 24px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(251, 249, 243, 0.55);
  box-shadow: var(--shadow-sm);
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 9px;
  justify-content: center;
}

.stat strong {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  letter-spacing: -0.05em;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--line);
}

/* ---------- Poll discovery ---------- */

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

.section-head h2 {
  margin-top: 7px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 900;
  letter-spacing: -0.06em;
}

.section-head h2 em {
  color: var(--coral);
  font-family: var(--font-serif);
  font-style: normal;
}

.section-head-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 249, 243, 0.75);
}

.segmented button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.segmented button:hover {
  color: var(--ink);
}

.segmented button.is-active {
  color: var(--surface);
  background: var(--ink);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  width: 205px;
  min-height: 43px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 249, 243, 0.74);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.search-field:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(217, 244, 95, 0.4);
}

.search-field .icon {
  width: 17px;
  height: 17px;
  margin-left: 15px;
  color: var(--muted);
}

.search-field input {
  width: 100%;
  height: 41px;
  padding: 0 14px 0 9px;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.search-field input::placeholder {
  color: var(--muted-light);
}

.poll-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.poll-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: 25px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    border-color 0.35s;
}

.poll-card::after {
  position: absolute;
  top: -70px;
  right: -70px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--lime-soft);
  opacity: 0;
  content: "";
  transition: opacity 0.4s;
}

.poll-card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.poll-card:hover::after {
  opacity: 0.6;
}

.poll-card > * {
  position: relative;
  z-index: 1;
}

.poll-card.is-featured {
  color: var(--surface);
  background:
    radial-gradient(circle at 85% 12%, rgba(217, 244, 95, 0.17), transparent 16rem),
    var(--ink);
  border-color: var(--ink);
  box-shadow: 0 18px 40px rgba(24, 23, 19, 0.16);
}

.poll-card.is-featured:hover {
  box-shadow: var(--shadow-lg);
}

.poll-card.is-featured::after {
  background: var(--lime);
  opacity: 0.1;
}

.poll-card.is-closed {
  background: rgba(251, 249, 243, 0.62);
}

.poll-card.is-closed.is-featured {
  color: var(--surface);
  background: var(--ink-2);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 19px;
}

.poll-card.is-featured .tag {
  color: var(--ink);
  background: var(--lime);
}

.poll-card.is-featured .status-pill {
  color: rgba(251, 249, 243, 0.72);
  border-color: rgba(251, 249, 243, 0.18);
  background: rgba(255, 255, 255, 0.05);
}

.poll-card.is-featured .status-pill--live {
  color: var(--ink);
  border-color: transparent;
  background: var(--lime);
}

.card-title {
  display: block;
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: clamp(21px, 2.2vw, 27px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}

.card-title:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.card-desc {
  display: -webkit-box;
  overflow: hidden;
  max-width: 94%;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.75;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.poll-card.is-featured .card-desc {
  color: rgba(251, 249, 243, 0.58);
}

.card-options {
  display: grid;
  gap: 11px;
  margin-top: 23px;
}

.mini-option {
  display: grid;
  gap: 5px;
}

.mini-option-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-2);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.mini-option-head span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-option-head b {
  color: var(--muted);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 10px;
  font-weight: 600;
}

.poll-card.is-featured .mini-option-head {
  color: rgba(251, 249, 243, 0.84);
}

.poll-card.is-featured .mini-option-head b {
  color: rgba(251, 249, 243, 0.46);
}

.mini-bar {
  position: relative;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(24, 23, 19, 0.08);
}

.mini-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--width);
  border-radius: inherit;
  background: var(--bar-color, var(--ink));
  transform-origin: left;
  animation: bar-grow 0.8s var(--ease) both;
}

.mini-option:nth-child(1) {
  --bar-color: #b9d950;
}

.mini-option:nth-child(2) {
  --bar-color: var(--coral);
}

.mini-option:nth-child(3) {
  --bar-color: var(--violet);
}

.poll-card.is-featured .mini-bar {
  background: rgba(251, 249, 243, 0.12);
}

.poll-card.is-featured .mini-option:nth-child(1) {
  --bar-color: var(--lime);
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: auto;
  padding-top: 21px;
}

.card-meta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.card-meta .icon {
  width: 14px;
  height: 14px;
}

.poll-card.is-featured .card-meta {
  color: rgba(251, 249, 243, 0.5);
}

.card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-left: auto;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: 0.25s;
}

.card-cta .icon {
  width: 14px;
  height: 14px;
}

.card-cta:hover {
  color: var(--surface);
  background: var(--ink);
  transform: translateX(2px);
}

.poll-card.is-featured .card-cta {
  border-color: var(--lime);
  color: var(--ink);
  background: var(--lime);
}

.poll-card.is-featured .card-cta:hover {
  background: var(--surface);
}

.card-voted {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #5d7712;
  font-size: 10px;
  font-weight: 800;
}

.poll-card.is-featured .card-voted {
  color: var(--lime);
}

.card-voted .icon {
  width: 13px;
  height: 13px;
}

/* ---------- Empty & loading ---------- */

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.skeleton-card {
  height: 330px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.7) 50%, transparent 80%) 0 0 / 200% 100%,
    rgba(251, 249, 243, 0.6);
  animation: shimmer 1.4s infinite linear;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 350px;
  padding: 48px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  text-align: center;
  background: rgba(251, 249, 243, 0.34);
}

.empty-illustration {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  margin-bottom: 25px;
  border: 1.5px solid var(--ink);
  border-radius: 24px;
  color: var(--ink);
  background: var(--lime);
  box-shadow: 7px 8px 0 var(--ink);
  place-items: center;
  transform: rotate(-5deg);
}

.empty-illustration .icon {
  width: 40px;
  height: 40px;
}

.empty-state h3 {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.empty-state p {
  max-width: 330px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.empty-state .btn {
  margin-top: 22px;
}

/* ---------- Detail ---------- */

.detail-page {
  padding-top: 32px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--ink);
}

.back-link .icon {
  width: 16px;
  height: 16px;
  transition: transform 0.25s var(--ease);
}

.back-link:hover .icon {
  transform: translateX(-3px);
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 325px;
  gap: 20px;
  align-items: start;
}

.poll-main {
  padding: clamp(24px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.poll-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.poll-head h1 {
  max-width: 760px;
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1.1;
  text-wrap: balance;
}

.poll-description {
  max-width: 690px;
  margin-top: 17px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.85;
}

.poll-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 25px;
  padding-bottom: 27px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.poll-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.poll-meta .icon {
  width: 15px;
  height: 15px;
}

.vote-block {
  padding-top: 27px;
}

.vote-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 15px;
}

.vote-heading h2 {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.vote-heading p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.option-list {
  display: grid;
  gap: 9px;
}

.option-row {
  position: relative;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 66px;
  padding: 13px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(242, 238, 227, 0.38);
  text-align: left;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;
}

.option-row::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--percent);
  background: var(--bar-bg, var(--lime-soft));
  opacity: 0.5;
  content: "";
  transition: width 0.7s var(--ease);
}

.option-row:nth-child(1) {
  --bar-bg: var(--lime-soft);
}

.option-row:nth-child(2) {
  --bar-bg: var(--coral-soft);
}

.option-row:nth-child(3) {
  --bar-bg: var(--violet-soft);
}

.option-row:nth-child(4) {
  --bar-bg: #d9edff;
}

.option-row:nth-child(5) {
  --bar-bg: #ffe9b8;
}

.option-row:nth-child(6) {
  --bar-bg: #d8f7e8;
}

.option-row:nth-child(7) {
  --bar-bg: #f5ddf3;
}

.option-row:nth-child(8) {
  --bar-bg: #e9e4d6;
}

.option-row:hover:not(:disabled) {
  border-color: var(--ink);
  background: var(--surface);
  transform: translateX(2px);
}

.option-row.is-selected {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--ink);
}

.option-row.is-selected .option-control {
  color: var(--ink);
  border-color: var(--ink);
  background: var(--lime);
}

.option-row.is-selected .option-control .icon {
  opacity: 1;
  transform: scale(1);
}

.option-row:disabled {
  cursor: default;
}

.option-row.is-muted:not(.is-selected) {
  opacity: 0.68;
}

.option-control {
  position: relative;
  display: grid;
  width: 23px;
  height: 23px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  color: var(--surface);
  background: transparent;
  place-items: center;
  transition: 0.2s;
}

.option-control.is-square {
  border-radius: 7px;
}

.option-control .icon {
  width: 14px;
  height: 14px;
  opacity: 0;
  transform: scale(0.6);
  transition: 0.2s var(--ease);
}

.option-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.option-label {
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.option-caption {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.option-percent {
  position: relative;
  z-index: 1;
  min-width: 54px;
  color: var(--ink);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.04em;
  text-align: right;
}

.option-percent small {
  margin-left: 1px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
}

.vote-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.vote-actions .btn {
  min-width: 160px;
}

.vote-hint {
  color: var(--muted);
  font-size: 10.5px;
}

.voted-banner {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 15px;
  padding: 14px 16px;
  border: 1px solid rgba(111, 140, 18, 0.22);
  border-radius: 13px;
  color: #4d6210;
  background: var(--lime-soft);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.55;
}

.voted-banner .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
}

.closed-banner {
  border-color: rgba(24, 23, 19, 0.1);
  color: var(--muted);
  background: rgba(24, 23, 19, 0.04);
}

.detail-aside {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 13px;
}

.result-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--ink);
  color: var(--surface);
  box-shadow: var(--shadow-sm);
}

.result-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(251, 249, 243, 0.48);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.result-label span:last-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--lime);
}

.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  animation: live-pulse 2s infinite;
}

.result-donut-wrap {
  display: flex;
  justify-content: center;
  padding: 26px 0 24px;
}

.result-donut {
  position: relative;
  display: grid;
  width: 154px;
  height: 154px;
  border-radius: 50%;
  background: var(--donut, rgba(251, 249, 243, 0.12));
  place-items: center;
}

.result-donut::before {
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  background: var(--ink);
  content: "";
}

.result-donut-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.result-donut-inner strong {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.result-donut-inner small {
  margin-top: 5px;
  color: rgba(251, 249, 243, 0.45);
  font-size: 9px;
  font-weight: 600;
}

.result-legend {
  display: grid;
  gap: 7px;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(251, 249, 243, 0.7);
  font-size: 10px;
}

.legend-dot {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.legend-row span:nth-child(2) {
  overflow: hidden;
  flex: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend-row b {
  color: var(--surface);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 10px;
}

.result-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(251, 249, 243, 0.12);
  color: rgba(251, 249, 243, 0.45);
  font-size: 9px;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(251, 249, 243, 0.17);
  border-radius: 999px;
  color: var(--surface);
  background: transparent;
  font-size: 9px;
  font-weight: 700;
  cursor: pointer;
}

.share-btn:hover {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

.share-btn .icon {
  width: 12px;
  height: 12px;
}

.aside-card {
  padding: 20px 21px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: rgba(251, 249, 243, 0.67);
}

.aside-card h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 9px;
  font-size: 12px;
  font-weight: 800;
}

.aside-card h3 .icon {
  width: 15px;
  height: 15px;
}

.aside-card p {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.creator-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.creator-avatar {
  display: grid;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--violet-soft);
  font-size: 13px;
  font-weight: 900;
  place-items: center;
}

.creator-line strong {
  display: block;
  font-size: 12px;
  line-height: 1.3;
}

.creator-line span {
  color: var(--muted);
  font-size: 9px;
}

.owner-box {
  border-color: rgba(255, 118, 89, 0.28);
  background: var(--coral-soft);
}

.owner-box .btn {
  margin-top: 12px;
}

.detail-endcap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 30px;
  color: var(--muted-light);
  font-size: 10px;
}

.detail-endcap .icon {
  width: 13px;
  height: 13px;
}

/* ---------- Create ---------- */

.create-page {
  max-width: 1080px;
  margin: 0 auto;
  padding-top: 32px;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 30px;
}

.page-heading h1 {
  margin-top: 8px;
  font-size: clamp(40px, 6vw, 66px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 1;
}

.page-heading p {
  max-width: 430px;
  padding-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.create-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: start;
}

.create-form {
  display: grid;
  gap: 13px;
}

.form-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

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

.form-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 16px;
}

.form-section-head h2 {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.form-section-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
}

.step-number {
  display: inline-grid;
  width: 23px;
  height: 23px;
  margin-right: 7px;
  border-radius: 7px;
  color: var(--ink);
  background: var(--lime);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 10px;
  font-weight: 800;
  vertical-align: 1px;
  place-items: center;
}

.field {
  display: grid;
  gap: 7px;
}

.field + .field {
  margin-top: 18px;
}

.field > label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 750;
}

.field-label small,
.field > label small {
  color: var(--muted-light);
  font-size: 9.5px;
  font-weight: 500;
}

.field input[type="text"],
.field textarea,
.field input[type="datetime-local"] {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: 0;
  background: rgba(242, 238, 227, 0.38);
  font-size: 13px;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--muted-light);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(217, 244, 95, 0.44);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.7;
}

.field.has-error input,
.field.has-error textarea,
.option-field.has-error input {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 118, 89, 0.12);
}

.field-error {
  min-height: 0;
  color: #c5482e;
  font-size: 10px;
  font-weight: 600;
}

#optionFields.has-error .option-field:first-child input {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 118, 89, 0.12);
}

.form-alert {
  padding: 13px 16px;
  border: 1px solid rgba(197, 72, 46, 0.2);
  border-radius: 12px;
  color: #a63b26;
  background: var(--coral-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

[hidden] {
  display: none !important;
}

.counter {
  color: var(--muted-light);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 9px;
}

.option-fields {
  display: grid;
  gap: 9px;
}

.option-field {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) 34px;
  gap: 7px;
  align-items: center;
}

.option-index {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--paper-deep);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: 9px;
  font-weight: 700;
  place-items: center;
}

.option-field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: rgba(242, 238, 227, 0.38);
  font-size: 12.5px;
  transition: 0.2s;
}

.option-field input:focus {
  border-color: var(--ink);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(217, 244, 95, 0.4);
}

.remove-option {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  place-items: center;
}

.remove-option:hover:not(:disabled) {
  color: #b53f27;
  background: var(--coral-soft);
}

.remove-option:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}

.remove-option .icon {
  width: 15px;
  height: 15px;
}

.add-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 11px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.add-option:hover {
  color: var(--ink);
}

.add-option .icon {
  width: 15px;
  height: 15px;
}

.chip-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.choice-chip {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s;
}

.choice-chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.choice-chip.is-active {
  border-color: var(--ink);
  color: var(--surface);
  background: var(--ink);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.switch-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 48px;
  padding: 0 2px;
}

.switch-copy strong {
  display: block;
  font-size: 11.5px;
  font-weight: 750;
}

.switch-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.switch {
  position: relative;
  flex: 0 0 auto;
  width: 44px;
  height: 25px;
  border-radius: 999px;
  background: rgba(24, 23, 19, 0.16);
  cursor: pointer;
  transition: background 0.25s;
}

.switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
  content: "";
  transition: transform 0.3s var(--ease);
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch:has(input:checked) {
  background: var(--ink);
}

.switch:has(input:checked)::after {
  transform: translateX(19px);
}

.switch:has(input:focus-visible) {
  outline: 3px solid var(--violet);
  outline-offset: 3px;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 6px 4px 0;
}

.form-actions .form-note {
  max-width: 280px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.6;
}

.form-actions .btn {
  min-width: 180px;
  min-height: 54px;
}

.preview-column {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 12px;
}

.preview-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.preview-label span:last-child {
  color: var(--coral);
}

.preview-column .poll-card {
  min-height: 340px;
  pointer-events: none;
  background: var(--ink);
  color: var(--surface);
  border-color: var(--ink);
  transform: rotate(1.2deg);
  box-shadow: var(--shadow-md);
}

.preview-column .poll-card .tag {
  color: var(--ink);
  background: var(--lime);
}

.preview-column .poll-card .status-pill--live {
  color: var(--ink);
  border-color: transparent;
  background: var(--lime);
}

.preview-column .poll-card .card-desc {
  color: rgba(251, 249, 243, 0.58);
}

.preview-column .poll-card .mini-option-head {
  color: rgba(251, 249, 243, 0.8);
}

.preview-column .poll-card .mini-option-head b {
  color: rgba(251, 249, 243, 0.4);
}

.preview-column .poll-card .mini-bar {
  background: rgba(251, 249, 243, 0.13);
}

.preview-column .poll-card .mini-option:nth-child(1) {
  --bar-color: var(--lime);
}

.preview-column .poll-card .card-meta {
  color: rgba(251, 249, 243, 0.5);
}

.preview-column .poll-card .card-cta {
  color: var(--ink);
  background: var(--lime);
  border-color: var(--lime);
}

.preview-tip {
  display: flex;
  gap: 10px;
  padding: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: 17px;
  color: var(--muted);
  background: rgba(251, 249, 243, 0.4);
  font-size: 9.5px;
  line-height: 1.7;
}

.preview-tip .icon {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}

/* ---------- Mine ---------- */

.mine-page {
  max-width: 1000px;
  margin: 0 auto;
  padding-top: 32px;
}

.mine-list {
  display: grid;
  gap: 11px;
}

.mine-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: 21px 23px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.25s var(--ease),
    box-shadow 0.25s;
}

.mine-row:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.mine-main {
  min-width: 0;
}

.mine-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
}

.mine-title {
  overflow: hidden;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mine-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 13px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 10px;
}

.mine-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.mine-meta .icon {
  width: 13px;
  height: 13px;
}

.mine-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.mine-actions .btn {
  min-height: 36px;
  padding: 0 13px;
  font-size: 10.5px;
}

.mine-empty {
  padding-top: 10px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  padding: 28px 4px 38px;
  border-top: 1px solid var(--line);
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 900;
}

.footer-brand .brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
}

.footer-brand .brand-mark .icon {
  width: 17px;
  height: 17px;
}

.footer-copy {
  color: var(--muted);
  font-size: 9.5px;
}

.footer-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-word {
  margin-top: 18px;
  overflow: hidden;
  color: rgba(24, 23, 19, 0.08);
  font-family: ui-monospace, "Cascadia Mono", monospace;
  font-size: clamp(56px, 13vw, 160px);
  font-weight: 900;
  letter-spacing: -0.09em;
  line-height: 0.8;
  user-select: none;
  white-space: nowrap;
}

/* ---------- Toast, modal, boot ---------- */

.toast-region {
  position: fixed;
  z-index: 200;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  border: 1px solid rgba(251, 249, 243, 0.15);
  border-radius: 13px;
  color: var(--surface);
  background: var(--ink);
  box-shadow: var(--shadow-lg);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  animation: toast-in 0.35s var(--ease) forwards;
  pointer-events: auto;
}

.toast.is-leaving {
  animation: toast-out 0.25s ease forwards;
}

.toast .icon {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  color: var(--lime);
}

.toast--error .icon {
  color: var(--coral);
}

.modal-backdrop {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  padding: 20px;
  background: rgba(24, 23, 19, 0.38);
  backdrop-filter: blur(6px);
  place-items: center;
  animation: fade-in 0.2s ease both;
}

.modal {
  width: min(440px, 100%);
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.35s var(--ease) both;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 15px;
}

.modal h2 {
  font-size: 23px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.modal-close {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--muted);
  background: rgba(24, 23, 19, 0.04);
  cursor: pointer;
  place-items: center;
}

.modal-close:hover {
  color: var(--ink);
  background: rgba(24, 23, 19, 0.09);
}

.modal-close .icon {
  width: 16px;
  height: 16px;
}

.modal-body {
  margin-top: 13px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.modal-actions .btn {
  min-height: 42px;
  padding: 0 17px;
  font-size: 11px;
}

.btn-danger {
  color: var(--surface);
  background: #cf4d34;
}

.btn-danger:hover {
  background: #b73e27;
}

.boot-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 70vh;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.boot-mark {
  width: 22px;
  height: 22px;
  border: 2px solid rgba(24, 23, 19, 0.16);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.noscript {
  position: fixed;
  z-index: 999;
  inset: 0;
  display: grid;
  padding: 30px;
  color: var(--ink);
  background: var(--paper);
  font-size: 15px;
  place-items: center;
  text-align: center;
}

/* ---------- Confetti ---------- */

.confetti {
  position: fixed;
  z-index: 250;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  pointer-events: none;
  animation: confetti-fall 1.1s var(--ease) forwards;
}

/* ---------- Animations ---------- */

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 140, 18, 0.4);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(111, 140, 18, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(111, 140, 18, 0);
  }
}

@keyframes slow-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes blob-morph {
  0% {
    border-radius: 47% 53% 56% 44% / 42% 43% 57% 58%;
    transform: translate(-50%, -50%) rotate(9deg) scale(0.98);
  }
  100% {
    border-radius: 54% 46% 42% 58% / 55% 50% 50% 45%;
    transform: translate(-50%, -50%) rotate(4deg) scale(1.03);
  }
}

@keyframes ticket-float {
  0%,
  100% {
    margin-top: 0;
  }
  50% {
    margin-top: -8px;
  }
}

@keyframes bar-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
  }
  100% {
    opacity: 0;
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1060px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 28px;
  }

  .hero-visual {
    min-height: 420px;
  }

  .hero-orbit,
  .hero-blob {
    width: 345px;
    height: 345px;
  }

  .live-ticket {
    width: 340px;
  }

  .sticker {
    right: -2px;
    bottom: 13px;
    width: 96px;
    height: 96px;
    font-size: 10px;
  }

  .detail-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
  }

  .create-grid {
    grid-template-columns: minmax(0, 1fr) 320px;
  }
}

@media (max-width: 900px) {
  .shell {
    width: min(100% - 28px, var(--shell));
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 38px;
    padding: 55px 6px 48px;
  }

  .hero h1 {
    font-size: clamp(58px, 12vw, 94px);
  }

  .hero-visual {
    min-height: 410px;
    margin-top: 3px;
  }

  .hero-lead {
    max-width: 540px;
  }

  .stats-ribbon {
    margin-bottom: 55px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .section-head-right {
    width: 100%;
  }

  .search-field {
    flex: 1;
    min-width: 150px;
  }

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

  .detail-aside {
    position: static;
    grid-template-columns: 1fr 1fr;
  }

  .result-card {
    grid-row: span 2;
  }

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

  .preview-column {
    position: static;
    grid-template-columns: minmax(0, 1fr) 1fr;
    align-items: start;
  }

  .preview-column .preview-label {
    grid-column: 1 / -1;
  }

  .preview-column .poll-card {
    transform: none;
    min-height: 315px;
  }
}

@media (max-width: 700px) {
  body {
    padding-bottom: 70px;
  }

  .shell {
    width: min(100% - 22px, var(--shell));
  }

  .site-header {
    top: 8px;
    min-height: 60px;
    margin-top: 8px;
    padding: 8px 10px 8px 13px;
    border-radius: 18px;
  }

  .brand-mark {
    width: 37px;
    height: 37px;
    border-radius: 11px;
  }

  .brand-mark .icon {
    width: 20px;
    height: 20px;
  }

  .brand-word {
    font-size: 17px;
  }

  .main-nav,
  .header-action {
    display: none;
  }

  .mobile-tabbar {
    position: fixed;
    z-index: 60;
    right: 12px;
    bottom: 12px;
    left: 12px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    padding: 6px;
    border: 1px solid rgba(24, 23, 19, 0.12);
    border-radius: 19px;
    background: rgba(251, 249, 243, 0.93);
    box-shadow: 0 12px 34px rgba(40, 35, 22, 0.18);
    backdrop-filter: blur(18px);
  }

  .tab-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 47px;
    border-radius: 14px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
  }

  .tab-link .icon {
    width: 18px;
    height: 18px;
  }

  .tab-link.is-active {
    color: var(--ink);
    background: var(--lime);
  }

  .page {
    padding-bottom: 30px;
  }

  .hero {
    padding-top: 44px;
    padding-bottom: 33px;
  }

  .hero-eyebrow {
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(52px, 16vw, 74px);
    letter-spacing: -0.09em;
  }

  .hero-lead {
    margin-top: 21px;
    font-size: 14px;
    line-height: 1.8;
  }

  .hero-actions {
    margin-top: 25px;
    gap: 9px;
  }

  .hero-actions .btn {
    min-height: 49px;
    padding: 0 18px;
    font-size: 13px;
  }

  .hero-proof {
    margin-top: 27px;
    font-size: 10px;
  }

  .hero-visual {
    min-height: 360px;
    margin: 2px -6px 0;
    transform: scale(0.92);
  }

  .live-ticket {
    width: min(100%, 340px);
    padding: 21px;
    box-shadow: 9px 10px 0 var(--ink);
  }

  .hero-orbit,
  .hero-blob {
    width: 305px;
    height: 305px;
  }

  .sticker {
    right: -4px;
    bottom: 3px;
    width: 88px;
    height: 88px;
    box-shadow: 4px 5px 0 var(--ink);
  }

  .sticker .icon {
    top: 13px;
    width: 17px;
    height: 17px;
  }

  .floating-note {
    top: 2px;
    left: -4px;
    font-size: 9px;
  }

  .stats-ribbon {
    grid-template-columns: 1fr 1fr;
    gap: 17px 15px;
    margin-bottom: 45px;
    padding: 20px 15px;
  }

  .stat {
    justify-content: flex-start;
  }

  .stat strong {
    font-size: 28px;
  }

  .stat-divider {
    display: none;
  }

  .section-head {
    margin-bottom: 18px;
  }

  .section-head h2 {
    font-size: 34px;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
    padding: 0 8px;
  }

  .search-field {
    width: 100%;
    flex-basis: 100%;
  }

  .poll-grid,
  .skeleton-grid {
    grid-template-columns: 1fr;
  }

  .poll-card {
    min-height: 0;
    padding: 21px;
    border-radius: 24px;
  }

  .card-title {
    font-size: 22px;
  }

  .card-desc {
    font-size: 12px;
  }

  .card-options {
    margin-top: 19px;
  }

  .card-footer {
    padding-top: 18px;
  }

  .detail-page {
    padding-top: 20px;
  }

  .back-link {
    margin-bottom: 16px;
  }

  .poll-main {
    padding: 23px 19px;
    border-radius: 24px;
  }

  .poll-head h1 {
    font-size: 36px;
  }

  .poll-description {
    font-size: 12.5px;
  }

  .poll-meta {
    gap: 8px 12px;
    margin-top: 20px;
    padding-bottom: 22px;
  }

  .vote-block {
    padding-top: 22px;
  }

  .option-row {
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 61px;
    padding: 12px 13px;
    border-radius: 13px;
  }

  .option-control {
    width: 21px;
    height: 21px;
  }

  .option-label {
    font-size: 13px;
  }

  .option-percent {
    min-width: 47px;
    font-size: 14px;
  }

  .vote-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .vote-actions .btn {
    width: 100%;
  }

  .vote-hint {
    text-align: center;
  }

  .detail-aside {
    grid-template-columns: 1fr;
  }

  .result-card {
    grid-row: auto;
  }

  .result-donut-wrap {
    padding: 20px 0;
  }

  .result-donut {
    width: 135px;
    height: 135px;
  }

  .create-page,
  .mine-page {
    padding-top: 21px;
  }

  .page-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 23px;
  }

  .page-heading h1 {
    font-size: 45px;
  }

  .page-heading p {
    padding: 0;
    font-size: 12px;
  }

  .form-card {
    padding: 21px 17px;
    border-radius: 21px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .form-row .field + .field {
    margin-top: 18px;
  }

  .preview-column {
    grid-template-columns: 1fr;
  }

  .preview-column .preview-label {
    grid-column: auto;
  }

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

  .form-actions .form-note {
    max-width: none;
  }

  .form-actions .btn {
    width: 100%;
  }

  .mine-row {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
  }

  .mine-actions {
    flex-wrap: wrap;
  }

  .mine-actions .btn {
    flex: 1;
  }

  .footer-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .footer-word {
    font-size: 58px;
  }

  .toast-region {
    right: 16px;
    bottom: 82px;
  }

  .modal {
    padding: 23px 19px;
    border-radius: 20px;
  }
}

@media (max-width: 390px) {
  .hero-visual {
    transform: scale(0.85);
    margin: -20px -20px;
  }

  .hero h1 {
    font-size: 49px;
  }

  .sticker {
    right: -12px;
  }

  .floating-note {
    left: -12px;
  }

  .card-footer {
    flex-wrap: wrap;
  }

  .card-cta {
    margin-left: 0;
  }
}

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