:root { color-scheme: light; font-family: system-ui, sans-serif; background: #eef2f0; color: #182c29; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
main { max-width: 50rem; margin: auto; padding: 1.25rem; }
header, nav, #compose { display: flex; align-items: center; gap: .75rem; }
header { justify-content: space-between; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.2rem; }
#status { font-size: .9rem; }
#game { background: white; border-radius: 1rem; padding: 1.25rem; }
.nickname { margin-bottom: .75rem; max-width: 18rem; }
label { display: grid; gap: .4rem; }
input, textarea, button { font: inherit; border-radius: .65rem; padding: .65rem .8rem; }
input, textarea { border: 1px solid #a2b2ad; background: white; width: 100%; }
button { cursor: pointer; color: #183d33; background: #dce9e3; border: 0; min-height: 44px; white-space: nowrap; }
button[aria-pressed=true], #send { background: #195745; color: white; }
button:disabled { opacity: .55; cursor: default; }
nav { margin: 1rem 0; }
#messages { display: flex; flex-direction: column; gap: .6rem; list-style: none; margin: 0 0 .8rem; padding: .9rem; background: white; border-radius: 1rem; height: min(56dvh, 36rem); overflow-y: auto; }
#messages li { align-self: flex-start; max-width: 87%; padding: .55rem .75rem; border-radius: .85rem; background: #edf0ef; white-space: pre-wrap; overflow-wrap: anywhere; }
#messages .mine { align-self: flex-end; background: #d8efe1; }
#messages small { display: block; color: #4b625b; margin-top: .3rem; }
textarea { resize: vertical; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
