:root {
    --ink: #1a1612;
    --ink-soft: #3a322b;
    --paper: #f3eee6;
    --card: #fffcf7;
    --accent: #c45c26;
    --accent-dark: #9a4318;
    --gold: #b8956a;
    --line: #e4d8c8;
    --ok: #2d6a4f;
    --ok-bg: #e8f3ec;
    --err: #9b2335;
    --err-bg: #f8e8ea;
    --mute: #6e6458;
    --focus: #c45c26;
    --radius: 16px;
    --shadow: 0 10px 30px rgba(26, 22, 18, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.res-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--paper);
    color: var(--ink);
    line-height: 1.5;
    padding-bottom: 96px;
}
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
.res-wrap {
    width: min(560px, 100%);
    margin: 0 auto;
    padding: 0 16px 28px;
}
@media (min-width: 880px) {
    .res-wrap { width: min(920px, 100%); }
}

.res-top {
    background: var(--ink);
    color: #f7f1e8;
    padding: 20px 0 18px;
    border-bottom: 3px solid var(--accent);
}
.res-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.res-logo {
    width: 56px;
    height: 56px;
    flex: 0 0 56px;
    object-fit: contain;
    border-radius: 12px;
    background: #2a241e;
    border: 1px solid #4a3f34;
    padding: 4px;
}
.res-brand-copy {
    min-width: 0;
    flex: 1;
}
.res-kicker {
    margin: 0;
    font-size: 12px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--gold);
    font-weight: 700;
}
.res-top h1 {
    margin: 4px 0 0;
    font-family: Georgia, "Iowan Old Style", Palatino, serif;
    font-size: clamp(1.45rem, 4vw, 2.05rem);
    font-weight: 600;
    line-height: 1.2;
}
.res-addr {
    margin: 8px 0 0;
    color: #d7cfc4;
    font-size: 14px;
}
@media (max-width: 480px) {
    .res-logo {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }
}
.res-fianza {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    margin-top: 14px;
    background: #2a241e;
    border: 1px solid #4a3f34;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 14px;
}
.res-fianza strong {
    color: #f3d7b0;
    font-size: 1.05rem;
}

.res-back {
    display: inline-block;
    margin: 16px 0 8px;
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
    min-height: 44px;
    line-height: 44px;
}
.res-back:hover { color: var(--accent); }

.res-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 8px 0 18px;
}
.res-step-tab {
    appearance: none;
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--line);
    color: var(--mute);
    padding: 10px 4px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
    min-height: 44px;
}
.res-step-tab b {
    display: block;
    font-family: Georgia, serif;
    font-size: 1.05rem;
    color: var(--ink);
    font-weight: 600;
}
.res-step-tab.is-on {
    border-bottom-color: var(--accent);
    color: var(--accent);
}
.res-step-tab.is-on b { color: var(--accent); }
.res-step-tab:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

.res-card {
    background: var(--card);
    border: 1px solid #eadfcf;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px 20px;
    margin: 0 0 16px;
}
.res-card h2 {
    margin: 0 0 6px;
    font-family: Georgia, serif;
    font-size: 1.35rem;
    font-weight: 600;
}
.res-lead { margin: 0 0 16px; color: var(--mute); font-size: 15px; }

.res-grid {
    display: grid;
    gap: 14px;
}
@media (min-width: 880px) {
    .res-grid-2 { grid-template-columns: 1fr 1fr; }
    .res-span-2 { grid-column: 1 / -1; }
}

.res-lab {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-soft);
    margin: 0;
}
.res-lab > span { display: block; margin-bottom: 6px; }
.res-hint { font-weight: 500; color: var(--mute); font-size: 12px; }

