/* v5.4.3 ARCHITECT - nav image ownership migrated from app.css */
.nav-image-icon{overflow:hidden;background:var(--surface-strong);border:1px solid var(--line)}
.nav-image-icon img{width:100%;height:100%;object-fit:cover;border-radius:inherit}

/* v5.4.3 ARCHITECT - shell and topbar migrated from app.css */

.app-shell{width:min(1120px,calc(100% - 30px));margin:0 auto;padding:24px 0 calc(var(--nav-height) + 44px)}
.topbar{
  position:relative;
  z-index:30;
  display:flex;
  align-items:center;
  gap:10px;
  min-height:48px;
  margin-bottom:38px;
}

@media(max-width:680px){
  .app-shell{
    width:min(100% - 24px,590px);
    padding-top:17px;
  }
  .topbar{margin-bottom:31px}
}

@media(max-width:430px){
  :root{--nav-height:68px}
  .app-shell{width:calc(100% - 20px)}
}

@media(min-width:760px){
  :root{--nav-height:0px}
  .app-shell{
    width:auto;
    max-width:1480px;
    margin:0 auto;
    padding:34px 28px 44px 128px;
  }
  .topbar{
    width:100%;
    max-width:1320px;
    margin-left:auto;
    margin-right:auto;
    margin-bottom:35px;
  }
}

@media(max-width:759px){
  :root{--nav-height:58px}
  .app-shell{
    width:calc(100% - 20px);
    padding-top:16px;
    padding-bottom:82px;
  }
}

@media(max-width:420px){
  .topbar{gap:7px}
}

@media(max-width:759px){
  .topbar > :first-child{
    --brand-base-x:10px;
  }
}

@media(min-width:1100px) and (max-width:1279px){
  .app-shell{
    width:95.42%;
    max-width:1756px;
    padding:32px 29px 32px 116px;
    zoom:1.048;
  }
  .topbar{
    max-width:1641px;
    margin-bottom:23px;
  }
}

@media(min-width:1280px) and (max-width:1419px){
  .app-shell{
    width:83.89%;
    max-width:1544px;
    padding:29px 25px 29px 102px;
    zoom:1.192;
  }
  .topbar{
    max-width:1443px;
    margin-bottom:20px;
  }
}

@media(min-width:1420px){
  .app-shell{
    width:79.37%;
    max-width:1460px;
    padding:27px 24px 27px 97px;
    zoom:1.260;
  }
  .topbar{
    max-width:1365px;
    margin-bottom:19px;
  }
}

/* Android safe area */
html.dukbap-android-app .app-shell{
  padding-top:var(--android-status-inset, 0px);
  padding-bottom:calc(var(--nav-height) + max(var(--android-nav-inset, 0px), 14px) + 24px);
}

/* v5.4.3 ARCHITECT - navigation migrated from app.css */

