/* Only the new Lumina entry and modal are styled here. The browser build has
   its own document, so its game CSS never participates in the MatchApp cascade. */
@layer ma-reference {
  html body.page-home #lm-launch-grid.lm-launch-grid {
    display:grid!important;grid-template-columns:minmax(0,max-content)!important;
    justify-content:center!important;align-items:center!important;gap:8px;
    width:100%;max-width:min(100%,900px);box-sizing:border-box;
    margin:9px auto 13px!important;padding:0 14px;
    position:relative;z-index:1;
  }
  html body.page-home #lm-launch-grid #lm-launch.lm-launch {
    appearance:none;cursor:pointer;box-sizing:border-box;min-width:0;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:9px;
    width:max-content!important;max-width:100%!important;min-height:44px!important;
    padding:12px 20px!important;margin:0!important;border-radius:999px!important;
    border:0!important;color:#102c31!important;-webkit-text-fill-color:currentColor!important;
    background:linear-gradient(118deg,#a3f8dd 0%,#48e2d4 48%,#68d9f0 100%)!important;
    box-shadow:0 5px 21px #41d9cb29,inset 0 1px #f4fffbb3!important;
    font:inherit;font-size:.875rem!important;font-weight:750!important;letter-spacing:.005em!important;
    line-height:1.25!important;text-align:center!important;text-transform:none!important;
    transition:transform .18s ease,filter .18s ease;
    transform-origin:center;
  }
  html body.page-home #lm-launch-grid #lm-launch svg {
    width:20px!important;height:20px!important;flex:0 0 20px!important;
    color:inherit!important;stroke:currentColor!important;
  }
  html body.page-home #lm-launch-grid #lm-launch .ma-luxe-text {
    display:inline!important;visibility:visible!important;font:inherit!important;
    min-width:0;max-width:240px;white-space:normal!important;overflow-wrap:anywhere;
    color:inherit!important;-webkit-text-fill-color:currentColor!important;
    background:none!important;box-shadow:none!important;padding:0!important;
  }
  html body.page-home #lm-launch-grid #lm-launch.lm-notice {
    animation:lm-invitation 1.6s ease-out .15s 1 both;
  }
  html body.page-home #lm-launch-grid #lm-launch:hover {
    filter:brightness(1.08);transform:translateY(-2px);
  }
  html body.page-home #lm-launch-grid #lm-launch:active {
    transform:translateY(0) scale(.98);
  }
  html body.page-home #lm-launch-grid #lm-launch:focus-visible {
    outline:3px solid #ffe5a3!important;outline-offset:4px!important;
  }
  @keyframes lm-invitation {
    0% {transform:translateY(5px) scale(.96);}
    18% {transform:translateY(-3px) scale(1.045);}
    32% {transform:translateY(0) scale(1);}
    43% {transform:rotate(-2.5deg);}
    54% {transform:rotate(2.5deg);}
    65% {transform:rotate(-1.5deg);}
    76% {transform:rotate(1deg);}
    88%,100% {transform:none;}
  }

  html body.lm-game-open {overflow:hidden!important;}
  /* Repeating the modal ID confines precedence to this newly added surface,
     even where existing shared control declarations are important and layered. */
  #lm-dialog#lm-dialog.lm-overlay,
  #lm-dialog#lm-dialog.lm-overlay * {box-sizing:border-box;}
  #lm-dialog#lm-dialog.lm-overlay {
    position:fixed!important;inset:0!important;z-index:2147483000;
    width:100%!important;max-width:none!important;height:100%!important;max-height:none!important;
    height:100dvh!important;margin:0!important;
    padding:max(env(safe-area-inset-top),12px) max(env(safe-area-inset-right),12px) max(env(safe-area-inset-bottom),12px) max(env(safe-area-inset-left),12px)!important;
    border:0!important;border-radius:0!important;box-shadow:none!important;
    background:rgba(7,4,18,.86)!important;color:#ffecff!important;
    overflow:hidden!important;isolation:isolate;
    font-family:system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;
    line-height:1.35;text-align:start;
  }
  #lm-dialog#lm-dialog.lm-overlay[open] {display:flex!important;align-items:center;justify-content:center;}
  #lm-dialog#lm-dialog.lm-overlay:not([open]) {display:none!important;}
  #lm-dialog#lm-dialog.lm-overlay::backdrop {background:#080511a6;}
  #lm-dialog#lm-dialog .lm-shell {
    width:100%!important;height:100%!important;min-height:0!important;
    max-height:100%!important;max-width:100%!important;padding:0!important;margin:0!important;
    display:flex!important;flex-direction:column!important;gap:0!important;overflow:hidden!important;
    border:0!important;border-radius:22px!important;
    background:#0f0c1d!important;box-shadow:0 24px 80px #0009!important;
  }
  #lm-dialog#lm-dialog .lm-framebar {
    display:flex!important;align-items:center!important;gap:10px!important;
    min-height:58px!important;flex:0 0 auto!important;
    padding:7px 9px 7px 17px!important;margin:0!important;
    background:linear-gradient(100deg,#191126,#261b37)!important;border:0!important;border-radius:0!important;
  }
  #lm-dialog#lm-dialog #lm-title {
    color:#fff2d0!important;-webkit-text-fill-color:currentColor!important;
    font-size:14px!important;font-weight:750!important;line-height:1.3!important;
    letter-spacing:.015em!important;background:none!important;padding:0!important;
    min-width:0;overflow-wrap:anywhere;
  }
  #lm-dialog#lm-dialog .lm-source {
    margin-inline-start:auto!important;font-size:11px!important;line-height:1.3!important;
    color:#cbbbd9!important;-webkit-text-fill-color:currentColor!important;
    white-space:nowrap;background:none!important;padding:0!important;
  }
  #lm-dialog#lm-dialog #lm-close.lm-icon-btn {
    width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;
    padding:0!important;margin:0!important;flex:0 0 44px!important;
    display:grid!important;place-items:center!important;border:0!important;border-radius:999px!important;
    background:#423250!important;color:#fff!important;-webkit-text-fill-color:currentColor!important;
    font:inherit;font-size:28px!important;line-height:1!important;font-weight:500!important;
    cursor:pointer;box-shadow:none!important;
  }
  #lm-dialog#lm-dialog #lm-close:focus-visible,
  #lm-dialog#lm-dialog .lm-retry:focus-visible {
    outline:3px solid #f3d688!important;outline-offset:2px!important;
  }
  #lm-dialog#lm-dialog .lm-stage {
    flex:1 1 0!important;min-height:0!important;width:100%!important;padding:0!important;margin:0!important;
    display:flex!important;flex-direction:column!important;overflow:hidden!important;
    background:#0f0c1d!important;border:0!important;border-radius:0!important;
  }
  #lm-dialog#lm-dialog .lm-game-frame {
    display:block!important;flex:1 1 0!important;width:100%!important;height:100%!important;
    min-height:0!important;min-width:0!important;max-width:100%!important;
    padding:0!important;margin:0!important;border:0!important;border-radius:0!important;
    background:#0f0c1d!important;color-scheme:dark;
  }
  #lm-dialog#lm-dialog .lm-loading {
    margin:auto!important;padding:24px!important;text-align:center!important;
    color:#fff1ce!important;font-size:16px!important;background:none!important;
  }
  #lm-dialog#lm-dialog .lm-error {
    display:grid!important;justify-items:center!important;gap:18px!important;
    margin:auto!important;padding:24px!important;max-width:430px!important;text-align:center!important;
  }
  #lm-dialog#lm-dialog .lm-error-copy {
    margin:0!important;padding:0!important;color:#f5e7ff!important;
    background:none!important;font-size:15px!important;line-height:1.5!important;
  }
  #lm-dialog#lm-dialog .lm-retry {
    min-height:44px!important;padding:11px 20px!important;margin:0!important;
    border:0!important;border-radius:999px!important;cursor:pointer;
    background:linear-gradient(118deg,#a3f8dd,#48e2d4)!important;color:#102c31!important;
    -webkit-text-fill-color:currentColor!important;font-size:14px!important;font-weight:700!important;
  }
  #lm-dialog#lm-dialog .lm-visually-hidden {
    position:absolute!important;width:1px!important;height:1px!important;
    padding:0!important;margin:-1px!important;overflow:hidden!important;
    clip:rect(0,0,0,0)!important;clip-path:inset(50%)!important;white-space:nowrap!important;border:0!important;
  }
  @media(max-width:480px) {
    html body.page-home #lm-launch-grid.lm-launch-grid {margin:8px auto 11px!important;}
    html body.page-home #lm-launch-grid #lm-launch.lm-launch {font-size:.8125rem!important;padding:11px 17px!important;}
    #lm-dialog#lm-dialog.lm-overlay {
      padding:max(env(safe-area-inset-top),8px) max(env(safe-area-inset-right),8px) max(env(safe-area-inset-bottom),8px) max(env(safe-area-inset-left),8px)!important;
    }
    #lm-dialog#lm-dialog .lm-shell {width:100%!important;height:100%!important;border-radius:18px!important;}
    #lm-dialog#lm-dialog .lm-framebar {padding-inline-start:12px!important;gap:7px!important;}
  }
  @media(max-width:340px) {
    #lm-dialog#lm-dialog .lm-source {display:none!important;}
    #lm-dialog#lm-dialog #lm-close.lm-icon-btn {margin-inline-start:auto!important;}
  }
  @media(max-height:500px) {
    #lm-dialog#lm-dialog.lm-overlay {
      padding:max(env(safe-area-inset-top),6px) max(env(safe-area-inset-right),6px) max(env(safe-area-inset-bottom),6px) max(env(safe-area-inset-left),6px)!important;
    }
    #lm-dialog#lm-dialog .lm-shell {width:100%!important;height:100%!important;border-radius:16px!important;}
  }
  html.reduce-motion body.page-home #lm-launch-grid #lm-launch,
  html.reduce-motion #lm-dialog#lm-dialog * {animation:none!important;transition:none!important;}
  @media(prefers-reduced-motion:reduce) {
    html body.page-home #lm-launch-grid #lm-launch,
    #lm-dialog#lm-dialog *,#lm-dialog#lm-dialog *::before,#lm-dialog#lm-dialog *::after {
      animation:none!important;transition:none!important;
    }
  }
  @media(forced-colors:active) {
    html body.page-home #lm-launch-grid #lm-launch,
    #lm-dialog#lm-dialog #lm-close,#lm-dialog#lm-dialog .lm-retry {
      border:1px solid ButtonText!important;background:ButtonFace!important;color:ButtonText!important;
    }
  }
}
