.mt-page {
    --mt-felt: #14352c;
    --mt-felt-deep: #0c241e;
    --mt-cream: #fbf6ec;
    --mt-ink: #241810;
    --mt-gold: #c6a15b;
    --mt-burgundy: #8e1e2d;
    --mt-red: #c90c0f;
    margin: 0;
    min-height: 100vh;
    color: #f8f4ea;
    background:
        radial-gradient(circle at 12% 0%, rgba(198, 161, 91, 0.18), transparent 36%),
        radial-gradient(circle at 90% 10%, rgba(142, 30, 45, 0.28), transparent 42%),
        linear-gradient(180deg, var(--mt-felt) 0%, #1a4a3c 48%, var(--mt-felt-deep) 100%);
    font-family: "Iowan Old Style", Palatino, "Palatino Linotype", Georgia, serif;
}

.mt-page.game-menu-active { overflow-y: auto; overflow-x: hidden; }
.mt-page.game-menu-active #game-header { display: none !important; }
.mt-page .game-screen { display: none; min-height: 100vh; }
.mt-page .game-screen.active { display: block; }

.mt-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

.mt-hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.mt-hud-title {
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: 0.02em;
}

.mt-hud-title span { color: var(--mt-gold); font-style: italic; }

.mt-hud-actions, .mt-banner-actions, .mt-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.mt-chip, .mt-tool, .mt-primary, .mt-ghost, .mt-stat, .mt-info {
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

.mt-chip {
    background: rgba(255, 255, 255, 0.1);
    color: #f8f4ea;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.92rem;
}

.mt-tool, .mt-ghost {
    background: #fff;
    color: var(--mt-burgundy);
    border: 2px solid var(--mt-burgundy);
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    font-weight: 700;
    cursor: pointer;
}

.mt-tool:hover, .mt-ghost:hover, .mt-info:hover {
    background: var(--mt-burgundy);
    color: #fff;
}

.mt-primary {
    background: var(--mt-red);
    color: #fff;
    border: 2px solid var(--mt-red);
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.mt-primary:hover { background: #a00a0c; border-color: #a00a0c; color: #fff; }
.mt-primary:disabled, .mt-tool:disabled, .mt-stat:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.mt-arena {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(220px, 280px) minmax(260px, 1fr);
    gap: 1rem;
    align-items: start;
}

.mt-side { display: flex; flex-direction: column; align-items: center; gap: 0.55rem; }
.mt-side h2 {
    margin: 0;
    font-size: 1.15rem;
    text-align: center;
}
.mt-side p { margin: 0; color: rgba(248, 244, 234, 0.82); font-family: "Segoe UI", Arial, sans-serif; }

.mt-card {
    width: min(100%, 340px);
    background: var(--mt-cream);
    color: var(--mt-ink);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(198, 161, 91, 0.55);
    position: relative;
}

.mt-card.is-yours { box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 0 0 3px var(--mt-gold); }

.mt-art {
    height: 230px;
    background: #e7d3ae center/cover no-repeat;
    position: relative;
}

.mt-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; display: block; }

.mt-card-body { padding: 0.85rem 0.9rem 0.95rem; }
.mt-card-body h3 { margin: 0; font-size: 1.35rem; line-height: 1.15; }
.mt-dates { margin: 0.15rem 0 0.35rem; color: #6d5844; font-family: "Segoe UI", Arial, sans-serif; font-size: 0.92rem; }
.mt-known { margin: 0 0 0.7rem; font-size: 0.95rem; line-height: 1.35; }

.mt-stat-row { display: flex; gap: 0.35rem; margin-top: 0.35rem; }
.mt-stat {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
    background: #fff;
    color: var(--mt-ink);
    border: 1px solid #e4d3b8;
    border-radius: 10px;
    min-height: 44px;
    padding: 0.4rem 0.65rem;
    cursor: pointer;
    font-size: 0.98rem;
}
.mt-stat strong { font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.mt-stat:hover:not(:disabled) { background: #f3e2c4; color: var(--mt-ink); }
.mt-stat.is-win { background: #1f7a45; color: #fff; border-color: #1f7a45; }
.mt-stat.is-lose { background: #f4d6d6; color: #4a1515; border-color: #e3b4b4; }
.mt-stat.is-draw { background: #d9e6f7; color: #142033; border-color: #b7cbe8; }
.mt-info {
    width: 44px;
    background: #fff;
    color: var(--mt-burgundy);
    border: 1px solid #e4d3b8;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

.mt-back {
    min-height: 460px;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 50% 42%, rgba(198, 161, 91, 0.35), transparent 46%),
        repeating-linear-gradient(135deg, #6f1824 0 14px, #8e1e2d 14px 28px);
    color: #f8f4ea;
    text-align: center;
    padding: 1.5rem;
}
.mt-back strong { display: block; font-size: 1.8rem; letter-spacing: 0.04em; }
.mt-back span { display: block; margin-top: 0.35rem; color: var(--mt-gold); font-family: "Segoe UI", Arial, sans-serif; }

.mt-centre { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 2.5rem; }
.mt-banner {
    background: rgba(12, 36, 30, 0.72);
    border: 1px solid rgba(198, 161, 91, 0.45);
    border-radius: 16px;
    padding: 0.9rem;
    color: #f8f4ea;
}
.mt-banner h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.mt-banner p { margin: 0 0 0.75rem; line-height: 1.4; font-family: "Segoe UI", Arial, sans-serif; }
.mt-detail {
    background: #fff;
    color: var(--mt-ink);
    border-radius: 12px;
    padding: 0.75rem 0.85rem;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.92rem;
    line-height: 1.4;
}

.mt-pass {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(8, 20, 16, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.mt-pass[hidden] { display: none; }
.mt-pass-card {
    max-width: 460px;
    background: var(--mt-cream);
    color: var(--mt-ink);
    border-radius: 18px;
    padding: 1.5rem;
    text-align: center;
}
.mt-pass-card h2 { margin: 0 0 0.4rem; color: var(--mt-burgundy); }
.mt-pass-card p { margin: 0 0 1rem; }
.mt-pass-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
}

.mt-page .modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    z-index: 12000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.mt-page .modal.active { display: flex; }
.mt-page .party-overlay { z-index: 13000; }
.mt-page .modal-content {
    background: #fff;
    color: #1a1a1a;
    border-radius: 1rem;
    max-width: 720px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
}
.mt-page .modal-header, .mt-page .modal-footer {
    padding: 1rem 1.2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.mt-page .modal-header { border-bottom: 2px solid #eee; }
.mt-page .modal-header h2 { margin: 0; color: var(--mt-red); font-size: 1.3rem; }
.mt-page .modal-body { padding: 1rem 1.2rem 1.2rem; }
.mt-page .modal-footer { border-top: 2px solid #eee; justify-content: flex-end; }
.mt-page .modal-close {
    background: #fff;
    color: var(--mt-red);
    border: 2px solid var(--mt-red);
    border-radius: 8px;
    cursor: pointer;
    padding: 0.35rem 0.55rem;
}
.mt-page .modal-close:hover { background: var(--mt-red); color: #fff; }
.mt-page .help-section { margin-bottom: 1rem; }
.mt-page .help-section h3 { margin: 0 0 0.35rem; color: var(--mt-red); }
.mt-page .help-section ul { margin: 0.3rem 0 0; padding-left: 1.2rem; }

.mt-pack {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.7rem;
}
.mt-pack button {
    background: #fff;
    color: var(--mt-ink);
    border: 1px solid #e4d3b8;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
}
.mt-pack img { width: 100%; height: 110px; object-fit: cover; object-position: center 15%; display: block; }
.mt-pack span { display: block; padding: 0.4rem 0.5rem 0.55rem; font-weight: 700; }

.mt-settings { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.8rem; }
.mt-pill {
    background: #fff;
    color: var(--mt-burgundy);
    border: 2px solid var(--mt-burgundy);
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    cursor: pointer;
}
.mt-pill.is-on, .mt-pill:hover { background: var(--mt-burgundy); color: #fff; }
.mt-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
}
.mt-stat-card {
    background: #fbf6ec;
    color: var(--mt-ink);
    border-radius: 12px;
    padding: 0.7rem;
    text-align: center;
}
.mt-stat-card strong { display: block; font-size: 1.4rem; }

.mt-fly {
    position: fixed;
    inset: 0;
    z-index: 30;
    overflow: hidden;
    pointer-events: none;
}
.mt-fly-item {
    position: absolute;
    left: 0;
    top: var(--mt-top, 20%);
    width: var(--mt-size, 84px);
    height: var(--mt-size, 84px);
    opacity: 0.5;
    animation-duration: var(--mt-dur, 3.4s);
    animation-delay: var(--mt-delay, 0s);
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}
.mt-fly-item svg { width: 100%; height: 100%; display: block; overflow: visible; }
.mt-fly-right { animation-name: mt-sail-right; }
.mt-fly-left { animation-name: mt-sail-left; }
@keyframes mt-sail-right {
    0% { transform: translate3d(-28vw, 0, 0) rotate(-14deg); }
    40% { transform: translate3d(38vw, -28px, 0) rotate(8deg); }
    100% { transform: translate3d(118vw, 12px, 0) rotate(16deg); }
}
@keyframes mt-sail-left {
    0% { transform: translate3d(118vw, 0, 0) rotate(12deg); }
    45% { transform: translate3d(42vw, 26px, 0) rotate(-10deg); }
    100% { transform: translate3d(-28vw, -8px, 0) rotate(-16deg); }
}
@media (prefers-reduced-motion: reduce) {
    .mt-fly { display: none; }
}

@media (max-width: 860px) {
    .mt-arena { grid-template-columns: 1fr; }
    .mt-centre { padding-top: 0; }
    .mt-art { height: 190px; }
    .mt-back { min-height: 280px; }
    .mt-side-opp { order: 1; }
    .mt-centre { order: 2; }
    .mt-side-you { order: 3; }
}
