:root {
    --bg: #ffffff;
    --bg-accent: #f5f5f5;
    --ink: #111111;
    --muted: #5f5f5f;
    --accent: #d32f2f;
    --accent-strong: #b71c1c;
    --highlight: #ff5252;
    --card: #ffffff;
    --border: #e2e2e2;
    --success: #2fbf71;
    --danger: #d32f2f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Work Sans', sans-serif;
    color: var(--ink);
    background: var(--bg);
}

body.modal-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1100px, 92%);
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    background: #ffffff;
    backdrop-filter: none;
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
}

.brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

main {
    padding: 32px 0 60px;
}

.hero {
    display: grid;
    gap: 28px;
    align-items: center;
    margin-top: 10px;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 3vw, 3rem);
    margin: 0 0 12px;
}

.hero .lead {
    font-size: 1.05rem;
    color: var(--muted);
}

.hero-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.2);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn.ghost {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
}

.btn.ghost.danger {
    border-color: rgba(211, 47, 47, 0.5);
    color: var(--danger);
}

.btn.ghost.danger:hover {
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.12);
}

.btn.small {
    padding: 8px 14px;
    font-size: 0.85rem;
}

.checkbox-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-weight: 600;
}

.checkbox-field input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.table-checkbox {
    display: inline-flex;
    align-items: center;
}

.table-checkbox input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.section {
    margin-top: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.section-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    margin: 0;
}

.card-grid {
    display: grid;
    gap: 18px;
    margin-top: 20px;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.show-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.show-card h3,
.show-card p {
    margin: 0;
}

.show-card .budget-line,
.show-card .lineup-confirmed,
.show-card .lineup-summary {
    margin: 0;
}

.show-card .pill {
    align-self: flex-start;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.show-card .card-actions {
    margin-top: auto;
}

.muted {
    color: var(--muted);
}

.help-text {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
}

.budget-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 6px 0 0;
    flex-wrap: wrap;
}

.budget-line strong {
    font-weight: 600;
}

.lineup-summary {
    margin: 10px 0 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.lineup-summary strong {
    color: var(--ink);
    font-weight: 600;
}

.lineup-confirmed {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.lineup-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: rgba(47, 191, 113, 0.15);
    color: var(--success);
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid rgba(47, 191, 113, 0.4);
}

.show-info {
    line-height: 1.6;
}

.show-info a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    background: var(--bg-accent);
    color: var(--ink);
}

.pill-open {
    background: rgba(31, 122, 90, 0.08);
    color: var(--success);
}

.pill-locked {
    background: rgba(178, 54, 40, 0.08);
    color: var(--danger);
}

.pill-scored {
    background: rgba(31, 122, 90, 0.12);
    color: var(--success);
}

.pill-title {
    background: rgba(211, 47, 47, 0.08);
    color: var(--accent-strong);
}

.flash {
    padding: 12px 16px;
    text-align: center;
    font-weight: 600;
}

.flash.success {
    background: rgba(47, 191, 113, 0.08);
    color: var(--success);
}

.flash.error {
    background: rgba(211, 47, 47, 0.08);
    color: var(--danger);
}

.auth-card {
    max-width: 420px;
    margin: 0 auto;
    background: var(--card);
    border-radius: 18px;
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.auth-card h2 {
    font-family: 'Space Grotesk', sans-serif;
    margin-top: 0;
}

label {
    display: block;
    margin-bottom: 14px;
    font-weight: 600;
}

input[type="text"],
input[type="search"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
input[type="number"],
select,
textarea {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--ink);
    font-family: 'Work Sans', sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="datetime-local"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(211, 47, 47, 0.6);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.12);
}

textarea {
    resize: vertical;
    min-height: 110px;
}

input::placeholder {
    color: var(--muted);
}

.show-hero {
    display: grid;
    gap: 24px;
    align-items: center;
}

.status-line {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 6px;
    flex-wrap: wrap;
}

.market-info {
    position: relative;
    display: inline-flex;
}

.market-info summary {
    list-style: none;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.market-info summary::-webkit-details-marker {
    display: none;
}

.market-info.is-open summary {
    border-color: rgba(211, 47, 47, 0.4);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.08);
}

.market-info-panel {
    display: none;
}

.market-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.market-modal.is-open {
    display: flex;
}

.market-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.35);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.celebration-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 120;
}

.celebration-modal.is-open {
    display: flex;
}

.celebration-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 17, 17, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.celebration-panel {
    position: relative;
    z-index: 1;
    width: min(520px, 90vw);
    padding: 28px 30px;
    border-radius: 22px;
    border: 1px solid var(--border);
    background: #ffffff;
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.22);
    text-align: center;
}

.celebration-panel h3 {
    margin: 6px 0 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
}

