:root {
  color-scheme: dark;
  --bg: #171a17;
  --panel: #222620;
  --soft: #282d25;
  --lime: #c6f665;
  --text: #f4f4e9;
  --muted: #aeb5a6;
  --line: #3d4737;
  --display: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--lime); outline-offset: 4px; }
a { color: inherit; }
h1, h2, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; letter-spacing: -.045em; }
.shell { max-width: 1344px; margin: 0 auto; padding: 0 64px; min-height: 100svh; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 88px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font: 700 24px/1 var(--display); letter-spacing: -.045em; }
.brand img { display: block; flex: none; }
.rules-link, .text-button { color: var(--text); background: transparent; border: 0; font-size: 14px; font-weight: 650; padding: 8px 0; }
.rules-link span { color: var(--lime); margin-left: 6px; }
.rules-link:hover, .text-button:hover { color: var(--lime); }
main { flex: 1; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  grid-template-areas: "copy form" "art form";
  align-items: center;
  column-gap: clamp(34px, 6vw, 92px);
  row-gap: 24px;
  padding: clamp(36px, 5vw, 68px) 0 42px;
}
.hero-copy { grid-area: copy; min-width: 0; }
.game-tag { font: 650 11px/1.4 var(--mono); letter-spacing: .12em; color: var(--lime); display: inline-flex; align-items: center; gap: 8px; }
.game-tag i { display: block; background: var(--lime); width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 12px #c6f66566; }
.hero-copy h1 { font-size: clamp(58px, 7.6vw, 106px); line-height: .98; margin: 10px 0 13px; letter-spacing: -.065em; }
.hero-copy p, .form-heading p, .room-main > p { color: var(--muted); font-size: 15px; line-height: 1.65; max-width: 425px; }
.hero-art {
  grid-area: art;
  min-width: 0;
  margin: 0;
}
.hero-art img { display: block; width: 100%; height: auto; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 19px; }
.room-form {
  grid-area: form;
  min-width: 0;
  padding: clamp(23px, 3vw, 36px);
  background: linear-gradient(150deg, #2a3026, var(--panel));
  box-shadow: 0 18px 55px #0b0c0a55;
}
.form-heading { margin: 0 0 22px; }
.form-heading h2 { font-size: clamp(32px, 3.5vw, 47px); line-height: 1.03; margin-bottom: 9px; overflow-wrap: anywhere; }
label { display: block; font-size: 13px; font-weight: 650; margin: 0 0 8px; }
input { display: block; width: 100%; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 13px 12px; border-radius: 7px; min-height: 48px; margin: 0 0 17px; }
input::placeholder { color: #929d89; }
.primary { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; background: var(--lime); color: #1c2314; border: 1px solid transparent; border-radius: 7px; font-weight: 790; font-size: 14px; }
.primary span { font-size: 18px; line-height: 1; }
.primary:hover:enabled { background: #dbff9d; }
.secondary { border: 1px solid var(--line); border-radius: 7px; background: var(--soft); color: var(--text); font-size: 13px; font-weight: 700; padding: 9px 11px; }
.secondary:hover { border-color: var(--lime); }
.share { margin-top: 16px; }
.word-count { display: flex; align-items: center; gap: 10px; margin-top: 13px; }
.word-count label { margin: 0; color: var(--muted); }
.word-count select { min-height: 36px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); color: var(--text); }
.message { color: #fadb97; font-size: 13px; margin-bottom: 10px; overflow-wrap: anywhere; }
.room-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(235px, 1fr); align-items: start; gap: 21px; padding: 44px 0; }
.room-main, .side-panel { min-width: 0; padding: clamp(18px, 3vw, 30px); }
.room-main h1 { font-size: clamp(37px, 5vw, 64px); line-height: .98; margin: 13px 0; overflow-wrap: anywhere; }
.room-main > p { max-width: none; }
.room-main .primary { margin-top: 13px; }
.room-main .hint { margin-top: 16px; font-size: 13px; }
.room-main .text-button { margin-top: 10px; color: var(--muted); }
.room-main .message { color: #fadb97; font-size: 13px; margin-top: 10px; }
.side-panel h2 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 28px; }
.side-panel h2 small { color: var(--muted); font: 600 12px var(--mono); }
.roster { list-style: none; margin: 15px 0 0; padding: 0; }
.roster li { border-top: 1px solid var(--line); padding: 10px 0; overflow-wrap: anywhere; }
.roster li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.avatar { display: grid; place-items: center; flex: 0 0 29px; height: 29px; border-radius: 50%; color: var(--lime); background: #37432d; font-size: 12px; font-weight: 700; overflow: hidden; }
.roster small { color: var(--muted); }
.roster .kick { margin-left: auto; }
.round-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; align-items: center; }
.round-controls { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.timer { font: 700 15px var(--mono); padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.timer.urgent { color: #fadb97; }
.secret { margin: 18px 0 13px; padding: 12px 14px; border-radius: 8px; border: 1px solid #86a74c; background: #303c24; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; }
.secret span { color: var(--lime); font: 650 10px var(--mono); letter-spacing: .07em; }
.secret strong { font: 400 28px var(--display); }
.word-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 0 0 18px; }
.word { display: grid; place-items: center; padding: 8px 4px; min-height: 42px; text-align: center; border: 1px solid var(--line); background: var(--bg); color: var(--text); border-radius: 6px; font-size: clamp(11px, 1.8vw, 14px); overflow-wrap: anywhere; }
.word.own { color: var(--lime); border-color: #86a74c; }
dialog { width: min(490px, calc(100% - 28px)); padding: 24px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 15px; }
dialog::backdrop { background: #080a08bc; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; }
.dialog-heading h2 { font-size: 32px; }
dialog ol, dialog p { color: var(--muted); line-height: 1.56; font-size: 14px; }
dialog ol { padding-left: 20px; }
dialog li + li { margin-top: 11px; }
dialog strong { color: var(--text); }
@media (max-width: 1020px) {
  .shell { padding-inline: 35px; }
}
@media (max-width: 760px) {
  .shell { padding-inline: 20px; }
  .topbar { min-height: 68px; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "form" "art"; padding: 30px 0 28px; gap: 19px; }
  .hero-copy h1 { font-size: clamp(55px, 12vw, 84px); }
  .room-form { padding: 21px; }
  .form-heading { margin-bottom: 19px; }
  .room-layout { grid-template-columns: 1fr; padding: 23px 0; }
}
@media (max-width: 360px) {
  .shell { padding-inline: 12px; }
}
