:root {
  color-scheme: light;
  --red: #b7111d;
  --red-dark: #8d0915;
  --ink: #201719;
  --muted: #6f5f60;
  --paper: #fbf8f5;
  --line: #e9ddda;
  --accent: #f9e9e7;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 4% 32%, #f6dbbf85, transparent 32rem),
    radial-gradient(ellipse at 100% 57%, #f3d4d76c, transparent 32rem);
}
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
:focus-visible { outline: 3px solid #a6401d; outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 72px)); margin-inline: auto; }
.topbar { color: #fff; background: #be1019; border-bottom: 4px solid #a70914; }
.topbar-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #ffffff48; border-radius: 9px; background: #ffffff16; font-size: 22px; line-height: 1; }
.wordmark { font-size: 1.5rem; font-weight: 800; line-height: 1; letter-spacing: -.045em; }
.header-caption { font-size: .875rem; font-weight: 650; text-underline-offset: 4px; white-space: nowrap; }
.main { padding-block: 34px 0; }
.poll-main { padding-bottom: 28px; }
.hero {
  position: relative;
  min-height: 348px;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-radius: 18px;
  color: white;
  background: linear-gradient(90deg, #240a0ff5, #320e14d9 32%, #270a1252 69%, #23090c08), url("/market.webp") center 57% / cover, #3b1017;
  box-shadow: 0 12px 34px #54101826, 0 0 36px #df9c4e29;
}
.hero-content { position: relative; z-index: 1; padding: 48px 54px; }
.snow, .snow::before, .snow::after { pointer-events: none; position: absolute; inset: 0; }
.snow::before, .snow::after {
  content: "";
  background-image:
    radial-gradient(circle at 22% 15%, #fff9ebc9 0 1px, transparent 2px),
    radial-gradient(circle at 65% 62%, #ffedc7b0 0 1px, transparent 2px),
    radial-gradient(circle at 88% 32%, #ffffff9c 0 1.5px, transparent 2.7px),
    radial-gradient(circle at 39% 80%, #ffffff8c 0 1px, transparent 2px);
  background-size: 184px 153px;
  opacity: .5;
  animation: snowfall 9s linear infinite;
}
.snow::after { opacity: .43; background-size: 249px 211px; background-position: 70px 21px; animation: snowfall-far 17s linear infinite; }
@keyframes snowfall { to { background-position: 0 153px; } }
@keyframes snowfall-far { to { background-position: 70px 232px; } }
@media (prefers-reduced-motion: reduce) { .snow::before, .snow::after { animation: none; } }
.eyebrow { margin: 0 0 16px; color: #ffe0ad; font-size: .74rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow span { font-size: 1.1em; margin-right: 5px; }
h1, h2, p { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2.5rem, 5.4vw, 4.65rem); font-weight: 800; line-height: .99; letter-spacing: -.062em; }
.hero p:last-child { max-width: 435px; color: #fbebe8; font-size: 1rem; line-height: 1.55; margin: 21px 0 0; }
.columns { display: grid; grid-template-columns: 1.12fr 1fr; gap: 24px; align-items: start; margin-top: 24px; }
.card { padding: 29px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: 0 5px 20px #4b151007; min-width: 0; }
.card h2 { margin: 0; font-size: 1.62rem; line-height: 1.15; letter-spacing: -.045em; }
.section-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent); color: var(--red); margin-bottom: 12px; font-size: 20px; font-weight: 800; }
.chart-icon { display: flex; align-items: end; justify-content: center; gap: 3px; padding-bottom: 10px; }
.chart-icon i { width: 4px; height: 7px; border-radius: 1px; background: currentColor; }
.chart-icon i:nth-child(2) { height: 12px; }
.chart-icon i:nth-child(3) { height: 16px; }
.section-copy { margin: 8px 0 19px; color: var(--muted); font-size: .91rem; line-height: 1.5; }
.notice { margin: 17px 0 0; background: #faf1ee; border: 1px solid #f2e1df; border-radius: 10px; padding: 13px 14px; font-size: .88rem; line-height: 1.48; color: #69464a; }
.field-label { display: block; padding: 0; margin: 0 0 8px; color: var(--ink); font-size: .86rem; font-weight: 700; }
input:not([type=radio], [type=checkbox]) { width: 100%; min-width: 0; border: 1px solid #d9cbc8; padding: 11px 12px; border-radius: 8px; background: #fff; color: var(--ink); }
input::placeholder { color: #837476; }
.slot-list { display: grid; gap: 12px; margin-block: 18px; }
.slot { min-width: 0; margin: 0; padding: 0; border: 0; }
.slot legend { max-width: 100%; padding: 0; margin-bottom: 7px; }
.slot-date { display: flex; gap: 5px 8px; align-items: baseline; flex-wrap: wrap; }
.slot-date strong { font-size: .9rem; }
.slot-date small { color: var(--muted); font-size: .82rem; }
.calendar-icon { color: var(--red); line-height: 1; font-size: 1.1rem; }
.slot-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.tone-yes { --tone: #25624b; --tone-fill: #e8f4eb; --tone-border: #73a389; --bar: #398060; }
.tone-maybe { --tone: #784a13; --tone-fill: #fcf0d9; --tone-border: #ba8d48; --bar: #bc8337; }
.tone-no { --tone: #922b37; --tone-fill: #fae7e9; --tone-border: #bf7981; --bar: #ba505c; }
.slot-option {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 46px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: .79rem;
  font-weight: 650;
  line-height: 1.24;
  cursor: pointer;
  text-align: center;
}
.slot-option:hover, .slot-option:has(input:checked) { background: var(--tone-fill); border-color: var(--tone-border); color: var(--tone); }
.slot-option:has(input:checked) { box-shadow: inset 0 0 0 1px var(--tone-border); }
.slot-option:has(input:focus-visible) { outline: 3px solid #a6401d; outline-offset: 2px; }
.slot-option input, .visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.option-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--tone);
  background: var(--tone-fill);
  font-size: .9rem;
  font-weight: 800;
}
.slot-option:has(input:checked) .option-icon { background: var(--tone); color: #fff; }
.primary, .secondary { display: inline-flex; justify-content: center; align-items: center; gap: 11px; border: 1px solid transparent; border-radius: 8px; min-height: 42px; padding: 8px 14px; font-size: .875rem; font-weight: 700; text-decoration: none; }
.primary { background: var(--red); color: #fff; }
.primary:hover { background: var(--red-dark); }
.secondary { background: #fff; border-color: var(--line); color: var(--red-dark); }
.secondary:hover { background: #fff2f1; }
.form-status { color: #21624b; margin: 10px 0 0; font-size: .87rem; line-height: 1.45; }
.form-status:empty { display: none; }
.form-status.error { color: var(--red-dark); }
.leader { background: #fff2e4; border: 1px solid #f5e0c6; padding: 12px 14px; border-radius: 9px; margin-bottom: 15px; color: #713a1e; font-size: .87rem; line-height: 1.5; }
.leader strong { display: block; }
.results-guide { margin-block: 0 14px; }
.results-guide p { margin: 7px 0 0; color: var(--muted); font-size: .8rem; line-height: 1.45; }
.results-legend { display: flex; flex-wrap: wrap; gap: 5px 10px; margin: 0; padding: 0; list-style: none; }
.results-legend li, .tally-count { display: inline-flex; align-items: center; gap: 4px; font-size: .8rem; font-weight: 650; }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ranking li { border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; }
.ranking li.first { border-color: #e9c99e; background: #fffaf3; }
.rank-label { display: block; margin-bottom: 7px; font-size: .86rem; }
.tally-bar { display: flex; width: 100%; height: 8px; border-radius: 10px; background: #f1e5e3; overflow: hidden; }
.tally-bar span { background: var(--bar); flex: 0 0 auto; }
.tally-counts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 12px; margin-top: 7px; }
.tally-open { color: var(--muted); font-size: .78rem; }
.admin-main { padding-bottom: 40px; }
.admin-main h1 { color: var(--red-dark); margin-bottom: 24px; font-size: clamp(2rem, 6vw, 4rem); }
.admin-kicker { color: var(--red); }
.login-card { max-width: 425px; }
.login-card form, #slot-form { margin-top: 17px; }
.login-card .primary, #slot-form .actions { margin-top: 12px; }
.control-card { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.control-card p { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-list { margin: 15px 0 0; padding: 0; list-style: none; }
.admin-list > li { padding-block: 11px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.admin-list .actions { margin-top: 6px; }
.admin-list .secondary { min-height: 30px; padding: 4px 8px; font-size: .78rem; }
.admin-list small { display: block; margin-top: 2px; color: var(--muted); }
.ballot-details { list-style: none; display: grid; gap: 5px; margin: 7px 0; padding: 0; }
.ballot-details li { display: flex; align-items: center; flex-wrap: wrap; gap: 3px 6px; color: var(--muted); font-size: .82rem; }
@media (max-width: 740px) {
  .shell { width: calc(100% - 32px); }
  .main { padding-top: 20px; }
  .topbar-inner { min-height: 67px; }
  .wordmark { font-size: 1.25rem; }
  .header-caption { font-size: .77rem; }
  .hero { min-height: 300px; background-position: 59% 56%; }
  .hero-content { padding: 32px 24px; }
  .columns { grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
  .card { padding: 22px; }
}
@media (max-width: 370px) {
  .hero-content { padding-inline: 17px; }
  .hero h1 { font-size: 2.2rem; }
  .topbar-inner { gap: 6px; }
  .header-caption { white-space: normal; text-align: right; }
}
@media (max-width: 450px) {
  .hero h1 { font-size: clamp(1.8rem, 8.6vw, 2.5rem); }
  .slot-option { flex-direction: column; gap: 4px; min-height: 62px; }
}

.festive-lights {
  pointer-events: none;
  position: absolute;
  inset: 0 0 auto;
  height: 110px;
  background:
    radial-gradient(circle at 9% 20%, #ffebac 0 2px, #fdaa5377 4px, transparent 14px),
    radial-gradient(circle at 25% 12%, #ffd492 0 2px, #fdaa5366 4px, transparent 15px),
    radial-gradient(circle at 43% 20%, #fff0ab 0 2px, #f4b54e77 5px, transparent 17px),
    radial-gradient(circle at 65% 12%, #ffe694 0 2px, #f4b54e77 5px, transparent 16px),
    radial-gradient(circle at 82% 22%, #ffeaae 0 2px, #ffbd5966 5px, transparent 15px),
    radial-gradient(circle at 96% 13%, #ffd69a 0 2px, #fdaa5366 5px, transparent 16px);
  opacity: .85;
  animation: festive-glow 3.2s ease-in-out infinite;
}
@keyframes festive-glow { 50% { opacity: .35; } }
.snow { z-index: 1; }
.snow::before { opacity: .72; }
.snow::after { opacity: .59; }
@media (prefers-reduced-motion: reduce) {
  .festive-lights { animation: none; }
}

.signin-layout { display: grid; grid-template-columns: 1.13fr 1fr; gap: 24px; align-items: stretch; padding-bottom: 34px; }
.signin-hero { min-height: 370px; }
.signin-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.65rem); }
.signin-hero .hero-content { padding: 34px; }
.signin-card form { margin-top: 19px; }
.profile-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.avatar-picker { border: 0; margin: 19px 0 16px; min-width: 0; padding: 0; }
.avatar-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.avatar-option {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffbf7;
  font-size: 1.45rem;
  cursor: pointer;
}
.avatar-option:hover, .avatar-option:has(input:checked) { background: #fff0d7; border-color: #bc8337; }
.avatar-option:has(input:checked) { box-shadow: inset 0 0 0 1px #bc8337; }
.avatar-option:has(input:focus-visible) { outline: 2px solid var(--red); outline-offset: 2px; }
.avatar-auto { display: flex; justify-content: flex-start; gap: 9px; padding-inline: 12px; }
.avatar-auto span:last-child { font-size: .9rem; font-weight: 700; }
.avatar-hint { color: var(--muted); font-size: .83rem; margin: 8px 0; }
.profile-help { margin-bottom: 0; }
.profile-greeting { margin-top: 9px; color: var(--red-dark); font-size: .93rem; font-weight: 700; }
@media (max-width: 780px) {
  .signin-layout { grid-template-columns: 1fr; gap: 14px; }
  .signin-hero { min-height: 220px; }
  .signin-hero .hero-content { padding: 24px; }
}
@media (max-width: 440px) {
  .avatar-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

#visibility-form { margin-top: 15px; }
.setting-option { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 12px; font-size: .92rem; cursor: pointer; }
.setting-option input[type=checkbox] { width: 16px; height: 16px; flex: 0 0 16px; padding: 0; margin: 3px 0 0; accent-color: var(--red); }
.reset-option { padding-top: 6px; }
.reset-option + .reset-option { margin-top: 12px; border-top: 1px solid var(--line); }
.reset-option .section-copy { margin-bottom: 8px; }
.reset-dialog { width: min(440px, calc(100% - 28px)); color: var(--ink); }
.reset-dialog::backdrop { background: #2c151da6; }
.reset-dialog .actions { justify-content: flex-end; margin-top: 14px; }

.festive-page { isolation: isolate; }
.festive-page::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background: url("/winter-botanical.webp") center / cover no-repeat;
  opacity: .39;
}
.candle-toggle {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  padding: 0;
  border: 1px solid #ffffff62;
  border-radius: 11px;
  background: #6c041831;
  color: white;
  font-size: 1.4rem;
}
.candle-toggle:hover { background: #6c04187a; }
.candle-toggle:focus-visible { outline-color: #fff1d0; }
.candle-toggle[aria-pressed="true"] { background: #6c04187a; border-style: dashed; }
.motion-paused .snow::before,
.motion-paused .snow::after,
.motion-paused .festive-lights { animation-play-state: paused; }

.avatar-reveal {
  width: min(390px, calc(100% - 28px));
  color: var(--ink);
  text-align: center;
  background: radial-gradient(ellipse at 50% 27%, #fff2ce, #fff 60%);
}
.avatar-reveal::backdrop { background: #260b14bd; }
.avatar-reveal h2 { margin: 10px 0; }
.avatar-reveal p { color: var(--muted); min-height: 2.6em; }
.reveal-symbol {
  display: grid;
  width: 110px;
  height: 110px;
  margin: 0 auto;
  place-items: center;
  border-radius: 50%;
  background: radial-gradient(circle, #ffefd3 30%, #f6ce8173 66%, transparent 70%);
  font-size: 3.4rem;
  line-height: 1;
}
.reveal-stage { position: relative; isolation: isolate; }
.reveal-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -18px 0;
  background: radial-gradient(circle, #ffe295 0, #f3b75177 28%, transparent 58%);
  opacity: 0;
}
.reveal-stage::after {
  content: "✦　✧　✦";
  position: absolute;
  inset: 35% 0 auto;
  color: #a16619;
  font-size: 1.52rem;
  text-shadow: 0 0 10px #f6b448;
  opacity: 0;
}
.avatar-reveal[open] .reveal-symbol { animation: gift-shake 2.8s ease-in-out both; }
.avatar-reveal[open] .reveal-stage::before { animation: gift-glow 2.8s ease-in-out both; }
.avatar-reveal[open].revealed .reveal-symbol { animation: gift-reveal .65s cubic-bezier(.2, .9, .4, 1.3) both; }
.avatar-reveal[open].revealed .reveal-stage::before { animation: gift-glow-release .85s ease-out both; }
.avatar-reveal[open].revealed .reveal-stage::after { animation: gift-stars .95s ease-out both; }
@keyframes gift-shake {
  0%, 15%, 37% { transform: none; }
  23%, 45%, 61%, 73% { transform: translateY(-4px) rotate(-10deg) scale(1.08); }
  29%, 53%, 67%, 79% { transform: translateY(-6px) rotate(11deg) scale(1.1); }
  87% { transform: scale(.83); }
  100% { transform: translateY(-12px) scale(1.2); }
}
@keyframes gift-glow {
  0%, 14% { opacity: 0; transform: scale(.78); }
  52% { opacity: .45; }
  76% { opacity: .7; }
  100% { opacity: 1; transform: scale(1.25); }
}
@keyframes gift-glow-release {
  from { opacity: 1; transform: scale(1.25); }
  to { opacity: .2; transform: scale(1.5); }
}
@keyframes gift-stars {
  0% { opacity: 0; transform: translateY(10px) scale(.5); }
  33% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-32px) scale(1.35); }
}
@keyframes gift-reveal {
  from { transform: scale(.65); filter: brightness(1.4); }
  to { transform: scale(1); filter: brightness(1); }
}
.motion-paused .avatar-reveal .reveal-symbol,
.motion-paused .avatar-reveal .reveal-stage::before,
.motion-paused .avatar-reveal .reveal-stage::after { animation: none !important; }
@media (prefers-reduced-motion: reduce) {
  .avatar-reveal .reveal-symbol,
  .avatar-reveal .reveal-stage::before,
  .avatar-reveal .reveal-stage::after { animation: none !important; }
}

.leader {
  border-color: #e3b76c;
  background: radial-gradient(circle at 90% 8%, #ffe2a5, #fff6e8 58%);
  box-shadow: 0 4px 13px #8c4e111c;
}
.leader > strong { color: #874911; letter-spacing: .025em; }
.leader-date { display: block; margin-top: 4px; font-size: 1.05rem; font-weight: 800; }
.leader-tally, .rank-badge {
  display: inline-block;
  border-radius: 99px;
  background: #fbe9c8;
  color: #6b4018;
  font-weight: 750;
  padding: 2px 8px;
}
.leader-tally { margin-top: 5px; font-size: .78rem; }
.rank-badge { margin: 0 0 8px; font-size: .71rem; }
.ranking li.first { border-color: #e3b76c; border-left: 4px solid #c58a33; }
.final-announcement {
  min-height: min(580px, 76vh);
  text-align: center;
  background: linear-gradient(120deg, #230a14f0, #481923c7 63%, #351619af),
    url("/market.webp") center 58% / cover, #3b1017;
}
.final-content { max-width: 850px; margin-inline: auto; padding: 36px; }
.final-content h1 { font-size: clamp(2.4rem, 6vw, 4.55rem); text-wrap: balance; }
.final-content p:last-child { margin-inline: auto; }
.final-star {
  margin: 0 auto 14px;
  color: #ffe3a4;
  text-shadow: 0 0 28px #f6c768;
  font-size: 2.7rem;
  animation: gift-reveal .65s ease-out;
}
.final-date {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 18px;
  border: 1px solid #ffe4abd0;
  border-radius: 13px;
  color: #452211;
  background: linear-gradient(135deg, #fff5d9, #ffd791);
  box-shadow: 0 0 38px #eda84846;
  font-size: clamp(1rem, 3.5vw, 1.38rem);
  font-weight: 800;
  animation: final-date-reveal .9s .15s ease-out both;
}
@keyframes final-date-reveal {
  from { opacity: 0; transform: translateY(15px) scale(.91); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.motion-paused .final-star, .motion-paused .final-date { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .final-star, .final-date { animation: none; }
}
.publication-card { margin-top: 24px; }
#publication-form select {
  display: block;
  width: min(100%, 430px);
  margin-bottom: 10px;
  padding: 11px 12px;
  border: 1px solid #d9cbc8;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

.slot-option, #save-vote { transition: background-color .16s, border-color .16s, transform .15s; }
.slot-option:active, #save-vote:active { transform: scale(.96); }
.vote-save-icon { display: inline-block; }
.is-saving .vote-save-icon { animation: vote-saving .65s ease-in-out infinite alternate; }
@keyframes vote-saving {
  from { transform: scale(.9); opacity: .65; }
  to { transform: scale(1.25); opacity: 1; }
}
.vote-saved {
  margin-top: 14px;
  padding: 18px 13px;
  border: 1px solid #e8d5b5;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 3%, #fff0ce, #fffaf4 64%);
  text-align: center;
}
.vote-saved h3 { margin: 9px 0 4px; font-size: 1.05rem; }
.vote-saved p { margin: 0 0 13px; color: var(--muted); font-size: .89rem; }
.vote-celebration { display: flex; align-items: center; justify-content: center; gap: 12px; color: #a16421; font-size: 1.12rem; }
.vote-celebration strong {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #e2f0e6;
  color: #266048;
  font-size: 1.6rem;
}
.celebrate { animation: vote-card-in .4s ease-out; }
.celebrate .vote-celebration strong { animation: gift-reveal .46s cubic-bezier(.2, .9, .4, 1.3) both; }
.celebrate .vote-celebration span { animation: vote-spark .65s ease-out both; }
.celebrate .vote-celebration span:first-child { --spark-x: -11px; --spark-angle: -32deg; }
.celebrate .vote-celebration span:last-child { --spark-x: 11px; --spark-angle: 32deg; }
@keyframes vote-card-in {
  from { opacity: .4; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes vote-spark {
  0% { opacity: 0; transform: scale(.25); }
  62% { opacity: 1; transform: translate(var(--spark-x), -9px) rotate(var(--spark-angle)) scale(1.4); }
  100% { opacity: 1; transform: none; }
}
.motion-paused :is(.celebrate, .vote-celebration strong, .vote-celebration span, .is-saving .vote-save-icon) { animation: none; }
.motion-paused :is(.slot-option, #save-vote) { transition: none; }
.motion-paused :is(.slot-option, #save-vote):active { transform: none; }
@media (prefers-reduced-motion: reduce) {
  :is(.celebrate, .vote-celebration strong, .vote-celebration span, .is-saving .vote-save-icon) { animation: none; }
  :is(.slot-option, #save-vote) { transition: none; }
  :is(.slot-option, #save-vote):active { transform: none; }
}

.profile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  min-height: 43px;
  padding: 6px 9px;
  border: 1px solid #ffffff62;
  border-radius: 11px;
  background: #6c041831;
  color: white;
  font-size: .84rem;
  font-weight: 750;
}
.profile-toggle:hover { background: #6c04187a; }
.profile-toggle:focus-visible { outline-color: #fff1d0; }
#header-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#header-avatar { font-size: 1.1rem; }
.profile-dialog { width: min(475px, calc(100% - 28px)); color: var(--ink); }
.profile-dialog::backdrop { background: #260b14bd; }
.profile-dialog .profile-fields, .profile-dialog .actions { margin-top: 14px; }
.profile-dialog #settings-avatar {
  width: 100%;
  padding: 10px;
  border: 1px solid #d9cbc8;
  border-radius: 8px;
  background: #fff;
  font: inherit;
  color: var(--ink);
}
.profile-motion { margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--line); }
.profile-motion .section-copy { margin-bottom: 0; }
.profile-motion button[aria-pressed="true"] { background: #fbe9dd; border-color: #d9b6a3; }

.legal-main { max-width: 780px; padding-bottom: 30px; }
.legal-content { margin-top: 15px; }
.legal-content h1 { font-size: clamp(2rem, 5vw, 3rem); }
.legal-content p { white-space: pre-wrap; line-height: 1.56; }
.legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 15px; font-size: .86rem; color: var(--muted); }
.legal-links a { text-underline-offset: 3px; }

.saved-choices { list-style: none; padding: 0; margin: 0 0 14px; text-align: left; }
.saved-choices li { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: .84rem; }
.saved-choice-status { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.final-content > p:not(.eyebrow) { margin-inline: auto; }
.final-attendance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; text-align: left; }
.final-attendance section { padding: 13px; border: 1px solid #ffe4ab70; border-radius: 10px; background: #220c16ad; }
.final-attendance h2 { margin: 0 0 8px; color: #ffe5b5; font-size: 1rem; }
.final-attendance ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.final-attendance li { display: flex; gap: 5px; align-items: center; max-width: 100%; padding: 3px 7px; border-radius: 8px; background: #ffffff20; overflow-wrap: anywhere; font-size: .84rem; }
@media(max-width: 440px) { .final-attendance { grid-template-columns: 1fr; } }

.named-tallies { display: grid; gap: 5px; margin-top: 9px; }
.named-tally { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: start; gap: 6px; }
.tally-people { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.tally-person { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 2px 6px; border: 1px solid var(--line); border-radius: 9px; background: #fffaf4; font-size: .77rem; overflow-wrap: anywhere; }
.legal-editor { margin-top: 22px; }
.legal-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.legal-fields textarea { display: block; width: 100%; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: .9rem; }
.legal-fields small { color: var(--muted); }
.legal-editor .actions { margin-top: 15px; }
@media (max-width: 740px) { .legal-fields { grid-template-columns: 1fr; } }

.install-hint {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e8d5b5;
  border-radius: 12px;
  background: #fff8eb;
  box-shadow: 0 5px 19px #53261924;
  animation: install-slide-in .34s ease-out both;
}
@keyframes install-slide-in {
  from { opacity: 0; transform: translateY(-18px); }
  to { opacity: 1; transform: translateY(0); }
}
.install-icon { font-size: 1.4rem; line-height: 1.25; }
.install-copy h2 { margin: 0; font-size: .96rem; }
.install-copy p { margin: 4px 0 0; color: var(--muted); font-size: .84rem; line-height: 1.4; }
.install-copy .secondary { margin-top: 8px; min-height: 38px; }
.install-close { min-width: 32px; min-height: 34px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 1.35rem; line-height: 1; }
.install-close:hover { background: #f5e6cf; }
.motion-paused .install-hint { animation: none; }
@media (prefers-reduced-motion: reduce) { .install-hint { animation: none; } }

.legal-guide { margin-bottom: 18px; padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #fdf8ef; }
.legal-guide summary { cursor: pointer; font-weight: 750; }
.legal-guide form { margin-top: 14px; }
.legal-guide .legal-fields { gap: 5px 12px; }
.legal-guide input, .legal-guide select, .legal-guide textarea { margin-top: 4px; }
.legal-guide select { width: 100%; padding: 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; }
.legal-company { margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }

.meeting-banner { margin-top: 18px; padding: 12px 17px; display: flex; flex-wrap: wrap; gap: 12px 30px; background: #fff8eb; }
.meeting-banner > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.meeting-banner > div > span { color: var(--red-dark); font-size: 1.28rem; }
.meeting-banner small, .meeting-banner strong { display: block; }
.meeting-banner small { color: var(--muted); }
.meeting-banner strong { overflow-wrap: anywhere; }
#meeting-form > button { margin-top: 12px; }
.final-location { margin: 12px auto 0; font-weight: 750; color: #ffe5b5; }

@media (min-width: 741px) {
  .meeting-fields { grid-template-columns: 2fr 1fr 1fr; }
}

.dice-stage { width: 100%; text-align: center; }
.dice-stage h1 { font-size: clamp(2.3rem, 7vw, 4.3rem); }
.dice-orbit {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  margin: 32px auto 16px;
  border-radius: 25px;
  border: 2px solid #fff6de;
  background: linear-gradient(135deg, #fff6e0, #ffc879);
  color: #612617;
  font-size: 5.2rem;
  line-height: 1;
  box-shadow: 0 0 36px #ffb94a80;
}
.rolling .dice-orbit { animation: dice-tumble .68s ease-in-out infinite; }
.landed .dice-orbit { animation: dice-land .78s ease-out both; }
@keyframes dice-tumble {
  0%, 100% { transform: perspective(420px) rotateY(-25deg) rotate(-14deg) translateY(2px); }
  50% { transform: perspective(420px) rotateY(26deg) rotate(18deg) translateY(-18px) scale(1.1); }
}
@keyframes dice-land {
  0% { transform: translateY(-34px) rotate(14deg) scale(.88); }
  45% { transform: translateY(3px) scale(1.14); box-shadow: 0 0 65px #ffcc6ecc; }
  100% { transform: none; }
}
.dice-stage .secondary { margin-top: 13px; }
.final-dice-label { margin: 12px auto 0; color: #ffe4a8; font-weight: 700; }
.motion-paused .dice-orbit { animation: none; }
@media (prefers-reduced-motion: reduce) { .dice-orbit { animation: none; } }

.final-arrival { margin: 12px auto 0; color: #ffe5b5; font-weight: 750; }
.legal-content { padding: 0; overflow: hidden; }
.legal-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 140px;
  padding: 24px clamp(17px, 5vw, 34px);
  background: linear-gradient(90deg, #fbf2e4, #fff7e6b9), url("/winter-botanical.webp") center 25% / cover;
  border-bottom: 1px solid #edd7b9;
}
.legal-heading > span { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 12px; background: #f6e2c2; font-size: 1.45rem; }
.legal-heading h1 { color: var(--red-dark); }
.legal-tabs { margin: 0; padding: 12px clamp(17px, 5vw, 34px); border-bottom: 1px solid var(--line); }
.legal-tabs [aria-current="page"] { font-weight: 800; color: var(--red-dark); }
.legal-body { padding: 18px clamp(17px, 5vw, 34px) 26px; }
.legal-body h2 { margin: 0 0 5px; font-size: 1.01rem; letter-spacing: 0; color: var(--red-dark); }
.legal-body p { margin: 0; }
.legal-body > * + * { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.legal-body > p + p { margin-top: 14px; }
.legal-back { margin-top: 14px; }
