Add saved starter words for signed-in players

Players can save up to 3 favorite opening words and tap one to fill the
current row. Words are stored on profiles.starter_words and saved through
the set_starter_words RPC, which validates them against the dictionary.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Zakaria
2026-10-28 10:39:32 -04:00
parent e4d0d3b55c
commit 6daf3237e8
5 changed files with 427 additions and 4 deletions
+125 -1
View File
@@ -1015,6 +1015,123 @@ h2 {
text-align: start;
}
.starter-panel {
display: grid;
gap: 12px;
max-width: 34rem;
margin-top: 28px;
padding: 16px 18px;
border: 1px solid var(--border);
border-radius: 20px;
background: color-mix(in oklch, var(--surface), var(--bg) 40%);
}
.starter-panel[hidden],
.starter-editor[hidden],
.starter-chips[hidden],
.starter-panel .link-button[hidden] {
display: none;
}
.starter-head {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.starter-head .eyebrow {
margin: 0;
}
.starter-chips {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.starter-chips:empty {
display: none;
}
.starter-chip {
min-height: 44px;
padding: 0 16px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--tile);
color: var(--fg);
cursor: pointer;
font: inherit;
font-weight: 800;
letter-spacing: 0.14em;
text-transform: uppercase;
transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}
.starter-chip:hover,
.starter-chip:focus-visible {
transform: translateY(-1px);
border-color: var(--accent);
outline: none;
}
.starter-chip:active {
background: var(--key);
}
.starter-editor {
display: grid;
gap: 12px;
}
.starter-inputs {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
}
.starter-input {
min-width: 0;
min-height: 44px;
border: 1px solid var(--border);
border-radius: 12px;
background: var(--bg);
color: var(--fg);
font: inherit;
font-weight: 800;
letter-spacing: 0.12em;
text-align: center;
text-transform: uppercase;
}
.starter-input:focus {
border-color: var(--accent);
outline: none;
box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent), transparent 75%);
}
.starter-input[aria-invalid] {
border-color: var(--accent);
}
.starter-editor-actions {
display: flex;
justify-content: flex-end;
gap: 8px;
}
.starter-hint {
margin: 0;
color: var(--muted);
font-size: 0.9rem;
line-height: 1.5;
}
.starter-hint .link-button {
font-size: inherit;
}
@keyframes intro-tile-enter {
0% {
transform: translate3d(0, 34px, -180px);
@@ -1179,10 +1296,17 @@ h2 {
}
h1,
.deck {
.deck,
.starter-panel {
margin-inline: auto;
}
.starter-panel {
width: 100%;
margin-top: 18px;
text-align: start;
}
.deck {
margin-top: 12px;
}