:root {
    --ink: #111;
    --muted: #666;
    --line: #d9d9d9;
    --acid: #d7ff3f;
    --paper: #fff;
    --danger: #9c2635;
    --soft: #f5f5f2;
    font-family: Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--paper);
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
}

a {
    color: inherit;
    text-underline-offset: 3px;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: wait;
    opacity: 0.65;
}

img {
    max-width: 100%;
    height: auto;
}

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
    outline: 3px solid #9cbc13;
    outline-offset: 4px;
}

input[aria-invalid='true'],
select[aria-invalid='true'] {
    border-color: var(--danger);
    background: #fff9f9;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 15px;
    z-index: 20;
    background: var(--acid);
    padding: 14px;
}

.skip-link:focus {
    top: 10px;
}

.announcement {
    background: var(--ink);
    color: #fff;
    text-align: center;
    padding: 9px 14px 8px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.35px;
    line-height: 1.2;
}

.landing {
    width: min(100% - 56px, 1120px);
    margin: 38px auto 64px;
}

.landing > h1 {
    font-size: clamp(32px, 3.35vw, 60px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -2.5px;
    white-space: nowrap;
    margin-bottom: 35px;
}

.landing-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 48px;
    align-items: start;
}

.campaign-story {
    min-width: 0;
}

.badge {
    display: inline-block;
    padding: 7px 10px;
    background: var(--acid);
    font-size: 10px;
    letter-spacing: 1.1px;
    font-weight: 800;
    line-height: 1.1;
}

.brand-logo {
    display: block;
    width: 150px;
    height: auto;
    margin: 20px 0 17px;
}

.description {
    font-size: 19px;
    line-height: 1.4;
    margin-bottom: 29px;
    max-width: 445px;
}

.steps {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.steps li {
    border: 1px solid var(--ink);
    border-radius: 30px;
    padding: 8px 12px;
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
}

.steps span {
    font-weight: 700;
}

.product-image {
    display: block;
    width: 100%;
    margin: 21px 0 0;
}

.entry-card {
    border: 1px solid var(--ink);
    border-radius: 20px;
    background: #fff;
    padding: 28px 27px 25px;
    box-shadow: 10px 10px 0 var(--ink);
    margin-top: 17px;
    min-width: 0;
}

.entry-card h2 {
    font-size: 24px;
    line-height: 1.1;
    font-weight: 700;
    letter-spacing: -0.65px;
    margin: 0 0 8px;
}

.form-intro {
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
    margin-bottom: 24px;
}

.field {
    margin-bottom: 17px;
}

.field > label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    line-height: 1.3;
    margin-bottom: 6px;
}

.field input:not([type='checkbox']),
.field select,
.field textarea {
    display: block;
    width: 100%;
    border: 1px solid var(--ink);
    border-radius: 8px;
    background: white;
    color: var(--ink);
    padding: 12px;
    min-height: 44px;
    font-size: 13px;
    line-height: 1.4;
}

.field select {
    padding-right: 30px;
}

.field input::placeholder {
    color: #737373;
    opacity: 1;
}

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

.field small {
    display: block;
    font-size: 10px;
    line-height: 1.5;
    color: var(--muted);
    margin-top: 6px;
}

.field input[type='file'] {
    padding: 12px;
    font-size: 11px;
    min-height: 54px;
}

.field input[type='file']::file-selector-button {
    background: var(--ink);
    color: #fff;
    border: 0;
    border-radius: 5px;
    padding: 8px 11px;
    font-size: 11px;
    font-weight: 700;
    margin-right: 10px;
    cursor: pointer;
}

.file-feedback {
    font-size: 11px;
    line-height: 1.5;
    margin: 5px 0 0;
    overflow-wrap: anywhere;
}

.file-feedback:empty {
    display: none;
}

.error-text {
    color: var(--danger);
}

