/* v5.4.3 ARCHITECT - responsive overlays migrated from app.css */

@media(max-width:430px){
  .toast{
    bottom:calc(
      var(--nav-height) + 18px + env(safe-area-inset-bottom)
    );
  }
}

@media(max-width:759px){
  .reset-schedule-dialog{
    width:min(390px,calc(100vw - 24px));
  }

  .reset-dialog-card{
    box-shadow:0 -24px 70px rgba(20,30,60,.18);
  }

  .toast{
    bottom:calc(70px + env(safe-area-inset-bottom));
  }
}

/* v5.3.2 RETOUCH pt.II - visual / touch canonical */

/* v5.4.3 ARCHITECT - base overlays migrated from app.css */
.request-dialog{width:min(420px,calc(100% - 28px));border:0;border-radius:25px;background:transparent;color:var(--text)}.dialog-card{padding:24px;border:1px solid var(--line);border-radius:25px;background:var(--surface-strong);box-shadow:var(--shadow)}.dialog-icon{display:grid;place-items:center;width:43px;height:43px;border-radius:14px;background:linear-gradient(135deg,var(--purple),var(--blue));color:#fff;font-size:20px}.dialog-card h2{margin-top:15px;font-size:20px}.dialog-card p{margin-top:6px;color:var(--muted);font-size:11px;font-weight:600;}.dialog-card textarea{width:100%;min-height:120px;margin-top:15px;padding:13px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft);color:var(--text);outline:none;resize:vertical;font-size:12px;line-height:1.5}.dialog-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:13px}.toast{position:fixed;z-index:120;left:50%;bottom:calc(var(--nav-height) + 28px + env(safe-area-inset-bottom));max-width:calc(100% - 30px);padding:11px 14px;border:1px solid var(--line);border-radius:13px;background:var(--surface-strong);box-shadow:var(--shadow);color:var(--text);font-size:11px;font-weight:800;transform:translate(-50%,18px);opacity:0;pointer-events:none;transition:.22s ease}.toast.is-visible{transform:translate(-50%,0);opacity:1}

.reset-schedule-dialog{position:fixed;inset:0;width:min(420px,calc(100vw - 24px));height:max-content;max-height:calc(100dvh - 48px);margin:auto;padding:0;border:0;background:transparent;color:var(--text);overflow:visible}
.reset-schedule-dialog::backdrop{background:var(--v410-modal-backdrop);backdrop-filter:blur(var(--v410-modal-blur));-webkit-backdrop-filter:blur(var(--v410-modal-blur))}
.reset-schedule-dialog.is-open::backdrop{animation:v410-backdrop-in .20s ease-out both}
.reset-schedule-dialog.is-open .reset-dialog-card{animation:v410-modal-in .24s cubic-bezier(.2,.8,.2,1) both}
.reset-schedule-dialog.is-closing::backdrop{animation:v48-layer-out .17s ease-in both}
.reset-schedule-dialog.is-closing .reset-dialog-card{animation:v48-panel-out .17s cubic-bezier(.4,0,1,1) both}
.reset-dialog-card{width:100%;box-sizing:border-box;padding:20px;border:1px solid var(--line,rgba(20,30,50,.1));border-radius:25px;background:var(--surface,#fff);color:var(--text,#172033);box-shadow:-28px 0 80px rgba(20,30,60,.16);overflow:hidden}
html[data-theme="dark"] .reset-dialog-card{background:#151d2b;border-color:rgba(255,255,255,.08)}
.reset-dialog-card h2{margin:5px 0 14px;font-size:20px}.reset-time-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.reset-time-grid span{display:grid;place-items:center;min-height:42px;border:1px solid var(--line);border-radius:13px;background:var(--surface-soft);font-size:11px;font-weight:850}.reset-dialog-card>button{width:100%;height:42px;margin-top:14px;border:0;border-radius:13px;background:var(--surface-soft);color:var(--text);font-weight:850}

@media(prefers-reduced-motion:reduce){
  .reset-schedule-dialog.is-open .reset-dialog-card,
  .reset-schedule-dialog.is-open::backdrop{animation:none}
}

/* SIGNAL / timetable close button */
/* v5.3.2 mobile keyboard viewport */
@media(max-width:759px){
  .v511-timetable-layer.is-open .v511-timetable-panel{
    max-height:min(
      calc(100dvh - 24px),
      calc(var(--dukbap-vv-height,100dvh) - 18px)
    );
  }

  .v511-timetable-layer.is-open #v511-timetable-body{
    max-height:min(
      calc(100dvh - 145px),
      calc(var(--dukbap-vv-height,100dvh) - 132px)
    );
    scroll-padding-bottom:72px;
  }
}

/* v5.3.2 timetable keyboard clearance */
@media(max-width:759px){
  #v511-timetable-body.is-keyboard-active{
    padding-bottom:42vh;
    scroll-padding-bottom:42vh;
  }
}

/* v5.3.2 RETOUCH pt.II - canonical SIGNAL close button */

.v511-timetable-panel .v48-notification-head-actions{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  align-self:center;
  margin:0;
  padding:0;
}

.v48-notification-head .v48-close{
  position:relative;
  display:block;
  flex:0 0 38px;
  width:38px;
  min-width:38px;
  height:38px;
  min-height:38px;
  padding:0;
  margin:0;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-strong);
  box-shadow:var(--shadow-soft);
  color:var(--text);
  font-size:0;
  line-height:0;
  text-indent:-9999px;
  overflow:hidden;
  cursor:pointer;
}

.v48-notification-head .v48-close::before,
.v48-notification-head .v48-close::after{
  content:"";
  position:absolute;
  left:50%;
  top:50%;
  width:15px;
  height:1.7px;
  border-radius:999px;
  background:currentColor;
  transform-origin:center;
  pointer-events:none;
}

.v48-notification-head .v48-close::before{
  transform:translate(-50%,-50%) rotate(45deg);
}

.v48-notification-head .v48-close::after{
  transform:translate(-50%,-50%) rotate(-45deg);
}


/* v5.3.2 RETOUCH pt.II - canonical modal header */

.v48-notification-panel .v48-notification-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  width:100%;
  margin:0;
  padding:18px 18px 14px;
}

