:root {
  --bg: #f5f1e8;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #52606d;
  --accent: #2f5f8f;
  --border: #d9d3c7;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
.site-header {
  padding: 1.25rem 1rem;
  text-align: center;
}
.site-header h1 { margin: 0 0 .25rem; }
.subtitle { margin: 0; color: var(--muted); }
main { flex: 1; max-width: 900px; margin: 0 auto 3rem; padding: 0 1rem; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center; justify-content: space-between;
  margin-bottom: 1rem;
}
.daily-nav, .actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
button {
  padding: .45rem .8rem; border: 1px solid var(--border);
  background: #fff; border-radius: 6px; cursor: pointer; font-size: .95rem;
}
button:hover { background: #eef2f7; }
button:disabled { opacity: .4; cursor: default; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 1rem 1.25rem;
}
.card-header h2 { margin: .25rem 0 .5rem; }
.meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; color: var(--muted); font-size: .9rem; }
.meta span:empty { display: none; }
.puzzle-body { display: flex; flex-wrap: nowrap; gap: 1rem; align-items: flex-start; margin: 1rem 0; }
.puzzle-body picture { flex: 0 0 50%; max-width: 50%; min-width: 120px; text-align: center; }
.puzzle-body .description { flex: 0 0 50%; min-width: 0; line-height: 1.5; white-space: pre-wrap; }
picture img { width: 100%; max-width: 1024px; height: auto; border: 1px solid var(--border); border-radius: 6px; image-rendering: pixelated; }
.description { line-height: 1.5; white-space: pre-wrap; }
details { margin: .5rem 0; }
summary { cursor: pointer; font-weight: 600; }
.hints { margin: 1rem 0; }
.hints p { margin: .5rem 0 0; line-height: 1.4; }
.solution-block { margin-top: 1rem; }
#solutionBox { margin-top: .75rem; padding: .75rem; background: #f0f7f0; border: 1px solid #cfe3cf; border-radius: 6px; }
#solutionText { white-space: pre-wrap; line-height: 1.5; }
.status { color: var(--muted); font-size: .9rem; min-height: 1.2rem; }
.site-footer {
  padding: 1rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--accent); }

@media print {
  header, .toolbar, .hints, .solution-block, .status, .site-footer { display: none !important; }
  .card { border: none; }
  picture img { max-width: 100%; }
}