:root {
    color-scheme: light;
    --brand: #f37021;
    --brand-dark: #d95d12;
    --ink: #111111;
    --muted: #666666;
    --bg: #f7f7f7;
    --panel: #ffffff;
    --line: #e8e8e8;
    --danger: #991b1b;
    --success-soft: #f0f8f3;
    --shadow: 0 14px 36px rgba(17, 17, 17, 0.08);
}

* {
    box-sizing: border-box;
}

body.public-page {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

.public-shell {
    width: min(920px, calc(100vw - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.public-shell--narrow {
    width: min(560px, calc(100vw - 32px));
    padding-top: 8vh;
}

.public-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    padding: 26px;
    box-shadow: var(--shadow);
}

.brand-header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 22px;
}

.brand-logo {
    width: 76px;
    max-height: 54px;
    object-fit: contain;
}

.brand-fallback {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 800;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 38px;
    line-height: 1.1;
    letter-spacing: 0;
}

.lead,
.hint {
    color: var(--muted);
    line-height: 1.5;
}

.lead {
    max-width: 760px;
    margin: 12px 0 24px;
    font-size: 18px;
}

.notice,
.message,
.error {
    border-radius: 8px;
    padding: 13px 15px;
    line-height: 1.45;
}

.message,
.error {
    background: #fef2f2;
    color: var(--danger);
    font-weight: 700;
}

.notice {
    border-left: 4px solid var(--brand);
    background: #fff7ed;
    color: var(--muted);
}

.success-panel {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

form.public-form {
    display: grid;
    gap: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field,
.field-group {
    display: grid;
    gap: 8px;
    margin: 0;
    border: 0;
    padding: 0;
    font-weight: 800;
}

.field-group {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.field-group legend {
    padding: 0 8px;
}

.choice {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 8px 0;
    font-weight: 400;
}

.choice input {
    width: auto;
    margin-top: 3px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    font-weight: 400;
    padding: 12px 13px;
}

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

.input-code {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.button-primary,
button {
    width: fit-content;
    border: 0;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    padding: 13px 18px;
}

.button-primary:hover,
button:hover {
    background: var(--brand-dark);
}

.button-wide {
    width: 100%;
}

.link-action {
    color: var(--brand-dark);
    font-weight: 800;
}

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

.question-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 18px;
}

.question-title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.35;
}

.required {
    color: var(--brand-dark);
}

.board-page {
    background: #faf8f5;
}

.board {
    width: min(1680px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 28px 0 40px;
}

.board-header {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: end;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
}

.board h1 {
    font-size: clamp(36px, 4vw, 72px);
    line-height: 1.02;
}

.description {
    max-width: 920px;
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 22px;
    line-height: 1.35;
}

.meta,
.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.meta {
    justify-content: flex-end;
}

.toolbar {
    justify-content: space-between;
    margin: 22px 0;
}

.pill {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 9px 14px;
    background: #ffffff;
    color: var(--muted);
    font-size: 16px;
    white-space: nowrap;
}

.pill strong {
    color: var(--ink);
}

.board-filter {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
}

.board-filter select {
    min-width: min(520px, calc(100vw - 48px));
    font-size: 18px;
}

.status {
    color: var(--muted);
    font-size: 16px;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
    align-items: stretch;
}

.note {
    min-height: 180px;
    border: 1px solid #f0d2bd;
    border-radius: 8px;
    background: #fffaf5;
    padding: 22px;
    box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
}

.note:nth-child(4n + 2) {
    background: #ffffff;
}

.note:nth-child(4n + 3) {
    background: #fff3e9;
}

.question {
    margin: 0 0 16px;
    color: var(--brand-dark);
    font-size: 17px;
    line-height: 1.25;
    font-weight: 800;
}

.answer {
    margin: 0;
    color: var(--ink);
    font-size: clamp(25px, 2.4vw, 42px);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.empty,
.blocked {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 38px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--muted);
    font-size: 24px;
    line-height: 1.35;
    text-align: center;
}

.blocked {
    color: var(--danger);
}

@media (max-width: 760px) {
    .public-shell,
    .public-shell--narrow,
    .board {
        width: min(100% - 28px, 1680px);
        padding-top: 18px;
    }

    .public-card {
        padding: 20px;
    }

    .brand-header {
        align-items: flex-start;
    }

    h1 {
        font-size: 30px;
    }

    .form-grid,
    .board-header {
        grid-template-columns: 1fr;
    }

    .meta {
        justify-content: flex-start;
    }

    .board-grid {
        grid-template-columns: 1fr;
    }
}
