* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  height: 100%;
  width: 100%;
  overflow: hidden;
  color: var(--tg-text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  background: var(--tg-bg-color);
  overscroll-behavior: none;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (max-width: 920px) {
  html.chat-open,
  html.chat-open body {
    overflow: hidden;
  }
}

.hidden { display: none !important; }
input, textarea, select, button { font: inherit; color: inherit; }

input, textarea, select {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #243447;
  color: var(--tg-text-color);
  padding: 10px 14px;
  transition: background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

textarea {
  resize: none;
  border-radius: 18px;
}

input::placeholder,
textarea::placeholder {
  color: var(--tg-hint-color);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: rgba(100, 168, 232, 0.42);
  box-shadow: 0 0 0 1px rgba(100, 168, 232, 0.32);
}

button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--tg-button-color);
  color: var(--tg-button-text-color);
  cursor: pointer;
  transition: filter 160ms ease, transform 120ms ease, background 160ms ease;
  box-shadow: none;
}

button:hover { filter: brightness(1.04); }
button:active { transform: translateY(1px); }

