html.phone {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}
html.phone body { overflow-x: hidden; }

html.phone .top {
  padding: calc(10px + var(--safe-top)) 12px 0 calc(12px + var(--safe-left));
  padding-right: calc(12px + var(--safe-right));
  font-size: 13px;
}
html.phone .top-left { display: none; }
html.phone .top a { margin: 0 6px; }
html.phone .signin {
  padding: 8px 14px;
  margin-left: 4px;
  border-radius: 16px;
}
html.phone .apps-btn { width: 40px; height: 40px; margin-left: 2px; }
html.phone .home-apps { gap: 16px 8px; margin-top: 28px; max-width: 100%; }
html.phone .pin-card { padding: 24px 18px 16px; }

html.phone .center {
  min-height: calc(100% - 148px);
  padding: 9vh 16px 24px;
}
html.phone .logo {
  font-size: clamp(34px, 11vw, 48px);
  letter-spacing: -1.4px;
  margin: 0 0 22px;
  text-align: center;
  max-width: 100%;
  line-height: 1.05;
}
html.phone .search { width: 100%; max-width: 100%; }
html.phone .box { height: 48px; padding: 0 12px; }
html.phone .actions {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
}
html.phone .actions button {
  margin: 0;
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
}
html.phone .foot {
  font-size: 13px;
  padding-bottom: var(--safe-bottom);
}
html.phone .foot > div { padding: 12px 16px; }
html.phone .foot .row { gap: 16px; flex-wrap: wrap; }

html.phone body.auth {
  align-items: stretch;
  padding: calc(20px + var(--safe-top)) 16px calc(20px + var(--safe-bottom));
}
html.phone .card {
  width: 100%;
  padding: 28px 20px 24px;
  border-radius: 12px;
}

html.phone .g-top {
  height: auto;
  min-height: 56px;
  padding: calc(8px + var(--safe-top)) 10px 8px;
  gap: 6px;
  flex-wrap: wrap;
}
html.phone .nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  border-radius: 20px;
  color: #3c4043;
  cursor: pointer;
  padding: 0;
}
html.phone .nav-toggle:hover { background: #f1f3f4; }
html.phone .g-brand { font-size: 18px; }
html.phone .g-sep { display: none; }
html.phone .g-search {
  order: 5;
  flex: 1 1 100%;
  max-width: none;
  margin: 0;
  height: 40px;
}
html.phone .g-top .ghost { padding: 8px 10px; font-size: 13px; }
html.phone .g-body { display: block; min-height: calc(100vh - 96px); }
html.phone .g-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 30;
  width: min(280px, 86vw);
  padding: calc(64px + var(--safe-top)) 8px 24px;
  background: #fff;
  box-shadow: 8px 0 24px rgba(32, 33, 36, 0.18);
  overflow: auto;
}
html.phone body.nav-open .g-nav { display: block; }
html.phone .g-nav nav { display: flex; flex-direction: column; gap: 4px; }
html.phone .g-nav a,
html.phone .g-nav .nav-action {
  width: 100%;
  border-radius: 0 20px 20px 0;
  height: 44px;
}
html.phone .nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 25;
  background: rgba(32, 33, 36, 0.4);
}
html.phone body.nav-open .nav-backdrop { display: block; }
html.phone .admin-shell { padding: 14px 14px calc(28px + var(--safe-bottom)); }
html.phone .g-title h1 { font-size: 22px; }
html.phone .cards,
html.phone .download-grid,
html.phone .dash-grid,
html.phone .media-layout,
html.phone .four-grid,
html.phone .split-grid { grid-template-columns: 1fr; }
html.phone .jump-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html.phone .jump { min-height: 120px; padding: 16px 10px 14px; }
html.phone .jump strong { font-size: 16px; }
html.phone .download-grid > section { border-right: 0; border-bottom: 1px solid #eee; }
html.phone .download-grid > section:last-child { border-bottom: 0; }
html.phone .panel-head,
html.phone .admin-bar,
html.phone .who { flex-direction: column; align-items: flex-start; }
html.phone .filters { justify-content: flex-start; }
html.phone .table-wrap { max-height: none; }
html.phone .apps { table-layout: auto; }
html.phone .vm-stage { width: 100%; height: calc(100vh - 24px); }
html.phone .console { min-height: 280px; }

html.desktop .nav-toggle,
html.desktop .nav-backdrop { display: none; }