.consents {
    border-top: 1px solid var(--line);
    padding-top: 26px;
    margin-top: 19px;
    margin-bottom: 21px;
    display: grid;
    gap: 10px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 10px;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox input {
    appearance: none;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    border: 1px solid var(--ink);
    border-radius: 3px;
    margin: 0;
    background: #fff;
    cursor: pointer;
}

.checkbox input:checked {
    background: var(--ink);
}

.checkbox input:checked:after {
    content: '';
    display: block;
    width: 8px;
    height: 4px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
    margin: 3px 2px;
}

.checkbox span {
    padding-top: 1px;
}

.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
    min-height: 46px;
    border-radius: 50px;
    border: 1px solid var(--ink);
    padding: 12px 22px;
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
    line-height: 1.2;
    transition:
        background 0.15s,
        color 0.15s;
}

.primary {
    background: var(--ink);
    color: #fff;
    width: 100%;
    letter-spacing: 0.3px;
}

.primary:hover {
    background: #303030;
}

.submit-button {
    font-size: 14px;
}

.secondary {
    background: #fff;
    color: var(--ink);
}

.secondary:hover {
    background: var(--soft);
}

.resend-hint {
    font-size: 10px;
    text-align: center;
    margin: 14px 0 -2px;
    color: var(--muted);
}

.captcha {
    margin: 15px 0;
    max-width: 100%;
    overflow: auto;
}

