:root {
  color-scheme: light;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
  --bg: #f2f2f2;
  --app-background-fallback: #0d0f12;
  --surface: #ffffff;
  --text: #111111;
  --muted: #8b8b8b;
  --line: #ececec;
  --accent: #f07a00;
  --accent-strong: #ff6b00;
  --accent-soft: #fff2e8;
  --green: #22c55e;
  --green-soft: #eefaf2;
  --green-completed: #ddf4e5;
  --blue: #3b82f6;
  --red: #ff3b30;
  --yellow: #ffb020;
  --shadow: 0 14px 34px rgb(17 17 17 / 8%);
  --radius-card: 16px;
  --radius-control: 12px;
  --radius-large: 24px;
  --control-height: clamp(52px, 13vw, 56px);
  --tap-size: 44px;
  --page-padding: clamp(16px, 5vw, 22px);
  --section-gap: clamp(12px, 3.6vw, 18px);
  --card-padding: clamp(14px, 4.5vw, 20px);
  --content-max-width: 480px;
  --bottom-nav-height: 94px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--app-background-fallback);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: clip;
  background: var(--app-background-fallback);
  color: var(--text);
}

body.is-modal-open {
  overflow: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  max-width: 100%;
  font-size: 16px;
}

button {
  border: 0;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

button:active {
  filter: brightness(0.96);
}

.appShell {
  isolation: isolate;
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  overflow-x: clip;
  background: transparent;
}

.appShell::before {
  content: '';
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-color: var(--app-background-fallback);
  background-image:
    linear-gradient(rgb(12 13 16 / 10%), rgb(12 13 16 / 10%)),
    url('/assets/app-background.webp?v=fon2');
  background-image:
    linear-gradient(rgb(12 13 16 / 10%), rgb(12 13 16 / 10%)),
    image-set(
      url('/assets/app-background.avif?v=fon2') type('image/avif') 1x,
      url('/assets/app-background.webp?v=fon2') type('image/webp') 1x
    );
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

.screen {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
  padding: calc(var(--page-padding) + var(--safe-top)) calc(var(--page-padding) + var(--safe-right))
    calc(var(--bottom-nav-height) + var(--safe-bottom) + var(--section-gap))
    calc(var(--page-padding) + var(--safe-left));
}

.screen[hidden],
.view,
.modalCard {
  display: none;
}

.view.is-active,
.modalCard.is-active {
  display: block;
}

.loginCard {
  min-height: 100vh;
}

.loginHero {
  position: relative;
  min-height: 572px;
  margin: -18px -22px 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgb(255 255 255 / 0%) 61%, var(--surface) 100%), #f8f8f8;
}

.buildingSketch {
  position: absolute;
  inset: 44px 0 0;
  background:
    linear-gradient(180deg, rgb(255 255 255 / 0%) 70%, var(--surface) 100%),
    url('/assets/login-facade.jpg') center top / cover no-repeat;
}

.loginHero i {
  position: absolute;
  left: 0;
  bottom: 150px;
  width: 62px;
  height: 150px;
  background: linear-gradient(180deg, var(--accent), rgb(240 122 0 / 0%));
  clip-path: polygon(0 28%, 100% 0, 100% 100%, 0 100%);
}

.loginPanel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
  margin-top: -116px;
  padding: 28px 24px 22px;
  border-radius: 22px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow);
}

.loginPanel h1,
.loginPanel p,
.loginPanel small,
.workerTop strong,
.workerTop small,
h1,
h2,
h3,
p {
  margin: 0;
}

.loginPanel h1 {
  text-align: center;
  font-size: 28px;
  line-height: 1.1;
}

.loginPanel p {
  text-align: center;
  color: var(--muted);
}

