/* =========================================================
   ZIMOWE WYZWANIE – style
   1. Wspólny układ
   2. Motyw „Zimowy Sweterek”: kremowe tło, norweski wzór
      sweterka, czerwień i zieleń, kafelki-polaroidy z taśmą
   ========================================================= */

/* ---------- 1. Wspólny układ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; line-height: 1.6; min-height: 100vh; }
img { max-width: 100%; }

#strona { position: relative; z-index: 1; max-width: 1060px; margin: 24px auto 70px; }
#naglowek { position: relative; padding: 34px 32px 28px; }
#naglowek h1 { margin: 0; line-height: 1.1; }
#naglowek h1 a { color: inherit; text-decoration: none; }
.podtytul { margin: 8px 0 0; }

#menu { display: flex; flex-wrap: wrap; gap: 2px 0; padding: 0 22px; }
#menu a { display: inline-block; padding: 8px 12px; text-decoration: none; }

#kolumny { display: flex; gap: 30px; padding: 24px 28px 30px; align-items: flex-start; }
#tresc { flex: 1; min-width: 0; outline: none; }
#boczny { width: 230px; flex-shrink: 0; }

.wpis { margin-bottom: 34px; }
.data-wpisu { font-size: .8em; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px; }
.tytul-wpisu { margin: 0 0 12px; line-height: 1.25; }
.tytul-nr { white-space: nowrap; }
.okruszki { font-size: .85em; margin: 0 0 14px; }
.faza-wpisu { font-style: italic; margin-top: -4px; }
.tresc-wpisu h2 { font-size: 1.35em; }
.tresc-wpisu h3 { font-size: 1.15em; margin: 0 0 10px; }
.tresc-wpisu h4 { font-size: 1em; margin: 18px 0 8px; }
.sek > :first-child { margin-top: 0; }
.tresc-wpisu blockquote { margin: 14px 0; padding: 10px 16px; }
.tresc-wpisu blockquote p { margin: 4px 0; }
li > p { margin: 0; }
.tresc-wpisu ul, .tresc-wpisu ol { padding-left: 1.5em; }
.tresc-wpisu li { margin: 3px 0; }

.sek { padding: 16px 18px; margin: 0 0 18px; }
.ikona { display: inline-block; vertical-align: middle; line-height: 0; }
.ikona svg { display: block; }
.ikona-16 { width: 16px; height: 16px; position: relative; top: -1px; }
.ikona-32 { width: 32px; height: 32px; }
.sek-ikona { margin: -4px 10px -4px 0; }
.sek-pozegnanie { font-style: italic; }

.postep-start { margin-top: 14px; }
.pasek { height: 14px; overflow: hidden; margin: 6px 0; }
.pasek-wypelnienie { display: block; height: 100%; transition: width .4s ease; }
.postep-liczby { margin: 4px 0 10px; }

/* stan synchronizacji wspólnego postępu */
.stan-sync { margin: 10px 0 2px; font-size: .82em; line-height: 1.35; color: #2f5d3a; }
.stan-sync::before { content: "●"; margin-right: 5px; }
.stan-sync-lokalnie, .stan-sync-zapisuje { color: #7a6a4a; }
.stan-sync-blad { color: #a12626; font-weight: bold; }
.gratulacje { font-weight: bold; text-align: center; padding: 10px; }

.tydzien { margin: 0 0 34px; scroll-margin-top: 16px; }
.tydzien-naglowek { position: relative; padding: 10px 70px 10px 14px; margin-bottom: 14px; }
.tydzien-naglowek h2 { margin: 0; font-size: 1.2em; line-height: 1.3; }
.tydzien-nr { display: block; font-size: .72em; text-transform: uppercase; letter-spacing: .14em; }
.tydzien-licznik { position: absolute; top: 12px; right: 14px; font-weight: bold; }
.tydzien-faza { margin: 4px 0 0; font-size: .85em; font-weight: bold; }
.tydzien-opis { margin: 2px 0 0; font-size: .88em; font-style: italic; }
.weekend { font-size: .82em; margin: 10px 0 0; text-align: right; opacity: .85; }

.kafelki { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kafelek { position: relative; display: flex; flex-direction: column; min-height: 210px; padding: 12px 12px 10px; }
.kafelek-link { text-decoration: none; color: inherit; display: block; }
.kafelek-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.kafelek-dzien-tyg { font-size: .7em; text-transform: uppercase; letter-spacing: .12em; }
.kafelek-nr { display: block; font-size: 1.9em; line-height: 1.05; font-weight: bold; margin: 2px 0 6px; }
.kafelek-nr small { font-size: .42em; text-transform: uppercase; letter-spacing: .1em; display: block; }
.kafelek-tytul { display: block; font-weight: bold; font-size: .88em; line-height: 1.3; }
.kafelek-opis { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: .74em; line-height: 1.35; margin-top: 6px; opacity: .8; }
.kafelek-check { position: relative; z-index: 2; margin-top: auto; padding-top: 10px; font-size: .8em; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; }
.kafelek-check input { margin: 0; width: 16px; height: 16px; cursor: pointer; }
.stempel { display: none; position: absolute; z-index: 0; pointer-events: none; }
.kafelek.zrobiony .stempel { display: block; }

.ukoncz { margin: 26px 0 18px; padding: 16px 18px; text-align: center; }
.ukoncz label { cursor: pointer; font-weight: bold; font-size: 1.1em; display: inline-flex; align-items: center; gap: 10px; }
.ukoncz input { width: 22px; height: 22px; margin: 0; cursor: pointer; }
.ukoncz-info { margin: 8px 0 0; min-height: 1.4em; }

.nawigacja-dni { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.stopka-wpisu { font-size: .8em; margin-top: 18px; padding-top: 8px; }

.widget { margin-bottom: 22px; }
.widget h3 { margin: 0 0 10px; }
.widget p { margin: 6px 0; }
.widget ol, .widget ul { padding-left: 1.3em; margin: 6px 0; }
.widget-jak { font-size: .9em; }
.widget-jak li { margin-bottom: 6px; }
.lista-tygodni { list-style: none; padding: 0 !important; }
.lista-tygodni li { padding: 3px 0; }
.przycisk { font: inherit; font-size: .9em; cursor: pointer; padding: 4px 10px; }

#stopka { text-align: center; padding: 18px 20px 22px; font-size: .82em; }
#stopka p { margin: 4px 0; }
.licznik span { font-family: "Courier New", monospace; letter-spacing: 2px; padding: 1px 6px; }

a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px dashed currentColor; outline-offset: 2px; }

/* śnieg */
#snieg { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.platek { position: absolute; top: -30px; animation-name: spadanie, kolysanie; animation-timing-function: linear, ease-in-out;
  animation-iteration-count: infinite, infinite; animation-direction: normal, alternate; will-change: transform; }
@keyframes spadanie { from { top: -30px; } to { top: 102vh; } }
@keyframes kolysanie { from { transform: translateX(-18px) rotate(0deg); } to { transform: translateX(18px) rotate(90deg); } }

@media (max-width: 1000px) {
  .kafelki { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
@media (max-width: 760px) {
  #strona { margin: 0 0 70px; }
  #kolumny { flex-direction: column; padding: 16px; gap: 10px; }
  #boczny { width: 100%; }
  #naglowek { padding: 24px 16px 20px; }
  #menu { padding: 0 8px; }
  #menu a { padding: 6px 8px; }
  .kafelki { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .kafelek { min-height: 180px; }
}

/* ---------- 2. Motyw „Zimowy Sweterek” ---------- */
body {
  font-family: Verdana, Geneva, sans-serif; font-size: 13px; color: #4a3b2f;
  background: #f4ecdd;
  background-image: linear-gradient(45deg, rgba(178,42,42,.04) 25%, transparent 25%, transparent 75%, rgba(178,42,42,.04) 75%),
                    linear-gradient(45deg, rgba(178,42,42,.04) 25%, transparent 25%, transparent 75%, rgba(178,42,42,.04) 75%);
  background-size: 20px 20px; background-position: 0 0, 10px 10px;
}
body a { color: #a12626; }
body a:hover { color: #2f5d3a; }
body #strona { background: #fffaf0; border: 1px solid #d8c7a6; box-shadow: 4px 4px 0 rgba(120,90,50,.15); }
body #naglowek {
  background: #b22a2a; color: #fff; text-align: center; padding-top: 46px; padding-bottom: 42px;
  border-bottom: 4px solid #8f1f1f;
}
body #naglowek::before, body #naglowek::after {
  content: ""; position: absolute; left: 0; right: 0; height: 22px;
  background:
    linear-gradient(135deg, #fff 25%, transparent 25%) -8px 0 / 16px 16px repeat-x,
    linear-gradient(225deg, #fff 25%, transparent 25%) -8px 0 / 16px 16px repeat-x,
    radial-gradient(circle, #fff 2px, transparent 2.5px) 0 16px / 16px 6px repeat-x;
}
body #naglowek::before { top: 6px; }
body #naglowek::after { bottom: 6px; transform: scaleY(-1); }
body #naglowek h1 { font-family: Georgia, serif; font-size: 2.6em; letter-spacing: .04em; text-shadow: 2px 2px 0 #7a1717; }
body #naglowek h1::before, body #naglowek h1::after { content: ""; display: inline-block; width: 32px; height: 32px; margin: 0 .45em; vertical-align: middle;
  background: var(--ikona-platek) center / 32px 32px no-repeat; }
body .podtytul { color: #ffe9c9; font-weight: bold; font-size: .9em; }
body #menu { background: #2f5d3a; justify-content: center; border-bottom: 3px solid #fff; box-shadow: 0 3px 0 #2f5d3a; }
body #menu a { color: #fff; font-weight: bold; font-size: .85em; text-decoration: none; }
body #menu a + a::before { content: "•"; color: #9fc4a5; margin-right: 12px; font-weight: normal; }
body #menu a[aria-current] { color: #ffd98a; }
body #kolumny { padding-top: 30px; }
body .widget { border: 2px dashed #c9a8a8; background: #fff; padding: 0 12px 10px; font-size: .92em; }
body .widget h3 { margin: 0 -12px 10px; padding: 5px 12px; background: #2f5d3a; color: #fff; font-size: .9em; }
body .widget h3::before { content: ""; display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px;
  background: var(--ikona-platek) center / 16px 16px no-repeat; }
body .data-wpisu { color: #2f5d3a; font-weight: bold; }
body .tytul-wpisu { font-family: Georgia, serif; color: #a12626; font-size: 1.75em; }
body .tytul-nr { background: #a12626; color: #fff; font-size: .55em; padding: 2px 8px; vertical-align: middle; border-radius: 3px; }
body .faza-wpisu { color: #2f5d3a; }
body .tresc-wpisu h3, body .tresc-wpisu h4 { font-family: Georgia, serif; color: #2f5d3a; }
body .tresc-wpisu blockquote { background: #fdf3e1; border-left: 4px solid #b22a2a; }
body .sek { background: #fff; border: 1px solid #e4d5ba; }
body .sek-zadanie { border: 2px solid #2f5d3a; background: #f6fbf4; position: relative; }
body .sek-wskazowka { background: #fdf3e1; border-style: dashed; }
body .sek-zlota { text-align: center; background: #b22a2a; color: #fff; border: 0;
  box-shadow: inset 0 0 0 4px #b22a2a, inset 0 0 0 6px #fff; }
body .sek-zlota h3 { color: #ffd98a; }
body .sek-zlota blockquote { background: none; border: 0; font-size: 1.25em; font-family: Georgia, serif; }
body .sek-pozegnanie { background: none; border: 0; text-align: center; color: #7d6650; }
body .pasek { background: #fff; border: 2px solid #2f5d3a; height: 16px; }
body .pasek-wypelnienie { background: repeating-linear-gradient(90deg, #b22a2a 0 8px, #fff 8px 10px); }
body .tydzien-naglowek { background: #2f5d3a; color: #fff; border-radius: 4px 4px 0 0; }
body .tydzien-naglowek h2 { font-family: Georgia, serif; }
body .tydzien-nr { color: #ffd98a; }
body .tydzien-faza { color: #cfe5d2; }
body .tydzien-opis { color: #e8f1e9; }
body .tydzien-licznik { background: #fff; color: #2f5d3a; border-radius: 10px; padding: 0 8px; }
body .kafelki { gap: 18px; padding: 8px 4px; }
body .kafelek { background: #fff; padding: 14px 12px 12px; box-shadow: 2px 3px 6px rgba(80,50,20,.22); transition: transform .2s; }
body .kafelek:nth-child(odd) { transform: rotate(-1.4deg); }
body .kafelek:nth-child(even) { transform: rotate(1.2deg); }
body .kafelek:hover { transform: rotate(0) scale(1.03); z-index: 3; }
body .kafelek::before { content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 18px; margin-left: -32px;
  background: repeating-linear-gradient(45deg, rgba(178,42,42,.55) 0 5px, rgba(255,255,255,.6) 5px 10px); transform: rotate(-3deg); }
body .kafelek:nth-child(even)::before { background: repeating-linear-gradient(45deg, rgba(47,93,58,.55) 0 5px, rgba(255,255,255,.6) 5px 10px); transform: rotate(4deg); }
body .kafelek-dzien-tyg { color: #2f5d3a; font-weight: bold; }
body .kafelek-nr { color: #b22a2a; font-family: Georgia, serif; }
body .kafelek-tytul { color: #4a3b2f; }
body .kafelek-check { color: #2f5d3a; font-weight: bold; }
body .kafelek.zrobiony { background: #f6fbf4; }
body .stempel { right: 6px; bottom: 6px; width: 50px; height: 50px; font-size: .55em !important; border-radius: 50%; border: 3px double #2f5d3a; color: #2f5d3a;
  font-weight: bold; text-transform: uppercase; display: none; text-align: center; line-height: 1.2; padding-top: 7px;
  transform: rotate(-16deg); opacity: .55; }
body .kafelek.zrobiony .stempel { display: block; }
body input[type="checkbox"] { accent-color: #2f5d3a; }
body .ukoncz { border: 2px dashed #b22a2a; background: #fff; }
body .ukoncz.zrobiony { border: 2px solid #2f5d3a; background: #f6fbf4; }
body .ukoncz-info { color: #2f5d3a; font-weight: bold; }
body .nawigacja-dni a { background: #b22a2a; color: #fff; padding: 4px 12px; text-decoration: none; border-radius: 3px; font-weight: bold; }
body .nawigacja-dni a:hover { background: #2f5d3a; color: #fff; }
body .stopka-wpisu { border-top: 1px dashed #d8c7a6; color: #7d6650; }
body .przycisk { background: #fff; border: 2px solid #b22a2a; color: #a12626; font-weight: bold; font-family: Verdana, sans-serif; border-radius: 3px; }
body #stopka { background: #2f5d3a; color: #e8f1e9; }
body #stopka::before { content: ""; display: block; height: 10px; margin: -18px -20px 14px;
  background: linear-gradient(135deg, #fffaf0 25%, transparent 25%) -5px 0 / 10px 10px repeat-x,
              linear-gradient(225deg, #fffaf0 25%, transparent 25%) -5px 0 / 10px 10px repeat-x; }
body .licznik span { background: #fff; color: #b22a2a; }
body .platek { color: #fff; text-shadow: 0 0 2px #b8a68a; }
body .gratulacje { background: #2f5d3a; color: #fff; }
body .stempel .ikona { display: block; margin: 0 auto 1px; top: 0; }
body .platek .ikona { display: block; }
