.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "Ocorreu um erro inesperado."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Carregando");
    }

code {
    color: #c02d76;
}

.ingredients-page {
    margin: 0 auto;
    max-width: 52rem;
    padding: 1.5rem;
}

.ingredients-page h1 {
    margin-bottom: 1.5rem;
}

.ingredient-form,
.ingredient-search {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-row,
.ingredient-edit-form,
.ingredient-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.form-row input,
.ingredient-edit-form input,
.ingredient-search input {
    flex: 1 1 15rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
}

.ingredients-page button {
    min-height: 2.75rem;
    padding: 0.5rem 0.9rem;
}

.ingredient-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.ingredient-list li {
    align-items: center;
    border-bottom: 1px solid #d1d5db;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.ingredient-name {
    flex: 1 1 10rem;
    font-weight: 600;
}

.ingredient-active {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
}

.ingredient-active input {
    height: 1.2rem;
    width: 1.2rem;
}

.ingredient-edit-form {
    align-items: center;
    flex: 1 1 100%;
}

.ingredient-edit-form label {
    flex-basis: 100%;
}

.feedback-error {
    color: #a51d24;
    font-weight: 600;
}

.configuration-page {
    margin: 0 auto;
    max-width: 64rem;
    padding: 1.5rem;
}

.configuration-page h1 {
    margin-bottom: 0.75rem;
}

.ingredient-count {
    font-weight: 600;
    margin: 1.25rem 0;
}

.choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.configuration-page button {
    min-height: 2.75rem;
    padding: 0.5rem 0.9rem;
}

.configuration-page button.selected {
    background: #173c32;
    border: 2px solid #1a6a49;
    color: #fff;
}

.configuration-page button:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.mystery-selection {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    margin: 1.5rem 0;
}

.mystery-selection h2,
.mystery-selection h3 {
    margin-bottom: 0.35rem;
}

.selection-option {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    min-height: 2.6rem;
}

.selection-option input {
    height: 1.2rem;
    width: 1.2rem;
}

.automatic-selection {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0;
    max-width: 30rem;
}

.automatic-selection label {
    display: grid;
    gap: 0.35rem;
}

.automatic-selection input {
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
}

.mystery-result {
    border: 2px solid #1a6a49;
    border-radius: 0.75rem;
    margin: 2rem 0;
    padding: 1.25rem;
}

.dish-form {
    border-bottom: 1px solid #d1d5db;
    display: grid;
    gap: 0.5rem;
    margin: 1.5rem 0;
    max-width: 36rem;
    padding-bottom: 1.5rem;
}

.dish-form input,
.dish-form select {
    min-height: 2.75rem;
    padding: 0.5rem 0.75rem;
}

.dish-schedule {
    margin: 2rem 0;
}

.planned-duration {
    font-size: 1.15rem;
    font-weight: 700;
}

.dish-schedule ol {
    padding-left: 1.5rem;
}

.dish-schedule li {
    align-items: center;
    border-bottom: 1px solid #d1d5db;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: space-between;
    padding: 0.9rem 0.25rem;
}

.dish-schedule li span {
    flex: 1 1 10rem;
}

.setup-summary {
    border-bottom: 1px solid #d1d5db;
    margin: 1.5rem 0;
    padding-bottom: 1rem;
}

.setup-summary li {
    margin: 0.55rem 0;
}

.start-competition-button {
    background: #17623d;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    min-height: 3.5rem;
    padding: 0.75rem 1.5rem;
}

.recovery-prompt {
    max-width: 42rem;
    margin: 1.5rem auto;
    padding: 1.25rem;
    border: 1px solid #d69a43;
    border-radius: 0.75rem;
    background: #fff8eb;
}

.recovery-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    margin-top: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    background: #8c451e;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.recovery-screen > p:not(.competition-brand, .paused-timer) {
    max-width: 36rem;
    margin-inline: auto;
    line-height: 1.6;
}

.results-subtitle {
    margin: 0.25rem 0 1.5rem;
    color: #cbd0d5;
}

.results-metrics,
.results-counts,
.results-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem;
    width: min(100%, 70rem);
    margin: 1rem auto;
}

