:root {
  --bg: #fafafa; --fg: #1a1a1b; --grey: #787c7e; --yellow: #c9b458; --green: #6aaa64; --border: #d3d6da;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #121213; --fg: #f8f8f8; --grey: #3a3a3c; --yellow: #b59f3b; --green: #538d4e; --border: #565758; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.4 system-ui, sans-serif; }
main { max-width: 480px; margin: 0 auto; padding: 16px; }
h1 { margin: 0 0 4px; }
h2 { font-size: 1rem; margin: 24px 0 8px; }
.hint { color: var(--grey); margin: 0 0 16px; }
form { display: flex; gap: 8px; margin-bottom: 16px; }
input[type="text"], #word { flex: 1; font: inherit; font-size: 1.25rem; text-transform: uppercase; letter-spacing: .2em; padding: 8px 12px; border: 2px solid var(--border); border-radius: 6px; background: transparent; color: inherit; }
form button, .reset { width: 88px; }
form button { font: inherit; padding: 8px 0; border: 0; border-radius: 6px; background: var(--green); color: #fff; cursor: pointer; }
.row { display: flex; gap: 6px; margin-bottom: 6px; align-items: center; }
.tile { width: 52px; height: 52px; border: 0; border-radius: 4px; color: #fff; font: 700 1.75rem system-ui; text-transform: uppercase; cursor: pointer; }
.tile.grey { background: var(--grey); } .tile.yellow { background: var(--yellow); } .tile.green { background: var(--green); }
.remove { margin-left: 8px; border: 0; background: transparent; color: var(--grey); font-size: 1.5rem; cursor: pointer; }
.options { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; }
.reset { font: inherit; padding: 6px 0; border: 2px solid var(--border); border-radius: 6px; background: transparent; color: inherit; cursor: pointer; }
.reset:hover:not(:disabled) { border-color: var(--grey); }
.reset:disabled { opacity: .4; cursor: default; }
.words { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-family: ui-monospace, monospace; max-height: 240px; overflow: auto; }
.suggestion { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.suggestion strong { font: 700 1.1rem ui-monospace, monospace; }
.suggestion small { margin-left: auto; color: var(--grey); }
