/* ============================================================
   Журнал — модалка подключения телеграм-бота (TgConnect)
   Тач-цели не мельче 44px, иконки — SVG.
   ============================================================ */
.tgc-overlay {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.4rem;
  background: oklch(0.235 0.012 60 / 0.42);
  backdrop-filter: blur(3px);
  animation: tgc-fade 0.18s var(--ease);
  overflow-y: auto;
}
@keyframes tgc-fade { from { opacity: 0; } to { opacity: 1; } }

.tgc-card {
  position: relative;
  width: 100%; max-width: 28rem;
  background: var(--paper-raise);
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: 0 24px 60px oklch(0.235 0.012 60 / 0.22);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  animation: tgc-rise 0.22s var(--ease);
  margin: auto;
}
@keyframes tgc-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tgc-close {
  position: absolute; top: 0.5rem; right: 0.5rem;
  width: 2.75rem; height: 2.75rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer;
  color: var(--ink-faint); transition: color 0.2s var(--ease);
}
.tgc-close:hover { color: var(--ink); }
.tgc-close svg { width: 1.1rem; height: 1.1rem; }

.tgc-kick {
  font-family: var(--mono); font-size: var(--t-micro);
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 0.4rem;
}
.tgc-title { margin: 0 0 0.4rem; font-size: 1.35rem; line-height: 1.2; }
.tgc-dek { margin: 0 0 1.3rem; color: var(--ink-faint); font-size: 0.9rem; line-height: 1.5; }

.tgc-step { display: flex; gap: 0.8rem; margin-bottom: 1.2rem; }
.tgc-num {
  flex: none; width: 1.6rem; height: 1.6rem; margin-top: 0.15rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-family: var(--mono); font-size: 0.78rem; color: var(--ink-faint);
}
.tgc-body { flex: 1 1 auto; min-width: 0; }
.tgc-hint { margin: 0.6rem 0 0.5rem; font-size: 0.84rem; color: var(--ink-faint); line-height: 1.45; }

.tgc-bf {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; min-height: 2.9rem; padding: 0 1rem;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper); color: var(--ink);
  font: inherit; font-size: 0.92rem; cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.tgc-bf:hover { border-color: var(--accent); color: var(--accent); }
.tgc-bf svg { width: 1.15rem; height: 1.15rem; flex: none; }

.tgc-row {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.3rem 0;
}
.tgc-lab {
  flex: none; width: 3.4rem;
  font-size: 0.76rem; color: var(--ink-faint);
}
.tgc-val {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 0.84rem;
  background: var(--chip, oklch(0.5 0 0 / 0.08));
  padding: 0.35rem 0.55rem; border-radius: 3px;
  overflow-wrap: anywhere;
}
.tgc-copy {
  flex: none;
  width: 2.75rem; height: 2.75rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: none; cursor: pointer;
  color: var(--ink-faint); transition: color 0.2s var(--ease);
}
.tgc-copy:hover { color: var(--accent); }
.tgc-copy.is-done { color: #3f9e5a; }
.tgc-copy svg { width: 1.15rem; height: 1.15rem; }

.tgc-field {
  width: 100%; box-sizing: border-box;
  font: inherit; font-family: var(--mono); font-size: 0.82rem; line-height: 1.45;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--paper); color: var(--ink);
  resize: vertical;
}
.tgc-field:focus { outline: none; border-color: var(--accent); }
.tgc-field.is-caught { border-color: #3f9e5a; }

.tgc-err { min-height: 1.1rem; margin: 0.4rem 0; font-size: 0.82rem; color: #c0492f; line-height: 1.4; }

.tgc-submit {
  width: 100%; min-height: 2.9rem;
  border: 1px solid var(--ink); border-radius: 3px;
  background: var(--ink); color: var(--paper);
  font: inherit; font-size: 0.95rem; cursor: pointer;
  transition: opacity 0.2s var(--ease);
}
.tgc-submit:disabled { opacity: 0.35; cursor: default; }

.tgc-foot { margin: 0; font-size: 0.78rem; color: var(--ink-faint); line-height: 1.45; }

@media (max-width: 30rem) {
  .tgc-overlay { padding: 0.8rem; align-items: flex-start; }
  .tgc-card { padding: 1.3rem 1.1rem 1.5rem; }
  .tgc-lab { width: 2.9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tgc-overlay, .tgc-card { animation: none; }
}
