/* ===== BMK Vote · design v2 (2026-09) ===== */

body { font-family: "Manrope", var(--font); }

.decor { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: -1; }
.decor::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255,255,255,.55), rgba(255,255,255,0) 55%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); }
.b1 { width: 420px; height: 420px; background: #BCE9C9; opacity: .6; top: -160px; right: -140px; animation: drift 26s ease-in-out infinite alternate; }
.b2 { width: 380px; height: 380px; background: #D7F1DE; opacity: .55; bottom: -170px; left: -150px; animation: drift 32s ease-in-out infinite alternate-reverse; }
.b3 { width: 260px; height: 260px; background: #EDF8EF; opacity: .85; top: 40%; left: -120px; }
.b4 { width: 300px; height: 300px; background: #EFE3B4; opacity: .4; top: -80px; left: 30%; filter: blur(100px); animation: drift 38s ease-in-out infinite alternate; }
.orn {
  position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(0, 147, 62, .10);
}
.o1 { width: 560px; height: 560px; top: -220px; right: -180px; }
.o2 { width: 380px; height: 380px; bottom: -140px; left: -110px; border-style: dashed; animation: ornSpin 90s linear infinite; }
@keyframes drift { from { transform: translate3d(0,0,0); } to { transform: translate3d(40px, 26px, 0); } }
@keyframes ornSpin { to { transform: rotate(360deg); } }

.topbar {
  max-width: 560px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 18px) 20px 0;
}
.marks { display: flex; align-items: center; justify-content: center; gap: 14px; }
.mark { display: flex; align-items: center; gap: 9px; }
.mark-svg { width: 40px; height: 40px; display: block; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 100, 45, .16)); }
.mark-cap {
  font-size: 9px; line-height: 1.3; letter-spacing: .12em; text-transform: uppercase;
  color: var(--faint); font-weight: 800;
}
.mark-sep { width: 1px; height: 30px; background: var(--line-strong); }
@media (max-width: 380px) { .mark-cap { display: none; } }

.shell {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 20px calc(env(safe-area-inset-bottom) + 24px);
  min-height: calc(100dvh - 120px);
  display: flex;
  flex-direction: column;
}
body.has-bar .shell { padding-bottom: calc(env(safe-area-inset-bottom) + 126px); }

.view { display: none; }
.view.active { display: flex; flex-direction: column; animation: viewIn .5s cubic-bezier(.22, .9, .28, 1) both; }
@keyframes viewIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.overline {
  font-size: 12px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  color: var(--g-600);
  display: inline-flex; align-items: center; gap: 10px;
}
.overline::before, .overline::after {
  content: ""; width: 22px; height: 1.5px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--g-500));
}
.overline::after { background: linear-gradient(90deg, var(--g-500), transparent); }

