/* Style ekranu kalendarza, plecaka i otwarcia skrzynki (P2). Wspólne klocki (.rtile, .btn-back, .info-btn) są w ../gra.css; tu tylko własne klasy ekranu.
   Płasko: bez poświat i gradientów, kolory wyłącznie ze zmiennych, animacje tylko transform/opacity. */

/* ---------- nagłówek ekranu: strzałka, tytuł, „i” ---------- */
#v-calendar .hdr, #v-backpack .hdr { justify-content: space-between; }

/* ---------- ciche tło sceny pod paskiem sezonu / nagłówkiem plecaka (ta sama ilustracja co baza, mocno przygaszona) ---------- */
.cal-scene, .bp-scene {
  position: relative; isolation: isolate; overflow: hidden; margin: 0 calc(-1 * var(--space-4));
  background: var(--color-bg-0) url("../../grafika/tla/baza-scena.svg") center bottom / cover no-repeat;
}
.cal-scene::before, .bp-scene::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--color-bg-0) 70%, transparent) 0, color-mix(in srgb, var(--color-bg-0) 88%, transparent) 100%);
}

/* ---------- kalendarz ---------- */
.cal-next { margin: 0; font-variant-numeric: tabular-nums; }
.cal-notice { align-items: flex-start; }
.cal-scene { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-2) var(--space-4) var(--space-3); }
.cal-season { display: flex; align-items: center; gap: var(--space-3); min-height: var(--tap-min); }
.cal-season-n { flex: none; }
.cal-bar { flex: 1; min-width: 40px; }
.cal-season-left { flex: none; margin: 0; white-space: nowrap; color: var(--color-text-2); font-variant-numeric: tabular-nums; }
.cal-tagline { margin: 0; font-size: var(--fs-small); color: var(--color-text-2); }

.cal-hero { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.cal-hero.st-claimable { border-color: var(--color-accent); }
.cal-hero-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.cal-hero-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.cal-hero-text > * { margin: 0; }
.cal-hero-name { color: var(--color-text-2); overflow-wrap: anywhere; }
.cal-hero-art { flex: none; max-width: 52%; }
.cal-hero-art .rtile-row { justify-content: flex-end; }
.ui .cal-hero .rtile { width: 84px; height: 84px; background: none; border-color: transparent; }
.ui .cal-hero .rtile-ic { width: 52px; height: 52px; color: var(--rc, var(--color-text-1)); }
.ui .cal-hero .rtile--crate .rtile-ic { width: 68px; height: 68px; }
.ui .cal-hero .rtile-n { right: 0; bottom: 0; }
.cal-hero.st-locked .cal-hero-art, .cal-hero.st-expired .cal-hero-art { opacity: .75; }
.cal-hero .cal-st { flex-direction: row; justify-content: flex-start; gap: 6px; margin-top: 0; font-size: var(--fs-small); }
.cal-claim { align-self: center; width: 100%; max-width: 280px; min-height: 48px; border-radius: var(--radius-pill); }
.cal-go { align-self: flex-start; }

.cal-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-2); }
.cal-cell { min-width: 0; display: flex; }
@media (max-width: 379px) { .cal-grid { gap: 6px; } }
.cal-cell.is-wide { grid-column: span 2; }
.cal-day {
  flex: 1; min-width: 0; min-height: 92px; display: flex; flex-direction: column; align-items: stretch; gap: var(--space-1);
  padding: 6px 4px; border-radius: var(--radius-m); border: 1px solid var(--color-line); background: var(--color-bg-1);
  color: var(--color-text-1); font: inherit; cursor: pointer; box-shadow: none; text-align: center;
}
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 0; min-height: 18px; padding: 0; }
.cal-head .ic { width: 14px; height: 14px; }
.cal-n { font: 700 var(--fs-label) / 1 var(--font-display); white-space: nowrap; }
.cal-st { display: inline-flex; align-items: center; gap: 6px; color: var(--color-text-2); font-size: var(--fs-label); line-height: 1.15; }
.cal-st .ic { flex: none; }
.cal-day .rtile-row { flex: 1; justify-content: center; align-items: center; gap: 6px; }
.ui .cal-day .rtile { width: auto; height: auto; display: flex; flex-direction: column; align-items: center; gap: 2px; background: none; border: 0; }
.ui .cal-day .rtile-ic { width: 30px; height: 30px; color: var(--rc, var(--color-text-1)); }
.ui .cal-day .rtile-n { position: static; padding: 0; min-width: 0; border: 0; background: none; font-size: 13px; line-height: 1.1; }
.cal-day.is-locked .rtile, .cal-day.is-expired .rtile { opacity: .75; }
.cal-day.is-claimable { border: 2px solid var(--color-accent); padding: 5px 3px; }
.cal-day[aria-pressed="true"] { background: var(--color-bg-3); }
.cal-day[aria-pressed="true"]:not(.is-claimable) { border-color: var(--color-text-2); }
.cal-day.is-claimed .cal-st { color: var(--color-success); }
.cal-day.is-expired .cal-n { text-decoration: line-through; }
.cal-day:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.cal-foot { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; }
.cal-foot .ic { margin-top: 1px; }
.btn-back { position: relative; }
.btn-back .ic { position: absolute; left: var(--space-4); top: 50%; margin-top: -8px; }

