@font-face {
    font-family: "Bricolage";
    src: url("fonts/BricolageGrotesque.ttf") format("truetype");
    font-weight: 200 800;
    font-display: swap;
}

:root {
    color-scheme: light;
    --ink: #271f28;
    --muted: #625662;
    --canvas: #f9ead5;
    --paper: #fff9ef;
    --surface: #fffefa;
    --line: #e8d9c7;
    --cream: #faebd4;
    --coral: #b9352a;
    --coral-dark: #992b22;
    --pink: #f9ded2;
    --teal: #145e5c;
    --mint: #d9f2e7;
    --heading: "Bricolage", ui-rounded, system-ui, sans-serif;
    font-family: system-ui, sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; line-height: 1.5; background: var(--canvas); }
img { display: block; max-width: 100%; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
a { color: var(--teal); }

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

h1, h2, h3, h4, p, dl { margin: 0; }
h1, h2, h3, h4 { font-family: var(--heading); line-height: 1.12; }
h1[tabindex="-1"]:focus { outline: none; }
h2 { font-size: clamp(1.6rem, 5.8vw, 2rem); font-weight: 800; letter-spacing: -.045em; }
h3 { font-size: 1.19rem; font-weight: 780; letter-spacing: -.025em; }
h4 { font-size: 1rem; font-weight: 760; }

.party-shell {
    margin-inline: auto;
    max-width: 35rem;
    min-height: 100dvh;
    padding-block: max(.75rem, env(safe-area-inset-top)) max(1.15rem, env(safe-area-inset-bottom));
    padding-inline: max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-right));
}

.masthead {
    isolation: isolate;
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34%;
    align-items: center;
    min-height: 8.75rem;
    padding: .55rem .75rem .55rem .95rem;
    margin-bottom: .85rem;
}

.masthead-surface {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    border: 1px solid #e9d2b2;
    border-radius: 1.2rem 1.25rem 1.2rem .75rem;
    background:
        radial-gradient(ellipse at 91% 48%, #bfeae4 0 33%, transparent 34%),
        var(--paper);
}

.masthead-surface::before {
    content: "";
    position: absolute;
    width: 8rem;
    height: .85rem;
    border-top: 2px solid #dd9982;
    border-bottom: 2px solid #dd9982;
    transform: rotate(-15deg);
    bottom: -.15rem;
    left: -1rem;
    opacity: .55;
}

.masthead h1 {
    font-size: clamp(1.9rem, 7.9vw, 3.2rem);
    font-weight: 800;
    line-height: .96;
    letter-spacing: -.062em;
}

.masthead h1 span { display: block; color: var(--coral); }
.character-art { width: 100%; }
.character-art img { width: 100%; height: auto; }
.masthead .character-art { transform: rotate(4deg); }

.role-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .25rem;
    padding: .27rem;
    margin-bottom: .85rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
    background: var(--paper);
}

.role-nav-wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.role-nav button {
    min-height: 2.75rem;
    padding: .25rem .14rem;
    border: 1px solid transparent;
    border-radius: .64rem;
    background: transparent;
    color: var(--muted);
    font-size: .83rem;
    font-weight: 740;
    line-height: 1.15;
}

.role-nav button[aria-pressed="true"] {
    border-color: #e9d4ba;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 1px 1px #54372514;
}

.invitation-note {
    margin: 0 0 1.15rem;
    padding: .85rem .95rem .43rem;
    border: 1px solid #cee5d9;
    border-radius: .95rem;
    background: #edf8ef;
}

.invitation-note p { font-size: .93rem; line-height: 1.45; }
.map-link {
    display: inline-flex;
    align-items: center;
    gap: .44rem;
    min-height: 2.75rem;
    font-weight: 760;
    text-underline-offset: .18em;
}

.map-pin {
    position: relative;
    width: .79rem;
    height: .79rem;
    border: 2px solid currentcolor;
    border-radius: 70% 70% 70% 12%;
    transform: rotate(-45deg);
    margin: 0 .13rem .17rem .11rem;
}

.map-pin::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: currentcolor;
}

.choices-section > h2,
.directory > h2,
#cost-heading { margin: 0 .08rem .73rem; }

