:root {
    --action-from:#6423df;
    --action-mid:#7729ee;
    --action-to:#6f20e8;
    --action-border:#7a35ee;
    --action-soft:#f3edff;
    --action-ring:rgba(112,38,229,.24);
    --action-shadow:0 14px 28px rgba(109,40,217,.24);
}

.action-button,
.admin-button,
.table-action {
    --action-bg:#fff;
    --action-fg:#6423df;
    --action-stroke:var(--action-border);
    --action-elevation:0 9px 20px rgba(76,34,140,.1);
    --action-sheen:rgba(109,40,217,.16);
    --action-height:52px;
    --action-padding:10px 18px;
    position:relative;
    isolation:isolate;
    min-height:var(--action-height);
    max-width:100%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:var(--action-padding);
    overflow:hidden;
    border:1.5px solid var(--action-stroke);
    border-radius:11px;
    color:var(--action-fg);
    background:var(--action-bg);
    box-shadow:var(--action-elevation);
    appearance:none;
    font-weight:900;
    line-height:1.2;
    text-align:center;
    text-decoration:none;
    white-space:normal;
    cursor:pointer;
    transition:color .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease,filter .18s ease,transform .18s ease;
}

.action-button--primary,
.admin-button-primary,
.table-action-primary {
    --action-bg:linear-gradient(110deg,var(--action-from) 0%,var(--action-mid) 54%,var(--action-to) 100%);
    --action-fg:#fff;
    --action-stroke:transparent;
    --action-elevation:var(--action-shadow);
    --action-sheen:rgba(255,255,255,.32);
}

.action-button--secondary,
.admin-button:not(.admin-button-primary):not(.admin-button-danger),
.table-action:not(.table-action-primary) {
    --action-bg:#fff;
    --action-fg:#6423df;
    --action-stroke:var(--action-border);
    --action-elevation:0 9px 20px rgba(76,34,140,.1);
    --action-sheen:rgba(109,40,217,.16);
}

.action-button--light {
    --action-bg:#fff;
    --action-fg:#6423df;
    --action-stroke:rgba(255,255,255,.78);
    --action-elevation:0 10px 24px rgba(31,18,70,.18);
    --action-sheen:rgba(109,40,217,.14);
}