.loginPanel label {
  display: grid;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.inputWrap {
  display: grid;
  grid-template-columns: 24px 1fr 24px;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.inputWrap:focus-within {
  border-color: var(--accent);
}

.inputWrap input {
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.inputWrap b,
.inputWrap em {
  color: var(--text);
  font-style: normal;
  font-weight: 700;
}

.loginOptions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
}

.loginOptions mark {
  border-radius: 4px;
  background: var(--accent);
  color: #ffffff;
}

.loginOptions a,
.linkButton,
.textButton {
  color: var(--accent);
  background: transparent;
  text-decoration: none;
}

.loginPanel small {
  text-align: center;
  color: var(--muted);
}

.primaryButton,
.secondaryButton {
  width: 100%;
  min-height: var(--control-height);
  border-radius: var(--radius-control);
  font-weight: 800;
}

.primaryButton {
  background: linear-gradient(180deg, #ff850b, var(--accent-strong));
  color: #fff;
  box-shadow: 0 12px 20px rgb(240 122 0 / 24%);
}

.secondaryButton {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
}

.primaryButton:disabled,
.secondaryButton:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.appScreen {
  padding: 18px 22px 90px;
}

.workerTop {
  display: grid;
  gap: 20px;
  margin-bottom: 28px;
  padding: 30px 24px 24px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: 0 18px 46px rgb(17 17 17 / 7%);
}

.appScreen.is-task-flow .workerTop {
  display: none;
}

.workerPerson {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

.workerTopMain {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.workerPerson strong {
  display: block;
  margin-top: 4px;
  color: #070707;
  font-size: 25px;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.coinBox strong {
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: #050505;
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}

.workerPerson small,
.coinBox small,
.taskCard p,
.taskCard small,
.taskHero p,
.whiteCard p,
.eventList time,
.modalCard p,
.miniTaskList span {
  color: var(--muted);
}

.workerPerson small {
  display: block;
  font-size: 13px;
  line-height: 1.12;
  white-space: nowrap;
}

.coinBox {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 108px;
  min-height: 54px;
  padding: 13px 11px;
  border: 1px solid #ededed;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 22px rgb(17 17 17 / 4%);
}

.coinIcon {
  display: inline-block;
  width: 22px;
  height: 22px;
  margin-left: 7px;
  vertical-align: -6px;
  border: 3px solid #ffd36a;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, #fff4bf 0 24%, transparent 25%), #ffb020;
  box-shadow: inset 0 -2px 0 rgb(167 99 0 / 22%);
}

.workerDivider {
  height: 1px;
  background: #eeeeee;
}

.workerStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
}

.workerStats small {
  display: block;
  margin-bottom: 10px;
  color: #7f7f8b;
  font-size: clamp(10px, 3vw, 13px);
  line-height: 1.1;
}

.workerStats strong {
  color: #080808;
  font-size: clamp(14px, 4vw, 18px);
  line-height: 1.1;
  font-weight: 700;
}

.workerStats strong.is-live {
  color: var(--green);
}

.startWorkButton {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 64px;
  border-radius: 16px;
  background: #009b4d;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgb(0 155 77 / 18%);
}

.startWorkButton.is-working {
  background: #7d7f8d;
  box-shadow: 0 10px 22px rgb(125 127 141 / 18%);
}

.shiftCard,
.taskCard,
.recommendedCard,
.whiteCard,
.miniTaskList article {
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.shiftCard {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 17px;
  background: var(--surface);
}

.roundIcon,
.taskIcon {
  position: relative;
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
}

.roundIcon.green {
  background: var(--green);
}

.roundIcon.sleep {
  background: #e3e4e7;
}

.roundIcon::before,
.taskIcon::before {
  width: 20px;
  height: 16px;
  content: '';
  border: 2px solid #fff;
  border-radius: 4px;
}

.roundIcon::after,
.taskIcon::after {
  position: absolute;
  top: 13px;
  width: 10px;
  height: 5px;
  content: '';
  border: 2px solid #fff;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.roundIcon.sleep::before {
  position: absolute;
  top: 13px;
  left: 13px;
  width: 20px;
  height: 20px;
  content: '';
  border: 0;
  background: #5f636b;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2v2'/%3E%3Cpath d='M14 2v2'/%3E%3Cpath d='M16 8a1 1 0 0 1 1 1v8a4 4 0 0 1-4 4H7a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1h14a4 4 0 0 1 0 8h-1'/%3E%3Cpath d='M6 2v2'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.roundIcon.sleep::after {
  content: '';
  display: none;
}

.roundIcon.sleep i {
  position: absolute;
}

.shiftCard h2 {
  font-size: 20px;
  line-height: 1.2;
}

.shiftCard p {
  margin-top: 4px;
  color: #5b665f;
}

.shiftMetrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.shiftMetrics small {
  display: block;
  margin-bottom: 8px;
  color: #777;
}

.shiftMetrics strong {
  font-size: 26px;
}

.shiftCard .shiftMetrics strong {
  font-size: 17px;
  font-weight: 500;
}

.success {
  color: var(--green);
}

.sectionTitle,
.pageHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sectionTitle {
  margin-bottom: 14px;
}

.sectionTitle h1,
.pageHead h1,
.objectBlock > h2 {
  color: #fff;
  text-shadow: 0 1px 5px rgb(0 0 0 / 55%);
}

.sectionTitle h1,
.pageHead h1 {
  font-size: 26px;
  line-height: 1.1;
}

.linkButton {
  min-height: 32px;
  padding: 0;
  font-weight: 700;
}

.taskList,
.miniTaskList,
.stepList,
.eventList {
  display: grid;
  gap: 12px;
}

.objectBlock {
  margin-top: 24px;
}

.objectBlock h2 {
  margin-bottom: 12px;
  font-size: 24px;
}

.emptyObject {
  display: grid;
  min-height: 100px;
  place-items: center;
  border-radius: var(--radius-card);
  background: #f0f0f0;
  color: #777;
  padding: 17px;
  text-align: center;
  box-shadow: var(--shadow);
}

.emptyObject p {
  margin-top: 6px;
}

.emptyBriefcase {
  position: relative;
  display: block;
  width: 28px;
  height: 22px;
  border: 2px solid #999;
  border-radius: 5px;
}

.emptyBriefcase::before {
  position: absolute;
  top: -8px;
  left: 7px;
  width: 10px;
  height: 7px;
  content: '';
  border: 2px solid #999;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}

.taskCard {
  --task-card-status-color: #7d7f8d;
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100px;
  overflow: hidden;
  padding: 13px 15px;
}

.taskCard::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  content: '';
  background: var(--task-card-status-color);
  pointer-events: none;
}

.taskCard h3,
.taskHero h2 {
  font-size: 15px;
  line-height: 1.25;
}

.taskCard h3 {
  margin: 0;
}

.taskCardTitleRow {
  display: block;
}

.taskCardProgressRow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 2px;
}

.homeTaskStatus {
  --status-icon-color: #7d7f8d;
  display: inline-grid;
  grid-template-columns: 7px auto 18px;
  align-items: center;
  gap: 4px;
  min-height: 20px;
  color: var(--status-icon-color);
  white-space: nowrap;
  transform: translateY(-3px);
  transition: opacity 180ms ease;
}

.homeTaskStatus.is-updating {
  animation: statusFade 220ms ease both;
}

.homeTaskStatus b {
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.homeTaskStatus span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-icon-color);
}

.homeTaskStatus i {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: var(--status-icon-color);
  color: #fff;
  font-style: normal;
  font-size: 12px;
  line-height: 1;
}

.taskCard p,
.taskCard small {
  display: block;
  margin-bottom: 0;
  margin-top: 4px;
}

.taskCard p {
  margin-top: 8px;
  font-size: 12px;
  white-space: nowrap;
}

.taskSide {
  display: grid;
  align-content: space-between;
  justify-items: end;
  min-width: 72px;
}

.status {
  display: inline-flex;
  justify-content: center;
  min-height: 30px;
  min-width: 104px;
  align-items: center;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.status.orange {
  background: var(--accent-soft);
  color: var(--accent);
}

.status.blue {
  background: #eef5ff;
  color: var(--blue);
}

.status.yellow {
  background: #fff7dc;
  color: #d38a00;
}

.taskStatusHead {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.taskStatusControl {
  --status-icon-color: #4caf50;
  display: grid;
  grid-template-columns: 1fr 38px;
  align-items: center;
  min-height: 62px;
  border-radius: 999px;
  padding: 7px 7px 7px 24px;
  color: #fff;
  text-align: left;
  box-shadow: inset 0 -2px 0 rgb(17 17 17 / 10%);
}

.taskStatusControl span {
  display: grid;
  width: min(100%, 250px);
  gap: 2px;
  margin-left: 16px;
}

.taskStatusControl b {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.12;
}

.taskStatusControl small {
  max-width: 260px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.15;
  opacity: 0.86;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskStatusControl i {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: var(--status-icon-color);
  font-style: normal;
  font-size: 20px;
  line-height: 1;
}

.taskStatusControl.is-ready,
.taskCard.is-ready,
.homeTaskStatus.is-ready {
  --status-icon-color: #7d7f8d;
  --task-card-status-color: #7d7f8d;
  background: #7d7f8d;
}

.taskStatusControl.is-accepted,
.taskCard.is-accepted,
.homeTaskStatus.is-accepted {
  --status-icon-color: #4caf50;
  --task-card-status-color: #4caf50;
  background: #4caf50;
}

.taskStatusControl.is-working {
  --status-icon-color: var(--green);
  --task-card-status-color: var(--green);
  background: var(--green);
}

.taskCard.is-working,
.homeTaskStatus.is-working {
  --status-icon-color: #4caf50;
  --task-card-status-color: #4caf50;
  background: #4caf50;
}

.taskStatusControl.is-paused {
  --status-icon-color: var(--accent);
  --task-card-status-color: var(--accent);
  background: var(--accent);
}

.taskCard.is-paused,
.homeTaskStatus.is-paused {
  --status-icon-color: var(--accent-strong);
  --task-card-status-color: var(--accent-strong);
  background: var(--accent-strong);
}

.taskStatusControl.is-review,
.taskCard.is-review,
.homeTaskStatus.is-review {
  --status-icon-color: #111;
  --task-card-status-color: #ffc247;
  background: #ffc247;
  color: #111;
}

.taskCard.is-ready,
.taskCard.is-accepted,
.taskCard.is-working,
.taskCard.is-paused,
.taskCard.is-review {
  background: var(--surface);
}

.taskCard.is-completed {
  --task-card-status-color: transparent;
  background: var(--green-completed);
  color: var(--text);
}

.taskCard.is-completed::before {
  background: transparent;
}

.taskStatusControl.is-completed {
  --status-icon-color: var(--green);
  background: var(--green);
}

.taskCard.is-completed .photoLockOverlay {
  display: inline-flex;
  width: auto;
  min-width: 168px;
  height: auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 17px 30px;
  border: 1.5px solid rgb(255 255 255 / 58%);
  border-radius: 18px;
  background: rgb(255 255 255 / 18%);
  box-shadow: 0 8px 24px rgb(0 0 0 / 16%);
  color: #fff;
  font-family: inherit;
  font-size: 21px;
  font-weight: 600;
  line-height: 1;
  opacity: 0.92;
  white-space: nowrap;
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
}

.taskCard.is-completed .photoLockOverlay svg {
  display: none;
}

.taskCard.is-completed .photoLockOverlay::before,
.taskCard.is-completed .photoLockOverlay::after {
  box-sizing: border-box;
}

.taskCard.is-completed .photoLockOverlay::before {
  content: '✓';
  font-size: 23px;
}

.taskCard.is-completed .photoLockOverlay::after {
  content: 'Готово';
}

.homeTaskStatus.is-ready,
.homeTaskStatus.is-accepted,
.homeTaskStatus.is-working,
.homeTaskStatus.is-paused,
.homeTaskStatus.is-review {
  background: transparent;
}

.homeTaskStatus.is-review {
  --status-icon-color: #ffc247;
  color: #ffc247;
}

.homeTaskStatus.is-review i {
  color: #111;
}

@keyframes statusFade {
  from {
    opacity: 0.55;
  }

  to {
    opacity: 1;
  }
}

.progress {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ededed;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.greenLine i {
  background: var(--green);
}

.pageHead {
  margin-bottom: 26px;
}

.iconOnly {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 10px 24px rgb(17 17 17 / 5%);
}

.recommendedCard {
  display: grid;
  gap: 12px;
  margin-bottom: 22px;
  padding: 20px;
  border-left: 4px solid var(--accent);
  background: linear-gradient(135deg, #fff3e8, #fff);
}

.recommendedCard span:first-child {
  width: fit-content;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.taskFacts {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #666;
}

.dangerDot::before,
.orangeDot,
.greenDot,
.blueDot,
.purpleDot {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--red);
}

.subhead {
  margin-bottom: 12px;
  font-size: 18px;
  color: #555;
}

.miniTaskList article {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
}

.orangeDot {
  background: var(--accent);
}

.greenDot {
  background: var(--green);
}

.blueDot {
  background: var(--blue);
}

.purpleDot {
  background: #a855f7;
}

.taskHero {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: start;
  gap: 14px;
  margin-bottom: 22px;
}

.taskTitleBlock {
  display: block;
  margin-bottom: 20px;
  padding: 12px 12px 11px;
  border-radius: 8px;
  background: var(--surface);
}

.taskTitleBlock h2 {
  display: -webkit-box;
  max-height: 42px;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font-size: 18px;
  line-height: 1.32;
}

.taskTitleBlock p {
  margin-top: 14px;
  color: #111;
  font-size: 12px;
  line-height: 1.25;
}

.compactHero {
  margin-bottom: 26px;
}

.taskProgress {
  display: grid;
  grid-template-columns: 96px 1fr 46px;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.taskProgress span {
  white-space: nowrap;
}

.taskProgress strong {
  color: var(--accent);
}

.whiteCard {
  margin-bottom: 18px;
  padding: 18px;
  border-radius: var(--radius-card);
}

.whiteCard h3,
.photoSection h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.whiteCard p {
  line-height: 1.48;
}

.stepList article {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
}

.stepList span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #cfcfcf;
  color: #fff;
  font-weight: 900;
}

.stepList .stepDone {
  background: var(--green);
}

.stepList .stepCurrent {
  background: var(--accent);
}

.stepList em {
  border-radius: 8px;
  min-width: 92px;
  padding: 5px 8px;
  background: #f6f6f6;
  color: #777;
  font-style: normal;
  font-size: 12px;
}

.stepList .stepDone + b + em {
  background: #eaf8ef;
  color: var(--green);
}

.stepList .stepCurrent + b + em {
  background: var(--accent-soft);
  color: var(--accent);
}

.stepList article.is-complete span {
  background: var(--green);
}

.stepList article.is-complete span::before {
  content: '✓';
}

.stepList article.is-complete span {
  color: transparent;
}

.stepList article.is-complete span::before {
  color: #fff;
}

.stepList article.is-complete em {
  background: #eaf8ef;
  color: var(--green);
}

.stepList article.is-current span {
  background: var(--accent);
  color: #fff;
}

.stepList article.is-current em {
  background: var(--accent-soft);
  color: var(--accent);
}

.stepTimelineCard {
  overflow: hidden;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stepTimeline {
  --step-axis: 25px;
  --step-rail: 50px;
  --stage-green: #08af45;
  --stage-dot: #d4d4d4;
  --stage-panel: #effaf3;
}

.stepTimeline article {
  position: relative;
  display: grid;
  grid-template-columns: var(--step-rail) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.stepTimelineCurrent {
  padding-bottom: 14px;
}

.stepTimelineCurrent::before {
  position: absolute;
  top: 50px;
  bottom: 0;
  left: var(--step-axis);
  width: 3px;
  content: '';
  border-radius: 999px;
  background: var(--stage-green);
  transform: translateX(-50%);
}

.stepNumber {
  position: relative;
  z-index: 2;
  display: grid;
  width: 42px;
  height: 42px;
  margin-top: 24px;
  justify-self: center;
  place-items: center;
  border-radius: 50%;
  background: var(--stage-green);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.currentStepBubble {
  position: relative;
  z-index: 1;
  width: 100%;
  border-radius: 12px;
  padding: 22px 20px 24px;
  background: var(--stage-panel);
  box-shadow:
    0 12px 24px rgb(8 175 69 / 8%),
    0 1px 5px rgb(17 17 17 / 3%);
}

.currentStepBubble::before {
  position: absolute;
  top: 29px;
  left: -7px;
  width: 15px;
  height: 15px;
  content: '';
  border-radius: 4px 0 0 0;
  background: var(--stage-panel);
  box-shadow: -4px 4px 10px rgb(17 17 17 / 2%);
  transform: rotate(-45deg);
}

.currentStepBubble h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.32;
}

.currentStepBubble p {
  margin: 0;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.currentStepBubble button {
  width: 100%;
  min-height: 56px;
  margin-top: 22px;
  border-radius: 10px;
  background: var(--stage-green);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgb(8 175 69 / 18%);
}

.stepTimeline article.stepTimelineFuture {
  grid-template-columns: var(--step-rail) minmax(0, 1fr) auto 18px;
  column-gap: 8px;
  align-items: center;
  min-height: 70px;
  padding: 10px 0;
}

.stepTimelineFuture::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--step-axis);
  z-index: 0;
  width: 4px;
  content: '';
  background-image: radial-gradient(circle, var(--stage-dot) 2.1px, transparent 2.4px);
  background-position: center top;
  background-size: 4px 13px;
  background-repeat: repeat-y;
  transform: translateX(-50%);
}

.stepTimelineFuture:not(:last-child)::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 58px;
  height: 1px;
  content: '';
  background: #d8d8d8;
}

.stageLock {
  position: relative;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  justify-self: center;
  place-items: center;
  border-radius: 9px;
  background: #f5f5f5;
  box-shadow:
    0 1px 0 rgb(255 255 255 / 85%) inset,
    0 6px 14px rgb(17 17 17 / 3%);
}

.stageLock::before {
  width: 18px;
  height: 18px;
  content: '';
  background: #4b5563;
  mask: url('/assets/stage-lock.png') center / contain no-repeat;
}

.stageLock::after {
  content: none;
}

.stepTimelineFuture h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.2;
}

.stepTimelineFuture div {
  min-width: 0;
}

.stepTimelineFuture em {
  justify-self: end;
  border-radius: 8px;
  min-width: 84px;
  padding: 6px 13px;
  background: #e9e9e9;
  color: #333;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
}

.stepTimelineFuture i {
  color: #3b3b44;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  text-align: right;
}

.stepScaleCard {
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.stepScaleCard h2 {
  margin-bottom: 18px;
  font-size: 18px;
}

.stepScaleCard p {
  margin-top: 16px;
  font-weight: 700;
}

.stepScale {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  gap: 0;
  margin: 0 2px;
  --done-width: 25%;
  --current-start: 25%;
  --current-end: 32%;
  --progress-color: var(--accent);
}

.stepScale::before {
  position: absolute;
  right: 14px;
  left: 14px;
  height: 4px;
  content: '';
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--progress-color) 0 var(--done-width),
    var(--progress-color) var(--done-width) var(--current-end),
    #dadada var(--current-end)
  );
}

.stepScale span {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #d2d2d2;
}

.stepScale .done {
  background: var(--progress-color);
}

.stepScale .current {
  width: 24px;
  height: 24px;
  border: 5px solid var(--progress-color);
  background: #fff;
}

.scaleLegend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
  color: #666;
  font-size: 13px;
}

.scaleLegend span {
  display: inline-flex;
  align-items: center;
}

.scaleLegend i:not(.greenDot, .orangeDot) {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 50%;
  background: #d2d2d2;
}

.currentStage > span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.currentStage h2 {
  font-size: 26px;
}

.currentStage em {
  align-self: center;
  border-radius: 999px;
  padding: 7px 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-style: normal;
  font-weight: 800;
}

.notice.warning {
  margin-top: 18px;
  margin-bottom: 0;
}

.stepActionStack {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.photoSection {
  margin-bottom: 20px;
}

.photoCarousel {
  --photo-slide-height: clamp(190px, 52vw, 240px);
  --photo-lock-size: calc(var(--photo-slide-height) / 3);
  display: flex;
  gap: 12px;
  width: calc(100% + 22px);
  margin-right: -22px;
  padding: 2px 22px 12px 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-padding-right: 22px;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y pinch-zoom;
  scroll-behavior: smooth;
}

.photoCarousel::-webkit-scrollbar {
  display: none;
}

.photoSlide {
  position: relative;
  flex: 0 0 auto;
  width: 88%;
  height: var(--photo-slide-height);
  min-width: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: var(--bg);
  scroll-snap-align: start;
  cursor: zoom-in;
}

.photoSlide img {
  position: relative;
  z-index: 1;
  opacity: 0;
  transition:
    opacity 140ms ease,
    filter 210ms ease;
}

.photoSlide.is-photo-loaded img {
  opacity: 1;
}

.photoLoadingPlaceholder {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  padding: 28px;
  border-radius: inherit;
  background: var(--bg);
  color: var(--text);
  opacity: 1;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.photoSlide.is-photo-loaded .photoLoadingPlaceholder {
  opacity: 0;
}

.photoSlide.is-broken .photoLoadingPlaceholder {
  display: none;
}

.photoLoadingBrand {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  opacity: 0.75;
}

.photoLoadingLabel {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  opacity: 0.6;
}

.photoLoadingBlocks {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

.photoLoadingBlocks i {
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--text);
  opacity: 0.28;
  animation: photo-loading-block 540ms steps(1, end) infinite;
  animation-delay: 150ms;
}

.photoLoadingBlocks i:nth-child(2) {
  animation-delay: 330ms;
}

.photoLoadingBlocks i:nth-child(3) {
  animation-delay: 510ms;
}

@keyframes photo-loading-block {
  0%,
  32% {
    background: var(--accent);
    opacity: 1;
  }

  33%,
  100% {
    background: var(--text);
    opacity: 0.28;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photoLoadingBlocks i {
    animation: none;
  }

  .photoLoadingBlocks i:nth-child(2) {
    background: var(--accent);
    opacity: 1;
  }
}

[data-photo-locked='true'] .photoSlide img {
  filter: grayscale(100%);
}

.photoLockOverlay {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--photo-lock-size);
  height: var(--photo-lock-size);
  color: #fff;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 210ms ease;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.18));
}

.photoLockOverlay svg {
  display: block;
  width: 100%;
  height: 100%;
  color: #fff;
  fill: none;
  stroke: #fff;
}

[data-photo-locked='true'] .photoLockOverlay {
  opacity: 0.85;
}

.photoSlide .mockPhoto,
.photoSlide img,
.photoSlide .photoPlaceholder,
.photoSlide .cameraPreview {
  width: auto;
  height: 100%;
  min-height: 0;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.photoSlide img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.photoSlider.is-single .photoCarousel {
  gap: 0;
  width: 100%;
  margin-right: 0;
  padding-right: 0;
  overflow-x: hidden;
  scroll-padding-right: 0;
  scroll-snap-type: none;
  touch-action: pan-y pinch-zoom;
}

.photoSlider.is-single .photoSlide {
  flex-basis: 100%;
  width: 100%;
}

.photoSlider.is-single .photoSlide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.photoOpenButton {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: transparent;
}

.photoDots {
  display: flex;
  min-height: 10px;
  justify-content: center;
  gap: 6px;
  margin-top: 7px;
  margin-bottom: 1px;
}

.photoDots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c9c9c9;
  transition:
    background-color 160ms ease,
    transform 160ms ease;
}

.photoDots i.is-active {
  background: var(--accent);
  transform: scale(1.3);
}

.photoEmptyState {
  padding: 16px;
  border-radius: 12px;
  background: #f5f5f5;
  color: #606060;
  text-align: center;
}

.photoSlide.is-broken::after {
  display: grid;
  min-height: 180px;
  place-items: center;
  content: 'Не удалось загрузить фото';
  border-radius: var(--radius-card);
  background: #f5f5f5;
  color: #606060;
}

.photoSlide.is-broken .photoOpenButton {
  display: none;
}

.photoSlide.is-broken img {
  display: none;
}

.taskInformationCard .taskSummary,
.historyEventCard .taskSummary {
  margin-bottom: 10px;
  overflow: visible;
  color: #555;
  line-height: 1.4;
  text-overflow: initial;
  white-space: normal;
}

#workerObjectsList {
  display: grid;
  gap: 16px;
}

.taskFeedCard {
  display: block;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.taskFeedCardHeader {
  display: flex;
  min-height: clamp(52px, 14vw, 58px);
  align-items: center;
  padding-block: 5px;
  margin-bottom: 10px;
}

.taskFeedCard h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: clamp(19px, calc(4.6vw + 2px), 20px);
  font-weight: 700;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.taskFeedCard .photoSlider {
  margin: 0 0 12px;
}

.taskFeedCard.has-task-assignee .taskFeedCardHeader {
  min-height: 0;
  align-items: flex-start;
  padding: 5px 0 0;
  margin-bottom: 0;
}

.taskFeedCard.has-task-assignee h3 {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
  -webkit-box-orient: initial;
  -webkit-line-clamp: unset;
}

.taskFeedCard .taskAssigneeSlot {
  display: flex;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  align-items: center;
  padding-block: 12.5px;
}

.taskFeedCard .taskAssignee {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.3;
}

.taskFeedCard .taskAssignee.is-unassigned {
  color: var(--accent);
  font-weight: 600;
}

.taskFeedCard.is-task-locked {
  cursor: not-allowed;
}

.taskFeedCard.is-task-locked:hover {
  transform: none;
}

.taskFeedCard.is-task-locked .photoCarousel {
  cursor: grab;
}

.taskFeedCard.is-task-locked .photoCarousel:active {
  cursor: grabbing;
}

.taskFeedCard .taskLocation {
  margin: 0 0 12px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.taskProgressBlock {
  display: grid;
  gap: 6px;
}

.taskProgressLine {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.taskProgressLine > span {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e5e5;
}

.taskProgressLine i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}

.taskProgressLine b {
  min-width: 38px;
  color: #555;
  font-size: 12px;
  text-align: right;
}

.taskProgressBlock small {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.taskResumeButton {
  width: 100%;
  margin-top: 14px;
}

.taskInformationCard .photoSlider,
.historyEventCard .photoSlider {
  margin-top: 10px;
}

.taskInformationCard .taskObjectName {
  margin-top: 0;
  color: var(--accent-strong);
  font-weight: 800;
}

.historyEventCard time {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

#workspaceScreen.analyst-mode .workerTop {
  display: none;
}

.analystTop {
  display: none;
}

#workspaceScreen.analyst-mode .analystTop {
  display: grid;
  gap: clamp(14px, 4.5vw, 20px);
  margin-bottom: clamp(20px, 6vw, 28px);
  padding: clamp(20px, 6vw, 30px) var(--card-padding) clamp(18px, 5vw, 24px);
  border-radius: clamp(22px, 7vw, 28px);
  background: var(--surface);
  box-shadow: 0 18px 46px rgb(17 17 17 / 7%);
}

.analystTopMain {
  min-width: 0;
}

.analystTop .workerPerson strong {
  display: block;
  margin-top: 4px;
  color: #070707;
  font-size: clamp(20px, 6.3vw, 25px);
  line-height: 1;
}

.analystTop .workerPerson small {
  color: var(--muted);
}

.analystSummaryGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(8px, 3vw, 18px);
  min-width: 0;
}

.analystSummaryGrid > div {
  min-width: 0;
}

.analystSummaryGrid small {
  display: block;
  margin-bottom: 8px;
  color: #7f7f8b;
  font-size: clamp(9px, 2.9vw, 13px);
  line-height: 1.15;
}

.analystSummaryGrid strong {
  display: flex;
  min-width: 0;
  align-items: center;
  color: #080808;
  font-size: clamp(14px, 4.5vw, 22px);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.analystSummaryGrid span.is-live {
  color: var(--green);
}

.analystSummaryGrid .coinIcon {
  width: clamp(15px, 4.8vw, 20px);
  height: clamp(15px, 4.8vw, 20px);
  flex: 0 0 auto;
  margin-left: clamp(3px, 1.4vw, 6px);
  border-width: 2px;
  vertical-align: 0;
}

.analystLiveView,
.analystWorkersList {
  width: 100%;
}

.analystWorkersList {
  display: grid;
  gap: 18px;
}

.analystWorkerCard,
.analystErrorCard {
  min-width: 0;
  padding: clamp(16px, 4.5vw, 20px);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.analystWorkerHeader {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.analystAvatar {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 20px;
  font-weight: 800;
}

img.analystAvatar {
  object-fit: cover;
  object-position: center;
}

.analystWorkerHeader h2,
.analystWorkerHeader p {
  margin: 0;
  overflow-wrap: anywhere;
}

.analystWorkerHeader h2 {
  font-size: 18px;
  line-height: 1.2;
}

.analystStatus {
  display: inline-block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.analystWorkerCard.is-working .analystStatus,
.analystWorkerCard.is-on-shift .analystStatus {
  color: var(--green);
}

.analystWorkerCard.is-paused .analystStatus,
.analystWorkerCard.is-waiting-for-response .analystStatus {
  color: var(--accent);
}

.analystWorkerCard.is-shift-completed {
  background: var(--green-completed);
}

.analystShiftTime,
.analystCurrentTask {
  margin-top: 4px !important;
  color: var(--muted);
  font-size: 12px;
}

.analystCurrentTask {
  color: var(--text);
  font-weight: 600;
}

.analystTimeline .photoCarousel {
  --photo-slide-height: clamp(210px, 56vw, 250px);
}

.analystTimeline .photoSlider.is-single .photoCarousel {
  min-height: 0;
}

.analystTimeline .photoSlide {
  cursor: default;
}

.analystFrameOverlay {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  min-height: 42%;
  max-height: 78%;
  flex-direction: column;
  justify-content: flex-end;
  padding: 52px 16px 15px;
  overflow: hidden;
  background: linear-gradient(
    180deg,
    rgb(8 12 16 / 0%) 0%,
    rgb(8 12 16 / 18%) 28%,
    rgb(8 12 16 / 72%) 68%,
    rgb(8 12 16 / 88%) 100%
  );
  color: #fff;
  pointer-events: none;
}

.analystFrameOverlay strong,
.analystFrameOverlay p,
.analystFrameOverlay time {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 8px rgb(0 0 0 / 38%);
}

.analystFrameOverlay.is-work-photo {
  min-height: 34%;
  padding-top: 40px;
}

.analystFrameOverlay.is-work-photo strong {
  font-weight: 600;
  -webkit-line-clamp: 3;
}

.analystFrameOverlay.is-work-photo time:first-child {
  margin-top: 0;
}

.analystTimeline .photoSlide.is-analyst-task-section {
  width: clamp(232px, 72%, 320px);
  cursor: default;
  background: #202328;
}

.analystTaskSectionCard {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: clamp(20px, 7vw, 28px);
  overflow: hidden;
  color: #fff;
  pointer-events: none;
  isolation: isolate;
}

.analystTaskSectionCard::before,
.analystTaskSectionCard::after {
  position: absolute;
  z-index: -1;
  content: '';
  pointer-events: none;
}

.analystTaskSectionStart {
  background:
    radial-gradient(circle at 82% 18%, rgb(207 111 45 / 42%), transparent 34%),
    linear-gradient(142deg, #181b20 0%, #282126 58%, #6b3522 135%);
}

.analystTaskSectionStart::before,
.analystTaskSectionReturn::before {
  inset: -30% -15%;
  opacity: 0.34;
  background-image:
    linear-gradient(rgb(255 255 255 / 12%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 12%) 1px, transparent 1px);
  background-size: 34px 34px;
  transform: perspective(180px) rotateX(56deg) rotateZ(-9deg);
  transform-origin: center;
}

.analystTaskSectionStart::after,
.analystTaskSectionReturn::after {
  width: 140px;
  height: 140px;
  right: -62px;
  bottom: -76px;
  border: 1px solid rgb(255 255 255 / 22%);
  border-radius: 38% 62% 52% 48%;
  box-shadow: 0 0 0 24px rgb(198 93 36 / 9%);
}

.analystTaskSectionReturn {
  background:
    radial-gradient(circle at 18% 82%, rgb(193 98 42 / 36%), transparent 40%),
    linear-gradient(145deg, #202329, #3a2927 72%, #754126 130%);
}

.analystShiftSectionSummary {
  align-items: flex-start;
  background:
    radial-gradient(circle at 86% 16%, rgb(190 92 39 / 34%), transparent 34%),
    linear-gradient(148deg, #15181d 0%, #24242a 62%, #513025 125%);
}

.analystShiftSectionSummary::before {
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgb(255 255 255 / 10%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 10%) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: linear-gradient(135deg, transparent 12%, #000 84%);
}

.analystShiftSectionSummary::after {
  width: 170px;
  height: 170px;
  right: -90px;
  bottom: -92px;
  border: 1px solid rgb(218 119 57 / 42%);
  border-radius: 50%;
  box-shadow:
    0 0 0 28px rgb(180 82 34 / 8%),
    0 0 0 58px rgb(180 82 34 / 5%);
}

.analystShiftSectionDate {
  margin: 7px 0 0;
  color: rgb(255 255 255 / 72%);
  font-size: 11px;
  line-height: 1.2;
}

.analystTaskSectionSummary {
  align-items: flex-start;
  background:
    radial-gradient(circle at 88% 14%, rgb(255 255 255 / 22%), transparent 28%),
    linear-gradient(145deg, #d9eddf 0%, #a8d0b4 58%, #6fa582 120%);
  color: #173426;
}

.analystTaskSectionSummary::before {
  width: 210px;
  height: 210px;
  top: -110px;
  right: -80px;
  border: 1px solid rgb(255 255 255 / 44%);
  border-radius: 50%;
  box-shadow:
    0 0 0 30px rgb(255 255 255 / 10%),
    0 0 0 64px rgb(255 255 255 / 7%);
}

.analystSectionEyebrow {
  margin-bottom: 8px;
  color: rgb(255 255 255 / 72%);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.analystTaskSectionSummary .analystSectionEyebrow {
  color: rgb(23 52 38 / 66%);
}

.analystTaskSectionCard > strong {
  display: -webkit-box;
  max-width: 94%;
  overflow: hidden;
  font-size: clamp(17px, 5.4vw, 22px);
  line-height: 1.08;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.analystSectionPlace,
.analystSectionFacts p {
  margin: 0;
  overflow-wrap: anywhere;
}

.analystSectionPlace {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: rgb(255 255 255 / 76%);
  font-size: 11px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.analystTaskSectionSummary .analystSectionPlace {
  color: rgb(23 52 38 / 72%);
}

.analystSectionFacts {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 12px;
  font-size: 10.5px;
  line-height: 1.2;
}

.analystSectionSummaryFacts {
  width: 100%;
}

.analystSectionBadge {
  align-self: flex-start;
  margin-bottom: 7px;
  padding: 5px 9px;
  border: 1px solid rgb(255 255 255 / 56%);
  border-radius: 999px;
  background: rgb(255 255 255 / 28%);
  box-shadow: 0 5px 16px rgb(31 83 51 / 12%);
  color: #173426;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 350px) {
  .analystTaskSectionCard {
    padding: 17px;
  }

  .analystTaskSectionCard > strong {
    font-size: 17px;
  }

  .analystSectionFacts {
    gap: 3px 8px;
    font-size: 10px;
  }
}

.analystFrameOverlay strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.analystFrameOverlay p {
  margin-top: 4px;
  color: rgb(255 255 255 / 88%);
  font-size: 12px;
  line-height: 1.28;
}

.analystFrameOverlay .analystFrameTask,
.analystFrameOverlay .analystFrameReason {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.analystFrameOverlay time {
  margin-top: 6px;
  color: rgb(255 255 255 / 82%);
  font-size: 12px;
  font-weight: 600;
}

.analystPhotoPlaceholder,
.analystNoShift {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  width: 100%;
  height: 100%;
  min-height: 160px;
  border-radius: var(--radius-card);
  background: var(--bg);
  color: var(--muted);
}

.analystPhotoPlaceholder span {
  color: var(--text);
  font-weight: 700;
  opacity: 0.72;
}

.analystPhotoPlaceholder small {
  font-size: 12px;
}

.analystNoShift {
  min-height: 116px;
  padding: 20px;
}

.analystHistoryGroup {
  margin-bottom: 22px;
}

.analystHistoryGroup h2 {
  margin: 0 0 10px;
  font-size: 16px;
}

.analystHistoryShift {
  display: grid;
  width: 100%;
  gap: 4px;
  margin-bottom: 10px;
  padding: 15px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--text);
  text-align: left;
}

.analystHistoryShift span,
.analystHistoryShift small {
  color: var(--muted);
}

.analystHistoryBack {
  margin-bottom: 14px;
  padding: 8px 0;
}

.analystErrorCard {
  display: grid;
  gap: 12px;
}

.analystSkeleton {
  min-height: 300px;
  overflow: hidden;
}

.analystSkeleton span,
.analystSkeleton i,
.analystSkeleton b {
  display: block;
  border-radius: 12px;
  background: var(--bg);
}

.analystSkeleton span {
  width: 52px;
  height: 52px;
}

.analystSkeleton i {
  width: 58%;
  height: 18px;
  margin: -36px 0 32px 66px;
}

.analystSkeleton b {
  height: 190px;
}

@media (min-width: 760px) {
  .analystWorkersList {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.stepCompleteMark {
  position: relative;
  z-index: 2;
  display: grid;
  width: 34px;
  height: 34px;
  justify-self: center;
  place-items: center;
  border-radius: 50%;
  background: var(--stage-green);
  color: #fff;
  font-weight: 800;
}

.photoViewer[hidden] {
  display: none;
}

.photoViewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  padding: calc(18px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
  place-items: center;
  background: rgb(0 0 0 / 94%);
}

.photoViewer img {
  max-width: 100%;
  max-height: calc(100dvh - 120px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  object-fit: contain;
  touch-action: none;
  transition: transform 180ms ease;
  will-change: transform;
}

.photoViewerStatus {
  position: absolute;
  z-index: 3;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  left: 20px;
  width: fit-content;
  max-width: min(520px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgb(17 17 17 / 72%);
  color: #fff;
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}

.photoViewerClose,
.photoViewerArrow {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
  color: #fff;
  font-size: 32px;
}

.photoViewerClose {
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
}

.photoViewerArrow {
  top: 50%;
  transform: translateY(-50%);
}

.photoViewerArrow.previous {
  left: 8px;
}

.photoViewerArrow.next {
  right: 8px;
}

body.is-photo-viewer-open {
  overflow: hidden;
}

.photoSlide > span {
  display: block;
  margin-top: 9px;
  color: #606060;
  font-size: 13px;
  font-weight: 800;
}

.resultCarousel .photoSlide {
  flex-basis: 88%;
}

.resultCarousel .mockPhoto,
.resultCarousel .photoPlaceholder,
.resultCarousel .cameraPreview {
  min-height: 320px;
}

.decisionBlock {
  margin: 0 0 18px;
}

.resultIntro h2 {
  margin-bottom: 10px;
  font-size: 25px;
}

#stagePhotoView {
  min-height: calc(100vh - 126px);
  padding-bottom: 166px;
}

.stagePhotoHead {
  margin-bottom: 0;
}

.stagePhotoBody {
  display: grid;
  min-height: calc(100vh - 300px);
  align-content: center;
  gap: 18px;
}

.stagePhotoIntro {
  margin-bottom: 0;
  text-align: center;
}

.stagePhotoAction {
  position: fixed;
  right: 50%;
  bottom: 94px;
  z-index: 6;
  width: min(calc(100% - 44px), 396px);
  transform: translateX(50%);
}

.photoCompareCard {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: var(--radius-card);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.photoCompareCard > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.photoPlaceholder,
.cameraPreview {
  width: 100%;
  min-height: 172px;
  border-radius: var(--radius-control);
}

.photoPlaceholder,
.cameraPreview {
  display: grid;
  place-items: center;
  border: 1px dashed #d0d0d0;
  background: #fbfbfb;
  color: var(--accent);
  text-align: center;
}

.photoPlaceholder b {
  display: block;
  margin-bottom: 8px;
  font-size: 26px;
}

.cameraPreview {
  background:
    radial-gradient(circle at 50% 45%, rgb(240 122 0 / 12%) 0 74px, transparent 75px), #fbfbfb;
}

.cameraPreview b {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 34px;
}

.fileCard {
  margin-bottom: 18px;
}

.helpButton {
  width: 100%;
  min-height: var(--control-height);
  margin-bottom: 18px;
  border-radius: var(--radius-control);
  background: #7d7f8d;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 20px rgb(125 127 141 / 22%);
}

.taskWorkspaceCard,
.taskDescriptionCard,
.stepTimelineCard,
.fileCard,
.taskHelpIsland {
  margin-bottom: 18px;
}

.taskWorkspaceCard {
  padding: 16px;
}

.taskDescriptionCard {
  padding: 16px;
}

.taskDescriptionCard h3,
.taskDescriptionCard p {
  margin: 0;
}

.taskDescriptionCard p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.simpleTaskActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.simpleTaskActions[hidden] {
  display: none;
}

.simpleTaskActions .stepStateMessage {
  grid-column: 1 / -1;
}

.simpleTaskPhotoButton,
.simpleTaskCompleteButton {
  min-height: 56px;
  border-radius: var(--radius-control);
  color: #fff;
  font-weight: 800;
}

.simpleTaskPhotoButton {
  background: var(--accent);
}

.simpleTaskPhotoButton:only-child {
  grid-column: 1 / -1;
}

.simpleTaskCompleteButton {
  background: var(--green);
}

.taskWorkspaceCard h2 {
  font-size: clamp(19px, calc(4.6vw + 2px), 20px);
  line-height: 1.3;
}

.stepWorkActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.stepWorkActions button {
  min-height: 52px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.stepWorkActions button:last-child {
  background: var(--green);
}

.taskPauseInfo {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-control);
  background: var(--accent-soft);
}

.taskPauseInfo p,
.taskPauseInfo small,
.taskPauseInfo time,
.taskHelpIsland p {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.taskHelpIsland {
  padding: 0;
  overflow: hidden;
}

.taskHelpIsland .helpButton {
  min-height: 64px;
  margin: 0;
  border-radius: inherit;
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
  font-size: 16px;
  text-align: center;
}

.messageFeed {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.messageCard {
  padding: 16px;
}

.messageCard p,
.messageCard small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.fileItem {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 64px;
}

.fileItem + .fileItem {
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.pdfIcon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 10px;
  background: #fff1f1;
  color: #e33b3b;
  font-size: 12px;
  font-weight: 900;
}

.centerResult {
  display: grid;
  min-height: calc(100vh - 160px);
  align-content: center;
  justify-items: center;
  gap: 18px;
  text-align: center;
}

.centerResult h1 {
  font-size: 30px;
}

.centerResult p {
  max-width: 310px;
  color: var(--muted);
  line-height: 1.45;
}

.centerResult .primaryButton {
  margin-top: 10px;
}

.photoAdd,
.mockPhoto {
  min-height: 76px;
  border-radius: var(--radius-control);
}

.photoAdd {
  display: grid;
  place-items: center;
  border: 1px dashed #d2d2d2;
  background: var(--surface);
  color: #777;
  text-align: center;
  font-size: 12px;
}

.photoAdd input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.photoAdd b {
  display: block;
  font-size: 22px;
}

.mockPhoto {
  background:
    linear-gradient(
      135deg,
      rgb(255 120 0 / 60%) 0 12%,
      transparent 13% 21%,
      rgb(255 120 0 / 55%) 22% 28%,
      transparent 29%
    ),
    linear-gradient(45deg, #30241d, #b98359);
}

.mockPhoto.tray {
  background: repeating-linear-gradient(90deg, #d87320 0 6px, #2f2f2f 7px 12px), #6b6b6b;
}

.mockPhoto.box {
  background:
    linear-gradient(90deg, transparent 44%, #5a5a5a 45% 55%, transparent 56%),
    linear-gradient(160deg, #d8d8d8, #8f8f8f);
}

.eventList article {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 10px;
  align-items: center;
}

.eventList span {
  font-weight: 700;
}

.stickyActions {
  position: sticky;
  bottom: 82px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding-top: 10px;
  background: linear-gradient(180deg, transparent, var(--bg) 22%);
}

.bottomNav {
  position: fixed;
  right: 50%;
  bottom: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 440px);
  min-height: 104px;
  padding: 30px 12px calc(10px + env(safe-area-inset-bottom));
  transform: translateX(50%);
  background: transparent;
}

.bottomNav::before {
  position: absolute;
  inset: 22px 0 0;
  content: '';
  border-radius: 24px 24px 0 0;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 -14px 38px rgb(17 17 17 / 10%);
  backdrop-filter: blur(14px);
}

.bottomNav button {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 28px 16px;
  align-content: center;
  place-items: center;
  gap: 8px;
  min-height: 62px;
  padding: 0;
  background: transparent;
  color: #74747f;
}

.bottomNav span {
  font-size: 12px;
  line-height: 1;
  font-weight: 650;
}

.managerTaskModal {
  width: min(100%, 520px);
  max-height: calc(100dvh - 40px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  text-align: left;
}

.managerTaskModal form,
.managerTaskModal label,
.managerFormSection,
.managerStepFields {
  display: grid;
  gap: 8px;
}

.managerTaskModal form {
  gap: 16px;
}
.managerTaskModal input,
.managerTaskModal select,
.managerTaskModal textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font: inherit;
}
.managerTaskModal textarea {
  min-height: 84px;
  resize: vertical;
}
.managerFormHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.managerStepFields {
  margin-bottom: 12px;
  padding: 14px;
  border-radius: 16px;
  background: var(--page-bg, #f4f2ef);
}
.managerPhotoPreview {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}
.managerPhotoPreview img {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
}
.managerControls {
  display: grid;
  gap: 12px;
}
.managerControls label {
  display: grid;
  gap: 6px;
}
.dangerButton {
  width: 100%;
  color: #b42318;
  border: 1px solid #f0b4ad;
  background: #fff5f3;
}
.manager-mode .workerDivider,
.manager-mode .workerStats,
.manager-mode .startWorkButton {
  display: none;
}

/* Worker task workflow: one vertical, backend-driven path. */
.stepWorkflowTitle {
  margin: 0 0 22px;
  color: var(--text);
  font-size: clamp(20px, 6vw, 24px);
  line-height: 1.2;
}

.stepTimeline {
  --workflow-orange: var(--accent);
  --workflow-green: #48a447;
  --workflow-line: #d7d9dc;
  display: grid;
  gap: 0;
}

.stepTimeline article,
.stepTimeline article.stepTimelineFuture {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 10px;
  min-height: 0;
  padding: 0 0 38px;
  text-align: center;
}

.stepTimeline article::before {
  content: none;
}
.stepTimeline article:not(:last-child)::after {
  position: absolute;
  top: calc(100% - 34px);
  bottom: 4px;
  left: 50%;
  width: 2px;
  height: auto;
  content: '';
  background: var(--workflow-line);
  transform: translateX(-50%);
}

.stepIndicator {
  position: relative;
  z-index: 2;
  display: grid;
  width: 32px;
  height: 32px;
  margin: 0;
  place-items: center;
  border-radius: 50%;
  background: #c9ccd0;
  color: #202124;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.stepIndicator.is-active {
  background: var(--workflow-orange);
  color: #fff;
}
.stepIndicator.is-complete {
  background: var(--workflow-green);
  color: #fff;
  font-size: 18px;
}

.stepTimelineFuture > div {
  width: min(100%, 360px);
  min-width: 0;
}
.stepTimelineFuture h3,
.currentStepBubble h3 {
  margin: 0 0 6px;
  overflow-wrap: anywhere;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.35;
}
.stepTimelineFuture p,
.currentStepBubble > p {
  margin: 0 auto;
  max-width: 34ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.stepTimelineFuture em {
  min-width: 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f0f1f2;
  color: #686b70;
  font-size: 11px;
  font-style: normal;
  font-weight: 650;
}
.stepTimelineFuture.is-complete em {
  background: #edf8ec;
  color: #358337;
}
.stepTimelineFuture .photoSlider {
  margin-top: 12px;
  text-align: left;
}

.stepTimelineCurrent {
  padding-bottom: 38px;
}
.currentStepBubble {
  width: min(100%, 420px);
  padding: 18px 14px 16px;
  border: 1px solid rgb(240 122 0 / 9%);
  border-radius: 18px;
  background: linear-gradient(180deg, #fff9f1, #fff6e9);
  box-shadow: 0 10px 28px rgb(98 64 24 / 7%);
}
.currentStepBubble::before {
  content: none;
}
.currentStepBubble .photoSlider {
  margin-top: 14px;
  text-align: left;
}
.stepPhotoManage {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.currentStepBubble .stepPhotoManage button {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 6px 10px;
  border: 1px solid #e0e1e2;
  border-radius: 9px;
  background: #fff;
  color: #8b3430;
  font-size: 11px;
  font-weight: 650;
  box-shadow: none;
}

.stepWorkActions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.currentStepBubble .stepWorkActions button {
  min-height: 48px;
  margin: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
  box-shadow: none;
}
.currentStepBubble .stepPhotoButton {
  border: 1.5px solid var(--workflow-orange);
  background: #fff;
  color: var(--text);
}
.currentStepBubble .stepCompleteButton {
  border: 0;
  background: linear-gradient(180deg, #ff9b16, #f27b00);
  color: #fff;
  box-shadow: 0 8px 18px rgb(240 122 0 / 18%);
}
.currentStepBubble .stepCompleteButton:disabled {
  background: #e2e4e6;
  color: #96999d;
  box-shadow: none;
}

.stepPhotoWarning,
.stepStateMessage,
.stepFooterNotice,
.stepBlockedState,
.stepFinalState {
  border-radius: 14px;
  text-align: left;
}
.stepPhotoWarning {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 14px;
  padding: 12px;
  background: #fff0ef;
  color: #d13d39;
}
.stepPhotoWarning span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: #ef7773;
  color: #fff;
  font-weight: 800;
}
.stepPhotoWarning p {
  margin: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.stepStateMessage {
  margin: 14px 0 0;
  padding: 13px;
  background: #fff0ef;
}
.stepStateMessage.is-success {
  background: #eaf7e9;
  color: #2f7532;
}
.stepStateMessage.is-blocked {
  background: #ffefed;
  color: #a62c28;
}
.stepStateMessage strong,
.stepStateMessage p,
.stepStateMessage small,
.stepStateMessage time {
  display: block;
  margin: 0 0 5px;
  text-align: left;
}
.stepStateMessage p {
  color: inherit;
  font-size: 13px;
}
.stepStateMessage time {
  margin: 8px 0 0;
  color: #74777c;
  font-size: 11px;
}

.stepStateBadge {
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  background: #ffe2df;
  color: #c93430;
  font-weight: 750;
}
.stepStateBadge.is-blocked {
  background: #ffdcd8;
}
.stepWorkflowFooter {
  margin-top: 2px;
}
.stepFooterNotice {
  padding: 13px;
  border: 1px solid #e6e7e8;
  background: #f7f7f6;
  color: #5f6267;
  font-size: 13px;
  line-height: 1.45;
}
.stepFooterNotice.is-paused {
  background: #fff0ef;
  color: #c43d38;
}
.stepFooterNotice.is-success {
  background: #edf8ec;
  color: #37813a;
}

.stepBlockedState,
.stepFinalState {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 22px 16px;
  text-align: center;
}
.stepBlockedState {
  background: #f2f2f1;
}
.stepFinalState {
  background: linear-gradient(180deg, #eef9e9, #e4f4dc);
}
.stepBlockedState > span,
.stepFinalState > span {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  background: #d4d5d5;
  font-size: 22px;
}
.stepFinalState > span {
  background: #48a447;
}
.stepBlockedState h3,
.stepFinalState h3 {
  margin: 2px 0 0;
}
.stepBlockedState p,
.stepFinalState p,
.stepFinalState time {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.stepBlockedState button,
.stepFinalState button {
  width: 100%;
  min-height: 46px;
  margin-top: 8px;
  border: 1px solid #d5d7da;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .stepTimeline *,
  .stepWorkflowFooter * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

.bottomNav .is-active {
  color: var(--accent);
}

.bottomNav button.is-order-active .navOrder {
  outline: 3px solid rgb(240 122 0 / 24%);
  outline-offset: 3px;
  box-shadow: 0 12px 28px rgb(255 107 0 / 38%);
}

.maintenanceView {
  min-height: calc(100dvh - var(--bottom-nav-height) - 44px);
  align-content: center;
}

.maintenanceView.is-active {
  display: grid;
}

.maintenanceIsland {
  display: grid;
  justify-items: center;
  gap: 12px;
  width: 100%;
  padding: clamp(28px, 8vw, 42px) 22px 24px;
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: center;
}

.maintenanceIcon {
  position: relative;
  display: grid;
  width: 72px;
  height: 62px;
  place-items: end center;
  margin-bottom: 4px;
  border: 4px solid var(--accent);
  border-radius: 36px 36px 18px 18px;
  color: var(--accent);
}

.maintenanceIcon::before {
  position: absolute;
  top: -12px;
  width: 38px;
  height: 14px;
  content: '';
  border: 4px solid var(--accent);
  border-bottom: 0;
  border-radius: 20px 20px 0 0;
}

.maintenanceIcon span {
  margin-bottom: 8px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.maintenanceIsland h1 {
  font-size: 26px;
}

.maintenanceIsland p {
  font-size: 18px;
  font-weight: 700;
}

.maintenanceIsland small {
  color: var(--muted);
}

.maintenanceIsland .primaryButton {
  margin-top: 12px;
}

.bottomNav button:nth-child(3) {
  grid-template-rows: 56px;
  gap: 0;
  min-height: 56px;
  margin-top: -1px;
}

.navBriefcase,
.navChat,
.navOrder,
.navArchive,
.navUser {
  width: 28px;
  height: 28px;
  background: currentcolor;
}

.navBriefcase {
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%206h11'/%3E%3Cpath%20d='M9%2012h11'/%3E%3Cpath%20d='M9%2018h11'/%3E%3Cpath%20d='m4%206%201%201%202-2'/%3E%3Cpath%20d='m4%2012%201%201%202-2'/%3E%3Cpath%20d='m4%2018%201%201%202-2'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M9%206h11'/%3E%3Cpath%20d='M9%2012h11'/%3E%3Cpath%20d='M9%2018h11'/%3E%3Cpath%20d='m4%206%201%201%202-2'/%3E%3Cpath%20d='m4%2012%201%201%202-2'/%3E%3Cpath%20d='m4%2018%201%201%202-2'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
}

.navChat {
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2011.5a8.38%208.38%200%200%201-.9%203.8%208.5%208.5%200%200%201-7.6%204.7%208.38%208.38%200%200%201-3.8-.9L3%2021l1.9-5.7a8.38%208.38%200%200%201-.9-3.8%208.5%208.5%200%200%201%204.7-7.6%208.38%208.38%200%200%201%203.8-.9h.5a8.48%208.48%200%200%201%208%208v.5z'/%3E%3Cpath%20d='M8%2010h8'/%3E%3Cpath%20d='M8%2014h5'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M21%2011.5a8.38%208.38%200%200%201-.9%203.8%208.5%208.5%200%200%201-7.6%204.7%208.38%208.38%200%200%201-3.8-.9L3%2021l1.9-5.7a8.38%208.38%200%200%201-.9-3.8%208.5%208.5%200%200%201%204.7-7.6%208.38%208.38%200%200%201%203.8-.9h.5a8.48%208.48%200%200%201%208%208v.5z'/%3E%3Cpath%20d='M8%2010h8'/%3E%3Cpath%20d='M8%2014h5'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
}

.navOrder {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 10px 22px rgb(255 107 0 / 24%);
}

.navOrder::before,
.navOrder::after {
  position: absolute;
  top: 50%;
  left: 50%;
  content: '';
  border-radius: 999px;
  background: #fff;
  transform: translate(-50%, -50%);
}

.navOrder::before {
  width: 22px;
  height: 4px;
}

.navOrder::after {
  width: 4px;
  height: 22px;
}

.navArchive {
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%207h18'/%3E%3Cpath%20d='M5%207v12a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V7'/%3E%3Cpath%20d='M8%207V4a1%201%200%200%201%201-1h6a1%201%200%200%201%201%201v3'/%3E%3Cpath%20d='M10%2012h4'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M3%207h18'/%3E%3Cpath%20d='M5%207v12a2%202%200%200%200%202%202h10a2%202%200%200%200%202-2V7'/%3E%3Cpath%20d='M8%207V4a1%201%200%200%201%201-1h6a1%201%200%200%201%201%201v3'/%3E%3Cpath%20d='M10%2012h4'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
}

.navUser {
  mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20%2021a8%208%200%200%200-16%200'/%3E%3Ccircle%20cx='12'%20cy='7'%20r='4'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2024%2024'%20fill='none'%20stroke='black'%20stroke-width='1.9'%20stroke-linecap='round'%20stroke-linejoin='round'%3E%3Cpath%20d='M20%2021a8%208%200%200%200-16%200'/%3E%3Ccircle%20cx='12'%20cy='7'%20r='4'/%3E%3C/svg%3E")
    center / 28px 28px no-repeat;
}

.modalLayer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgb(17 17 17 / 68%);
}

.modalLayer.is-task-status-modal {
  animation: modalLayerIn 200ms ease-out both;
}

.modalLayer.is-task-status-modal.is-closing {
  animation: modalLayerOut 190ms ease-in both;
}

.modalLayer[hidden] {
  display: none;
}

.modalCard {
  width: min(100%, 374px);
  padding: 32px 24px 24px;
  border-radius: 24px;
  background: var(--surface);
  text-align: center;
  box-shadow: 0 22px 70px rgb(17 17 17 / 26%);
}

.taskStatusConfirmModal.is-active,
.helpRequestModal.is-active,
.shiftCameraModal.is-active {
  animation: modalCardIn 200ms ease-out both;
}

.taskStatusConfirmModal.is-closing,
.helpRequestModal.is-closing,
.shiftCameraModal.is-closing {
  animation: modalCardOut 190ms ease-in both;
}

.modalIcon {
  position: relative;
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 42px;
  font-weight: 900;
}

.modalIcon.briefcase::before {
  width: 40px;
  height: 31px;
  content: '';
  border: 3px solid currentcolor;
  border-radius: 8px;
}

.modalIcon.briefcase::after {
  position: absolute;
  top: 27px;
  width: 18px;
  height: 9px;
  content: '';
  border: 3px solid currentcolor;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
}

.modalIcon.check {
  font-size: 56px;
}

.modalIcon.success {
  background: #eaffef;
  color: var(--green);
}

.modalCard h2 {
  margin-bottom: 12px;
  font-size: 27px;
}

.modalCard p {
  margin-bottom: 20px;
  line-height: 1.55;
}

.notice,
.successNotice {
  margin-bottom: 18px;
  padding: 14px;
  border-radius: 12px;
  background: #fff4ed;
  color: #555;
  text-align: left;
}

.successNotice {
  background: #ecfaef;
}

.modalCard .primaryButton,
.modalCard .secondaryButton {
  margin-top: 10px;
}

.modalCard .shiftConfirmButton {
  background: #009b4d;
  color: #fff;
  box-shadow: 0 12px 20px rgb(0 155 77 / 18%);
}

.shiftCameraModal {
  padding: 28px 22px 22px;
}

.cameraCaptureBox {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  margin: 0 0 16px;
  overflow: hidden;
  border-radius: 20px;
  background: #101010;
}

.cameraCaptureBox video,
.cameraCaptureBox img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cameraCaptureBox video {
  z-index: 1;
}

.cameraCaptureBox #shiftCameraPreview {
  z-index: 2;
  display: block;
  visibility: visible;
  opacity: 1;
  object-fit: contain;
  background: #f5f5f3;
  filter: none;
}

.cameraCaptureBox video[hidden],
.cameraCaptureBox img[hidden],
.cameraCaptureBox .cameraState[hidden] {
  display: none !important;
}

.cameraCaptureBox video.is-front-camera {
  transform: scaleX(-1);
}

.cameraState {
  position: absolute;
  z-index: 3;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  background: rgb(17 17 17 / 72%);
}

.cameraState[hidden] {
  display: none;
}

.cameraError {
  display: block;
  margin: -2px 0 16px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
}

.cameraError[hidden] {
  display: none;
}

.cameraCommentField {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 7px 10px;
  margin: 14px 0 16px;
  text-align: left;
}

.cameraCommentField[hidden] {
  display: none;
}

.cameraCommentField > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.cameraCommentField > span small,
.cameraCommentCount {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}

.cameraCommentField textarea {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 78px;
  resize: vertical;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: none;
  background: var(--surface);
  color: var(--text);
  line-height: 1.35;
}

.cameraCommentField textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgb(240 122 0 / 12%);
}

.cameraCommentField textarea[aria-invalid='true'] {
  border-color: var(--red);
}

.cameraCommentCount {
  grid-column: 2;
  text-align: right;
}

.cameraCommentCount.is-invalid,
.cameraCommentError {
  color: var(--red);
}

.cameraCommentError {
  grid-column: 1 / -1;
  font-size: 12px;
  font-weight: 700;
}

.cameraCommentError[hidden] {
  display: none;
}

.cameraActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.cameraActions button[hidden] {
  display: none;
}

.cameraActions .primaryButton,
.cameraActions .secondaryButton {
  margin-top: 0;
}

.cameraConfirmButton:not([hidden]) {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 54px;
}

.cameraFlipButton {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 3;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 45%);
  border-radius: 50%;
  background: rgb(0 0 0 / 52%);
  color: #fff;
  font-size: 25px;
}

.cameraFlipButton[hidden] {
  display: none;
}

.taskStatusConfirmActions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pauseReasonField {
  display: grid;
  gap: 8px;
  margin: 0 0 26px;
  text-align: left;
}

.pauseReasonField[hidden] {
  display: none;
}

.pauseReasonField textarea {
  width: 100%;
  min-height: 112px;
  resize: none;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  background: #fff;
  color: var(--text);
  font: inherit;
  line-height: 1.35;
  outline: none;
}

.pauseReasonField textarea::placeholder {
  color: #8c8c8c;
}

.pauseReasonField textarea:focus {
  border-color: var(--confirm-color, var(--accent));
  box-shadow: 0 0 0 3px rgb(240 122 0 / 10%);
}

.pauseReasonField small {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.taskStatusConfirmActions .primaryButton,
.taskStatusConfirmActions .secondaryButton {
  margin-top: 0;
}

.taskStatusConfirmIcon {
  width: 78px;
  height: 78px;
  background: var(--confirm-soft, var(--accent-soft));
  color: var(--confirm-color, var(--accent));
  font-size: 34px;
}

.taskStatusConfirmModal .primaryButton {
  background: var(--confirm-color, var(--accent));
  color: var(--confirm-text, #fff);
}

.taskStatusConfirmModal.is-confirm-green {
  --confirm-color: #4caf50;
  --confirm-soft: #eaffef;
}

.taskStatusConfirmModal.is-confirm-gray {
  --confirm-color: #7d7f8d;
  --confirm-soft: #f0f1f3;
}

.taskStatusConfirmModal.is-confirm-orange {
  --confirm-color: var(--accent-strong);
  --confirm-soft: var(--accent-soft);
}

.taskStatusConfirmModal.is-confirm-yellow {
  --confirm-color: #ffc247;
  --confirm-soft: #fff7dc;
  --confirm-text: #111;
}

@keyframes modalLayerIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalLayerOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes modalCardIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalCardOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

.rewardRow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 18px 0;
}

.rewardRow strong {
  display: block;
  padding: 14px;
  border-radius: 12px;
  background: #fff9e8;
  font-size: 22px;
}

.rewardRow small {
  color: #777;
  font-size: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 94px;
  left: 18px;
  z-index: 30;
  max-width: 404px;
  margin: 0 auto;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--text);
  color: #fff;
  text-align: center;
}

/* Responsive application foundation */
img,
video,
canvas,
svg {
  max-width: 100%;
}

img,
video {
  height: auto;
}

h1,
h2,
h3,
p,
strong,
b,
small,
span {
  overflow-wrap: break-word;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid rgb(240 122 0 / 32%);
  outline-offset: 2px;
}

.screenLogin {
  padding-bottom: calc(var(--page-padding) + var(--safe-bottom));
}

.loginCard {
  min-height: 100vh;
  min-height: 100svh;
  min-height: 100dvh;
}

.loginHero {
  min-height: clamp(350px, 62dvh, 572px);
  margin: calc(0px - var(--page-padding) - var(--safe-top))
    calc(0px - var(--page-padding) - var(--safe-right)) 0
    calc(0px - var(--page-padding) - var(--safe-left));
}

.loginPanel {
  gap: clamp(11px, 3.2vw, 14px);
  margin-top: clamp(-116px, -14dvh, -72px);
  padding: clamp(20px, 6vw, 28px) var(--card-padding) clamp(18px, 5vw, 22px);
}

.loginPanel h1 {
  font-size: clamp(24px, 7vw, 28px);
}

.inputWrap input {
  width: 100%;
  font-size: 16px;
}

.inputWrap input:-webkit-autofill,
.inputWrap input:-webkit-autofill:hover,
.inputWrap input:-webkit-autofill:focus {
  box-shadow: 0 0 0 1000px var(--surface) inset;
  -webkit-text-fill-color: var(--text);
}

.loginOptions {
  flex-wrap: wrap;
}

.primaryButton,
.secondaryButton,
.helpButton,
.startWorkButton,
.currentStepBubble button {
  min-height: max(var(--tap-size), var(--control-height));
  padding-inline: 14px;
  line-height: 1.25;
}

.linkButton {
  min-height: var(--tap-size);
  padding-inline: 4px;
}

.appScreen {
  padding: calc(var(--page-padding) + var(--safe-top)) calc(var(--page-padding) + var(--safe-right))
    calc(var(--bottom-nav-height) + var(--safe-bottom) + var(--section-gap))
    calc(var(--page-padding) + var(--safe-left));
}

.workerTop {
  gap: clamp(14px, 4.5vw, 20px);
  margin-bottom: clamp(20px, 6vw, 28px);
  padding: clamp(20px, 6vw, 30px) var(--card-padding) clamp(18px, 5vw, 24px);
  border-radius: clamp(22px, 7vw, 28px);
}

.workerTopMain > *,
.workerPerson > *,
.sectionTitle > *,
.pageHead > *,
.taskCardProgressRow > *,
.miniTaskList article > *,
.taskHero > *,
.taskProgress > *,
.stepList article > *,
.fileItem > *,
.cameraActions > *,
.taskStatusConfirmActions > * {
  min-width: 0;
}

.workerPerson strong {
  font-size: clamp(20px, 6.3vw, 25px);
  white-space: normal;
}

.coinBox {
  min-width: clamp(88px, 27vw, 108px);
  min-height: 50px;
  padding: 11px 9px;
}

.coinBox strong {
  font-size: clamp(17px, 5vw, 20px);
}

.workerStats {
  gap: var(--section-gap);
  padding-inline: clamp(0px, 2vw, 8px);
}

.sectionTitle h1,
.pageHead h1,
.objectBlock h2,
.currentStage h2 {
  font-size: clamp(21px, 6.5vw, 26px);
}

.sectionTitle {
  flex-wrap: wrap;
}

.pageHead {
  gap: clamp(10px, 4vw, 16px);
  margin-bottom: clamp(18px, 6vw, 26px);
}

.pageHead h1 {
  flex: 1;
  text-align: center;
}

.iconOnly {
  width: clamp(44px, 13vw, 52px);
  height: clamp(44px, 13vw, 52px);
  flex: 0 0 auto;
}

.recommendedCard,
.whiteCard {
  padding: var(--card-padding);
}

.taskCard p {
  white-space: normal;
}

.miniTaskList article {
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 13px var(--card-padding);
}

.miniTaskList span {
  text-align: right;
}

.taskStatusHead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
}

.taskStatusControl {
  grid-template-columns: minmax(0, 1fr) 38px;
  min-width: 0;
  padding-left: clamp(12px, 5vw, 24px);
}

.taskStatusControl span {
  width: 100%;
  margin-left: clamp(4px, 3vw, 16px);
}

.taskTitleBlock h2 {
  max-height: none;
  -webkit-line-clamp: unset;
}

.taskProgress {
  grid-template-columns: auto minmax(70px, 1fr) auto;
  gap: clamp(8px, 3vw, 14px);
}

.stepList article {
  grid-template-columns: 28px minmax(0, 1fr) auto;
}

.stepTimelineCard {
  padding: clamp(10px, 4vw, 16px);
}

.currentStepBubble {
  padding: clamp(16px, 5vw, 22px) clamp(14px, 4.5vw, 20px) clamp(18px, 5vw, 24px);
}

.stepTimelineFuture em {
  min-width: 0;
  padding-inline: clamp(7px, 3vw, 13px);
}

.currentStage .sectionTitle {
  align-items: flex-start;
}

.photoCarousel {
  width: calc(100% + var(--page-padding) + var(--safe-right));
  margin-right: calc(0px - var(--page-padding) - var(--safe-right));
  padding-right: calc(var(--page-padding) + var(--safe-right));
  scroll-padding-right: calc(var(--page-padding) + var(--safe-right));
}

.photoSlide .mockPhoto,
.photoSlide img,
.photoSlide .photoPlaceholder,
.photoSlide .cameraPreview {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.photoSlide img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
}

.resultCarousel .mockPhoto,
.resultCarousel .photoPlaceholder,
.resultCarousel .cameraPreview {
  min-height: clamp(230px, 76vw, 320px);
}

#stagePhotoView {
  min-height: calc(100vh - var(--safe-top));
  min-height: calc(100svh - var(--safe-top));
  min-height: calc(100dvh - var(--safe-top));
  padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 88px);
}

.stagePhotoBody {
  min-height: calc(100vh - 300px);
  min-height: calc(100svh - 300px);
  min-height: calc(100dvh - 300px);
}

.stagePhotoAction {
  right: calc(var(--page-padding) + var(--safe-right));
  bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 8px);
  left: calc(var(--page-padding) + var(--safe-left));
  width: auto;
  max-width: calc(var(--content-max-width) - var(--page-padding) - var(--page-padding));
  margin-inline: auto;
  transform: none;
}

.centerResult {
  min-height: calc(100vh - var(--bottom-nav-height) - var(--safe-top) - var(--safe-bottom));
  min-height: calc(100svh - var(--bottom-nav-height) - var(--safe-top) - var(--safe-bottom));
  min-height: calc(100dvh - var(--bottom-nav-height) - var(--safe-top) - var(--safe-bottom));
}

.fileItem strong {
  overflow-wrap: anywhere;
}

.stickyActions {
  bottom: calc(var(--bottom-nav-height) + var(--safe-bottom));
}

.bottomNav {
  right: 0;
  left: 0;
  width: 100%;
  min-height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding: 24px calc(8px + var(--safe-right)) max(8px, var(--safe-bottom))
    calc(8px + var(--safe-left));
  transform: none;
}

.bottomNav::before {
  right: var(--safe-right);
  bottom: 0;
  left: var(--safe-left);
}

.bottomNav button {
  min-width: 0;
  min-height: var(--tap-size);
}

.bottomNav span {
  max-width: 100%;
  font-size: clamp(10px, 3vw, 12px);
}

.modalLayer {
  align-items: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(var(--page-padding) + var(--safe-top)) calc(var(--page-padding) + var(--safe-right))
    calc(var(--page-padding) + var(--safe-bottom)) calc(var(--page-padding) + var(--safe-left));
}

.modalCard {
  max-height: calc(
    100vh - var(--page-padding) - var(--page-padding) - var(--safe-top) - var(--safe-bottom)
  );
  max-height: calc(
    100svh - var(--page-padding) - var(--page-padding) - var(--safe-top) - var(--safe-bottom)
  );
  max-height: calc(
    100dvh - var(--page-padding) - var(--page-padding) - var(--safe-top) - var(--safe-bottom)
  );
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(22px, 7vw, 32px) var(--card-padding) clamp(18px, 6vw, 24px);
}

.modalCard h2 {
  font-size: clamp(22px, 7vw, 27px);
}

.modalIcon {
  width: clamp(72px, 23vw, 92px);
  height: clamp(72px, 23vw, 92px);
  margin-bottom: clamp(14px, 5vw, 20px);
}

.shiftCameraModal {
  padding: clamp(18px, 6vw, 28px) var(--card-padding) clamp(16px, 5vw, 22px);
}

.cameraCaptureBox {
  max-height: min(52dvh, 520px);
}

.pauseReasonField textarea {
  font-size: 16px;
}

.toast {
  right: calc(var(--page-padding) + var(--safe-right));
  bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 8px);
  left: calc(var(--page-padding) + var(--safe-left));
  width: auto;
  max-width: calc(var(--content-max-width) - var(--page-padding) - var(--page-padding));
}

@media (max-width: 359px) {
  :root {
    --page-padding: 14px;
    --card-padding: 14px;
    --bottom-nav-height: 88px;
  }

  .loginHero {
    min-height: 330px;
  }

  .workerTopMain {
    gap: 6px;
  }

  .avatar {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .workerPerson small {
    white-space: normal;
  }

  .coinBox {
    min-width: 82px;
    padding-inline: 7px;
  }

  .coinIcon {
    width: 18px;
    height: 18px;
    margin-left: 4px;
  }

  .miniTaskList article {
    grid-template-columns: 20px minmax(0, 1fr);
  }

  .miniTaskList article > span {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .stepTimeline {
    --step-axis: 20px;
    --step-rail: 40px;
  }

  .stepTimeline article.stepTimelineFuture {
    grid-template-columns: var(--step-rail) minmax(0, 1fr) auto 14px;
    column-gap: 5px;
  }

  .stepTimelineFuture:not(:last-child)::after {
    left: 46px;
  }

  .stepTimelineFuture em {
    font-size: 11px;
  }

  .cameraActions,
  .taskStatusConfirmActions {
    grid-template-columns: 1fr;
  }

  .rewardRow {
    grid-template-columns: 1fr;
  }

  .bottomNav {
    padding-inline: calc(4px + var(--safe-left)) calc(4px + var(--safe-right));
  }

  .bottomNav button {
    gap: 5px;
  }

  .navBriefcase,
  .navChat,
  .navArchive,
  .navUser {
    width: 25px;
    height: 25px;
  }

  .navOrder {
    width: 50px;
    height: 50px;
  }
}

@media (max-height: 700px) {
  .loginHero {
    min-height: clamp(300px, 54dvh, 380px);
  }

  .loginPanel {
    margin-top: -72px;
  }

  .modalLayer {
    align-items: start;
  }

  .modalIcon {
    width: 64px;
    height: 64px;
    font-size: 32px;
  }

  .cameraCaptureBox {
    max-height: 44dvh;
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  .screen {
    padding-top: calc(12px + var(--safe-top));
  }

  .loginHero {
    min-height: 220px;
  }

  .loginPanel {
    margin-top: -56px;
  }

  .stagePhotoBody,
  .centerResult {
    min-height: auto;
    align-content: start;
  }
}

@media (min-width: 768px) and (min-height: 600px) {
  body {
    padding: 0;
  }

  .appShell {
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .bottomNav {
    right: 50%;
    left: auto;
    width: var(--content-max-width);
    transform: translateX(50%);
  }
}

@media (max-width: 360px) {
  .stepTimeline article.stepTimelineFuture {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
  }

  .stepTimelineFuture:not(:last-child)::after {
    left: 50%;
  }
}

/* Manager task composer: one responsive, role-aware modal. */
.modalLayer.is-manager-task-modal {
  padding: max(12px, var(--safe-top)) max(12px, var(--safe-right)) max(12px, var(--safe-bottom))
    max(12px, var(--safe-left));
  overflow: hidden;
  background: rgb(27 24 22 / 54%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.modalCard.managerTaskModal {
  position: relative;
  width: min(calc(100vw - 28px - var(--safe-left) - var(--safe-right)), 680px);
  height: min(calc(100dvh - 28px - var(--safe-top) - var(--safe-bottom)), 920px);
  max-height: calc(100dvh - 28px - var(--safe-top) - var(--safe-bottom));
  padding: 0;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 72%);
  border-radius: 28px;
  background: #fff;
  text-align: left;
  box-shadow: 0 30px 90px rgb(17 17 17 / 28%);
}

.modalCard.managerTaskModal.is-active {
  display: flex;
  flex-direction: column;
  animation: modalCardIn 180ms ease-out both;
}

.managerTaskModal form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 0;
}

.managerDialogHeader {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 44px;
  gap: 14px;
  align-items: center;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #f0efed;
  background: rgb(255 255 255 / 96%);
}

.managerHeaderIcon {
  position: relative;
  display: block;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
}

.managerHeaderIcon::before {
  position: absolute;
  inset: 12px 13px 10px;
  content: '';
  border: 2px solid currentcolor;
  border-radius: 5px;
}

.managerHeaderIcon::after {
  position: absolute;
  top: 18px;
  left: 18px;
  width: 12px;
  height: 8px;
  content: '';
  border-top: 2px solid currentcolor;
  border-bottom: 2px solid currentcolor;
}

.managerDialogHeader h2,
.modalCard.managerTaskModal .managerDialogHeader h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(24px, 5vw, 31px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}

.managerDialogHeader p,
.modalCard.managerTaskModal .managerDialogHeader p {
  margin: 5px 0 0;
  color: #7e7b78;
  font-size: 14px;
  line-height: 1.35;
}

.managerCloseButton {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border-radius: 14px;
  background: #f4f3f2;
  color: #55514e;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
}

.managerCloseButton:hover {
  background: #ebe9e7;
}

.managerFormBody {
  min-height: 0;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  scroll-padding: 24px 0 120px;
  -webkit-overflow-scrolling: touch;
}

.managerFormGroup {
  display: grid;
  gap: 18px;
}

.managerFormGroup + .managerFormGroup {
  margin-top: 30px;
  padding-top: 26px;
  border-top: 1px solid #f0efed;
}

.managerGroupTitle {
  margin: 0;
  color: #77736f;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.managerTaskModal .managerField {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.managerFieldLabel,
.managerChoiceGroup legend {
  padding: 0;
  color: #24211f;
  font-size: 15px;
  line-height: 1.25;
  font-style: normal;
  font-weight: 720;
  text-align: left;
}

.requiredMark {
  color: var(--accent);
  font-style: normal;
}

.managerTaskModal input:not([type='radio']):not([type='file']),
.managerTaskModal select,
.managerTaskModal textarea {
  width: 100%;
  min-height: 54px;
  padding: 13px 15px;
  border: 1px solid #dfddda;
  border-radius: 16px;
  outline: none;
  background: #fff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.35;
  box-shadow: 0 1px 0 rgb(17 17 17 / 2%);
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    background-color 150ms ease;
}

.managerTaskModal input::placeholder,
.managerTaskModal textarea::placeholder {
  color: #aaa6a2;
}

.managerTaskModal input:not([type='radio']):not([type='file']):focus,
.managerTaskModal select:focus,
.managerTaskModal textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgb(240 122 0 / 11%);
}

#managerTaskForm.was-validated input:not([type='radio']):not([type='file']):invalid,
#managerTaskForm.was-validated select:invalid,
#managerTaskForm.was-validated textarea:invalid {
  border-color: #d84a42;
  background: #fffafa;
  box-shadow: 0 0 0 3px rgb(216 74 66 / 9%);
}

.managerTaskModal textarea,
.managerTaskModal #managerDescription {
  min-height: 122px;
  resize: vertical;
}

.managerSelectShell {
  position: relative;
  display: block;
}

.managerSelectShell::after {
  position: absolute;
  top: 50%;
  right: 18px;
  width: 8px;
  height: 8px;
  content: '';
  border-right: 2px solid #817d79;
  border-bottom: 2px solid #817d79;
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.managerTaskModal select {
  padding-right: 46px;
  appearance: none;
  -webkit-appearance: none;
}

.managerWorkerSelectShell::before {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 12px;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  content: '';
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, var(--accent) 0 4px, transparent 4.5px),
    radial-gradient(ellipse at 50% 82%, var(--accent) 0 8px, transparent 8.5px), var(--accent-soft);
  transform: translateY(-50%);
  pointer-events: none;
}

.managerWorkerSelectShell select {
  padding-left: 52px;
}

.managerWorkerSelectShell.has-profile-avatar::before {
  background-color: var(--accent-soft);
  background-image: var(--manager-worker-avatar);
  background-position: center;
  background-size: cover;
}

.managerFileInput {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0 !important;
  opacity: 0;
  white-space: nowrap;
}

.managerUploadZone {
  display: grid;
  min-height: 112px;
  place-items: center;
  align-content: center;
  gap: 5px;
  width: 100%;
  padding: 16px;
  border: 1.5px dashed #e2b88f;
  border-radius: 18px;
  background: linear-gradient(180deg, #fffaf6, #fff7f0);
  color: var(--text);
  text-align: center;
  transition:
    border-color 150ms ease,
    background-color 150ms ease,
    transform 150ms ease;
}

.managerUploadZone:hover,
.managerUploadZone:focus-visible {
  border-color: var(--accent);
  outline: none;
  background: #fff3e9;
  box-shadow: 0 0 0 4px rgb(240 122 0 / 10%);
}

.managerUploadZone strong {
  font-size: 15px;
}

.managerUploadZone small {
  color: #817d79;
  font-size: 12px;
  line-height: 1.35;
}

.managerUploadIcon {
  position: relative;
  display: block;
  width: 31px;
  height: 25px;
  margin-bottom: 2px;
  border: 2px solid var(--accent);
  border-radius: 7px;
}

.managerUploadIcon::before {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 5px;
  height: 5px;
  content: '';
  border-radius: 50%;
  background: var(--accent);
}

.managerUploadIcon::after {
  position: absolute;
  right: 4px;
  bottom: 4px;
  left: 4px;
  height: 9px;
  content: '';
  background: var(--accent);
  clip-path: polygon(0 100%, 35% 35%, 54% 70%, 72% 48%, 100% 100%);
}

.managerPhotoMeta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #85817d;
  font-size: 12px;
}

.managerPhotoPreview {
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 2px 2px 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}

.managerPhotoPreview[hidden] {
  display: none;
}

.managerPhotoPreview figure {
  position: relative;
  width: 92px;
  min-width: 92px;
  margin: 0;
  scroll-snap-align: start;
}

.managerPhotoPreview img {
  display: block;
  width: 92px;
  height: 82px;
  border-radius: 13px;
  object-fit: cover;
  background: #f2f1ef;
}

.managerPhotoPreview figcaption {
  margin-top: 5px;
  overflow: hidden;
  color: #77736f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.managerPhotoPreview button {
  position: absolute;
  top: -6px;
  right: -6px;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #3f3b38;
  color: #fff;
  font-size: 17px;
  line-height: 1;
  box-shadow: 0 4px 10px rgb(17 17 17 / 18%);
}

.managerFieldError,
.managerFormError {
  margin: 0;
  padding: 11px 13px;
  border-radius: 12px;
  background: #fff0ef;
  color: #b42318;
  font-size: 13px;
  line-height: 1.4;
}

.managerFormError {
  margin-bottom: 20px;
}

.managerSectionHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.managerSectionHead h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 1.2;
}

.managerSectionHead h3 span {
  color: var(--accent);
}

.managerAddStepButton {
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: #c55f00;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.managerStepsList {
  display: grid;
  gap: 12px;
}

.managerStepFields {
  position: relative;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 17px 17px 17px 20px;
  overflow: hidden;
  border-radius: 18px;
  background: #f7f6f5;
  box-shadow: inset 0 0 0 1px rgb(17 17 17 / 3%);
}

.managerStepFields::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  content: '';
  background: linear-gradient(180deg, #ff9a2f, var(--accent));
}

.managerStepHeader,
.managerStepHeader > div {
  display: flex;
  align-items: center;
}

.managerStepHeader .managerStepTools {
  display: flex;
  gap: 6px;
}

.managerMoveStepButton {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #e5e1dd;
  border-radius: 10px;
  background: #fff;
  color: #6d6761;
  font-weight: 850;
}

.managerMoveStepButton:disabled {
  opacity: 0.35;
}

.managerStepFields.is-readonly {
  background: #f4f7f2;
}

.managerStepFields.is-readonly::before {
  background: #4e9b4a;
}

.managerStepFields.is-readonly input,
.managerStepFields.is-readonly textarea {
  background: #f7f8f6;
  color: #55514c;
}

.managerStepReadonlyNote {
  display: block;
  margin-top: 8px;
  color: #4e844a;
  font-weight: 700;
}

.managerPhotoUnavailable {
  display: grid;
  width: 100%;
  height: 78px;
  place-items: center;
  background: #f2f0ed;
  color: #777;
  font-size: 11px;
}

.managerControlValue {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #f7f5f2;
}

.managerControlValue small {
  color: #817a74;
}

.managerEditUnavailable {
  margin: 0;
  color: #77716b;
  font-size: 13px;
}

.messageCard.is-unread {
  border-color: rgb(240 122 0 / 35%);
  box-shadow: 0 8px 22px rgb(240 122 0 / 10%);
}

.managerStepHeader {
  justify-content: space-between;
  gap: 12px;
}

.managerStepHeader > div {
  gap: 9px;
}

.managerStepHeader strong {
  color: #383431;
  font-size: 14px;
}

.managerStepNumber {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.managerRemoveStepButton {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0;
  border-radius: 11px;
  background: #eeecea;
  color: #77716d;
  font-size: 19px;
}

.managerRemoveStepButton:hover {
  background: #ffebe9;
  color: #c72f26;
}

.managerStepFields textarea {
  min-height: 88px;
}

.managerParameterGrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.managerChoiceGroup {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.managerChoiceGroup legend {
  margin-bottom: 9px;
}

.managerChoiceGroup legend span {
  color: var(--accent);
}

.managerSegmentedControl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
  padding: 4px;
  border-radius: 15px;
  background: #f3f2f0;
}

.managerTaskModal .managerSegmentOption {
  position: relative;
  display: block;
  min-width: 0;
}

.managerSegmentOption input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.managerSegmentOption span {
  display: grid;
  min-height: 42px;
  place-items: center;
  padding: 8px 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #77736f;
  font-size: 13px;
  font-weight: 720;
  text-align: center;
  cursor: pointer;
}

.managerSegmentOption input:checked + span {
  border-color: rgb(240 122 0 / 35%);
  background: #fff7f0;
  color: #b95700;
  box-shadow: 0 2px 7px rgb(89 48 12 / 7%);
}

.managerSegmentOption input:focus-visible + span {
  outline: 3px solid rgb(240 122 0 / 18%);
  outline-offset: 1px;
}

.managerAssignmentRow {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(122px, 1fr);
  gap: 14px;
}

.managerTaskModal input[type='number'] {
  appearance: textfield;
  -moz-appearance: textfield;
}

.managerTaskModal input[type='number']::-webkit-inner-spin-button,
.managerTaskModal input[type='number']::-webkit-outer-spin-button {
  margin: 0;
  appearance: none;
  -webkit-appearance: none;
}

.managerFormActions {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: minmax(104px, 0.36fr) minmax(0, 0.64fr);
  gap: 12px;
  padding: 16px 24px max(16px, var(--safe-bottom));
  border-top: 1px solid #efeeec;
  background: rgb(255 255 255 / 96%);
  box-shadow: 0 -12px 28px rgb(17 17 17 / 5%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.managerCancelButton,
.managerSubmitButton {
  min-height: 54px;
  margin: 0;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 800;
}

.managerCancelButton {
  border: 1px solid #dedbd8;
  background: #fff;
  color: #4e4945;
}

.managerSubmitButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 16px;
  background: linear-gradient(180deg, #ff941f, var(--accent));
  color: #fff;
  box-shadow: 0 10px 22px rgb(240 122 0 / 24%);
}

.managerSubmitButton:disabled {
  background: #d8d5d2;
  color: #8f8b87;
  box-shadow: none;
  cursor: not-allowed;
}

.managerSubmitSpinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgb(255 255 255 / 45%);
  border-top-color: #fff;
  border-radius: 50%;
  animation: managerSpin 700ms linear infinite;
}

.managerSubmitButton.is-loading .managerSubmitIcon {
  display: none;
}

.managerSubmitButton.is-loading .managerSubmitSpinner {
  display: block;
}

.managerFormConfirm {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgb(30 27 25 / 45%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.managerFormConfirm[hidden] {
  display: none;
}

.managerConfirmCard {
  width: min(100%, 430px);
  max-height: calc(100dvh - 72px - var(--safe-top) - var(--safe-bottom));
  padding: 24px;
  overflow-y: auto;
  border-radius: 22px;
  background: #fff;
  text-align: center;
  box-shadow: 0 24px 70px rgb(17 17 17 / 28%);
  animation: modalCardIn 160ms ease-out both;
}

.managerConfirmIcon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  margin: 0 auto 14px;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 22px;
  font-weight: 850;
}

.managerConfirmCard h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.2;
}

.managerConfirmCard > p {
  margin: 8px 0 0;
  color: #77736f;
  font-size: 14px;
  line-height: 1.45;
}

.managerConfirmSummary {
  margin-top: 18px;
  padding: 5px 14px;
  border-radius: 15px;
  background: #f7f6f5;
  text-align: left;
}

.managerConfirmSummary dl {
  margin: 0;
}

.managerConfirmSummary div {
  display: grid;
  grid-template-columns: minmax(92px, 0.7fr) minmax(0, 1.3fr);
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #e8e6e3;
}

.managerConfirmSummary div:last-child {
  border-bottom: 0;
}

.managerConfirmSummary dt {
  color: #85817d;
  font-size: 12px;
}

.managerConfirmSummary dd {
  min-width: 0;
  margin: 0;
  color: #2d2926;
  font-size: 13px;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.managerConfirmActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.managerConfirmActions button {
  min-height: 48px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
}

.managerConfirmBack {
  border: 1px solid #dedbd8;
  background: #fff;
  color: #504b47;
}

.managerConfirmSubmit {
  background: var(--accent);
  color: #fff;
}

.managerConfirmSubmit.is-danger {
  background: #c83a31;
}

.managerTaskModal button:focus-visible,
.managerTaskModal [tabindex]:focus-visible {
  outline: 3px solid rgb(240 122 0 / 25%);
  outline-offset: 2px;
}

@keyframes managerSpin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 520px) {
  .modalCard.managerTaskModal {
    width: calc(100vw - 24px - var(--safe-left) - var(--safe-right));
    height: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));
    max-height: calc(100dvh - 24px - var(--safe-top) - var(--safe-bottom));
    border-radius: 24px;
  }

  .managerDialogHeader {
    grid-template-columns: 44px minmax(0, 1fr) 42px;
    gap: 11px;
    padding: 18px 18px 15px;
  }

  .managerHeaderIcon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .managerDialogHeader h2,
  .modalCard.managerTaskModal .managerDialogHeader h2 {
    font-size: clamp(22px, 6.2vw, 27px);
  }

  .managerDialogHeader p,
  .modalCard.managerTaskModal .managerDialogHeader p {
    font-size: 12px;
  }

  .managerCloseButton {
    width: 42px;
    height: 42px;
  }

  .managerFormBody {
    padding: 20px 18px 24px;
  }

  .managerFormGroup + .managerFormGroup {
    margin-top: 26px;
    padding-top: 23px;
  }

  .managerParameterGrid {
    grid-template-columns: 1fr;
  }

  .managerFormActions {
    padding: 13px 18px max(13px, var(--safe-bottom));
  }
}

@media (max-width: 350px) {
  .modalCard.managerTaskModal {
    width: calc(100vw - 16px - var(--safe-left) - var(--safe-right));
    height: calc(100dvh - 16px - var(--safe-top) - var(--safe-bottom));
    max-height: calc(100dvh - 16px - var(--safe-top) - var(--safe-bottom));
    border-radius: 20px;
  }

  .managerDialogHeader {
    grid-template-columns: 40px minmax(0, 1fr) 38px;
    gap: 8px;
    padding: 14px;
  }

  .managerHeaderIcon,
  .managerCloseButton {
    width: 38px;
    height: 38px;
  }

  .managerHeaderIcon::before {
    inset: 9px 10px 8px;
  }

  .managerHeaderIcon::after {
    top: 14px;
    left: 14px;
    width: 10px;
  }

  .managerDialogHeader h2,
  .modalCard.managerTaskModal .managerDialogHeader h2 {
    font-size: 20px;
  }

  .managerDialogHeader p,
  .modalCard.managerTaskModal .managerDialogHeader p {
    margin-top: 3px;
    font-size: 11px;
  }

  .managerFormBody {
    padding: 17px 14px 22px;
  }

  .managerSectionHead {
    align-items: flex-start;
    flex-direction: column;
  }

  .managerAddStepButton {
    align-self: stretch;
  }

  .managerAssignmentRow {
    grid-template-columns: 1fr;
  }

  .managerFormActions {
    grid-template-columns: minmax(86px, 0.34fr) minmax(0, 0.66fr);
    gap: 8px;
    padding: 11px 14px max(11px, var(--safe-bottom));
  }

  .managerCancelButton,
  .managerSubmitButton {
    min-height: 50px;
    padding-inline: 9px;
    font-size: 13px;
  }

  .managerConfirmCard {
    padding: 20px 16px;
  }

  .managerConfirmActions {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modalCard.managerTaskModal.is-active,
  .managerConfirmCard,
  .managerSubmitSpinner {
    animation-duration: 1ms;
  }

  .managerTaskModal * {
    scroll-behavior: auto !important;
  }
}

/* Corrected task workspace: simple islands and a compact work-step sequence. */
#taskDetailView .taskStatusHead {
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 12px;
}

#taskDetailView .taskBackButton {
  width: 104px;
  height: 52px;
  min-width: 104px;
}

#taskDetailView .taskStatusControl {
  width: 100%;
  min-width: 0;
}

.taskWorkspaceCard h2 {
  display: -webkit-box;
  overflow: hidden;
  max-height: calc(1.25em * 2);
  line-height: 1.25;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stepTimeline {
  display: grid;
  gap: 0;
}

.stepTimeline .workStep,
.stepTimeline .workStep.is-current {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  gap: 12px;
  min-height: 0;
  padding: 0;
  text-align: center;
}

.stepTimeline .workStep::before,
.stepTimeline .workStep::after {
  content: none;
}

.workStepCompact {
  width: 100%;
  padding: 4px 8px;
}

.workStepCompact h3,
.currentStepBubble h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 750;
  line-height: 1.4;
  text-align: center;
  overflow-wrap: anywhere;
}

.workStepCompact small {
  display: block;
  margin-top: 4px;
  color: #438f43;
  font-size: 11px;
  font-weight: 650;
}

.workStepArrow {
  display: block;
  color: #92969c;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  pointer-events: none;
}

.stepTimeline .currentStepBubble {
  width: 100%;
  padding: 18px 14px 16px;
  border: 1px solid rgb(240 122 0 / 10%);
  border-radius: 16px;
  background: #fff8ef;
  box-shadow: 0 8px 22px rgb(76 49 18 / 6%);
}

.stepTimeline .currentStepBubble::before {
  content: none;
}

.stepTimeline .currentStepBubble > p {
  margin: 8px auto 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.stepTimeline .stepWorkActions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.stepTimeline .stepWorkActions button {
  width: 100%;
  min-height: 48px;
  margin: 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 750;
}

.stepTimeline .stepPhotoButton {
  border: 1.5px solid var(--accent);
  background: #fff;
  color: var(--text);
  box-shadow: none;
}

.stepTimeline .stepCompleteButton {
  border: 0;
  background: linear-gradient(180deg, #ff9912, #f27a00);
  color: #fff;
  box-shadow: 0 7px 16px rgb(240 122 0 / 17%);
}

.stepStoppedText {
  margin-top: 12px !important;
  padding: 11px;
  border-radius: 10px;
  background: #ffefed;
  color: #b63b36 !important;
  font-weight: 650;
}

.taskCompletedModal {
  text-align: center;
}

@media (max-width: 360px) {
  #taskDetailView .taskStatusHead {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 8px;
  }

  #taskDetailView .taskStatusControl {
    padding-left: 10px;
  }

  #taskDetailView .taskStatusControl span {
    margin-left: 0;
  }
}
