/* Phone controller: portrait, thumb-friendly. */
body { min-height: 100dvh; }
#bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: max(12px, env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--line);
}
#bar .logo { font-size: 26px; }
#me { display: flex; align-items: center; gap: 8px; font-weight: 800; }
#me .avatar { width: 34px; height: 34px; font-size: 18px; border-width: 2px; }
#me .pts { color: var(--gold); }

#screen { padding: 20px 16px calc(28px + env(safe-area-inset-bottom)); max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 16px; }
h1 { font-family: var(--display); font-weight: 400; font-size: 38px; line-height: 1; margin: 0; letter-spacing: 0.02em; }
h2 { font-family: var(--display); font-weight: 400; font-size: 24px; margin: 0; color: var(--muted); letter-spacing: 0.08em; }
p { margin: 0; color: var(--muted); line-height: 1.45; }
p b { color: var(--text); }

label { font-size: 13px; font-weight: 800; letter-spacing: 0.1em; color: var(--muted); }
input {
  width: 100%; margin-top: 6px; padding: 16px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--panel); color: var(--text);
  font: 600 20px var(--body); outline: none;
}
input:focus { border-color: var(--gold); }
input.code { font-family: var(--display); font-size: 40px; letter-spacing: 0.3em; text-align: center; text-transform: uppercase; padding: 10px; }
.error { color: #ff8a8c; font-weight: 600; min-height: 1.2em; }

.panel { background: var(--panel); border-radius: 16px; padding: 16px; }
.players { display: flex; flex-direction: column; gap: 8px; }
.prow { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.prow .avatar { width: 36px; height: 36px; font-size: 19px; border-width: 2px; }
.prow .right { margin-left: auto; color: var(--gold); font-weight: 800; }
.prow .tag { font-size: 11px; color: var(--gold); letter-spacing: 0.1em; font-weight: 800; }

.seg { display: flex; gap: 6px; margin-top: 6px; }
.seg button { flex: 1; padding: 10px; border-radius: 10px; border: 2px solid var(--line); background: var(--panel-2); color: var(--text); font-weight: 800; }
.seg.decks { flex-wrap: wrap; }
.seg.decks button { flex: 1 1 40%; }
.hints { display: flex; flex-direction: column; gap: 12px; border: 2px dashed var(--gold-deep); }
.hint-row { display: flex; gap: 10px; align-items: flex-start; line-height: 1.35; }
.hint-row .kind { font-size: 20px; }
.hint-row.done { opacity: 0.45; }
.hint-row .letters { margin-top: 4px; font-family: ui-monospace, Menlo, monospace; font-size: 18px; font-weight: 800; letter-spacing: 0.08em; color: var(--gold); }
.btn small { font-weight: 600; opacity: 0.75; }
.hint { text-align: center; font-weight: 800; color: var(--gold); margin-top: -6px; }
.seg button.on { border-color: var(--gold); background: rgba(255, 204, 77, 0.15); color: var(--gold); }

/* Pitch */
.marquee.sign { padding: 26px 20px; text-align: center; }
.sign .synopsis { font-family: Georgia, 'Times New Roman', serif; font-size: 19px; line-height: 1.45; color: #fff8e1; }
.answers { font-family: var(--display); font-size: 28px; line-height: 1.15; text-align: center; }
.sign .mashup { font-family: var(--display); font-size: 28px; line-height: 1; color: #fff8e1; overflow-wrap: anywhere; }
.timer { height: 8px; background: var(--panel); border-radius: 99px; overflow: hidden; }
.timer > div { height: 100%; background: var(--gold); transition: width 0.25s linear; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot { padding: 14px; border-radius: 14px; background: var(--panel); text-align: center; font-weight: 800; color: var(--muted); border: 2px dashed var(--line); }
.slot.got { border: 2px solid var(--green); color: var(--green); background: rgba(92, 225, 165, 0.1); }
.guess-row { display: flex; gap: 8px; }
.guess-row input { margin: 0; }
.guess-row .btn { width: auto; flex: none; }

#toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 200%); opacity: 0;
  padding: 12px 22px; border-radius: 99px; font-weight: 800; background: var(--panel-2); transition: transform 0.25s, opacity 0.25s; pointer-events: none;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.good { background: var(--green); color: #052b1a; }
#toast.bad { background: var(--red); }

.center { text-align: center; align-items: center; }
.bigmoji { font-size: 64px; animation: pop 0.4s ease-out; }
