:root {
    --ink: #172033;
    --muted: #697386;
    --accent: #0f766e;
    --warm: #f6f1e8;
}

body {
    color: var(--ink);
    background: #f7f8fb;
}

.card {
    border-radius: 8px;
    border-color: #e5e7eb;
}

.metric {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
}

.metric strong {
    display: block;
    font-size: 2rem;
    line-height: 1.1;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.summary-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 12px;
}

.summary-pill strong {
    font-size: 1.25rem;
}

.qr-image {
    width: 220px;
    max-width: 100%;
    height: auto;
    border: 1px solid #e5e7eb;
}

.public-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #111827 0%, #263242 100%);
}

.public-panel {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 8px;
    padding: 24px;
}

.public-panel-wide {
    max-width: 760px;
}

.now-screen {
    max-width: 760px;
    margin: 0 auto;
    color: #fff;
}

.now-screen-focus {
    max-width: 860px;
}

.participant-sticky-header {
    position: sticky;
    top: 0;
    z-index: 30;
    margin: -8px 0 16px;
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.98) 0%, rgba(17, 24, 39, 0.82) 72%, rgba(17, 24, 39, 0) 100%);
}

.participant-header-placeholder {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.85);
}

.participant-header-placeholder a {
    color: #a7f3d0;
    font-weight: 700;
    text-decoration: none;
}

.now-block,
.next-block {
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: clamp(20px, 5vw, 40px);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
}

.next-block {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.now-hero {
    display: flex;
    min-height: min(58vh, 560px);
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.09);
    padding: clamp(28px, 7vw, 64px);
    backdrop-filter: blur(10px);
}

.now-hero h1 {
    font-size: clamp(2.8rem, 12vw, 6.5rem);
    line-height: 1.02;
    margin: 10px 0 14px;
}

.now-next-summary {
    padding: clamp(16px, 4vw, 28px);
}

.now-next-summary h2 {
    font-size: clamp(1.6rem, 6vw, 3rem);
}

.label {
    letter-spacing: 0;
    color: #a7f3d0;
    font-weight: 700;
    font-size: 0.9rem;
}

.now-block h1 {
    font-size: clamp(2.25rem, 10vw, 5rem);
    line-height: 1.05;
    margin: 8px 0 12px;
}

.next-block h2 {
    font-size: clamp(1.75rem, 7vw, 3.5rem);
    line-height: 1.08;
    margin: 8px 0 12px;
}

.key,
.member-line {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.assignment-alert {
    border: 1px solid rgba(253, 230, 138, 0.75);
    border-radius: 8px;
    background: rgba(253, 230, 138, 0.18);
    color: #fff7d6;
    padding: 14px 16px;
}

.members-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #a7f3d0;
    margin-top: 18px;
    margin-bottom: 8px;
}

.member-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.member-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d1d5db;
    border-radius: 999px;
    background: #fff;
    color: #172033;
    font-size: 0.85rem;
    line-height: 1.2;
    padding: 4px 8px;
}

.setlist-order-control {
    display: grid;
    grid-template-columns: 40px 32px 40px;
    align-items: center;
    gap: 4px;
    width: max-content;
}

.setlist-order-control span {
    text-align: center;
    font-weight: 700;
    color: var(--muted);
}

.order-button {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.1rem;
    line-height: 1;
}

.part-picker {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
    gap: 8px;
}

.part-option,
.assignment-option {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    font-weight: 600;
    text-align: center;
}

.btn-check:checked + .part-option,
.btn-check:checked + .assignment-option {
    border-color: #0f766e;
    background: #ccfbf1;
    color: #134e4a;
}

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

.assignment-section {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
}

.assignment-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.assignment-section-header h2 {
    font-size: 1rem;
    margin: 0;
}

.assignment-section-header span {
    color: var(--muted);
    font-size: 0.875rem;
}

.assignment-options {
    display: grid;
    gap: 8px;
}

.assignment-option {
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-height: 54px;
    padding: 8px 10px;
}

.assignment-option-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.assignment-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.8rem;
    line-height: 1;
    padding: 5px 8px;
}

.assignment-count.is-low {
    background: #dcfce7;
    color: #166534;
}

.assignment-option small {
    color: var(--muted);
    font-weight: 400;
}

.sticky-actions {
    position: sticky;
    bottom: 0;
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 12px 0;
    background: #f7f8fb;
}

.standard-search {
    position: relative;
}

.standard-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    right: 0;
    left: 0;
    overflow: hidden;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.standard-suggestion,
.standard-suggestion-empty {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 2px;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
    padding: 10px 12px;
    text-align: left;
}

.standard-suggestion:last-child {
    border-bottom: 0;
}

.standard-suggestion span {
    font-weight: 700;
    color: var(--ink);
}

.standard-suggestion small,
.standard-suggestion-empty {
    color: var(--muted);
}

.standard-suggestion:hover,
.standard-suggestion:focus {
    background: #f0fdfa;
}

.public-setlist {
    display: grid;
    gap: 10px;
}

