:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  --green-950: #063f28;
  --green-900: #075a37;
  --green-800: #087646;
  --green-600: #18a85d;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  margin: 0;
}

body {
  min-height: 100svh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #0a2d1f;
  background: #eaf4ee;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.login-shell {
  position: relative;
  isolation: isolate;
  width: min(100%, 460px);
  height: min(900px, calc(100dvh - 32px));
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(5, 76, 44, 0.16);
  border-radius: 20px;
  background: #dff2e6;
  box-shadow: 0 22px 70px rgba(5, 64, 38, 0.22);
}

.scene-background,
.scene-tint,
.visual-stage {
  position: absolute;
  inset: 0;
}

.scene-background {
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
  user-select: none;
  -webkit-user-drag: none;
}

.scene-tint {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.36) 23%, rgba(255, 255, 255, 0) 43%),
    linear-gradient(0deg, rgba(2, 71, 39, 0.3) 0%, rgba(2, 71, 39, 0) 29%);
  pointer-events: none;
}

.emergency-header {
  position: absolute;
  z-index: 20;
  top: calc(env(safe-area-inset-top, 0px) + 9px);
  right: 10px;
  left: 10px;
}

.emergency-link {
  min-height: 58px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px 7px 7px;
  color: var(--white);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 16px;
  background: rgba(4, 117, 65, 0.96);
  box-shadow: 0 7px 22px rgba(2, 71, 39, 0.26), inset 0 1px rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.phone-icon {
  width: 43px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 50%;
  background: rgba(79, 205, 126, 0.62);
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.phone-icon svg {
  width: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emergency-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.emergency-copy small {
  overflow: hidden;
  font-size: 8px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.emergency-copy strong {
  margin-top: 4px;
  font-size: clamp(20px, 6vw, 26px);
  line-height: 0.86;
  white-space: nowrap;
}

.call-label {
  min-height: 30px;
  display: grid;
  place-items: center;
  padding: 0 12px;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(2, 65, 37, 0.62);
}

.intro {
  position: absolute;
  z-index: 8;
  top: calc(env(safe-area-inset-top, 0px) + 78px);
  right: 14px;
  left: 14px;
  text-align: center;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.9), 0 1px 10px rgba(255, 255, 255, 0.45);
}

.brand-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.brand-line h1 {
  margin: 0;
  font-size: clamp(25px, 8.2vw, 35px);
  line-height: 1;
  font-weight: 950;
}

.brand-line span {
  padding: 3px 7px 4px;
  color: var(--white);
  font-size: clamp(16px, 5.2vw, 22px);
  line-height: 1;
  font-weight: 950;
  border-radius: 7px;
  background: #18b95e;
  box-shadow: 0 3px 8px rgba(8, 126, 65, 0.24);
}

.tagline {
  margin: 4px 0 0;
  font-size: clamp(23px, 7.2vw, 31px);
  line-height: 1.02;
  font-weight: 900;
}

.subtitle {
  margin: 5px 0 0;
  color: #174a38;
  font-size: clamp(10px, 3vw, 13px);
  line-height: 1.2;
  font-weight: 650;
}

.visual-stage {
  z-index: 5;
  pointer-events: none;
}

.worker-carousel {
  --board-x: clamp(100px, 29vw, 140px);
  position: absolute;
  z-index: 4;
  left: 25%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 187px);
  width: clamp(82px, 22.5vw, 104px);
  height: clamp(155px, 47vw, 215px);
  transform-origin: 50% 100%;
}

.worker-card {
  position: absolute;
  inset: 0;
  visibility: hidden;
  opacity: 0;
  transform-origin: 50% 100%;
}

.worker-card.is-active {
  visibility: visible;
  animation: worker-enter 520ms cubic-bezier(0.2, 0.85, 0.22, 1.14) both;
}

.worker-figure {
  position: absolute;
  inset: 0 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transform-origin: 52% 92%;
}

.worker-figure > img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

/* Rig 2D anime: corpo, braccio e mano usano la stessa texture WebP.
   Solo il personaggio visibile viene compositato e animato. */
.anime-rig {
  --shoulder-x: 38%;
  --shoulder-y: 37%;
  --wrist-x: 17%;
  --wrist-y: 22%;
  --anime-accent: rgba(15, 156, 87, 0.82);
  --body-clip: polygon(24% 0%, 100% 0%, 100% 100%, 0% 100%, 0% 51%, 17% 49%, 27% 41%, 34% 31%, 25% 23%);
  --arm-clip: polygon(5% 18%, 20% 14%, 30% 23%, 41% 35%, 45% 48%, 33% 52%, 24% 43%, 16% 32%, 7% 28%);
  --hand-clip: polygon(0% 0%, 25% 0%, 30% 20%, 23% 30%, 7% 29%, 0% 21%);
  position: relative;
  width: 100%;
  height: 100%;
  isolation: isolate;
  transform: translateZ(0);
}

.anime-rig__body,
.anime-rig__arm,
.anime-rig__hand,
.anime-rig__arm-image,
.anime-rig__hand-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  -webkit-user-drag: none;
  backface-visibility: hidden;
}

.anime-rig__body {
  z-index: 1;
  clip-path: var(--body-clip);
}

.anime-rig__arm {
  z-index: 2;
  transform-origin: var(--shoulder-x) var(--shoulder-y);
}

.anime-rig__arm-image {
  clip-path: var(--arm-clip);
}

.anime-rig__hand {
  z-index: 3;
  transform-origin: var(--wrist-x) var(--wrist-y);
}

.anime-rig__hand-image {
  clip-path: var(--hand-clip);
}

.anime-motion {
  position: absolute;
  z-index: 4;
  top: 4%;
  left: 0;
  width: 24%;
  height: 19%;
  border-top: 2px solid var(--anime-accent);
  border-radius: 50%;
  opacity: 0;
  transform: rotate(-24deg) scale(0.65);
  transform-origin: 70% 70%;
}

.anime-motion--two {
  top: 9%;
  left: -4%;
  width: 17%;
  height: 13%;
  border-width: 1px;
}

.worker-slot-1 .anime-rig { --shoulder-x: 37%; --shoulder-y: 38%; --wrist-x: 16%; --wrist-y: 22%; }
.worker-slot-2 .anime-rig { --shoulder-x: 39%; --shoulder-y: 36%; --wrist-x: 18%; --wrist-y: 21%; --anime-accent: rgba(15, 156, 87, 0.72); }
.worker-slot-3 .anime-rig { --shoulder-x: 38%; --shoulder-y: 37%; --wrist-x: 16%; --wrist-y: 21%; }
.worker-slot-4 .anime-rig { --shoulder-x: 39%; --shoulder-y: 36%; --wrist-x: 18%; --wrist-y: 21%; }
.worker-slot-5 .anime-rig { --shoulder-x: 38%; --shoulder-y: 38%; --wrist-x: 15%; --wrist-y: 21%; }
.worker-slot-6 .anime-rig { --shoulder-x: 38%; --shoulder-y: 37%; --wrist-x: 17%; --wrist-y: 21%; }

.client-wave .anime-rig {
  --shoulder-x: 38%;
  --shoulder-y: 35%;
  --wrist-x: 16%;
  --wrist-y: 20%;
  width: 100%;
  height: auto;
  aspect-ratio: 526 / 1350;
}

body.is-ready .worker-card.is-active .anime-rig__arm,
body.is-ready .worker-card.is-active .anime-rig__hand,
body.is-artisan-login .worker-card.is-active .anime-rig__arm,
body.is-artisan-login .worker-card.is-active .anime-rig__hand,
body.is-client-login .client-wrap .anime-rig__arm,
body.is-client-login .client-wrap .anime-rig__hand {
  will-change: transform;
}

body.is-ready .worker-card.is-active .anime-rig__arm {
  animation: anime-arm-wave 2.25s steps(1, end) 260ms both;
}

body.is-ready .worker-card.is-active .anime-rig__hand {
  animation: anime-hand-wave 2.25s steps(1, end) 260ms both;
}

body.is-ready .worker-card.is-active .anime-motion {
  animation: anime-motion-arc 2.25s steps(1, end) 260ms both;
}

body.is-artisan-login .worker-card.is-active .anime-rig__arm {
  animation: anime-arm-fast 540ms steps(1, end) 2;
}

body.is-artisan-login .worker-card.is-active .anime-rig__hand {
  animation: anime-hand-fast 540ms steps(1, end) 2;
}

body.is-client-login .client-wrap .anime-rig__arm {
  animation: anime-arm-fast 540ms steps(1, end) 630ms 3;
}

body.is-client-login .client-wrap .anime-rig__hand {
  animation: anime-hand-fast 540ms steps(1, end) 630ms 3;
}

body.is-client-login .client-wrap .anime-motion {
  animation: anime-motion-arc-fast 540ms steps(1, end) 630ms 3;
}

.worker-badge,
.client-badge {
  position: absolute;
  z-index: 3;
  bottom: 0;
  left: 50%;
  min-width: max-content;
  padding: 3px 7px;
  color: #ffffff;
  font-size: 8px;
  line-height: 1.1;
  font-weight: 900;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 999px;
  background: rgba(3, 91, 50, 0.9);
  box-shadow: 0 3px 9px rgba(3, 63, 37, 0.2);
  transform: translateX(-50%);
}

.client-wrap {
  --house-y: clamp(-165px, -19vh, -115px);
  position: absolute;
  z-index: 6;
  left: 6%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 187px);
  width: clamp(66px, 18vw, 84px);
  padding-bottom: 18px;
  visibility: hidden;
  opacity: 0;
  transform-origin: 50% 100%;
}

