:root {
    color-scheme: light;
    --text: #161616;
    --muted: #666666;
    --line: #e6e6e6;
    --button: #111111;
    --button-text: #ffffff;
    --error: #b00020;
    --surface: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: #ffffff;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

.page {
    width: min(100%, 980px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel {
    width: min(100%, 440px);
    text-align: center;
}

.brand {
    width: 84px;
    height: 84px;
    object-fit: contain;
    margin-bottom: 18px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: 30px;
    line-height: 1.15;
    margin-bottom: 22px;
}

.name-form {
    display: grid;
    gap: 12px;
    text-align: left;
}

label {
    color: var(--muted);
    font-size: 14px;
}

input {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.name-form button,
.rating-form button {
    min-height: 52px;
    border: 0;
    border-radius: 8px;
    background: var(--button);
    color: var(--button-text);
    cursor: pointer;
    font-weight: 700;
}

button:disabled {
    opacity: 0.65;
}

.error {
    color: var(--error);
    font-size: 14px;
    margin: 0;
}

.poll {
    width: 100%;
    min-height: calc(100vh - 40px);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 18px;
}

.poll-header,
.admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 12px;
}

.poll-header h1,
.admin-header h1 {
    margin-bottom: 0;
}

.participant {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 4px;
}

.text-link {
    color: var(--text);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.design {
    margin: 0;
    min-height: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 10px;
}

.design img {
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 210px);
    object-fit: contain;
    background: #ffffff;
}

.design figcaption {
    text-align: center;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.rating-form {
    display: grid;
    grid-template-columns: repeat(10, minmax(48px, 1fr));
    gap: 8px;
}

.rating-form button {
    min-width: 0;
    font-size: 20px;
}

.admin-page {
    display: block;
    max-width: 1100px;
}

.admin-section {
    padding: 24px 0;
    border-bottom: 1px solid var(--line);
}

.export-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 0 4px;
}

.export-actions a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    font-weight: 700;
    text-decoration: none;
}

.admin-section h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.section-note {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

th,
td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

th {
    background: #f7f7f7;
}

tr:last-child td {
    border-bottom: 0;
}

.thumb {
    width: 72px;
    height: 72px;
    object-fit: contain;
    display: block;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.person-result {
    padding: 14px 0;
}

.person-result h3 {
    margin-bottom: 8px;
}

.person-result ul {
    margin: 0;
    padding-left: 20px;
}

.person-result li {
    margin: 6px 0;
}

@media (max-width: 700px) {
    .page {
        padding: 14px;
    }

    h1 {
        font-size: 24px;
    }

    .poll {
        min-height: calc(100vh - 28px);
        gap: 12px;
    }

    .design img {
        max-height: calc(100vh - 250px);
    }

    .rating-form {
        grid-template-columns: repeat(5, 1fr);
    }
}