.panel {
    padding: .95rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: .95rem;
    box-shadow: 0 2px 0 #71452d0b;
}

.information-panel { display: grid; gap: .65rem; }
.information-panel form, .invite-form, .guest-edit { display: grid; gap: .65rem; }
.information-panel form { margin-top: .15rem; }
.information-panel p, .empty-message { color: var(--muted); }
.report-panel h2 { margin-bottom: .2rem; }
.empty-message { padding: .8rem .1rem .15rem; }
.field { display: grid; gap: .32rem; font-size: .88rem; font-weight: 740; }
.field input {
    min-height: 2.9rem;
    min-width: 0;
    width: 100%;
    padding: .55rem .65rem;
    border: 1px solid #a99888;
    border-radius: .62rem;
    color: var(--ink);
    background: #fff;
    font-size: 1rem;
    font-weight: 500;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.82rem;
    padding: .54rem .79rem;
    border: 1px solid transparent;
    border-radius: .68rem;
    font-size: .93rem;
    font-weight: 750;
    line-height: 1.22;
    text-align: center;
    text-decoration: none;
}

.primary { color: #fff; background: var(--coral); box-shadow: 0 2px 0 var(--coral-dark); }
.primary:active:not(:disabled) { background: var(--coral-dark); }
.primary:disabled { color: #5d4d48; background: #ecdfd4; box-shadow: none; }
.secondary { color: var(--ink); background: #fffdf8; border-color: #d7c8b7; }
.secondary:active:not(:disabled) { background: var(--cream); }

.notice {
    padding: .57rem .7rem;
    border-radius: .57rem;
    font-size: .9rem;
    overflow-wrap: anywhere;
}
.notice.success { color: #164f43; background: var(--mint); }
.notice.error { color: #8c271f; background: #fce3db; }
.text-button {
    color: inherit;
    background: transparent;
    border: 0;
    padding: .32rem;
    text-decoration: underline;
    text-underline-offset: .18em;
    font-weight: 720;
}

.meal-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .33rem;
    margin-bottom: .9rem;
}

.step-button {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .24rem;
    border: 1px solid var(--line);
    border-radius: .72rem;
    padding: .42rem .12rem .44rem;
    background: var(--surface);
    color: var(--ink);
    font-size: clamp(.67rem, 2.8vw, .83rem);
    font-weight: 760;
    line-height: 1.24;
}

.step-number {
    display: grid;
    place-items: center;
    width: 1.37rem;
    aspect-ratio: 1;
    color: var(--teal);
    background: var(--mint);
    border-radius: 50%;
    font-size: .77rem;
}

.step-button[aria-current="step"] { background: var(--pink); border-color: #e5a99a; }
.step-button[aria-current="step"] .step-number { color: #fff; background: var(--coral); }
.step-button:disabled { background: #f5eee3; color: var(--muted); }
.step-button:disabled .step-number { color: var(--muted); background: #e7dfd5; }

.step-heading { margin: 0 .08rem .62rem; scroll-margin-top: .85rem; }
.step-heading:focus { outline: none; }
.burger-list, .option-list, .guest-list { display: grid; gap: .65rem; }

.burger-card {
    display: grid;
    width: 100%;
    grid-template-columns: clamp(5.65rem, 28vw, 8.2rem) minmax(0, 1fr) 1.05rem;
    align-items: center;
    gap: .62rem;
    padding: .57rem;
    text-align: left;
    position: relative;
    border: 1px solid var(--line);
    border-radius: .88rem;
    background: var(--surface);
    color: var(--ink);
    box-shadow: 0 2px 0 #71452d0b;
}

.burger-card img {
    width: 100%;
    height: 100%;
    min-height: 5.8rem;
    max-height: 8.75rem;
    object-fit: cover;
    object-position: center;
    border-radius: .58rem;
    background: var(--cream);
}

.burger-copy { display: grid; gap: .23rem; }
.burger-copy strong { font: 800 1.08rem/1.12 var(--heading); letter-spacing: -.025em; }
.burger-copy span { color: var(--muted); font-size: .76rem; line-height: 1.41; }
.burger-card[aria-pressed="true"], .text-option[aria-pressed="true"] {
    border-color: var(--coral);
    box-shadow: 0 0 0 1px var(--coral) inset;
    background: #fff7f0;
}

.selection-indicator {
    display: grid;
    place-items: center;
    width: 1.05rem;
    height: 1.05rem;
    border: 1px solid #9b8e88;
    border-radius: 50%;
}

[aria-pressed="true"] > .selection-indicator {
    border-color: var(--coral);
    color: white;
    background: var(--coral);
}

[aria-pressed="true"] > .selection-indicator::before {
    content: "";
    width: .66rem;
    height: .52rem;
    background: currentColor;
    clip-path: polygon(0 54%, 15% 37%, 38% 65%, 84% 0, 100% 18%, 38% 100%);
}

.text-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
    width: 100%;
    min-height: 3.15rem;
    padding: .65rem .75rem;
    border: 1px solid var(--line);
    border-radius: .7rem;
    text-align: left;
    color: var(--ink);
    background: var(--surface);
    font-weight: 690;
}
.text-option .selection-indicator { flex: 0 0 1.05rem; }

.flavors {
    margin: .5rem .12rem 0;
    padding: 0 .6rem .5rem;
    border: 1px solid #d5c1b2;
    border-radius: .62rem;
    background: #fffaf5;
}
.flavors legend { padding: 0 .27rem; font-weight: 730; font-size: .87rem; }
.flavors label { display: flex; align-items: center; gap: .45rem; min-height: 2.75rem; padding-inline: .18rem; }
.flavors input { accent-color: var(--coral); width: 1rem; height: 1rem; }
.ingredients { background: var(--surface); }

.draft-summary { margin-top: .72rem; }
.draft-summary p { margin-top: .22rem; color: var(--muted); font-size: .87rem; }
.meal-editor > .notice { margin-top: .68rem; }

.wizard-actions {
    position: sticky;
    z-index: 2;
    bottom: 0;
    display: flex;
    gap: .55rem;
    padding: .6rem 0 max(.55rem, env(safe-area-inset-bottom));
    background: var(--canvas);
}
.wizard-actions .primary { flex: 1; }
.wizard-actions .secondary { min-width: 5rem; }

.meal-review { display: grid; gap: .7rem; }
.meal-summary, .cost-breakdown { display: grid; gap: .32rem; margin: 0; }
.meal-summary > div, .cost-breakdown > div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: .55rem;
    border-bottom: 1px solid #ede4d8;
    padding: .25rem 0 .36rem;
    font-size: .83rem;
    line-height: 1.35;
}
.meal-summary dt, .cost-breakdown dt { color: var(--muted); }
.meal-summary dd, .cost-breakdown dd { margin: 0; text-align: right; font-weight: 700; }
.meal-summary-detail { display: block; margin-top: .12rem; color: var(--muted); font-weight: 400; }

.guest-list { margin-top: .7rem; }
.guest-card { display: grid; gap: .63rem; min-width: 0; }
.guest-title { display: flex; justify-content: space-between; align-items: start; gap: .45rem; }
.guest-title h3, .invite-dialog h3 { padding-top: .12rem; overflow-wrap: anywhere; }
.guest-role { color: var(--muted); font-size: .79rem; margin-top: .15rem; }
.danger-link { color: var(--coral-dark); background: transparent; }
.copy-feedback:not(:has(> :not([hidden]))) { display: none; }
.invite-dialog {
    width: min(20rem, calc(100% - 2rem));
    padding: 1.5rem;
    border: 1px solid var(--line);
    border-radius: .9rem;
    color: var(--ink);
    background: var(--paper);
    text-align: center;
}
.invite-dialog h3:focus { outline: none; }
.invite-dialog .button, .invite-dialog .notice { width: 100%; min-height: 2.82rem; margin-top: 1rem; }
.invite-dialog .notice { display: grid; place-items: center; }
.invite-dialog::backdrop { background: #271f2873; }
.status {
    white-space: nowrap;
    font-size: .75rem;
    font-weight: 760;
    padding: .22rem .46rem;
    border-radius: 10rem;
}
.status-pending { color: #704618; background: #f8ebce; }
.status-complete { color: #184e42; background: var(--mint); }
.guest-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.guest-actions .button { font-size: .82rem; padding-inline: .59rem; }
.guest-edit { border-top: 1px solid var(--line); padding-top: .76rem; }
.guest-edit .burger-card { grid-template-columns: 4.25rem minmax(0, 1fr) .95rem; }
.guest-edit .burger-card img { min-height: 4.5rem; }
.guest-edit .burger-card .selection-indicator { width: .95rem; height: .95rem; }

.event-total { display: grid; gap: .17rem; background: var(--mint); border-color: #acd7c8; }
.event-total strong { color: var(--teal); font: 800 1.9rem/1.16 var(--heading); }
.event-total p { color: #24574c; font-size: .89rem; }
.row-total { white-space: nowrap; font-size: .9rem; color: var(--teal); }
.cost-breakdown dd { white-space: nowrap; }
.order-view, .extras-editor { display: grid; gap: .75rem; }
.extra-costs { margin-top: .7rem; }
.extras-selection { display: grid; gap: .5rem; }
.extra-lines { list-style: none; padding: 0; margin: 0; }
.extra-lines li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding-block: .5rem;
    border-top: 1px solid var(--line);
    font-size: .87rem;
}
.extra-lines li > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.extra-lines .button { flex-shrink: 0; }
.extra-description { margin: .15rem 0 .23rem; color: var(--muted); font-size: .78rem; line-height: 1.4; }
.extra-price { display: block; color: var(--muted); }
.extra-quantity { display: flex; align-items: center; gap: .3rem; }
.extra-quantity .button { min-width: 2.75rem; }
.extra-quantity span { min-width: 1.3rem; text-align: center; font-weight: 700; }
.extras-total { display: flex; justify-content: space-between; gap: .5rem; padding-top: .5rem; border-top: 1px solid var(--line); }

.landing {
    display: grid;
    min-height: 100svh;
    place-items: center;
    padding-block: max(.75rem, env(safe-area-inset-top)) max(.75rem, env(safe-area-inset-bottom));
    padding-inline: max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-right));
    background: var(--canvas);
}

.landing-invitation {
    isolation: isolate;
    position: relative;
    display: grid;
    width: min(100%, 29rem);
    padding: 1.45rem .85rem 1.15rem;
    gap: .55rem;
    border: 1px solid #e0c4a5;
    border-radius: 2rem 1.35rem 1.85rem 1.2rem;
    background: var(--paper);
    box-shadow: 0 5px 0 #e6c9a7;
    text-align: center;
}

.landing-heading h1 {
    font-size: clamp(2.32rem, 9.8vw, 3.95rem);
    font-weight: 800;
    line-height: .91;
    letter-spacing: -.065em;
}

.landing-heading h1 span { display: block; color: var(--coral); }
.landing-heading p { margin-top: .7rem; font-size: .97rem; }
.landing-art {
    position: relative;
    display: grid;
    place-items: center;
    isolation: isolate;
    margin: .45rem 0 .65rem;
}
.landing-art::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: min(85%, 16rem);
    height: 72%;
    border-radius: 49% 54% 52% 43%;
    background: #ccece3;
    transform: rotate(-8deg);
}
.landing-art .character-art { width: clamp(10.3rem, 56vw, 15.5rem); transform: rotate(3deg); }
.landing-details {
    display: grid;
    gap: .55rem;
    padding: .75rem .65rem;
    border: 1px dashed #d3b796;
    border-radius: .82rem;
    background: #fffdf5;
}
.landing-details dt { color: var(--teal); font-weight: 800; font-size: .79rem; }
.landing-details dd { margin: .13rem 0 0; font-weight: 760; font-size: .94rem; }
.landing-details dd span { display: block; color: var(--muted); font-weight: 540; }
.landing-map { justify-self: center; }

@media (max-width: 350px) {
    .party-shell { padding-inline: max(.55rem, env(safe-area-inset-left)) max(.55rem, env(safe-area-inset-right)); }
    .masthead { padding-inline: .7rem .45rem; min-height: 7.75rem; }
    .masthead h1 { font-size: 1.86rem; }
    .burger-card { gap: .45rem; }
    .panel { padding-inline: .75rem; }
}
