
:root{
  --bg:#0f172a; --card:#111827; --ink:#e5e7eb; --muted:#9ca3af; --accent:#22c55e;
  --brand:#10b981; --ring:#fde047;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font:16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}
a{color:inherit; text-decoration:none}
.wrap{max-width:980px; margin:0 auto; padding:16px}
.topbar{
  display:flex; flex-wrap:wrap; align-items:center; gap:16px;
  padding:12px 16px; border-bottom:1px solid #1f2937; position:sticky; top:0; background:#0b1220; z-index:10;
}
.logo{font-size:1.25rem; margin:0}
.logo .age{font-size:.9rem; background:var(--ring); color:#111827; padding:2px 8px; border-radius:999px; margin-left:6px}
.topbar nav{display:flex; gap:14px}
.joke{margin-left:auto; font-weight:600; color:#fef3c7}
.footer{
  display:flex; gap:12px; align-items:center; justify-content:space-between;
  border-top:1px solid #1f2937; padding:12px 16px; margin-top:24px; color:var(--muted);
}
.btn{background:var(--brand); border:0; color:#062; font-weight:700; padding:8px 12px; border-radius:12px; cursor:pointer}
.btn.small{padding:6px 10px; font-size:.9rem}
.card{background:var(--card); border:1px solid #1f2937; border-radius:16px; padding:16px; margin:12px 0}
.hero{display:flex; flex-direction:column; gap:8px}
.grid2{display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:12px}
.link{display:block}
.controls{display:flex; gap:10px; align-items:center; margin-bottom:10px; flex-wrap:wrap}
.input{padding:8px 10px; border-radius:10px; border:1px solid #1f2937; background:#0b1220; color:var(--ink)}
.stat{color:var(--muted)}

/* Badges */
.badges{display:flex; gap:8px; list-style:none; padding:0; margin:0}
.badges li{background:#0b1220; border:1px solid #1f2937; padding:6px 10px; border-radius:999px}

/* Word search */
.ws{display:grid; grid-template-columns:1fr 220px; gap:16px}
.ws-grid{display:grid; gap:2px; user-select:none; touch-action:none}
.ws-cell{
  width:28px; height:28px; display:flex; align-items:center; justify-content:center;
  background:#0b1220; border:1px solid #1f2937; border-radius:6px; font-weight:800;
}
.ws-cell.sel{outline:2px solid var(--ring)}
.ws-cell.found{background:#065f46; border-color:#10b981}
.ws-words{list-style:none; padding:0; margin:0; display:grid; gap:6px}
.ws-words li.found{text-decoration:line-through; color:var(--muted)}
.tip{color:var(--muted)}
@media (max-width:720px){ .ws{grid-template-columns:1fr} }

/* Memory */
.memory-grid{display:grid; grid-template-columns:repeat(6, 70px); gap:8px; justify-content:center}
.cardlet{
  width:70px; height:70px; border-radius:12px; border:1px solid #1f2937;
  display:flex; align-items:center; justify-content:center; font-size:34px;
  background:#0b1220; cursor:pointer; transition:transform .12s;
}
.cardlet.open, .cardlet.matched{background:#064e3b; border-color:#10b981}
.cardlet.open{transform:scale(1.05)}

/* 1..27 */
.grid27{display:grid; grid-template-columns:repeat(9, 42px); gap:6px; justify-content:center; margin-top:8px}
.ncell{
  width:42px; height:42px; display:flex; align-items:center; justify-content:center;
  background:#0b1220; border:1px solid #1f2937; border-radius:10px; cursor:pointer; font-weight:800;
}
.ncell.done{background:#1f2937; color:#6b7280}

/* Reading */
.book-form{display:flex; gap:8px; flex-wrap:wrap}
.book-list{list-style:none; padding:0; margin:10px 0; display:grid; gap:8px}
.book{display:flex; align-items:center; justify-content:space-between; gap:8px; background:#0b1220; border:1px solid #1f2937; padding:10px; border-radius:12px}
.book .stars{color:#fde047}
.del{background:#ef4444; color:white; border:0; border-radius:8px; padding:4px 8px; cursor:pointer}
