html, body { min-height: 100%; }
body { overscroll-behavior: none; }
#app { min-height: 100vh; min-height: 100dvh; max-width: 520px; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #FFF; border: var(--ring); border-radius: 99px; box-shadow: var(--lift); padding: 5px 16px 5px 5px; }
.top .me { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 17px; min-width: 0; }
.top .me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top .pts { font-family: var(--fd); font-size: 22px; white-space: nowrap; }
.circle { width: 44px; height: 44px; border-radius: 50%; border: var(--ring); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: none; }
.logo { font-family: var(--fd); color: var(--sun); -webkit-text-stroke:0; paint-order: stroke fill; text-shadow: var(--lift); line-height: 1; transform: rotate(-3deg); display: inline-block; }
.h1 { font-family: var(--fd); color: #FFF; -webkit-text-stroke:0; paint-order: stroke fill; text-shadow: var(--lift); line-height: 1.05; font-size: 38px; text-align: center; }
.sub { color: var(--soft); font-weight: 800; font-size: 15px; text-align: center; }
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.panel { background: #FFF; border: var(--ring); border-radius: 24px; box-shadow: var(--lift); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lbl { font-weight: 900; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--muted); }
input.field { width: 100%; height: 54px; border: var(--ring); border-radius: 16px; background: var(--cream); color: var(--ink); font-family: var(--fb); font-weight: 800; font-size: 20px; padding: 0 14px; }
input.code { background: var(--sun); font-family: var(--fd); font-size: 32px; letter-spacing: 8px; text-align: center; text-transform: uppercase; }
.chars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.chars button { position: relative; height: 74px; padding: 0; border: var(--ring); border-radius: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.chars button.sel { border-width: 4px; box-shadow: 0 0 0 4px var(--sun), 0 0 0 7px var(--ink); }
.chars button:disabled { opacity: .3; border-style: dashed; cursor: default; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; }
.seg button { min-height: 50px; border: var(--ring); border-radius: 14px; background: #FFF; font-weight: 900; font-size: 14px; line-height: 1.15; cursor: pointer; padding: 4px; }
.seg button.on { background: var(--sun); }
.err { background: #FFE1DC; border: var(--ring); border-radius: 14px; padding: 8px 12px; font-weight: 900; }
.btn.full { width: 100%; min-height: 66px; font-size: 28px; }

.qtext { background: #FFF; border: var(--ring); border-radius: 20px; box-shadow: var(--lift); padding: 10px 14px; font-weight: 900; font-size: 16px; line-height: 1.3; }
.abcd { flex: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; min-height: 320px; padding-bottom: 8px; }
.abcd button { position: relative; border: var(--ring-l); border-radius: 30px; box-shadow: var(--lift-l); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px; transition: transform .07s ease, box-shadow .07s ease, opacity .2s; touch-action: manipulation; }
.abcd button .L { font-family: var(--fd); font-size: 76px; line-height: .9; }
.abcd button .t { font-weight: 900; font-size: 15px; line-height: 1.15; max-width: 100%; overflow-wrap: anywhere; }
.abcd button:active { transform: translateY(7px); box-shadow: var(--lift-s); }
.abcd button.picked { transform: scale(1.03) rotate(-1.5deg); outline: 5px solid #FFF; outline-offset: 2px; }
.abcd button.faded { opacity: .25; }
.abcd button .votes { position: absolute; top: 6px; right: 6px; display: flex; }
.abcd button .votes .circle { width: 32px; height: 32px; border-width: 2px; background: #FFF; margin-left: -6px; }
.abcd.list { grid-template-columns: 1fr; }
.abcd.list button { flex-direction: row; justify-content: flex-start; padding: 0 14px; gap: 14px; text-align: left; }
.abcd.list button .L { font-size: 44px; }
.abcd.list button .t { font-size: 18px; }
.status { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 8px 16px; }
.status b { font-family: var(--fd); font-weight: 400; font-size: 22px; }

.bigbuzz { width: min(78vw, 290px); height: min(78vw, 290px); border-radius: 50%; border: var(--ring-l); background: #FF6B5B; box-shadow: var(--lift-l); display: flex; align-items: center; justify-content: center; padding: 0; cursor: pointer; transition: transform .06s ease, box-shadow .06s ease; touch-action: manipulation; }
.bigbuzz span { width: 74%; height: 74%; border-radius: 50%; border: var(--ring-l); background: var(--sun); box-shadow: inset -10px -14px 0 #F2B705; display: flex; align-items: center; justify-content: center; font-family: var(--fd); font-size: 56px; }
.bigbuzz:active, .bigbuzz.down { transform: translateY(14px); box-shadow: var(--lift); }
.bigbuzz:disabled { filter: grayscale(.8); opacity: .5; }
.ring { width: 200px; height: 200px; border-radius: 50%; border: var(--ring-l); box-shadow: var(--lift-l); display: flex; align-items: center; justify-content: center; }
.delta { background: var(--sun); border: var(--ring-l); border-radius: 22px; box-shadow: var(--lift); padding: 2px 22px; font-family: var(--fd); font-size: 46px; transform: rotate(3deg); }
.targets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; width: 100%; }
.targets button { border: var(--ring); border-radius: 22px; box-shadow: var(--lift); background: #FFF; padding: 10px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-weight: 900; font-size: 17px; cursor: pointer; }
.list-players { display: flex; flex-direction: column; gap: 8px; }
.list-players .lp { display: flex; align-items: center; gap: 10px; font-weight: 900; }
.list-players .lp .tag { margin-left: auto; font-size: 11px; font-weight: 900; border: var(--ring-s); border-radius: 99px; padding: 1px 8px; background: var(--cream); }
.mini-btn { min-height: 40px; padding: 0 12px; border: var(--ring); border-radius: 12px; background: var(--cream); font-weight: 900; font-size: 13px; cursor: pointer; }
.timebar { height: 12px; border: var(--ring); border-radius: 99px; background: #FFF; overflow: hidden; }
.timebar i { display: block; height: 100%; background: var(--sun); border-right: var(--ring); }
.conn { position: fixed; left: 50%; top: 8px; transform: translateX(-50%); background: #FFF; border: var(--ring); border-radius: 99px; padding: 3px 12px; font-weight: 900; font-size: 13px; z-index: 9; }
.teamband { border: var(--ring); border-radius: 20px; padding: 8px 14px; font-family: var(--fd); font-size: 22px; display: flex; align-items: center; justify-content: space-between; }
.confetti-fall { position: fixed; }
.burst { position: fixed; }
.targets button:active, .seg button:active, .chars button:active { animation: jelly .35s ease both; }