.public-setlist-item {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.public-setlist-item.is-playing {
    border-color: #0f766e;
    background: #ecfdf5;
}

.public-setlist-item.is-done {
    background: #f3f4f6;
    color: #6b7280;
}

.public-setlist-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #e5e7eb;
    font-weight: 700;
}

.public-setlist-item.is-playing .public-setlist-order {
    background: #0f766e;
    color: #fff;
}

.public-setlist-title {
    font-weight: 700;
    font-size: 1.05rem;
}

.public-setlist-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 0.9rem;
}

.public-setlist-status {
    border-radius: 999px;
    background: #e5e7eb;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 8px;
    white-space: nowrap;
}

.public-setlist-item.is-playing .public-setlist-status {
    background: #0f766e;
    color: #fff;
}

.compact-setlist {
    padding: 18px;
}

.compact-setlist-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 0;
}

.compact-setlist-row:last-child {
    border-bottom: 0;
}

.compact-setlist-row.is-playing span {
    color: #a7f3d0;
    font-weight: 700;
}

.compact-setlist-row.is-done {
    color: rgba(255, 255, 255, 0.48);
}

.compact-setlist-row small {
    white-space: nowrap;
}

.performance-timeline {
    display: grid;
    gap: 10px;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
}

.timeline-item {
    display: grid;
    grid-template-columns: 38px 1fr auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    padding: 10px;
}

.timeline-item.is-current {
    border-color: rgba(167, 243, 208, 0.75);
    background: rgba(16, 185, 129, 0.16);
}

.timeline-item.is-next {
    border-color: rgba(125, 211, 252, 0.55);
}

.timeline-item.is-done {
    color: rgba(255, 255, 255, 0.5);
}

.timeline-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 700;
}

.timeline-item.is-current .timeline-order {
    background: #a7f3d0;
    color: #134e4a;
}

.timeline-title {
    font-weight: 800;
}

.timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.9rem;
}

.timeline-status {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 5px 8px;
    white-space: nowrap;
}

.timeline-item.is-current .timeline-status {
    background: #a7f3d0;
    color: #134e4a;
}

.setlist-scroll-screen {
    max-width: 860px;
}

.setlist-scroll-list {
    display: grid;
    gap: 18px;
    padding: 8vh 0 18vh;
}

.setlist-song-card {
    position: relative;
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 14px;
    min-height: 220px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.78);
    padding: clamp(18px, 4vw, 34px);
    scroll-margin-top: 120px;
}

.setlist-song-card.is-current {
    min-height: min(58vh, 560px);
    align-items: center;
    border-color: rgba(167, 243, 208, 0.85);
    background: rgba(16, 185, 129, 0.16);
    color: #fff;
}

.setlist-song-card.is-next {
    border-color: rgba(125, 211, 252, 0.55);
}

.setlist-song-card.is-done {
    color: rgba(255, 255, 255, 0.45);
}

.setlist-song-status {
    position: absolute;
    top: 14px;
    right: 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.78rem;
    font-weight: 800;
    padding: 6px 10px;
}

.setlist-song-card.is-current .setlist-song-status {
    background: #a7f3d0;
    color: #134e4a;
}

.setlist-song-order {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    font-weight: 800;
}

.setlist-song-card.is-current .setlist-song-order {
    background: #a7f3d0;
    color: #134e4a;
}

.setlist-song-main h1 {
    font-size: clamp(2rem, 8vw, 5.5rem);
    line-height: 1.04;
    margin: 18px 0 10px;
}

.setlist-song-card:not(.is-current) .setlist-song-main h1 {
    font-size: clamp(1.5rem, 5vw, 3rem);
}

.setlist-song-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 1rem;
}

.setlist-song-members {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.setlist-song-members .members-heading {
    flex-basis: 100%;
    margin: 0 0 2px;
}

.setlist-song-members span {
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 10px;
}

.setlist-song-members .is-muted {
    color: rgba(255, 255, 255, 0.5);
}

.join-request-area {
    display: grid;
    gap: 8px;
    margin-top: 18px;
}

.join-request-count {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.9rem;
    font-weight: 700;
}

.join-request-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.join-request-form .form-control {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.join-request-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.48);
}

@media (max-width: 575.98px) {
    .container {
        padding-left: 14px;
        padding-right: 14px;
    }

    .public-panel {
        padding: 18px;
    }

    .table {
        font-size: 0.9rem;
    }

    .public-setlist-item {
        grid-template-columns: 36px 1fr;
    }

    .public-setlist-status {
        grid-column: 2;
        width: max-content;
    }

    .timeline-item {
        grid-template-columns: 34px 1fr;
    }

    .timeline-status {
        grid-column: 2;
        width: max-content;
    }

    .setlist-song-card {
        grid-template-columns: 40px 1fr;
        min-height: 190px;
        padding: 18px 14px;
    }

    .setlist-song-card.is-current {
        min-height: 54vh;
    }

    .setlist-song-order {
        width: 36px;
        height: 36px;
    }

    .join-request-form {
        grid-template-columns: 1fr;
    }
}