.results-metrics article,
.results-counts p,
.results-highlights p,
.results-dish-card,
.results-box {
    margin: 0;
    padding: 1rem;
    border: 1px solid #343a40;
    border-radius: 0.75rem;
    background: #1d2227;
}

.results-metrics article {
    display: grid;
    gap: 0.5rem;
    text-align: left;
}

.results-metrics span {
    color: #c0c6cb;
    font-size: 0.9rem;
}

.results-metrics strong {
    color: #fff;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
}

.results-summary,
.results-dishes,
.results-box {
    width: min(100%, 70rem);
    margin: 1.75rem auto;
    text-align: left;
}

.results-summary h2,
.results-dishes h2,
.results-box h2 {
    margin-bottom: 0.75rem;
}

.results-counts strong {
    color: #f4bf63;
    font-size: 1.5rem;
}

.results-highlights {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.results-dish-card {
    margin-bottom: 0.75rem;
}

.results-dish-card p {
    margin: 0.35rem 0;
    color: #d2d6d9;
}

.results-dish-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.results-dish-heading h3 {
    margin: 0 0 0.5rem;
}

.results-box {
    padding: 1rem 1.25rem;
}

.return-home-button {
    min-height: 3.25rem;
    margin: 1.5rem auto 0;
    padding: 0.8rem 1.5rem;
    border: 0;
    border-radius: 0.6rem;
    background: #d98a32;
    color: #17191b;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

@media (max-width: 36rem) {
    .results-dish-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.25rem;
    }
}

.start-competition-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.competition-screen {
    background: #17191b;
    color: #f5f5f5;
    min-height: 100vh;
    padding: clamp(1rem, 3vw, 2.5rem);
}

.competition-header {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-between;
}

.competition-brand {
    color: #c7c9cb;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.competition-status {
    color: #d1d5db;
    font-weight: 600;
}

.timer-panel {
    margin: 1.25rem auto 2rem;
    max-width: 68rem;
    text-align: center;
}

.main-timer {
    color: #fff;
    font-size: clamp(4rem, 13vw, 9rem);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1;
    margin: 0.75rem 0;
}

.timer-details {
    color: #bdc1c4;
    display: flex;
    flex-wrap: wrap;
    font-size: 1.05rem;
    gap: 0.5rem 1.5rem;
    justify-content: center;
}

.timer-panel progress {
    accent-color: #30a46c;
    height: 0.65rem;
    margin-top: 1rem;
    max-width: 46rem;
    width: 100%;
}

.overtime-label,
.completed-deadline-label {
    color: #ff8c7a;
    font-size: clamp(1.1rem, 3vw, 1.8rem);
    font-weight: 800;
    letter-spacing: 0.07em;
    margin: 0;
}

.overtime-value {
    color: #ff6b57;
    font-size: clamp(2rem, 7vw, 4rem);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    margin: 0.4rem 0;
}

.completed-deadline-label {
    color: #f6c453;
}

.active-alerts {
    margin: 0 auto 1.5rem;
    max-width: 68rem;
}

.alert-message {
    border-left: 0.45rem solid #e5ae3d;
    border-radius: 0.35rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0.4rem 0;
    padding: 0.85rem 1rem;
}

.alert-advance {
    background: #3d321c;
    border-color: #e7b743;
    color: #ffe39a;
}

.alert-deadline,
.alert-overtime {
    background: #4a211f;
    border-color: #f26757;
    color: #ffc1b9;
}

.competition-content {
    align-items: start;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
    margin: 0 auto;
    max-width: 82rem;
}

.dish-board h1 {
    font-size: 1.6rem;
    margin: 0 0 0.75rem;
}

.dish-card,
.competition-box {
    background: #232629;
    border: 1px solid #41464a;
    border-radius: 0.85rem;
    margin: 0.75rem 0;
    padding: 1.15rem;
}

.dish-card {
    border-left: 0.45rem solid #8a9094;
}

.dish-pending {
    border-left-color: #899198;
}

.dish-delivered {
    border-left-color: #30a46c;
}

.dish-late {
    border-left-color: #f26757;
}

.dish-card-heading {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: space-between;
}

.dish-card h2,
.competition-box h2 {
    font-size: 1.25rem;
    margin: 0;
}

.dish-card p {
    color: #d0d4d7;
    font-size: 1.05rem;
}

.dish-status {
    font-weight: 700;
}

.dish-delivered .dish-status {
    color: #81dfa9;
}

.dish-late .dish-status {
    color: #ff9e91;
}

.deliver-button,
.undo-delivery-button,
.pause-button,
.finish-button,
.resume-button {
    border: 0;
    border-radius: 0.55rem;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    min-height: 3rem;
    padding: 0.7rem 1.1rem;
}

.deliver-button,
.resume-button {
    background: #218350;
}

.undo-delivery-button {
    background: #4b5156;
    margin-left: 0.5rem;
}

.delivery-details {
    align-items: center;
    color: #d0d4d7;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.competition-box {
    border-color: #a98536;
    position: sticky;
    top: 1rem;
}

.competition-box h2 {
    color: #f5d27a;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.competition-box h3 {
    color: #fff;
    margin: 1rem 0 0.35rem;
}

.competition-box ul {
    margin: 0;
    padding-left: 1.25rem;
}

.competition-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem auto 0;
    max-width: 82rem;
}

