/* Аккаунт: окно входа, чип в шапке, «заметка на полях» про облачный сейв. */

/* ---------- модальное окно ---------- */
.ac-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;   /* выше пейволла (1000): вход открывается поверх ворот */
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(8, 6, 4, 0.78);
  backdrop-filter: blur(3px);
  animation: ac-fade 0.22s ease-out;
}
@keyframes ac-fade { from { opacity: 0; } to { opacity: 1; } }

.ac-modal {
  position: relative;
  width: min(30rem, 100%);
  max-height: 90dvh;
  overflow-y: auto;
  background: var(--surface, #1a140e);
  border: 1px solid var(--line, #3a332a);
  border-radius: var(--radius-md, 12px);
  padding: clamp(1.25rem, 3vw, 1.9rem);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}
.ac-close {
  position: absolute;
  top: 0.5rem;
  right: 0.7rem;
  background: none;
  border: 0;
  color: var(--ink-mute, #9a9082);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}
.ac-close:hover { color: var(--ink, #ece5d8); }

.ac-panel { display: flex; flex-direction: column; gap: 0.75rem; }
.ac-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--ink-mute, #9a9082);
}
.ac-title {
  font-family: var(--font-ui, system-ui, sans-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--ink, #ece5d8);
  line-height: 1.2;
}
.ac-lead { font-size: 0.92rem; color: var(--ink-mute, #9a9082); line-height: 1.55; }

/* ---------- OAuth ---------- */
.ac-oauth { display: grid; gap: 0.5rem; margin-top: 0.35rem; }
.ac-oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border-radius: var(--radius-sm, 8px);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: filter 0.15s ease;
}
.ac-oauth-btn:hover { filter: brightness(1.12); }
.ac-oauth-vk { background: #07f; color: #fff; }
.ac-oauth-ya { background: #fc3f1d; color: #fff; }
.ac-sep {
  text-align: center;
  font-size: 0.75rem;
  color: var(--ink-mute, #9a9082);
  letter-spacing: 0.04em;
  position: relative;
  margin: 0.35rem 0 0.1rem;
}
.ac-sep::before,
.ac-sep::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(50% - 3.6rem);
  height: 1px;
  background: var(--line, #3a332a);
}
.ac-sep::before { left: 0; }
.ac-sep::after { right: 0; }

/* ---------- форма ---------- */
.ac-form { display: flex; flex-direction: column; gap: 0.6rem; }
.ac-input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  font-size: 1rem;
  font-family: var(--font-ui, system-ui, sans-serif);
  color: var(--ink, #ece5d8);
  background: var(--bg-deep, #100c08);
  border: 1px solid var(--line, #3a332a);
  border-radius: var(--radius-sm, 8px);
}
.ac-input:focus {
  outline: 2px solid var(--phosphor-dim, #9fb54a);
  outline-offset: 1px;
  border-color: transparent;
}
.ac-btn {
  min-height: 2.75rem;
  padding: 0 1.1rem;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid transparent;
  cursor: pointer;
}
.ac-btn-primary { background: var(--phosphor, #bbd23c); color: #130e0a; }
.ac-btn-primary:hover { background: var(--phosphor-bright, #d3e86a); }
.ac-btn-primary:disabled { opacity: 0.55; cursor: default; }
.ac-btn-ghost {
  background: transparent;
  color: var(--ink, #ece5d8);
  border-color: var(--line, #3a332a);
}
.ac-btn-ghost:hover { border-color: var(--ink-mute, #9a9082); }

.ac-msg { font-size: 0.85rem; color: var(--ink-mute, #9a9082); min-height: 1.2em; }
.ac-err { color: var(--danger-text, #e0705f); }

.ac-legal { font-size: 0.75rem; color: var(--ink-mute, #9a9082); line-height: 1.5; }
.ac-legal a { color: var(--ink-mute, #9a9082); text-decoration-color: var(--line, #3a332a); }
.ac-legal a:hover { color: var(--ink, #ece5d8); }

.ac-toggle,
.ac-linkbtn {
  background: none;
  border: 0;
  padding: 0.25rem 0;
  font: inherit;
  font-size: 0.85rem;
  color: var(--ink-mute, #9a9082);
  text-decoration: underline;
  text-decoration-color: var(--line, #3a332a);
  cursor: pointer;
  align-self: flex-start;
}
.ac-toggle:hover,
.ac-linkbtn:hover { color: var(--ink, #ece5d8); }

/* ---------- «заметка на полях»: приглашение сохранить дело ---------- */
.cloud-nudge {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 700;
  width: min(23rem, calc(100vw - 2.5rem));
  padding: 1rem 1.1rem 1.1rem;
  background: var(--surface, #1a140e);
  border: 1px solid var(--line, #3a332a);
  border-left: 3px solid var(--phosphor-dim, #9fb54a);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.cloud-nudge.is-in { opacity: 1; transform: none; }
.cloud-nudge-kicker {
  font-family: var(--font-mono, monospace);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  color: var(--ink-mute, #9a9082);
  margin-bottom: 0.45rem;
}
.cloud-nudge-text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink, #ece5d8);
  margin-bottom: 0.85rem;
}
.cloud-nudge-row { display: flex; align-items: center; gap: 0.9rem; }

/* ---------- тост синхронизации ---------- */
.cloud-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  z-index: 800;
  transform: translate(-50%, 12px);
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.65rem 1rem;
  background: var(--surface, #1a140e);
  border: 1px solid var(--line, #3a332a);
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--ink, #ece5d8);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cloud-toast.is-in { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 30rem) {
  .cloud-nudge { right: 0.6rem; left: 0.6rem; bottom: 0.6rem; width: auto; }
}
