* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f6f7fb;
  margin: 0;
  padding: 16px;
  color: #1f2330;
}
.wrap { max-width: 480px; margin: 0 auto; text-align: center; }
.status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
  font-size: 16px;
}
#newbtn {
  background: #4f46e5; color: white; border: 0; padding: 8px 14px;
  border-radius: 6px; cursor: pointer;
}
#newbtn:hover { background: #4338ca; }
#gallows { width: 200px; height: 220px; }
#gallows .frame { stroke: #1f2330; stroke-width: 4; stroke-linecap: round; fill: none; }
#gallows .part {
  stroke: #1f2330; stroke-width: 4; stroke-linecap: round; fill: none;
  visibility: hidden;
}
#gallows .part.show { visibility: visible; }
.word {
  font-family: 'SF Mono', Menlo, monospace;
  font-size: 28px;
  letter-spacing: 6px;
  margin: 16px 0;
  min-height: 36px;
}
.keyboard {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 12px;
}
.key {
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  padding: 8px 0;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-transform: uppercase;
  touch-action: manipulation;
}
.key:hover:not(:disabled) { background: #eef2ff; border-color: #4f46e5; }
.key:disabled { opacity: 0.4; cursor: default; }
.key.hit { background: #d1fae5; border-color: #10b981; color: #065f46; }
.key.miss { background: #fee2e2; border-color: #ef4444; color: #991b1b; }
.result {
  margin-top: 16px;
  padding: 12px;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
}
.result.win { background: #d1fae5; color: #065f46; }
.result.lose { background: #fee2e2; color: #991b1b; }
.result.hidden { display: none; }
