/* ---------- login */
.gate { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; justify-content: center; text-align: center; padding-top: 30px; }
.gate .hero-emoji { font-size: 84px; line-height: 1; margin-bottom: 12px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .35)); }
.gate h1 { margin-bottom: 8px; }
.gate .card { margin-top: 28px; text-align: left; }
.gate form { display: grid; gap: 14px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-10px); } 40%, 80% { transform: translateX(10px); } }

/* ---------- name picker */
.hero { text-align: center; padding: 28px 0 6px; }
.hero .hero-emoji { font-size: 60px; line-height: 1; }
.names { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.name-btn {
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  padding: 18px 10px 16px; box-shadow: 0 5px 0 #d9c7a5, 0 12px 22px rgba(0, 0, 0, .25);
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-weight: 600; font-size: 19px; transition: transform .08s;
  word-break: break-word;
}
.name-btn .e { font-size: 40px; line-height: 1; }
.name-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #d9c7a5; }
.name-btn.me { outline: 4px solid var(--gold); }

/* ---------- setup */
.add-big { margin-top: 16px; }
.del { width: 36px; height: 36px; border-radius: 50%; background: #f3dfdf; color: var(--red-d); font-weight: 700; flex-shrink: 0; }
.mine-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e7f4ec; color: var(--green-d); font-size: 12px; font-weight: 600; margin-left: 6px; vertical-align: 2px; }
.empty-pile { text-align: center; padding: 18px 6px; color: var(--ink-soft); }
.empty-pile .e { font-size: 44px; display: block; margin-bottom: 6px; }

/* ---------- voting */
.vote-meta { display: flex; justify-content: space-between; gap: 8px; margin: 18px 2px 12px; }
.pill { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-weight: 600; font-size: 14px; }
.pill.gold { background: var(--gold); color: var(--ink); }
.crisp-hero { text-align: center; padding: 20px 18px 18px; overflow: hidden; }
.crisp-hero::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 10px;
  background: repeating-linear-gradient(-45deg, var(--green) 0 10px, var(--paper) 10px 20px);
}
.crisp-hero .packet { width: min(200px, 56vw); margin: 8px auto 12px; box-shadow: 0 8px 22px rgba(0, 0, 0, .15); }
.crisp-hero .cname { font-family: var(--display); font-size: clamp(30px, 8.5vw, 40px); line-height: 1.02; color: var(--red); }
.crisp-hero .cbrand { color: var(--ink-soft); font-weight: 500; margin-top: 4px; }
.crisp-hero .yours { display: inline-block; margin-top: 10px; padding: 4px 12px; border-radius: 999px; background: var(--gold); font-weight: 600; font-size: 14px; }