.honey {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.alert {
    border: 1px solid #b8b8ad;
    border-radius: 8px;
    background: #f6f7ef;
    font-size: 13px;
    line-height: 1.5;
    padding: 14px;
    margin-bottom: 20px;
}

.alert.error {
    border-color: #ddb1b7;
    background: #fff3f3;
    color: #81202d;
}

.alert.success {
    border-color: #b1c876;
    background: #f2f9e3;
}

.alert ul {
    padding-left: 18px;
    margin: 8px 0 0;
}

.alert li + li {
    margin-top: 4px;
}

.muted {
    color: var(--muted);
    line-height: 1.6;
}

.site-footer {
    width: min(100% - 56px, 944px);
    margin: 0 auto;
    padding: 24px 0 30px;
    border-top: 1px solid var(--line);
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
    font-size: 10px;
    color: var(--muted);
    line-height: 1.5;
}

.site-footer nav {
    display: flex;
    gap: 16px;
}

.credit {
    color: #999;
}

.message-page {
    max-width: 540px;
    width: calc(100% - 48px);
    margin: 65px auto 85px;
    min-height: 55vh;
}

.message-brand {
    display: block;
    margin-bottom: 34px;
}

.message-card {
    padding: 35px;
}

.message-card h1 {
    font-size: 36px;
    letter-spacing: -1.1px;
    line-height: 1.1;
    margin: 22px 0 18px;
}

.message-card p {
    font-size: 15px;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.message-card .button {
    margin-top: 10px;
}

.text-link {
    display: block;
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
}

.legal-page {
    width: min(100% - 48px, 760px);
    margin: 55px auto 75px;
    min-height: 65vh;
}

.back-link {
    display: block;
    margin-bottom: 40px;
    font-size: 13px;
}

.legal-page h1 {
    font-size: 40px;
    letter-spacing: -1.3px;
    margin: 22px 0 32px;
}

.legal-copy {
    white-space: pre-wrap;
    font-size: 15px;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.formatted-copy { white-space: normal; overflow-wrap: anywhere; }
.formatted-copy h3 { margin: 16px 0 8px; font-size: 1.15em; line-height: 1.4; }
.formatted-copy ul { padding-left: 24px; margin: 10px 0; }
.formatted-copy li { margin: 4px 0; }
.format-toolbar { display: flex; flex-wrap: wrap; gap: 5px; margin: 7px 0; }
.format-toolbar button { background: #f6f6f3; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font-size: 11px; cursor: pointer; }
.format-toolbar button:hover { background: var(--acid); border-color: var(--ink); }
.format-toolbar button:first-child { font-weight: 800; }
.format-toolbar button:nth-child(2) { font-style: italic; }
.format-toolbar button:nth-child(3) { text-decoration: underline; }
.visual-editor { min-height: 150px; max-height: 500px; overflow: auto; padding: 14px; border: 1px solid var(--ink); border-radius: 8px; background: #fff; line-height: 1.6; font-size: 14px; cursor: text; }
.visual-editor:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
.field textarea[hidden] { display: none; }
.field .ql-toolbar.ql-snow { border: 1px solid var(--line); border-bottom: 0; border-radius: 8px 8px 0 0; background: #fafaf8; }
.field .quill-field.ql-container { border: 1px solid var(--line); border-radius: 0 0 8px 8px; font-family: inherit; font-size: 14px; background: #fff; }
.quill-field .ql-editor { min-height: 160px; max-height: 480px; overflow: auto; line-height: 1.6; }
.quill-field:focus-within { outline: 2px solid var(--ink); outline-offset: 1px; }
.field .ql-toolbar button { min-height: 28px; }
.visual-editor p { margin: 0 0 8px; }
.formatted-copy p { margin: 0 0 10px; }
.format-preview { margin-top: 8px; font-size: 13px; }
.format-preview summary { cursor: pointer; color: var(--muted); }
.format-preview .formatted-copy { border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-top: 10px; line-height: 1.6; background: #fafaf8; }

.admin-body {
    background: #f6f6f3;
}

.admin-header {
    padding: 20px max(28px, calc((100vw - 1152px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--line);
    background: white;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    font-size: 12px;
    letter-spacing: 1px;
    font-weight: 700;
}

.admin-brand img {
    width: 61px;
}

.admin-header nav {
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 12px;
}

.admin-header form {
    margin: 0;
}

.link-button {
    background: transparent;
    border: 0;
    padding: 0;
    text-decoration: underline;
    font-size: 12px;
}

.admin-main {
    width: min(100% - 56px, 1152px);
    margin: 42px auto 70px;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-bottom: 30px;
}

.page-heading h1 {
    font-size: 35px;
    letter-spacing: -1.3px;
    margin: 8px 0;
}

.eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
    color: var(--muted);
}

.page-heading p {
    font-size: 13px;
    color: var(--muted);
    margin: 10px 0 0;
}

.page-heading .primary {
    width: auto;
}

.admin-panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px;
    margin-bottom: 24px;
}

.admin-panel h2 {
    font-size: 20px;
    letter-spacing: -0.4px;
    margin-bottom: 20px;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-bottom: 28px;
}

.stat {
    padding: 24px;
    border: 1px solid var(--line);
    background: white;
    border-radius: 12px;
}

.stat span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 13px;
}

.stat strong {
    font-size: 34px;
    letter-spacing: -1px;
}

.table-wrap {
    overflow-x: auto;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
}

table {
    border-collapse: collapse;
    width: 100%;
    text-align: left;
    font-size: 12px;
    white-space: nowrap;
}

th {
    background: #fafaf8;
    padding: 17px 18px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

td {
    padding: 20px 18px;
    border-bottom: 1px solid #ebebe7;
    line-height: 1.6;
}

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

td strong {
    font-size: 14px;
}

td small {
    font-size: 11px;
    color: var(--muted);
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.action-button,
.admin-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    padding: 6px 10px;
    border: 1px solid #deded7;
    border-radius: 7px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s,
        transform 0.15s;
}

.action-button::before,
.admin-nav-link::before {
    margin-right: 5px;
    font-size: 13px;
    line-height: 1;
}

.action-button:hover,
.admin-nav-link:hover {
    transform: translateY(-1px);
    border-color: var(--ink);
    background: var(--soft);
}

.action-edit::before {
    content: '✎';
}
.action-submissions::before {
    content: '☷';
}
.action-statistics::before {
    content: '↗';
}
.action-duplicate::before {
    content: '⧉';
}
.action-preview::before {
    content: '↗';
}
.action-statistics {
    border-color: #cadb94;
    background: #f5ffd9;
}
.action-preview {
    border-color: #c5dced;
    background: #f1faff;
}

.admin-header nav {
    gap: 8px;
}
.admin-nav-link {
    min-height: 34px;
    padding: 7px 11px;
    border-radius: 18px;
}
.nav-actions::before {
    content: '☷';
}
.nav-users::before {
    content: '●';
    font-size: 9px;
}
.nav-legal::before {
    content: '§';
}
.nav-website::before {
    content: '↗';
}
.nav-logout::before {
    content: '→';
}
.nav-actions {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}
.nav-actions:hover {
    background: #303030;
    border-color: #303030;
}
.nav-logout {
    color: #7a3037;
    border-color: #eccfd1;
    background: #fffafa;
}

.user-editor {
    display: grid;
    grid-template-columns: minmax(200px, .8fr) minmax(360px, 1.2fr);
    gap: 34px;
    align-items: start;
}

.user-editor h2 {
    margin: 7px 0 8px;
}

.user-editor p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.user-editor form {
    min-width: 0;
}

.user-editor .primary {
    width: auto;
}

.user-table {
    margin-top: 18px;
}

.pill {
    display: inline-flex;
    border-radius: 30px;
    padding: 4px 9px;
    font-size: 10px;
    font-weight: 700;
    background: #f0f0ea;
}

.pill.active {
    background: #e2f5b4;
}

.pill.pending {
    background: #fff0c7;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
    font-size: 14px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
    gap: 24px;
}

.admin-grid .field input,
.admin-grid .field select,
.admin-grid .field textarea {
    border-color: #aaa;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.admin-panel .checkbox {
    font-size: 12px;
}

.admin-panel .field > label {
    font-size: 12px;
}

.admin-panel .field small {
    font-size: 11px;
}

.admin-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.admin-actions .primary {
    width: auto;
}

.asset-preview {
    height: 80px;
    width: 110px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 6px;
    margin: 5px 0 15px;
}

.danger-zone {
    margin-top: 30px;
    padding: 24px;
    border: 1px solid #e4c0c0;
    border-radius: 12px;
    background: #fff9f8;
}

.danger-zone summary {
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.danger-zone p {
    font-size: 12px;
    line-height: 1.6;
    margin: 18px 0;
}

.danger-zone .button {
    margin-top: 20px;
    background: #8a2833;
    color: white;
    border-color: #8a2833;
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
    margin-bottom: 24px;
}

.filters .field {
    margin: 0;
    min-width: 170px;
}

.filters .search-field {
    flex: 1;
}

.filters .button {
    border-radius: 8px;
    min-height: 44px;
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 23px 0;
    font-size: 12px;
}

.login-page {
    max-width: 430px;
    margin: 0px auto;
    width: calc(100% - 48px);
    padding-top: 80px;
}

.login-page .brand-logo {
    width: 115px;
    margin: 0 0 32px;
}

.login-page .entry-card {
    padding: 32px;
}

.login-page h1 {
    font-size: 29px;
    letter-spacing: -1px;
}

.login-page p {
    font-size: 13px;
    line-height: 1.6;
    color: var(--muted);
}

.login-page .button {
    margin-top: 12px;
}

.admin-note {
    font-size: 12px;
    line-height: 1.6;
    color: var(--muted);
}

.admin-footer {
    font-size: 10px;
    letter-spacing: 0.5px;
    color: #777;
    text-align: center;
    padding: 30px;
}

@media (min-width: 1500px) {
    .landing > h1 {
        font-size: 60px;
    }
}

@media (max-width: 1050px) {
    .landing > h1 {
        font-size: clamp(32px, 5.5vw, 56px);
        white-space: normal;
        max-width: 900px;
    }

    .landing-grid {
        gap: 34px;
    }

    .description {
        font-size: 19px;
    }

    .entry-card {
        padding: 26px 23px;
    }

    .steps {
        gap: 7px;
    }

    .steps li {
        padding: 8px 9px;
    }
}

@media (max-width: 720px) {
    .announcement {
        font-size: 8px;
        padding: 10px 8px;
        letter-spacing: 0.2px;
    }

    .landing {
        width: calc(100% - 40px);
        margin-top: 30px;
        margin-bottom: 50px;
    }

    .landing > h1 {
        font-size: 38px;
        letter-spacing: -1.6px;
        margin-bottom: 28px;
        line-height: 1.05;
    }

    .landing-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .brand-logo {
        width: 125px;
        margin-top: 18px;
    }

    .description {
        font-size: 18px;
        max-width: 510px;
        margin-bottom: 22px;
    }

    .steps {
        gap: 8px;
    }

    .steps li {
        font-size: 10px;
        padding: 8px 10px;
    }

    .product-image {
        width: min(100%, 380px);
        margin: 0 auto;
    }

    .entry-card {
        margin: 0 7px 0 0;
        border-radius: 17px;
        box-shadow: 7px 7px 0 var(--ink);
        padding: 26px 22px;
    }

    .field {
        margin-bottom: 18px;
    }

    .field input:not([type='checkbox']),
    .field select {
        font-size: 16px;
    }

    .field input[type='file'] {
        font-size: 11px;
    }

    .checkbox {
        font-size: 11px;
    }

    .consents {
        padding-top: 23px;
    }

    .site-footer {
        width: calc(100% - 40px);
        gap: 12px;
        justify-content: flex-start;
    }

    .site-footer nav {
        flex-wrap: wrap;
        gap: 15px;
    }

    .credit {
        display: none;
    }

    .message-page {
        margin-top: 40px;
    }

    .message-card h1 {
        font-size: 32px;
    }

    .legal-page h1 {
        font-size: 32px;
    }

    .admin-header {
        padding: 17px 20px;
    }

    .admin-brand span {
        display: none;
    }

    .admin-header nav {
        gap: 17px;
    }

    .admin-main {
        width: calc(100% - 36px);
        margin-top: 28px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 15px;
    }

    .page-heading h1 {
        font-size: 31px;
    }

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

    .stats {
        gap: 8px;
    }

    .stat {
        padding: 16px 12px;
    }

    .stat strong {
        font-size: 28px;
    }

    .stat span {
        font-size: 10px;
        min-height: 24px;
    }

    .admin-panel {
        padding: 20px;
    }

    .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .filters .field {
        min-width: 130px;
    }

    .admin-actions {
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

/* Legal documents open above the participation form without losing entered values. */
.legal-dialog-open {
    overflow: hidden;
}

.legal-dialog {
    width: min(900px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 1px solid var(--ink);
    border-radius: 18px;
    background: #fff;
    color: var(--ink);
    box-shadow: 8px 8px 0 var(--ink);
}

.legal-dialog[open] {
    display: flex;
    flex-direction: column;
}

.legal-dialog::backdrop {
    background: rgb(0 0 0 / 60%);
}

.legal-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px 26px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.legal-dialog-header h2 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
    overflow-wrap: anywhere;
    min-width: 0;
}

.legal-dialog-header button {
    flex-shrink: 0;
}

.legal-dialog-body {
    overflow: auto;
    overscroll-behavior: contain;
    padding: 26px;
}

.legal-dialog-frame {
    display: block;
    width: 100%;
    height: 65dvh;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
}

.legal-dialog-help {
    font-size: 12px;
    line-height: 1.6;
    margin: 0 0 16px;
    color: var(--muted);
}

.table-actions form {
    margin: 0;
}

@media (max-width: 600px) {
    .legal-dialog-header {
        padding: 16px;
        gap: 12px;
    }

    .legal-dialog-header h2 {
        font-size: 19px;
    }

    .legal-dialog-header button {
        padding: 10px 12px;
        font-size: 12px;
    }

    .legal-dialog-body {
        padding: 18px;
    }

    .legal-dialog .legal-copy {
        font-size: 14px;
    }
}

/* Campaign editor tabs keep long forms manageable while remaining usable without JavaScript. */
.editor-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 22px;
}

.editor-tabs button {
    border: 1px solid var(--ink);
    border-radius: 999px;
    background: #fff;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.editor-tabs button[aria-selected='true'] {
    background: var(--ink);
    color: #fff;
}

.legal-editor h3 {
    font-size: 15px;
    margin: 26px 0 14px;
}

.legal-editor h3:first-of-type {
    margin-top: 0;
}

.editor-form .admin-grid {
    display: block;
}

/* Shop bars show confirmation at a glance: green confirmed, red still open. */
.shop-bar {
    background: #ee8e96;
}

.shop-bar .shop-confirmed {
    display: block;
    height: 100%;
    min-width: 0;
    background: var(--acid);
    transition: width 0.2s ease;
}

/* Public overview: cards share the campaign landing page's type, colors and buttons. */
.contest-overview {
    width: min(100% - 56px, 944px);
    margin: 42px auto 72px;
    min-height: 65vh;
}

/* CSP-safe chart proportions; the templates use these instead of inline styles. */
.daily-chart .height-0 {
    height: 0 !important;
}

.daily-chart .height-5 {
    height: 5% !important;
}

.daily-chart .height-10 {
    height: 10% !important;
}

.daily-chart .height-15 {
    height: 15% !important;
}

.daily-chart .height-20 {
    height: 20% !important;
}

.daily-chart .height-25 {
    height: 25% !important;
}

.daily-chart .height-30 {
    height: 30% !important;
}

.daily-chart .height-35 {
    height: 35% !important;
}

.daily-chart .height-40 {
    height: 40% !important;
}

.daily-chart .height-45 {
    height: 45% !important;
}

.daily-chart .height-50 {
    height: 50% !important;
}

.daily-chart .height-55 {
    height: 55% !important;
}

.daily-chart .height-60 {
    height: 60% !important;
}

.daily-chart .height-65 {
    height: 65% !important;
}

.daily-chart .height-70 {
    height: 70% !important;
}

.daily-chart .height-75 {
    height: 75% !important;
}

.daily-chart .height-80 {
    height: 80% !important;
}

.daily-chart .height-85 {
    height: 85% !important;
}

.daily-chart .height-90 {
    height: 90% !important;
}

.daily-chart .height-95 {
    height: 95% !important;
}

.daily-chart .height-100 {
    height: 100% !important;
}

.shop-confirmed.rate-0 {
    width: 0 !important;
}

.shop-confirmed.rate-5 {
    width: 5% !important;
}

.shop-confirmed.rate-10 {
    width: 10% !important;
}

.shop-confirmed.rate-15 {
    width: 15% !important;
}

.shop-confirmed.rate-20 {
    width: 20% !important;
}

.shop-confirmed.rate-25 {
    width: 25% !important;
}

.shop-confirmed.rate-30 {
    width: 30% !important;
}

.shop-confirmed.rate-35 {
    width: 35% !important;
}

.shop-confirmed.rate-40 {
    width: 40% !important;
}

.shop-confirmed.rate-45 {
    width: 45% !important;
}

.shop-confirmed.rate-50 {
    width: 50% !important;
}

.shop-confirmed.rate-55 {
    width: 55% !important;
}

.shop-confirmed.rate-60 {
    width: 60% !important;
}

.shop-confirmed.rate-65 {
    width: 65% !important;
}

.shop-confirmed.rate-70 {
    width: 70% !important;
}

.shop-confirmed.rate-75 {
    width: 75% !important;
}

.shop-confirmed.rate-80 {
    width: 80% !important;
}

.shop-confirmed.rate-85 {
    width: 85% !important;
}

.shop-confirmed.rate-90 {
    width: 90% !important;
}

.shop-confirmed.rate-95 {
    width: 95% !important;
}

.shop-confirmed.rate-100 {
    width: 100% !important;
}

.entry-delete {
    white-space: normal;
    min-width: 155px;
}

.entry-delete summary {
    cursor: pointer;
    color: #81202d;
    text-decoration: underline;
    font-size: 11px;
}

.entry-delete form {
    margin-top: 10px;
}

.entry-delete p {
    font-size: 10px;
    line-height: 1.4;
    margin: 0 0 8px;
}

.entry-delete .checkbox {
    font-size: 10px;
    margin-bottom: 8px;
}

.delete-entry-button {
    color: #81202d;
    font-weight: 700;
}

/* Contest statistics */
.daily-bar {
    min-height: 0 !important;
}

.daily-bar-wrap {
    position: relative;
    display: block;
}

.daily-bar {
    position: absolute !important;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto !important;
    height: var(--daily-height, 0%) !important;
    min-height: 0 !important;
}

.daily-verified {
    height: var(--verified-height, 0%) !important;
}

.statistics-heading {
    margin-bottom: 28px;
}

.statistics-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.statistics-actions .button {
    width: auto;
}

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

.statistics-summary .stat {
    position: relative;
    overflow: hidden;
    min-height: 154px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.statistics-summary .stat:before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--acid);
}

.statistics-summary .stat strong {
    font-size: 42px;
    line-height: 1;
    letter-spacing: -1.8px;
    margin: 0 0 13px;
}

.statistics-summary .stat .stat-date {
    font-size: 30px;
}

.statistics-summary .stat small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.statistics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.95fr);
    gap: 24px;
    align-items: stretch;
}

.statistics-panel {
    margin: 0;
}

.statistics-panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 25px;
}

.statistics-panel-heading h2 {
    margin: 7px 0 0;
}

.statistics-panel-heading > small,
.statistics-panel-heading > a {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.5;
    white-space: nowrap;
}

.statistics-panel-heading > a {
    text-decoration: underline;
}

.daily-chart {
    height: 244px;
    display: flex;
    align-items: stretch;
    gap: 7px;
    border-bottom: 1px solid var(--line);
    padding: 18px 0 0;
}

.daily-column {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.1;
}

.daily-value {
    min-height: 11px;
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
}

.daily-bar-wrap {
    height: 174px;
    width: 100%;
    display: flex;
    align-items: flex-end;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 42px, #ededeb 43px);
}

.daily-bar {
    position: relative;
    width: 100%;
    min-height: 4px;
    background: var(--acid);
    overflow: hidden;
    transition: height 0.2s ease;
}

.daily-verified {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    background: var(--ink);
}

.chart-key {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 10px;
    margin: 16px 0 0;
}

.chart-key span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-key i {
    display: block;
    width: 10px;
    height: 10px;
}

.key-total {
    background: var(--acid);
}

.key-verified {
    background: var(--ink);
}

.chart-empty {
    min-height: 210px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.shop-ranking {
    display: grid;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.shop-ranking li {
    min-width: 0;
}

.shop-ranking-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    line-height: 1.3;
}

.shop-ranking-label > span {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow-wrap: anywhere;
}

.shop-ranking-label b {
    display: inline-grid;
    place-items: center;
    width: 21px;
    height: 21px;
    flex: 0 0 21px;
    margin-right: 9px;
    border-radius: 50%;
    background: var(--soft);
    font-size: 10px;
}

.shop-ranking-label strong {
    font-size: 15px;
}

.shop-bar {
    height: 8px;
    margin: 9px 0 6px;
    overflow: hidden;
}

.shop-bar span {
    display: block;
    height: 100%;
    min-width: 4px;
    background: var(--acid);
}

.shop-ranking small {
    color: var(--muted);
    font-size: 10px;
}

.recent-panel {
    margin-top: 24px;
}

.recent-statistics {
    overflow-x: auto;
}

.recent-statistics table {
    white-space: normal;
}

.recent-statistics td {
    padding-top: 15px;
    padding-bottom: 15px;
}

.overview-heading {
    margin-bottom: 34px;
}

.overview-logo {
    display: block;
    width: 95px;
    height: auto;
    margin-bottom: 30px;
}

.overview-heading h1 {
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 700;
    letter-spacing: -1.8px;
    line-height: 1.08;
    margin: 18px 0 14px;
}

.overview-heading p {
    color: var(--muted);
    font-size: 17px;
    line-height: 1.5;
    margin-bottom: 0;
}

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

.contest-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--ink);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 7px 7px 0 var(--ink);
    background: white;
    min-width: 0;
}

.contest-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 5 / 3;
    background: var(--soft);
}

.contest-image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.contest-details {
    padding: 27px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.contest-details .badge {
    align-self: flex-start;
}

.contest-details h2 {
    font-size: 26px;
    letter-spacing: -0.7px;
    line-height: 1.15;
    margin: 18px 0 12px;
    overflow-wrap: anywhere;
}

.contest-description {
    font-size: 15px;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 24px;
    overflow-wrap: anywhere;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.contest-deadline {
    font-size: 12px;
    margin-top: auto;
    margin-bottom: 17px;
}

.contest-card:only-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.contest-card:only-child .contest-image {
    aspect-ratio: auto;
    min-height: 320px;
}

.contest-card:only-child .contest-image img {
    height: 100%;
    aspect-ratio: auto;
}

.contest-card:only-child .contest-details {
    justify-content: center;
    padding: 35px;
}

.contest-card:only-child .contest-deadline {
    margin-top: 0;
}

.overview-empty {
    border: 1px solid var(--ink);
    border-radius: 18px;
    padding: 40px;
    box-shadow: 7px 7px 0 var(--ink);
}

.overview-empty h2 {
    font-size: 28px;
    letter-spacing: -0.6px;
    line-height: 1.2;
    margin-bottom: 12px;
}

.overview-empty p {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 0;
}

.contest-back {
    margin-bottom: 23px;
}

@media (max-width: 720px) {
    .admin-header nav {
        gap: 5px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .admin-nav-link {
        min-height: 30px;
        padding: 6px 8px;
        font-size: 10px;
    }

    .user-editor {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .contest-overview {
        width: calc(100% - 40px);
        margin-top: 30px;
        margin-bottom: 50px;
    }

    .overview-logo {
        width: 80px;
        margin-bottom: 26px;
    }

    .overview-heading h1 {
        font-size: 36px;
        letter-spacing: -1.3px;
    }

    .overview-heading p {
        font-size: 16px;
    }

    .contest-grid {
        grid-template-columns: 1fr;
        gap: 27px;
        padding-right: 7px;
    }

    .contest-card:only-child {
        display: flex;
    }

    .contest-image,
    .contest-card:only-child .contest-image {
        aspect-ratio: 4 / 3;
        min-height: 0;
    }

    .contest-card:only-child .contest-image img {
        height: 100%;
        aspect-ratio: auto;
    }

    .contest-details,
    .contest-card:only-child .contest-details {
        padding: 24px;
    }

    .contest-details h2 {
        font-size: 25px;
    }

    .overview-empty {
        padding: 28px;
        margin-right: 7px;
    }

    .overview-empty h2 {
        font-size: 25px;
    }

    .statistics-actions {
        width: 100%;
    }

    .statistics-actions .button {
        flex: 1;
        padding-left: 12px;
        padding-right: 12px;
    }

    .statistics-summary {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .statistics-summary .stat {
        min-height: 135px;
        padding: 17px 13px;
    }

    .statistics-summary .stat strong {
        font-size: 33px;
    }

    .statistics-summary .stat .stat-date {
        font-size: 25px;
    }

    .statistics-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .statistics-panel {
        padding: 19px;
    }

    .statistics-panel-heading {
        margin-bottom: 20px;
    }

    .statistics-panel-heading h2 {
        font-size: 18px;
    }

    .daily-chart {
        height: 212px;
        gap: 4px;
    }

    .daily-bar-wrap {
        height: 148px;
    }

    .daily-column {
        font-size: 8px;
    }

    .daily-column:nth-child(even) > span {
        visibility: hidden;
    }

    .shop-ranking {
        gap: 15px;
    }

    .recent-panel {
        margin-top: 16px;
    }

    .recent-statistics th,
    .recent-statistics td {
        padding-left: 10px;
        padding-right: 10px;
    }

    .recent-statistics th:nth-child(2),
    .recent-statistics td:nth-child(2) {
        display: none;
    }
}
