/* Pedidos propios (sin MenuStar) + formularios. Usa los tokens de styles.css */
.add { all: unset; cursor: pointer; flex: none; display: inline-flex; align-items: center; gap: .3rem; margin-left: .25rem; min-height: 2.5rem; padding: 0 .95rem; border-radius: 999px; background: var(--sun); color: var(--sea); font-weight: 800; font-size: .9375rem; box-shadow: 0 6px 14px -8px rgb(0 0 0 / .45); transition: transform .15s, background-color .15s; }
.add:hover { transform: translateY(-1px); background: #ff8f24; }
.add:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
.add[hidden] { display: none; }
.add.is-added { animation: added .5s cubic-bezier(.2,.8,.2,1); }
@keyframes added { 40% { transform: scale(1.18); background: var(--sea); color: var(--white); } }
@media (max-width: 30rem) { .dish-top { flex-wrap: wrap; } .dish-top .dots { display: none; } .dish-top .price { margin-left: auto; } }
.menu-wrap { padding-bottom: 7rem; }

.cart-fab { all: unset; cursor: pointer; position: fixed; z-index: 60; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%); display: inline-flex; align-items: center; gap: .8rem; min-height: 3.5rem; padding: 0 1.4rem 0 .6rem; border-radius: 999px; background: var(--sea); color: var(--white); font-weight: 700; box-shadow: 0 18px 40px -12px rgb(0 10 40 / .7); white-space: nowrap; }
.cart-fab[hidden] { display: none; }
.cart-fab b { color: var(--sun); font-size: 1.1rem; }
.fab-count { display: grid; place-items: center; min-width: 2.4rem; height: 2.4rem; padding: 0 .5rem; border-radius: 999px; background: var(--sun); color: var(--sea); font-weight: 800; }
.cart-fab:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

