body {
    margin: 0;
    min-height: 100vh;
    background: #ffffff;
    color: #1b1b1b;
    font-family: "Times New Roman", Times, serif;
}

.site-shell {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 28px 24px 64px;
    box-sizing: border-box;
}

.participant-app {
    width: 100%;
    max-width: 920px;
}

.screen {
    width: 100%;
}

.hidden {
    display: none !important;
}

.hidden-accessible {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.participant-header {
    margin-bottom: 22px;
}

.title-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.title-siren {
    font-size: 30px;
    line-height: 1;
    flex: 0 0 auto;
    transform: translateY(1px);
}

.title-siren-image {
    height: clamp(26px, 3.2vw, 48px);
    width: auto;
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
}

.main-title {
    margin: 0;
    font-size: clamp(26px, 3.2vw, 48px);
    font-weight: 400;
    line-height: 1.05;
    font-family: "Snell Roundhand", "Apple Chancery", "URW Chancery L", "Brush Script MT", cursive;
    letter-spacing: 0.01em;
}

.start-screen {
    display: flex;
    justify-content: center;
    margin-top: 6px;
}

.start-row {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: min(100%, 620px);
}

.name-label {
    font-size: 17px;
    font-weight: 400;
    line-height: 1;
}

#nameInput {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid #bebbb5;
    border-radius: 0;
    background: #ffffff;
    padding: 0 14px;
    font-size: 17px;
    font-family: "Times New Roman", Times, serif;
    color: #1b1b1b;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

#nameInput:focus {
    border-color: #6d6861;
    background: #fcfcfb;
}

#nameInput:-webkit-autofill,
#nameInput:-webkit-autofill:hover,
#nameInput:-webkit-autofill:focus,
#nameInput:-webkit-autofill:active {
    -webkit-text-fill-color: #1b1b1b;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 9999s ease-out 0s;
    font-family: "Times New Roman", Times, serif;
}

#startButton,
#restartButton {
    box-sizing: border-box;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #bebbb5;
    border-radius: 0;
    background: transparent;
    color: #1b1b1b;
    font-size: 17px;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
    cursor: pointer;
    white-space: nowrap;
}

#startButton {
    min-width: 0;
    width: auto;
}

#startButton:hover,
#restartButton:hover,
#startButton:focus-visible,
#restartButton:focus-visible {
    border-color: #6d6861;
    outline: none;
}

.matchup-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2px;
}

.question-text {
    margin: 0;
    text-align: center;
    font-size: clamp(17px, 1.5vw, 22px);
    font-weight: 400;
}

.round-row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    text-align: center;
}

.round-text {
    font-size: clamp(17px, 1.5vw, 22px);
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
}

.matchup-grid {
    width: 100%;
    max-width: 860px;
    display: grid;
    grid-template-columns: repeat(2, minmax(260px, 320px));
    justify-content: center;
    gap: clamp(34px, 6vw, 92px);
    margin-top: 2px;
}

.palette-choice {
    appearance: none;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    text-align: center;
    transition: transform 0.12s ease;
}

.palette-choice:hover,
.palette-choice:focus-visible {
    transform: translateY(-2px);
    outline: none;
}

.palette-frame {
    width: 100%;
    border: 1px solid #bebbb5;
    background: transparent;
    padding: 14px;
    box-sizing: border-box;
}

.palette-choice:hover .palette-frame,
.palette-choice:focus-visible .palette-frame {
    border-color: #6d6861;
}

.palette-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: transparent;
}

.palette-label {
    display: block;
    margin-top: 10px;
    font-size: 15px;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
    color: #1b1b1b;
}

.result-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding-top: 2px;
}

.final-title {
    margin-bottom: 8px;
    font-size: clamp(17px, 1.5vw, 22px);
    font-weight: 400;
}

.winner-card {
    width: min(100%, 320px);
    text-align: center;
}

.winner-frame {
    padding: 14px;
}

.winner-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    background: transparent;
}

.winner-label {
    margin: 12px 0 0;
    font-size: 16px;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
}

.status-panel {
    display: none;
}

pre {
    margin: 0;
}

.admin-app {
    width: 100%;
    max-width: 920px;
}

.admin-header-elegant {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 28px;
    text-align: center;
}

.admin-subtitle {
    margin: -4px 0 0;
    font-size: 16px;
    color: #5f5a54;
    font-family: "Times New Roman", Times, serif;
}

