/* Menu and lobby over the game canvas. Dark frosted column on the left, the map turning
   behind it; one amber accent for the main action and for what is chosen. */

:root {
  --glass: rgba(10, 12, 11, 0.8);
  --glass-solid: rgba(12, 14, 13, 0.92);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #e9e9e3;
  --muted: #959a91;
  --faint: #767b72;
  --accent: #ecc460;
  --accent-hi: #f5d684;
  --accent-ink: #18150b;
  --red: #e8695b;
  --blue: #66a6ff;
  --head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Barlow", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", monospace;
}

#ui { position: fixed; inset: 0; pointer-events: none; font: 400 15px/1.45 var(--body); color: var(--text);
      -webkit-font-smoothing: antialiased; z-index: 10; }
#ui[hidden] { display: none; }
#ui .panel, #ui .modal { pointer-events: auto; }
#ui button, #ui input { font: inherit; color: inherit; }
#ui button { cursor: pointer; }
#ui [hidden] { display: none !important; }

/* ---------------------------------------------------------------- column */
#menu {
  position: absolute; top: 0; left: 0; bottom: 0; width: min(392px, 100vw); box-sizing: border-box;
  padding: 34px 32px 24px; overflow-y: auto;
  background: var(--glass); backdrop-filter: blur(18px) saturate(1.15); -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
}
#menu::-webkit-scrollbar { width: 6px; }
#menu::-webkit-scrollbar-thumb { background: var(--line-strong); }

