.lf-shift-callup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  margin-top: 30px;
  padding: 17px;
  align-items: center;
  border: 2px solid var(--lf-ink);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgb(255 255 255 / 72%), transparent 55%),
    #f3c544;
  box-shadow: 5px 5px 0 var(--lf-ink);
  transform: rotate(0.4deg);
}

.lf-case-meta > span:first-child,
.lf-earned-mark small { overflow-wrap: anywhere; }

.lf-shift-callup div {
  display: grid;
  gap: 4px;
}

.lf-shift-callup span,
.lf-shift-callup small,
.lf-shift-header span,
.lf-shift-arrival-count,
.lf-shift-result > p:first-child,
.lf-shift-job-proof span,
.lf-shift-job-proof small,
.lf-earned-mark span,
.lf-earned-mark small {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.58rem;
  font-weight: 850;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-transform: uppercase;
}

.lf-shift-callup strong {
  font-size: 0.8rem;
  line-height: 1.3;
}

.lf-shift-callup small { color: #5f4a13; }

.lf-shift-callup button,
.lf-shift-answer,
.lf-shift-result button {
  min-height: 48px;
  padding: 11px 14px;
  border: 2px solid var(--lf-ink);
  border-radius: 7px;
  color: #fff;
  background: var(--lf-ink);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 900;
  cursor: pointer;
}

.lf-shift-callup button {
  display: flex;
  gap: 14px;
  align-items: center;
  white-space: nowrap;
}

.lf-shift-callup button:hover,
.lf-shift-answer:hover,
.lf-shift-result button:hover { background: #35352f; }

.lf-shift-callup button:focus-visible,
.lf-shift-answer:focus-visible,
.lf-shift-result button:focus-visible {
  outline: 3px solid var(--lf-state-color);
  outline-offset: 3px;
}

.lf-shift-callup button:disabled,
.lf-shift-answer:disabled,
.lf-shift-result button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.lf-shift-panel[hidden],
.lf-shift-arrival[hidden],
.lf-shift-result[hidden],
.lf-shift-complete[hidden] { display: none; }

.lf-shift-header {
  display: flex;
  gap: 16px;
  align-items: start;
  justify-content: space-between;
}

.lf-shift-header > div { display: grid; }
.lf-shift-header .lf-step { margin-bottom: 5px; }
.lf-shift-header > div > span { color: #6d675e; }

.lf-shift-header > strong {
  max-width: 210px;
  padding: 9px 11px;
  border: 2px solid var(--lf-ink);
  border-left: 8px solid var(--lf-state-color);
  border-radius: 4px;
  background: #fff;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.67rem;
  line-height: 1.25;
  text-align: right;
  transform: rotate(1deg);
}

.lf-shift-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
}

.lf-shift-progress li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  min-width: 0;
  padding: 8px;
  align-items: center;
  border: 1px solid var(--lf-line);
  border-radius: 6px;
  color: #756f65;
  background: rgb(255 253 247 / 76%);
}

.lf-shift-progress li span {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: ui-monospace, monospace;
  font-size: 0.53rem;
  font-weight: 900;
}

.lf-shift-progress li small {
  overflow: hidden;
  font-size: 0.61rem;
  font-weight: 850;
  text-overflow: ellipsis;
}

.lf-shift-progress li.is-current {
  border-color: var(--lf-ink);
  color: var(--lf-ink);
  box-shadow: 3px 3px 0 var(--lf-state-color);
}

.lf-shift-progress li.is-done {
  color: #fff;
  border-color: var(--lf-state-color);
  background: var(--lf-state-color);
}

.lf-shift-progress li.is-done span::after {
  content: "✓";
}

.lf-shift-progress li.is-done span { font-size: 0; }
.lf-shift-progress li.is-done span::after { font-size: 0.72rem; }

.lf-shift-arrival-count {
  margin: 0 0 9px;
  color: var(--lf-state-color);
}

.lf-shift-arrival > p:not(.lf-shift-arrival-count) {
  max-width: 530px;
  margin: 16px 0 0;
  color: #58534b;
  font-size: 0.86rem;
  line-height: 1.5;
}

.lf-shift-answer {
  display: flex;
  width: 100%;
  gap: 16px;
  min-height: 54px;
  margin-top: 24px;
  align-items: center;
  justify-content: space-between;
  box-shadow: 4px 4px 0 var(--lf-state-color);
}

.lf-shift-result {
  margin-top: 27px;
  padding: 20px;
  border: 2px solid var(--lf-ink);
  border-radius: 9px;
  background: #fff;
  box-shadow: 5px 5px 0 var(--lf-state-color);
  animation: lf-shift-result-in 360ms ease both;
}

.lf-shift-result > p:first-child {
  margin: 0 0 8px;
  color: var(--lf-state-color);
}

.lf-shift-result h3 {
  margin: 0;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  letter-spacing: -0.045em;
  line-height: 1;
  text-wrap: balance;
}

.lf-shift-result h3:focus,
.lf-shift-complete h2:focus {
  border-radius: 3px;
  outline: 3px solid var(--lf-state-color);
  outline-offset: 5px;
}

.lf-shift-result > p:nth-of-type(2) {
  margin: 13px 0 0;
  color: #514d45;
  font-size: 0.79rem;
  line-height: 1.5;
}

.lf-shift-job-proof {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 14px;
  margin: 18px 0;
  padding: 12px;
  border-left: 5px solid var(--lf-state-color);
  background: #f4eee2;
}

.lf-shift-job-proof span { color: #6b655b; }
.lf-shift-job-proof strong { font-size: 0.72rem; text-align: right; }
.lf-shift-job-proof small { grid-column: 1 / -1; color: #554f46; text-transform: none; }
.lf-shift-result button { width: 100%; background: var(--lf-state-color); }

.lf-shift-complete > p:nth-of-type(2) {
  margin: 18px 0 0;
  color: #565149;
  font-size: 0.87rem;
  line-height: 1.5;
}

.lf-earned-mark {
  position: relative;
  display: grid;
  gap: 7px;
  margin-top: 28px;
  padding: 25px 24px;
  overflow: hidden;
  border: 3px double var(--lf-state-color);
  border-radius: 45% 52% 48% 42% / 42% 48% 54% 46%;
  color: var(--lf-state-color);
  background: #fff;
  text-align: center;
  transform: rotate(-1.5deg);
}

.lf-earned-mark::before,
.lf-earned-mark::after {
  position: absolute;
  width: 32px;
  height: 25px;
  border: 2px solid currentColor;
  border-radius: 50%;
  opacity: 0.22;
  content: "";
}

.lf-earned-mark::before { top: -8px; left: 12%; }
.lf-earned-mark::after { right: 9%; bottom: -10px; }

.lf-earned-mark strong {
  overflow-wrap: anywhere;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: clamp(1.05rem, 2.5vw, 1.55rem);
  line-height: 1.15;
}

.lf-shift-log {
  display: grid;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.lf-shift-log li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 10px;
  padding: 10px 11px;
  align-items: center;
  border: 1px solid var(--lf-line);
  border-radius: 7px;
  background: rgb(255 253 247 / 78%);
}

.lf-shift-log li > span:first-child {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--lf-ink);
  font-family: ui-monospace, monospace;
  font-size: 0.53rem;
  font-weight: 900;
}

.lf-shift-log li strong { font-size: 0.68rem; line-height: 1.3; }
.lf-shift-log li small { color: var(--lf-state-color); font-size: 0.58rem; font-weight: 900; text-transform: uppercase; }

.lf-shift-finish-note {
  margin: 18px 0 0;
  padding: 11px 12px;
  border-radius: 6px;
  color: #fff;
  background: var(--lf-state-color);
  font-size: 0.68rem;
  font-weight: 780;
  line-height: 1.45;
}

.lf-arrival-rain,
.lf-arrival-parcel,
.lf-boundary-card,
.lf-puddle-mark { display: none; }

.lf-arrival-rain {
  position: absolute;
  z-index: 4;
  right: 21%;
  bottom: 85px;
  width: 118px;
  height: 215px;
  pointer-events: none;
}

.lf-arrival-rain i {
  position: absolute;
  width: 5px;
  height: 15px;
  border-radius: 90% 30% 70% 50%;
  background: #4d86a4;
  transform: rotate(12deg);
  animation: lf-drop 1.15s linear infinite;
}

.lf-arrival-rain i:nth-child(1) { top: 42px; left: 9px; }
.lf-arrival-rain i:nth-child(2) { top: 71px; right: 21px; animation-delay: -420ms; }
.lf-arrival-rain i:nth-child(3) { top: 18px; left: 55px; animation-delay: -730ms; }

.lf-arrival-rain span {
  position: absolute;
  right: 1px;
  bottom: 0;
  width: 104px;
  height: 26px;
  border: 3px solid var(--lf-ink);
  border-radius: 51% 46% 58% 42%;
  background: #83b4cb;
  opacity: 0.82;
}

.lf-arrival-parcel {
  position: absolute;
  z-index: 5;
  right: 20%;
  bottom: 100px;
  width: 126px;
  height: 104px;
  border: 3px solid var(--lf-ink);
  background:
    linear-gradient(90deg, transparent 43%, #e9d79d 43% 57%, transparent 57%),
    #c59b61;
  box-shadow: 5px 5px 0 var(--lf-ink);
  transform: rotate(2deg);
  animation: lf-parcel-arrive 520ms cubic-bezier(.2,.8,.25,1) both;
}

.lf-arrival-parcel::before {
  position: absolute;
  top: 16px;
  right: -16px;
  width: 34px;
  height: 15px;
  border: 3px solid var(--lf-ink);
  border-left: 0;
  border-radius: 0 99px 99px 0;
  content: "";
}

.lf-arrival-parcel span,
.lf-arrival-parcel small {
  position: absolute;
  left: 50%;
  padding: 4px 6px;
  font-family: ui-monospace, monospace;
  font-weight: 950;
  transform: translateX(-50%) rotate(-3deg);
}

.lf-arrival-parcel span {
  top: 35px;
  border: 2px solid #8d2029;
  color: #8d2029;
  background: #fff5df;
  font-size: 0.58rem;
}

.lf-arrival-parcel small { bottom: 7px; width: 100%; font-size: 0.43rem; text-align: center; }

.lf-boundary-card {
  position: absolute;
  z-index: 14;
  right: 31%;
  bottom: 174px;
  width: 138px;
  padding: 11px 9px;
  border: 3px solid var(--lf-ink);
  border-top: 9px solid var(--lf-state-color);
  background: #fffdf7;
  box-shadow: 5px 5px 0 var(--lf-ink);
  text-align: center;
  transform: rotate(-5deg);
  animation: lf-boundary-file 420ms cubic-bezier(.2,.8,.25,1) both;
}

.lf-boundary-card strong,
.lf-boundary-card span {
  display: block;
  font-family: ui-monospace, monospace;
  line-height: 1.2;
}

.lf-boundary-card strong { font-size: 0.74rem; }
.lf-boundary-card span { margin-top: 5px; color: #665f55; font-size: 0.45rem; font-weight: 850; }

.lf-puddle-mark {
  position: absolute;
  z-index: 7;
  right: 26%;
  bottom: 100px;
  width: 205px;
  min-height: 104px;
  padding: 29px 18px 18px;
  place-items: center;
  border: 5px double var(--lf-state-color);
  border-radius: 48% 57% 44% 52% / 61% 44% 58% 42%;
  color: var(--lf-state-color);
  background: rgb(255 253 247 / 90%);
  font-family: ui-monospace, monospace;
  font-size: 0.7rem;
  font-weight: 950;
  line-height: 1.2;
  text-align: center;
  transform: rotate(-6deg);
  animation: lf-shift-stamp 520ms ease both;
}

.lost-found-view[data-state="shift"],
.lost-found-view[data-state="shift-complete"] { --lf-state-color: var(--lf-green); }

.lost-found-view[data-state="shift"][data-outcome="escort"],
.lost-found-view[data-state="shift-complete"][data-outcome="escort"] { --lf-state-color: var(--lf-blue); }

.lost-found-view[data-state="shift"][data-outcome="evidence"],
.lost-found-view[data-state="shift-complete"][data-outcome="evidence"] { --lf-state-color: var(--lf-red-dark); }

.lost-found-view[data-state="shift"] .lf-case-stamp,
.lost-found-view[data-state="shift-complete"] .lf-case-stamp {
  display: block;
  border-color: var(--lf-state-color);
  color: var(--lf-state-color);
  opacity: 0.82;
  transform: rotate(-13deg) scale(0.9);
}

.lost-found-view[data-state="shift"] .lf-umbrella,
.lost-found-view[data-state="shift-complete"] .lf-umbrella,
.lost-found-view[data-state="shift"] .lf-plant,
.lost-found-view[data-state="shift-complete"] .lf-plant,
.lost-found-view[data-state="shift"] .lf-wall-clock,
.lost-found-view[data-state="shift-complete"] .lf-wall-clock,
.lost-found-view[data-state="shift"] .lf-door,
.lost-found-view[data-state="shift-complete"] .lf-door {
  animation: none;
}

.lf-evidence-counter[data-shift="active"][data-arrival="plant"] .lf-arrival-rain { display: block; }

.lf-evidence-counter[data-shift="active"][data-arrival="clock"] .lf-wall-clock {
  top: 330px;
  left: 15%;
  transform: rotate(-8deg);
}

.lf-evidence-counter[data-shift="active"][data-arrival="parcel"] .lf-arrival-parcel { display: block; }

.lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="pending"] .lf-umbrella {
  top: 238px;
  left: 43%;
  transform: rotate(2deg) scale(0.82);
}

.lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="help"][data-arrival="plant"] .lf-umbrella {
  top: 150px;
  left: 56%;
  transform: rotate(-14deg) scale(1.03);
}

.lf-evidence-counter[data-resolution="help"][data-arrival="plant"] .lf-arrival-rain i { display: none; }
.lf-evidence-counter[data-resolution="help"][data-arrival="plant"] .lf-arrival-rain span { transform: scale(0.7); opacity: 0.46; }
.lf-evidence-counter[data-resolution="help"][data-arrival="plant"] .lf-plant { transform: rotate(3deg); }

.lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="help"][data-arrival="clock"] .lf-umbrella {
  top: 250px;
  left: 66%;
  transform: rotate(8deg) scale(0.8);
}

.lf-evidence-counter[data-resolution="help"][data-arrival="clock"] .lf-wall-clock {
  top: 385px;
  left: 75%;
  transform: rotate(342deg) scale(0.74);
}

.lf-evidence-counter[data-resolution="help"][data-arrival="clock"] .lf-door {
  transform: perspective(300px) rotateY(-52deg);
  transform-origin: 100% 50%;
}

.lf-evidence-counter[data-resolution="refuse"] .lf-boundary-card { display: block; }

.lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="refuse"][data-job="shade"] .lf-umbrella {
  top: 150px;
  left: 56%;
  transform: rotate(-14deg) scale(1.03);
}

.lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="refuse"][data-job="escort"] .lf-umbrella {
  top: 236px;
  left: 43%;
  transform: rotate(4deg) scale(0.82);
}

.lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="refuse"][data-job="evidence"] .lf-umbrella {
  top: 240px;
  left: 42%;
  transform: rotate(0) scale(0.78);
}

.lost-found-view[data-state="shift"][data-outcome="evidence"] .lf-evidence-tape {
  top: 294px;
  left: 23%;
  width: 55%;
  gap: 76px;
}

.lost-found-view[data-state="shift-complete"] .lf-umbrella {
  top: 193px;
  left: 42%;
  transform: rotate(-3deg) scale(0.88);
}

.lost-found-view[data-state="shift-complete"] .lf-puddle-mark { display: grid; }

@keyframes lf-shift-result-in {
  from { opacity: 0; transform: translateY(9px) rotate(0.5deg); }
  to { opacity: 1; transform: translateY(0) rotate(0); }
}

@keyframes lf-drop {
  from { opacity: 0; transform: translateY(-12px) rotate(12deg); }
  25% { opacity: 1; }
  to { opacity: 0; transform: translateY(48px) rotate(12deg); }
}

@keyframes lf-parcel-arrive {
  from { opacity: 0; transform: translateX(90px) rotate(8deg); }
  to { opacity: 1; transform: translateX(0) rotate(2deg); }
}