.client-wave,
.client-wrap img,
.van-wrap img {
  display: block;
  width: 100%;
  height: auto;
}

.client-wave {
  transform-origin: 52% 92%;
}

.client-wave .anime-rig__body,
.client-wave .anime-rig__arm-image,
.client-wave .anime-rig__hand-image {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.van-wrap {
  position: absolute;
  z-index: 2;
  right: -1%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 184px);
  width: clamp(170px, 47vw, 224px);
  transform-origin: 50% 85%;
}

.van-suspension {
  animation: van-idle 2.8s ease-in-out 1.2s infinite;
}

.speed-lines {
  position: absolute;
  top: 48%;
  right: 70%;
  width: 70%;
  height: 4px;
  border-radius: 999px;
  opacity: 0;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 18px -14px 0 -1px rgba(255, 255, 255, 0.72), 8px 15px 0 -1px rgba(255, 255, 255, 0.6);
}

.dust {
  position: absolute;
  z-index: -1;
  left: 8%;
  bottom: 17%;
  width: 23px;
  aspect-ratio: 1;
  border-radius: 50%;
  opacity: 0;
  background: rgba(237, 226, 177, 0.72);
  filter: blur(1px);
}

.dust-two {
  left: -2%;
  width: 15px;
}

body.is-ready .worker-card.is-active .worker-figure {
  animation: worker-breathe 2.25s ease-in-out 260ms both;
}