.top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 26px; }
.title { margin: 0; font: 700 36px/1 var(--head); letter-spacing: 0.03em; text-transform: uppercase; }
.title span { color: var(--muted); font-weight: 500; }
.conn { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.conn.offline { color: var(--red); }
.conn button { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }

.cap { display: block; margin: 22px 0 8px; font: 600 12.5px/1 var(--head); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.note { margin: 6px 0 0; font-size: 13.5px; color: var(--muted); }
.note.small { font-size: 12.5px; }
.error { margin: 14px 0 0; color: var(--red); }

/* ---------------------------------------------------------------- inputs */
.field {
  width: 100%; box-sizing: border-box; padding: 6px 0 7px; background: none; border: 0;
  border-bottom: 1px solid var(--line-strong); outline: none; font-size: 18px !important; font-weight: 500 !important;
  transition: border-color 0.15s;
}
.field:hover { border-bottom-color: rgba(255, 255, 255, 0.3); }
.field:focus { border-bottom-color: var(--accent); }
.field.code { font: 500 28px/1.2 var(--mono) !important; letter-spacing: 0.32em; text-transform: uppercase; }
.field.code::placeholder { color: var(--faint); letter-spacing: 0.32em; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%; box-sizing: border-box;
  height: 48px; padding: 0 16px; border-radius: 2px; border: 1px solid transparent;
  font: 600 17px/1 var(--head) !important; letter-spacing: 0.08em; text-transform: uppercase;
  transition: background 0.12s, border-color 0.12s, color 0.12s, transform 0.06s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: default; opacity: 0.35; }
.btn kbd { font: 500 12px var(--body); letter-spacing: 0; opacity: 0.6; text-transform: none; }
.btn.primary { background: var(--accent); color: var(--accent-ink) !important; }
.btn.primary:hover:not(:disabled) { background: var(--accent-hi); }
.btn.outline { background: transparent; border-color: var(--line-strong); }
.btn.outline:hover:not(:disabled) { border-color: var(--text); }
.btn.accent-outline { background: transparent; border-color: var(--accent); color: var(--accent) !important; }
.btn.accent-outline:hover { background: rgba(236, 196, 96, 0.1); }
.btn + .btn { margin-top: 8px; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font-size: 13.5px; }
.link:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- word choices */
.choice { display: flex; gap: 26px; border-bottom: 1px solid var(--line); }
.choice button {
  position: relative; background: none; border: 0; padding: 4px 0 10px; color: var(--muted);
  font: 600 16px/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase; transition: color 0.12s;
}
.choice.big button { font-size: 21px; }
.choice button:hover { color: var(--text); }
.choice button[aria-pressed="true"] { color: var(--text); }
.choice button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: left; transition: transform 0.18s ease-out;
}
.choice button[aria-pressed="true"]::after { transform: scaleX(1); }

/* ---------------------------------------------------------------- maps */
.maps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.map { background: none; border: 0; padding: 0; text-align: center; color: var(--muted); }
.map .pic { position: relative; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.map img, .map .ph {
  display: block; image-rendering: auto; outline: 1px solid var(--line); outline-offset: 3px;
  filter: saturate(0.75) brightness(0.8); transition: filter 0.15s, outline-color 0.15s;
}
.map .ph { background: rgba(255, 255, 255, 0.06); }
.map:hover:not(:disabled) img { filter: none; outline-color: var(--line-strong); }
.map.on img, .map.on .ph { filter: none; outline: 2px solid var(--accent); }
.map:disabled { cursor: default; }
.map.on:disabled img { outline-color: var(--muted); }
.map b { display: block; margin-top: 8px; font: 600 15px/1.1 var(--head); letter-spacing: 0.06em; text-transform: uppercase; }
.map.on b { color: var(--text); }
.map small { font-size: 11.5px; color: var(--faint); }

/* ---------------------------------------------------------------- check box */
.check { display: inline-flex; align-items: center; gap: 10px; margin-top: 14px; background: none; border: 0; padding: 0; }
.check i { width: 16px; height: 16px; box-sizing: border-box; border: 1px solid rgba(255, 255, 255, 0.4); display: grid; place-items: center; }
.check[aria-pressed="true"] i::before { content: ""; width: 8px; height: 8px; background: var(--accent); }
.check:hover:not(:disabled) i { border-color: var(--text); }
.check:disabled { cursor: default; color: var(--muted); }
.check:disabled i::before { background: var(--muted) !important; }
.check small { color: var(--faint); font-size: 12.5px; }

/* ---------------------------------------------------------------- lobby */
.code-row { display: flex; align-items: baseline; justify-content: space-between; }
.code { font: 500 36px/1.1 var(--mono); letter-spacing: 0.12em; }
.people { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.people li { display: flex; align-items: center; gap: 10px; min-height: 38px; border-bottom: 1px solid var(--line); }
.people .sq { width: 8px; height: 8px; flex: none; background: var(--red); }
.people .me .sq { background: var(--blue); }
.people .bot .sq { background: var(--faint); }
.people .who { font-weight: 500; }
.people .tags { font-size: 12.5px; color: var(--muted); }
.people .right { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.addbot { display: flex; gap: 14px; align-items: baseline; margin-top: 10px; font-size: 13.5px; color: var(--muted); }

.spacer { flex: 1 0 24px; }
.actions { margin-top: 28px; }
footer { margin-top: 26px; }

/* ---------------------------------------------------------------- start pick banner */
#pick {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%); box-sizing: border-box;
  width: min(560px, calc(100vw - 32px)); padding: 18px 22px;
  background: var(--glass); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 2px;
}
#pick h2 { margin: 0; font: 600 23px/1.15 var(--head); letter-spacing: 0.04em; text-transform: uppercase; }
#pick .row { display: flex; gap: 10px; margin-top: 14px; }
#pick .row .btn { width: auto; height: 40px; font-size: 15px !important; margin: 0; gap: 14px; }

/* ---------------------------------------------------------------- controls */
.modal { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.45); }
.modal .box { width: min(460px, calc(100vw - 32px)); padding: 24px 26px; background: var(--glass-solid);
              border: 1px solid var(--line); border-radius: 2px; }
.modal h2 { margin: 0 0 14px; font: 600 22px/1 var(--head); letter-spacing: 0.06em; text-transform: uppercase; }
.keys { display: grid; grid-template-columns: auto 1fr; gap: 9px 22px; align-items: baseline; }
.keys kbd { font: 500 13px var(--body); color: var(--text); white-space: nowrap; }
.keys kbd b { display: inline-block; padding: 1px 6px; border: 1px solid var(--line-strong); border-radius: 2px; font-weight: 500; }
.keys span { color: var(--muted); }
.modal .close { margin-top: 18px; }
