body.phone { min-height: 100dvh; display: flex; flex-direction: column; font-size: 17px; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
#screen { flex: 1; display: flex; flex-direction: column; padding: 16px 16px calc(20px + env(safe-area-inset-bottom)); gap: 16px; }
.center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }

.me-bar { display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(0, 0, 0, 0.75); backdrop-filter: blur(12px); border-bottom: 1px solid var(--card-line); }
.me-bar .av { font-size: 20px; }
.me-bar .nm { font-weight: 800; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-bar .sc { font-weight: 800; background: var(--surface); padding: 4px 12px; border-radius: 99px; font-size: 15px; }
.me-bar .rk { color: var(--muted); font-size: 14px; font-weight: 700; }

/* Join */
.join h1 { font-size: clamp(34px, 11vw, 46px); text-align: center; margin-top: 18px; }
.join p.sub { text-align: center; color: var(--muted); margin: 0 0 6px; font-weight: 500; }
.field label { display: block; font-weight: 700; margin-bottom: 8px; font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.field input { width: 100%; font: inherit; font-size: 20px; font-weight: 600; padding: 14px 16px; border-radius: 12px; border: 2px solid transparent; background: var(--surface); color: #fff; outline: none; user-select: text; -webkit-user-select: text; }
.field input::placeholder { color: #52525b; }
.field input:focus { border-color: var(--pink); }
.field input.code { text-transform: uppercase; letter-spacing: 0.3em; font-weight: 800; text-align: center; }
.avatars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.avatars button { aspect-ratio: 1; padding: 0; border-radius: 50%; background: var(--c); color: var(--avink); font-size: 20px; font-weight: 800; transition: transform 0.15s; }
.avatars button.on { transform: scale(1.12); box-shadow: 0 0 0 3px #000, 0 0 0 5px #fff; }
.err { color: #fff; background: rgba(157, 77, 255, 0.18); border: 1px solid rgba(157, 77, 255, 0.5); border-radius: 12px; padding: 10px 14px; text-align: center; font-weight: 600; }
.btn.block { width: 100%; font-size: 18px; padding: 16px; }

/* Lobby / waiting */
.big-av .av { font-size: 76px; }
.center h2 { font-size: 28px; }
.center p { margin: 0; color: var(--muted); font-size: 17px; font-weight: 500; }
.rounds-mini { display: flex; gap: 8px; justify-content: center; align-items: center; font-weight: 700; color: var(--muted); }
.rounds-mini button { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); font-weight: 800; font-size: 17px; color: #fff; }
.rounds-mini button.on { background: #fff; color: #000; }

/* Big icon used on waiting screens */
.hero-ic { font-size: 76px; line-height: 1; color: #fff; }
.hero-ic .ic { stroke-width: 1.6; }
.hero-ic.spinning .ic { animation: spin 0.8s linear infinite; }

/* Spin button */
.spin-btn { width: min(70vw, 280px); aspect-ratio: 1; border-radius: 50%; font-size: 44px; font-weight: 800; letter-spacing: 0.02em; color: #fff;
  background: #000; border: 5px solid #fff;
  box-shadow: -8px -5px 0 var(--cyan), 8px 5px 0 var(--pink), 0 0 60px rgba(157, 77, 255, 0.35);
  text-shadow: var(--split); animation: pulse 0.8s ease-in-out infinite alternate; position: relative; }
.spin-btn:active { transform: scale(0.94); }
.spin-btn span { position: relative; }

/* Category header on challenge screens */
.cat-head { align-self: center; display: inline-flex; align-items: center; gap: 6px; background: var(--seg); color: var(--seg-ink); border: 1px solid rgba(255,255,255,0.18); border-radius: 99px; padding: 6px 14px; font-weight: 800; font-size: 14px; }

/* Answer buttons */
.q { font-size: 21px; font-weight: 800; text-align: center; text-wrap: balance; letter-spacing: -0.02em; }
.q.emoji { font-size: 54px; line-height: 1.1; }
.answers { display: grid; gap: 10px; flex: 1; grid-auto-rows: 1fr; }
.ans { display: flex; align-items: center; gap: 12px; text-align: left; padding: 10px 14px 10px 10px; border-radius: 16px; font-size: 18px; font-weight: 700; background: var(--surface); min-height: 62px; }
.ans:active { transform: scale(0.98); background: var(--surface2); }
.ans .shape { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--oc); color: #000; }
.ans.o0 { --oc: var(--o0); } .ans.o1 { --oc: var(--o1); } .ans.o2 { --oc: var(--o2); } .ans.o3 { --oc: var(--o3); }
.ans.o0 .shape, .ans.o3 .shape { color: #fff; }

.num-input { display: flex; gap: 10px; }
.num-input input { flex: 1; min-width: 0; font: inherit; font-size: 32px; font-weight: 800; text-align: center; padding: 14px; border-radius: 14px; border: 2px solid transparent; background: var(--surface); color: #fff; outline: none; user-select: text; -webkit-user-select: text; }
.num-input input:focus { border-color: var(--pink); }

.secret-card { background: #fff; color: #000; border-radius: 20px; padding: 24px 18px; text-align: center; box-shadow: -5px -3px 0 var(--cyan), 5px 3px 0 var(--pink); }
.secret-card small { display: block; font-weight: 800; color: var(--pink); text-transform: uppercase; letter-spacing: 0.1em; font-size: 12px; }
.secret-card .prompt { font-size: 28px; font-weight: 800; margin-top: 8px; text-wrap: balance; letter-spacing: -0.03em; }
.stack { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.pgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pbtn { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface); font-size: 17px; font-weight: 700; text-align: left; overflow: hidden; }
.pbtn:active { background: var(--surface2); }
.pbtn .av { font-size: 20px; }
.pbtn span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.faces { display: grid; gap: 10px; }
.faces button { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 16px; font-size: 20px; font-weight: 800; background: var(--surface); }
.faces button:active { background: var(--surface2); }
.faces button .f { font-size: 40px; line-height: 1; display: inline-flex; }
.faces button .f .ic { stroke-width: 1.7; }
.faces button:nth-child(1) .f { color: var(--pink); } .faces button:nth-child(2) .f { color: var(--cyan); }

.result-pts { font-size: 72px; font-weight: 800; line-height: 1; letter-spacing: -0.04em; text-shadow: var(--split); }
.result-pts.zero { color: var(--muted); font-size: 54px; text-shadow: none; }
.answer-was { background: var(--surface); border-radius: 14px; padding: 12px 16px; font-size: 17px; font-weight: 500; }
.answer-was b { color: var(--cyan); }
.place { font-size: 96px; font-weight: 800; line-height: 1; letter-spacing: -0.05em; text-shadow: var(--split); }

.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--surface2); padding: 10px 16px; border-radius: 99px; font-size: 15px; font-weight: 600; z-index: 50; max-width: 90vw; text-align: center; }
.tbar.small { height: 5px; }

/* Theme (lobby) */
.theme-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border-radius: 99px; padding: 6px 14px; font-weight: 800; font-size: 15px; }
.theme-chip .ic { color: var(--cyan); }
.theme-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.theme-list button { display: flex; align-items: center; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); font-weight: 700; font-size: 15px; text-align: left; border: 2px solid transparent; }
.theme-list button .ic { flex: none; color: var(--muted); font-size: 18px; }
.theme-list button span { line-height: 1.2; }
.theme-list button.on { border-color: var(--pink); background: var(--surface2); }
.theme-list button.on .ic { color: var(--cyan); }
.level-mini button { width: auto; padding: 0 14px; border-radius: 99px; font-size: 15px; }

/* Category pill + decade/category chip */
.pill-row { display: flex; align-items: center; justify-content: center; gap: 8px; }
.pill-row .cat-head { align-self: auto; }
.tag-chip { color: var(--cyan); border: 2px solid var(--cyan); border-radius: 99px; padding: 4px 11px; font-weight: 800; font-size: 13px; }
