/*
 * ============================================
 * MayaSim - Business Simulation Platform
 * ============================================
 * @product    MayaSim
 * @module     Play Interface
 * @file       app.css
 * @version    1.0.0
 * @since      2026-04-12
 * @modified   2026-04-12
 */

:root {
    --play-bg: #091a0d;
    --play-bg-2: #102316;
    --play-card: #ffffff;
    --play-surface: #f5f8f5;
    --play-surface-2: #f9fbf9;
    --play-text: #091a0d;
    --play-muted: #a0b0a0;
    --play-brand: #c9a84c;
}

html,
body {
    touch-action: pan-y;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
}

.play-notice-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: min(420px, calc(100vw - 2rem));
    z-index: 1400;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.play-notice {
    display: grid;
    grid-template-columns: 40px 1fr 28px;
    gap: 0.8rem;
    align-items: start;
    padding: 0.9rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(9, 26, 13, 0.08);
    background: #ffffff;
    box-shadow: 0 14px 36px rgba(9, 26, 13, 0.12);
    color: #091a0d;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.play-notice.is-leaving { opacity: 0; transform: translateY(-6px); }
.play-notice--success { border-color: rgba(22, 163, 74, 0.18); }
.play-notice--error { border-color: rgba(190, 24, 93, 0.18); }
.play-notice--warning { border-color: rgba(201, 168, 76, 0.28); }

.play-notice-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f8f5;
    color: #091a0d;
}

.play-notice--success .play-notice-icon { background: rgba(22, 163, 74, 0.1); color: #166534; }
.play-notice--error .play-notice-icon { background: rgba(190, 24, 93, 0.08); color: #9f1239; }
        appearance: textfield;
        -moz-appearance: textfield;
    }

    .pin-digit::-webkit-outer-spin-button,
    .pin-digit::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.play-notice-content { min-width: 0; }
.play-notice-title { font-size: 0.84rem; font-weight: 700; color: #091a0d; }
.play-notice-message { margin-top: 0.2rem; font-size: 0.76rem; line-height: 1.55; color: #647564; }

.play-notice-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #90a090;
    cursor: pointer;
}

.play-notice-close:hover { background: #f5f8f5; color: #091a0d; }

.play-notice-actions {
    grid-column: 2 / 4;
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.35rem;
}

.play-notice-btn {
    min-height: 36px;
    border-radius: 9px;
    padding: 0 0.9rem;
    border: 1px solid rgba(9, 26, 13, 0.1);
    background: #ffffff;
    color: #091a0d;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
}

.play-notice-btn--solid { background: #091a0d; color: #c9a84c; border-color: #091a0d; }
.play-notice-btn--ghost { background: #f5f8f5; }

@media (max-width: 767px) {
    .play-notice-stack {
        top: auto;
        bottom: 1rem;
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
    }
}

.play-wordmark {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.play-wordmark .maya {
    color: #091a0d;
}

.play-wordmark .sim {
    color: #c9a84c;
}

.play-entry-body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background:
        radial-gradient(420px 420px at 85% 12%, rgba(201, 168, 76, 0.12) 0%, rgba(201, 168, 76, 0) 70%),
        linear-gradient(180deg, var(--play-bg) 0%, var(--play-bg-2) 100%);
}

.play-card {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    padding: 2rem 1.75rem;
    box-shadow: 0 24px 64px rgba(5, 18, 8, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.play-entry-wordmark {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 0.25rem;
}

.play-sub {
    text-align: center;
    font-size: 0.75rem;
    color: #a0b0a0;
    margin-bottom: 1.75rem;
    font-weight: 300;
}

.play-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.9rem;
    line-height: 0.98;
    color: #091a0d;
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 0.35rem;
}

.play-section-copy {
    font-size: 0.75rem;
    color: #a0b0a0;
    margin-bottom: 1.25rem;
    font-weight: 300;
    line-height: 1.6;
}

.play-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: #091a0d;
    text-transform: uppercase;
    letter-spacing: 0.06rem;
    margin-bottom: 0.35rem;
}

.play-input {
    width: 100%;
    background: #f5f8f5;
    border: 1.5px solid rgba(9, 26, 13, 0.1);
    border-radius: 10px;
    padding: 0.7rem 0.9rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: #091a0d;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
    min-height: 48px;
}

.play-input:focus {
    border-color: #c9a84c;
    background: #fff;
}

.play-input.token-input {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.18rem;
    text-align: center;
    text-transform: uppercase;
}

.play-hint {
    font-size: 0.67rem;
    color: #a0b0a0;
    margin-top: 0.3rem;
}

.play-mb {
    margin-bottom: 1rem;
}

.pin-row {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.4rem;
}

.pin-digit {
    width: 56px;
    height: 64px;
    border: 1.5px solid rgba(9, 26, 13, 0.12);
    border-radius: 10px;
    background: #f5f8f5;
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #091a0d;
    text-align: center;
    outline: none;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.pin-digit:focus {
    border-color: #c9a84c;
    background: #fff;
}

.color-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2.5px solid transparent;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.color-swatch.selected {
    border-color: #c9a84c;
    transform: scale(1.15);
}

.color-swatch:hover {
    transform: scale(1.1);
}

.play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: #091a0d;
    color: #c9a84c;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06rem;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 11px;
    cursor: pointer;
    min-height: 52px;
    margin-top: 1.25rem;
    transition: opacity 0.2s ease;
}

.play-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.play-btn:hover:not(:disabled) {
    opacity: 0.88;
}

.play-btn-ghost {
    background: transparent;
    color: #091a0d;
    border: 1.5px solid rgba(9, 26, 13, 0.15);
    margin-top: 0.5rem;
}

.play-btn-ghost:hover:not(:disabled) {
    background: #f5f8f5;
}

.play-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.play-divider::before,
.play-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(9, 26, 13, 0.08);
}

.play-divider span {
    font-size: 0.7rem;
    color: #a0b0a0;
    white-space: nowrap;
}

.play-session-banner {
    background: #f5f8f5;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.play-session-banner i {
    color: #c9a84c;
    font-size: 1rem;
    flex-shrink: 0;
}

.play-session-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #091a0d;
}

.play-session-meta {
    font-size: 0.7rem;
    color: #a0b0a0;
    margin-top: 0.1rem;
}

.play-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.3);
}

.play-panel-body {
    background: #f5f8f5;
}

.play-topbar {
    background: #091a0d;
    color: #fff;
    padding: calc(env(safe-area-inset-top) + 0.65rem) 1rem 0.65rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 0.5rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    min-height: 54px;
    box-shadow: 0 8px 20px rgba(5, 18, 8, 0.15);
}

.play-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    overflow: hidden;
}