.bottom-nav{position:fixed;z-index:80;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);display:grid;grid-template-columns:repeat(4,1fr);width:min(560px,calc(100% - 24px));height:var(--nav-height);padding:7px;border:1px solid rgba(255,255,255,.74);border-radius:25px;background:rgba(255,255,255,.82);box-shadow:0 22px 70px rgba(42,51,81,.2);backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
html[data-theme="dark"] .bottom-nav{background:rgba(20,27,44,.86);border-color:var(--line)}
.nav-item{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;border-radius:18px;background:transparent;color:var(--muted);cursor:pointer;font-size:9px;font-weight:800;transition:.18s ease}.nav-icon{display:grid;place-items:center;width:31px;height:31px;border-radius:11px}.nav-icon svg{width:18px;height:18px}.nav-item.is-active{color:var(--purple);background:rgba(114,87,246,.09)}.nav-item.is-active .nav-icon{color:#fff;background:linear-gradient(135deg,var(--purple),var(--blue));box-shadow:0 8px 20px rgba(114,87,246,.26)}

@media(max-width:759px){
  .bottom-nav{
    z-index:150;
    left:10px;
    right:10px;
    bottom:max(6px,env(safe-area-inset-bottom));
    transform:none;
    width:auto;
    height:58px;
    padding:5px 6px;
    border-radius:999px;
    grid-template-columns:repeat(4,minmax(0,1fr));
  }
  .bottom-nav.has-staff{
    grid-template-columns:repeat(5,minmax(0,1fr));
  }
  .bottom-nav .nav-item{min-width:0;border-radius:999px;gap:1px;font-size:8px}.bottom-nav .nav-icon{width:26px;height:26px}.bottom-nav .nav-icon svg{width:18px;height:18px}
}

.staff-nav-item[hidden]{
  display:none;
}
.bottom-nav:not(.has-staff) .staff-nav-item{
  display:none;
}
.bottom-nav.has-staff .staff-nav-item:not([hidden]){
  display:flex;
}

@media(max-width:759px) and (orientation:portrait){
  .bottom-nav{
    left:50%;
    right:auto;
    width:min(82vw,320px);
    transform:translateX(-50%);
    transition:width .22s cubic-bezier(.2,.8,.2,1);
    z-index:150;
  }

  .bottom-nav.has-staff{
    width:min(94vw,382px);
  }
}

@media(min-width:760px){
  .bottom-nav{
    left:16px;
    right:auto;
    top:50%;
    bottom:auto;
    transform:translateY(-50%);

    width:70px;
    height:auto;
    min-height:0;

    padding:7px;
    gap:5px;

    display:flex;
    flex-direction:column;
    justify-content:center;

    border-radius:999px;
  }
  .bottom-nav .nav-item{
    width:56px;
    height:56px;
    min-height:56px;
    flex:0 0 56px;

    padding:4px;
    border-radius:999px;
    gap:2px;
  }

  .bottom-nav .nav-icon{
    width:31px;
    height:31px;
    border-radius:50%;
}
  .bottom-nav .nav-icon svg{
    width:21px;
    height:21px;
  }
  .bottom-nav .nav-item > span:last-child{
    margin:0;
    font-size:8px;
    line-height:1;
  }

  .staff-nav-item[hidden]{
    display:none;
  }
}

.v410-top-fade,
.v410-bottom-scrim{
  display:none;
  pointer-events:none;
}

@media(max-width:759px){

  .topbar{
    position:relative;
    z-index:150;
    background:transparent;
    box-shadow:none;
  }

  .topbar > :not(button){
    background-color:transparent;
  }



  .v410-bottom-scrim{
    display:block;
    position:fixed;
    z-index:140;
    left:0;
    right:0;
    bottom:0;
    height:90px;
    background:linear-gradient(to top,rgba(65,69,78,.32) 0%,rgba(82,86,96,.24) 30%,rgba(105,109,119,.14) 56%,rgba(135,139,149,.055) 78%,rgba(150,154,164,0) 100%);
  }

}

@media (pointer:coarse) and (orientation:landscape) and (max-height:600px){
  .bottom-nav{
    position:fixed;
    left:12px;
    right:12px;
    top:auto;
    bottom:calc(10px + env(safe-area-inset-bottom));

    width:auto;
    height:68px;
    transform:none;

    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-around;

    padding:6px 8px;
    border-radius:999px;
  }

  .bottom-nav .nav-item{
    flex:1 1 0;
    width:auto;
    height:56px;
  }
}

/* v5.1 mobile app bottom navigation */
@media (max-width:759px) and (orientation:portrait){
  html.dukbap-android-app .bottom-nav{
        bottom:max(var(--android-nav-inset, 0px), 16px);
  }
}

@media (display-mode: standalone) and (max-width:759px) and (orientation:portrait){
  .bottom-nav{
    bottom:calc(max(8px, env(safe-area-inset-bottom)) + 7px);
  }
}

/* v5.2 Android 3-button navigation depth */
@media (max-width:759px) and (orientation:portrait){
  html.dukbap-android-app.android-nav-buttons .bottom-nav{
    box-shadow:
      0 -10px 22px rgba(42,51,81,.11),
      0 14px 34px rgba(42,51,81,.16);
  }

  html.dukbap-android-app.android-nav-buttons .v410-bottom-scrim{
    display:block;
    z-index:70;
    height:calc(var(--android-nav-inset, 0px) + 28px);
    background:linear-gradient(
      to bottom,
      rgba(18,24,38,0) 0%,
      rgba(18,24,38,.14) 24%,
      rgba(18,24,38,.34) 58%,
      rgba(18,24,38,.58) 100%
    );
    backdrop-filter:blur(32px);
    -webkit-backdrop-filter:blur(32px);
    mask-image:linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0,0,0,.35) 38%,
      #000 100%
    );
    -webkit-mask-image:linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0,0,0,.35) 38%,
      #000 100%
    );
  }
}