.celebration-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.celebration-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto;
    border-radius: 999px;
    background: rgba(47, 191, 113, 0.15);
    color: var(--success);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.4rem;
    border: 1px solid rgba(47, 191, 113, 0.4);
}

.celebration-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.celebration-confetti span {
    position: absolute;
    top: -10%;
    width: 8px;
    height: 14px;
    border-radius: 2px;
    opacity: 0.9;
    animation: confetti-fall 2.6s linear forwards;
}

.celebration-confetti span:nth-child(1) { left: 5%; background: #d32f2f; animation-delay: 0s; }
.celebration-confetti span:nth-child(2) { left: 12%; background: #111111; animation-delay: 0.2s; }
.celebration-confetti span:nth-child(3) { left: 18%; background: #ffffff; animation-delay: 0.4s; }
.celebration-confetti span:nth-child(4) { left: 26%; background: #f59e0b; animation-delay: 0.1s; }
.celebration-confetti span:nth-child(5) { left: 34%; background: #d32f2f; animation-delay: 0.3s; }
.celebration-confetti span:nth-child(6) { left: 42%; background: #111111; animation-delay: 0.5s; }
.celebration-confetti span:nth-child(7) { left: 50%; background: #ffffff; animation-delay: 0.15s; }
.celebration-confetti span:nth-child(8) { left: 58%; background: #f59e0b; animation-delay: 0.35s; }
.celebration-confetti span:nth-child(9) { left: 66%; background: #d32f2f; animation-delay: 0.25s; }
.celebration-confetti span:nth-child(10) { left: 72%; background: #111111; animation-delay: 0.45s; }
.celebration-confetti span:nth-child(11) { left: 78%; background: #ffffff; animation-delay: 0.05s; }
.celebration-confetti span:nth-child(12) { left: 84%; background: #f59e0b; animation-delay: 0.3s; }
.celebration-confetti span:nth-child(13) { left: 88%; background: #d32f2f; animation-delay: 0.2s; }
.celebration-confetti span:nth-child(14) { left: 92%; background: #111111; animation-delay: 0.4s; }
.celebration-confetti span:nth-child(15) { left: 96%; background: #ffffff; animation-delay: 0.1s; }
.celebration-confetti span:nth-child(16) { left: 99%; background: #f59e0b; animation-delay: 0.5s; }

@keyframes confetti-fall {
    0% {
        transform: translateY(-10%) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(120vh) rotate(180deg);
        opacity: 0;
    }
}

.market-modal-panel {
    position: relative;
    width: min(520px, 92vw);
    max-height: min(80vh, 600px);
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 18px 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    z-index: 1;
}

.market-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--muted);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.market-modal-close:hover {
    border-color: rgba(211, 47, 47, 0.4);
    color: var(--accent);
    box-shadow: 0 4px 10px rgba(211, 47, 47, 0.12);
}

.market-modal-content h4 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.market-info-section {
    margin-top: 12px;
}

.market-info-title {
    font-weight: 700;
    margin: 0 0 6px;
}

.market-info-list {
    margin: 8px 0 8px 18px;
    padding: 0;
}

.market-info-list li {
    margin-bottom: 6px;
}

.match-list {
    display: grid;
    gap: 16px;
}

.match-card {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 16px;
}

.match-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.lineup-table {
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #ffffff;
    overflow-x: auto;
    margin-bottom: 20px;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.08);
    border-top: 3px solid var(--accent);
    width: 100%;
}

.lineup-table-head,
.lineup-row {
    display: grid;
    grid-template-columns: 54px minmax(240px, 1fr) 160px 140px 140px;
    align-items: center;
    min-width: 720px;
}

.lineup-table-head {
    background: #111111;
    border-bottom: 1px solid #0f0f0f;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
    color: #ffffff;
    font-family: 'Space Grotesk', sans-serif;
    position: sticky;
    top: 0;
    z-index: 2;
}

.lineup-table-head .lineup-cell {
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.ranking-table.has-movement .lineup-table-head,
.ranking-table.has-movement .lineup-row {
    grid-template-columns: 90px minmax(220px, 1fr) 140px 140px;
    min-width: 0;
}

.ranking-table.is-compact .lineup-table-head,
.ranking-table.is-compact .lineup-row {
    grid-template-columns: 90px minmax(220px, 1fr) 140px;
    min-width: 0;
}

.ranking-table .lineup-cell.pos,
.ranking-table .lineup-cell.points,
.ranking-table .lineup-cell.delta {
    justify-content: center;
}

.ranking-table .lineup-row.highlight {
    background: rgba(211, 47, 47, 0.06);
    box-shadow: inset 3px 0 0 var(--accent);
}

.lineup-table-body {
    display: flex;
    flex-direction: column;
}

.lineup-row {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.lineup-row:last-child {
    border-bottom: none;
}

.lineup-row:nth-child(even) {
    background: #fbfbfb;
}

.lineup-row:hover {
    background: #f5f5f5;
}

.lineup-row.is-selected {
    background: rgba(211, 47, 47, 0.06);
    box-shadow: inset 4px 0 0 var(--accent);
}

.lineup-row.is-selected .lineup-name {
    color: var(--accent);
}

.lineup-row.is-disabled {
    opacity: 0.6;
    filter: grayscale(0.05);
}

.lineup-cell {
    padding: 14px 16px;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.lineup-cell:last-child {
    border-right: none;
}

.lineup-cell.check {
    justify-content: center;
}

.lineup-cell.name {
    min-width: 0;
}

.lineup-cell.avg,
.lineup-cell.credits,
.lineup-cell.delta {
    justify-content: center;
}

.lineup-head-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.lineup-table-head .market-info summary {
    width: 16px;
    height: 16px;
    font-size: 0.65rem;
    border-color: rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.lineup-cell input {
    accent-color: var(--accent);
    width: 20px;
    height: 20px;
}

.lineup-name {
    font-weight: 800;
    font-size: 1.02rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lineup-metric {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-weight: 700;
    font-size: 0.85rem;
    background: #f3f4f6;
    color: var(--text);
    min-width: 110px;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

.metric-avg {
    background: rgba(211, 47, 47, 0.12);
    border-color: rgba(211, 47, 47, 0.4);
    color: #b91c1c;
}

.metric-credit {
    background: #111827;
    border-color: #111827;
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(211, 47, 47, 0.35);
}

.metric-delta.trend-up {
    background: rgba(47, 191, 113, 0.18);
    border-color: rgba(47, 191, 113, 0.45);
    color: var(--success);
}

.metric-delta.trend-down {
    background: rgba(211, 47, 47, 0.18);
    border-color: rgba(211, 47, 47, 0.45);
    color: var(--danger);
}

.metric-delta.trend-flat {
    background: #f1f1f1;
    color: var(--muted);
}


.trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
}

.trend-up {
    color: var(--success);
}

.trend-down {
    color: var(--danger);
}

.trend-flat {
    color: var(--muted);
}

.stat-icon {
    width: auto;
    height: auto;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    background: transparent;
    color: currentColor;
    flex-shrink: 0;
}

.trend-up .stat-icon.delta {
    color: var(--success);
}

.trend-up .stat-icon.delta::before {
    content: "\25B2";
}

.trend-down .stat-icon.delta {
    color: var(--danger);
}

.trend-down .stat-icon.delta::before {
    content: "\25BC";
}

.trend-flat .stat-icon.delta {
    color: var(--muted);
}

.trend-flat .stat-icon.delta::before {
    content: "\2013";
}

.roster-name {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.roster-points {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--muted);
    line-height: 1;
    white-space: nowrap;
}

.wrestler-credits {
    background: var(--bg-accent);
    padding: 4px 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    white-space: nowrap;
}

.budget {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 12px 16px;
    border-radius: 14px;
    text-align: right;
}

.lineup-metrics {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.count-box {
    min-width: 140px;
}

.lineup-section .section-header {
    margin-bottom: 18px;
}

.lineup-banner {
    position: relative;
    padding: 18px 20px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    animation: none;
}

.lineup-banner::before {
    display: none;
}

.lineup-banner::after {
    display: none;
}

.lineup-banner > * {
    position: relative;
    z-index: 1;
}

.lineup-limit {
    max-width: 520px;
}

.lineup-banner .budget {
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
    text-align: left;
}

.lineup-banner .budget span {
    font-size: 0.8rem;
    color: var(--muted);
}

.lineup-banner .budget strong {
    font-size: 1.1rem;
}

#budget-total.over {
    color: var(--danger);
}

#budget-remaining.over,
#budget-remaining-float.over {
    color: var(--danger);
}

.lineup-float {
    position: fixed;
    left: 50%;
    bottom: 28px;
    z-index: 50;
    opacity: 0;
    transform: translate(-50%, 12px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.lineup-float.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
    pointer-events: auto;
}

.lineup-float-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.16);
    display: flex;
    align-items: center;
    gap: 18px;
    width: min(720px, calc(100vw - 32px));
}

.lineup-float-metrics {
    display: flex;
    gap: 18px;
    flex: 1;
    flex-wrap: wrap;
}

.lineup-float-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 140px;
}

.lineup-float-item span {
    font-size: 0.72rem;
    color: var(--muted);
}

.lineup-float-item strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
}

.lineup-float .btn {
    white-space: nowrap;
    padding: 10px 18px;
}

#budget-total-float.over {
    color: var(--danger);
}

@media (max-width: 980px) {
    .lineup-float {
        display: none;
    }
}

.alert {
    background: rgba(178, 54, 40, 0.08);
    padding: 12px 16px;
    border-radius: 12px;
    color: var(--danger);
    font-weight: 600;
    margin: 16px 0;
}

.lineup-guide {
    margin: 22px 0 26px;
}

.lineup-tools {
    margin: 16px 0 20px;
    padding: 16px;
}

.lineup-tools-grid {
    display: grid;
    gap: 6px 16px;
    grid-template-columns: minmax(220px, 1.2fr) minmax(220px, 1.2fr) auto auto;
    align-items: end;
}

.lineup-field {
    display: grid;
    grid-template-rows: auto auto;
}

.lineup-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.85rem;
    color: var(--muted);
    font-weight: 600;
}

.lineup-field input,
.lineup-field select {
    margin-top: 0;
}

.lineup-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    font-weight: 600;
    color: var(--ink);
    justify-self: start;
    align-self: end;
    transform: translateY(var(--lineup-toggle-shift, 0px));
}

.lineup-toggle input {
    width: 18px;
    height: 30px;
    accent-color: var(--accent);
}

.lineup-count {
    font-size: 0.9rem;
    justify-self: end;
    align-self: end;
    transform: translateY(var(--lineup-count-shift, -9px));
}

@media (max-width: 900px) {
    .lineup-tools-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        align-items: end;
    }

    .lineup-count {
        justify-self: start;
    }
}

.lineup-guide summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
    list-style: none;
    padding: 12px 14px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid var(--border);
    box-shadow: none;
}

.lineup-guide summary::-webkit-details-marker {
    display: none;
}

.lineup-guide summary::after {
    content: '+';
    font-size: 1.2rem;
    color: var(--accent);
}

.lineup-guide[open] summary::after {
    content: '-';
}

.lineup-guide-content {
    margin-top: 12px;
}

.lineup-guide[open] {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
}

.lineup-guide h4 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.guide-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.guide-block {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
}

.guide-list {
    margin: 10px 0 10px 18px;
    padding: 0;
    color: var(--ink);
}

.guide-list li {
    margin-bottom: 6px;
}

.guide-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

#lineup-warning {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(211, 47, 47, 0.25);
    background: rgba(211, 47, 47, 0.05);
}

#lineup-warning.limit {
    border-color: rgba(178, 54, 40, 0.5);
    background: rgba(178, 54, 40, 0.1);
    color: var(--danger);
    font-weight: 600;
}

@keyframes banner-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.table {
    background: var(--card);
    border-radius: 16px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.table-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.table-row:last-child {
    border-bottom: none;
}

.table-header {
    background: var(--bg-accent);
    font-weight: 700;
}

.table-header .status-header {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-row.highlight {
    background: rgba(211, 47, 47, 0.06);
    border-left: 3px solid var(--accent);
}

.movement {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    justify-content: flex-end;
}

.movement-up {
    color: var(--success);
}

.movement-up::before {
    content: "\25B2";
}

.movement-down {
    color: var(--danger);
}

.movement-down::before {
    content: "\25BC";
}

.movement-neutral {
    color: var(--muted);
}

.score-list {
    display: grid;
    gap: 12px;
}

.score-summary-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin: 18px 0 24px;
    align-items: stretch;
}

.score-summary-grid .card {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.score-summary-grid .card h3 {
    margin: 0;
}

.score-summary-grid .score-breakdown {
    margin: 0;
}

.score-list-title {
    margin: 22px 0 12px;
    font-size: 1.1rem;
}

.score-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 12px 14px;
}

.score-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.score-total {
    font-weight: 700;
    color: var(--accent);
    margin: 0 0 8px;
}

.score-breakdown {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: grid;
    gap: 8px;
}

.score-breakdown--compact {
    gap: 6px;
}

.score-breakdown--compact li {
    padding: 6px 10px;
    font-size: 0.92rem;
}

.score-breakdown--compact .score-value {
    font-size: 0.92rem;
}

.score-breakdown li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-accent);
}

.score-value {
    font-weight: 600;
    color: var(--ink);
}

.score-value.negative {
    color: var(--danger);
}

.score-value.positive {
    color: var(--success);
}

.score-value.neutral {
    color: var(--muted);
}

.score-formula {
    margin-top: 10px;
    font-size: 0.9rem;
}

.score-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    font-size: 0.9rem;
}

.score-grid strong {
    display: block;
    font-size: 1.1rem;
}

.dashboard-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.list {
    padding-left: 16px;
}

.link {
    color: var(--accent);
    font-weight: 600;
}

.empty {
    padding: 20px;
    background: var(--card);
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
}

.site-footer {
    padding: 30px 0;
    border-top: 1px solid var(--border);
    background: #ffffff;
    color: var(--muted);
}

@media (min-width: 900px) {
    .hero,
    .show-hero {
        grid-template-columns: 1.3fr 0.7fr;
    }
}
