:root {
  --bg: #13151b;
  --panel: #1e212a;
  --panel2: #262a35;
  --text: #f1f2f5;
  --muted: #9ba2b0;
  --accent: #7c9cff;
  --good: #55c27a;
  --bad: #ec6a5a;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font: 14px/1.35 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; overflow: hidden; }
#app { height: 100vh; height: 100dvh; max-width: 620px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }

header h1 { margin: 0; font-size: 18px; font-weight: 800; }
header .snd { float: right; margin-left: 8px; }
header p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }

.clues { flex: 1; min-height: 70px; display: flex; flex-direction: column; background: var(--panel); border-radius: 10px; padding: 8px 10px 4px; }
.label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.label span { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.7; margin-left: 6px; }
#clues { margin: 0; padding: 0 0 0 20px; overflow-y: auto; flex: 1; scrollbar-width: thin; }
#clues li { padding: 3px 2px; cursor: pointer; user-select: none; }
#clues li::marker { color: var(--accent); font-weight: 700; }
#clues li.done { opacity: 0.38; text-decoration: line-through; }

.answer { overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); text-align: left; padding: 0 2px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
td.key { font-weight: 700; padding: 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
select { width: 100%; height: 34px; border-radius: 8px; border: 1px solid #353a48; background: var(--panel2); color: var(--text);
  font: 13px system-ui, sans-serif; padding: 0 6px; appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 12px) 15px, calc(100% - 7px) 15px; background-size: 5px 5px; background-repeat: no-repeat; }
select.empty { color: var(--muted); }
select.ok { border-color: var(--good); }
select.no { border-color: var(--bad); }

.msg { min-height: 20px; text-align: center; font-weight: 600; color: var(--muted); }
.msg.good { color: var(--good); }
.msg.bad { color: var(--bad); }
.bar { display: flex; gap: 8px; }
.bar button { flex: 1; height: 38px; border: 0; border-radius: 9px; background: var(--panel); color: var(--text); font: 600 14px system-ui, sans-serif; cursor: pointer; }
.bar button.primary { background: var(--accent); color: #0e1222; }
.bar button:disabled { opacity: 0.4; cursor: default; }
.solved .answer select { border-color: var(--good); }