/* canonical dark overlay behavior */
html[data-theme="dark"] .v410-top-fade,
html[data-theme="dark"] .v410-bottom-scrim{
  display:none;
}

html.dukbap-android-app[data-theme="dark"] .v410-top-fade,
html.dukbap-windows-app[data-theme="dark"] .v410-top-fade{
  background:linear-gradient(to bottom,rgba(37,44,76,1) 0%,rgba(37,44,76,.88) 28%,rgba(37,44,76,.58) 55%,rgba(37,44,76,.28) 78%,rgba(37,44,76,0) 100%);
  display:block;
}

/* v5.1.2 Android top overlay tint refine */
@media(max-width:759px){
  html.dukbap-android-app .v410-top-fade{
    height:calc(40px + env(safe-area-inset-top));
    background:linear-gradient(
      to bottom,
      rgba(228,225,255,1) 0%,
      rgba(228,225,255,.90) 25%,
      rgba(228,225,255,.70) 50%,
      rgba(228,225,255,.35) 68%,
      rgba(228,225,255,.10) 82%,
      rgba(228,225,255,0) 100%
    );
  }
}


/* v5.3.5 wide navigation overlays */
@media(min-width:760px){

  .bottom-nav{overflow:visible}

  .bottom-nav .nav-item{position:relative;z-index:1}


}

/* v5.4 PRISM - Android top fade viewport fix */
@media(max-width:759px){
  html.dukbap-android-app .v410-top-fade{
    display:block;
    position:fixed !important;
    top:0 !important;
    left:0 !important;
    right:0 !important;
    bottom:auto !important;
    margin:0 !important;
    z-index:140 !important;
    pointer-events:none !important;
  }
}

/* v5.4 PRISM - keep bottom scrim in dark mode */
@media(max-width:759px){
  html[data-theme="dark"] .v410-bottom-scrim{
    display:block;
  }
}

/* v5.3.5 wide layout final repair */
@media (min-width:760px){








  .app-shell{
    width:auto;
    max-width:1480px;
    padding:24px 28px 44px 128px;
  }

  .bottom-nav{
    display:flex;
    position:fixed;
    z-index:150;
    left:16px;
    right:auto;
    top:50%;
    bottom:auto;
    transform:translateY(-50%);
    width:70px;
    height:auto;
    min-height:0;
    padding:7px;
    flex-direction:column;
    gap:5px;
    border-radius:999px;
  }

  .bottom-nav .nav-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    box-sizing:border-box;
    width:56px;
    height:56px;
    min-height:56px;
    margin:0;
    padding:0;
  }











  .v48-notification-panel.v48-quiet-picker-panel{
    height:auto;
    min-height:0;
  }

  .v48-quiet-picker-panel,
  .v48-quiet-picker-body{
    flex:0 0 auto;
    min-height:0;
  }


  /* Tablet / desktop edge overlays.
     Top matches the mobile app. Bottom fades without blur. */
  .v410-top-fade{
    display:block;
    position:fixed;
    z-index:140;
    pointer-events:none;
    top:0;
    right:0;
    left:0;
    height:40px;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    background:linear-gradient(
      to bottom,
      rgba(233,230,255,1) 0%,
      rgba(233,230,255,.90) 25%,
      rgba(233,230,255,.70) 50%,
      rgba(233,230,255,.35) 68%,
      rgba(233,230,255,.10) 82%,
      rgba(233,230,255,0) 100%
    );
  }

  html.dukbap-android-app[data-theme="dark"] .v410-top-fade,
  html.dukbap-windows-app[data-theme="dark"] .v410-top-fade,
  html[data-theme="dark"]:not(.dukbap-android-app):not(.dukbap-windows-app) .v410-top-fade{
    display:none;
    background:linear-gradient(
      to bottom,
      rgba(37,44,76,1) 0%,
      rgba(37,44,76,.88) 28%,
      rgba(37,44,76,.58) 55%,
      rgba(37,44,76,.28) 78%,
      rgba(37,44,76,0) 100%
    );
  }

  .v410-bottom-scrim{
    display:block;
    position:fixed;
    z-index:140;
    pointer-events:none;
    right:0;
    bottom:0;
    left:0;
    height:var(--v54-wide-bottom-scrim-height,140px);
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    background:linear-gradient(
      to bottom,
      rgba(228,225,255,0) 0%,
      rgba(228,225,255,0) 30%,
      rgba(228,225,255,var(--v54-wide-a48,.05)) 48%,
      rgba(228,225,255,var(--v54-wide-a64,.16)) 64%,
      rgba(228,225,255,var(--v54-wide-a80,.38)) 80%,
      rgba(228,225,255,var(--v54-wide-a94,.74)) 94%,
      rgba(228,225,255,var(--v54-wide-a100,.90)) 100%
    );
  }

  html[data-theme="dark"] .v410-bottom-scrim{
    background:linear-gradient(
      to bottom,
      rgba(21,29,43,0) 0%,
      rgba(21,29,43,0) 30%,
      rgba(21,29,43,var(--v54-wide-a48,.06)) 48%,
      rgba(21,29,43,var(--v54-wide-a64,.18)) 64%,
      rgba(21,29,43,var(--v54-wide-a80,.42)) 80%,
      rgba(21,29,43,var(--v54-wide-a94,.76)) 94%,
      rgba(21,29,43,var(--v54-wide-a100,.92)) 100%
    );
  }




}