.login-panel {
  position: absolute;
  z-index: 15;
  right: 12px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 38px);
  left: 12px;
  display: grid;
  gap: 7px;
}

.login-button {
  position: relative;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  padding: 0 18px;
  color: #0c2d21;
  font: inherit;
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
  user-select: none;
  border: 1px solid rgba(2, 84, 46, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 3px 12px rgba(3, 72, 41, 0.14);
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.login-button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: #25ad61;
  transform: scaleX(0);
  transform-origin: left;
}

.login-button:hover {
  background: #ffffff;
  box-shadow: 0 5px 17px rgba(3, 72, 41, 0.2);
  transform: translateY(-1px);
}

.login-button:active {
  transform: translateY(1px) scale(0.995);
}

.login-button:focus-visible,
.emergency-link:focus-visible {
  outline: 3px solid #ffe06b;
  outline-offset: 2px;
}

.login-button.is-disabled {
  cursor: wait;
  pointer-events: none;
}

.login-button.is-active::after {
  animation: login-progress 3s linear forwards;
}

.g-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.system-banner {
  position: absolute;
  z-index: 25;
  top: 43%;
  right: 14px;
  left: 14px;
  padding: 9px 12px;
  color: #7a271a;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 750;
  text-align: center;
  border: 1px solid rgba(180, 35, 24, 0.24);
  border-radius: 8px;
  background: rgba(255, 244, 242, 0.96);
  box-shadow: 0 7px 20px rgba(98, 29, 20, 0.14);
}

.oauth-prompt,
.oauth-unavailable {
  padding: 13px;
  color: #123d2e;
  text-align: center;
  border: 1px solid rgba(2, 84, 46, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 9px 24px rgba(3, 72, 41, 0.18);
}

.oauth-prompt {
  gap: 8px;
}

.oauth-prompt strong {
  font-size: 14px;
}

.oauth-prompt p {
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
}

.oauth-prompt .login-button {
  min-height: 41px;
}

.skip-google {
  color: #075a37;
  font-size: 11px;
  font-weight: 800;
}

.oauth-unavailable {
  font-size: 11px;
  line-height: 1.45;
}

.security-note {
  position: absolute;
  z-index: 15;
  right: 10px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  left: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  text-shadow: 0 1px 3px rgba(0, 55, 30, 0.8);
}

.security-note span {
  width: 7px;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  background: #37d97e;
  box-shadow: 0 0 8px rgba(55, 217, 126, 0.8);
}

.demo-message {
  position: absolute;
  z-index: 30;
  top: 46%;
  left: 50%;
  min-width: min(330px, calc(100% - 36px));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 18px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px;
  opacity: 0;
  background: rgba(3, 83, 47, 0.96);
  box-shadow: 0 12px 34px rgba(2, 48, 27, 0.34);
  transform: translate3d(-50%, 12px, 0) scale(0.97);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}

.demo-message.is-visible {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
}

.demo-check {
  width: 22px;
  aspect-ratio: 1;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  color: #075a37;
  border-radius: 50%;
  background: #dfffea;
}

body.is-artisan-login .worker-carousel,
body.is-client-login .worker-carousel,
body.is-client-login .client-wrap,
body.is-artisan-login .van-wrap {
  will-change: transform, opacity;
}

body.is-artisan-login .worker-card {
  visibility: hidden;
}

body.is-artisan-login .worker-card.is-active {
  visibility: visible;
  opacity: 1;
  animation: worker-boards 1.35s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

body.is-artisan-login .worker-card.is-active .worker-figure {
  animation: quick-wave 312ms ease-in-out 2;
}

body.is-artisan-login .worker-badge,
body.is-client-login .worker-badge {
  opacity: 0;
}

body.is-artisan-login .van-wrap {
  animation: van-departs 1.71s cubic-bezier(0.34, 0.06, 0.22, 1) 1.23s forwards;
}

body.is-artisan-login .van-suspension {
  animation: engine-start 102ms linear 1.23s 7;
}

body.is-artisan-login .speed-lines {
  animation: speed-lines 750ms ease-out 1.62s forwards;
}

body.is-artisan-login .dust-one {
  animation: dust-cloud 456ms ease-out 1.59s 2;
}

body.is-artisan-login .dust-two {
  animation: dust-cloud 408ms ease-out 1.692s 2;
}

body.is-client-login .client-wrap {
  visibility: visible;
  animation: client-emerges 870ms cubic-bezier(0.2, 0.76, 0.2, 1) 72ms forwards;
}

body.is-client-login .client-wave {
  animation: client-wave 336ms ease-in-out 588ms 4;
}

body.is-client-login .worker-card {
  visibility: visible;
  animation: team-to-client 1.92s cubic-bezier(0.22, 0.72, 0.22, 1) calc(552ms + var(--group-delay)) forwards;
}

body.is-client-login .worker-card .worker-figure {
  animation: team-step 216ms ease-in-out calc(552ms + var(--group-delay)) 8;
}

.worker-slot-1 { --group-x: -12px; --group-y: 3px; --group-delay: 0ms; z-index: 6; }
.worker-slot-2 { --group-x: 12px; --group-y: -1px; --group-delay: 42ms; z-index: 5; }
.worker-slot-3 { --group-x: 36px; --group-y: 5px; --group-delay: 84ms; z-index: 4; }
.worker-slot-4 { --group-x: 60px; --group-y: 0px; --group-delay: 126ms; z-index: 3; }
.worker-slot-5 { --group-x: 84px; --group-y: 5px; --group-delay: 168ms; z-index: 2; }
.worker-slot-6 { --group-x: 108px; --group-y: 1px; --group-delay: 210ms; z-index: 1; }

@keyframes worker-enter {
  from {
    opacity: 0;
    transform: translate3d(12px, 18px, 0) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes worker-wave {
  0%, 100% { transform: rotate(0deg); }
  35% { transform: rotate(-2.2deg); }
  70% { transform: rotate(1.4deg); }
}

@keyframes worker-breathe {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  26% { transform: translate3d(0, -2px, 0) rotate(-0.5deg); }
  54% { transform: translate3d(0, 0, 0) rotate(0.35deg); }
}

@keyframes anime-arm-wave {
  0%, 7%, 52%, 100% { transform: translateZ(0) rotate(0deg); }
  12% { transform: translateZ(0) rotate(-8deg); }
  20% { transform: translateZ(0) rotate(5deg); }
  28% { transform: translateZ(0) rotate(-10deg); }
  37% { transform: translateZ(0) rotate(4deg); }
  45% { transform: translateZ(0) rotate(-5deg); }
}

@keyframes anime-hand-wave {
  0%, 7%, 52%, 100% { transform: translateZ(0) rotate(0deg); }
  12% { transform: translateZ(0) rotate(8deg); }
  20% { transform: translateZ(0) rotate(-11deg); }
  28% { transform: translateZ(0) rotate(12deg); }
  37% { transform: translateZ(0) rotate(-9deg); }
  45% { transform: translateZ(0) rotate(5deg); }
}

@keyframes anime-motion-arc {
  0%, 8%, 49%, 100% { opacity: 0; transform: rotate(-24deg) scale(0.65); }
  12%, 20%, 28%, 37%, 45% { opacity: 0.82; transform: rotate(-10deg) scale(1); }
}

@keyframes anime-arm-fast {
  0%, 100% { transform: translateZ(0) rotate(0deg); }
  25% { transform: translateZ(0) rotate(-9deg); }
  50% { transform: translateZ(0) rotate(5deg); }
  75% { transform: translateZ(0) rotate(-6deg); }
}

@keyframes anime-hand-fast {
  0%, 100% { transform: translateZ(0) rotate(0deg); }
  25% { transform: translateZ(0) rotate(12deg); }
  50% { transform: translateZ(0) rotate(-10deg); }
  75% { transform: translateZ(0) rotate(8deg); }
}

@keyframes anime-motion-arc-fast {
  0%, 100% { opacity: 0; transform: rotate(-24deg) scale(0.7); }
  25%, 50%, 75% { opacity: 0.82; transform: rotate(-10deg) scale(1); }
}

@keyframes quick-wave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-3deg); }
}

@keyframes van-idle {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -2px, 0); }
}

