* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: #0b1020; color: #e8edff; font-family: system-ui, -apple-system, Arial, sans-serif; }
body { padding: env(safe-area-inset-top) 12px env(safe-area-inset-bottom); touch-action: manipulation; }
header { display: flex; align-items: center; justify-content: space-between; padding: 8px 4px 6px 52px; min-height: 48px; font-size: 20px; }
.langbtn { background: #1b2748; color: #cfd8f5; border: 2px solid #34437a; border-radius: 8px; font: bold 14px Arial, sans-serif; padding: 6px 10px; margin-left: 6px; }
.langbtn.sel { background: #3d6dff; color: #fff; border-color: #8fb0ff; }
.hidden { display: none !important; }
.dim { color: #8f9bc7; font-size: 14px; margin: 4px 0; }
.msg { text-align: center; color: #ffb4b4; font-size: 15px; }
.msg:not(:empty) { padding: 6px 4px; }
.panel { padding: 8px 4px; display: flex; flex-direction: column; gap: 8px; max-width: 560px; width: 100%; margin: 0 auto; }
h2 { font-size: 16px; margin: 10px 0 0; color: #aeb9e0; }
label { font-size: 14px; color: #8f9bc7; }
input[type=text] { font-size: 20px; padding: 10px; border-radius: 10px; border: 2px solid #34437a; background: #121a36; color: #fff; min-width: 0; }
#code { text-transform: uppercase; letter-spacing: 6px; text-align: center; flex: 1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.big { padding: 12px 18px; font-size: 18px; font-weight: bold; color: #fff; background: #2fbf5b; border: 0; border-radius: 12px; }
.big.alt { background: #34437a; }
.list { display: flex; flex-direction: column; gap: 6px; min-height: 40px; }
.lob { display: flex; justify-content: space-between; background: #121a36; border: 2px solid #34437a; border-radius: 10px; padding: 10px 12px; color: #fff; font-size: 17px; width: 100%; text-align: left; }
.lob:active { background: #3d6dff; }
.empty { color: #8f9bc7; font-size: 15px; padding: 6px 2px; }
.pl { display: flex; justify-content: space-between; align-items: center; background: #121a36; border-radius: 10px; padding: 8px 12px; }
.pl button { background: #34437a; color: #fff; border: 0; border-radius: 8px; padding: 4px 10px; }
#game { position: relative; max-width: 700px; margin: 0 auto; }
.hud { display: flex; gap: 8px; justify-content: center; align-items: stretch; padding: 4px 0 8px; flex-wrap: wrap; }
.pcard { display: grid; grid-template-columns: 26px auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: linear-gradient(180deg, #1a2347, #111833); border: 2px solid #2b3a74; border-radius: 12px; padding: 5px 10px; min-width: 128px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.pcard.me { border-color: var(--pc); box-shadow: 0 0 12px color-mix(in srgb, var(--pc) 55%, transparent); }
.pcard.dead { opacity: .45; filter: grayscale(.8); }
.pcard .av { grid-row: 1 / 3; width: 24px; height: 24px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--pc) 55%, #000 140%); border: 2px solid #fff; }
.pcard b { font-size: 14px; color: #fff; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard span { font-size: 12px; color: #aeb9e0; }
.timer { align-self: center; font-size: 18px; font-weight: bold; color: #ffd23f; background: #111833; border: 2px solid #2b3a74; border-radius: 12px; padding: 6px 12px; }
#cv { width: 100%; height: auto; background: #1c2a14; border-radius: 14px; border: 3px solid #2b3a74; box-shadow: 0 6px 24px rgba(0,0,0,.5); display: block; }
.over { position: absolute; left: 0; right: 0; top: 25%; text-align: center; background: rgba(11,16,32,.93); padding: 16px; z-index: 4; display: flex; flex-direction: column; gap: 10px; align-items: center; font-size: 22px; }
.pad { display: flex; justify-content: space-between; align-items: center; padding: 10px 6px 16px; }
.dpad { display: grid; grid-template-columns: 64px 64px 64px; grid-template-rows: 64px 64px 64px; grid-template-areas: ". u ." "l . r" ". dn ."; gap: 4px; }
.d { border: 0; border-radius: 14px; background: #1d2a55; color: #fff; font-size: 26px; touch-action: none; }
.d.u { grid-area: u; } .d.l { grid-area: l; } .d.r { grid-area: r; } .d.dn { grid-area: dn; }
.d:active, .d.down { background: #3d6dff; }
.bombbtn { width: 110px; height: 110px; border-radius: 55px; border: 0; background: #6b2430; font-size: 44px; touch-action: none; }
.bombbtn:active { background: #ff4545; }
@media (min-width: 900px) { .pad { display: none; } }
