.access-gate-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(8px, 3vw, 24px);
  overflow-y: auto;
  background:
    radial-gradient(circle at 15% 8%, rgba(15, 118, 110, 0.18), transparent 28%),
    radial-gradient(circle at 85% 92%, rgba(34, 197, 94, 0.10), transparent 26%),
    linear-gradient(145deg, #edf7f4 0%, #f8fbfa 48%, #e7f0ed 100%);
}

.access-gate-card {
  width: min(100%, 760px);
  max-height: calc(100dvh - 16px);
  padding: clamp(18px, 4vw, 34px);
  overflow-y: auto;
  border: 1px solid rgba(15, 118, 110, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(20, 48, 43, 0.16);
}

.access-gate-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.access-gate-header h1,
.access-gate-center h1 {
  margin: 2px 0 0;
  color: #173832;
  font-size: clamp(23px, 5vw, 34px);
  line-height: 1.2;
}

.access-gate-logo {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #0f766e, #0b5d57);
  color: #fff;
  font-size: 24px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(15, 118, 110, 0.24);
}

.access-gate-eyebrow {
  margin: 0;
  color: #0f766e;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.access-gate-danger,
.access-gate-status.error {
  color: #b42318;
}

.access-gate-notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  border-left: 4px solid #0f766e;
  border-radius: 8px 12px 12px 8px;
  background: #f1f8f6;
}

.access-gate-notice strong {
  color: #0b5d57;
}

.access-gate-notice p,
.access-gate-center > p:not(.access-gate-eyebrow) {
  margin: 6px 0 0;
  color: #60716e;
  line-height: 1.7;
}

.access-gate-progress {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: #294a44;
  font-size: 14px;
  font-weight: 900;
}

.access-gate-progress em {
  color: #7b8b88;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.access-gate-question h2 {
  margin: 0 0 16px;
  color: #172f2b;
  font-size: clamp(20px, 4vw, 27px);
  line-height: 1.4;
}

.access-gate-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.access-gate-option {
  min-height: 52px;
  padding: 10px 13px;
  border: 1px solid #cfe0dc;
  border-radius: 11px;
  background: linear-gradient(180deg, #fff, #f5faf8);
  color: #23423c;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.access-gate-option:hover,
.access-gate-option.selected {
  border-color: #0f766e;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.12);
}

.access-gate-selected {
  min-height: 48px;
  margin: 12px 0;
  display: grid;
  place-items: center;
  border: 1px solid #b7d7d1;
  border-radius: 12px;
  background: #f4fbf9;
  color: #0b5d57;
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 900;
  letter-spacing: 0.12em;
}

.access-gate-selected.empty {
  color: #71807d;
  font-size: 17px;
  letter-spacing: 0;
}

.access-gate-name-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
}

.access-gate-name-char {
  position: relative;
  min-height: 46px;
  border: 1px solid #d7e5e1;
  border-radius: 9px;
  background: linear-gradient(180deg, #fff, #f0f7f5);
  color: #18312d;
  font-size: 21px;
  font-weight: 900;
  cursor: pointer;
}

.access-gate-name-char.selected {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.access-gate-name-char.selected::after {
  content: attr(data-order);
  position: absolute;
  top: 3px;
  right: 3px;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #0f766e;
  font-size: 10px;
}

.access-gate-status {
  min-height: 20px;
  margin: 11px 0;
  color: #71807d;
  font-size: 13px;
  font-weight: 700;
}

.access-gate-actions {
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(190px, 1.3fr);
  gap: 9px;
}

.access-gate-actions button,
.access-gate-wide-button {
  min-height: 48px;
}

.access-gate-center {
  padding: clamp(12px, 4vw, 34px) 0;
  text-align: center;
}

.access-gate-denied-icon,
.access-gate-success-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #feeceb;
  color: #b42318;
  font-size: 38px;
  font-weight: 900;
}

.access-gate-warning-icon {
  background: #fff5df;
  color: #a16207;
  font-size: 29px;
}

.access-gate-success-icon {
  background: #e8f8ee;
  color: #15803d;
}

.access-gate-location,
.access-gate-device {
  margin: 20px 0 0;
  padding: 12px 15px;
  border: 1px solid #e0e8e6;
  border-radius: 11px;
  background: #f8fbfa;
  color: #60716e;
}

.access-gate-device {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}

.access-gate-device strong {
  color: #263f3a;
}

.access-gate-wide-button {
  width: 100%;
  margin-top: 18px;
}

.access-gate-spinner {
  width: 50px;
  height: 50px;
  margin: 0 auto 18px;
  border: 5px solid #dcece8;
  border-top-color: #0f766e;
  border-radius: 50%;
  animation: access-gate-spin 0.8s linear infinite;
}

@keyframes access-gate-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 560px) {
  .access-gate-screen {
    place-items: start center;
    padding: 6px;
  }

  .access-gate-card {
    max-height: calc(100dvh - 12px);
    padding: 16px 13px;
    border-radius: 14px;
  }

  .access-gate-header {
    align-items: flex-start;
    margin-bottom: 13px;
  }

  .access-gate-logo {
    width: 43px;
    height: 43px;
    border-radius: 11px;
    font-size: 20px;
  }

  .access-gate-header h1,
  .access-gate-center h1 {
    font-size: 22px;
  }

  .access-gate-notice {
    margin-bottom: 13px;
    padding: 10px 12px;
    font-size: 13px;
  }

  .access-gate-progress em {
    display: none;
  }

  .access-gate-question h2 {
    margin-bottom: 11px;
    font-size: 19px;
  }

  .access-gate-options {
    gap: 6px;
  }

  .access-gate-option {
    min-height: 42px;
    padding: 7px 6px;
    font-size: 14px;
  }

  .access-gate-name-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 5px;
  }

  .access-gate-name-char {
    min-height: 40px;
    font-size: 18px;
  }

  .access-gate-actions {
    grid-template-columns: 0.8fr 1.2fr;
    gap: 7px;
  }

  .access-gate-actions button {
    min-height: 42px;
    padding: 7px;
    font-size: 14px;
  }
}
