/* ── Shared sign-in gate (/play, /orders) ─────────────────────────────────────────── */

/* Markup: fragments/sign-in-gate.html; behaviour: js/sign-in-gate.js.
   Signed-out landing: breach art fixed behind the whole page (z-index -1
   so the header and footer still paint over it), rising embers, a hero column and
   a glass sign-in card ringed by a slowly turning gold/ember border. */
.sign-in-gate {
    --gate-gold: #ffbf00;
    --gate-ember: #ff4a1c;
    --gate-text: #f0ece6;
    --gate-muted: rgba(240, 236, 230, 0.66);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 140px);
    padding: 32px 24px 48px;
    box-sizing: border-box;
    text-align: left;
}

.gate-backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
    background: #070404;
}

.gate-backdrop-art {
    position: absolute;
    inset: -4%;
    width: 108%;
    height: 108%;
    object-fit: cover;
    object-position: center 35%;
    animation: gateArtDrift 28s ease-in-out infinite alternate;
}

/* Darken the sides where the copy and the card sit; keep the dragon lit in the middle. */
.gate-backdrop::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 38% 55% at 50% 42%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.35) 100%),
        linear-gradient(90deg, rgba(4, 2, 2, 0.92) 0%, rgba(4, 2, 2, 0.55) 34%, rgba(4, 2, 2, 0.2) 50%, rgba(4, 2, 2, 0.55) 66%, rgba(4, 2, 2, 0.9) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.85) 100%);
}

@keyframes gateArtDrift {
    from { transform: scale(1) translate3d(0, 0, 0); }
    to   { transform: scale(1.06) translate3d(-1%, -1.5%, 0); }
}