.pause-button {
    background: #a66b17;
}

.finish-button {
    background: #8f332b;
}

.delivery-feedback,
.competition-error {
    margin: 0.75rem auto;
    max-width: 68rem;
    padding: 0.5rem 0.75rem;
}

.delivery-feedback {
    background: #173c32;
    color: #a9e8c5;
}

.competition-error {
    background: #4a211f;
    color: #ffc1b9;
}

.countdown-screen,
.paused-screen,
.competition-finished,
.competition-message {
    align-items: center;
    background: #17191b;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
    text-align: center;
}

.countdown-screen h1 {
    font-size: clamp(5rem, 24vw, 15rem);
    font-weight: 900;
    line-height: 1;
    margin: 1rem 0;
}

.paused-screen h1,
.competition-finished h1 {
    color: #f4c45e;
    font-size: clamp(2rem, 7vw, 4.5rem);
    font-weight: 900;
}

.paused-screen p:not(.competition-brand) {
    color: #d4d7d9;
    font-size: 1.2rem;
}

.paused-timer {
    color: #fff !important;
    font-size: clamp(3rem, 11vw, 7rem) !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    margin: 0.5rem 0;
}

.resume-button {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    min-height: 4.5rem;
    margin-top: 1rem;
    padding: 1rem 2rem;
}

.competition-message {
    background: #fff;
    color: #222;
    min-height: 60vh;
}

@media (max-width: 760px) {
    .competition-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .competition-box {
        position: static;
    }

    .delivery-details {
        align-items: stretch;
        flex-direction: column;
    }

    .undo-delivery-button {
        margin-left: 0;
    }
}

.feedback-success {
    color: #17623d;
    font-weight: 600;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Kitchen Challenge visual system */
:root {
    color-scheme: dark;
    --page: #111411;
    --page-raised: #171b17;
    --surface: #1d221d;
    --surface-raised: #252a24;
    --line: #343b33;
    --text: #f5f2e9;
    --muted: #b5bbaf;
    --soft: #899286;
    --accent: #f2b653;
    --accent-strong: #ffca70;
    --accent-dark: #312817;
    --green: #85d9a0;
    --green-dark: #1c3526;
    --red: #ff9388;
    --red-dark: #3b2220;
    --radius: 1rem;
    --shadow: 0 1.25rem 3.5rem rgb(0 0 0 / 22%);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--page);
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background:
        radial-gradient(ellipse at 50% -20%, rgb(101 115 74 / 15%), transparent 55%),
        var(--page);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    font: inherit;
}

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

button {
    cursor: pointer;
}

a {
    color: var(--accent-strong);
    text-underline-offset: 0.22em;
}

a:hover {
    color: #ffe0a1;
}

:focus-visible {
    outline: 3px solid var(--accent-strong);
    outline-offset: 3px;
}

