/* ============================================= */
/* БЛОК: СБРОС И БАЗОВЫЕ НАСТРОЙКИ              */
/* ============================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-smooth: always;
  -webkit-text-stroke: 0.01px transparent;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.01);
}

html {
  width: 100%;
  height: 100%;
  padding: var(--tg-safe-area-inset-top, 0px) 
           var(--tg-safe-area-inset-right, 0px) 
           var(--tg-safe-area-inset-bottom, 0px) 
           var(--tg-safe-area-inset-left, 0px);
}

body {
  width: 100%;
  min-height: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: #0b0b0f;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  color: #ffffff;
  display: block;
  overflow: hidden;
}

/* ============================================= */
/* БЛОК: ГЛОБАЛЬНЫЙ КОНТЕЙНЕР #APP             */
/* ============================================= */

#app {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: radial-gradient(circle at 30% 10%, #1a1a2e, #0b0b0f 80%);
  padding: 20px 16px 16px 16px;
  padding-top: calc(12px + var(--tg-content-safe-area-inset-top, 0px));
  padding-bottom: calc(16px + var(--tg-content-safe-area-inset-bottom, 0px));
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* ============================================= */
/* БЛОК: HEADER                                 */
/* ============================================= */

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0;
  margin-bottom: 40px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.logo-image {
  height: 44px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-divider {
  color: rgba(255, 255, 255, 0.3);
  font-size: 24px;
  font-weight: 300;
  line-height: 1;
  display: inline-block;
}

.logo-text {
  color: #ffffff;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.5px;
  display: inline-block;
  line-height: 1.2;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.header-right {
  display: flex;
  align-items: center;
}

.profile-button {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  -webkit-tap-highlight-color: transparent;
}

.profile-icon {
  width: 28px;
  height: 28px;
  color: #f0f0f5;
  stroke: currentColor;
  fill: none;
  display: block;
}

/* ============================================= */
/* БЛОК: ЭКРАН УПРАВЛЕНИЕ (SCREENS)            */
/* ============================================= */

.screen {
  display: none;
}

.screen.active {
  display: block;
}

/* ============================================= */
/* БЛОК: ВСПОМОГАТЕЛЬНЫЕ СТИЛИ                  */
/* ============================================= */

.scroll-container {
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.scroll-container.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.scroll-container.dragging .region-btn,
.scroll-container.dragging .nominal-btn {
  pointer-events: none;
}