dialog.dlg { border: 0; padding: 0; border-radius: 1.25rem; width: min(100% - 1.5rem, 36rem); max-height: min(92svh, 52rem); color: var(--sea); background: var(--white); box-shadow: 0 40px 80px -20px rgb(0 10 40 / .6); overflow: hidden; }
/* sin backdrop-filter: desenfocar toda la pagina en cada repintado hacia lento el carrito (sobre todo en pantallas con escala alta) */
dialog.dlg::backdrop { background: rgb(0 18 56 / .72); }
@media (max-width: 40rem) { dialog.dlg { width: 100%; max-width: none; margin: auto 0 0; border-radius: 1.25rem 1.25rem 0 0; max-height: 92svh; } }
@media (prefers-reduced-motion: no-preference) { dialog.dlg[open] { animation: rise .3s cubic-bezier(.2,.8,.2,1); } }
.dlg-body { display: flex; flex-direction: column; max-height: min(92svh, 52rem); margin: 0; }
.dlg-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; padding: 1.25rem 1.25rem .75rem; border-bottom: 2px solid var(--sun-soft); }
.dlg-head h3 { font-size: 1.35rem; }
.dlg-head p { color: var(--muted); font-size: .95rem; margin-top: .35rem; }
.dlg .x { all: unset; cursor: pointer; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--sun-soft); font-size: 1.6rem; line-height: 1; flex: none; }
.dlg .x:focus-visible { outline: 3px solid var(--aqua); }
.dlg-scroll { overflow-y: auto; overscroll-behavior: contain; contain: content; padding: 1rem 1.25rem; display: grid; gap: 1rem; }
.dlg-foot { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; align-items: center; padding: .9rem 1.25rem 1.1rem; border-top: 2px solid var(--sun-soft); background: var(--sand); }
.dlg-foot .btn { flex: 1 1 auto; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.og { border: 0; margin: 0; padding: 0; min-width: 0; }
.og legend { font-weight: 800; margin-bottom: .5rem; padding: 0; }
.og legend small { font-weight: 600; color: var(--muted); margin-left: .35rem; }
.og.is-missing legend { color: #b3261e; }
.og.is-missing .chip span { border-color: #b3261e; }
.og-opts { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.75rem; padding: 0 .95rem; border-radius: 999px; border: 2px solid var(--line); background: var(--white); font-weight: 600; font-size: .95rem; transition: background-color .12s, border-color .12s; }
.chip span i { font-style: normal; font-weight: 800; color: var(--sun-ink); }
.chip input:checked + span { background: var(--sea); border-color: var(--sea); color: var(--white); }
.chip input:checked + span i { color: var(--sun); }
.chip input:focus-visible + span { outline: 3px solid var(--aqua); outline-offset: 2px; }
.chip input:disabled + span { opacity: .45; cursor: not-allowed; }

.field { display: grid; gap: .35rem; font-weight: 700; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; font-weight: 400; color: var(--sea); min-height: 2.9rem; padding: .55rem .8rem; border-radius: .7rem; border: 2px solid var(--line); background: var(--white); width: 100%; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--sun); box-shadow: 0 0 0 3px rgb(255 125 1 / .25); }
.row2 { display: grid; gap: .75rem; grid-template-columns: 1fr; }
@media (min-width: 30rem) { .row2 { grid-template-columns: 1fr 1fr; } }

.stepper { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 999px; background: var(--white); }
.stepper button { all: unset; cursor: pointer; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; font-size: 1.3rem; font-weight: 800; }
.stepper button:focus-visible { outline: 3px solid var(--aqua); border-radius: 50%; }
.stepper output { min-width: 1.75rem; text-align: center; font-weight: 800; }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.lines li { display: grid; grid-template-columns: 1fr auto auto; gap: .5rem .75rem; align-items: center; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.ln-main small { display: block; color: var(--muted); font-size: .85rem; }
.ln-main .ln-note { color: var(--sun-ink); }
.ln-price { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 4.5rem; text-align: right; }
@media (max-width: 26rem) { .lines li { grid-template-columns: 1fr auto; } .lines .ln-main { grid-column: 1 / -1; } }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; padding: .3rem; background: var(--sun-soft); border-radius: 999px; }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: grid; place-items: center; min-height: 2.75rem; border-radius: 999px; font-weight: 800; }
.seg input:checked + span { background: var(--sea); color: var(--white); }
.seg input:focus-visible + span { outline: 3px solid var(--aqua); }
.sum { margin: 0; display: grid; gap: .35rem; }
.sum div { display: flex; justify-content: space-between; }
.sum dt, .sum dd { margin: 0; }
.sum .tot { font-weight: 800; font-size: 1.15rem; border-top: 2px solid var(--sun-soft); padding-top: .45rem; }
.pay { background: var(--sun-soft); padding: .7rem .9rem; border-radius: .7rem; font-weight: 700; }
.dd-box { background: var(--sun-soft); padding: 1rem 1.1rem; border-radius: .8rem; }
.dd-box h4 { margin: 0 0 .4rem; font-size: 1.15rem; }
.dd-box p { margin: 0; }
.warn { background: #fff3cd; color: #6b4b00; padding: .6rem .8rem; border-radius: .6rem; font-weight: 700; font-size: .95rem; }
.err { background: #fde2e1; color: #8a1c14; padding: .7rem .9rem; border-radius: .6rem; font-weight: 700; }
.ok-msg { background: #d3f5df; color: #0b4d26; padding: .7rem .9rem; border-radius: .6rem; font-weight: 700; }
.empty { color: var(--muted); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.big-no { font-family: var(--font-title); font-size: 2.4rem; color: var(--sun-ink); }
.ticket { white-space: pre-wrap; background: var(--sand); padding: .9rem; border-radius: .7rem; font: 600 .95rem/1.5 var(--font-body); margin: 0; }

/* formulario de comentarios y textos */
.form-card { background: var(--white); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow-1); display: grid; gap: 1rem; max-width: 40rem; }
.prose { max-width: 44rem; }
.prose h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); margin: 2rem 0 .75rem; }
.prose p, .prose li { margin-bottom: .6rem; }

.check { display: flex; gap: .65rem; align-items: flex-start; font-weight: 700; cursor: pointer; padding: .7rem .9rem; border-radius: .7rem; background: var(--sand); border: 2px dashed var(--sun-soft); }
.check input { width: 1.3rem; height: 1.3rem; margin: .1rem 0 0; accent-color: var(--sea); flex: none; }

/* pagina de recompensas */
.rw-steps { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 52rem) { .rw-steps { grid-template-columns: repeat(3, 1fr); } }
.rw-steps > div { background: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-1); }
.rw-steps .n { font-family: var(--font-title); font-size: 2.6rem; line-height: 1; color: var(--sun-ink); }
.rw-steps h3 { margin: .5rem 0; color: var(--sea); }
.lookup { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 62rem) { .lookup { grid-template-columns: .8fr 1.2fr; } }
.balance { background: var(--sea); color: var(--white); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-2); display: grid; gap: .75rem; }
.balance .pts { font-family: var(--font-title); font-size: clamp(3rem, 2rem + 4vw, 4.5rem); line-height: 1; color: var(--sun); }
.bar { height: .9rem; border-radius: 999px; background: rgb(255 255 255 / .18); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--sun); border-radius: inherit; transition: width .6s cubic-bezier(.2,.8,.2,1); }
.hist { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.hist li { display: grid; grid-template-columns: 1fr auto auto; gap: .75rem; align-items: center; padding: .6rem .8rem; background: var(--white); border-radius: .7rem; color: var(--sea); }
.st { font-size: .8125rem; font-weight: 800; padding: .15rem .6rem; border-radius: 999px; background: var(--sun-soft); }
.st--completed { background: #d3f5df; } .st--cancelled { background: #eee; }
