
.kgx-apk-launcher{
  position:fixed;
  z-index:9980;
  right:18px;
  bottom:18px;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:8px 13px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:999px;
  background:#111118;
  color:#fff;
  box-shadow:0 12px 34px rgba(0,0,0,.28);
  font-family:inherit;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}
.kgx-apk-launcher-icon{
  width:28px;height:28px;border-radius:50%;
  display:grid;place-items:center;
  background:#ff3150;color:#fff;
  font-size:16px;
}
.kgx-apk-modal[hidden]{display:none!important}
.kgx-apk-modal{position:fixed;inset:0;z-index:99999}
.kgx-apk-backdrop{
  position:absolute;inset:0;background:rgba(0,0,0,.58);
  backdrop-filter:blur(4px);
}
.kgx-apk-sheet{
  position:absolute;
  left:50%;top:50%;
  transform:translate(-50%,-50%);
  width:min(430px,calc(100vw - 28px));
  background:#111118;color:#fff;
  border:1px solid rgba(255,255,255,.12);
  border-radius:24px;
  padding:24px 20px 20px;
  box-shadow:0 30px 90px rgba(0,0,0,.5);
  direction:rtl;
  text-align:center;
}
.kgx-apk-sheet-close{
  position:absolute;left:12px;top:12px;
  width:32px;height:32px;border:0;border-radius:10px;
  background:#24242c;color:#fff;font-size:20px;cursor:pointer;
}
.kgx-apk-sheet-icon{
  width:64px;height:64px;margin:0 auto 14px;
  border-radius:20px;background:#ff3150;
  display:grid;place-items:center;font-weight:900;font-size:26px;
}
.kgx-apk-version{
  display:inline-block;color:#ff8598;font-size:10px;font-weight:800;
  margin-bottom:6px;
}
.kgx-apk-sheet h2{margin:0 0 7px;font-size:20px;color:#fff}
.kgx-apk-sheet p{margin:0 auto 16px;max-width:320px;color:#aaa;font-size:12px;line-height:1.8}
.kgx-apk-sheet-btn{
  display:flex;align-items:center;justify-content:center;
  min-height:48px;width:100%;
  border-radius:14px;background:#ff3150;color:#fff!important;
  text-decoration:none!important;font-weight:800;font-size:13px;
}

/* shortcode / inline block */
.kgx-apk-card{
  font-family:inherit;
  display:flex;gap:13px;align-items:flex-start;
  background:#111118;color:#fff;
  border:1px solid rgba(255,255,255,.1);
  border-radius:20px;padding:15px;
  direction:rtl;
}
.kgx-apk-icon{
  width:48px;height:48px;flex:0 0 48px;border-radius:15px;
  background:#ff3150;display:grid;place-items:center;font-weight:900;font-size:20px
}
.kgx-apk-copy{flex:1;min-width:0}
.kgx-apk-copy strong{display:block;font-size:15px;margin:1px 0 3px}
.kgx-apk-copy p{margin:0 0 10px;color:#aaa;font-size:11px;line-height:1.7}
.kgx-apk-btn{
  display:inline-flex;align-items:center;justify-content:center;
  min-height:38px;padding:7px 13px;border-radius:11px;
  background:#ff3150;color:#fff!important;text-decoration:none!important;
  font-size:11px;font-weight:800
}

@media(max-width:680px){
  .kgx-apk-launcher{
    right:12px;
    bottom:calc(12px + env(safe-area-inset-bottom));
  }
  .kgx-apk-sheet{
    top:auto;
    bottom:0;
    left:0;
    transform:none;
    width:100%;
    max-width:none;
    border-radius:24px 24px 0 0;
    padding:28px 18px calc(18px + env(safe-area-inset-bottom));
    animation:kgxSheetUp .22s ease-out;
  }
  @keyframes kgxSheetUp{
    from{transform:translateY(100%)}
    to{transform:translateY(0)}
  }
}

/* v1.4.0 — mobile inline, desktop modal launcher */
.kgx-apk-mobile-inline{display:none}
@media(max-width:680px){
  .kgx-apk-launcher{display:none!important}
  .kgx-apk-mobile-inline{
    display:flex!important;
    position:relative!important;
    z-index:2!important;
    width:calc(100% - 20px)!important;
    margin:10px auto 14px!important;
    padding:10px 12px!important;
    align-items:center!important;
    gap:10px!important;
    border:1px solid rgba(255,255,255,.1)!important;
    border-radius:16px!important;
    background:#111118!important;
    color:#fff!important;
    box-shadow:none!important;
  }
  .kgx-apk-mobile-icon{
    width:36px;height:36px;flex:0 0 36px;
    border-radius:11px;background:#ff3150;
    display:grid;place-items:center;font-weight:900
  }
  .kgx-apk-mobile-copy{flex:1;min-width:0}
  .kgx-apk-mobile-copy strong{
    display:block;font-size:12px;line-height:1.45;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis
  }
  .kgx-apk-mobile-copy small{display:block;color:#888;font-size:9px;margin-top:2px}
  .kgx-apk-mobile-inline>a{
    flex:0 0 auto;
    display:inline-flex;align-items:center;justify-content:center;
    min-height:34px;padding:6px 10px;border-radius:10px;
    background:#ff3150;color:#fff!important;text-decoration:none!important;
    font-size:10px;font-weight:800
  }
  /* modal should not be used on mobile anymore */
  .kgx-apk-modal{display:none!important}
}