.cat { padding: 14px 14px 16px; transition: box-shadow .2s, background .2s; }
.cat.scored { background: #fffdf6; }
.cat-head { display: flex; align-items: center; gap: 10px; margin: 0 2px 12px; }
.cat-head .e { font-size: 28px; line-height: 1; }
.cat-head .n { flex: 1; font-weight: 600; font-size: 19px; line-height: 1.15; }
.cat-head .w { font-size: 14px; font-weight: 600; color: var(--green); white-space: nowrap; min-height: 1em; }
.scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sbtn {
  aspect-ratio: 1; border-radius: 50%; position: relative;
  background: var(--paper-2); color: var(--ink);
  display: grid; place-items: center; align-content: center;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, .08), 0 3px 0 #dccaa7;
  transition: transform .12s, background .15s, box-shadow .15s;
  font-weight: 700; font-size: clamp(22px, 7vw, 30px); line-height: 1;
}
.sbtn small { font-size: clamp(12px, 3.6vw, 16px); line-height: 1; margin-top: 2px; opacity: .55; }
/* bauble cap */
.sbtn::before { content: ''; position: absolute; top: -5px; left: 50%; width: 30%; height: 8px; margin-left: -15%; border-radius: 3px 3px 1px 1px; background: #cdb68b; }
.sbtn:active { transform: scale(.9); }
.sbtn.on { color: var(--snow); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .18), inset 6px 6px 0 rgba(255, 255, 255, .22), 0 4px 0 rgba(0, 0, 0, .2); }
.sbtn.on small { opacity: 1; }
.sbtn.on::before { background: var(--gold); }
.sbtn.on[data-s="1"] { background: #5a8fb8; }
.sbtn.on[data-s="2"] { background: #8e7cc3; }
.sbtn.on[data-s="3"] { background: var(--green); }
.sbtn.on[data-s="4"] { background: var(--red); }
.sbtn.on[data-s="5"] { background: linear-gradient(145deg, #ffd56b, var(--gold-d)); color: var(--ink); }
.sbtn.boing { animation: boing .5s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes boing { 0% { transform: scale(.7); } 60% { transform: scale(1.14); } 100% { transform: scale(1); } }

.all-done { text-align: center; margin-top: 22px; padding: 18px; border-radius: var(--radius); background: rgba(244, 185, 58, .14); border: 2px dashed rgba(244, 185, 58, .5); }
.all-done .e { font-size: 40px; display: block; }
.all-done b { font-family: var(--display); font-size: 30px; color: var(--gold); display: block; margin: 4px 0; }

.waiting { text-align: center; padding: 50px 10px 20px; }
.waiting .e { font-size: 90px; line-height: 1; display: inline-block; }
.waiting h2 { margin-top: 18px; color: var(--gold); }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  padding: 12px 16px calc(env(safe-area-inset-bottom, 0px) + 12px);
  display: flex; gap: 10px; justify-content: center;
  background: linear-gradient(0deg, rgba(10, 26, 43, .98) 40%, rgba(10, 26, 43, 0));
}
.dock .btn { flex: 1; max-width: 270px; }

/* packets list sheet */
.plist { display: grid; gap: 10px; margin-top: 6px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 18px; background: #fff; text-align: left; box-shadow: 0 3px 0 #ead9b8; color: var(--ink); width: 100%; }
.prow .packet { width: 54px; }
.prow .meta { flex: 1; min-width: 0; font-weight: 600; line-height: 1.2; }
.prow .meta .sub { font-weight: 400; font-size: 13px; color: var(--ink-soft); }
.prow .st { font-size: 22px; }
.prow.current { outline: 3px solid var(--gold); }
.wrapped-note { text-align: center; color: var(--ink-soft); margin: 14px 0 0; }

.banner-jump {
  display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 12px 14px;
  border-radius: 18px; background: var(--gold); color: var(--ink); font-weight: 600; width: 100%; text-align: left;
  box-shadow: 0 4px 0 var(--gold-d);
}
.banner-jump span { flex: 1; }

/* ---------- results on phones */
.tv { text-align: center; padding: 60px 10px 10px; }
.tv .e { font-size: 110px; line-height: 1; display: inline-block; }
.tv h1 { margin-top: 16px; }
.podium { display: grid; gap: 12px; }
.rank-row { display: flex; align-items: center; gap: 12px; }
.rank-row .r { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--paper-2); flex-shrink: 0; }
.rank-row.r1 .r { background: var(--gold); }
.rank-row.r2 .r { background: #d9dde3; }
.rank-row.r3 .r { background: #e3b48a; }
.rank-row .packet { width: 52px; }
.rank-row .meta { flex: 1; min-width: 0; }
.rank-row .meta .name { font-weight: 600; line-height: 1.2; }
.rank-row .meta .sub { font-size: 13px; color: var(--ink-soft); }
.rank-row .score { font-family: var(--display); font-size: 30px; color: var(--red); }
.rank-row + .rank-row { border-top: 2px dashed #ecdcbf; padding-top: 12px; }
.stat-cards { display: grid; gap: 12px; }
.stat { display: flex; gap: 14px; align-items: center; }
.stat .e { font-size: 38px; }
.stat b { display: block; font-size: 18px; }
.stat span { color: var(--ink-soft); font-size: 15px; line-height: 1.3; }