input, select, textarea {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1.5px solid #d7cbb8;
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--focus);
    outline-offset: 1px;
    border-color: var(--accent);
}
input.is-ok { border-color: var(--ok); background: #f4faf6; }
input.is-ko { border-color: var(--err); background: var(--err-bg); }
.res-field-msg { min-height: 1.2em; margin: 6px 0 0; font-size: 13px; }
.res-field-msg.ok { color: var(--ok); }
.res-field-msg.ko { color: var(--err); }

.res-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}
.btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    flex: 1;
}
.btn:hover { background: var(--accent-dark); }
.btn:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.btn[disabled] { opacity: .65; cursor: wait; }
.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1.5px solid #d7cbb8;
    flex: 0 1 auto;
}
.btn-ghost:hover { background: #efe7db; color: var(--ink); }

.res-legal {
    font-size: 14px;
    color: var(--ink-soft);
    background: #f7f1e7;
    border-radius: 12px;
    padding: 14px 16px;
}
.res-legal ul { margin: 8px 0 0; padding-left: 18px; }
.res-legal li { margin: 0 0 6px; }
.check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin: 14px 0;
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
}
.check input {
    width: 22px;
    height: 22px;
    min-height: 22px;
    margin-top: 2px;
    flex: 0 0 22px;
    accent-color: var(--accent);
}

.res-err { color: var(--err); font-weight: 700; min-height: 1.3em; }
.res-cerrado {
    margin: 0 0 16px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #3a1c1c;
    border: 1px solid #7a3030;
    color: #f5d0d0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.res-cerrado[hidden] { display: none !important; }
.res-when-open[hidden] { display: none !important; }
.res-nav[hidden] { display: none !important; }
.res-cerrado strong {
    font-size: 1.15rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
}
.res-slots {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 44px;
}
.res-slot {
    min-height: 44px;
    min-width: 72px;
    padding: 8px 12px;
    border-radius: 10px;
    border: 1px solid #d7cfc4;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
}
.res-slot.is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1612;
}
.res-slot.is-off {
    background: #3a1c1c;
    border-color: #7a3030;
    color: #f5d0d0;
    cursor: not-allowed;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1.1;
    opacity: 1;
}
.res-slot.is-off small { font-size: 10px; font-weight: 800; text-transform: uppercase; }
.res-franjas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.res-franja {
    min-height: 52px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #d7cfc4;
    background: #fff;
    color: var(--ink);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-align: left;
}
.res-franja strong { font-size: 14px; }
.res-franja span { font-size: 12px; color: var(--ink-soft); }
.res-franja.is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1612;
}
.res-franja.is-on span { color: #3a3228; }
.res-slot-hint { width: 100%; color: var(--ink-soft); font-size: 13px; }
.res-ok { color: var(--ok); font-weight: 700; }

.res-state {
    text-align: center;
    padding: 28px 18px 22px;
}
.res-state .mark {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 28px;
}
.res-state.is-ok .mark { background: var(--ok-bg); color: var(--ok); }
.res-state.is-ko .mark { background: var(--err-bg); color: var(--err); }
.res-state.is-wait .mark { background: #efe7db; color: var(--accent); }
.res-meta {
    margin: 16px 0 0;
    text-align: left;
    background: #f7f1e7;
    border-radius: 12px;
    padding: 14px 16px;
}
.res-meta p { margin: 0 0 8px; }
.res-meta p:last-child { margin: 0; }

.res-foot {
    margin: 8px 0 24px;
    color: var(--mute);
    font-size: 13px;
}
.res-foot nav { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 8px; }

.panel { display: none; }
.panel.is-on { display: block; }

body.res-body #cookie-icono-flotante {
    bottom: 18px;
    left: 16px;
    width: 48px;
    height: 48px;
    z-index: 40;
}
body.res-body #cookie-banner-mesa {
    left: 16px !important;
    right: auto !important;
    bottom: 76px !important;
    width: min(340px, calc(100% - 32px)) !important;
    border-radius: 14px !important;
    padding: 14px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.25) !important;
}
body.res-body .btn, body.res-body .res-nav { position: relative; z-index: 1; }