.v48-notification-panel .v48-notification-head > div:first-child{
  flex:1 1 auto;
  min-width:0;
}

.v48-notification-panel .v48-notification-eyebrow{
  margin:0 0 4px;
  line-height:1.2;
}

.v48-notification-panel .v48-notification-head h2{
  margin:0;
  line-height:1.15;
}

.v48-notification-panel .v48-notification-head-actions{
  flex:0 0 auto;
  align-self:flex-start;
}

/* canonical toast */
#toast{
  position:fixed;
  z-index:300;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;

  width:max-content;
  max-width:calc(100vw - 32px);
  height:40px;
  min-height:40px;
  padding:0 16px;

  border:1px solid rgba(110,118,140,.14);
  border-radius:999px;
  background:var(--surface-strong);
  color:var(--text);
  box-shadow:
    0 8px 28px rgba(32,38,55,.13),
    inset 0 1px 0 rgba(255,255,255,.22);

  font-size:11px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;

  pointer-events:none;
  opacity:0;
  transition:
    opacity .20s ease,
    transform .22s cubic-bezier(.2,.8,.2,1);
}

@media(max-width:759px){
  #toast{
    left:50%;
    right:auto;
    bottom:calc(84px + env(safe-area-inset-bottom));
    max-width:min(82vw,320px);
    transform:translate(-50%,10px) scale(.98);
  }

  #toast.is-visible{
    opacity:1;
    transform:translate(-50%,0) scale(1);
  }
}

@media(min-width:760px){
  #toast{
    left:auto;
    right:24px;
    bottom:24px;
    transform:translateY(10px) scale(.98);
  }

  #toast.is-visible{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}


/* canonical request dialog */
@media(max-width:759px){
  .request-dialog{
    height:max-content;
    padding:0;
    overflow:visible;
  }

  .request-dialog .dialog-card{
    box-sizing:border-box;
    width:100%;
    max-height:calc(100dvh - 48px);
    padding:20px;
    overflow-y:auto;
    border-radius:25px;
  }

  .request-dialog textarea{
    min-height:112px;
    max-height:28dvh;
    margin-top:12px;
    resize:none;
  }

  .request-dialog .dialog-actions{
    margin-top:12px;
  }
}


/* canonical modal backdrop */
dialog:not(.v411-class-dialog)::backdrop{
  background:var(--v410-modal-backdrop);
  backdrop-filter:blur(var(--v410-modal-blur));
  -webkit-backdrop-filter:blur(var(--v410-modal-blur));
}

dialog:not(.v411-class-dialog)[open]{
  position:fixed;
  inset:0;
  margin:auto;
}

dialog:not(.v411-class-dialog)[open] .dialog-card,
dialog:not(.v411-class-dialog)[open] .reset-dialog-card{
  animation:v410-modal-in .24s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes v410-modal-in{
  from{
    opacity:0;
    transform:translateY(16px) scale(.965);
  }
  to{
    opacity:1;
    transform:translateY(0) scale(1);
  }
}

@media(prefers-reduced-motion:reduce){
  dialog:not(.v411-class-dialog)[open] .dialog-card,
  dialog:not(.v411-class-dialog)[open] .reset-dialog-card{
    animation:none;
  }
}

dialog:not(.v411-class-dialog)[open]::backdrop{
  animation:v410-backdrop-in .20s ease-out both;
}

@keyframes v410-backdrop-in{
  from{
    background:rgba(27,32,45,0);
    backdrop-filter:blur(0);
    -webkit-backdrop-filter:blur(0);
  }
  to{
    background:rgba(27,32,45,.38);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
  }
}

@media(max-width:759px){
  dialog:not(.v411-class-dialog)[open]{
    width:min(390px,calc(100% - 24px));
    max-height:calc(100dvh - 48px);
  }
}

/* canonical modal viewport safety */
.dialog-card,
.reset-dialog-card{
  box-sizing:border-box;
}

@media(max-height:600px){
  .dialog-card,
  .reset-dialog-card{
    max-height:calc(100dvh - 24px);
    overflow-y:auto;
  }

}

/* canonical dark toast */
:is(html,body)[data-theme="dark"] #toast{
  background:rgba(29,32,43,.96);
  border-color:rgba(255,255,255,.09);
  color:#f4f5f8;
  box-shadow:0 12px 34px rgba(0,0,0,.38);
}