.action-button--alternative {
    --action-bg:linear-gradient(110deg,#fff9e9,#fff0c7);
    --action-fg:#925000;
    --action-stroke:#e7b660;
    --action-elevation:0 9px 20px rgba(151,82,0,.12);
    --action-sheen:rgba(255,255,255,.72);
}

.action-button--large {
    --action-height:58px;
    --action-padding:11px 24px;
}

.action-button--compact {
    --action-height:44px;
    --action-padding:8px 13px;
}

.action-button::after,
.admin-button::after,
.table-action::after {
    content:"";
    position:absolute;
    z-index:1;
    top:-45%;
    bottom:-45%;
    left:-42%;
    width:30%;
    pointer-events:none;
    opacity:0;
    background:linear-gradient(90deg,transparent,var(--action-sheen),transparent);
    transform:skewX(-20deg);
}

:is(.action-button,.admin-button,.table-action) > :where(svg,span,strong,small) {
    position:relative;
    z-index:2;
}

.action-button__icon {
    position:relative;
    z-index:2;
    flex:0 0 22px;
    width:22px;
    height:22px;
    display:block;
    overflow:visible;
    fill:none;
    stroke:currentColor;
    stroke-width:2.3;
    stroke-linecap:round;
    stroke-linejoin:round;
}

:is(.action-button,.admin-button,.table-action):hover:not(:disabled):not([aria-disabled="true"]) {
    color:var(--action-fg);
    filter:brightness(1.04);
    transform:translateY(-1px);
    box-shadow:0 17px 32px rgba(109,40,217,.28);
}

:is(.action-button--secondary,.admin-button:not(.admin-button-primary):not(.admin-button-danger),.table-action:not(.table-action-primary)):hover:not(:disabled):not([aria-disabled="true"]) {
    color:#fff;
    border-color:transparent;
    background:linear-gradient(110deg,var(--action-from),var(--action-mid),var(--action-to));
}

.action-button--light:hover:not(:disabled):not([aria-disabled="true"]) {
    color:#6423df;
    border-color:#fff;
    background:#fff;
}

.action-button--alternative:hover:not(:disabled):not([aria-disabled="true"]) {
    color:#7a4000;
    border-color:#dba64c;
    background:linear-gradient(110deg,#fff4d8,#ffe8a9);
    box-shadow:0 14px 26px rgba(151,82,0,.16);
}

:is(.action-button,.admin-button,.table-action):active:not(:disabled):not([aria-disabled="true"]) {
    transform:translateY(0) scale(.985);
    box-shadow:0 7px 16px rgba(109,40,217,.16);
}

:is(.action-button,.admin-button,.table-action):focus-visible {
    outline:3px solid rgba(100,35,223,.68);
    outline-offset:3px;
    box-shadow:0 0 0 2px #fff,0 0 0 6px var(--action-ring),var(--action-elevation);
}

:is(.action-button,.admin-button,.table-action):is(.is-pending,.is-disabled,[aria-disabled="true"],:disabled) {
    --action-bg:#eef0f4;
    --action-fg:#666d7a;
    --action-stroke:#d8dbe3;
    --action-elevation:none;
    cursor:not-allowed;
    filter:none;
    transform:none;
}

:is(.action-button,.admin-button,.table-action):is(.is-pending,.is-disabled,[aria-disabled="true"],:disabled)::after {
    display:none;
}

@media (hover:hover) {
    :is(.action-button,.admin-button,.table-action):hover:not(:disabled):not([aria-disabled="true"])::after,
    :is(.action-button,.admin-button,.table-action):focus-visible::after {
        animation:actionButtonSheenOnce .82s ease-out both;
    }

    .action-button--download:hover .action-button__icon {
        animation:actionButtonArrow .78s ease-in-out;
    }
}

.action-button--featured::after {
    animation:actionButtonSheenLoop 3.35s ease-in-out infinite;
}

.action-button--featured.action-button--download .action-button__icon {
    animation:actionButtonArrowLoop 1.65s ease-in-out infinite;
}

.reference-download.action-button {
    --action-height:60px;
    --action-padding:10px 20px;
    width:min(310px,100%);
    border-radius:10px;
    font-size:16px;
}

.reference-cta-button.action-button {
    --action-height:55px;
}

.related-download-button.action-button {
    --action-height:56px;
    --action-padding:9px 13px;
    width:176px;
}

.related-download-button .card-button-copy {
    text-align:left;
}

.related-download-button .card-button-copy small {
    min-height:0;
    color:#7c738d;
    font-size:8px;
    line-height:1.1;
    text-align:left;
}

.action-button--secondary:hover .card-button-copy small,
.action-button--secondary:focus-visible .card-button-copy small {
    color:rgba(255,255,255,.82);
}

.game-card-button.action-button {
    --action-height:58px;
    width:100%;
}

.game-card-button .action-button__icon {
    flex-basis:22px;
    width:22px;
    height:22px;
    border-radius:0;
    background:transparent;
}

.inline-search .action-button {
    --action-height:40px;
    --action-padding:7px 11px;
    flex:0 0 auto;
    font-size:11px;
}

.official-sources .action-button {
    --action-height:44px;
    --action-padding:8px 12px;
}

.reference-review-form .action-button.action-button--primary,
.game-page .download-dock .action-button.action-button--primary {
    color:var(--action-fg);
    background:var(--action-bg);
}

.reference-review-form .action-button.action-button--primary {
    min-height:44px;
    border-color:var(--action-stroke);
}

.game-page .download-dock .action-button.action-button--alternative {
    color:var(--action-fg);
    border-color:var(--action-stroke);
    background:var(--action-bg);
}

.table-action {
    --action-height:44px;
    --action-padding:8px 12px;
    min-width:44px;
    font-size:11px;
}

.admin-button {
    --action-height:46px;
    --action-padding:9px 16px;
}

.action-icon-button,
.admin-icon-button {
    position:relative;
    width:44px;
    height:44px;
    min-height:44px;
    display:inline-grid;
    place-items:center;
    padding:0;
    overflow:hidden;
    border:1.5px solid #d9cff2;
    border-radius:11px;
    color:#6423df;
    background:#fff;
    box-shadow:0 7px 17px rgba(76,34,140,.08);
    appearance:none;
    cursor:pointer;
    transition:color .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

:is(.action-icon-button,.admin-icon-button):hover,
:is(.action-icon-button,.admin-icon-button)[aria-expanded="true"] {
    color:#fff;
    border-color:transparent;
    background:linear-gradient(110deg,var(--action-from),var(--action-mid),var(--action-to));
    box-shadow:0 11px 23px rgba(109,40,217,.23);
    transform:translateY(-1px);
}

:is(.action-icon-button,.admin-icon-button):active {
    transform:none;
}

:is(.action-icon-button,.admin-icon-button):focus-visible {
    outline:3px solid rgba(100,35,223,.68);
    outline-offset:3px;
}

.menu-button.action-icon-button:hover span,
.menu-button.action-icon-button[aria-expanded="true"] span {
    background:#fff;
}

.header-search .action-icon-button {
    width:42px;
    height:42px;
    min-height:42px;
    margin-right:3px;
    border-radius:10px;
    font-size:23px;
}

.action-tile-button {
    border:1.5px solid #ded3f6;
    color:#171922;
    background:#fff;
    box-shadow:0 8px 20px rgba(76,34,140,.08);
    appearance:none;
    cursor:pointer;
    transition:color .18s ease,background .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}

.action-tile-button:hover,
.action-tile-button.saved,
.action-tile-button[aria-pressed="true"] {
    color:#fff;
    border-color:transparent;
    background:linear-gradient(110deg,var(--action-from),var(--action-mid),var(--action-to));
    box-shadow:0 12px 25px rgba(109,40,217,.24);
    transform:translateY(-1px);
}

.action-tile-button:active { transform:none; }
.action-tile-button:focus-visible { outline:3px solid rgba(100,35,223,.68); outline-offset:3px; }
.action-tile-button.saved .reference-save-icon::before,
.action-tile-button[aria-pressed="true"] .reference-save-icon::before { background:currentColor; }

.desktop-nav .action-button.active {
    --action-bg:linear-gradient(110deg,var(--action-from),var(--action-mid),var(--action-to));
    --action-fg:#fff;
    --action-stroke:transparent;
    --action-elevation:0 10px 22px rgba(109,40,217,.2);
}

.game-page .desktop-nav .action-button {
    color:#6423df;
    border-color:var(--action-border);
    background:#fff;
}

.game-page .desktop-nav .action-button:hover,
.game-page .desktop-nav .action-button.active {
    color:#fff;
    border-color:transparent;
    background:linear-gradient(110deg,var(--action-from),var(--action-mid),var(--action-to));
}

.game-page .language-switch.action-button,
.language-switch.action-button {
    color:#fff;
    border-color:transparent;
    background:linear-gradient(110deg,var(--action-from),var(--action-mid),var(--action-to));
    box-shadow:0 10px 22px rgba(109,40,217,.2);
}

.admin-topbar > a.admin-button {
    min-height:44px;
    color:var(--action-fg);
    border-color:var(--action-stroke);
    background:var(--action-bg);
    box-shadow:var(--action-elevation);
}

.admin-sidebar-bottom form .admin-icon-button {
    width:44px;
    height:44px;
    min-height:44px;
    border:1px solid rgba(255,255,255,.16);
    color:#d8d2e1;
    background:rgba(255,255,255,.07);
}

.admin-sidebar-bottom form .admin-icon-button:hover {
    color:#fff;
    border-color:transparent;
    background:linear-gradient(110deg,var(--action-from),var(--action-mid),var(--action-to));
}

.admin-menu.admin-icon-button { display:none; }

.official-law-links a.admin-button {
    min-height:44px;
    color:var(--action-fg);
    border-color:var(--action-stroke);
    background:var(--action-bg);
    box-shadow:var(--action-elevation);
}

@keyframes actionButtonSheenOnce {
    0% { left:-42%; opacity:0; }
    15% { opacity:1; }
    100% { left:122%; opacity:0; }
}

@keyframes actionButtonSheenLoop {
    0%,58% { left:-42%; opacity:0; }
    64% { opacity:1; }
    82%,100% { left:122%; opacity:0; }
}

@keyframes actionButtonArrow {
    0%,100% { transform:translateY(0); }
    45% { transform:translateY(3px); }
    72% { transform:translateY(-1px); }
}

@keyframes actionButtonArrowLoop {
    0%,55%,100% { transform:translateY(0); }
    68% { transform:translateY(2px); }
    80% { transform:translateY(-1px); }
}

@media (max-width:700px) {
    .reference-download.action-button { --action-height:48px; --action-padding:10px 12px; font-size:12px; }
    .reference-cta-button.action-button { --action-height:48px; }
    .related-download-button.action-button { --action-height:50px; width:132px; }
}

@media (max-width:900px) {
    .admin-menu.admin-icon-button { display:inline-grid; }
}

@media (max-width:390px) {
    .related-download-button.action-button { --action-height:46px; width:108px; --action-padding:6px; }
}

@media (max-width:340px) {
    .related-download-button.action-button { width:100%; }
}

@media (max-width:360px) {
    .action-icon-button { width:40px; height:40px; min-height:40px; }
    .header-search .action-icon-button { width:40px; height:40px; min-height:40px; margin-right:0; }
}

@media (prefers-reduced-motion:reduce) {
    .action-button,
    .admin-button,
    .table-action,
    .action-icon-button,
    .admin-icon-button,
    .action-tile-button,
    .action-button::after,
    .admin-button::after,
    .table-action::after,
    .action-button__icon {
        animation:none!important;
        transition:none!important;
    }

    :is(.action-button,.admin-button,.table-action,.action-icon-button,.admin-icon-button,.action-tile-button):hover,
    :is(.action-button,.admin-button,.table-action,.action-icon-button,.admin-icon-button,.action-tile-button):active {
        transform:none;
    }
}
