body.abim-access-locked { overflow: hidden; }
body.abim-access-locked #abimApp { visibility: hidden; pointer-events: none; }
.license-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(20px, env(safe-area-inset-top)) 20px;
  overflow-y: auto;
  background: rgba(10, 15, 29, 0.95);
  backdrop-filter: blur(8px);
}
.license-backdrop[hidden] { display: none; }
.license-card {
  width: min(100%, 480px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  padding: clamp(24px, 5vw, 36px);
  border: 1px solid rgba(45, 212, 191, 0.45);
  border-radius: 24px;
  background: #101b2c;
  color: #f3f6fc;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.5);
  font-family: system-ui, sans-serif;
}
.license-card h1 { margin-bottom: 16px; font-size: 1.65rem; line-height: 1.2; }
.license-card p { margin-bottom: 24px; color: #b6c4d8; line-height: 1.6; }
.license-card label { display: block; margin-bottom: 8px; font-weight: 700; }
.license-card input {
  width: 100%;
  padding: 14px 12px;
  border: 1px solid #52657d;
  border-radius: 10px;
  background: #080f1c;
  color: #fff;
  font: 0.85rem ui-monospace, SFMono-Regular, Consolas, monospace;
  text-transform: uppercase;
}
.license-card input::placeholder { color: #899bb4; font-size: 0.7rem; }
.license-card input:focus-visible, .license-card button:focus-visible,
/* Readable links on the dark gate (browser default blue fails contrast). */
.license-card a { color: #5eead4; text-decoration: underline; text-underline-offset: 3px; }
.license-card a:hover { color: #99f6e4; }
body[data-theme="CLASSIC"] .license-card a { color: #0b56c5; }
body[data-theme="CLASSIC"] .license-card a:hover { color: #083f91; }
.license-card a:focus-visible { outline: 3px solid #2dd4bf; outline-offset: 4px; }
.license-card button, .license-card .gumroad-button {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: 0;
  border-radius: 10px;
  font: 800 0.95rem system-ui, sans-serif;
  text-align: center;
  cursor: pointer;
}
.license-card button { background: #2dd4bf; color: #08221f; }
.license-card button:disabled { opacity: 0.6; cursor: wait; }
.license-card .gumroad-button {
  background: #25334a;
  color: #f3f6fc;
  text-decoration: none;
}
.license-error { margin-top: 12px; color: #ffb4bf; line-height: 1.5; overflow-wrap: anywhere; }
.license-card .license-note { margin: 20px 0 0; font-size: 0.78rem; }
.license-card .license-home { display: inline-block; margin-top: 20px; color: #b6c4d8; }
.disclaimer-backdrop { z-index: 19900; }
.disclaimer-card { width: min(100%, 640px); background: rgba(16, 27, 44, 0.94); backdrop-filter: blur(24px); }
.disclaimer-card h1 { color: #f8fafc; font-weight: 800; }
.disclaimer-card p { color: #cbd5e1; }
.adult-confirmation { display: flex; gap: 12px; align-items: flex-start; margin: 18px 0 10px; padding: 14px; border: 1px solid rgba(148, 163, 184, .35); border-radius: 12px; background: rgba(2, 6, 23, .35); }
.adult-confirmation input { flex: 0 0 20px; width: 20px; height: 20px; margin: 3px 0 0; accent-color: #2dd4bf; cursor: pointer; }
.adult-confirmation label { color: #e2e8f0; font-size: .88rem; line-height: 1.5; cursor: pointer; }
.adult-confirmation:focus-within { outline: 3px solid #2dd4bf; outline-offset: 2px; }
.disclaimer-mission {
  margin-top: 24px;
  padding: 20px;
  border: 1px solid rgba(45, 212, 191, 0.25);
  border-left: 3px solid #2dd4bf;
  border-radius: 16px;
  background: rgba(45, 212, 191, 0.05);
}
.disclaimer-mission h2 { margin: 0 0 12px; color: #2dd4bf; font-size: 1.1rem; line-height: 1.4; }
.disclaimer-mission p { font-size: 0.88rem; }
.disclaimer-mission p:last-child { margin-bottom: 0; }
.license-card .access-theme {
  width: auto;
  margin: 0 0 20px auto;
  padding: 8px 14px;
  border: 1px solid #52657d;
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.8rem;
}
body[data-theme="CLASSIC"] .license-backdrop { background: rgba(238, 244, 255, 0.95); }
body[data-theme="CLASSIC"] .license-card {
  background: #ffffff;
  color: #102a43;
  border-color: rgba(11, 86, 197, 0.3);
  box-shadow: 0 20px 70px rgba(16, 42, 82, 0.18);
}
body[data-theme="CLASSIC"] .license-card h1 { color: #102a43; }
body[data-theme="CLASSIC"] .license-card p,
body[data-theme="CLASSIC"] .license-card .license-home { color: #33475e; }
body[data-theme="CLASSIC"] .license-card input {
  background: #f8fbff;
  color: #102a43;
  border-color: #7890ac;
}
body[data-theme="CLASSIC"] .license-card input::placeholder { color: #52657d; }
body[data-theme="CLASSIC"] .license-card button { background: #0b56c5; color: #ffffff; }
body[data-theme="CLASSIC"] .license-card .gumroad-button { background: #e8effb; color: #0b4aa8; }
body[data-theme="CLASSIC"] .license-card .access-theme { background: #f8fbff; color: #0b4aa8; border-color: #7890ac; }
body[data-theme="CLASSIC"] .license-error { color: #b42338; }
body[data-theme="CLASSIC"] .disclaimer-mission { border-color: rgba(11, 86, 197, 0.25); border-left-color: #0b56c5; background: rgba(11, 86, 197, 0.05); }
body[data-theme="CLASSIC"] .disclaimer-mission h2 { color: #0b56c5; }
body[data-theme="CLASSIC"] .license-card :is(input, button, a):focus-visible { outline-color: #0b56c5; }
@media (prefers-reduced-motion: reduce) {
  .license-backdrop *, .license-backdrop *::before, .license-backdrop *::after { transition: none; }
}
