/* ---------- Auth dialog (Emisgame login / start) ---------- */
.em-auth { width: min(1040px, calc(100% - 24px)); border-radius: 40px; background: var(--em-cream); }
.em-auth__inner { position: relative; padding: clamp(24px, 7.7vw, 80px); display: grid; gap: 0; }
.em-auth__close { position: absolute; top: clamp(12px, 3vw, 40px); right: clamp(12px, 3vw, 40px); }
.em-auth__logo { width: min(180px, 60%); margin-inline: auto; aspect-ratio: 343 / 132; height: auto; object-fit: contain; }
.em-auth h2 { margin-top: 12px; text-align: left; font-size: clamp(2rem, 1.4rem + 2.2vw, 4rem); font-weight: 700; letter-spacing: -0.04em; color: var(--em-violet-strong); }
.em-auth__invite { text-align: left; font-size: clamp(1rem, .9rem + .5vw, 1.5rem); color: var(--em-muted); margin-top: 12px; }
.em-auth form { display: grid; gap: 28px; margin-top: clamp(24px, 3vw, 40px); }
.em-field { display: grid; gap: 12px; }
.em-field label, .em-field__label { font-size: clamp(1rem, .9rem + .3vw, 1.25rem); font-weight: 600; color: var(--em-violet-strong); }
.em-input-wrap { position: relative; display: flex; align-items: center; }
.em-input-wrap .em-input-ico { position: absolute; left: clamp(16px, 2vw, 28px); width: 24px; height: 24px; pointer-events: none; object-fit: contain; }
.em-input, .em-select, .em-textarea {
  width: 100%; min-height: clamp(56px, 6vw, 80px); padding: 0 clamp(16px, 2vw, 28px); border-radius: 24px;
  border: 2px solid #eadcf8; background: #fffcf8; color: var(--em-ink); font-size: clamp(1rem, .9rem + .4vw, 1.5rem);
  transition: border-color .2s, box-shadow .2s;
}
.em-input-wrap .em-input { padding-left: clamp(48px, 5.5vw, 68px); }
.em-input-wrap .em-input--eye { padding-right: 64px; }
.em-textarea { min-height: 160px; padding-block: 18px; resize: vertical; }
.em-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--em-violet) 50%), linear-gradient(135deg, var(--em-violet) 50%, transparent 50%); background-position: calc(100% - 28px) 50%, calc(100% - 21px) 50%; background-size: 7px 7px; background-repeat: no-repeat; padding-right: 52px; }
.em-input:focus, .em-select:focus, .em-textarea:focus { outline: none; border-color: var(--em-violet); box-shadow: 0 0 0 4px rgba(101,68,184,.15); }
.em-input[aria-invalid="true"], .em-select[aria-invalid="true"], .em-textarea[aria-invalid="true"] { border-color: var(--em-red); }
.em-eye { position: absolute; right: 12px; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; border-radius: 12px; display: grid; place-items: center; }
.em-eye[aria-pressed="true"] img { opacity: .45; }
.em-linklike--u { text-decoration: underline; text-underline-offset: 4px; }
.em-eye:hover { background: var(--em-lilac); }
.em-error { color: #c8002a; font-size: .95rem; font-weight: 500; min-height: 1em; }
.em-error:empty { display: none; }
.em-check { display: flex; gap: 16px; align-items: flex-start; font-size: clamp(1rem, .9rem + .4vw, 1.5rem); color: var(--em-muted); line-height: 1.3; }
.em-check input { width: 32px; height: 32px; flex: 0 0 auto; accent-color: var(--em-violet); margin: 0; }
.em-check a { color: var(--em-violet); font-weight: 600; }
.em-auth__row { display: flex; justify-content: flex-end; margin-top: -8px; }
.em-linklike { background: none; border: 0; padding: 0; color: var(--em-violet-strong); font-weight: 600; font-size: clamp(1rem, .9rem + .4vw, 1.5rem); cursor: pointer; text-decoration: none; }
.em-linklike:hover { text-decoration: underline; }
.em-auth__submit { min-height: clamp(60px, 7vw, 88px); width: 100%; font-size: clamp(1.2rem, 1rem + .9vw, 2rem); }
.em-auth__switch { text-align: center; font-size: clamp(1rem, .9rem + .4vw, 1.5rem); }
.em-auth__demo { font-size: .92rem; text-align: center; color: var(--em-muted); }
.em-form-status { padding: 14px 18px; border-radius: 16px; font-weight: 600; }
.em-form-status:empty { display: none; }
.em-form-status--ok { background: #dff6ee; color: #1e7b59; }
.em-form-status--bad { background: #ffe3e8; color: #b10026; }


.em-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 400; padding: 14px 22px; border-radius: 99px; background: var(--em-violet-deep); color: #fff; font-weight: 600; box-shadow: var(--em-shadow-lift); transition: transform .35s var(--em-ease); max-width: calc(100% - 24px); text-align: center; }
.em-toast.is-on { transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .em-console { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-console .em-spin, .em-console .em-readout:nth-child(2) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .em-auth { border-radius: 28px; }
}
[data-contact-form] .em-error:empty { display: block; }
[data-contact-form] .em-error { min-height: 1.3em; margin-top: -4px; }
.em-input-wrap .em-input-ico { font-size: 18px; line-height: 24px; text-align: center; color: var(--em-violet); }