::selection {
    background: #f2b653;
    color: #171913;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

h1,
h2,
h3 {
    color: var(--text);
    line-height: 1.15;
}

h1 {
    letter-spacing: -0.045em;
}

.eyebrow {
    display: block;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    line-height: 1.4;
    text-transform: uppercase;
}

.home-page,
.configuration-page,
.ingredients-page {
    width: min(100% - 2rem, 72rem);
    margin-inline: auto;
    padding: clamp(1.25rem, 4vw, 3.25rem) 0 4rem;
}

.home-page {
    width: min(100% - 2rem, 66rem);
    padding-top: clamp(3.5rem, 12vh, 8rem);
}

.home-hero {
    position: relative;
    max-width: 55rem;
    margin: 0 auto clamp(2rem, 7vw, 4.5rem);
    padding: 1.25rem 0 2rem;
}

.home-hero h1 {
    margin: 1.2rem 0 0.6rem;
    font-size: clamp(3rem, 9vw, 6.5rem);
    font-weight: 850;
    letter-spacing: -0.075em;
    line-height: 0.98;
}

.home-hero p {
    max-width: 34rem;
    margin: 1.1rem 0 0;
    color: var(--muted);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero-rule {
    display: block;
    width: min(11rem, 36vw);
    height: 0.28rem;
    margin-top: 2.25rem;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--accent), #d96f3f 78%, transparent);
}

.home-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.home-action-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    min-height: 8rem;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, #20251f, #191d19);
    color: var(--text);
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.home-action-card:hover {
    transform: translateY(-3px);
    border-color: #727650;
    background: #242a22;
    color: #fff;
}

.home-action-primary {
    border-color: #83683a;
    background: linear-gradient(145deg, #30291d, #211f19);
}

.action-index {
    align-self: start;
    color: var(--accent);
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.home-action-card strong,
.home-action-card small {
    display: block;
}

.home-action-card strong {
    font-size: 1.05rem;
}

.home-action-card small {
    margin-top: 0.3rem;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.4;
}

.action-arrow {
    color: var(--accent);
    font-size: 1.2rem;
}

.page-header {
    display: grid;
    justify-items: start;
    gap: 0.45rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    margin: 0.3rem 0 0;
    font-size: clamp(2.1rem, 5vw, 3.4rem);
    font-weight: 800;
}

.page-header p {
    max-width: 48rem;
    margin: 0.4rem 0 0;
    color: var(--muted);
}

.back-link {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    margin: -0.25rem 0 1.3rem;
    color: var(--muted);
    font-weight: 700;
    text-decoration: none;
}

.back-link:hover {
    color: var(--accent-strong);
}

.surface-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(145deg, rgb(35 41 34 / 96%), rgb(27 32 27 / 98%));
    box-shadow: var(--shadow);
}

.configuration-page > .page-header,
.ingredients-page > .page-header {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.configuration-page h1,
.ingredients-page h1 {
    margin-bottom: 0.25rem;
}

.configuration-page > p,
.ingredients-page > p {
    color: var(--muted);
}

.ingredient-entry-card {
    margin-bottom: 2.25rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.ingredient-entry-card h2,
.section-heading h2,
.dish-form h2,
.setup-summary h2,
.dish-schedule h2 {
    margin: 0;
    font-size: 1.3rem;
}

.ingredient-form,
.ingredient-search {
    display: grid;
    gap: 0.5rem;
}

.ingredient-form {
    margin-top: 1rem;
}

.form-row,
.ingredient-edit-form,
.ingredient-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.form-row input,
.ingredient-edit-form input {
    flex: 1 1 15rem;
}

.ingredient-library {
    margin-top: 2.5rem;
}

.section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.section-heading .eyebrow {
    margin-bottom: 0.4rem;
}

.ingredient-search {
    flex: 0 1 22rem;
}

.ingredient-search label,
.dish-form label,
.ingredient-form label,
.ingredient-edit-form label,
.automatic-selection label {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

input:not([type="checkbox"]),
select {
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid #465044;
    border-radius: 0.65rem;
    background: #121612;
    color: var(--text);
}

input::placeholder {
    color: #80897d;
}

input:focus,
select:focus {
    border-color: var(--accent);
    outline: 3px solid rgb(242 182 83 / 18%);
}

button,
.button-primary,
.button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.7rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    font-weight: 750;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

button:hover,
.button-primary:hover,
.button-secondary:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--accent);
    color: #1c1c15;
}

.button-primary:hover {
    background: var(--accent-strong);
    color: #171810;
}

.button-secondary {
    border-color: #4a5347;
    background: #292f28;
    color: var(--text);
}

.button-secondary:hover {
    border-color: #727e6b;
    background: #333a31;
}

.ingredients-page button,
.configuration-page button {
    min-height: 3rem;
    padding: 0.7rem 1rem;
}

.ingredient-list {
    display: grid;
    gap: 0.65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ingredient-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
    min-height: 4.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: var(--surface);
}

.ingredient-name {
    flex: 1 1 10rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.ingredient-active {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
}

input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #9bc47d;
}

.ingredient-actions {
    justify-content: end;
}

.ingredient-actions button,
.ingredient-edit-form button[type="button"] {
    border-color: #485046;
    background: transparent;
    color: var(--muted);
}

.ingredient-actions button:last-child {
    color: var(--red);
}

.feedback-error,
.competition-error {
    padding: 0.85rem 1rem;
    border: 1px solid #673b35;
    border-radius: 0.7rem;
    background: var(--red-dark);
    color: #ffd0c8;
    font-weight: 650;
}

.feedback-success,
.delivery-feedback {
    padding: 0.85rem 1rem;
    border: 1px solid #35593e;
    border-radius: 0.7rem;
    background: var(--green-dark);
    color: #c6f3d1;
    font-weight: 650;
}

.inline-notice,
.empty-state {
    color: var(--muted);
}

.empty-state {
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    padding: 2.5rem 1rem;
    border: 1px dashed #4b5448;
    border-radius: var(--radius);
    background: rgb(29 34 29 / 55%);
    text-align: center;
}

.empty-state span {
    color: var(--accent);
    font-size: 2rem;
}

.empty-state p {
    margin: 0;
}

.configuration-page .choice-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin: 1.1rem 0;
}

.configuration-page .choice-row button {
    border-color: #465044;
    background: #20251f;
    color: var(--text);
}

.configuration-page .choice-row button.selected {
    border-color: var(--accent);
    background: var(--accent-dark);
    color: var(--accent-strong);
}

.configuration-page button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.ingredient-count {
    display: inline-flex;
    align-items: center;
    padding: 0.85rem 1rem;
    color: var(--muted);
}

.mystery-selection {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.25rem 0;
}

.mystery-selection > div {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: #181d18;
}

.mystery-selection h2,
.mystery-selection h3 {
    margin: 0 0 0.45rem;
}

.mystery-selection p,
.mystery-selection li {
    color: var(--muted);
}

.selection-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.8rem;
    border-bottom: 1px solid rgb(255 255 255 / 6%);
}

.automatic-selection {
    display: grid;
    gap: 0.85rem;
    max-width: 36rem;
    margin: 1.25rem 0;
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.automatic-selection h2,
.automatic-selection p {
    margin: 0;
}

.automatic-selection label {
    display: grid;
    gap: 0.35rem;
}

.mystery-result {
    margin: 1.5rem 0;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: 1px solid #607a4c;
}

.dish-form {
    display: grid;
    gap: 0.7rem;
    max-width: 44rem;
    margin: 1.5rem 0 2rem;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.dish-form h2 {
    margin-bottom: 0.25rem;
}

.dish-form .choice-row {
    margin: 0.5rem 0 0;
}

.dish-schedule {
    margin: 2rem 0 1.5rem;
}

.dish-schedule ol {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0;
    padding: 0;
    list-style: none;
    counter-reset: dishes;
}

.dish-schedule li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: var(--surface);
    counter-increment: dishes;
}

.dish-schedule li::before {
    content: counter(dishes, decimal-leading-zero);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 800;
}

.dish-schedule li span {
    flex: 1 1 9rem;
    color: var(--muted);
}

.dish-schedule li span:first-of-type {
    color: var(--text);
}

.section-heading .planned-duration {
    display: grid;
    gap: 0.15rem;
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

.section-heading .planned-duration strong {
    color: var(--accent-strong);
    font-size: 1.3rem;
}

.setup-summary {
    margin: 1rem 0;
    padding: clamp(1rem, 3vw, 1.5rem);
}

.setup-summary ol {
    display: grid;
    gap: 0.6rem;
    padding-left: 1.25rem;
}

.setup-summary li {
    padding-left: 0.35rem;
    color: var(--muted);
}

.setup-summary li strong,
.setup-summary li span {
    display: block;
}

.setup-summary li strong {
    color: var(--text);
}

.setup-summary li span {
    font-size: 0.92rem;
}

.setup-summary .planned-duration {
    margin: 1.2rem 0 0;
    color: var(--accent-strong);
    font-size: 1.2rem;
}

.start-competition-button {
    width: min(100%, 28rem);
    min-height: 4rem;
    margin: 1.5rem 0;
    border: 0;
    border-radius: 0.8rem;
    background: linear-gradient(110deg, #f2b653, #e99143);
    box-shadow: 0 0.75rem 2rem rgb(231 149 67 / 16%);
    color: #171811;
    font-size: 1.15rem;
    font-weight: 850;
}

.start-competition-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.recovery-prompt {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    max-width: 55rem;
    margin: -2rem 0 2.5rem;
    padding: 1.25rem;
    border: 1px solid #78603a;
    border-radius: var(--radius);
    background: linear-gradient(120deg, #2b261b, #211f19);
}

.recovery-prompt h2 {
    margin: 0.35rem 0;
    font-size: 1.15rem;
}

.recovery-prompt p {
    margin: 0;
    color: var(--muted);
}

.recovery-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    gap: 0.75rem;
    min-height: 3rem;
    padding: 0.7rem 1rem;
    border-radius: 0.65rem;
    background: var(--accent);
    color: #1a1a14;
    font-weight: 800;
    text-decoration: none;
}

.recovery-screen > p:not(.competition-brand, .paused-timer) {
    max-width: 36rem;
    margin-inline: auto;
    line-height: 1.6;
}

.competition-screen {
    min-height: 100svh;
    padding: clamp(1rem, 3vw, 2.5rem);
    background:
        radial-gradient(ellipse at 50% -25%, rgb(106 118 72 / 16%), transparent 56%),
        var(--page);
    color: var(--text);
}

.competition-header {
    width: min(100%, 82rem);
    margin: 0 auto;
    padding: 0.35rem 0 1rem;
    border-bottom: 1px solid var(--line);
}

.competition-brand {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.competition-status {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.7rem;
    border: 1px solid #465044;
    border-radius: 99px;
    background: #1c211c;
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 750;
}

.timer-panel {
    width: min(100%, 74rem);
    margin: clamp(1.25rem, 4vw, 2.5rem) auto 2rem;
    padding: clamp(1rem, 4vw, 2.5rem);
    border: 1px solid #394137;
    border-radius: 1.4rem;
    background: linear-gradient(145deg, rgb(31 36 30 / 98%), rgb(22 26 22 / 98%));
    box-shadow: var(--shadow);
    text-align: center;
}

.main-timer {
    margin: 0.75rem 0;
    color: #fff9e9;
    font-size: clamp(4rem, 15vw, 10rem);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.timer-details {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    color: var(--muted);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
}

.timer-panel progress {
    width: min(100%, 48rem);
    height: 0.7rem;
    margin-top: 1.35rem;
    overflow: hidden;
    border: 0;
    border-radius: 99px;
    accent-color: #a7cf81;
}

.timer-panel progress::-webkit-progress-bar {
    border-radius: 99px;
    background: #343b32;
}

.timer-panel progress::-webkit-progress-value {
    border-radius: 99px;
    background: linear-gradient(90deg, #a6cf80, var(--accent));
}

.overtime-label,
.completed-deadline-label {
    margin: 0;
    color: var(--red);
    font-size: clamp(1rem, 3vw, 1.5rem);
    font-weight: 850;
    letter-spacing: 0.1em;
}

.completed-deadline-label {
    color: var(--accent-strong);
    letter-spacing: 0.04em;
}

.overtime-value {
    margin: 0.35rem 0;
    color: var(--red);
    font-size: clamp(1.8rem, 7vw, 3.5rem);
    font-variant-numeric: tabular-nums;
    font-weight: 800;
}

.active-alerts,
.delivery-feedback,
.competition-error {
    width: min(100%, 74rem);
    margin: 0.8rem auto;
}

.alert-message {
    margin: 0.5rem 0;
    padding: 0.85rem 1rem;
    border: 1px solid #856b38;
    border-left: 0.4rem solid var(--accent);
    border-radius: 0.7rem;
    background: var(--accent-dark);
    color: #ffe4ac;
    font-size: 1.05rem;
    font-weight: 750;
}

.alert-deadline,
.alert-overtime {
    border-color: #69403a;
    border-left-color: #f17264;
    background: var(--red-dark);
    color: #ffd0c8;
}

.competition-content {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(17rem, 0.85fr);
    align-items: start;
    gap: 1.25rem;
    width: min(100%, 82rem);
    margin: 0 auto;
}

.dish-board h1 {
    margin: 0 0 0.85rem;
    font-size: 1.55rem;
}

.dish-card,
.competition-box {
    margin: 0.7rem 0;
    padding: clamp(1rem, 2vw, 1.25rem);
    border: 1px solid var(--line);
    border-radius: 0.95rem;
    background: linear-gradient(135deg, #20251f, #1a1f1a);
}

.dish-card {
    border-left: 0.35rem solid #687166;
}

.dish-pending {
    border-left-color: #7d8978;
}

.dish-delivered {
    border-left-color: #79c58c;
}

.dish-late {
    border-left-color: #ed786d;
}

.dish-card-heading,
.results-dish-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.45rem 1rem;
}

.dish-card h2,
.competition-box h2 {
    margin: 0;
    font-size: 1.2rem;
}

.dish-card p {
    margin: 0.55rem 0 0.9rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.dish-status {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.dish-delivered .dish-status {
    color: var(--green);
}

.dish-late .dish-status {
    color: var(--red);
}

.deliver-button,
.undo-delivery-button,
.pause-button,
.finish-button,
.resume-button {
    min-height: 3.2rem;
    border-radius: 0.7rem;
    font-size: 1rem;
    font-weight: 800;
}

.deliver-button,
.resume-button {
    background: #87ca8e;
    color: #142017;
}

.deliver-button:hover,
.resume-button:hover {
    background: #a0dda5;
}

.undo-delivery-button {
    background: #303830;
    color: var(--text);
}

.delivery-details {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem 1rem;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.competition-box {
    position: sticky;
    top: 1rem;
    border-color: #78633b;
    background: linear-gradient(145deg, #28251c, #1d201a);
}

.competition-box h2 {
    color: var(--accent-strong);
}

.competition-box h3 {
    margin: 1.1rem 0 0.4rem;
    font-size: 0.95rem;
}

.competition-box ul {
    margin: 0;
    padding-left: 1.25rem;
    color: var(--muted);
}

.competition-controls {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.8rem;
    width: min(100%, 82rem);
    margin: 1.25rem auto 0;
}

.pause-button {
    border-color: #82622e;
    background: #3a2d19;
    color: var(--accent-strong);
}

.finish-button {
    border-color: #70403a;
    background: #3c2421;
    color: #ffb9ae;
}

.countdown-screen,
.paused-screen,
.competition-finished,
.competition-message,
.not-found-page {
    display: flex;
    min-height: 100svh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(1.25rem, 5vw, 4rem);
    background:
        radial-gradient(ellipse at 50% 0%, rgb(107 119 72 / 16%), transparent 55%),
        var(--page);
    color: var(--text);
    text-align: center;
}

.countdown-screen h1 {
    margin: 1rem 0;
    color: var(--accent-strong);
    font-size: clamp(5rem, 24vw, 15rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.95;
}

.paused-screen h1,
.competition-finished h1 {
    margin: 0.65rem 0;
    color: var(--accent-strong);
    font-size: clamp(2.2rem, 7vw, 5rem);
    font-weight: 900;
}

.paused-screen p:not(.competition-brand, .paused-timer),
.results-subtitle {
    max-width: 38rem;
    color: var(--muted);
    font-size: 1.05rem;
}

.paused-timer {
    margin: 0.5rem 0;
    color: #fff9e9 !important;
    font-size: clamp(3.5rem, 12vw, 7rem) !important;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    letter-spacing: -0.055em;
}

.resume-button {
    min-height: 4rem;
    margin-top: 1rem;
    padding-inline: 1.5rem;
    font-size: clamp(1.05rem, 3vw, 1.4rem);
}

.competition-message {
    min-height: 75svh;
}

.competition-message h1 {
    font-size: clamp(2rem, 6vw, 3.6rem);
}

.competition-finished {
    display: block;
    min-height: 100svh;
    padding: clamp(1.5rem, 4vw, 3.5rem) clamp(1rem, 4vw, 3rem);
}

.competition-finished > .competition-brand {
    display: block;
    margin: 0 auto 1rem;
}

.results-subtitle {
    margin: 0.35rem auto 1.5rem;
}

.results-metrics,
.results-counts,
.results-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr));
    gap: 0.7rem;
    width: min(100%, 72rem);
    margin: 1rem auto;
}

.results-metrics article,
.results-counts p,
.results-highlights p,
.results-dish-card,
.results-box {
    margin: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 0.8rem;
    background: linear-gradient(145deg, #20251f, #191e19);
    text-align: left;
}

.results-metrics article {
    display: grid;
    gap: 0.45rem;
}

.results-metrics span {
    color: var(--muted);
    font-size: 0.85rem;
}

.results-metrics strong {
    color: var(--text);
    font-size: 1.3rem;
    font-variant-numeric: tabular-nums;
}

.results-summary,
.results-dishes,
.results-box {
    width: min(100%, 72rem);
    margin: 1.65rem auto;
    text-align: left;
}

.results-summary h2,
.results-dishes h2,
.results-box h2 {
    margin: 0 0 0.8rem;
    font-size: 1.35rem;
}

.results-counts strong {
    color: var(--accent-strong);
    font-size: 1.45rem;
}

.results-highlights {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
}

.results-dish-card {
    margin-bottom: 0.7rem;
}

.results-dish-card p {
    margin: 0.35rem 0;
    color: var(--muted);
}

.results-dish-heading h3 {
    margin: 0 0 0.45rem;
    font-size: 1.1rem;
}

.results-box {
    padding: 1rem 1.25rem;
}

.return-home-button {
    min-height: 3.2rem;
    margin: 1.25rem auto 0;
    padding-inline: 1.25rem;
    background: var(--accent);
    color: #1b1c14;
}

.not-found-page {
    min-height: 100svh;
}

.not-found-page h1 {
    max-width: 48rem;
    font-size: clamp(2.2rem, 6vw, 4.5rem);
}

.not-found-page p {
    max-width: 34rem;
    margin-bottom: 1.5rem;
    color: var(--muted);
}

#blazor-error-ui {
    color-scheme: dark;
    border-top: 1px solid #6a4535;
    background: #2e211b;
    color: #ffe4d3;
}

.loading-progress circle {
    stroke: #353c33;
}

.loading-progress circle:last-child {
    stroke: var(--accent);
}

.loading-progress-text {
    color: var(--muted);
}

@media (max-width: 900px) {
    .home-actions {
        grid-template-columns: 1fr;
    }

    .home-action-card {
        min-height: 6.25rem;
    }

    .competition-content {
        grid-template-columns: minmax(0, 1fr);
    }

    .competition-box {
        position: static;
    }
}

@media (max-width: 600px) {
    .home-page,
    .configuration-page,
    .ingredients-page {
        width: min(100% - 1.25rem, 72rem);
        padding-top: 1.25rem;
    }

    .home-page {
        padding-top: 3rem;
    }

    .home-hero {
        margin-bottom: 2rem;
    }

    .section-heading,
    .recovery-prompt {
        align-items: stretch;
        flex-direction: column;
    }

    .section-heading .planned-duration {
        text-align: left;
    }

    .mystery-selection {
        grid-template-columns: minmax(0, 1fr);
    }

    .form-row,
    .form-row input,
    .form-row button {
        width: 100%;
    }

    .ingredient-list li {
        align-items: flex-start;
    }

    .ingredient-actions {
        width: 100%;
    }

    .ingredient-actions button {
        flex: 1;
    }

    .competition-screen {
        padding-inline: 0.8rem;
    }

    .competition-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .timer-panel {
        border-radius: 1rem;
    }

    .deliver-button,
    .undo-delivery-button,
    .pause-button,
    .finish-button {
        width: 100%;
        min-height: 3.25rem;
    }

    .delivery-details {
        align-items: stretch;
        flex-direction: column;
    }

    .results-dish-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
