/* ============================================================
   인게임 토스트 알림 (업적/도감 달성)
   ============================================================ */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90vw;
}

.toast-msg {
    background: rgba(0, 0, 0, 0.88);
    color: #ffcc00;
    padding: 14px 28px;
    border-radius: 10px;
    border: 1px solid rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.3);
    font-size: 0.92rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.4;
    word-break: keep-all;
    overflow-wrap: break-word;
    animation: toastFadeInOut 3.5s ease forwards;
    pointer-events: none;
}

@keyframes toastFadeInOut {
    0%   { opacity: 0; transform: translateY(24px) scale(0.95); }
    8%   { opacity: 1; transform: translateY(0) scale(1); }
    75%  { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-16px) scale(0.97); }
}

.toast-error {
    color: #ff6b6b;
    border: 1px solid rgba(255, 77, 77, 0.6);
    box-shadow: 0 0 20px rgba(255, 77, 77, 0.3);
}

/* ────────────────────────────────────────────────────────
   모바일 사이즈 — 게임 화면 (body.mobile-layout) 용
   ──────────────────────────────────────────────────────── */
body.mobile-layout .toast-container {
    max-width: 96vw;
    width: 96vw;
}
body.mobile-layout .toast-msg {
    padding: 12px 14px;
    font-size: 0.88rem;
}

/* ────────────────────────────────────────────────────────
   index/signup 페이지는 mobile-layout 클래스가 안 붙으므로
   (scale.js 가 main.html 에서만 로드) viewport 폭 분기 유지.
   HANDOFF § 15-1 "main 페이지만 작업, 그 외는 현행 유지".
   ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .toast-container {
        max-width: 96vw;
        width: 96vw;
    }
    .toast-msg {
        padding: 12px 14px;
        font-size: 0.88rem;
    }
}