:root {
    --bg-1: #0b1020;
    --bg-2: #101a2f;
    --card: #151f38;
    --card-hover: #1b2748;
    --text: #ecf2ff;
    --muted: #b6c4e5;
    --brand: #61a8ff;
    --brand-2: #89e3ff;
    --accent: #6cf9ca;
    --danger: #ff8a5b;
    --success: #5ae9a5;
    --ring: 0 0 0 2px rgba(137, 227, 255, 0.35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
        sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 20%, #15213b, var(--bg-1) 38%, #070d1c 100%);
    line-height: 1.45;
}

.mdc-shell {
    width: min(1060px, calc(100% - 2rem));
    margin: 1.5rem auto 2rem;
}

.mdc-header {
    background: linear-gradient(135deg, #102040cc, #0f1b35cc);
    border: 1px solid #2a3f6e;
    border-radius: 18px;
    padding: 1.2rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(8px);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 0.4rem;
    color: var(--brand-2);
    font-weight: 700;
    font-size: 0.74rem;
}

.mdc-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.3rem);
}

.subhead {
    margin: 0.55rem 0 0.4rem;
    max-width: 72ch;
}

.note,
.hint,
small {
    color: var(--muted);
}

main {
    display: grid;
    gap: 1rem;
}

.panel {
    background: linear-gradient(180deg, #121d35, var(--card));
    border: 1px solid #2c3e64;
    border-radius: 16px;
    padding: 1rem;
}

.panel h2 {
    margin: 0 0 0.8rem;
    color: #f6fbff;
    font-size: 1.15rem;
}

.state-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
    color: var(--muted);
}

input[type="number"] {
    width: 100%;
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid #36508a;
    background: #081227;
    color: var(--text);
    padding: 0 0.65rem;
    font-size: 1rem;
    outline: none;
}

input[type="number"]:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--ring);
}

.set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 0.7rem;
}

.set-grid .set-card {
    border: 1px solid #324977;
    border-radius: 12px;
    background: #0c1731;
    padding: 0.7rem;
}

.set-card small {
    display: block;
    color: var(--muted);
    margin-bottom: 0.45rem;
}

.set-card label {
    margin: 0;
}

.set-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px dashed #3d5b9a;
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    margin-top: 0.5rem;
    color: var(--brand-2);
    font-size: 0.82rem;
}

.hand-grid {
    display: grid;
    gap: 0.7rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.card-group {
    border-radius: 12px;
    border: 1px solid #334873;
    background: #0f1b35;
    padding: 0.8rem;
}

.card-group h3 {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    color: #d7e6ff;
}

.card-row {
    display: grid;
    grid-template-columns: 1fr 110px;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.card-row:last-child {
    margin-bottom: 0;
}

.card-name {
    font-size: 0.93rem;
    color: var(--text);
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.btn {
    border: 1px solid #3a5e9b;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(180deg, #2b7de1, #1f69c7);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(1.07);
}

.btn-secondary {
    background: #132447;
    color: #d6e7ff;
}

.move {
    border: 1px solid #325b93;
    border-radius: 12px;
    padding: 0.8rem;
    margin-bottom: 0.7rem;
    background: #0f1b35;
}

.move:last-child {
    margin-bottom: 0;
}

.move h3 {
    margin: 0 0 0.35rem;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

.pill {
    background: #123f79;
    color: #cff8ff;
    border-radius: 999px;
    padding: 0.2rem 0.62rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

.move p {
    margin: 0 0 0.45rem;
    color: #d6e4ff;
}

.play-list {
    margin: 0;
    padding-left: 1.2rem;
}

.play-list li {
    margin-bottom: 0.2rem;
    color: #bcd4ff;
}

.empty-state {
    border: 1px dashed #2f4d7e;
    border-radius: 12px;
    padding: 0.9rem;
    color: var(--muted);
    text-align: center;
}

@media (max-width: 760px) {
    .mdc-shell {
        width: calc(100% - 1rem);
        margin: 0.75rem auto 1.2rem;
    }

    .card-row {
        grid-template-columns: 1fr;
    }

    .panel,
    .mdc-header {
        border-radius: 12px;
    }
}