.gate-embers {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.gate-embers span {
    position: absolute;
    bottom: -12px;
    left: var(--x, 50%);
    width: var(--s, 4px);
    height: var(--s, 4px);
    border-radius: 50%;
    background: radial-gradient(circle, #ffd27a 0%, var(--gate-ember, #ff4a1c) 55%, rgba(255, 74, 28, 0) 75%);
    box-shadow: 0 0 10px 2px var(--gate-ember-glow, rgba(255, 90, 30, 0.55));
    opacity: 0;
    animation: gateEmberRise var(--d, 11s) linear var(--delay, 0s) infinite;
}

.gate-embers span:nth-child(1)  { --x: 6%;  --s: 4px; --d: 12s; --delay: 0s; }
.gate-embers span:nth-child(2)  { --x: 14%; --s: 3px; --d: 9s;  --delay: 3s; }
.gate-embers span:nth-child(3)  { --x: 22%; --s: 5px; --d: 14s; --delay: 6s; }
.gate-embers span:nth-child(4)  { --x: 31%; --s: 3px; --d: 10s; --delay: 1.5s; }
.gate-embers span:nth-child(5)  { --x: 39%; --s: 4px; --d: 13s; --delay: 8s; }
.gate-embers span:nth-child(6)  { --x: 47%; --s: 6px; --d: 15s; --delay: 4s; }
.gate-embers span:nth-child(7)  { --x: 54%; --s: 3px; --d: 9.5s; --delay: 2s; }
.gate-embers span:nth-child(8)  { --x: 61%; --s: 5px; --d: 12.5s; --delay: 7s; }
.gate-embers span:nth-child(9)  { --x: 68%; --s: 3px; --d: 10.5s; --delay: 5s; }
.gate-embers span:nth-child(10) { --x: 75%; --s: 4px; --d: 14.5s; --delay: 0.8s; }
.gate-embers span:nth-child(11) { --x: 82%; --s: 5px; --d: 11.5s; --delay: 9s; }
.gate-embers span:nth-child(12) { --x: 89%; --s: 3px; --d: 9s;  --delay: 3.6s; }
.gate-embers span:nth-child(13) { --x: 95%; --s: 4px; --d: 13.5s; --delay: 6.4s; }
.gate-embers span:nth-child(14) { --x: 43%; --s: 2px; --d: 8s;  --delay: 10s; }

@keyframes gateEmberRise {
    0%   { transform: translate3d(0, 0, 0) scale(1); opacity: 0; }
    10%  { opacity: 0.95; }
    50%  { transform: translate3d(28px, -50vh, 0) scale(0.85); }
    80%  { opacity: 0.6; }
    100% { transform: translate3d(-18px, -102vh, 0) scale(0.4); opacity: 0; }
}

.gate-stage {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 400px);
    align-items: center;
    gap: clamp(32px, 9vw, 160px);
    width: 100%;
    max-width: 1160px;
}

/* ── Hero column ── */
.gate-hero {
    animation: gateRiseIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gate-hero-logo {
    display: block;
    width: min(420px, 100%);
    height: auto;
    margin: 0 0 18px -6px;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 26px rgba(255, 74, 28, 0.35));
}

.gate-kicker {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 10px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.74rem;
    letter-spacing: 4px;
    color: var(--gate-ember);
    text-shadow: 0 0 12px rgba(255, 74, 28, 0.6);
}

.gate-kicker::before {
    content: '';
    width: 36px;
    height: 2px;
    background: linear-gradient(90deg, var(--gate-ember), rgba(255, 191, 0, 0.8));
    box-shadow: 0 0 8px rgba(255, 74, 28, 0.8);
}

.gate-headline {
    margin: 0 0 14px;
    font-family: 'DragonSlayer', serif;
    font-weight: normal;
    font-size: clamp(2rem, 4.4vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: 1px;
    color: var(--gate-gold);
    background: linear-gradient(180deg, #fff2c2 0%, #ffbf00 48%, #ff7a1c 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.8));
}

.gate-tagline {
    max-width: 460px;
    margin: 0 0 26px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.98rem;
    line-height: 1.55;
    color: var(--gate-muted);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.gate-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    max-width: 500px;
}

.gate-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    color: var(--gate-text);
    background: linear-gradient(135deg, rgba(20, 10, 8, 0.78), rgba(10, 6, 6, 0.6));
    border: 1px solid rgba(255, 191, 0, 0.14);
    border-radius: 10px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: gateRiseIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    transition: border-color 0.25s, transform 0.25s;
}

.gate-features li:nth-child(1) { animation-delay: 0.25s; }
.gate-features li:nth-child(2) { animation-delay: 0.33s; }
.gate-features li:nth-child(3) { animation-delay: 0.41s; }
.gate-features li:nth-child(4) { animation-delay: 0.49s; }

.gate-features li:hover {
    border-color: rgba(255, 191, 0, 0.4);
    transform: translateY(-2px);
}

.gate-features i {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1a0d04;
    background: linear-gradient(135deg, #ffd45e, #ff8a1c);
    box-shadow: 0 0 14px rgba(255, 138, 28, 0.35);
}

/* ── Sign-in card ── */
.gate-card {
    position: relative;
    border-radius: 20px;
    padding: 1px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(255, 74, 28, 0.18);
    animation: gateRiseIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

/* Rotating ember/gold sweep that shows as the card's 1px border */
.gate-card::before {
    content: '';
    position: absolute;
    inset: -60%;
    background: conic-gradient(from 0deg, rgba(255, 191, 0, 0.08) 0deg, rgba(255, 191, 0, 0.9) 50deg, rgba(255, 74, 28, 0.9) 90deg, rgba(255, 191, 0, 0.08) 150deg, rgba(255, 191, 0, 0.08) 360deg);
    animation: gateBorderSpin 7s linear infinite;
}

@keyframes gateBorderSpin {
    to { transform: rotate(360deg); }
}

.gate-card-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 34px 32px 26px;
    text-align: center;
    border-radius: 19px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 120, 30, 0.16) 0%, rgba(255, 120, 30, 0) 60%),
        rgba(10, 7, 6, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.gate-card-crest {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 16px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(255, 191, 0, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 22px rgba(255, 191, 0, 0.25);
}

.gate-card-crest img {
    display: block;
    width: 100%;
    height: 100%;
}

/* The SCALE Online logo crest (play theme + home join card) sits a size up from the icon medallions */
.gate-card-crest:has(> img) {
    width: 94px;
    height: 94px;
    border-radius: 22px;
}

/* Icon crests (themes other than play): a forged medallion */
.gate-card-crest i {
    font-size: 1.9rem;
    color: var(--gate-gold);
    filter: drop-shadow(0 0 10px rgba(255, 191, 0, 0.5));
}

.gate-card h2 {
    margin: 0 0 8px;
    font-family: 'DragonSlayer', serif;
    font-weight: normal;
    font-size: 1.6rem;
    letter-spacing: 2px;
    color: var(--gate-gold);
    text-shadow: 0 0 18px rgba(255, 191, 0, 0.25);
}

.gate-card-text {
    margin: 0 0 22px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.85rem;
    color: var(--gate-muted);
}

.gate-error {
    display: none;
    margin: 0 0 14px;
    padding: 10px 12px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.78rem;
    color: #ffb4a6;
    background: rgba(220, 50, 30, 0.14);
    border: 1px solid rgba(255, 90, 60, 0.4);
    border-radius: 8px;
}

.gate-error.is-visible {
    display: block;
}

.gate-google {
    display: flex;
    justify-content: center;
    min-height: 44px;
}

.gate-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: rgba(240, 236, 230, 0.4);
}

.gate-divider::before,
.gate-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 191, 0, 0), rgba(255, 191, 0, 0.3), rgba(255, 191, 0, 0));
}

