Add puzzle hints and per-word descriptions with sources

Hint is revealed on demand below the board while playing. After the game
ends, each word's description and source link are listed below the
puzzle, and hovering a solved word highlights its entry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aidan Dona 2026-10-13 16:44:07 -05:00
parent 4a2309b589
commit b2f8e879ab
7 changed files with 141 additions and 21 deletions

View file

@ -164,6 +164,41 @@ h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); letter-spacing: -0.03em; line-height
.result h2 { margin: 0 0 4px; letter-spacing: -0.02em; }
.result pre { font-family: inherit; font-size: 1.4rem; line-height: 1.25; margin: 12px 0 20px; }
/* Hint (while playing) */
.hint-toggle { display: flex; justify-content: center; margin-top: 16px; }
.hint {
display: flex;
gap: 10px;
align-items: flex-start;
margin: 16px 0 0;
padding: 12px 16px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
animation: pop 0.3s var(--ease);
}
.hint i { margin-top: 4px; }
/* Word descriptions (after the game ends) */
.solved .word { border-radius: 4px; padding: 0 2px; transition: background 0.15s; }
.solved .word.hl { background: rgb(0 0 0 / 0.14); }
.details { margin-top: 32px; animation: pop 0.4s var(--ease); }
.details h2 { margin: 0 0 12px; letter-spacing: -0.02em; }
.detail-group { margin-bottom: 20px; }
.detail-group h3 { font-size: 1rem; margin: 0 0 8px; text-transform: uppercase; letter-spacing: 0.02em; }
.detail-group dl { display: grid; gap: 6px; margin: 0; }
.detail {
padding: 10px 14px;
background: var(--surface);
border: 1px solid var(--line);
border-radius: var(--radius);
transition: border-color 0.15s, background 0.15s;
}
.detail.hl { border-color: var(--ink); background: var(--tile); }
.detail dt { font-weight: 700; text-transform: uppercase; }
.detail dd { margin: 0; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.detail .source { display: inline-flex; gap: 4px; align-items: center; color: var(--ink); font-weight: 600; font-size: 0.9rem; }
/* Lists and forms */
.list { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.list a, .list .item {
@ -198,15 +233,17 @@ input, select {
input:focus, select:focus { border-color: var(--ink); outline: none; }
.group-edit { min-width: 0; padding: 16px; border-radius: var(--radius); margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface); }
.group-edit .head { display: grid; grid-template-columns: 1fr 140px; gap: 10px; margin-bottom: 10px; }
.group-edit .words { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.group-edit .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.group-edit .words { display: grid; gap: 8px; }
.group-edit .word-row { display: grid; grid-template-columns: 150px 1fr 1fr; gap: 8px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.errors { color: var(--error); margin: 0 0 16px; padding-left: 20px; }
.row-actions { display: flex; gap: 8px; }
.icon-btn { padding: 8px 12px; }
@media (max-width: 767px) {
.group-edit .head, .group-edit .words { grid-template-columns: 1fr 1fr; }
.group-edit .head { grid-template-columns: 1fr 1fr; }
.group-edit .word-row { grid-template-columns: 1fr; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.topbar nav { gap: 14px; }
}