/* Proof 6, the shift journal and the handover. The journal in the phone; beside it, what the next shift finds waiting. */
/* The toy's room is kept before it is drawn, so the page below does not jump. */
.js [data-toy='journal'] { min-height: 761px; }
@media (min-width: 700px) { .js [data-toy='journal'] { min-height: 680px; } }
.jr { container-type: inline-size; }
/* On a narrow screen the phone is a little shorter, so its last button stays above the page's own dock. */
@container (max-width: 569px) { .jr .phone { height: 590px; } .jr .phone > .screen { height: 572px; } }
.jr-in { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.jr-phone { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.jr-nudge.still::before { animation: none; }
.jr-side { width: 100%; max-width: 350px; }
@container (min-width: 570px) {
  .jr-in { flex-direction: row; align-items: flex-start; justify-content: center; gap: 24px; }
  .jr-side { flex: 1 1 0; min-width: 0; max-width: 292px; padding-top: 70px; }
}

/* ----- In the phone ----- */
.jr .screen { gap: 9px; }
.jr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-inline: 12px; }
.jr-chip { height: 34px; padding-inline: 13px; border-radius: 17px; border: 1.5px solid var(--line-control); background: var(--surface); font: 600 13px/1 var(--sans); color: var(--text); transition: transform 160ms var(--ease-spring), border-color 160ms, background 160ms; }
/* A wave through the chips when the toy is first seen. */
.jr.intro .jr-chip { animation: jr-pop 520ms 200ms var(--ease-in-out); }
.jr.intro .jr-chip:nth-child(2) { animation-delay: 280ms; } .jr.intro .jr-chip:nth-child(3) { animation-delay: 360ms; } .jr.intro .jr-chip:nth-child(4) { animation-delay: 440ms; } .jr.intro .jr-chip:nth-child(5) { animation-delay: 520ms; }
@keyframes jr-pop { 40% { transform: translateY(-5px) scale(1.12) rotate(-3deg); } }
.jr-chip:hover { transform: translateY(-1px) rotate(-2deg); border-color: var(--accent); }
.jr-chip:active { transform: scale(0.94); }
.jr-chip.used { border-style: dashed; border-color: var(--line-strong); background: transparent; color: var(--text-3); }
.jr-chip.used::before { content: ''; display: inline-block; width: 8px; height: 4px; margin-inline-end: 6px; border: solid currentColor; border-width: 0 0 1.5px 1.5px; transform: translateY(-3px) rotate(-45deg); }
.jr-list { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; margin-inline: 12px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent); mask-image: linear-gradient(to bottom, #000 82%, transparent); }
.jr-entry { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 11px 12px 12px; }
.jr-entry + .jr-entry { border-top: 1px solid var(--line); }
.jr-entry.new { animation: jr-land 460ms var(--ease-spring) both; }
@keyframes jr-land { from { opacity: 0; transform: translateY(-16px) scale(0.96); } }
.jr-text { font: 500 14px/19px var(--sans); color: var(--text); min-height: 19px; }
.jr-entry.writing .jr-text::after { content: ''; display: inline-block; width: 2px; height: 15px; margin-inline-start: 2px; vertical-align: -2px; background: var(--accent); animation: jr-blink 700ms steps(1) infinite; }
@keyframes jr-blink { 50% { opacity: 0; } }
.jr-by { font: 400 12px/17px var(--sans); color: var(--text-2); }
.jr-follow { display: inline-flex; align-items: center; gap: 8px; margin-top: 3px; font: 500 12px/18px var(--sans); color: var(--text-2); }
.jr-follow i { position: relative; width: 30px; height: 18px; border-radius: 9px; background: var(--line-control); transition: background 180ms; }
.jr-follow i::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); transition: inset-inline-start 200ms var(--ease-spring); }
.jr-follow[aria-checked='true'] { color: var(--warn); font-weight: 600; }
.jr-follow[aria-checked='true'] i { background: var(--warn); }
.jr-follow[aria-checked='true'] i::after { inset-inline-start: 14px; }
.jr-done { background: var(--ok-tint); color: var(--ok); }
.jr-pulse { position: relative; }
.jr-pulse::after { content: ''; position: absolute; inset: -4px; border-radius: 16px; border: 2px solid var(--accent); animation: jr-ring 1.5s var(--ease-out) infinite; pointer-events: none; }
@keyframes jr-ring { from { opacity: 0.9; transform: scale(0.96, 0.9); } to { opacity: 0; transform: scale(1.06, 1.4); } }

