/* REBUILD ACTIVE Phase 7 — safe session exit and accessibility resilience. */
.active-exit-layer{
  position:fixed;
  z-index:2147483000;
  inset:0;
  box-sizing:border-box;
  display:grid;
  align-items:end;
  justify-items:center;
  padding:24px max(18px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(18px,env(safe-area-inset-left));
  overflow:auto;
  overscroll-behavior:contain;
}

.active-exit-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,24,21,.58);
  backdrop-filter:blur(3px);
  pointer-events:none;
}

.active-exit-sheet{
  position:relative;
  isolation:isolate;
  width:min(100%,430px);
  box-sizing:border-box;
  padding:26px 22px 22px;
  border:1px solid rgba(56,81,72,.38);
  border-radius:27px;
  color:#18231f;
  background:
    linear-gradient(135deg,rgba(255,255,255,.92),transparent 32%),
    linear-gradient(145deg,#fffdf8 0%,#e5e6de 100%);
  box-shadow:
    0 24px 54px rgba(5,14,11,.34),
    5px 7px 0 rgba(57,80,70,.13),
    inset 0 1px 0 rgba(255,255,255,.98),
    inset 0 0 0 4px rgba(255,255,255,.38);
}

.active-exit-sheet::before{
  content:"";
  position:absolute;
  z-index:-1;
  inset:7px;
  border:1px solid rgba(65,125,101,.25);
  border-radius:20px;
  pointer-events:none;
}

.active-exit-kicker{
  margin:0 0 8px;
  color:#237b59;
  font-size:12px;
  font-weight:900;
  line-height:1.2;
  letter-spacing:.15em;
}

.active-exit-sheet h2{
  margin:0;
  color:#111b17;
  font-size:clamp(27px,8vw,37px);
  font-weight:950;
  line-height:.98;
  letter-spacing:-.035em;
}

.active-exit-sheet p{
  margin:16px 0 20px;
  color:#35433e;
  font-size:16px;
  font-weight:700;
  line-height:1.48;
}

.active-exit-actions{display:grid;gap:10px}
.active-exit-actions button{
  width:100%;
  min-height:52px;
  box-sizing:border-box;
  padding:13px 16px;
  border-radius:15px;
  font:900 14px/1.2 inherit;
  letter-spacing:.055em;
}

.active-exit-continue{
  border:1px solid rgba(38,112,83,.58);
  color:#10231b;
  background:linear-gradient(145deg,#efffe5 0%,#bfe9d1 100%);
  box-shadow:0 6px 13px rgba(31,91,67,.16),inset 0 1px 0 rgba(255,255,255,.9),inset 0 -4px 0 #63de9e;
}

.active-exit-end{
  border:1px solid rgba(142,55,45,.48);
  color:#67291f;
  background:linear-gradient(145deg,#fff8f1 0%,#f2d5cb 100%);
  box-shadow:0 5px 11px rgba(91,42,34,.12),inset 0 1px 0 #fff;
}

.active-exit-actions button:focus-visible{
  outline:3px solid #126f54;
  outline-offset:3px;
  box-shadow:0 0 0 6px rgba(133,242,173,.35);
}

#activeContent .walk-distance-panel .active-field-error{
  display:block;
  margin:8px 0 0;
  color:#842e25!important;
  font-size:13px!important;
  font-weight:850!important;
  line-height:1.4!important;
}
#activeContent .walk-distance-panel .active-field-error[hidden]{display:none!important}
#activeContent input[aria-invalid="true"]{border-color:#9e3d31!important;box-shadow:0 0 0 3px rgba(158,61,49,.17)!important}
#activeContent .qm-progress i.skipped{background:transparent!important;border:1px dashed currentColor!important;box-shadow:none!important;opacity:.58}

@media(max-width:390px){
  .active-exit-layer{padding-inline:14px;padding-bottom:calc(18px + env(safe-area-inset-bottom))}
  .active-exit-sheet{padding:24px 18px 18px;border-radius:24px}
  .active-exit-sheet::before{border-radius:17px}
}

@media(max-width:360px){
  .active-exit-layer{padding-inline:10px;padding-bottom:calc(12px + env(safe-area-inset-bottom))}
  .active-exit-sheet{padding:21px 15px 15px}
  .active-exit-sheet p{font-size:15px}
}

@media(prefers-reduced-motion:reduce){
  .active-exit-layer,.active-exit-sheet,.active-exit-actions button{animation:none!important;transition:none!important;scroll-behavior:auto!important}
  .active-exit-backdrop{backdrop-filter:none}
}

@media(forced-colors:active){
  .active-exit-backdrop{background:Canvas;opacity:.8;backdrop-filter:none}
  .active-exit-sheet{border:3px solid CanvasText;background:Canvas;color:CanvasText;box-shadow:none;forced-color-adjust:auto}
  .active-exit-sheet::before{border:1px solid CanvasText}
  .active-exit-kicker,.active-exit-sheet h2,.active-exit-sheet p{color:CanvasText}
  .active-exit-actions button{border:2px solid ButtonText;background:ButtonFace;color:ButtonText;box-shadow:none}
  .active-exit-end{outline:2px solid Mark;outline-offset:-5px}
  .active-exit-actions button:focus-visible{outline:4px solid Highlight;outline-offset:3px;box-shadow:none}
  #activeContent .walk-distance-panel .active-field-error{color:Mark!important}
  #activeContent input[aria-invalid="true"]{border:3px solid Mark!important;box-shadow:none!important}
  #activeContent .qm-progress i.skipped{border:2px dashed GrayText!important}
}

@media(min-resolution:1.5dppx){
  .active-exit-sheet{transform:translateZ(0)}
}