@keyframes worker-boards {
  0% {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
  34% {
    opacity: 1;
    transform: translate3d(calc(var(--board-x) * 0.34), -4px, 0) scale(0.88);
  }
  72% {
    opacity: 1;
    transform: translate3d(var(--board-x), 8px, 0) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--board-x) * 1.08), 12px, 0) scale(0.38);
  }
}

@keyframes client-emerges {
  0% {
    visibility: visible;
    opacity: 0;
    transform: translate3d(-8px, var(--house-y), 0) scale(0.3);
  }
  22% { opacity: 1; }
  64% {
    opacity: 1;
    transform: translate3d(-3px, calc(var(--house-y) * 0.45), 0) scale(0.66);
  }
  100% {
    visibility: visible;
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
  }
}

@keyframes client-wave {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.8deg); }
}

@keyframes team-to-client {
  0% {
    opacity: 0;
    transform: translate3d(165px, 18px, 0) scale(0.38);
  }
  16% { opacity: 1; }
  100% {
    opacity: 1;
    transform: translate3d(var(--group-x), var(--group-y), 0) scale(0.46);
  }
}

@keyframes team-step {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(0, -3px, 0) rotate(-0.8deg); }
}

@keyframes engine-start {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0); }
  50% { transform: translate3d(-1px, -1px, 0) rotate(-0.25deg); }
}

