:root {
  --nav-height: calc(64px + env(safe-area-inset-bottom, 12px));
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Thai", sans-serif;
  touch-action: none;
}

.glass-panel {
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(71, 85, 105, 0.55);
}

#bottom-nav {
  height: var(--nav-height);
  padding-bottom: max(12px, env(safe-area-inset-bottom, 12px));
}

#drawer {
  bottom: calc(var(--nav-height) + 8px);
  max-height: 48vh;
}

#drawer.collapsed {
  max-height: 44px;
}

#drawer.collapsed #drawer-subtabs,
#drawer.collapsed #drawer-body {
  display: none !important;
}

.cam-btn {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(71, 85, 105, 0.6);
  color: #f8fafc;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.cam-btn:active {
  transform: scale(0.94);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px 4px;
  border-radius: 12px;
  color: #94a3b8;
  transition: all 0.15s ease;
}

.nav-btn.active {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #6ee7b7;
}

.subtab-btn {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(30, 41, 59, 0.85);
  color: #cbd5e1;
  border: 1px solid transparent;
  white-space: nowrap;
}

.subtab-btn.active {
  background: rgba(79, 70, 229, 0.35);
  color: #e0e7ff;
  border-color: rgba(129, 140, 248, 0.65);
}

.grid-3x3-cell {
  padding: 7px 4px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-scroll::-webkit-scrollbar {
  width: 4px;
}

.custom-scroll::-webkit-scrollbar-thumb {
  background: rgba(100, 116, 139, 0.5);
  border-radius: 99px;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