/* No Google client configured → the button and its divider are hidden by sign-in-gate.js */
.sign-in-gate.no-google .gate-google,
.sign-in-gate.no-google .gate-divider {
    display: none;
}

.gate-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 46px;
    margin: 0 0 10px;
    border-radius: 999px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.8rem;
    letter-spacing: 2.5px;
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.25s, background 0.25s, border-color 0.25s, color 0.25s;
}

.gate-btn-primary {
    color: #1a0d04;
    background: linear-gradient(180deg, #ffd45e 0%, #ffbf00 45%, #ff9a1c 100%);
    box-shadow: 0 6px 22px rgba(255, 150, 20, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Light glint that sweeps across the primary button every few seconds */
.gate-btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -60%;
    width: 40%;
    height: 100%;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
    transform: skewX(-20deg);
    animation: gateGlint 4.5s ease-in-out 1.2s infinite;
}

@keyframes gateGlint {
    0%, 70% { left: -60%; }
    100%    { left: 130%; }
}

.gate-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(255, 150, 20, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.gate-btn-ghost {
    color: var(--gate-gold);
    background: rgba(255, 191, 0, 0.04);
    border: 1px solid rgba(255, 191, 0, 0.4);
}

.gate-btn-ghost:hover {
    transform: translateY(-2px);
    color: #fff2c2;
    background: rgba(255, 191, 0, 0.12);
    border-color: rgba(255, 191, 0, 0.8);
}

.gate-free {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 10px 0 8px;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.74rem;
    letter-spacing: 1px;
    color: rgba(255, 191, 0, 0.85);
}

.gate-legal {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 0.68rem;
    line-height: 1.5;
    color: rgba(240, 236, 230, 0.42);
}

.gate-legal-link {
    color: rgba(240, 236, 230, 0.7);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.gate-legal-link:hover {
    color: var(--gate-gold);
}

@keyframes gateRiseIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
    .gate-stage {
        grid-template-columns: minmax(0, 1fr);
        justify-items: center;
        gap: 28px;
        max-width: 440px;
    }

    .gate-hero {
        text-align: center;
    }

    .gate-hero-logo {
        width: min(320px, 86%);
        margin: 0 auto 14px;
    }

    .gate-kicker {
        justify-content: center;
    }

    .gate-kicker::after {
        content: '';
        width: 36px;
        height: 2px;
        background: linear-gradient(90deg, rgba(255, 191, 0, 0.8), var(--gate-ember));
        box-shadow: 0 0 8px rgba(255, 74, 28, 0.8);
    }

    .gate-tagline {
        margin: 0 auto 20px;
    }

    .gate-features {
        margin: 0 auto;
        text-align: left;
    }

    .gate-card {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .sign-in-gate {
        align-items: flex-start;
        padding: 20px 16px 36px;
    }

    .gate-features {
        gap: 8px;
    }

    .gate-features li {
        padding: 9px 10px;
        gap: 9px;
        font-size: 0.72rem;
    }

    .gate-features i {
        width: 26px;
        height: 26px;
        font-size: 0.75rem;
    }

    .gate-card-inner {
        padding: 28px 20px 22px;
    }
}

/* ════════════════════════════════════════════════════════════
   THEMES — data-gate-theme on .sign-in-gate. "play" is the base
   look above (breach art); each theme below re-skins the backdrop,
   hero art, palette, card and buttons to match the page it guards.
   ════════════════════════════════════════════════════════════ */

/* Shared frame for the per-theme hero art (takes the place of the play logo) */
.gate-hero-art {
    position: relative;
    display: inline-block;
    margin: 0 0 22px;
}

@keyframes gateFloat {
    0%, 100% { transform: translateY(0) rotate(-1deg); }
    50%      { transform: translateY(-10px) rotate(1deg); }
}

@keyframes gateSpin {
    to { transform: rotate(360deg); }
}

@keyframes gatePulse {
    0%, 100% { opacity: 0.7; transform: scale(1); }
    50%      { opacity: 1; transform: scale(1.08); }
}

@keyframes gateTwinkle {
    0%, 100% { opacity: 0.35; }
    50%      { opacity: 1; }
}

/* ── ORDERS: the treasure hoard ───────────────────────────── */
.sign-in-gate[data-gate-theme="orders"] {
    --gate-ember: #ffcf40;
    --gate-ember-glow: rgba(255, 200, 60, 0.55);
}

.sign-in-gate[data-gate-theme="orders"] .gate-backdrop {
    background:
        radial-gradient(ellipse 45% 55% at 28% 45%, rgba(255, 176, 0, 0.22) 0%, rgba(255, 176, 0, 0) 70%),
        radial-gradient(ellipse 40% 50% at 78% 50%, rgba(255, 120, 0, 0.12) 0%, rgba(255, 120, 0, 0) 70%),
        radial-gradient(ellipse at 50% 120%, rgba(120, 70, 0, 0.45) 0%, rgba(0, 0, 0, 0) 60%),
        #0b0805;
}

/* Faint diagonal gilt hatching, like the inside of a treasure chest lid */
.sign-in-gate[data-gate-theme="orders"] .gate-backdrop::after {
    background:
        repeating-linear-gradient(135deg, rgba(255, 191, 0, 0.035) 0 2px, rgba(0, 0, 0, 0) 2px 26px),
        linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.75) 100%);
}

.sign-in-gate[data-gate-theme="orders"] .gate-embers span {
    background: radial-gradient(circle, #fffbe6 0%, #ffcf40 45%, rgba(255, 191, 0, 0) 72%);
}

.gate-art-hoard img {
    position: relative;
    display: block;
    width: 150px;
    height: 150px;
    border-radius: 32px;
    border: 2px solid rgba(255, 207, 64, 0.7);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7), 0 0 40px rgba(255, 191, 0, 0.35);
    animation: gateFloat 6s ease-in-out infinite;
}

/* Slow-turning god rays behind the hoard */
.gate-art-hoard::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 320px;
    height: 320px;
    margin: -160px 0 0 -160px;
    background: repeating-conic-gradient(from 0deg, rgba(255, 207, 64, 0.16) 0deg 8deg, rgba(255, 207, 64, 0) 8deg 24deg);
    -webkit-mask-image: radial-gradient(circle, #000 20%, transparent 68%);
    mask-image: radial-gradient(circle, #000 20%, transparent 68%);
    animation: gateSpin 40s linear infinite;
}

.sign-in-gate[data-gate-theme="orders"] .gate-kicker {
    color: #ffcf40;
    text-shadow: 0 0 12px rgba(255, 191, 0, 0.55);
}

.sign-in-gate[data-gate-theme="orders"] .gate-kicker::before,
.sign-in-gate[data-gate-theme="orders"] .gate-kicker::after {
    background: linear-gradient(90deg, #ffcf40, #fff2c2);
    box-shadow: 0 0 8px rgba(255, 191, 0, 0.7);
}

.sign-in-gate[data-gate-theme="orders"] .gate-headline {
    background: linear-gradient(180deg, #fffbe6 0%, #ffd45e 45%, #c98a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.sign-in-gate[data-gate-theme="orders"] .gate-card::before {
    background: conic-gradient(from 0deg, rgba(255, 207, 64, 0.08) 0deg, rgba(255, 242, 194, 0.95) 45deg, rgba(255, 191, 0, 0.9) 90deg, rgba(255, 207, 64, 0.08) 150deg, rgba(255, 207, 64, 0.08) 360deg);
}

.sign-in-gate[data-gate-theme="orders"] .gate-card-inner {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 191, 0, 0.16) 0%, rgba(255, 191, 0, 0) 60%),
        rgba(12, 9, 5, 0.94);
}

.sign-in-gate[data-gate-theme="orders"] .gate-card-crest {
    background: radial-gradient(circle at 50% 35%, #3a2a08 0%, #140e04 100%);
}

/* ── ARENA: the ember forge (over the Arena page's own nebula) ── */
.sign-in-gate[data-gate-theme="arena"] {
    --gate-gold: #ffbf00;
    --gate-ember: #ff6a00;
    --gate-ember-glow: rgba(255, 110, 0, 0.6);
}

.sign-in-gate[data-gate-theme="arena"] .gate-backdrop {
    background: transparent;
}

.sign-in-gate[data-gate-theme="arena"] .gate-backdrop::after {
    background:
        radial-gradient(ellipse 70% 45% at 50% 115%, rgba(255, 106, 0, 0.45) 0%, rgba(255, 106, 0, 0) 70%),
        linear-gradient(90deg, rgba(12, 5, 2, 0.88) 0%, rgba(12, 5, 2, 0.45) 40%, rgba(12, 5, 2, 0.45) 60%, rgba(12, 5, 2, 0.85) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0) 65%, rgba(0, 0, 0, 0.8) 100%);
}

.sign-in-gate[data-gate-theme="arena"] .gate-embers span {
    background: radial-gradient(circle, #ffe28a 0%, #ff6a00 55%, rgba(255, 106, 0, 0) 75%);
}

.gate-art-arena {
    padding-bottom: 44px;
}

.gate-art-arena .gate-art-box {
    position: relative;
    z-index: 1;
    display: block;
    height: 210px;
    width: auto;
    filter: drop-shadow(0 16px 30px rgba(0, 0, 0, 0.75)) drop-shadow(0 0 22px rgba(255, 120, 0, 0.45));
    animation: gateFloat 5s ease-in-out infinite;
}

.gate-art-arena .gate-art-glow {
    position: absolute;
    left: 50%;
    top: 46%;
    width: 300px;
    height: 300px;
    margin: -150px 0 0 -150px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 150, 0, 0.75) 0%, rgba(255, 80, 0, 0.3) 38%, rgba(255, 80, 0, 0) 68%);
    animation: gatePulse 3.2s ease-in-out infinite;
}

/* Mirror image on the "floor", clipped and faded */
.gate-art-arena .gate-art-reflect {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    overflow: hidden;
    opacity: 0.5;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, transparent 100%);
}

.gate-art-arena .gate-art-reflect img {
    display: block;
    height: 210px;
    width: auto;
    margin: 0 auto;
    transform: scaleY(-1);
    filter: blur(1px);
}

.sign-in-gate[data-gate-theme="arena"] .gate-kicker {
    color: #ff8a1c;
}

.sign-in-gate[data-gate-theme="arena"] .gate-headline {
    background: linear-gradient(180deg, #ffe28a 0%, #ffbf00 45%, #ff6a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.sign-in-gate[data-gate-theme="arena"] .gate-features li {
    background: linear-gradient(180deg, rgba(30, 13, 6, 0.9) 0%, rgba(11, 8, 8, 0.9) 100%);
    border-color: rgba(255, 130, 0, 0.35);
}

.sign-in-gate[data-gate-theme="arena"] .gate-features i {
    background: linear-gradient(180deg, #ffe28a 0%, #ffbf00 50%, #ff6a00 100%);
}

.sign-in-gate[data-gate-theme="arena"] .gate-card {
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 70px rgba(255, 106, 0, 0.25);
}

.sign-in-gate[data-gate-theme="arena"] .gate-card::before {
    background: conic-gradient(from 0deg, rgba(255, 106, 0, 0.1) 0deg, rgba(255, 226, 138, 0.95) 40deg, rgba(255, 106, 0, 0.95) 90deg, rgba(255, 106, 0, 0.1) 150deg, rgba(255, 106, 0, 0.1) 360deg);
}

.sign-in-gate[data-gate-theme="arena"] .gate-card-inner {
    border-radius: 15px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 106, 0, 0.2) 0%, rgba(255, 106, 0, 0) 60%),
        linear-gradient(180deg, rgba(30, 13, 6, 0.95) 0%, rgba(11, 8, 8, 0.96) 100%);
}

.sign-in-gate[data-gate-theme="arena"] .gate-card-crest {
    border-radius: 50%;
    border-color: rgba(255, 140, 0, 0.6);
    background: radial-gradient(circle at 50% 35%, #4a1e06 0%, #160904 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 26px rgba(255, 106, 0, 0.4);
}

/* Forged buttons — the same family as /arena's .arena-btn */
.sign-in-gate[data-gate-theme="arena"] .gate-btn {
    border-radius: 12px;
}

.sign-in-gate[data-gate-theme="arena"] .gate-btn-primary {
    color: #1a0d00;
    background: linear-gradient(180deg, #ffe28a 0%, #ffbf00 45%, #ff6a00 100%);
    border: 1px solid rgba(255, 226, 138, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(120, 40, 0, 0.45), 0 4px 0 #7a2e00, 0 8px 22px rgba(255, 110, 0, 0.35);
}

.sign-in-gate[data-gate-theme="arena"] .gate-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(120, 40, 0, 0.45), 0 5px 0 #7a2e00, 0 12px 28px rgba(255, 120, 0, 0.5);
}

.sign-in-gate[data-gate-theme="arena"] .gate-btn-primary:active {
    transform: translateY(3px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 1px 0 #7a2e00, 0 4px 12px rgba(255, 110, 0, 0.3);
}

.sign-in-gate[data-gate-theme="arena"] .gate-btn-ghost {
    color: var(--gate-gold);
    background: linear-gradient(180deg, rgba(48, 22, 10, 0.95), rgba(18, 11, 9, 0.98));
    border: 1px solid rgba(255, 140, 0, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 191, 0, 0.15), 0 3px 0 #2a1206;
}

.sign-in-gate[data-gate-theme="arena"] .gate-btn-ghost:hover {
    border-color: rgba(255, 191, 0, 0.8);
    box-shadow: inset 0 1px 0 rgba(255, 191, 0, 0.2), 0 4px 0 #2a1206, 0 8px 20px rgba(255, 120, 0, 0.25);
}

/* ── CAMPAIGN: a midnight sky over the road ahead ─────────── */
.sign-in-gate[data-gate-theme="campaign"] {
    --gate-gold: #ffbf00;
    --gate-ember: #8fb8ff;
    --gate-ember-glow: rgba(143, 184, 255, 0.55);
    --gate-text: #ecf0fa;
    --gate-muted: rgba(236, 240, 250, 0.66);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-backdrop {
    background:
        radial-gradient(ellipse 50% 40% at 25% 30%, rgba(70, 105, 200, 0.32) 0%, rgba(70, 105, 200, 0) 70%),
        radial-gradient(ellipse 45% 40% at 80% 75%, rgba(255, 191, 0, 0.08) 0%, rgba(255, 191, 0, 0) 70%),
        linear-gradient(180deg, #0b1228 0%, #070a17 60%, #04050c 100%);
}

/* Fixed star field that slowly twinkles */
.sign-in-gate[data-gate-theme="campaign"] .gate-backdrop::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 22% 62%, #cfe0ff 50%, transparent 51%),
        radial-gradient(2px 2px at 34% 28%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 41% 82%, #cfe0ff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 55% 12%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 63% 47%, #cfe0ff 50%, transparent 51%),
        radial-gradient(2px 2px at 72% 22%, #ffe9a8 50%, transparent 51%),
        radial-gradient(1px 1px at 81% 66%, #fff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 89% 35%, #cfe0ff 50%, transparent 51%),
        radial-gradient(1px 1px at 95% 85%, #fff 50%, transparent 51%),
        radial-gradient(1px 1px at 6% 90%, #cfe0ff 50%, transparent 51%),
        radial-gradient(1.5px 1.5px at 48% 55%, #fff 50%, transparent 51%);
    background-size: 640px 520px;
    animation: gateTwinkle 5s ease-in-out infinite;
}

.sign-in-gate[data-gate-theme="campaign"] .gate-backdrop::after {
    background:
        radial-gradient(ellipse 80% 35% at 50% 110%, rgba(143, 184, 255, 0.14) 0%, rgba(143, 184, 255, 0) 70%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.7) 100%);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-embers span {
    background: radial-gradient(circle, #ffffff 0%, #8fb8ff 50%, rgba(143, 184, 255, 0) 75%);
}

.gate-art-campaign {
    padding: 14px;
}

.gate-art-campaign img {
    position: relative;
    z-index: 1;
    display: block;
    width: 170px;
    height: 170px;
    border-radius: 50%;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 40px rgba(143, 184, 255, 0.4);
    animation: gateFloat 7s ease-in-out infinite;
}

/* Dashed orbit ring with a gold "star" riding it */
.gate-art-campaign .gate-art-orbit {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px dashed rgba(143, 184, 255, 0.5);
    animation: gateSpin 24s linear infinite;
}

.gate-art-campaign .gate-art-orbit::after {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    width: 8px;
    height: 8px;
    margin-left: -4px;
    border-radius: 50%;
    background: #ffe9a8;
    box-shadow: 0 0 12px 3px rgba(255, 191, 0, 0.7);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-kicker {
    color: #8fb8ff;
    text-shadow: 0 0 12px rgba(143, 184, 255, 0.55);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-kicker::before,
.sign-in-gate[data-gate-theme="campaign"] .gate-kicker::after {
    background: linear-gradient(90deg, #8fb8ff, #ffe9a8);
    box-shadow: 0 0 8px rgba(143, 184, 255, 0.7);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-headline {
    font-size: clamp(2.4rem, 5.2vw, 4rem);
    letter-spacing: 4px;
    background: linear-gradient(180deg, #ffe9a8 0%, #ffbf00 60%, #c98a00 100%);
    -webkit-background-clip: text;
    background-clip: text;
    filter: drop-shadow(0 0 16px rgba(255, 191, 0, 0.3));
}

.sign-in-gate[data-gate-theme="campaign"] .gate-tagline {
    color: #a9c6ff;
    font-style: italic;
}

.sign-in-gate[data-gate-theme="campaign"] .gate-features li {
    background: linear-gradient(180deg, rgba(16, 24, 48, 0.9) 0%, rgba(9, 11, 22, 0.92) 100%);
    border-color: rgba(143, 184, 255, 0.28);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-features li:hover {
    border-color: rgba(255, 191, 0, 0.5);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-features i {
    color: #0b1020;
    background: linear-gradient(180deg, #ffe08a 0%, #ffbf00 55%, #d99a00 100%);
    box-shadow: 0 0 14px rgba(255, 191, 0, 0.3);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-card {
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.75), 0 0 60px rgba(70, 105, 200, 0.25);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-card::before {
    background: conic-gradient(from 0deg, rgba(143, 184, 255, 0.1) 0deg, rgba(143, 184, 255, 0.9) 45deg, rgba(255, 191, 0, 0.9) 90deg, rgba(143, 184, 255, 0.1) 150deg, rgba(143, 184, 255, 0.1) 360deg);
    animation-duration: 10s;
}

.sign-in-gate[data-gate-theme="campaign"] .gate-card-inner {
    border-radius: 15px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(143, 184, 255, 0.14) 0%, rgba(143, 184, 255, 0) 60%),
        linear-gradient(180deg, rgba(16, 24, 48, 0.96) 0%, rgba(9, 11, 22, 0.97) 100%);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-card-crest {
    border-radius: 50%;
    border-color: rgba(143, 184, 255, 0.45);
    background: radial-gradient(circle at 50% 35%, #1c2a55 0%, #0b1020 100%);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 26px rgba(143, 184, 255, 0.3);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-divider::before,
.sign-in-gate[data-gate-theme="campaign"] .gate-divider::after {
    background: linear-gradient(90deg, rgba(143, 184, 255, 0), rgba(143, 184, 255, 0.35), rgba(143, 184, 255, 0));
}

/* Storybook buttons — the same family as /campaign's .cp-btn */
.sign-in-gate[data-gate-theme="campaign"] .gate-btn {
    border-radius: 10px;
}

.sign-in-gate[data-gate-theme="campaign"] .gate-btn-primary {
    color: #0b1020;
    background: linear-gradient(180deg, #ffe08a 0%, #ffbf00 55%, #d99a00 100%);
    border: 1px solid rgba(255, 233, 168, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 3px 0 #6b4a00, 0 8px 22px rgba(255, 191, 0, 0.25);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 4px 0 #6b4a00, 0 12px 26px rgba(255, 191, 0, 0.35);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-btn-ghost {
    color: #ffe9a8;
    background: rgba(143, 184, 255, 0.06);
    border: 1px solid rgba(143, 184, 255, 0.45);
}

.sign-in-gate[data-gate-theme="campaign"] .gate-btn-ghost:hover {
    color: #fff;
    background: rgba(143, 184, 255, 0.14);
    border-color: rgba(143, 184, 255, 0.85);
}

@media (max-width: 900px) {
    .gate-hero-art {
        margin-left: auto;
        margin-right: auto;
    }

    .gate-art-arena .gate-art-box,
    .gate-art-arena .gate-art-reflect img {
        height: 190px;
    }

    .gate-art-arena {
        padding-bottom: 40px;
    }

    .gate-art-arena .gate-art-reflect {
        height: 40px;
    }

    .gate-art-hoard img {
        width: 120px;
        height: 120px;
        border-radius: 26px;
    }

    .gate-art-campaign img {
        width: 140px;
        height: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gate-art-hoard img,
    .gate-art-hoard::before,
    .gate-art-arena .gate-art-box,
    .gate-art-arena .gate-art-glow,
    .gate-art-campaign img,
    .gate-art-campaign .gate-art-orbit,
    .sign-in-gate[data-gate-theme="campaign"] .gate-backdrop::before {
        animation: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gate-backdrop-art,
    .gate-embers span,
    .gate-card::before,
    .gate-btn-primary::after,
    .gate-hero,
    .gate-card,
    .gate-features li {
        animation: none !important;
    }

    .gate-embers {
        display: none;
    }
}
