:root[data-entitlement-state="blocked"] :is(.app-shell, .mobile-gate),
:root[data-entitlement-state="install"] :is(.app-shell, .mobile-gate) { visibility: hidden; }

.entitlement-gate {
  position: fixed;
  z-index: 210;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(20px, 5vw, 56px);
  background: var(--canvas-bg);
  color: var(--ui-value-primary);
}

.entitlement-gate__card {
  width: min(480px, 100%);
  padding: clamp(28px, 5vw, 46px);
  border: 1px solid var(--ui-border);
  border-radius: 16px;
  background: var(--ui-surface-floating);
  text-align: center;
}

.entitlement-gate__brand {
  display: flex;
  gap: var(--space-5);
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-10);
  font-size: var(--ui-font-size-body-sm);
  font-weight: var(--ui-font-weight-strong);
}

.entitlement-gate__brand img { width: 24px; height: 24px; }
.entitlement-gate h1 {
  margin: 0;
  font-size: var(--ui-font-size-dialog-title);
  line-height: var(--ui-line-height-compact);
}
.entitlement-gate p {
  margin: var(--space-7) 0 0;
  color: var(--ui-text-body-secondary);
  font-size: var(--ui-font-size-body-sm);
  line-height: var(--ui-line-height-prose);
}

.entitlement-gate__form {
  display: grid;
  gap: var(--space-5);
  margin-top: var(--space-9);
  text-align: start;
}

.entitlement-gate__form label {
  color: var(--ui-text-body-secondary);
  font-size: var(--ui-font-size-label);
  font-weight: var(--ui-font-weight-strong);
}

.entitlement-gate__form input {
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: var(--ui-surface-field);
  color: var(--ui-value-primary);
  font: inherit;
}

.entitlement-gate__form input:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

.entitlement-gate__form button {
  justify-self: stretch;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: var(--ui-accent);
  color: var(--ui-text-on-accent, #fff);
  font: inherit;
  font-weight: var(--ui-font-weight-strong);
  cursor: pointer;
}

.entitlement-gate__form button:disabled { cursor: wait; opacity: 0.65; }
.entitlement-gate .entitlement-gate__error {
  margin: 0;
  color: var(--ui-danger);
}

.entitlement-gate .entitlement-gate__help {
  margin-top: var(--space-9);
  font-size: var(--ui-font-size-label);
}

.entitlement-gate__help a { color: inherit; }

.entitlement-install__actions { margin-top: var(--space-10); }
.entitlement-gate .entitlement-install__actions + .entitlement-gate__error {
  margin-top: var(--space-7);
}

:root[data-ui-theme="001"][data-ui-scheme="dark"] .entitlement-gate__brand img,
:root[data-ui-theme="default"][data-ui-scheme="dark"] .entitlement-gate__brand img { filter: invert(1); }