/* v5.4 PRISM - canonical dark bottom overlay */
@media(max-width:759px){

  html[data-theme="dark"] .v410-bottom-scrim,
  html.dukbap-android-app[data-theme="dark"] .v410-bottom-scrim,
  html.dukbap-android-app.android-nav-buttons[data-theme="dark"] .v410-bottom-scrim{
    display:block !important;
    position:fixed !important;

    left:0 !important;
    right:0 !important;
    bottom:0 !important;

    width:auto !important;
    height:165px !important;

    z-index:140 !important;
    pointer-events:none !important;

    backdrop-filter:none !important;
    -webkit-backdrop-filter:none !important;

    mask-image:none !important;
    -webkit-mask-image:none !important;

    background:linear-gradient(
      to bottom,
      rgba(4,7,16,0) 0%,
      rgba(4,7,16,.08) 30%,
      rgba(4,7,16,.20) 48%,
      rgba(4,7,16,.38) 64%,
      rgba(4,7,16,.62) 80%,
      rgba(4,7,16,.86) 94%,
      rgba(4,7,16,.96) 100%
    ) !important;
  }

}

/* v5.4.3 ARCHITECT - install UI migrated from v411-fun.css */

/* canonical install showcase */
.v411-install-dialog{
  width:min(400px,calc(100% - 24px));
  padding:0;
  border:0;
  background:transparent;
  color:var(--text);
}

.v411-install-card{
  position:relative;
  overflow:hidden;
  padding:27px 22px 20px;
  border:1px solid rgba(255,255,255,.82);
  border-radius:28px;
  background:
    linear-gradient(145deg,rgba(255,255,255,.98),rgba(248,249,255,.94));
  box-shadow:
    0 28px 90px rgba(38,44,76,.26),
    inset 0 1px 0 rgba(255,255,255,.9);
  text-align:center;
}

.v411-install-card::before{
  content:"";
  position:absolute;
  width:260px;
  height:260px;
  left:50%;
  top:-155px;
  transform:translateX(-50%);
  border-radius:50%;
  background:
    conic-gradient(
      from 180deg,
      rgba(105,82,255,.55),
      rgba(29,169,235,.48),
      rgba(231,67,205,.38),
      rgba(105,82,255,.55)
    );
  filter:blur(32px);
  opacity:.72;
  pointer-events:none;
}

.v411-install-card::after{
  content:"";
  position:absolute;
  top:-40%;
  left:-75%;
  width:42%;
  height:180%;
  transform:rotate(18deg);
  background:linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,.58),
    transparent
  );
  animation:v411-install-shine 2.8s ease-in-out infinite;
  pointer-events:none;
}

@keyframes v411-install-shine{
  0%,35%{left:-75%;opacity:0}
  48%{opacity:.7}
  68%{left:135%;opacity:0}
  100%{left:135%;opacity:0}
}