.admin-actions-elegant {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.admin-actions-elegant button,
#refreshBtn,
#clearBtn {
    box-sizing: border-box;
    height: 48px;
    padding: 0 16px;
    border: 1px solid #bebbb5;
    border-radius: 0;
    background: transparent;
    color: #1b1b1b;
    font-size: 17px;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
    cursor: pointer;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
}

.admin-actions-elegant button:hover,
.admin-actions-elegant button:focus-visible,
#refreshBtn:hover,
#clearBtn:hover,
#refreshBtn:focus-visible,
#clearBtn:focus-visible {
    border-color: #6d6861;
    background: #fcfcfb;
    outline: none;
}

.message {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 22px;
    padding: 14px 16px;
    border: 1px solid #d8d0c7;
    border-radius: 0;
    background: #fbf8f4;
    color: #4e463f;
    font-family: "Times New Roman", Times, serif;
    display: none;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.admin-section {
    margin-bottom: 24px;
    padding: 18px;
    border: 1px solid #bebbb5;
    background: #ffffff;
}

.section-title {
    margin: 0 0 14px;
    text-align: center;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.1;
    font-family: "Snell Roundhand", "Apple Chancery", "URW Chancery L", "Brush Script MT", cursive;
    letter-spacing: 0.01em;
}

.admin-stat-card {
    border: 1px solid #bebbb5;
    background: #ffffff;
    padding: 18px 16px;
    min-height: 118px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-stat-label {
    font-size: 15px;
    color: #5f5a54;
    margin-bottom: 10px;
    font-family: "Times New Roman", Times, serif;
}

.admin-stat-value {
    font-size: 34px;
    line-height: 1;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
    color: #1b1b1b;
}

.admin-palette-counts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.admin-palette-box {
    border: 1px solid #bebbb5;
    background: #ffffff;
    padding: 14px;
    text-align: center;
}

.admin-palette-name {
    margin-bottom: 8px;
    font-size: 15px;
    color: #5f5a54;
    font-family: "Times New Roman", Times, serif;
}

.admin-palette-value {
    font-size: 28px;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
}

.admin-respondents-list {
    display: grid;
    gap: 18px;
}

.admin-respondent-card {
    border: 1px solid #bebbb5;
    padding: 18px;
    background: #ffffff;
}

.admin-respondent-header {
    margin-bottom: 16px;
    text-align: center;
}

.admin-respondent-header h3 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
}

.admin-meta-grid {
    display: grid;
    gap: 6px;
}

.admin-meta-grid p {
    margin: 0;
    font-size: 15px;
    color: #5f5a54;
    font-family: "Times New Roman", Times, serif;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.admin-table th,
.admin-table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #e4ddd5;
    vertical-align: top;
    font-size: 15px;
    font-weight: 400;
    font-family: "Times New Roman", Times, serif;
}

.admin-table th {
    background: #fbf8f4;
    color: #5f5a54;
}

.empty-state {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 24px;
    border: 1px solid #d8d0c7;
    background: #fbf8f4;
    text-align: center;
    color: #5f5a54;
    font-family: "Times New Roman", Times, serif;
}

.winner-pill {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid #bebbb5;
    border-radius: 999px;
    background: #fbf8f4;
    font-weight: 400;
    font-size: 15px;
    font-family: "Times New Roman", Times, serif;
    color: #1b1b1b;
}

.small,
.muted {
    color: #5f5a54;
    font-family: "Times New Roman", Times, serif;
}

@media (max-width: 900px) {
    .site-shell {
        padding: 24px 18px 48px;
    }

    .title-row {
        gap: 14px;
    }

    .start-row {
        grid-template-columns: 1fr;
        width: min(100%, 400px);
        gap: 10px;
    }

    .name-label {
        text-align: center;
    }

    .matchup-grid {
        grid-template-columns: minmax(240px, 340px);
        gap: 26px;
    }

    .admin-summary-grid {
        grid-template-columns: 1fr;
    }

    .admin-section {
        padding: 16px;
    }
}

@media (max-width: 520px) {
    .main-title {
        font-size: 28px;
    }

    #nameInput,
    #startButton,
    #restartButton {
        height: 46px;
        font-size: 16px;
    }

    .palette-label,
    .winner-label,
    .round-text,
    .final-title {
        font-size: 14px;
    }
}