:root { --paper: #fbfaf6; --ink: #141414; --grey: #8a8a8a; --red: #c8322b; --green: #2a8a3e; --blue: #3c6ea0; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--paper); color: var(--ink); font-family: "Patrick Hand", "Comic Sans MS", "Segoe Print", cursive; overflow: hidden; -webkit-user-select: none; user-select: none; }
.red { color: var(--red); } .green { color: var(--green); } .blue { color: var(--blue); }
.stage { position: relative; width: 100%; height: 100%; }
canvas#c { display: block; width: 100%; height: 100%; cursor: crosshair; }
.hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 16px; font-size: 1.25rem; pointer-events: none; line-height: 1.2; gap: 12px; }
.hud > div { background: rgba(251,250,246,.85); padding: 4px 10px; border-radius: 8px; border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.hud .hr { text-align: right; }
.hud .team { font-size: 1.05rem; }
.hud .team div { display: flex; gap: 8px; align-items: baseline; }
.hud .team b { min-width: 6.5em; }
.hud .team .st { color: var(--grey); font-size: .9rem; }
.tip { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 1.05rem; color: var(--grey); pointer-events: none; }
.ping { position: absolute; left: 12px; bottom: 12px; font-size: .9rem; color: var(--grey); pointer-events: none; }
.toast { position: absolute; left: 50%; top: 70px; transform: translateX(-50%); background: var(--paper); border: 2.5px solid var(--red); color: var(--red); padding: 6px 14px; border-radius: 10px; font-size: 1.1rem; box-shadow: 3px 3px 0 var(--ink); z-index: 5; }
.overlay { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(251,250,246,.85); z-index: 3; }
.overlay[hidden] { display: none; }
.card { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px 22px 16px 24px / 22px 16px 24px 18px; padding: 22px 26px; max-width: 420px; width: 100%; box-shadow: 5px 5px 0 var(--ink); }
.card h1 { margin: 0 0 8px; font-size: 2.3rem; line-height: 1; }
.card p { margin: 0 0 12px; font-size: 1.15rem; line-height: 1.35; }
.card .small { font-size: .95rem; color: var(--grey); margin-bottom: 6px; }
.field { display: block; font-size: 1.15rem; margin: 0 0 12px; }
.field input, .joinrow input { font: inherit; font-size: 1.3rem; width: 100%; border: 2.5px solid var(--ink); border-radius: 10px; padding: 6px 10px; background: #fff; color: var(--ink); margin-top: 4px; }
.joinrow { display: flex; gap: 10px; margin-bottom: 10px; }
.joinrow input { width: 6.5em; text-transform: uppercase; letter-spacing: .2em; text-align: center; margin-top: 0; }
.joinrow .act { flex: 1; }
.or { text-align: center; color: var(--grey); margin: 8px 0; }
.act { font: inherit; font-size: 1.4rem; width: 100%; border: 3px solid var(--ink); border-radius: 14px 18px 14px 20px / 18px 14px 20px 14px; padding: 10px; background: var(--paper); color: var(--ink); cursor: pointer; box-shadow: 3px 3px 0 var(--ink); margin-bottom: 8px; }
.act.small { font-size: 1.05rem; padding: 6px; }
.act:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.act:disabled { opacity: .5; cursor: default; }
.act[hidden] { display: none; }
button:focus-visible, input:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.scores, .players { margin: 0 0 12px; padding-left: 22px; font-size: 1.05rem; line-height: 1.4; }
.scores small, .players small { color: var(--grey); font-size: .85rem; }
.players { list-style: none; padding-left: 0; }
.players li { display: flex; align-items: center; gap: 8px; }
.players .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); display: inline-block; }
#lcode { letter-spacing: .12em; }
.mapcard { background: var(--paper); border: 3px solid var(--ink); border-radius: 18px; padding: 12px; width: min(92vw, 92vh, 720px); box-shadow: 5px 5px 0 var(--ink); }
#bigmap { width: 100%; aspect-ratio: 1 / 1; display: block; border: 2px solid var(--ink); }
.maplegend { font-size: 1.05rem; margin: 8px 0; }
