* { 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; }
.grid {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 2px;
  background: #e5e7eb;
  border: 2px solid #1f2330;
  border-radius: 4px;
  user-select: none;
  touch-action: none;
  max-width: 360px;
  margin: 0 auto;
  aspect-ratio: 1;
}
.cell {
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.1s;
}
.cell.sel { background: #c7d2fe; }
.cell.found { background: #d1fae5; color: #065f46; }
.cell.found.sel { background: #a7f3d0; }
.words {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.word-tag {
  padding: 4px 10px;
  background: white;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
}
.word-tag.found {
  background: #d1fae5;
  color: #065f46;
  text-decoration: line-through;
  border-color: #10b981;
}
.result {
  margin-top: 16px;
  padding: 12px;
  background: #d1fae5;
  color: #065f46;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 600;
}
.result.hidden { display: none; }
