/* Hangman */
.hm-wrap { display: grid; grid-template-columns: minmax(0, 220px) 1fr; gap: 22px; align-items: center; margin: 4px 0 18px; }
@media (max-width: 560px) { .hm-wrap { grid-template-columns: 1fr; justify-items: center; } .hm-art { max-width: 180px; } }
.hm-art { width: 100%; height: auto; }
.hm-art line, .hm-art circle, .hm-art path { fill: none; stroke: var(--fg); stroke-width: 5; stroke-linecap: round; }
.hm-gallows line { stroke: var(--dim); }
.hm-man > * { animation: hm-draw .35s ease both; stroke-dasharray: 200; }
.hm-man .hm-face { stroke-width: 3; stroke: var(--bad); }
@keyframes hm-draw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
.hm-side { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.hm-tag { color: var(--dim); font-size: .9em; text-transform: uppercase; letter-spacing: .08em; }
.hm-word { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hm-word span { width: 1.6em; height: 1.9em; display: grid; place-items: end center; border-bottom: 3px solid var(--fg); font-family: var(--font-display); font-size: clamp(20px, 4vw, 30px); font-weight: 700; line-height: 1; padding-bottom: 4px; }
.hm-word span.on { color: var(--a2); }
.hm-word span.miss { color: var(--bad); }
.hm-lives { color: var(--a1); letter-spacing: 4px; font-size: 20px; }
.hm-keys { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.hm-row { display: flex; gap: 6px; justify-content: center; width: 100%; }
.hm-key {
  flex: 0 1 44px; min-width: 0; height: 48px; border: var(--border); border-radius: var(--radius-sm);
  background: var(--panel-2); color: var(--fg); font-family: var(--font-display); font-weight: 700; font-size: 16px; cursor: pointer;
}
.hm-key:hover:not(:disabled) { background: color-mix(in srgb, var(--a2) 18%, var(--panel-2)); }
.hm-key:disabled { cursor: default; }
.hm-key.hit { background: var(--a4); color: var(--on-accent); border-color: transparent; }
.hm-key.miss { opacity: .35; text-decoration: line-through; }

[data-theme="retro"] .hm-art line, [data-theme="retro"] .hm-art circle, [data-theme="retro"] .hm-art path { stroke-linecap: square; filter: drop-shadow(0 0 4px var(--a2)); stroke: var(--a2); }
[data-theme="retro"] .hm-gallows line { stroke: var(--a5); filter: none; }
[data-theme="retro"] .hm-man .hm-face { stroke: var(--a1); }
[data-theme="retro"] .hm-word span { font-size: clamp(14px, 3vw, 20px); font-weight: 400; border-bottom-color: var(--a3); }
[data-theme="retro"] .hm-word span.on { text-shadow: 0 0 8px currentColor; }
[data-theme="retro"] .hm-key { font-size: 11px; font-weight: 400; border-radius: 0; border: 3px solid #000; background: var(--line); }
[data-theme="retro"] .hm-key.hit { background: var(--a4); color: #000; }
[data-theme="retro"] .hm-tag { font-size: 20px; }

[data-theme="doodle"] .hm-art { filter: url(#sf-wobble); }
[data-theme="doodle"] .hm-art line, [data-theme="doodle"] .hm-art circle, [data-theme="doodle"] .hm-art path { stroke-width: 4; }
[data-theme="doodle"] .hm-gallows line { stroke: #8a6a42; }
[data-theme="doodle"] .hm-word span { font-weight: 400; border-bottom: 0; background: var(--squiggle) repeat-x 0 100% / 24px 6px; }
[data-theme="doodle"] .hm-word span.on { color: var(--a2); }
[data-theme="doodle"] .hm-key { font-weight: 400; border: 2px solid var(--line); border-radius: var(--wob); background: var(--panel); box-shadow: 1px 2px 0 var(--line); }
[data-theme="doodle"] .hm-row:nth-child(2) .hm-key { border-radius: var(--wob-2); }
[data-theme="doodle"] .hm-key.hit { background: var(--a3); color: var(--fg); border-color: var(--line); }
[data-theme="doodle"] .hm-key.miss { opacity: .45; text-decoration: line-through var(--a1) 2px; }