/* ---------- plecak ---------- */
.bp-scene { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4); }
.bp-scene .bp-head-ic { flex: none; width: 48px; height: 48px; }
.bp-head-text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-head-text > * { margin: 0; }
.bp-heading { font: 700 22px / 1.15 var(--font-display); letter-spacing: -.02em; }
.bp-sub { color: var(--color-text-2); }
.bp-all { width: 100%; }
.bp-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.bp-entry { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.bp-art { flex: none; display: flex; align-items: center; gap: var(--space-2); }
.bp-badge { width: 40px; height: 40px; }
.bp-text { flex: 1 1 140px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bp-text > * { margin: 0; }
.bp-what { overflow-wrap: anywhere; }
.bp-claim { flex: none; min-width: 96px; }
.bp-exp { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; color: var(--color-text-2); }
.bp-exp.is-urgent { color: var(--color-error); font-weight: 700; }
.bp-ttl { display: flex; align-items: flex-start; gap: var(--space-2); margin: 0; }
.bp-ttl .ic { margin-top: 1px; }
.bp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-6) var(--space-4); }

/* ---------- otwarcie skrzynki / nagrody (nakładka pełnoekranowa) ---------- */
.overlay .dialog.rv {
  left: 0; right: 0; top: 0; bottom: 0; transform: none; border: 0; border-radius: 0; box-shadow: none; text-align: center; gap: var(--space-4);
  background: var(--color-bg-0); padding: var(--safe-top) var(--space-4) calc(var(--safe-bottom) + var(--space-2));
  animation: ui-in-fade var(--dur-base) var(--ease-out) both;
}
.rv .sheet-head { text-align: left; }
.rv .rv-stage { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-6); cursor: pointer; }
.rv .rv-block { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); max-width: 100%; }
.rv .rv-stage .rtile-row { justify-content: center; }
.rv .rv-stage .rtile { width: 64px; height: 64px; }
.rv .rv-stage .rtile-ic { width: 32px; height: 32px; }
.rv .rv-crate-tile .rtile { width: 96px; height: 96px; }
.rv .rv-crate-tile .rtile-ic { width: 48px; height: 48px; }
.rv .rv-big .rtile { width: 80px; height: 80px; }
.rv .rv-big .rtile-ic { width: 40px; height: 40px; }
.rv .rv-level { color: var(--color-accent); }
.rv .rv-names { max-width: 300px; margin: 0; }
.rv .rv-note { margin: 0; max-width: 300px; }
.rv-actions { display: flex; flex-direction: column; gap: var(--space-2); }
.rv-claimed { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: var(--space-2); }
.rv-claimed-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) var(--space-3); border: 1px solid var(--color-line); border-radius: var(--radius-m); text-align: left; }
.rv .rv-claimed .rtile { width: 44px; height: 44px; }
.rv .rv-claimed .rtile-ic { width: 22px; height: 22px; }
.rv .rv-claimed .rtile-row { justify-content: flex-end; }

/* odsłony: wjazd z dołu 360 ms, opóźnienie z harmonogramu (--at, ms); skrzynka po otwarciu przygasa */
.rv .rv-in { animation: rv-rise 360ms var(--ease-out) calc(var(--at, 0) * 1ms) both; }
.rv .rv-items .r-legendary.rv-in { animation-duration: 600ms; }
.rv .rv-crate-tile > .rv-in { animation: rv-rise 360ms var(--ease-out) calc(var(--at, 0) * 1ms) both, rv-open 220ms var(--ease-out) calc(var(--open, 0) * 1ms) forwards; }
@keyframes rv-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rv-open { to { opacity: .45; transform: scale(.9); } }
.rv.is-done .rv-in, .rv.is-done .rv-crate-tile > .rv-in { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .rv .rv-in, .rv .rv-crate-tile > .rv-in { animation: none; }
}

/* ---------- zakładka Nagrody: trzy duże pozycje (kalendarz, plecak, osiągnięcia) ---------- */
.rw-hub { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); }
.rw-link { display: flex; align-items: center; gap: var(--space-3); min-height: 88px; padding: var(--space-3) var(--space-4); color: var(--color-text-1); text-decoration: none; }
.rw-link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.rw-link:active { background: var(--color-bg-2); }
.rw-link.is-urgent { border-color: var(--color-error-solid); border-width: var(--stroke-thick); }
.rw-link .grow { display: flex; flex-direction: column; gap: 2px; }
.rw-disc { position: relative; flex: none; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--color-bg-2); border: var(--stroke-thin) solid var(--color-line); }
.rw-disc .ic { width: 28px; height: 28px; color: var(--color-accent); }
.rw-disc .rw-count { top: -4px; right: -4px; margin: 0; min-width: 20px; height: 20px; border-color: var(--color-bg-1); font-size: var(--fs-label); line-height: 16px; }
.rw-lines { display: flex; flex-direction: column; gap: 2px; }
.rw-line { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.rw-line.is-urgent { color: var(--color-error); font-weight: 700; }

/* statystyki przedmiotów w odsłonie nagrody (W3) */
.rv .rv-gear { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.rv .rv-gear-line { margin: 0; }
.rv .rv-gear-line strong { color: var(--color-text-1); }

/* nagroda dnia (+Chwała, +ammo): karta nad listą nagród; przycisk pod tekstem, żeby długi podpis nie ściskał treści */
.rw-daily { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); padding: var(--space-3) var(--space-4); }
.rw-daily .grow { display: flex; flex: 1 1 0; flex-direction: column; gap: 2px; min-width: 0; }
.rw-daily .btn { flex: 1 0 100%; white-space: normal; }
.rw-daily[hidden] { display: none; }
