@import url("/fonts.css");
:root {
    font-family: Inter, "Segoe UI", system-ui, sans-serif;
    color: #26382f;
    background: #faf8f3;
    --paper: #fffefa;
    --ink: #26382f;
    --muted: #6d786e;
    --line: #e3e6dc;
    --accent: #ed633e;
    --green: #dfeccf;
    --shadow: 0 10px 40px #23342708;
    color-scheme: light;
}
[hidden] {
    display: none !important;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
}
body.dark {
    --paper: #26342c;
    --ink: #f1f1e7;
    --muted: #b4bfb1;
    --line: #405044;
    --green: #3c5138;
    background: #1b261f;
    color: var(--ink);
    color-scheme: dark;
}
header {
    height: 100px;
    max-width: 1280px;
    margin: auto;
    padding: 24px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}
a {
    color: inherit;
}
.brand {
    font-size: 37px;
    font-weight: 850;
    letter-spacing: -2px;
    text-decoration: none;
}
.brand span {
    color: var(--accent);
}
.header-tools {
    display: flex;
    gap: 12px;
    align-items: center;
}
main {
    max-width: 1120px;
    padding: 42px 32px;
    margin: auto;
    min-height: 65vh;
}
h1 {
    font-size: clamp(36px, 5vw, 64px);
    letter-spacing: -2.5px;
    line-height: 1.07;
    margin: 18px 0 24px;
    font-weight: 750;
}
h2 {
    font-size: 26px;
    letter-spacing: -0.8px;
}
h3 {
    margin-top: 0;
    font-size: 19px;
}
p {
    line-height: 1.7;
    color: var(--muted);
}
.eyebrow {
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 2px;
    color: var(--muted);
}
.hero {
    max-width: 760px;
    padding: 50px 0;
}
.hero p {
    font-size: 19px;
    max-width: 510px;
}
.button,
button {
    font: inherit;
    font-size: 14px;
    cursor: pointer;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    padding: 14px 20px;
    text-decoration: none;
    display: inline-block;
    font-weight: 650;
}
button:hover,
.button:hover {
    filter: brightness(0.92);
}
button:disabled {
    opacity: 0.45;
    cursor: wait;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}
.quiet {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--line);
}
.accent {
    background: var(--accent);
    color: white;
}
.small {
    padding: 9px 12px;
    font-size: 12px;
}
.row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}
.wrap {
    flex-wrap: wrap;
}
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin: 18px 0;
}
.grid .card {
    margin: 0;
}
.badge {
    font-size: 11px;
    display: inline-block;
    padding: 7px 11px;
    border-radius: 30px;
    background: var(--green);
    font-weight: 700;
    letter-spacing: 0.5px;
}
.price {
    font-weight: 750;
    white-space: nowrap;
}
.muted,
small {
    color: var(--muted);
}
.menu-item {
    position: relative;
    overflow: hidden;
    min-height: 230px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.menu-item:before {
    content: "";
    display: block;
    height: 6px;
    background: var(--green);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}
.menu-item p {
    font-size: 14px;
}
.allergens {
    font-size: 11px;
    line-height: 1.6;
}
.quantity {
    display: flex;
    gap: 10px;
    align-items: center;
}
.quantity button {
    padding: 8px 14px;
}
.summary {
    position: sticky;
    bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--ink);
    color: var(--paper);
    padding: 18px 24px;
    border-radius: 18px;
    box-shadow: 0 8px 40px #0002;
}
.summary button {
    background: var(--accent);
    color: white;
}
.step {
    display: flex;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}