@keyframes van-departs {
  0%, 18% { transform: translate3d(0, 0, 0) rotate(0); }
  29% { transform: translate3d(-5px, 0, 0) rotate(-0.4deg); }
  44% { transform: translate3d(12px, -1px, 0) rotate(0.25deg); }
  100% { transform: translate3d(145vw, -5px, 0) rotate(1deg); }
}

@keyframes speed-lines {
  0% { opacity: 0; transform: translate3d(35px, 0, 0) scaleX(0.35); }
  25% { opacity: 0.95; }
  100% { opacity: 0; transform: translate3d(-55px, 0, 0) scaleX(1.25); }
}

@keyframes dust-cloud {
  0% { opacity: 0; transform: translate3d(8px, 0, 0) scale(0.5); }
  35% { opacity: 0.72; }
  100% { opacity: 0; transform: translate3d(-46px, -18px, 0) scale(1.65); }
}

@keyframes login-progress {
  to { transform: scaleX(1); }
}

@media (max-width: 600px) {
  .login-shell {
    width: 100%;
    height: 100svh;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-height: 700px) {
  .emergency-link {
    min-height: 50px;
    grid-template-columns: 37px minmax(0, 1fr) auto;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .phone-icon {
    width: 37px;
  }

  .intro {
    top: calc(env(safe-area-inset-top, 0px) + 67px);
  }

  .brand-line h1 {
    font-size: 24px;
  }

  .brand-line span {
    font-size: 16px;
  }

  .tagline {
    margin-top: 2px;
    font-size: 22px;
  }

  .subtitle {
    margin-top: 3px;
    font-size: 9px;
  }

  .worker-carousel {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 164px);
    width: clamp(76px, 21vw, 94px);
    height: clamp(145px, 43vw, 185px);
  }

  .client-wrap {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 164px);
    width: clamp(60px, 16.5vw, 74px);
  }

  .van-wrap {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 160px);
    width: clamp(160px, 45vw, 205px);
  }

  .login-panel {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 31px);
    gap: 5px;
  }

  .login-button {
    min-height: 39px;
    font-size: 12px;
  }

  .security-note {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }
}

@media (max-width: 350px) {
  .emergency-copy strong {
    font-size: 19px;
  }

  .call-label {
    min-height: 28px;
    padding: 0 8px;
    font-size: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }

  .worker-card.is-active {
    visibility: visible;
    opacity: 1;
    transform: none;
  }
}