/* The handover checklist: a sheet over the journal. */
.jr-shade { position: absolute; z-index: 3; inset: 0; background: color-mix(in srgb, var(--navy) 42%, transparent); animation: jr-fade 200ms linear both; }
@keyframes jr-fade { from { opacity: 0; } }
.jr-sheet { position: absolute; z-index: 4; inset-inline: 0; bottom: 0; display: flex; flex-direction: column; gap: 8px; padding: 18px 14px 18px; border-radius: 24px 24px 0 0; background: var(--surface); box-shadow: 0 -18px 40px -18px color-mix(in srgb, var(--navy) 70%, transparent); animation: jr-up 380ms var(--ease-spring) both; }
@keyframes jr-up { from { transform: translateY(100%); } }
.jr-sheet-title { font: 700 21px/25px var(--sans); letter-spacing: -0.02em; color: var(--text); }
.jr-sheet-sub { margin-top: -6px; margin-bottom: 4px; font: 400 13px/18px var(--sans); color: var(--text-2); }
.jr-tick { display: flex; align-items: center; gap: 11px; min-height: 50px; padding-inline: 12px; border-radius: 14px; border: 1px solid var(--line); text-align: start; font: 500 15px/20px var(--sans); color: var(--text); transition: background 160ms, border-color 160ms, transform 160ms var(--ease-spring); }
.jr-tick:active { transform: scale(0.98); }
.jr-tick[aria-checked='true'] { background: var(--ok-tint); border-color: var(--ok-solid); }
.jr-sheet-acts { display: flex; gap: 8px; margin-top: 6px; }
.jr-sheet-acts .ui-btn { flex: 1; padding-inline: 10px; }

/* ----- What waits for the next shift ----- */
.jr-next { display: flex; flex-direction: column; gap: 12px; padding: 15px 15px 15px; border-radius: 20px; background: color-mix(in srgb, var(--surface) 55%, transparent); border: 1.5px dashed color-mix(in srgb, var(--navy) 35%, transparent); transition: background 300ms, border-color 300ms; }
.jr-next.lit { background: var(--surface); border: 1px solid var(--line); box-shadow: 0 22px 36px -24px color-mix(in srgb, var(--navy) 65%, transparent); }
.jr-next.land { animation: jr-lit 620ms var(--ease-spring) both; }
@keyframes jr-lit { 0% { transform: scale(0.94) rotate(-1.5deg); } 55% { transform: scale(1.03) rotate(0.6deg); } 100% { transform: none; } }
.jr-next-head { display: flex; align-items: center; gap: 10px; }
.jr-next-head .av { width: 34px; height: 34px; border-radius: 17px; font-size: 14px; }
.jr-next-head > span:not(.av) { display: flex; flex-direction: column; }
.jr-next-head b { font: 700 16px/21px var(--sans); color: var(--text); }
.jr-next-head span span { font: 400 12px/16px var(--sans); color: var(--text-2); }
.jr-next-wait { font: 400 14px/20px var(--sans); color: var(--text-2); }
.jr-next-block { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.jr-next-checks { display: flex; flex-direction: column; gap: 4px; margin-block: 2px; }
.jr-next-checks li { display: flex; align-items: center; gap: 8px; font: 400 13px/18px var(--sans); color: var(--text); }
.jr-next-checks .ui-check { width: 17px; height: 17px; border-radius: 6px; }
.jr-next-checks .ui-check.on::after { width: 8px; height: 4px; }
.jr-next-num { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 7px 10px; border-radius: 10px; background: var(--sunken); font: 400 13px/18px var(--sans); color: var(--text-2); }
.jr-next-num b { font: 500 13px/18px var(--mono); color: var(--text); }
.jr-read { animation: jr-land 420ms var(--ease-spring) both; }
.jr-foot { font: 400 12px/16px var(--sans); color: var(--text-3); }

/* With the whole width: more room between the phone and what stands beside it. */
@container (min-width: 860px) { .jr-in { gap: clamp(56px, 8cqw, 110px); } }