.v411-install-content{
  position:relative;
  z-index:2;
}

.v411-install-icon-wrap{
  position:relative;
  display:grid;
  place-items:center;
  width:94px;
  height:94px;
  margin:0 auto 18px;
}

.v411-install-icon-wrap::before{
  content:"";
  position:absolute;
  inset:-13px;
  border-radius:30px;
  background:linear-gradient(
    135deg,
    rgba(111,82,255,.25),
    rgba(25,176,235,.22)
  );
  filter:blur(11px);
}

.v411-install-icon{
  position:relative;
  width:76px;
  height:76px;
  border-radius:23px;
  box-shadow:0 16px 38px rgba(62,71,130,.23);
}

.v411-install-eyebrow{
  margin:0 0 7px;
  color:#7160eb;
  font-size:10px;
  font-weight:900;
  letter-spacing:.18em;
}

.v411-install-card h2{
  margin:0;
  font-size:25px;
  letter-spacing:-1px;
}

.v411-install-copy{
  margin:9px auto 0;
  max-width:290px;
  color:var(--muted);
  font-size:11px;
  line-height:1.65;
}

.v411-install-features{
  display:flex;
  justify-content:center;
  flex-wrap:wrap;
  gap:7px;
  margin:18px 0;
}

.v411-install-features span{
  padding:7px 10px;
  border:1px solid rgba(112,119,145,.12);
  border-radius:999px;
  background:rgba(245,246,253,.82);
  color:var(--muted);
  font-size:9px;
  font-weight:850;
}

.v411-install-guide{
  margin:0 0 15px;
  padding:11px 13px;
  border-radius:14px;
  background:rgba(105,82,245,.055);
  color:var(--muted);
  font-size:10px;
  line-height:1.5;
}

.v411-install-primary{
  position:relative;
  width:100%;
  height:49px;
  border:0;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(110deg,#7054f7,#4379ee,#16ace2);
  color:#fff;
  box-shadow:0 14px 34px rgba(74,91,224,.27);
  font-size:12px;
  font-weight:900;
  cursor:pointer;
}

.v411-install-primary::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(
    110deg,
    transparent 25%,
    rgba(255,255,255,.28) 50%,
    transparent 75%
  );
  transform:translateX(-120%);
  transition:transform .5s ease;
}

.v411-install-primary:active{
  transform:scale(.975);
}

.v411-install-later{
  margin-top:8px;
  padding:8px 14px;
  border:0;
  background:transparent;
  color:var(--muted);
  font-size:10px;
  font-weight:800;
}

.v411-install-dialog[open] .v411-install-icon-wrap{
  animation:v411-icon-pop .48s .08s cubic-bezier(.2,.9,.25,1.18) both;
}

@keyframes v411-icon-pop{
  from{opacity:0;transform:translateY(10px) scale(.78) rotate(-4deg)}
  to{opacity:1;transform:translateY(0) scale(1) rotate(0)}
}

@media(prefers-reduced-motion:reduce){
  .v411-install-dialog[open] .v411-install-icon-wrap,
  .v411-install-card::after{
    animation:none;
  }
}

#v411-install-settings .section-head{
  align-items:center;
}

#v411-install-settings-button{
  flex:0 0 auto;
  min-width:86px;
  height:40px;
  border-radius:14px;
}

@media (display-mode:standalone),
       (display-mode:fullscreen),
       (display-mode:minimal-ui){
  #v411-install-settings{
    display:none;
  }
}

/* v5.1 canonical dark install surface */
:is(html,body)[data-theme="dark"] .v411-install-card{
  border-color:rgba(255,255,255,.09);
  background:
    linear-gradient(
      145deg,
      rgba(31,34,47,.98),
      rgba(24,27,38,.98)
    );
  box-shadow:
    0 28px 90px rgba(0,0,0,.42),
    inset 0 1px 0 rgba(255,255,255,.05);
}

:is(html,body)[data-theme="dark"] .v411-install-features span{
  border-color:rgba(255,255,255,.08);
  background:rgba(255,255,255,.055);
}

:is(html,body)[data-theme="dark"] .v411-install-guide{
  background:rgba(114,87,246,.10);
}

:is(html,body)[data-theme="dark"] .v411-install-card::after{
  background:linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,.12),
    transparent
  );
}