.step b {
    display: flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--line);
}
.step.active b {
    background: var(--accent);
    color: #fff;
}
.ready {
    background: var(--green);
    padding: 32px;
    border-radius: 22px;
    animation: arrive 1s ease-out;
}
.ready h2 {
    font-size: 36px;
}
input,
select,
textarea {
    font: inherit;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    padding: 12px;
    max-width: 100%;
}
label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    margin: 18px 0 7px;
}
input:not([type="checkbox"]),
textarea {
    width: 100%;
}
textarea {
    resize: vertical;
    min-height: 60px;
}
form {
    max-width: 480px;
}
.nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 24px 0;
}
.nav button.active {
    background: var(--accent);
    color: white;
}
.order-number {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -1px;
}
.list-line {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}
dialog {
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    background: var(--paper);
    color: var(--ink);
    max-width: 95vw;
    width: 430px;
}
dialog::backdrop {
    background: #17241cb3;
}
dialog img {
    display: block;
    width: 260px;
    height: 260px;
    max-width: 100%;
    margin: 20px auto;
}
dialog a {
    word-break: break-all;
    font-size: 12px;
}
.connection {
    font-size: 12px;
    color: var(--muted);
}
#toast {
    position: fixed;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ink);
    color: var(--paper);
    border-radius: 14px;
    padding: 16px 22px;
    z-index: 20;
    max-width: 90vw;
}
#toast:empty {
    display: none;
}
footer {
    max-width: 1120px;
    margin: 30px auto;
    padding: 30px 32px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    line-height: 2;
    color: var(--muted);
}
.empty {
    padding: 35px;
    text-align: center;
}
.section-top {
    margin-bottom: 30px;
}
.error {
    color: #cb4429;
}
.kds .card {
    border-top: 5px solid var(--accent);
}
@keyframes arrive {
    from {
        transform: scale(0.97);
    }
    to {
        transform: scale(1);
    }
}
@media (max-width: 600px) {
    header {
        height: 80px;
        padding: 18px 22px;
    }
    main {
        padding: 30px 20px;
    }
    h1 {
        letter-spacing: -1.8px;
    }
    .hero {
        padding: 25px 0;
    }
    .row.wrap {
        align-items: flex-start;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    .card {
        padding: 21px;
    }
    .summary {
        padding: 15px;
    }
    .header-tools {
        gap: 6px;
    }
    .brand {
        font-size: 32px;
    }
}
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
    }
}
@media print {
    header,
    footer,
    .nav,
    button {
        display: none;
    }
    dialog {
        position: static;
        display: block;
        border: 0;
    }
    dialog img {
        width: 70mm;
        height: 70mm;
    }
}

.editor form {
    max-width: none;
}
.editor-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px;
    margin: 14px 0;
}
.editor-row > label {
    flex: 1 1 170px;
    margin: 0;
}
.editor-row > label input,
.editor-row > label select {
    display: block;
    width: 100%;
    margin-top: 7px;
}
.nested {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
}
.option-row {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 500;
}
.option-row input[type="checkbox"] {
    flex: none;
    width: 20px;
    height: 20px;
    accent-color: var(--accent);
}
fieldset {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    margin: 14px 0;
}
legend {
    font-size: 13px;
    color: var(--muted);
}
.product-photo {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 15px;
}

/* Staff cards must shrink around long email addresses and routing labels on phones. */
[data-member] {
    min-width: 0;
}
[data-member] h3 {
    overflow-wrap: anywhere;
}
[data-member] form {
    max-width: 100%;
    min-width: 0;
}
[data-member] fieldset {
    min-width: 0;
    max-height: 320px;
    overflow-y: auto;
}
[data-member] .option-row {
    overflow-wrap: anywhere;
}

[data-payment] {
    min-width: 0;
    overflow-wrap: anywhere;
}
[data-payment] form {
    min-width: 0;
    max-width: 100%;
}

/* Static fallback and reduced motion keep the warning accessible. */
.connection-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}
.warning-flash {
    color: #dc8d13;
    flex: 0 0 26px;
    animation: warning-pulse 2s ease-in-out infinite;
}
@keyframes warning-pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}
@media (prefers-reduced-motion: reduce) {
    .warning-flash {
        animation: none;
    }
}
.waiting-game summary {
    cursor: pointer;
    font-weight: 700;
}
.pizza-arena {
    position: relative;
    height: 230px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--accent, #ed633e) 10%, transparent);
    overflow: hidden;
}
.pizza-target {
    position: absolute;
    left: 40%;
    top: 35%;
    width: 64px;
    height: 64px;
    padding: 0;
    font-size: 38px;
    line-height: 1;
    background: transparent;
    border: 2px solid transparent;
    border-radius: 50%;
    touch-action: manipulation;
}
.pizza-target:focus-visible {
    outline: 3px solid var(--accent, #ed633e);
    outline-offset: 2px;
}
.pizza-target:disabled {
    opacity: 0.35;
}

.pizza-target.spoiled {
    background: #71842c33;
    border: 2px dashed #677522;
    filter: saturate(0.6);
}
.pizza-mold {
    position: absolute;
    right: -3px;
    bottom: -3px;
    font-size: 25px;
    line-height: 1;
}
[data-game-skip] {
    margin-top: 1rem;
}
[data-game-prize] {
    font-weight: 600;
}
