.access-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(circle at 50% 10%, rgba(75, 207, 229, .24), transparent 34%),
    linear-gradient(155deg, #f7fdff 0%, #eefaff 52%, #f8ffe6 100%);
}

.access-gate [hidden] {
  display: none !important;
}

body.access-locked > :not(#accessGate):not(script) {
  visibility: hidden;
}

.access-gate[hidden] { display: none; }

.access-card {
  width: min(460px, 100%);
  padding: 34px 30px;
  border: 1px solid rgba(17, 70, 82, .12);
  border-radius: 32px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 70px rgba(6, 43, 54, .16);
  text-align: center;
}

.access-logo {
  width: 82px;
  height: 82px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 25px;
  background: linear-gradient(145deg, #d9faff, #efffc5);
  font-size: 42px;
}

.access-card h1 {
  margin: 8px 0 10px;
  color: var(--ink);
  font-size: clamp(32px, 8vw, 44px);
  line-height: 1;
  letter-spacing: -.045em;
}

.access-card > p:not(.eyebrow):not(.access-help) {
  margin: 0 auto 22px;
  max-width: 340px;
  color: var(--muted);
  line-height: 1.5;
}

.access-form { display: grid; gap: 11px; }
.access-form label { text-align: left; font-size: 13px; font-weight: 850; }
.access-form input {
  width: 100%;
  min-height: 56px;
  border: 2px solid var(--line);
  border-radius: 17px;
  background: #f8fcfd;
  color: var(--ink);
  padding: 0 16px;
  font: inherit;
  font-size: 17px;
}
.access-form input:focus { outline: 3px solid rgba(57, 190, 220, .24); border-color: #39bedc; }
.access-form .primary-action { width: 100%; min-height: 56px; margin-top: 3px; }
.access-code { text-align: center; letter-spacing: .32em; font-size: 26px !important; font-weight: 900; }
.access-link { border: 0; background: transparent; color: #24798e; font: inherit; font-weight: 850; cursor: pointer; padding: 8px; }
.access-message { margin: 16px 0 0; padding: 13px; border-radius: 15px; background: #fff3dd; color: #5f3c00; font-size: 13px; line-height: 1.45; }
.access-message.ok { background: #eaf9ef; color: #155f32; }
.access-help { margin: 18px 0 0; color: var(--muted); font-size: 12px; }

.sync-pill {
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 11px;
  display: flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  cursor: pointer;
}

.sync-pill strong {
  font-size: 11px;
  white-space: nowrap;
}

.sync-pill.cloud-ok {
  background: #efffc5;
  border-color: #cae873;
  color: #071318;
}

.sync-pill.cloud-error {
  background: #fff7e7;
  border-color: #efcf91;
  color: #3d2b08;
}

.sync-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 10, 14, .72);
  backdrop-filter: blur(10px);
  display: grid;
  place-items: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: .2s;
}

.sync-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.sync-dialog {
  width: min(430px, 100%);
  position: relative;
  background: var(--surface);
  color: var(--ink);
  border-radius: 30px;
  padding: 30px;
  text-align: center;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .32);
}

.sync-dialog h2 {
  font-size: 30px;
  line-height: 1.05;
  margin: 8px 0 10px;
}

.sync-dialog > p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.5;
}

.sync-visual {
  font-size: 58px;
  margin-bottom: 8px;
}

.sync-account {
  margin: 18px 0;
  padding: 14px;
  border-radius: 16px;
  background: #eff8f9;
  color: #16343c;
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.sync-admin-link {
  display: block;
  text-decoration: none;
  margin: 10px 0;
}

.sync-dialog .primary-action {
  margin-top: 10px;
}

@media (max-width: 520px) {
  .access-card { padding: 28px 20px; border-radius: 26px; }
  .sync-pill strong { display: none; }
  .sync-pill { width: 38px; padding: 0; justify-content: center; }
  .sync-dialog { padding: 26px 20px; }
}
