:root{
  --bg:#050a07;
  --fg:#b6ffb6;
  --muted:rgba(182,255,182,.7);
  --line:rgba(182,255,182,.18);
  --panel:rgba(0,0,0,.40);
  --panel2:rgba(0,0,0,.62);
  --shadow:0 18px 40px rgba(0,0,0,.55);
  --radius:14px;
  --mono:ui-monospace,Menlo,Consolas,monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--fg);
  font-family:var(--mono);
  overflow:hidden;
}

a{color:var(--fg)}
button,input{font-family:var(--mono)}
.k{letter-spacing:.06em;text-transform:uppercase}
.scan{
  position:fixed; inset:0; pointer-events:none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,.04), rgba(0,0,0,0) 18%, rgba(0,0,0,0) 82%, rgba(0,0,0,.14)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0, rgba(255,255,255,.03) 1px, rgba(0,0,0,0) 3px, rgba(0,0,0,0) 6px);
  mix-blend-mode:overlay;
  opacity:.28;
}

.noSelect{user-select:none}

/* === Inline from mobile.php (mobile :root vars + shell and below) === */
:root{
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bot: env(safe-area-inset-bottom, 0px);
  --nav-h: 74px;
  --top-h: 52px;
}

body:has(.mShell){
  height:calc(var(--vh,1vh) * 100);
  margin:0;
  background:#020604;
  color:var(--fg);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y;
  font-family: ui-monospace, Menlo, Consolas, Monaco, "Liberation Mono", monospace;
}

.mShell{
  position:relative;
  width:100%;
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  background:
    radial-gradient(900px 600px at 70% 25%, rgba(90,255,140,.12), transparent 60%),
    radial-gradient(700px 520px at 20% 80%, rgba(90,255,140,.07), transparent 60%);
}

.mWallpaper{
  position:absolute; inset:0;
  pointer-events:none;
  background-image:url("/assets/img/killerOSlogo.png");
  background-repeat:no-repeat;
  background-position:center;
  background-size:min(86vw, 520px) auto;
  opacity:.10;
  mix-blend-mode: screen;
  filter: blur(.2px) contrast(1.05) saturate(1.05);
  z-index:0;
}

.mTopbar{
  position:relative;
  z-index:3;
  height:calc(var(--top-h) + var(--safe-top));
  padding-top:var(--safe-top);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding-left:12px;
  padding-right:12px;
  border-bottom:1px solid var(--line);
  background:rgba(0,0,0,.55);
  backdrop-filter: blur(10px);
  flex-shrink:0;
}

.mTopLeft{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.mBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  background:rgba(0,0,0,.35);
  font-size:12px;
  opacity:.95;
  white-space:nowrap;
  font-family: ui-monospace, Menlo, Consolas, Monaco, "Liberation Mono", monospace;
  color: var(--fg);
}

.mTopRight{
  display:flex;
  align-items:center;
  gap:10px;
}

.mClock{
  font-variant-numeric: tabular-nums;
}

.mMain{
  position:relative;
  z-index:2;
  flex:1;
  min-height:0;
  overflow:hidden;
  padding:4px;
  padding-bottom:4px;
}

.mAppFrame{
  height:100%;
  min-height:0;
  border:1px solid rgba(182,255,182,.18);
  border-radius:12px;
  background:rgba(0,0,0,.28);
  overflow:hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,.55);
}

/* scroll/touch inside iframe */
.mMain iframe,
.mAppFrame iframe{
  width:100%;
  height:100%;
  border:0;
  display:block;
  background:transparent;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  pointer-events:auto;
}

.mNav{
  position:relative;
  z-index:4;
  /* no height rígida: que se adapte y no cree huecos raros */
  min-height: var(--nav-h);
  height:auto;

  display:flex;
  align-items:center;
  justify-content:space-around;

  border-top:1px solid var(--line);
  background:rgba(0,0,0,.62);
  backdrop-filter: blur(12px);
  flex-shrink:0;

  /* padding normal + safe area real */
  padding: 8px 10px;
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);

  transform:none;
}

.mNavBtn{
  position:relative;
  width:62px;
  height:54px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(182,255,182,.20);
  background:rgba(0,0,0,.25);
  border-radius:14px;
  cursor:pointer;
  padding:0;
  user-select:none;
  touch-action: manipulation;
}

.mNavBtn:active{ transform: translateY(1px); }

.mNavBtn.isActive{
  border-color: rgba(182,255,182,.45);
  background: rgba(90,255,140,.08);
  box-shadow: 0 0 0 2px rgba(90,255,140,.08) inset;
}

.mNavIcon{
  width:100%;
  height:100%;
  object-fit:contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.55));
  opacity:.96;
}

.mDot{
  position:absolute;
  right:10px;
  top:9px;
  min-width:18px;
  height:18px;
  padding:0 6px;
  display:none;
  align-items:center;
  justify-content:center;
  border-radius:999px;
  border:1px solid rgba(182,255,182,.45);
  background: rgba(0,0,0,.65);
  font-size:11px;
  line-height:18px;
  font-variant-numeric: tabular-nums;
  color: var(--fg);
  font-family: ui-monospace, Menlo, Consolas, Monaco, "Liberation Mono", monospace;
}
.mDot.show{ display:flex; }

/* Mobile: same badge position as desktop (top-right corner) */
.mNavBtn .mDot{
  top:-2px;
  right:-2px;
}

/* mobile scan overlay */
.mShell .scan{
  pointer-events:none;
  position:absolute;
  inset:0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(182,255,182,.03),
    rgba(182,255,182,.03) 1px,
    transparent 1px,
    transparent 3px
  );
  opacity:.35;
  mix-blend-mode: overlay;
  z-index:5;
}