.title {
  font-size: clamp(28px, 7.4vw, 38px);
  line-height: 1.1; letter-spacing: -.028em; font-weight: 800;
  text-wrap: balance;
  background: linear-gradient(160deg, #0A2013 20%, #14532B 70%, #0B6B33);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: #0A2013;
}
.title-sm {
  font-size: clamp(23px, 6vw, 30px);
  line-height: 1.14; letter-spacing: -.022em; font-weight: 800;
  text-wrap: balance; color: #0A2013;
}
.muted { color: var(--muted); font-size: 15.5px; line-height: 1.55; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px;
  background: linear-gradient(180deg, var(--g-100), #D2EBD9); color: var(--g-700);
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 2px 8px -4px rgba(8,60,30,.25);
}
.chip-ghost { background: rgba(255,255,255,.8); border: 1px solid var(--line-strong); color: var(--muted); box-shadow: none; }
.chip-done { background: #EEF1EE; color: var(--muted); box-shadow: none; }
.chip-live { background: linear-gradient(180deg, var(--g-100), #D2EBD9); color: var(--g-700); }
.chip-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--g-500); animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(18,169,76,.45); } 50% { box-shadow: 0 0 0 5px rgba(18,169,76,0); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: 0; border-radius: 18px; font-weight: 800; letter-spacing: -.01em;
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease, background .2s ease;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  position: relative;
}
.btn:active:not(:disabled) { transform: scale(.975); }
@media (hover: hover) {
  .btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 16px 30px -12px rgba(0, 140, 60, .65); }
  .btn-ghost:hover:not(:disabled) { transform: translateY(-1px); }
}
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.btn-xl { width: 100%; min-height: 58px; font-size: 17px; padding: 0 22px; }
.btn-lg { min-height: 50px; font-size: 16px; padding: 0 20px; }

.btn-primary {
  background: linear-gradient(180deg, #16B553, var(--g-600) 55%, #068239);
  color: #fff;
  box-shadow: var(--shadow-btn), inset 0 1px 0 rgba(255,255,255,.28);
  text-shadow: 0 1px 1px rgba(0, 60, 25, .18);
}
.btn-primary:disabled { background: linear-gradient(180deg, #B9C6BC, #AEBDB2); box-shadow: none; text-shadow: none; }

.btn-ghost {
  background: rgba(255,255,255,.92); color: var(--ink);
  border: 1.5px solid var(--line-strong);
  box-shadow: var(--shadow-btn-ghost);
}
.btn svg { width: 20px; height: 20px; flex: none; }

.btn-danger-ghost {
  background: #fff; color: #B3261E;
  border: 1.5px solid #EBCFCD;
}

.card {
  background: var(--card);
  border: 1px solid rgba(14, 61, 33, .09);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}

.icon-circle {
  display: grid; place-items: center;
  width: 92px; height: 92px; border-radius: 50%;
  background: radial-gradient(120% 120% at 30% 20%, #F2FAF4, var(--g-100));
  border: 1px solid #D9ECDE;
  color: var(--g-700);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 14px 30px -18px rgba(8,70,35,.4);
}
.icon-circle svg { width: 42px; height: 42px; }
.icon-circle.small { width: 60px; height: 60px; }
.icon-circle.small svg { width: 28px; height: 28px; }

.emblem {
  width: 148px; height: 148px; margin: 26px auto 22px;
  display: grid; place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 30% 18%, #FFFFFF 0%, #F2FAF4 55%, #E2F3E7 100%);
  border: 1px solid #D5EBDC;
  box-shadow:
    0 24px 48px -22px rgba(8, 70, 35, .38),
    inset 0 2px 6px rgba(255,255,255,.9);
  position: relative;
  animation: float 8s ease-in-out infinite;
  will-change: transform;
}
.emblem::before {
  content: ""; position: absolute; inset: -14px; border-radius: 50%;
  border: 1.5px dashed rgba(0, 147, 62, .32);
  animation: ornSpin 50s linear infinite;
}
.emblem::after {
  content: ""; position: absolute; inset: -30px; border-radius: 50%;
  border: 1px solid rgba(0, 147, 62, .12);
}
.emblem svg { width: 118px; height: 118px; position: relative; z-index: 1; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }

#view-welcome { align-items: center; text-align: center; gap: 14px; padding-top: 8px; }
#view-welcome .subtitle { font-size: 17px; color: var(--muted); max-width: 40ch; font-weight: 600; }
#view-welcome .meta-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
#view-welcome .btn { margin-top: 18px; max-width: 420px; }

.step-head { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin: 26px 0 18px; }
.step-head.centered { align-items: center; text-align: center; }

.name-card { padding: 24px 22px; display: flex; flex-direction: column; gap: 12px; }
.field-label { font-size: 14px; font-weight: 800; color: var(--g-800); letter-spacing: .01em; }
.field {
  width: 100%; min-height: 58px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-md);
  padding: 14px 16px; font-size: 17px; background: #FDFEFD;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field:focus {
  outline: none;
  border-color: var(--g-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 169, 76, .15);
}
.field::placeholder { color: #A9B5A8; }
.field-error { color: #B3261E; font-size: 13.5px; font-weight: 600; }

.status-wrap {
  margin: auto; padding: 40px 10px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.status-wrap .muted { max-width: 34ch; }

.pulse-row { display: flex; gap: 7px; margin-top: 6px; }
.pulse-row i {
  width: 8px; height: 8px; border-radius: 50%; background: var(--g-500); opacity: .3;
  animation: pulseDot 1.4s ease-in-out infinite;
}
.pulse-row i:nth-child(2) { animation-delay: .2s; }
.pulse-row i:nth-child(3) { animation-delay: .4s; }
@keyframes pulseDot { 0%, 100% { opacity: .25; transform: scale(.85); } 45% { opacity: 1; transform: scale(1.1); } }

.vote-head { margin: 26px 0 16px; display: flex; flex-direction: column; gap: 10px; }

.options { display: flex; flex-direction: column; gap: 12px; }

.option {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--card);
  border: 1.5px solid var(--line);
  border-radius: 22px;
  padding: 18px 16px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  transition: border-color .18s, background .18s, box-shadow .25s, transform .12s;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 1px 2px rgba(8, 44, 22, .04);
}
.option::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--g-500), var(--g-600));
  opacity: 0; transition: opacity .2s;
}
.option:active { transform: scale(.985); }
@media (hover: hover) {
  .option:hover { border-color: var(--g-200); box-shadow: 0 10px 26px -18px rgba(8, 60, 30, .35); }
}
.option.selected {
  border-color: var(--g-500);
  background: linear-gradient(180deg, #F4FBF6, #EDF9F1);
  box-shadow: 0 16px 36px -18px rgba(0, 130, 57, .5);
}
.option.selected::before { opacity: 1; }
.opt-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt-speaker { font-size: 16.5px; font-weight: 800; letter-spacing: -.01em; color: #0A2013; }
.opt-role { margin-top: 4px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.opt-title {
  margin-top: 11px; padding-top: 11px;
  border-top: 1px dashed #DFECE1;
  font-size: 15px; font-weight: 600; line-height: 1.45; color: #0D5228;
}
.opt-check {
  flex: none; margin-top: 1px;
  width: 27px; height: 27px; border-radius: 50%;
  border: 2px solid #C8D9CB; background: #fff;
  display: grid; place-items: center;
  transition: border-color .18s, background .18s, transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.opt-check svg { width: 15px; height: 15px; stroke: #fff; opacity: 0; transform: scale(.4); transition: opacity .15s, transform .2s cubic-bezier(.34, 1.56, .64, 1); }
.option.selected .opt-check {
  border-color: transparent;
  background: linear-gradient(180deg, var(--g-500), var(--g-600));
  transform: scale(1.05);
}
.option.selected .opt-check svg { opacity: 1; transform: scale(1); }

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 12px 20px calc(env(safe-area-inset-bottom) + 12px);
  background: rgba(250, 253, 250, .86);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid rgba(14, 61, 33, .08);
  box-shadow: 0 -18px 40px -30px rgba(8, 60, 30, .5);
}
.sticky-bar .bar-inner { max-width: 520px; margin: 0 auto; }

.choice-card { padding: 22px 20px; display: flex; flex-direction: column; gap: 4px; }
.choice-day { font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--g-600); }
.choice-speaker { margin-top: 6px; font-size: 19px; font-weight: 800; letter-spacing: -.015em; color: #0A2013; }
.choice-role { margin-top: 5px; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.choice-title { margin-top: 12px; padding-top: 12px; border-top: 1px dashed #DFECE1; font-size: 15.5px; font-weight: 600; color: #0D5228; line-height: 1.5; }

.notice {
  display: flex; gap: 11px; align-items: flex-start;
  margin-top: 14px;
  background: var(--amber-bg);
  border: 1px solid var(--amber-line);
  color: var(--amber-ink);
  border-radius: 14px;
  padding: 13px 15px;
  font-size: 14px; font-weight: 600; line-height: 1.45;
}
.notice svg { flex: none; width: 20px; height: 20px; margin-top: 1px; }

.confirm-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.check-circle {
  width: 116px; height: 116px; border-radius: 50%;
  background: linear-gradient(160deg, #16B553, #068239);
  display: grid; place-items: center;
  box-shadow: var(--shadow-pop), inset 0 2px 6px rgba(255,255,255,.3);
  animation: popIn .5s cubic-bezier(.34, 1.56, .64, 1) both;
}
.check-circle svg { width: 56px; height: 56px; }
.check-circle path {
  stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60;
  animation: draw .55s .22s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes popIn { from { transform: scale(.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

#view-result { gap: 12px; padding-top: 26px; }
.winner-card {
  position: relative;
  border: 2px solid transparent;
  border-radius: 30px;
  background:
    linear-gradient(#FFFFFF, #FBFEFC) padding-box,
    linear-gradient(150deg, var(--g-500), #0A7A46 40%, #C9A227 85%, #E3C56B) border-box;
  box-shadow: var(--shadow-pop);
  padding: 28px 22px;
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.winner-badge {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(160deg, #E9CF7E, #C9A227 55%, #8F6B14);
  display: grid; place-items: center;
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(160, 125, 35, .65), inset 0 2px 4px rgba(255,255,255,.5);
  margin-bottom: 2px;
}
.winner-badge svg { width: 38px; height: 38px; }
.winner-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; color: #0A2013; }
.winner-role { font-size: 13.5px; color: var(--muted); line-height: 1.5; max-width: 40ch; }
.winner-title { font-size: 15.5px; font-weight: 600; color: #0D5228; line-height: 1.5; max-width: 44ch; }
.winner-votes { margin-top: 10px; display: flex; align-items: baseline; gap: 8px; }
.winner-votes b {
  font-size: 38px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: linear-gradient(160deg, #0B6B33, #12A94C);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--g-700);
}
.winner-votes span { font-size: 14px; color: var(--muted); font-weight: 600; }

#btn-rating { margin-top: 6px; }

.rating { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; animation: viewIn .35s ease both; }
.rate-row {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 12px; align-items: center;
  background: var(--card);
  border: 1px solid rgba(14, 61, 33, .08);
  border-radius: 16px;
  padding: 12px 14px;
}
.rate-place {
  width: 30px; height: 30px; border-radius: 10px;
  display: grid; place-items: center;
  background: #F1F7F2; color: var(--g-800);
  font-size: 13.5px; font-weight: 800;
}
.rate-place.gold { background: linear-gradient(160deg, #E9CF7E, #C9A227 60%, #8F6B14); color: #fff; }
.rate-place.silver { background: linear-gradient(160deg, #F2F5F7, #CDD8DC); color: #4A5A5E; }
.rate-place.bronze { background: linear-gradient(160deg, #EDD9C4, #C99F76); color: #5F421E; }
.rate-mid { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.rate-name { font-size: 14.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #0A2013; }
.rate-title { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rate-bar { margin-top: 4px; height: 5px; border-radius: 99px; background: #EDF4EE; overflow: hidden; }
.rate-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--g-500), var(--g-600)); }
.rate-votes { font-size: 15.5px; font-weight: 800; color: var(--g-700); font-variant-numeric: tabular-nums; }

.foot {
  max-width: 560px; margin: 0 auto;
  padding: 18px 24px calc(env(safe-area-inset-bottom) + 20px);
  text-align: center;
  font-size: 12px; color: var(--faint); line-height: 1.6;
}

.toast {
  position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 96px);
  transform: translate(-50%, 16px);
  background: rgba(13, 32, 20, .94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ECF7EE;
  padding: 11px 19px; border-radius: 999px;
  font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow-pop);
  opacity: 0; pointer-events: none;
  transition: opacity .25s, transform .25s;
  z-index: 100; max-width: min(92vw, 420px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 720px) {
  .b1 { width: 560px; height: 560px; }
  .b2 { width: 500px; height: 500px; }
}

@media (prefers-reduced-motion: reduce) {
  .emblem, .emblem::before, .b1, .b2, .b4, .o2 { animation: none; }
}
