:root { --bg:#14111c; --panel:#1e1a2b; --ink:#e8e4f2; --muted:#8f88a8; --gold:#ffd24a; --accent:#ff9ec7; --line:#332d47; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
header, main, footer { max-width: 860px; margin: 0 auto; padding: 0 18px; }
header { padding-top: 28px; }
h1 { margin: 0; font-size: clamp(26px, 6vw, 40px); letter-spacing: -.02em; }
h1 .cat { color: var(--accent); }
h1 small { font-size: .6em; }
.sub { color: var(--muted); margin: 6px 0 16px; }
.bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 10px 0 18px; border-bottom: 1px dashed var(--line); }
.starcount { color: var(--gold); font-weight: bold; }
.seed { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; }
input[type=text] { background: #0f0c16; color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; font: inherit; min-width: 0; }
.seed input { width: 11ch; }
button, .btn { background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font: inherit; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .btn:hover { border-color: var(--accent); }
button.link { background: none; border: 0; color: var(--accent); padding: 4px 0; }
#calendar { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 20px 0; }
.day { text-align: left; padding: 10px; border-radius: 8px; min-height: 92px; display: flex; flex-direction: column; gap: 2px; }
.day .n { color: var(--muted); font-size: 12px; }
.day .t { font-size: 13px; line-height: 1.25; }
.day .s { margin-top: auto; letter-spacing: .15em; color: #4a4360; }
.day .s .on { color: var(--gold); text-shadow: 0 0 6px #ffd24a88; }
.day.done { border-color: #6b5a2a; }
article, #finale { padding: 20px 0 10px; }
h2 { margin: 10px 0; color: var(--accent); }
h3 { margin: 22px 0 6px; color: var(--gold); font-size: 15px; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 13px; }
pre { background: #0f0c16; border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow: auto; max-height: 260px; font-size: 12px; margin: 8px 0; white-space: pre; }
pre.wrap { white-space: pre-wrap; }
details { margin: 10px 0; }
summary { cursor: pointer; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
#answer-form { margin-top: 24px; padding: 14px; background: var(--panel); border-radius: 8px; border: 1px solid var(--line); }
#answer-form input { flex: 1; min-width: 160px; }
#feedback { min-height: 1.5em; margin: 8px 0 0; }
#feedback.ok { color: #7be0a0; }
#feedback.bad { color: #ff8a8a; }
.daynav { display: flex; justify-content: space-between; margin-top: 20px; }
.paragraph { white-space: pre-wrap; }
code { background: #0f0c16; padding: 1px 5px; border-radius: 4px; }
footer { padding: 24px 18px 40px; color: var(--muted); font-size: 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; border-top: 1px dashed var(--line); margin-top: 24px; }
footer span { flex-basis: 100%; }
footer a { color: var(--accent); }

#snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
#snow span { position: absolute; top: -30px; color: #dfe9ff; opacity: .7; animation: fall linear infinite; }
@keyframes fall { to { transform: translate(40px, 110vh) rotate(360deg); } }
header { border-top: 4px dotted transparent; border-image: repeating-linear-gradient(90deg, #ff6b6b 0 24px, #ffd24a 24px 48px, #7be0a0 48px 72px, #6bb7ff 72px 96px) 4; }
