:root{
  --sg:#1d3557;
  --sg2:#274a7a;
  --glass: rgba(29,53,87,.22);
  --border: rgba(255,255,255,.14);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.72);
  --shadow: 0 20px 60px rgba(0,0,0,.35);
}

html,body{
  height:100%;
  margin:0;
  background: transparent;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
}

/* ✅ IMPORTANT for drawer/iframe: NO centering, NO padding */
body{
  height:100%;
  margin:0;
  padding:0;
  background: transparent;
}

/* =========================
   Card (restored premium)
   ========================= */
.sg-globe-card{
  width: 100%;
  height: 100%;
  max-height: 100%;
  border-radius: 18px;
background:
  linear-gradient(
    180deg,
    rgba(29,53,87,0.22),
    rgba(160,170,185,0.22)
  );
backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  display:flex;
  flex-direction:column;
}

.sg-globe-card::before{
  content:"";
  position:absolute;
  inset:-2px;
  background:
    radial-gradient(circle at 25% 10%, rgba(255,255,255,.18), transparent 45%),
    radial-gradient(circle at 80% 0%, rgba(120,190,255,.22), transparent 55%),
    radial-gradient(circle at 50% 120%, rgba(29,53,87,.55), transparent 60%);
  pointer-events:none;
}

/* =========================
   Header
   ========================= */
.sg-header{
  position:relative;
  padding: 12px 14px 8px;

  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);

  border-bottom: 1px solid rgba(255,255,255,0.12);
}


.sg-title{
  display:flex;
  align-items:center;
  gap:10px;
  color: var(--text);
  font-weight: 800;
  letter-spacing:.2px;
  font-size: 16px;
}

.dot{
  width:10px;
  height:10px;
  border-radius:99px;
  background: radial-gradient(circle, rgba(255,255,255,.9), rgba(120,190,255,.5));
  box-shadow: 0 0 18px rgba(120,190,255,.55);
}

.sg-sub{
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

/* =========================
   Body layout (drawer-safe)
   ========================= */
.sg-body{
  position:relative;
  display:grid;
  grid-template-columns: 1fr; /* drawer wants vertical stacking */
  overflow: hidden;   
  gap: 10px;
  padding: 10px 12px 12px;
  flex: 1;
  min-height: 0;
}

/* =========================
   Globe area (smaller)
   ========================= */
.sg-canvas-wrap{
  position: relative;
  width: 100%;
  height: 220px;
  max-height: 32vh;
  border-radius: 14px;
  overflow: hidden;

  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
}


/* Tablet */
@media (max-width: 1024px){
  .sg-canvas-wrap{
    height: 200px;
    max-height: 30vh;
  }
}

/* Mobile */
@media (max-width: 600px){
  .sg-canvas-wrap{
    height: 175px;
    max-height: 26vh;
  }
}

#globeCanvas{
  width:100%;
  height:100%;
  display:block;
}

.sg-hint{
  position:absolute;
  left: 12px;
  bottom: 10px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.10);
  padding: 6px 10px;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}

/* =========================
   Controls (tight + fits)
   ========================= */
.sg-controls{
  border-radius: 16px;
background: rgba(29,53,87,0.55);
backdrop-filter: blur(18px);
-webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.10);
  padding: 12px; /* tighter */
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);

}

.sg-label{
  display:block;
  color:var(--muted);
  font-size:12px;
  margin-bottom:8px;
}

.sg-input-row{
  display:flex;
  gap:10px;
  align-items:center;
}

.sg-input{
  flex: 1;
  height: 44px;
  line-height: 44px;     /* ✅ FIXES ANDROID CUT */
  padding-top: 0;
  padding-bottom: 0;  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  color: var(--text);
  padding: 0 12px;
  outline: none;
}
.sg-input::placeholder {
  color: rgba(255,255,255,0.85);
  opacity: 1; /* Android needs this */
}

.sg-input:focus{
  border-color: rgba(120,190,255,.55);
  box-shadow: 0 0 0 4px rgba(120,190,255,.18);
}

.sg-btn{
  height: 44px;
  line-height: 44px;       /* 🔥 ANDROID FIX */
  display: inline-flex;
  align-items: center;
  justify-content: center;  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(180deg, rgba(120,190,255,.35), rgba(29,53,87,.55));
  color: var(--text);
  font-weight: 700;
  padding: 0 14px;
  cursor:pointer;
}
.sg-btn:hover{filter: brightness(1.06);}
.sg-btn:active{transform: translateY(1px);}

.sg-btn.ghost{
  background: rgba(255,255,255,.06);
}

.sg-suggest{
  margin-top:10px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.28);
  overflow:hidden;
}
.sg-suggest .item{
  padding: 10px 12px;
  cursor: pointer;
  color: rgba(255,255,255,.86);
  font-size: 13px;
  display:flex;
  justify-content: space-between;
}
.sg-suggest .item:hover{background: rgba(255,255,255,.06);}
.sg-suggest .item span{opacity:.75; font-size:12px;}

.sg-feedback{margin-top: 10px;}
.sg-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(255,255,255,.14);
    background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  color: var(--text);
}

.sg-pill.neutral{box-shadow:none;}
.sg-pill.cold{box-shadow: 0 0 18px rgba(80,160,255,.35);}
.sg-pill.warm{box-shadow: 0 0 18px rgba(255,190,70,.35);}
.sg-pill.hot{box-shadow: 0 0 18px rgba(255,90,80,.35);}
.sg-pill.correct{box-shadow: 0 0 22px rgba(90,255,160,.45);}

.sg-status{
  margin-top: 6px;
  color: rgba(255,255,255,.8);
  font-size: 13px;
  line-height: 1.35;
}

/* =========================
   Bottom row (move pills down)
   ========================= */
.sg-bottom{
  margin-top: 12px;
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:center;
}

.sg-stat{
  display:flex;
  gap: 10px;
  align-items:baseline;
}
.sg-stat .k{font-size:12px; color: rgba(255,255,255,.70);}
.sg-stat .v{font-size: 16px; font-weight: 900; color: var(--text);}

.stat{
  display:flex;
  gap: 10px;
  align-items:baseline;
}
.stat .label{font-size:12px; opacity:.7;}
.stat #globalPlayedToday{font-size:16px; font-weight:900;}

/* Keep button aligned */
#newRound{
  margin-left:auto;
}

/* =========================
   Footer (keep but tighter)
   ========================= */
.sg-footer{
  padding: 8px 12px;
  color: rgba(255,255,255,.7);
  font-size: 12px;
  border-top: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.10);
}
