:root {
  --red: #7a1420; --red2: #a3202f; --green: #1f4d33; --gold: #e0b44c;
  --cream: #fff8ec; --ink: #2b1d14; --muted: #7c6a5a; --done: #9aa59d;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: Nunito, system-ui, sans-serif; color: var(--ink);
  background: var(--green) radial-gradient(circle at 20% 10%, #2a6444 0, transparent 60%) fixed;
  min-height: 100vh; padding-bottom: 60px;
}
.top { background: var(--red); color: #fff; padding: 14px 16px 0; position: sticky; top: 0; z-index: 5; box-shadow: 0 2px 10px #0005; }
.top h1 { margin: 0 0 10px; font-family: "Mountains of Christmas", cursive; font-size: 30px; }
nav { display: flex; gap: 4px; overflow-x: auto; }
nav a { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 10px 10px 0 0; font-weight: 700; white-space: nowrap; opacity: .8; }
nav a.active { background: var(--cream); color: var(--red); opacity: 1; }
main { max-width: 760px; margin: 0 auto; padding: 16px; }
.card { background: var(--cream); border-radius: 16px; padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 4px 14px #0003; }
.card h2 { margin: 0 0 6px; font-size: 20px; color: var(--red); }
.card h3 { margin: 12px 0 4px; font-size: 16px; }
.big { font-family: "Mountains of Christmas", cursive; font-size: 34px; color: #fff; margin: 4px 0 12px; text-shadow: 0 2px 6px #0006; }
.tag { display: inline-block; background: var(--green); color: #fff; font-size: 12px; font-weight: 800; padding: 2px 8px; border-radius: 99px; margin-right: 6px; text-transform: uppercase; letter-spacing: .5px; }
.tag.bus { background: #b5541b; } .tag.present { background: var(--red2); } .tag.aktivitet { background: #2f6f8f; } .tag.inflytt, .tag.avsked { background: #6b3fa0; }
.muted { color: var(--muted); }
.time { font-weight: 800; color: var(--red2); }
ul.check { list-style: none; padding: 0; margin: 6px 0; }
ul.check li { margin: 4px 0; }
ul.check label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 6px 4px; border-radius: 8px; }
ul.check label:hover { background: #0000000a; }
ul.check input { width: 22px; height: 22px; flex: none; accent-color: var(--green); margin-top: 1px; }
ul.check input:checked + span { text-decoration: line-through; color: var(--done); }
.ask { font-style: italic; color: var(--green); font-weight: 700; margin-top: 6px; }
.day { border-left: 6px solid var(--gold); }
.day.past { opacity: .55; }
.day.today { border-left-color: var(--red2); outline: 3px solid var(--gold); }
.day .date { font-weight: 800; color: var(--muted); font-size: 14px; text-transform: capitalize; }
.progress { height: 8px; background: #0001; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress div { height: 100%; background: var(--green); }
button, .btn { font: inherit; font-weight: 800; background: var(--red); color: #fff; border: 0; border-radius: 10px; padding: 10px 16px; cursor: pointer; text-decoration: none; display: inline-block; }
button.secondary { background: var(--green); }
button.small { padding: 6px 10px; font-size: 13px; }
.letter { background: #fffdf6; border: 2px dashed var(--gold); border-radius: 14px; padding: 18px; margin: 10px 0; }
.letter .body { white-space: pre-wrap; font-family: "Mountains of Christmas", cursive; font-size: 22px; line-height: 1.35; }
.letter .head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.letter .head b { color: var(--red); }
.sync { position: fixed; bottom: 10px; right: 12px; font-size: 12px; color: #fff; opacity: .75; }
.nav-days { display: flex; justify-content: space-between; margin-bottom: 8px; }
.nav-days a { color: #fff; font-weight: 700; }
ol.steps li { margin: 6px 0; }

@media print {
  body { background: #fff; padding: 0; }
  .top, .sync, .no-print, .card > :not(.letter-list), h2.group { display: none !important; }
  main { max-width: none; padding: 0; }
  .card { box-shadow: none; padding: 0; background: #fff; }
  .letter { border: 4px double #a3202f; page-break-after: always; break-after: page; padding: 40px; margin: 0 0 0; min-height: 90vh; }
  .letter .head button { display: none; }
  .letter .head b { display: none; }
  .letter .body { font-size: 30px; }
  body.print-one .letter:not(.print-me) { display: none; }
  body.print-one .card:not(:has(.print-me)) { display: none; }
}
