/* =========================================================
   Global Flash — canonical shared component
   UI-CSS-001c2: extracted 1:1 from app/views/layout/flash.php.
   No visual redesign; session/global runtime notifications only.
========================================================= */

.st-global-flash-stack {
    position: fixed;
    top: 24px;
    right: clamp(16px, 2vw, 28px);
    z-index: 99999;
    width: min(410px, calc(100vw - 32px));
    display: grid;
    gap: 12px;
    pointer-events: none;
}

.st-global-flash-stack.is-game {
    top: calc(var(--game-shell-offset-block, 0px) + 112px);
    right: calc(var(--game-shell-offset-inline, 0px) + clamp(18px, 2.2vw, 36px));
    width: min(410px, calc(var(--game-shell-current-width, 100vw) - 132px));
}

.st-global-flash-stack.is-auth {
    top: 18px;
}

.st-global-flash {
    position: relative;
    opacity: 0;
    transform: translate3d(24px, 0, 0);
    transition: opacity .24s ease, transform .24s ease, filter .24s ease;
    pointer-events: auto;
    overflow: hidden;
}

.st-global-flash.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.st-global-flash.is-leaving {
    opacity: 0;
    transform: translate3d(22px, -6px, 0);
    filter: blur(1px);
}

.st-global-flash__dismiss {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: -2px -4px 0 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .18s ease;
}

.st-global-flash__dismiss:hover,
.st-global-flash__dismiss:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: scale(1.04);
    outline: none;
}

.st-global-flash__title {
    display: block;
    margin: 0 0 4px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.st-global-flash__text {
    display: block;
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.45;
    word-break: break-word;
}

/* Arcane Glass */
.st-global-flash--glass {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(137, 104, 255, 0.30);
    background: rgba(10, 14, 28, 0.72);
    color: #f4f1ff;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(7, 10, 20, 0.42), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}

.st-global-flash--glass::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(94, 237, 160, 0.98) 0%, rgba(72, 196, 211, 0.92) 100%);
    box-shadow: 0 0 16px rgba(94, 237, 160, 0.42);
}

.st-global-flash--glass .st-global-flash__icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1;
    color: #b9ffd2;
    background: rgba(89, 211, 140, 0.14);
    border: 1px solid rgba(89, 211, 140, 0.20);
}

.st-global-flash--glass .st-global-flash__body {
    min-width: 0;
    flex: 1 1 auto;
}

.st-global-flash--glass .st-global-flash__title {
    color: rgba(232, 226, 255, 0.78);
}

.st-global-flash--glass .st-global-flash__text {
    color: #f7f4ff;
}

.st-global-flash--glass.is-info::before {
    background: linear-gradient(180deg, rgba(93, 180, 255, 0.98) 0%, rgba(163, 125, 255, 0.92) 100%);
    box-shadow: 0 0 16px rgba(93, 180, 255, 0.28);
}

.st-global-flash--glass.is-info .st-global-flash__icon {
    color: #d3eaff;
    background: rgba(93, 180, 255, 0.14);
    border-color: rgba(93, 180, 255, 0.20);
}

/* RPG Notice */
.st-global-flash--notice {
    padding: 15px 18px 15px 52px;
    border-radius: 16px 22px 16px 22px;
    border: 1px solid rgba(255, 215, 123, 0.33);
    color: #fff7da;
    background:
        linear-gradient(135deg, rgba(74, 43, 18, 0.40), rgba(12, 13, 26, 0.76)),
        rgba(12, 10, 16, 0.70);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34), 0 0 26px rgba(255, 215, 123, 0.10);
}

.st-global-flash--notice::before {
    content: attr(data-st-icon);
    position: absolute;
    left: 15px;
    top: 15px;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 50% 50% 50% 8px;
    font-size: 16px;
    font-weight: 950;
    color: #2b1c07;
    background: #ffd77b;
    box-shadow: 0 0 14px rgba(255, 215, 123, 0.18);
}

.st-global-flash--notice .st-global-flash__body {
    min-width: 0;
    padding-right: 18px;
}

.st-global-flash--notice .st-global-flash__title {
    color: rgba(255, 231, 171, 0.88);
}

.st-global-flash--notice .st-global-flash__text {
    color: #fff7da;
}

.st-global-flash--notice .st-global-flash__dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
}

.st-global-flash--notice.is-warning,
.st-global-flash--notice.is-notice {
    border-color: rgba(255, 215, 123, 0.33);
}

.st-global-flash--notice.is-warning::before,
.st-global-flash--notice.is-notice::before {
    background: #ffd77b;
    color: #2b1c07;
}

.st-global-flash--notice.is-error {
    border-color: rgba(255, 126, 155, 0.33);
    color: #ffe5ec;
    background:
        linear-gradient(135deg, rgba(88, 24, 38, 0.42), rgba(12, 13, 26, 0.80)),
        rgba(12, 10, 16, 0.74);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34), 0 0 26px rgba(255, 126, 155, 0.10);
}

.st-global-flash--notice.is-error::before {
    background: #ff8aa5;
    color: #3c0d17;
    box-shadow: 0 0 14px rgba(255, 126, 155, 0.20);
}

.st-global-flash--notice.is-error .st-global-flash__title {
    color: rgba(255, 213, 224, 0.90);
}

.st-global-flash--notice.is-error .st-global-flash__text {
    color: #ffe9ef;
}

@media (max-width: 900px) {
    .st-global-flash-stack.is-game {
        top: calc(var(--game-shell-offset-block, 0px) + 92px);
        right: calc(var(--game-shell-offset-inline, 0px) + 16px);
        width: min(410px, calc(var(--game-shell-current-width, 100vw) - 32px));
    }
}

@media (max-width: 640px) {
    .st-global-flash-stack,
    .st-global-flash-stack.is-auth {
        top: 84px;
        right: 12px;
        left: 12px;
        width: auto;
    }

    .st-global-flash-stack.is-game {
        top: calc(var(--game-shell-offset-block, 0px) + 84px);
        right: calc(var(--game-shell-offset-inline, 0px) + 12px);
        left: calc(var(--game-shell-offset-inline, 0px) + 12px);
        width: auto;
    }

    .st-global-flash-stack.is-admin {
        top: 14px;
    }

    .st-global-flash--glass {
        padding: 13px 15px;
        border-radius: 16px;
    }

    .st-global-flash--notice {
        padding: 14px 16px 14px 48px;
        border-radius: 16px 18px 16px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .st-global-flash {
        transition: none;
    }
}
