/* r38 · The day, hour by hour. One photo of the park and a clock ruler you drag, flick or step through.
   Replaces the pinned journey (r12) and the sideways strip (r29): the page scrolls past normally, only the ruler moves time.
   Loaded after r37.css. Markup: section.day2#day (r38/day/day-section.html). Script: assets/r38-day.js */

/* the report no longer starts on top of a pinned day: it begins after it, like any section */
.rep { margin-top: 0; }

.day2 { position: relative; padding-block: calc(var(--sp) * .9) calc(var(--sp) * .8); }
.dc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px 64px; flex-wrap: wrap; margin-bottom: clamp(28px, 3.4vw, 44px); }
.dc-head > :first-child { flex: 1 1 520px; }
.dc-head .h2 { max-width: 15ch; }
.dc-intro { flex: 0 1 470px; display: grid; gap: 12px; }
.dc-intro .lead { max-width: 470px; }
.dc-intro .faint { display: block; margin-top: 8px; font-size: 14px; color: var(--faint); }

/* ---------- layout ---------- */
.dc { display: grid; gap: 18px; }
.dc-stage { position: relative; border-radius: 22px; overflow: hidden; background: #0d0f10; aspect-ratio: 1 / 1; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: grab; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.dc-stage:active { cursor: grabbing; }
@media (min-width: 700px) { .dc-stage { aspect-ratio: 16 / 9; } }
@media (min-width: 980px) {
  .dc { grid-template-columns: minmax(0, 1.72fr) minmax(300px, 1fr); gap: 18px 28px; align-items: stretch; }
  .dc-stage { grid-column: 1; grid-row: 1; }
  .dc-side { grid-column: 2; grid-row: 1; }
  .dc-clock, .dc-dash { grid-column: 1 / -1; }
}

/* below the two-column width the clock sits right under the photo, so the light changes where you are looking */
@media (max-width: 979px) {
  .dc-stage { order: 0; } .dc-clock { order: 1; } .dc-side { order: 2; margin-top: 10px; } .dc-dash { order: 3; }
}

/* ---------- the photo: one plane the size of the picture, so the pins sit on the same spot at any crop ---------- */
.dc-plane { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
.dc-photo, .dc-layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.dc-photo { z-index: 0; }
.dc-layer { object-fit: cover; opacity: 0; will-change: opacity; }
.dc-layer:first-child { opacity: 1; }
.dc-rain { position: absolute; inset: 0; opacity: 0; pointer-events: none; background: linear-gradient(180deg, rgba(8,12,20,.38), rgba(8,12,20,.08) 55%, rgba(8,12,20,.26)); }
.dc-rain::before { content: ""; position: absolute; inset: -40px 0 0; background: repeating-linear-gradient(104deg, transparent 0 14px, rgba(215,228,255,.26) 14px 15.5px, transparent 15.5px 31px); animation: dc-rain .42s linear infinite; }
@keyframes dc-rain { to { transform: translate3d(-9px, 40px, 0); } }
.dc-fence { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .5s ease-out; pointer-events: none; }
.dc.is-fence .dc-fence { opacity: 1; }
.dc-fence .f-out { fill: rgba(5,6,7,.42); fill-rule: evenodd; }
.dc-fence .f-line { fill: none; stroke: var(--lime); stroke-width: 2px; stroke-dasharray: 6 5; vector-effect: non-scaling-stroke; }

/* pins: a dot on the spot, a chip beside it; js places them and keeps them apart */
.dc-pins { position: absolute; inset: 0; }
.dc-pg { position: absolute; inset: 0; visibility: hidden; }
.dc-pg.is-on { visibility: visible; }
.dc-pin { position: absolute; left: calc(var(--x) * 1%); top: calc(var(--y) * 1%); width: 0; height: 0; }
.dc-pin > i { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 3px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.5); opacity: 0; transform: scale(.4); transition: opacity .25s ease-out, transform .35s cubic-bezier(.3,1.5,.5,1); }
.dc-chip { position: absolute; left: 12px; top: 0; transform: translate3d(var(--sx, 0px), calc(-50% + var(--sy, 0px)), 0); display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px; border-radius: 999px; white-space: nowrap; font-size: 13px; font-weight: 700; line-height: 1.15; color: #fff; background: rgba(16,17,19,.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 6px 18px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.12); opacity: 0; transition: opacity .28s ease-out; }
.dc-pin[data-side="left"] .dc-chip { left: auto; right: 12px; }
.dc-pg.is-on .dc-pin > i { opacity: 1; transform: none; transition-delay: var(--d, 0ms); }
.dc-pg.is-on .dc-chip { opacity: 1; transition-delay: calc(var(--d, 0ms) + 60ms); }
.dc-pin[data-out] { display: none; }
.dc-chip.is-lime { background: var(--lime); color: var(--lime-ink); box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.dc-chip.is-warn { background: rgba(242,169,59,.95); color: #1b1204; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.dc-chip.is-live em { display: inline-flex; align-items: center; gap: 5px; padding: 2px 7px; border-radius: 999px; background: #ff3b30; color: #fff; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.dc-chip.is-live em::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: dc-blink 1.4s ease-in-out infinite; }
@keyframes dc-blink { 50% { opacity: .3; } }
.dc-ico { font-size: 14px; line-height: 1; }
.dc-faces { display: inline-flex; flex: none; margin: -2px 0 -2px -3px; }
.dc-faces img { flex: none; max-width: none; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px #fff; }
.dc-faces img + img { margin-left: -7px; }
@media (max-width: 699px) {
  .dc-chip { font-size: 11.5px; padding: 5px 9px 5px 7px; gap: 5px; }
  .dc-faces img { width: 18px; height: 18px; }
  .dc-ico { font-size: 12px; }
}

/* ---------- the guest's side: what her phone shows, and who sent it ---------- */
.dc-side { display: grid; }
.dc-card { padding: 4px 0 0; }
.dc-card h3 { font-size: clamp(21px, 1.9vw, 27px); font-weight: 800; letter-spacing: -.02em; line-height: 1.12; max-width: 22ch; }
.dc-k { display: flex; align-items: center; gap: 8px; margin-top: clamp(16px, 2vw, 24px); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--mute); }
.dc-k img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.dc-push { display: flex; gap: 12px; margin-top: 10px; padding: 12px 14px 13px; border-radius: 22px; background: rgba(40,41,46,.82); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 18px 40px -18px rgba(0,0,0,.8), inset 0 0 0 1px rgba(255,255,255,.1); color: #fff; }
.dc-app { width: 38px; height: 38px; padding: 7px; border-radius: 9px; background: var(--lime); flex: none; }
.dc-pb { min-width: 0; flex: 1; }
.dc-ph { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14.5px; line-height: 1.25; }
.dc-ph b { font-weight: 700; }
.dc-ph small { flex: none; font-size: 12.5px; color: rgba(255,255,255,.55); font-variant-numeric: tabular-nums; }
.dc-pt { margin-top: 2px; font-size: 14.5px; line-height: 1.38; color: rgba(255,255,255,.9); }
.dc-who { display: flex; align-items: flex-start; gap: 10px; margin-top: 14px; font-size: 14.5px; line-height: 1.42; color: var(--mute); }
.dc-type { flex: none; margin-top: 1px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 750; letter-spacing: .04em; white-space: nowrap; border: 1px solid var(--line-2); color: var(--paper); }
.dc-type.is-auto { border-color: rgba(var(--lime-rgb), .55); color: var(--lime); }
.dc-type.is-team { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.dc-type.is-plan { border-color: rgba(242,169,59,.6); color: var(--amber); }
.dc-type.is-friends { color: var(--mute); }

/* ---------- the clock ---------- */
.dc-clock { display: grid; gap: 6px; padding-top: 4px; }
.dc-now { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 48px; }
.dc-sky { width: 22px; height: 22px; color: #F5C451; flex: none; }
.dc-sky svg { width: 100%; height: 100%; display: block; }
.dc.is-night .dc-sky { color: #C9D3FF; }
.dc-time { font-size: clamp(34px, 3.2vw, 44px); font-weight: 850; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; min-width: 3.1ch; text-align: center; }
.dc-name { font-size: 15px; font-weight: 700; color: var(--mute); min-width: 9.5em; }
.dc-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 10px; }
.dc-step { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); color: var(--paper); font-size: 26px; line-height: 1; padding-bottom: 3px; display: grid; place-items: center; transition: background .2s, border-color .2s, opacity .2s; }
.dc-step:hover { background: rgba(255,255,255,.1); border-color: var(--paper); }
.dc-step[disabled] { opacity: .3; cursor: default; }
.dc-ruler { position: relative; height: 92px; overflow: hidden; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; border-radius: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.dc-ruler:active, .dc.is-drag .dc-ruler { cursor: grabbing; }
.dc-ruler:focus-visible { outline-offset: 2px; }
.dc-tape { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
.dc-ticks { position: absolute; left: 0; right: 0; top: 44px; height: 20px;
  background-image: linear-gradient(90deg, rgba(247,246,241,.6) 0 2px, transparent 2px), linear-gradient(90deg, rgba(247,246,241,.24) 0 1px, transparent 1px);
  background-size: var(--pph) 20px, calc(var(--pph) / 6) 10px; background-repeat: repeat-x; background-position: 0 0, 0 0; }
.dc-band { position: absolute; left: 0; right: 0; top: 40px; height: 3px; border-radius: 2px; background: linear-gradient(90deg, #F5D77A 0%, #F7C66B 30%, #F29A4A 48%, #B05A7A 58%, #4C4FA8 66%, #232B5C 80%, #1A2045 100%); opacity: .9; }
.dc-hr { position: absolute; top: 68px; transform: translateX(-50%); font-size: 12px; font-weight: 600; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-pill { position: absolute; top: 6px; transform: translateX(-50%); padding: 5px 10px; border-radius: 999px; border: 0; background: rgba(255,255,255,.08); color: var(--mute); font-size: 12.5px; font-weight: 700; white-space: nowrap; line-height: 1.2; transition: background .2s, color .2s; }
.dc-pill::after { content: ""; position: absolute; left: 50%; top: calc(100% + 4px); width: 7px; height: 7px; margin-left: -3.5px; border-radius: 50%; background: currentColor; }
.dc-pill:hover { color: var(--paper); background: rgba(255,255,255,.14); }
.dc-pill.is-on { background: var(--lime); color: var(--lime-ink); }
.dc-pill.is-on::after { background: var(--lime); }
.dc-needle { position: absolute; left: 50%; top: 34px; width: 2px; height: 34px; margin-left: -1px; border-radius: 2px; background: var(--lime); box-shadow: 0 0 0 3px rgba(var(--lime-rgb), .18); pointer-events: none; }
@media (max-width: 699px) {
  .dc-row { grid-template-columns: 38px minmax(0, 1fr) 38px; gap: 6px; }
  .dc-step { width: 38px; height: 38px; font-size: 22px; }
  .dc-pill { font-size: 11.5px; padding: 4px 8px; }
  .dc-name { font-size: 14px; min-width: 0; }
  .dc-now { justify-content: flex-start; padding-left: 4px; }
}

/* ---------- the organiser's dashboard ---------- */
.dc-dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; padding: 18px 20px 20px; border-radius: 22px; background: var(--ink-1); box-shadow: inset 0 0 0 1px var(--line); }
.dc-dk { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--mute); }
.dc-dk b { color: var(--paper); font-variant-numeric: tabular-nums; }
.dc-livedot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(var(--lime-rgb), .18); }
.dc-counters { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.dc-counters li { display: grid; gap: 4px; padding-top: 10px; border-top: 1px solid var(--line); }
.dc-counters b { font-size: clamp(26px, 2.6vw, 36px); font-weight: 850; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dc-counters li:last-child b { color: var(--lime); }
.dc-counters span { font-size: 13.5px; color: var(--mute); line-height: 1.3; }
.dc-notes { display: grid; }
.dc-note { font-size: 15px; line-height: 1.45; color: var(--paper); max-width: 60ch; }
@media (min-width: 980px) {
  .dc-dash { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 14px 40px; padding: 20px 26px 22px; }
  .dc-dk { grid-column: 1 / -1; }
  .dc-counters { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dc-notes { align-self: end; }
}
.dc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- live states (js adds .dc--js): one card, one note, one set of pins at a time; all stacked in place so nothing jumps ---------- */
.dc--js .dc-side > .dc-card, .dc--js .dc-notes > .dc-note { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .3s ease-out, visibility 0s linear .3s; }
.dc--js .dc-side > .dc-card.is-on, .dc--js .dc-notes > .dc-note.is-on { visibility: visible; opacity: 1; transition: opacity .3s ease-out .05s, visibility 0s; }
.dc--js .dc-card .dc-push { transform: translate3d(0, -10px, 0) scale(.98); opacity: 0; transition: transform .45s cubic-bezier(.2,.9,.25,1.15), opacity .25s ease-out; }
.dc--js .dc-card.is-on .dc-push { transform: none; opacity: 1; transition-delay: .12s; }

/* no js: every moment is readable in order, the ruler is not needed */
.dc:not(.dc--js) .dc-clock, .dc:not(.dc--js) .dc-pins, .dc:not(.dc--js) .dc-fence { display: none; }
.dc:not(.dc--js) .dc-side { gap: 36px; }

/* reduced motion: the ruler still works, it just jumps; no rain streaks, no slide-ins */
html.rm .dc-rain::before, html.rm .dc-chip.is-live em::before { animation: none; }
html.rm .dc--js .dc-card .dc-push, html.rm .dc-pin > i { transition: none; transform: none; }
html.rm .dc-chip, html.rm .dc--js .dc-card, html.rm .dc--js .dc-note { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .dc-rain::before, .dc-chip.is-live em::before { animation: none; }
  .dc--js .dc-card .dc-push, .dc-pin > i { transition: none; transform: none; }
  .dc-chip, .dc--js .dc-card, .dc--js .dc-note { transition: none; }
}
/* r38 fix (30.10): przy 980–1100 px zdjęcie (16:9) rozciągało się na wysokość kolumny tekstu, przez proporcje robiło się szersze
   od swojej kolumny i zasłaniało nagłówek i powiadomienie. Teraz trzyma szerokość kolumny; dwie kolumny dopiero od 1100 px. */
.dc-stage { width: 100%; min-width: 0; }
@media (min-width: 980px) { .dc-stage { align-self: start; } }
@media (min-width: 980px) and (max-width: 1099px) {
  .dc { grid-template-columns: minmax(0, 1fr); }
  .dc-stage, .dc-side { grid-column: 1; grid-row: auto; }
  .dc-stage { order: 0; } .dc-clock { order: 1; } .dc-side { order: 2; margin-top: 10px; } .dc-dash { order: 3; }
}
