body.ee-open { overflow: hidden; }

.ee-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background-color: rgba(1, 4, 9, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    font-family: ui-monospace, SFMono-Regular, Consolas, 'Liberation Mono', monospace;
}

.ee-box {
    width: 100%;
    max-width: 720px;
    max-height: 100%;
    overflow-y: auto;
    background-color: #0D1117;
    border: 1px solid #30363D;
    border-radius: 8px;
    color: #C9D1D9;
}

.ee-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #30363D;
    background-color: #161B22;
}

.ee-title { font-size: 0.9rem; color: #E6EDF3; }

.ee-close {
    background: none;
    border: 1px solid #30363D;
    border-radius: 6px;
    color: #C9D1D9;
    font: inherit;
    font-size: 0.8rem;
    padding: 4px 10px;
    cursor: pointer;
}
.ee-close:hover { background-color: #21262D; }

.ee-body { padding: 20px 16px; }

.ee-screen { text-align: center; padding: 12px 0; }
.ee-kicker { font-size: 0.78rem; color: #8B949E; margin-bottom: 8px; }
.ee-ok { color: #2EA043; }
.ee-bad { color: #E5533D; }
.ee-h { font-family: inherit; font-size: 1.3rem; color: #FFFFFF; margin-bottom: 12px; letter-spacing: 0; }
.ee-p { font-size: 0.9rem; line-height: 1.6; max-width: 480px; margin: 0 auto 20px; color: #C9D1D9; }

.ee-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }

.ee-btn {
    font: inherit;
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #30363D;
    background-color: #21262D;
    color: #E6EDF3;
    cursor: pointer;
}
.ee-btn:hover:not(:disabled) { background-color: #30363D; }
.ee-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.ee-primary { background-color: #1F6FEB; border-color: #1F6FEB; color: #FFFFFF; }
.ee-primary:hover:not(:disabled) { background-color: #1A5FCC; }

.ee-btn:focus-visible, .ee-close:focus-visible, .ee-card:focus-visible {
    outline: 2px solid #388BFD;
    outline-offset: 2px;
}

.ee-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 14px; }
.ee-side-name { font-size: 0.85rem; color: #E6EDF3; margin-bottom: 8px; }
.ee-stat { margin-bottom: 8px; }
.ee-stat-head { display: flex; justify-content: space-between; font-size: 0.75rem; color: #8B949E; margin-bottom: 3px; }
.ee-track { height: 8px; background-color: #21262D; border-radius: 4px; overflow: hidden; }
.ee-fill { height: 100%; width: 0; transition: width 0.3s ease; }
.ee-hp-you { background-color: #2EA043; }
.ee-hp-foe { background-color: #E5533D; }
.ee-energy { background-color: #1F6FEB; }
.ee-shield { font-size: 0.75rem; color: #9DA7B3; min-height: 1.1em; }

.ee-log {
    height: 130px;
    overflow-y: auto;
    background-color: #010409;
    border: 1px solid #30363D;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.5;
    margin-bottom: 14px;
}
.ee-log-line { color: #8B949E; }
.ee-sys { color: #9DA7B3; }
.ee-you { color: #3FB950; }
.ee-foe { color: #F0883E; }
.ee-warn { color: #E5533D; }
.ee-info { color: #D29922; }

.ee-hand { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 8px; }

.ee-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    font: inherit;
    padding: 28px 10px 10px;
    background-color: #161B22;
    color: #E6EDF3;
    border: 1px solid #30363D;
    border-radius: 6px;
    cursor: pointer;
    min-height: 110px;
}
.ee-card:hover:not(:disabled) { border-color: #58A6FF; }
.ee-card:disabled { opacity: 0.4; cursor: not-allowed; }
.ee-card-attack { border-top: 3px solid #E5533D; }
.ee-card-shield { border-top: 3px solid #1F6FEB; }
.ee-card-heal { border-top: 3px solid #2EA043; }
.ee-card-cost {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 0.75rem;
    color: #8B949E;
}
.ee-card-name { font-size: 0.85rem; font-weight: 700; }
.ee-card-text { font-size: 0.72rem; color: #8B949E; line-height: 1.4; }

@media (max-width: 560px) {
    .ee-hand { grid-template-columns: 1fr 1fr; }
    .ee-stats { grid-template-columns: 1fr; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
    .ee-fill { transition: none; }
}
