:root {
  color: var(--tg-theme-text-color, #17212b);
  background: var(--tg-theme-bg-color, #ffffff);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 280px;
  background: var(--tg-theme-bg-color, #ffffff);
}

.page {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: calc(24px + env(safe-area-inset-top))
    calc(18px + env(safe-area-inset-right))
    calc(32px + env(safe-area-inset-bottom))
    calc(18px + env(safe-area-inset-left));
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--tg-theme-hint-color, #708499);
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 7vw, 38px);
  line-height: 1.1;
}

h2 {
  margin-bottom: 12px;
  font-size: 18px;
}

.description,
.empty {
  color: var(--tg-theme-hint-color, #708499);
}

.actions {
  display: grid;
  gap: 10px;
  margin: 28px 0 12px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  padding: 12px 18px;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.primary {
  color: var(--tg-theme-button-text-color, #ffffff);
  background: var(--tg-theme-button-color, #2481cc);
}

.secondary {
  color: var(--tg-theme-text-color, #17212b);
  background: var(--tg-theme-secondary-bg-color, #f1f3f5);
}

.link-button {
  min-height: 36px;
  padding: 6px;
  color: var(--tg-theme-link-color, #2481cc);
  background: transparent;
}

.status {
  min-height: 24px;
  margin: 12px 0 26px;
  color: var(--tg-theme-hint-color, #708499);
}

.status.error {
  color: var(--tg-theme-destructive-text-color, #d14b4b);
}

.channel-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.channel {
  padding: 15px 16px;
  overflow-wrap: anywhere;
  border-radius: 14px;
  background: var(--tg-theme-secondary-bg-color, #f1f3f5);
}

.channel-name {
  display: block;
  font-weight: 650;
}

.channel-username {
  display: block;
  margin-top: 4px;
  color: var(--tg-theme-hint-color, #708499);
  font-size: 14px;
}

[hidden] {
  display: none !important;
}