@keyframes lf-boundary-file {
  from { opacity: 0; transform: translateY(-40px) rotate(8deg) scale(1.4); }
  to { opacity: 1; transform: translateY(0) rotate(-5deg) scale(1); }
}

@keyframes lf-shift-stamp {
  from { opacity: 0; transform: rotate(-14deg) scale(1.7); }
  to { opacity: 1; transform: rotate(-6deg) scale(1); }
}

@media (max-width: 960px) {
  .lf-shift-callup { grid-template-columns: minmax(0, 1fr); }
  .lf-shift-callup button { width: 100%; justify-content: space-between; }
  .lf-shift-job-proof { grid-template-columns: minmax(0, 1fr); }
  .lf-shift-job-proof strong { text-align: left; }
}

@media (max-width: 760px) {
  .lf-shift-callup { margin-top: 26px; }
  .lf-shift-result { padding: 17px; }
  .lf-evidence-counter[data-shift="active"][data-arrival="clock"] .lf-wall-clock { top: 276px; }
  .lf-puddle-mark { right: 24%; bottom: 88px; }
}

@media (max-width: 480px) {
  .lf-shift-header { align-items: stretch; flex-direction: column; }
  .lf-shift-header > strong { max-width: none; text-align: left; }
  .lf-shift-progress { gap: 4px; margin: 20px 0 26px; }
  .lf-shift-progress li { grid-template-columns: 1fr; gap: 3px; justify-items: center; padding: 7px 3px; }
  .lf-shift-progress li small { width: 100%; text-align: center; }
  .lf-shift-log li { grid-template-columns: 27px minmax(0, 1fr); }
  .lf-shift-log li small { grid-column: 2; }
  .lf-arrival-rain { right: 16%; bottom: 73px; transform: scale(0.82); transform-origin: 50% 100%; }
  .lf-arrival-parcel { right: 13%; bottom: 86px; transform: scale(0.82) rotate(2deg); transform-origin: 50% 100%; }
  .lf-arrival-parcel { animation: none; }
  .lf-boundary-card { right: 25%; bottom: 145px; width: 121px; }
  .lf-puddle-mark { right: 18%; bottom: 84px; width: 177px; min-height: 90px; padding-top: 24px; font-size: 0.62rem; }
  .lf-evidence-counter[data-shift="active"][data-arrival="clock"] .lf-wall-clock { top: 260px; left: 10%; }
  .lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="pending"] .lf-umbrella,
  .lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="refuse"][data-job="escort"] .lf-umbrella,
  .lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="refuse"][data-job="evidence"] .lf-umbrella {
    top: 175px;
    left: 31%;
    transform: rotate(2deg) scale(0.68);
  }
  .lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="help"][data-arrival="plant"] .lf-umbrella,
  .lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="refuse"][data-job="shade"] .lf-umbrella {
    top: 109px;
    left: 42%;
    transform: rotate(-14deg) scale(0.82);
  }
  .lost-found-view[data-state="shift"] .lf-evidence-counter[data-resolution="help"][data-arrival="clock"] .lf-umbrella {
    top: 180px;
    left: 58%;
    transform: rotate(8deg) scale(0.66);
  }
  .lf-evidence-counter[data-resolution="help"][data-arrival="clock"] .lf-wall-clock { top: 315px; left: 73%; }
  .lost-found-view[data-state="shift-complete"] .lf-umbrella {
    top: 132px;
    left: 31%;
    transform: rotate(-3deg) scale(0.72);
  }
  .lost-found-view[data-state="shift"][data-outcome="evidence"] .lf-evidence-tape {
    top: 221px;
    left: 15%;
    width: 68%;
    gap: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lf-shift-result,
  .lf-arrival-rain i,
  .lf-arrival-parcel,
  .lf-boundary-card,
  .lf-puddle-mark {
    animation: none !important;
    transition: none !important;
  }
}
