/* Telefono: un tastierino da telefono a toni, a tutto schermo. */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #14110f; color: #f6ecd9; font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overscroll-behavior: none; }
body { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
[hidden] { display: none !important; }
.screen { height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }

/* ingresso */
#join { justify-content: center; padding-left: 24px; padding-right: 24px; max-width: 460px; margin: 0 auto; }
.brand { font: 900 34px/1 Impact, "Arial Black", sans-serif; text-transform: uppercase; letter-spacing: .02em; color: #ffb21a; text-shadow: 0 3px 0 #a3330f; margin-bottom: 28px; }
.brand span { display: block; font-size: 18px; color: #f6ecd9; text-shadow: none; }
.brand em { font-style: normal; color: #ff5a1f; }
form label { display: block; font-size: 14px; color: #c8b89a; margin: 14px 0 6px; }
form input { width: 100%; font-size: 22px; padding: 14px 16px; border-radius: 12px; border: 2px solid #4a3b2d; background: #221c17; color: #fff; -webkit-user-select: text; user-select: text; }
form input:focus { outline: none; border-color: #ffb21a; }
#code { text-transform: uppercase; letter-spacing: .3em; font-weight: 800; }
form button { margin-top: 22px; width: 100%; font: 800 20px system-ui, sans-serif; padding: 16px; border-radius: 14px; border: 0; background: #ffb21a; color: #2a1606; }
.err { color: #ff8a6a; min-height: 1.3em; }
.hint { color: #8d7d66; font-size: 14px; }

/* tastierino */
#pad { background: #1b1714; }
.bar { padding: 10px 14px 8px; background: #221c17; border-bottom: 1px solid #33291f; }
.who { display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: #c8b89a; }
.who b { color: #fff; font-size: 17px; }
.net { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #333; color: #ddd; }
.net.ok { background: #1f5a2c; color: #c9f7d2; }
.net.meh { background: #6b5513; color: #ffe9a6; }
.net.bad { background: #6e1d16; color: #ffd2c9; }
.status { margin-top: 6px; font-size: 18px; min-height: 2.6em; color: #f6ecd9; }
.status small { font-size: 14px; color: #c8b89a; }
body.turn .bar { background: #6b4300; }
body.live .bar { background: #7a1d0c; }
body.live .status b:first-child { color: #ffd34d; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .35; } }

.keys { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(4, 1fr); gap: 10px; padding: 12px; touch-action: none; }
.keys button { border: 0; border-radius: 18px; background: linear-gradient(#3a3029, #2a221d); color: #f6ecd9; box-shadow: 0 4px 0 #0d0b09, inset 0 1px 0 rgba(255,255,255,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0; touch-action: none; font-family: inherit; }
.keys b { font: 800 clamp(34px, 11vw, 64px)/1 system-ui, sans-serif; }
.keys i { font-style: normal; font-size: clamp(11px, 3.2vw, 15px); letter-spacing: .06em; text-transform: uppercase; color: #a8977c; margin-top: 4px; }
.keys .act { background: linear-gradient(#5a3b17, #422a10); }
.keys .act i { color: #ffcf7a; }
.keys .go { background: linear-gradient(#2f6a33, #204a24); }
.keys .go i { color: #b7f2b9; }
.keys button.down { transform: translateY(3px); box-shadow: 0 1px 0 #0d0b09; filter: brightness(1.6); }

.foot { display: flex; justify-content: space-between; align-items: center; padding: 4px 14px 10px; font-size: 12px; color: #6f604d; }
.foot button { background: none; border: 1px solid #3a3029; color: #8d7d66; border-radius: 8px; padding: 6px 10px; font-size: 12px; }

@media (orientation: landscape) and (max-height: 520px) {
  .screen#pad { flex-direction: row; }
  .bar { width: 34%; border-bottom: 0; border-right: 1px solid #33291f; }
  .foot { position: absolute; bottom: 0; left: 0; width: 34%; flex-direction: column; align-items: flex-start; gap: 4px; }
}
