/* Phase 1 shared button treatment. Loaded ONLY by the public header and
   shared css_loader (including admin, explicitly approved). Keep existing backgrounds, text colors, gradients,
   padding, responsive visibility and event handlers on both surfaces.
   Repeated classes outrank the existing body.ep-app legacy rules without
   !important or a Tailwind rebuild. Removing these stylesheet links rolls
   back this phase independently. */
html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)) {
  box-sizing: border-box;
  min-height: 44px; min-width: 44px; border-radius: 8px;
  box-shadow: inset 0 1px 0 var(--ep-border-2, rgba(255,255,255,.12)), 0 2px 3px var(--ep-inset, rgba(0,0,0,.35));
  transform: none; filter: none;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 180ms ease, transform 180ms cubic-bezier(0.23, 1, 0.32, 1);
  -webkit-tap-highlight-color: transparent;
}
html body .ep-button-custom { display: flex; align-items: center; justify-content: center; }
@media (hover: hover) and (pointer: fine) {
  html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)):hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
    transform: none; filter: none;
    box-shadow: inset 0 1px 0 var(--ep-border-2, rgba(255,255,255,.12)), 0 6px 12px var(--ep-inset, rgba(0,0,0,.35));
  }
}
html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)):active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]) {
  transform: none; box-shadow: inset 0 1px 2px var(--ep-inset, rgba(0,0,0,.35));
}
html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)):focus-visible,
body.ep-app .buyplan:focus-visible {
  outline: 2px solid var(--ep-accent-2, #34d399); outline-offset: 3px;
}
body.ep-app .buyplan { border-radius: 8px; }
html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)):is(:disabled,[aria-disabled="true"]) {
  opacity: .45; cursor: not-allowed; transform: none; filter: none; box-shadow: none;
}
html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link))[aria-busy="true"] {
  opacity: 1; cursor: progress; transform: none; filter: none;
}
html body .ep-button-custom.hidden { display: none; }
@media (prefers-reduced-motion: reduce) {
  html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)) { transition: none; }
  html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)):active { transform: none; }
}

/* Brief, interruptible pointer feedback; existing palette stays untouched.
   No lift on touchscreens, no motion for keyboard focus or reduced-motion. */
@media (prefers-reduced-motion: no-preference) {
  @media (hover: hover) and (pointer: fine) {
    html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)):hover:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(:focus-visible) { transform: translateY(-2px); }
  }
  html body :is(.btn-primary.btn-primary, .btn-ghost.btn-ghost, .au-btn.au-btn, .ep-button-custom.ep-button-custom, .ea-btn.ea-btn:not(.ea-btn-link)):active:not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):not(:focus-visible) { transform: translateY(0) scale(.985); transition-duration: 100ms; }
}

/* Subtle vertical finish over the existing primary/plan color or gradient.
   Isolated negative layer sits above the button background, below its text;
   it never captures clicks or replaces the existing busy ::after spinner. */
html body :is(.btn-primary.btn-primary, .au-btn.au-btn:not(.au-btn-ghost):not(.au-btn-discord), .ep-button-custom.ep-button-custom, .ea-btn.ea-btn-accent) { position: relative; isolation: isolate; }
html body :is(.btn-primary.btn-primary, .au-btn.au-btn:not(.au-btn-ghost):not(.au-btn-discord), .ep-button-custom.ep-button-custom, .ea-btn.ea-btn-accent):not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"])::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  pointer-events: none; border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,0) 55%, rgba(0,0,0,.035) 100%);
  opacity: .7; transition: opacity 180ms ease;
}
@media (hover: hover) and (pointer: fine) {
  html body :is(.btn-primary.btn-primary, .au-btn.au-btn:not(.au-btn-ghost):not(.au-btn-discord), .ep-button-custom.ep-button-custom, .ea-btn.ea-btn-accent):not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"]):hover::before { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html body :is(.btn-primary.btn-primary, .au-btn.au-btn:not(.au-btn-ghost):not(.au-btn-discord), .ep-button-custom.ep-button-custom, .ea-btn.ea-btn-accent):not(:disabled):not([aria-disabled="true"]):not([aria-busy="true"])::before { transition: none; }
}

/* Owner-selected option 2: solid brand green; preserve semantic/plan buttons.
   Auth's legacy white foreground is !important, so the approved dark ink must
   explicitly override it. Hover/press motion and loading handlers stay intact. */
html body :is(.btn-primary.btn-primary,.btn-full.btn-full,.au-btn.au-btn:not(.au-btn-ghost):not(.au-btn-discord),.ea-btn.ea-btn-accent):not(.ep-button-custom),
html body :is(.btn-primary.btn-primary,.btn-full.btn-full,.au-btn.au-btn:not(.au-btn-ghost):not(.au-btn-discord),.ea-btn.ea-btn-accent):not(.ep-button-custom):is(:hover,:active,:focus) {
    background-color: #10b981; background-image: none; color: #052e21 !important;
}
html body :is(.btn-primary.btn-primary,.btn-full.btn-full,.au-btn.au-btn:not(.au-btn-ghost):not(.au-btn-discord),.ea-btn.ea-btn-accent):not(.ep-button-custom)::before {
    content: none !important;
}
/* Flat fills for the shared brand text accents, retaining background clipping. */
html body :is(.text-gradient,.game-ping) {
    background-image: linear-gradient(#10b981,#10b981);
}
html:not(.dark) body :is(.text-gradient,.game-ping) {
    background-image: linear-gradient(#047857,#047857);
}
