/* Phone: designed at 390px wide. rem sizes so the phone's text-size setting applies. */
html { font-size: 100%; }
@supports (font: -apple-system-body) { html { font: -apple-system-body; } }
body { background: #0F2133; color: var(--ivory); font-family: var(--sans); font-size: 1rem; line-height: 1.4; min-height: 100vh; min-height: 100dvh; }
#app { max-width: 30rem; margin: 0 auto; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 1rem; }
.top img { width: 2.6rem; height: 2.6rem; }
.top .who { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top .score { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--gold); }
.pill { font-size: 0.75rem; font-weight: 700; padding: 0.3rem 0.6rem; border-radius: 99px; background: #8a2b1d; color: #fff; }
.wrap { flex: 1; display: flex; flex-direction: column; gap: 1rem; padding: 1rem 1rem 2rem; }
.center { align-items: center; justify-content: center; text-align: center; }
.logo { width: 7rem; height: 7rem; }
.kick { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
h1 { font-family: var(--serif); font-weight: 700; font-size: 2.1rem; line-height: 1.08; }
h2 { font-family: var(--serif); font-weight: 700; font-size: 1.5rem; line-height: 1.15; }
.lead { font-size: 1.05rem; color: rgba(247, 244, 236, 0.82); }
.small { font-size: 0.85rem; color: rgba(247, 244, 236, 0.7); }
form { width: 100%; display: flex; flex-direction: column; gap: 0.9rem; }
.pinbox { font-family: var(--serif); font-weight: 700; font-size: 2.6rem; letter-spacing: 0.3em; text-align: center; padding: 0.5rem 0 0.5rem 0.3em; border-radius: 0.9rem; border: 0; background: #fff; color: #0E2233; width: 100%; }
.field { width: 100%; font-size: 1.3rem; padding: 0.85rem 1rem; border-radius: 0.8rem; border: 0; background: #fff; color: #0E2233; }
.btn { min-height: 3.4rem; border: 0; border-radius: 0.8rem; background: var(--gold); color: #0E2233; font-weight: 700; font-size: 1.15rem; cursor: pointer; width: 100%; }
.btn:disabled { opacity: 0.45; }
.linkish { background: none; border: 0; color: #E3C77E; text-decoration: underline; font-size: 0.95rem; padding: 0.5rem; cursor: pointer; }
.err { color: #FFB4A6; font-weight: 600; min-height: 1.3em; }
.btn:focus-visible, .ans:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* answer buttons */
.qline { font-family: var(--serif); font-weight: 700; font-size: 1.25rem; line-height: 1.2; }
.meta { display: flex; justify-content: space-between; align-items: center; }
.secs { font-family: var(--serif); font-weight: 700; font-size: 1.8rem; color: #E3C77E; font-variant-numeric: tabular-nums; }
.grid { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: minmax(8.5rem, 1fr); gap: 0.7rem; }
.ans { border: 0; border-radius: 1rem; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.8rem 0.6rem; font-weight: 700; font-size: 1rem; line-height: 1.2; cursor: pointer; text-align: center; box-shadow: 0 0.3rem 0 rgba(0, 0, 0, 0.25); }
.ans:active { transform: translateY(0.15rem); box-shadow: 0 0.15rem 0 rgba(0, 0, 0, 0.25); }
.ans .shape { width: 2.6rem; height: 2.6rem; }
.ans .lt { font-size: 1.1rem; opacity: 0.9; }

/* results */
.card { width: 100%; border-radius: 1.1rem; padding: 1.4rem 1.2rem; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.card.ok { background: #2E7D4F; }
.card.no { background: #9A3434; }
.card.wait { background: rgba(247, 244, 236, 0.08); border: 2px solid rgba(247, 244, 236, 0.16); }
.card .big { font-family: var(--serif); font-weight: 700; font-size: 2.3rem; line-height: 1.05; }
.card .pts { font-family: var(--serif); font-weight: 700; font-size: 1.6rem; }
.chosen { display: inline-flex; align-items: center; gap: 0.5rem; border-radius: 0.7rem; padding: 0.5rem 0.9rem; color: #fff; font-weight: 700; }
.chosen .shape { width: 1.4rem; height: 1.4rem; flex: none; }
.stat { display: flex; gap: 1.5rem; justify-content: center; }
.stat div { display: flex; flex-direction: column; align-items: center; }
.stat b { font-family: var(--serif); font-size: 1.9rem; line-height: 1.1; }
.prize { background: rgba(201, 162, 74, 0.18); border: 2px solid rgba(201, 162, 74, 0.6); border-radius: 0.9rem; padding: 0.9rem 1rem; font-weight: 700; color: #F1DDA6; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: #fff; color: #0E2233; padding: 0.7rem 1rem; border-radius: 0.7rem; z-index: 20; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,0.3); max-width: 90%; }
