/* Cute 门禁：偏心票根，不改变 license-pending / license-required 的显隐契约。 */
html.license-pending #boot-skeleton,
html.license-pending #view-auth,
html.license-pending #view-console,
html.license-required #boot-skeleton,
html.license-required #view-auth,
html.license-required #view-console { display: none !important; }
body.license-gate-open { overflow: hidden; }

.license-gate {
  position: fixed;
  inset: 0;
  z-index: 20;
  min-height: 100dvh;
  padding: max(28px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  overflow-y: auto;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 24px;
}
.license-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--paper);
  font-size: 24px;
  font-weight: 850;
  letter-spacing: -.02em;
}
.license-brand img { width: 52px; height: 52px; padding: 4px; object-fit: contain; border: 2px solid var(--coral); border-radius: 15px; background: var(--butter); transform: rotate(-6deg); }
.license-brand small { color: var(--coral); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.license-card {
  position: relative;
  width: min(1020px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(290px, .82fr);
  overflow: visible;
  border: 2px solid var(--butter);
  border-radius: 26px;
  background: rgba(32,27,57,.94);
  box-shadow: 12px 14px 0 rgba(93,34,96,.68);
}
.license-card::before, .license-card::after {
  content: "";
  position: absolute;
  z-index: 3;
  left: calc(59% - 13px);
  width: 24px;
  height: 24px;
  border: 2px solid var(--butter);
  border-radius: 50%;
  background: var(--navy);
}
.license-card::before { top: -14px; }
.license-card::after { bottom: -14px; }
.license-content { position: relative; min-width: 0; padding: 42px 44px 36px; }
.license-content::after {
  content: "ADMIT ONE";
  position: absolute;
  right: 24px;
  top: 22px;
  color: rgba(242,151,155,.30);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .20em;
  transform: rotate(5deg);
}
.license-kicker { margin-bottom: 12px; color: var(--butter); }
.license-content h1 { max-width: 540px; margin: 0; color: var(--paper); font-size: clamp(32px, 4.2vw, 48px); line-height: 1.18; letter-spacing: -.04em; }
.license-intro { max-width: 520px; margin: 18px 0 26px; color: #e6d6e3; font-size: 15px; line-height: 1.8; }
.license-form { display: grid; gap: 12px; }
.license-label { color: #f0e2ec; font-size: 14px; font-weight: 750; }
.license-input { width: 100%; min-height: 54px; margin: 0; padding: 12px 15px; font-size: 16px; letter-spacing: .055em; text-transform: uppercase; }
.license-hint { margin: -3px 0 3px; color: #d8c6d9; font-size: 12px; line-height: 1.65; }
.license-submit, .license-retry { width: 100%; min-height: 50px; margin: 0; cursor: pointer; }
.license-submit { justify-content: space-between; padding-inline: 20px; }
.license-retry { margin-top: 4px; }
.license-message { min-height: 22px; margin: 0; color: #e6d6e3; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }
.license-message.is-error { color: #ffb6ba; }
.license-message.is-success { color: var(--ok); }
.license-message.is-info { color: var(--butter); }
.license-art {
  position: relative;
  min-width: 0;
  padding: 34px 25px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-left: 2px dashed rgba(255,237,155,.52);
  border-radius: 0 24px 24px 0;
  background: rgba(93,34,96,.64);
  text-align: center;
}
.ticket-stub {
  position: absolute;
  top: 25px;
  right: 22px;
  padding: 7px 10px;
  border: 2px solid var(--navy);
  border-radius: 7px;
  color: var(--navy);
  background: var(--coral);
  box-shadow: 4px 4px 0 var(--butter);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .08em;
  transform: rotate(6deg);
}
.license-art img:not(.license-spark) { position: relative; z-index: 1; width: min(265px, 88%); max-height: 310px; object-fit: contain; filter: drop-shadow(9px 10px 0 rgba(22,27,50,.38)); transform: rotate(-3deg); }
.license-art p { position: relative; z-index: 1; margin: 16px 0 0; color: #f0e2ec; font-size: 12px; line-height: 1.65; }
.license-spark { position: absolute; z-index: 4; left: -28px; bottom: 42px; width: 64px; transform: rotate(-12deg); }

@media (max-width: 760px) {
  .license-gate { align-content: start; gap: 18px; }
  .license-card { width: min(540px, 100%); grid-template-columns: minmax(0,1fr); overflow: hidden; }
  .license-card::before, .license-card::after { display: none; }
  .license-art { grid-row: 1; min-height: 150px; padding: 16px 20px 0; border-left: 0; border-bottom: 2px dashed rgba(255,237,155,.45); border-radius: 24px 24px 0 0; }
  .license-art img:not(.license-spark) { width: 135px; max-height: 155px; }
  .license-art p { display: none; }
  .ticket-stub { top: 18px; right: 18px; }
  .license-spark { left: auto; right: 28px; bottom: 18px; width: 42px; }
  .license-content { grid-row: 2; padding: 28px 25px 25px; }
  .license-content::after { display: none; }
  .license-content h1 { font-size: 32px; }
  .license-intro { margin: 14px 0 20px; font-size: 14px; }
}
@media (max-width: 390px) {
  .license-gate { padding-inline: 12px; }
  .license-brand { font-size: 21px; }
  .license-content { padding: 24px 18px 20px; }
  .license-content h1 { font-size: 29px; }
  .ticket-stub { font-size: 8px; }
}
.license-heart {
  position: absolute;
  z-index: 2;
  top: 116px;
  right: 9px;
  width: 60px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(4px 5px 0 rgba(22,27,50,.28));
  transform: rotate(8deg);
}
@media (max-width: 760px) {
  .license-heart { top: 54px; right: 88px; width: 48px; }
}
@media (max-width: 390px) {
  .license-heart { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .license-gate *, .license-gate *::before, .license-gate *::after { animation: none !important; transition: none !important; }
}