.play-topbar-meta {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    justify-content: center;
    min-width: 0;
}

.play-sim-chip {
    max-width: min(360px, 52vw);
    display: inline-block;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.04rem;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 0.26rem 0.55rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.play-status-badge {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.03rem;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.26rem 0.52rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.play-status-badge::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.play-status-badge.active {
    color: #d1fae5;
    background: rgba(34, 197, 94, 0.14);
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.play-status-badge.active::before {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.24);
}

.play-status-badge.paused {
    color: #fef3c7;
    background: rgba(245, 158, 11, 0.16);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.play-status-badge.paused::before {
    background: #f59e0b;
}

.play-status-badge.completed {
    color: #e5e7eb;
    background: rgba(107, 124, 107, 0.24);
    border: 1px solid rgba(163, 175, 163, 0.35);
}

.play-status-badge.completed::before {
    background: #a3afa3;
}

.play-panel-wordmark {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.play-panel-wordmark .maya {
    color: #ffffff;
}

.play-panel-wordmark .sim {
    color: #c9a84c;
}

.play-topbar-team {
    font-size: 0.78rem;
    font-weight: 600;
    color: #c9a84c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: clamp(130px, 34vw, 360px);
}

.play-topbar-session {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.05rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: clamp(130px, 34vw, 360px);
}

.play-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

@media (max-width: 980px) {
    .play-topbar {
        grid-template-columns: 1fr auto 1fr;
    }

    .play-sim-chip {
        display: none;
    }
}

@media (max-width: 640px) {
    .play-topbar {
        grid-template-columns: 1fr auto;
    }

    .play-topbar-meta {
        justify-content: flex-end;
    }

    .play-sim-chip {
        display: none;
    }
}

@media (max-width: 560px) {
    .play-topbar-team,
    .play-topbar-session {
        max-width: 42vw;
    }

    .play-status-badge {
        font-size: 0.58rem;
        padding: 0.22rem 0.45rem;
    }
}

.play-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    animation: ppulse 2s infinite;
}

@keyframes ppulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.play-status-dot.paused {
    background: #f59e0b;
}

.play-status-dot.completed {
    background: #6b7c6b;
    animation: none;
}

.play-logout-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0.3rem 0.5rem;
    border-radius: 6px;
    min-height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-logout-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.play-content {
    padding: calc(4.35rem + env(safe-area-inset-top)) 1rem 1.25rem;
    max-width: 680px;
    margin: 0 auto;
}

.play-not-found {
    text-align: center;
    padding: 3rem 1rem;
    color: #a0b0a0;
}

.play-not-found i {
    font-size: 2rem;
    color: #c9a84c;
    display: block;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .play-content {
        padding: calc(4.55rem + env(safe-area-inset-top)) 1.5rem 1.75rem;
    }
}

@media (max-width: 360px) {
    .pin-digit {
        width: 48px;
        height: 58px;
        font-size: 1.3rem;
    }
}