/* Layout: plano del local a la izquierda (protagonista), panel de reserva a la derecha; en móvil se apilan. */
/* Letras guardadas en la propia web (fonts/), así ningún servicio externo ve a los visitantes. Licencia SIL OFL 1.1. */
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/bricolage-grotesque.woff2) format("woff2-variations"), url(fonts/bricolage-grotesque.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-sans-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-sans-500.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/ibm-plex-sans-600.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400.woff2) format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-500.woff2) format("woff2"); }
:root {
  --bg: #f3f1ec;
  --paper: #fbfaf7;
  --ink: #1e2a2f;
  --muted: #5d6b70;
  --line: #cfd3cf;
  --grid: #e4e6e1;
  --accent: #1f6f78;      /* verde petróleo: mesa libre / acción */
  --accent-ink: #ffffff;
  --busy: #b5483a;        /* reservada */
  --pending: #b7801c;     /* esperando confirmación por email */
  --wood: #8a5a32;        /* barra */
  --wood-soft: #d8b48d;
  --tv: #2c3a8c;
  --tv-cone: rgba(44,58,140,.07);
  --music: #8b3f8f;
  --music-zone: rgba(139,63,143,.08);
  --dim: .28;
  --f-display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121a1d; --paper: #182226; --ink: #e6ece9; --muted: #98a8ac; --line: #33444a; --grid: #1f2c31;
    --accent: #4fb3bd; --accent-ink: #0d1517; --busy: #e07a6a; --pending: #e0b050; --wood: #c48b56; --wood-soft: #5a3e27;
    --tv: #9aa8ff; --tv-cone: rgba(154,168,255,.10); --music: #d58ad9; --music-zone: rgba(213,138,217,.10); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121a1d; --paper: #182226; --ink: #e6ece9; --muted: #98a8ac; --line: #33444a; --grid: #1f2c31;
  --accent: #4fb3bd; --accent-ink: #0d1517; --busy: #e07a6a; --pending: #e0b050; --wood: #c48b56; --wood-soft: #5a3e27;
  --tv: #9aa8ff; --tv-cone: rgba(154,168,255,.10); --music: #d58ad9; --music-zone: rgba(213,138,217,.10); color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.45; }
.wrap { max-width: 1280px; margin: 0 auto; padding-inline: 16px; padding-block: 18px 40px; display: grid; gap: 16px; }
header.top { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
header.top:has(#acctBtn) { flex-wrap: nowrap; align-items: flex-start; }
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand .logo { width: 104px; height: 104px; flex: none; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
@media (max-width: 600px) { .brand .logo { width: 76px; height: 76px; } }
h1 { font-family: var(--f-display); font-weight: 800; font-size: clamp(26px, 4vw, 36px); line-height: 1; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.sub { color: var(--muted); margin: 6px 0 0; }
label.eyebrow, .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.venue { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; justify-content: flex-end; margin-left: auto; }
#acctBtn { max-width: 44vw; line-height: 1.25; text-align: center; }
@media (max-width: 600px) { #acctBtn { min-width: 7.5em; max-width: 9.5em; font-size: 14px; padding: 6px 10px; } }
.field { display: grid; gap: 4px; min-width: 0; }
select, input { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; min-width: 0; }
button { font: inherit; cursor: pointer; border-radius: 6px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); padding: 8px 12px; }
button:hover { border-color: var(--accent); }
button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
button.danger { color: var(--busy); border-color: var(--busy); background: transparent; }
button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; padding: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.toolbar .spacer { flex: 1 1 auto; }
.main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .main { grid-template-columns: minmax(0, 1fr); } }

.plan { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 10px; min-width: 0; position: relative; }
.zoomctl { position: absolute; right: 18px; bottom: 18px; display: flex; gap: 6px; }
.zoomctl button { min-width: 40px; height: 40px; padding: 0 10px; font-size: 18px; font-weight: 600; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.zoomctl button#zoomFit { font-size: 13px; }
.zoomctl button:disabled { opacity: .45; }
svg#map.zoomed { cursor: grab; }
.plan-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
svg#map { width: 100%; height: auto; display: block; touch-action: pan-x pan-y; user-select: none; }   /* un dedo: la página; dos dedos: zoom (app.js) */
svg#map.editing { touch-action: none; }
.scale { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }

/* SVG elements styled via tokens */
.wall { fill: none; stroke: var(--ink); stroke-width: 6; }
.wall { stroke-linejoin: round; stroke-linecap: round; }
.wall.inner { stroke-width: 5; }
.wallhit { fill: none; stroke: transparent; stroke-width: 22; cursor: pointer; }
.editing .wall.sel-wall { stroke: var(--accent); stroke-dasharray: 10 6; }
.handle { stroke: var(--paper); stroke-width: 3; cursor: grab; touch-action: none; }
.handle.corner { fill: var(--accent); }
.handle.mid { fill: var(--muted); opacity: .85; }
.handle.on { fill: var(--ink); }
.markbody { fill: var(--paper); stroke: var(--ink); stroke-width: 2; }
.markicon { fill: var(--ink); font: 800 14px var(--f-display); letter-spacing: .04em; pointer-events: none; }
.marklabel { fill: var(--muted); font: 600 11px var(--f-body); pointer-events: none; }
.mark-el { cursor: default; }
.editing .mark-el { cursor: grab; }
.editing .mark-el.sel-el .markbody { stroke-width: 4; stroke-dasharray: 6 4; }
.gridline { stroke: var(--grid); stroke-width: 1; }
.door { stroke: var(--paper); stroke-width: 8; }
.doorlabel, .zonelabel { fill: var(--muted); font: 600 13px var(--f-body); letter-spacing: .08em; text-transform: uppercase; }
.barbody { fill: var(--wood-soft); stroke: var(--wood); stroke-width: 3; }
.barlabel { fill: var(--wood); font: 800 18px var(--f-display); letter-spacing: .2em; }
.stool { fill: var(--paper); stroke: var(--wood); stroke-width: 2; }
.tvbody { fill: var(--tv); }
.tvlabel { fill: var(--tv); font: 500 12px var(--f-mono); }
.tvcone { fill: var(--tv-cone); stroke: none; pointer-events: none; }
.musiczone { fill: var(--music-zone); stroke: var(--music); stroke-width: 1.5; stroke-dasharray: 5 6; stroke-opacity: .5; pointer-events: none; }
.spbody { fill: var(--music); }
.spcone { fill: var(--paper); }
.table .musicmark { fill: var(--music); }
.speaker { cursor: pointer; }
.editing .speaker { cursor: grab; }
.editing .sel-el .spbody { stroke: var(--ink); stroke-width: 3; stroke-dasharray: 5 3; }
.table .top { stroke-width: 2.5; }
.table .chair { fill: var(--paper); stroke: var(--line); stroke-width: 2; }
.table.free .top { fill: color-mix(in srgb, var(--accent) 18%, var(--paper)); stroke: var(--accent); }
.table.busy .top { fill: color-mix(in srgb, var(--busy) 20%, var(--paper)); stroke: var(--busy); }
.table.small { opacity: var(--dim); }
.table.sel .top { stroke-width: 5; }
.table .num { font: 700 16px var(--f-display); fill: var(--ink); pointer-events: none; }
.table .seats { font: 500 11px var(--f-mono); fill: var(--muted); pointer-events: none; }
.table .tvmark { fill: var(--tv); }
.table.pending .top { fill: color-mix(in srgb, var(--pending) 22%, var(--paper)); stroke: var(--pending); }
.place .seat { stroke-width: 2.5; }
.place.free .seat { fill: color-mix(in srgb, var(--accent) 18%, var(--paper)); stroke: var(--accent); }
.place.busy .seat { fill: color-mix(in srgb, var(--busy) 25%, var(--paper)); stroke: var(--busy); }
.place.pending .seat { fill: color-mix(in srgb, var(--pending) 25%, var(--paper)); stroke: var(--pending); }
.place.small { opacity: var(--dim); }
.place.sel .seat { stroke-width: 5; }
.place .snum { font: 600 9px var(--f-mono); fill: var(--ink); pointer-events: none; }
.place { cursor: pointer; }
.editing .place { cursor: default; }
.table, .tv { cursor: pointer; }
.editing .table, .editing .tv { cursor: grab; }
.editing .sel-el .top, .editing .sel-el .tvbody { stroke: var(--ink); stroke-width: 4; stroke-dasharray: 6 4; }

.side { display: grid; gap: 16px; min-width: 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.card h2 { font-family: var(--f-display); font-weight: 600; font-size: 20px; margin: 0; }
.card p { margin: 0; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.pill.free { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.pill.busy { background: color-mix(in srgb, var(--busy) 18%, transparent); color: var(--busy); }
.pill.pending { background: color-mix(in srgb, var(--pending) 20%, transparent); color: var(--pending); }
.steps { display: flex; gap: 6px; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; font-size: 12px; color: var(--muted); }
.steps li { padding: 3px 8px; border-radius: 99px; border: 1px solid var(--line); }
.steps li.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.steps li.done { color: var(--ink); }
.mail { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; font-size: 14px; }
.mail-head { background: var(--bg); padding: 10px 12px; display: grid; gap: 2px; font-size: 13px; }
.mail-head b { font-weight: 600; }
.mail-body { padding: 12px; display: grid; gap: 10px; }
.mail-body p { color: var(--ink); }
.code { font-family: var(--f-mono); font-size: 18px; letter-spacing: .12em; }
.pill.tv { background: color-mix(in srgb, var(--tv) 15%, transparent); color: var(--tv); }
.pill.music { background: color-mix(in srgb, var(--music) 15%, transparent); color: var(--music); }
form.res { display: grid; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.list li { display: grid; grid-template-columns: 52px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.list li .t { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.list li button { padding: 4px 8px; font-size: 13px; }
.empty { color: var(--muted); font-size: 14px; }
.note { font-size: 12px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 8px; font-weight: 500; }
@media (prefers-reduced-motion: no-preference) { .table .top { transition: fill .2s, stroke .2s; } }
.tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; }
.tabs a { text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 5px; font-weight: 600; font-size: 14px; }
.tabs a[aria-current="page"] { background: var(--ink); color: var(--bg); }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; display: grid; min-width: 110px; }
.stat b { font-family: var(--f-display); font-size: 22px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.tablewrap { overflow-x: auto; }
table.book { width: 100%; border-collapse: collapse; font-size: 14px; }
table.book th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.book td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.book td.t { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
table.book tr.on td { background: color-mix(in srgb, var(--accent) 8%, transparent); }
table.book button { padding: 4px 8px; font-size: 13px; }
.pill.arrived { background: color-mix(in srgb, var(--ink) 12%, transparent); color: var(--ink); }
.modebar { font-size: 12px; color: var(--muted); }
.tabs .who { align-self: center; padding: 0 8px; font-size: 13px; color: var(--muted); }
.editor h3 { font-family: var(--f-display); font-weight: 600; font-size: 16px; margin: 0; }
.editor section { display: grid; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.editor section:first-of-type { border-top: 0; padding-top: 0; }
.editor .row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.editor input, .editor select { width: 100%; }
.saved { font-size: 12px; color: var(--muted); }
.door-el { cursor: pointer; }
.door-el rect { fill: var(--paper); stroke: var(--muted); stroke-width: 2; stroke-dasharray: 4 3; }
.label-el text { cursor: pointer; }
.editing .bar-el, .editing .door-el, .editing .label-el text { cursor: grab; }
.editing .sel-el .barbody, .editing .door-el.sel-el rect { stroke: var(--ink); stroke-width: 4; stroke-dasharray: 6 4; }
.editing .label-el.sel-el text { text-decoration: underline; fill: var(--ink); }
#usersCard { margin-top: 16px; }
#usersCard h3 { font-family: var(--f-display); font-weight: 600; font-size: 16px; margin: 20px 0 8px; }
#usersCard select, #usersCard td button { font-size: 13px; }
#usersCard form.inline { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
#usersCard form.inline .actions { margin: 0; }
#invCard, #eventsCard { margin-top: 16px; }
#eventsCard h3 { font-family: var(--f-display); font-weight: 600; font-size: 16px; margin: 20px 0 8px; }
#eventsCard .chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
#eventsCard form { max-width: 520px; }
#invCard h3 { font-family: var(--f-display); font-weight: 600; font-size: 16px; margin: 20px 0 8px; }
#invCard td input[type=number] { width: 110px; }
#invCard tr.off td:nth-child(-n+2) { color: var(--muted, #8a9599); text-decoration: line-through; }
#invCard .chk { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
@media (max-width: 600px) { .zoomctl { right: 12px; bottom: 12px; gap: 4px; } .zoomctl button { min-width: 32px; height: 32px; font-size: 15px; padding: 0 8px; } }
.bookhead { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.dimlabel { font: 600 12px var(--mono, ui-monospace, monospace); fill: var(--accent); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; pointer-events: none; }
.edhead { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.edhead .actions { margin: 0; }
label.check { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 6px 0 10px; cursor: pointer; }
label.check input { width: auto; flex: none; margin: 0; }
svg.editing [data-kind="stool"] { cursor: grab; touch-action: none; }
.captcha { margin-top: 12px; display: flex; justify-content: center; }
.captcha:empty { display: none; }

/* Busca tu reserva (clientes sin cuenta) */
.findres { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.findres[hidden] { display: none; }
.findres summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.findres form { display: grid; gap: 8px; margin-top: 10px; }
.findres #findCode { text-transform: uppercase; letter-spacing: .15em; }

/* Cuenta del cliente */
.past { margin-top: 10px; }
.past summary, .acct summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.acct { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 10px; }
.acct:empty { display: none; }
.acct form { display: grid; gap: 8px; }
.acct [hidden] { display: none; }
.acct .actions { display: flex; flex-wrap: wrap; gap: 8px; }
button.linklike { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font: inherit; cursor: pointer; min-height: 0; }
.changing { background: color-mix(in srgb, var(--pending) 18%, transparent); border-radius: 8px; padding: 8px 10px; }
.pill.acct-pill { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--ink); }
a.button { display: inline-block; text-decoration: none; border-radius: 6px; padding: 8px 12px; border: 1px solid var(--line); color: var(--ink); }
.acct-offer .actions { margin-top: 12px; }
a.button.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.acct-offer { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }

/* Ventana flotante de la cuenta del cliente */
.dlg { padding: 0; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); color: var(--ink); width: min(420px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); box-shadow: 0 12px 40px rgba(0,0,0,.28); }
.dlg::backdrop { background: rgba(0,0,0,.45); }
.dlg-in { padding: 16px; display: grid; gap: 10px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dlg-head h2 { margin: 0; font-size: 20px; }
.dlg-x { border: 0; background: none; font-size: 26px; line-height: 1; padding: 4px 8px; color: var(--muted); }
.dlg .acct { margin-top: 0; border-top: 0; padding-top: 0; }

/* Panel: reservas que hay que pasar a otro lugar porque cambió el plano */
.alert { border: 1px solid color-mix(in srgb, var(--busy) 55%, var(--line)); background: color-mix(in srgb, var(--busy) 10%, var(--paper)); border-radius: 8px; padding: 12px 14px; display: grid; gap: 8px; }
.alert p { margin: 0; }
.alert ul, .dlg ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.alert li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.dlg .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.dlg p { margin: 0; }
.dlg .acct h3 { margin: 4px 0 0; font-size: 15px; }
.dlg .acct form + form { border-top: 1px solid var(--line); padding-top: 12px; }
.dlg .acct-out { border-top: 1px solid var(--line); padding-top: 12px; }
.dlg input[readonly] { color: var(--muted); }
/* Panel: historial de reservas */
.histform { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0; }
.histform #hQ { min-width: 240px; }
.pill.gone { background: color-mix(in srgb, var(--muted) 18%, transparent); color: var(--muted); }
tr.gone td { color: var(--muted); }

/* Indicador "procesando": vaso de cerveza que se llena */
.cargando { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(2px); }
.cargando[hidden] { display: none; }
.cargando-in { display: grid; justify-items: center; gap: 10px; padding: 20px 26px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 10px 34px rgba(0,0,0,.22); max-width: calc(100vw - 32px); }
.cargando-in p { margin: 0; font-weight: 600; text-align: center; }
.vaso { width: 64px; height: 84px; overflow: visible; }
.vaso-borde { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.cerveza { fill: #e9a23b; }
.espuma { fill: #fff6e0; }
.burbuja { fill: #fff6e0; opacity: .8; }
.vaso-liq { animation: llenar 2s ease-in-out infinite; }
.burbuja { animation: subir 1.2s linear infinite; }
.b2 { animation-delay: .4s; } .b3 { animation-delay: .8s; }
@keyframes llenar { 0% { transform: translateY(64px); } 70%, 88% { transform: translateY(0); } 100% { transform: translateY(64px); } }
@keyframes subir { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-40px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .vaso-liq, .burbuja { animation: none; } .cargando-in p { animation: latido 1.4s ease-in-out infinite; } }
@keyframes latido { 50% { opacity: .55; } }

/* Mejoras UX parte 1: leyenda, paso del flujo, zoom y teléfono */
.sw-pending { background: transparent; border: 2px dashed var(--pending); }
.sw-round { border-radius: 50%; }
.legend { font-size: 12.5px; }
.table.pending .top { stroke-dasharray: 7 4; }
.place.pending .seat { stroke-dasharray: 4 3; }
.paso { flex: 1 1 220px; display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); align-self: center; }
.paso i { display: block; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.paso b { display: block; height: 100%; width: 33%; background: var(--accent); border-radius: 4px; }
@media (prefers-reduced-motion: no-preference) { .paso b { transition: width .3s; } }
.toolbar:has(.paso:not([hidden])) .spacer { display: none; }
.zoomctl { top: 52px; right: 16px; bottom: auto; flex-direction: column; gap: 6px; }
.zoomctl button, .zoomctl button#zoomFit { width: 44px; min-width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; }
.zoomctl .ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
#acctBtn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
#acctBtn .acct-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; }
#acctBtn.in .acct-ic { color: var(--accent); }
@media (max-width: 600px) {
  .wrap { padding-block: 10px 32px; gap: 12px; }
  header.top { align-items: center; min-height: 48px; }
  .brand { gap: 10px; }
  .brand .logo { width: 36px; height: 36px; }
  h1 { font-size: 22px; }
  .sub { display: none; }
  #acctBtn { width: 44px; height: 44px; min-width: 44px; max-width: none; padding: 0; justify-content: center; border-radius: 50%; }
  #acctBtn .acct-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #acctBtn .acct-ic { width: 22px; height: 22px; }
  #mineBtn:not([hidden]) { width: 44px; height: 44px; padding: 0; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
  #mineBtn .acct-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  #mineBtn .acct-ic { width: 22px; height: 22px; }
  .toolbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; padding: 10px; }
  .toolbar > .field { grid-column: span 2; position: relative; height: 52px; display: block; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
  .toolbar > .field label.eyebrow { position: absolute; top: 6px; left: 10px; font-size: 10px; pointer-events: none; }
  .toolbar > .field select, .toolbar > .field input { width: 100%; height: 100%; border: 0; background: transparent; padding: 20px 8px 4px 10px; font-size: 16px; font-weight: 600; border-radius: 12px; -webkit-appearance: none; appearance: none; }
  .toolbar > #eventField { grid-column: 1 / -1; }
  .toolbar .spacer { display: none; }
  .toolbar .paso { grid-column: 1 / -1; }
  .toolbar > button { grid-column: span 3; min-height: 44px; padding: 6px 8px; font-size: 14px; }
  .toolbar > #editToggle { grid-column: 1 / -1; }
  .plan { padding: 8px; }
  .plan-head { padding: 0 2px 6px; }
  .legend { gap: 4px 12px; font-size: 12px; }
  .zoomctl { top: auto; top: 48px; right: 12px; bottom: auto; gap: 6px; }
  .zoomctl button, .zoomctl button#zoomFit { width: 44px; min-width: 44px; height: 44px; font-size: 22px; padding: 0; }
}
.dval { display: none; }
@media (max-width: 600px) {
  .wrap { padding-block: 6px 32px; gap: 10px; }
  .toolbar { gap: 8px; padding: 8px; }
  .paso { gap: 4px; font-size: 12.5px; }
  .toolbar > .field:has(.dval) input { color: transparent; }
  .toolbar > .field input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
  .dval { display: block; position: absolute; left: 9px; right: 4px; bottom: 7px; font-size: 15px; letter-spacing: -.01em; font-weight: 600; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* Mejoras UX parte 2: formulario, bebidas, reglas, barra inferior y hoja de datos */
form.res input, form.res select { min-height: 48px; font-size: 16px; border-radius: 12px; }
form.res input[type=hidden] { display: none; }
.hint { text-transform: none; letter-spacing: 0; font-weight: 500; }
.acct-hint { margin: 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 10%, var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); font-size: 14px; }
.tel { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; }
.tel select { width: auto; padding-inline: 8px; }
.drinks { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; min-width: 0; }
.drinks legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 8px 14px; border-radius: 12px; font-size: 15px; }
.chip.small { min-height: 40px; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.chip[aria-pressed="true"]::before { content: "✓ "; }
.rules { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--pending) 12%, var(--paper)); border: 1px solid color-mix(in srgb, var(--pending) 40%, var(--line)); }
.rules svg { width: 22px; height: 22px; fill: none; stroke: var(--pending); stroke-width: 2; stroke-linecap: round; }
.rules p { margin: 0; color: var(--ink); font-size: 14px; }
button.big { min-height: 52px; font-size: 16px; border-radius: 12px; width: 100%; }
form.res .actions:has(.big) { display: grid; }
.sumcard { display: flex; gap: 12px; align-items: start; justify-content: space-between; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--bg); }
.sumcard p { margin: 4px 0 0; font-size: 14px; }
.sumcard .feat { color: var(--muted); font-size: 13px; }
.sumcard .linklike { min-height: 44px; padding: 0 4px; }
/* Barra inferior fija (solo teléfono, flujo de reserva) */
.bbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: grid; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.14); border-radius: 20px 20px 0 0; }
.bbar p { margin: 0; }
.bb-hint { text-align: center; color: var(--muted); font-weight: 500; }
.bb-sel { display: flex; justify-content: space-between; gap: 10px; align-items: start; }
.bb-sel strong { font-family: var(--f-display); font-size: 20px; }
.bb-sel p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.bb-warn { color: var(--busy) !important; }
.bb-x { width: 44px; height: 44px; flex: none; padding: 0; font-size: 24px; line-height: 1; border-radius: 50%; }
.bbar button[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
body.has-bbar .wrap { padding-bottom: 180px; }
body.has-bbar .toast { bottom: calc(200px + env(safe-area-inset-bottom, 0px)); }
#detail.phone-hide { display: none; }
/* Hoja inferior "Tus datos" */
.sheet { margin: auto auto 0; width: 100%; max-width: 640px; max-height: 92dvh; padding: 0; border: 0; border-radius: 20px 20px 0 0; background: var(--paper); color: var(--ink); box-shadow: 0 -10px 40px rgba(0,0,0,.3); }
.sheet::backdrop { background: rgba(0,0,0,.5); }
.sheet-in { padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); display: grid; gap: 8px; }
.asa { justify-self: center; width: 40px; height: 5px; border-radius: 5px; background: var(--line); }
.sheet h2#sheetTitle { font-family: var(--f-display); font-size: 22px; margin: 0; outline: none; }
.sheet #detail { border: 0; padding: 0; background: none; }
.sheet #detail > h2 { display: none; }
@media (prefers-reduced-motion: no-preference) { .sheet[open] { animation: subeHoja .25s ease-out; } }
@keyframes subeHoja { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
/* Lugar elegido: relleno de acento y borde claro; el foco del teclado se ve como un borde punteado */
#map g[data-kind]:focus { outline: none; }
#map g[data-kind]:focus-visible .top, #map g[data-kind]:focus-visible .seat { stroke-dasharray: 3 3; stroke-width: 4; }
.table.sel .top, .place.sel .seat { fill: #1f6f78; stroke: #a9e6e2; stroke-width: 4; stroke-dasharray: none; }
.table.sel .num, .table.sel .seats, .place.sel .snum { fill: #ffffff; }

/* Mejoras UX parte 3: barra para 1 persona (zoom, banquetas grandes, mini-plano) */
.place .snum.big { font: 700 14px var(--f-mono); }
.place .halo { fill: none; stroke: #a9e6e2; stroke-width: 3; opacity: .7; }
.minimap { position: absolute; top: 52px; right: 16px; width: 62px; display: grid; gap: 2px; justify-items: center; pointer-events: none; }
.minimap svg { width: 62px; height: 93px; background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.minimap span { font-size: 10px; font-weight: 600; color: var(--muted); background: var(--paper); padding: 0 4px; border-radius: 4px; }
.mini-room { fill: color-mix(in srgb, var(--ink) 10%, var(--paper)); stroke: var(--ink); stroke-width: 12; }
.mini-view { fill: color-mix(in srgb, var(--accent) 25%, transparent); stroke: var(--accent); stroke-width: 16; }
.plan.zoomed-in .zoomctl { top: 172px; }
.seeall { position: absolute; left: 16px; bottom: 16px; min-height: 44px; border-radius: 12px; font-weight: 600; background: var(--paper); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.bb-company { justify-self: center; min-height: 36px; font-size: 14px; }
@media (max-width: 600px) { .minimap { top: 48px; right: 12px; } .plan.zoomed-in .zoomctl { top: 166px; } .seeall { left: 12px; bottom: 12px; } }

/* Mejoras UX parte 4: filtros con estado, "Ideal para N" y vista de lista */
.filt[aria-pressed="false"] { background: var(--paper); color: var(--ink); border-color: var(--line); font-weight: 500; }
.filt[aria-pressed="true"] { font-weight: 700; }
.filt[aria-pressed="true"]::before { content: "✓ "; }
#tvToggle.filt[aria-pressed="true"] { background: #1f6f78; color: #fff; border-color: #1f6f78; }
#musicToggle.filt[aria-pressed="true"] { background: #6b3f6e; color: #fff; border-color: #e3b5e6; }
.table.filtered, .place.filtered { opacity: .3; }
.pill.ideal { background: color-mix(in srgb, #2f9e6a 18%, transparent); color: #2f8a5e; margin-left: 4px; }
.plan-top { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 2px 4px 8px; }
.plan-top strong { font-size: 15px; }
.seg { display: inline-flex; padding: 3px; gap: 3px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); }
.seg button { min-height: 38px; min-width: 64px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; padding: 6px 12px; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.plan.as-list #map, .plan.as-list .zoomctl, .plan.as-list .minimap, .plan.as-list .seeall { display: none !important; }
.placelist { display: grid; gap: 14px; padding: 4px 2px 6px; }
.placelist h3 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.placelist ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.prow { width: 100%; min-height: 64px; display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; text-align: left; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.prow.sel { border-color: #a9e6e2; box-shadow: 0 0 0 2px #1f6f78 inset; }
.prow.off { opacity: .75; border-style: dashed; border-color: var(--pending); }
.pnum { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; font: 700 16px var(--f-display); background: color-mix(in srgb, var(--accent) 16%, var(--paper)); border: 2px solid var(--accent); }
.prow.off .pnum { border: 2px dashed var(--pending); background: color-mix(in srgb, var(--pending) 18%, var(--paper)); }
.prow.sel .pnum { background: #1f6f78; color: #fff; border-color: #a9e6e2; }
.ptxt { display: grid; gap: 2px; min-width: 0; }
.ptxt small { color: var(--muted); font-size: 13px; }
.plan-top strong { flex: 1 1 0; min-width: 0; line-height: 1.25; }
.zoomctl { top: calc(var(--maptop, 44px) + 8px); }
.minimap { top: calc(var(--maptop, 44px) + 8px); }
.plan.zoomed-in .zoomctl { top: calc(var(--maptop, 44px) + 128px); }
@media (max-width: 600px) {
  .zoomctl, .minimap { top: calc(var(--maptop, 44px) + 6px); }
  .plan.zoomed-in .zoomctl { top: calc(var(--maptop, 44px) + 124px); }
  .plan-top { padding-bottom: 6px; }
  .seg button { min-height: 36px; min-width: 56px; padding: 4px 10px; }
}
@media (max-width: 600px) {   /* en el teléfono la leyenda va debajo del plano, así el plano empieza más arriba */
  .plan { display: flex; flex-direction: column; }
  .plan > .plan-head { order: 5; padding: 8px 2px 0; }
}
.table.sel.filtered, .place.sel.filtered { opacity: 1; }

/* Mejoras UX parte 5: confirmación, Mis reservas en la ventana de la cuenta */
.okhead { display: flex; align-items: center; gap: 10px; }
.okhead svg { width: 36px; height: 36px; flex: none; fill: #2f9e6a; }
.okhead svg path { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.okhead h2 { margin: 0; }
.sheet .okhead h2 { display: none; }
.sheet #detail > .okhead { display: none; }
.track { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.track li { position: relative; padding: 0 0 14px 30px; display: grid; gap: 2px; color: var(--muted); }
.track li::before { content: ""; position: absolute; left: 4px; top: 3px; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); background: var(--paper); box-sizing: border-box; }
.track li::after { content: ""; position: absolute; left: 10px; top: 19px; bottom: 0; width: 2px; background: var(--line); }
.track li:last-child { padding-bottom: 0; } .track li:last-child::after { display: none; }
.track li.done { color: var(--ink); } .track li.done::before { background: #2f9e6a; border-color: #2f9e6a; }
.track li.now { color: var(--ink); } .track li.now::before { border-color: var(--pending); background: color-mix(in srgb, var(--pending) 35%, var(--paper)); }
.track small { font-size: 13px; color: var(--muted); }
.ticket { border: 1px dashed var(--line); border-radius: 14px; padding: 12px 14px; display: grid; gap: 10px; background: var(--bg); }
.ticket-code { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ticket-code span { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.ticket-code .code { font-size: 22px; }
.actions.two { display: grid; grid-template-columns: 1fr 1fr; }
.actions.two button { min-height: 44px; border-radius: 12px; }
.dlg .mine { display: grid; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.dlg .mine h3 { margin: 0; font-family: var(--f-display); font-size: 17px; outline: none; }
.dlg.ver-reservas .acct, .dlg.ver-cuenta .mine { display: none; }
.dlg.ver-reservas .mine { border-top: 0; padding-top: 0; }
.dlg.ver-reservas #mineTitle { display: none; }
.dlg h2:focus { outline: none; }
.dlg .list li { grid-template-columns: 48px 1fr; }
.dlg .list li .actions { grid-column: 1 / -1; }
#mineBtn:not([hidden]) { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
#mineBtn .acct-ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* Mejoras UX parte 6: versión web (desde 1024 px): plano a la izquierda y panel de reserva a la derecha */
.panel-foot { display: none; margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.maptip { position: absolute; z-index: 5; display: grid; gap: 2px; max-width: 220px; padding: 8px 10px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.25); pointer-events: none; }
.maptip b { font-size: 14px; }
.maptip .st { font-weight: 600; color: #f0c674; } .maptip .st.ok { color: #8fe0b4; }
.table.hover .top, .place.hover .seat { stroke: #7fd3cf; stroke-width: 4; }
.steps3 { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); }
.steps3 li { padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); }
.steps3 li.on { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.steps3 li.done { color: var(--ink); }
@media (max-width: 1023px) { .main { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1024px) {
  html[data-mode="cliente"] .wrap { max-width: 1360px; padding-inline: 24px; }
  html[data-mode="cliente"] header.top { align-items: center; flex-wrap: nowrap; }
  html[data-mode="cliente"] .brand .logo { width: 44px; height: 44px; }
  html[data-mode="cliente"] .brand > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 16px; }
  html[data-mode="cliente"] h1 { font-size: 30px; }
  html[data-mode="cliente"] .sub { margin: 0; }
  html[data-mode="cliente"] .venue { align-items: center; gap: 16px; flex-wrap: nowrap; }
  html[data-mode="cliente"] .toolbar { align-items: center; gap: 10px; }
  html[data-mode="cliente"] .toolbar > .field { position: relative; display: block; height: 56px; width: 150px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
  html[data-mode="cliente"] .toolbar > #guestsField { width: 120px; }
  html[data-mode="cliente"] .toolbar > .field label.eyebrow { position: absolute; top: 7px; left: 12px; font-size: 10px; pointer-events: none; }
  html[data-mode="cliente"] .toolbar > .field select, html[data-mode="cliente"] .toolbar > .field input { width: 100%; height: 100%; border: 0; background: transparent; padding: 20px 10px 4px 12px; font-size: 16px; font-weight: 600; border-radius: 12px; }
  html[data-mode="cliente"] .toolbar .spacer { flex: 0 0 1px; align-self: stretch; background: var(--line); margin: 4px 6px; }
  html[data-mode="cliente"] .toolbar .paso { display: none !important; }
  html[data-mode="cliente"] .toolbar > button { min-height: 44px; border-radius: 12px; }
  html[data-mode="cliente"] .main { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
  html[data-mode="cliente"] .main > .plan { flex: 999 1 560px; }
  html[data-mode="cliente"] .main > .side { flex: 1 1 380px; max-width: 440px; position: sticky; top: 16px; }
  html[data-mode="cliente"] #map { max-width: 560px; margin-inline: auto; }
  html[data-mode="cliente"] .placelist { max-width: 640px; margin-inline: auto; width: 100%; }
  html[data-mode="cliente"] .panel-foot { display: block; }
  html[data-mode="cliente"] .modebar:has(#modebar:empty), html[data-mode="cliente"] .modebar { display: none; }
  html[data-mode="cliente"] #detail form.res .actions { display: grid; }
}
@media (min-width: 1024px) {
  html[data-mode="cliente"] #map { max-height: max(420px, calc(100dvh - 250px)); }   /* el plano entero se ve sin desplazar la página */
  html[data-mode="cliente"] .toolbar > .field:has(.dval) input { color: transparent; }
  html[data-mode="cliente"] .toolbar > .field input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: auto; height: auto; opacity: 0; cursor: pointer; }
  html[data-mode="cliente"] .dval { display: block; position: absolute; left: 12px; right: 8px; bottom: 9px; font-size: 16px; font-weight: 600; pointer-events: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ===== Grupos grandes: dos mesas juntas ===== */
/* Mesas que se pueden juntar con la elegida (resaltadas) y la línea que une dos mesas. */
.table.pair { opacity: 1; }
.table.pair .top { stroke: var(--accent); stroke-width: 4; stroke-dasharray: 6 4; }
.joinline { stroke: var(--accent); stroke-width: 3; stroke-dasharray: 6 6; opacity: .6; pointer-events: none; }
.joinline.on { stroke-width: 12; stroke-dasharray: none; stroke-linecap: round; opacity: .35; }
.joins { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; min-width: 0; }
.joins legend { padding: 0; margin-bottom: 8px; }
.chips.pairs { margin: 4px 0 8px; }
.bb-sel .chips.pairs { margin: 6px 0 0; }

/* ===== Plano ilustrado (nov 2026): salón de noche con piso de madera, sombras y luz cálida ===== */
/* El plano es un "escenario" oscuro en los dos temas, para que la madera y los colores de estado se lean igual. */
#planBox { --st-free: #4fb3bd; --st-pending: #e0b050; --st-busy: #e07a6a; --stage: #0f1214; }
svg#map, .estilo3 { background: var(--stage); border-radius: 8px; }
#map .floor { fill: url(#il-wood); }
#map .lamp { fill: url(#il-lamp); pointer-events: none; }
#map .gridline { stroke: rgba(255, 236, 200, .12); }
#map .wall { stroke: #d9d0c1; stroke-width: 9; }
#map .wall.inner { stroke-width: 7; }
#map .wall.rail { stroke: #b8c0c6; stroke-width: 3; }
#map .railposts { fill: none; stroke: #e6ebee; stroke-width: 7; stroke-dasharray: 1 38; stroke-linecap: round; pointer-events: none; }
#map.editing .wall.sel-wall { stroke: #7fd3cf; }
#map .doorgap { stroke: var(--stage); stroke-width: 11; }
#map .door { stroke: var(--st-free); stroke-width: 3; stroke-dasharray: 6 6; }
#map .doorlabel { fill: var(--st-free); font: 700 13px var(--f-display); letter-spacing: .12em; }
#map .zonelabel { fill: #ece4d6; opacity: .55; font: 700 14px var(--f-display); letter-spacing: .14em; }
#map .barbody { fill: url(#il-bar); stroke: #a5703f; stroke-width: 2; }
#map .barlabel { fill: #e8c79a; opacity: .8; }
#map .tvbody { fill: #0b0d10; stroke: #5a6b9e; stroke-width: 1.5; }
#map .tvscreen { fill: #8fa8ff; opacity: .6; pointer-events: none; }
#map .tvlabel { fill: #aab6ff; font: 600 11px var(--f-body); }
#map .spbody { fill: #1b1d21; stroke: #d58ad9; stroke-width: 1.5; }
#map .spcone { fill: #2b2e34; stroke: #d58ad9; stroke-width: 1.2; }
#map .spdot { fill: #d58ad9; }
#map .spwave { fill: none; stroke: #d58ad9; stroke-width: 1.6; stroke-linecap: round; opacity: .8; }
#map .markbody { fill: #20262b; stroke: #9aa6ac; }
#map .markicon { fill: #ece4d6; }
#map .marklabel { fill: #c9d1d4; }
#map .table .cseat { fill: #2c3237; }
#map .table .cback { fill: #41494f; }
#map .table .top { fill: url(#il-top); stroke-width: 4; }
#map .table.free .top { stroke: var(--st-free); }
#map .table.pending .top { stroke: var(--st-pending); }
#map .table.busy .top { stroke: var(--st-busy); }
#map .table .num { fill: #2a1a0e; font-size: 20px; }
#map .table .seats { fill: #4a3220; }
#map .place .seat { fill: #262c31; stroke-width: 3.5; }
#map .place.free .seat { stroke: var(--st-free); }
#map .place.pending .seat { stroke: var(--st-pending); }
#map .place.busy .seat { stroke: var(--st-busy); }
#map .place .snum { fill: #ece4d6; }
#map .table.pair .top { stroke: var(--st-free); stroke-dasharray: 6 4; }
#map .table.hover .top, #map .place.hover .seat { stroke: #7fd3cf; }
#map .table.sel .top, #map .place.sel .seat { fill: #1f6f78; stroke: #a9e6e2; stroke-width: 4; stroke-dasharray: none; }
#map .table.sel .num, #map .table.sel .seats, #map .place.sel .snum { fill: #ffffff; }
#map.editing .sel-el .top, #map.editing .sel-el .tvbody { stroke: #ffffff; stroke-width: 4; stroke-dasharray: 6 4; }
#map.editing .sel-el .spbody { stroke: #ffffff; stroke-width: 3; stroke-dasharray: 5 3; }
#map.editing .mark-el.sel-el .markbody { stroke: #ffffff; }
#map .handle { stroke: var(--stage); }
#map .handle.on { fill: #ffffff; }
#map .dimlabel { fill: #ece4d6; stroke: var(--stage); }
#map .door-el rect { fill: rgba(79, 179, 189, .22); stroke: #9fd8de; }
#map.editing .door-el.sel-el rect, #map.editing .sel-el .barbody { stroke: #ffffff; }
#map .joinline { stroke: var(--st-free); }

/* Estilos del plano: Plano (ilustrado) · Isométrico · 3D */
.estilos { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding: 0 2px 8px; }
.estilos .clearsel { margin-right: auto; min-height: 40px; padding: 6px 12px; border-radius: 12px; font-weight: 600; }
/* En el teléfono no hay lugar en esa fila: la X de la barra de abajo hace lo mismo. */
@media (max-width: 600px) { .estilos .clearsel { display: none; } }
.estilos .seg button { min-width: 0; }
.estilo3 { position: relative; width: 100%; height: min(72vh, 720px); min-height: 380px; overflow: hidden; }
.estilo3 svg, .estilo3 canvas { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.estilo3 canvas { touch-action: none; }
.estilo3.iso { height: auto; min-height: 0; }
.estilo3.iso svg { height: auto; max-height: min(80vh, 760px); }
@media (max-width: 600px) { .estilo3 { height: 62vh; min-height: 340px; } }
.estilo3 .e3msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #9aa6ac; font-size: 14px; }
.estilo3 .e3hint { position: absolute; left: 10px; bottom: 10px; font-size: 12px; color: #c9d1d4; background: rgba(15, 18, 20, .8); padding: 4px 10px; border-radius: 999px; pointer-events: none; }
.estilo3 [data-id] { cursor: pointer; }
.estilo3 [data-id]:focus { outline: none; }
.estilo3 [data-id]:focus-visible .sel { opacity: 1; }
.estilo3 .dim { opacity: .3; }
.plan.otro-estilo #map, .plan.otro-estilo .zoomctl, .plan.otro-estilo .minimap, .plan.otro-estilo .seeall { display: none !important; }
@media (prefers-reduced-motion: no-preference) { .estilo3 .sel.on { animation: e3pulso 1.4s ease-in-out infinite; } @keyframes e3pulso { 50% { opacity: .35; } } }

/* Política de privacidad */
.legal-page { max-width: 760px; }
.legal-logo { justify-self: center; } .legal-logo img { border-radius: 50%; display: block; }
.legal { display: grid; gap: 12px; line-height: 1.6; }
.legal h1 { font-size: clamp(26px, 5vw, 34px); line-height: 1.1; }
.legal h2 { font-family: var(--f-display); font-size: 19px; margin: 14px 0 0; }
.legal p, .legal ul { margin: 0; max-width: 68ch; }
.legal p:not(.note) { color: var(--ink); }
.legal ul { padding-left: 20px; display: grid; gap: 6px; }
.legal a:not(.button) { color: var(--accent); }
.legal-back { margin-top: 12px !important; }
.legal-ok { margin: 0; font-size: 13px; color: var(--muted); }
.legal-ok a { color: inherit; }

/* Eliminar cuenta (Mi cuenta) */
.dlg .acct-out { justify-content: space-between; align-items: center; }
.danger-link { color: var(--busy); font-size: 14px; }
.acct-del { display: grid; gap: 10px; padding: 12px; border: 1px solid color-mix(in srgb, var(--busy) 40%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--busy) 6%, var(--paper)); }
.acct-del h3 { margin: 0; }
.panel-foot a, .modebar a { color: inherit; }

/* Panel: secciones en pestañas (Reservas, Eventos, Inventario, Usuarios) */
.ptabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin: 0 0 14px; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; width: fit-content; max-width: 100%; }
.ptabs button { border: 0; background: transparent; color: var(--muted); font-weight: 600; min-height: 40px; padding: 6px 16px; border-radius: 7px; }
.ptabs button[aria-current="page"] { background: var(--ink); color: var(--bg); }
body[data-seccion="reservas"] [data-tab]:not([data-tab="reservas"]),
body[data-seccion="eventos"] [data-tab]:not([data-tab="eventos"]),
body[data-seccion="inventario"] [data-tab]:not([data-tab="inventario"]),
body[data-seccion="usuarios"] [data-tab]:not([data-tab="usuarios"]),
body[data-seccion="ajustes"] [data-tab]:not([data-tab="ajustes"]),
body[data-seccion="seguridad"] [data-tab]:not([data-tab="seguridad"]) { display: none !important; }
@media (max-width: 520px) { .ptabs { width: 100%; } .ptabs button { flex: 1; padding: 6px 8px; font-size: 14px; } }

/* Interruptor "Ofrecer bebidas al reservar" */
.switch-row { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 4px 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); cursor: pointer; }
.switch-row input[role="switch"] { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 26px; margin: 0; border-radius: 13px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; }
.switch-row input[role="switch"]::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .15s; }
.switch-row input[role="switch"]:checked { background: var(--accent, #1d6f74); }
.switch-row input[role="switch"]:checked::after { transform: translateX(20px); }
.switch-row input[role="switch"]:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Panel: buscador de Reservas del día */
.bookq { flex: 1 1 220px; max-width: 320px; min-height: 40px; }
/* Panel: tarjeta "Hoy en el local" junto al plano */
.homehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.homehead h2 { margin: 0; }
#detail h3 { margin: 16px 0 6px; font-size: 15px; }
.homelist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.homelist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.homelist li:last-child { border-bottom: 0; }
.homelist .linklike { text-align: left; color: var(--ink); text-decoration: none; font-size: 14px; }
.homelist .linklike .t { font-weight: 600; }
.homelist li > .note { flex-basis: 100%; }
/* Nota de la reserva */
.notaform { display: grid; gap: 4px; margin: 10px 0; }
.notarow { display: flex; gap: 8px; }
.notarow input { flex: 1; min-width: 0; }

/* Panel en el teléfono: cada reserva del día es una tarjeta con sus botones a la vista */
@media (max-width: 760px) {
  #bookCard .tablewrap { overflow: visible; }
  #bookCard table.book, #bookCard table.book tbody { display: block; width: 100%; }
  #bookCard table.book thead { display: none; }
  #bookCard table.book tr { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "dia dia dia" "hora lugar est" "cli cli cli" "pers tel tel" "mail mail mail" "beb beb beb" "act act act"; gap: 6px 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
  #bookCard table.book tr.on { background: transparent; box-shadow: inset 3px 0 0 var(--accent); padding-left: 8px; }
  #bookCard table.book td { display: block; padding: 0; border: 0; }
  #bookCard td.empty { grid-column: 1 / -1; }
  #bookCard .c-dia { display: none !important; grid-area: dia; }
  #bookCard.all .c-dia { display: block !important; color: var(--muted); font-size: 13px; font-weight: 600; }
  #bookCard .c-hora { grid-area: hora; font-weight: 700; font-size: 16px; }
  #bookCard .c-lugar { grid-area: lugar; }
  #bookCard .c-cli { grid-area: cli; font-weight: 600; min-width: 0; }
  #bookCard .c-est { grid-area: est; }
  #bookCard .c-pers { grid-area: pers; }
  #bookCard .c-tel { grid-area: tel; }
  #bookCard .c-mail { grid-area: mail; overflow-wrap: anywhere; }
  #bookCard .c-beb { grid-area: beb; }
  #bookCard .c-act { grid-area: act; }
  #bookCard [data-l]::before { content: attr(data-l) " "; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
  #bookCard .c-act .actions { display: flex; flex-wrap: wrap; gap: 6px; }
  #bookCard .c-act button { min-height: 40px; }
  .bookq { max-width: none; flex-basis: 100%; order: 3; }
}

#bookCard .c-tel a { color: var(--accent); }

/* Host: no ve teléfono ni email del cliente (la base tampoco se los da) */
body.rol-host #bookCard .c-tel, body.rol-host #bookCard .c-mail { display: none !important; }
/* Ajustes que el rol no puede cambiar */
#ajustesCard .field.locked { opacity: .55; }

/* Avisos de reservas nuevas (panel): campanita, lista y tarjetas flotantes */
.bellwrap { position: relative; display: inline-flex; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 6px 10px; }
.bell-n { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--busy); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.bell-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(360px, calc(100vw - 32px)); max-height: 70vh; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px; display: grid; gap: 8px; }
.bell-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bell-top label { display: inline-flex; gap: 4px; align-items: center; }
#bellItems { display: grid; gap: 8px; }
.aviso { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 8px; background: var(--paper); }
.aviso.visto { border-left-color: var(--line); opacity: .75; }
.aviso-txt { display: grid; gap: 2px; font-size: 14px; }
.aviso .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.aviso button { padding: 4px 10px; font-size: 13px; }
.aviso-pop { position: fixed; z-index: 50; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(340px, calc(100vw - 32px)); display: grid; gap: 8px; padding: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 34px rgba(0,0,0,.25); animation: avisoIn .25s ease-out; }
.aviso-head { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.aviso-head button { padding: 3px 8px; font-size: 12px; }
@keyframes avisoIn { from { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .aviso-pop { animation: none; } }
body:has(#bellList:not([hidden])) .aviso-pop { display: none; }
.statsrow { display: flex; gap: 8px; align-items: flex-start; }
.statsrow .stats { flex: 1; min-width: 0; }
.statsrow .bell { width: 52px; height: 52px; border-radius: 10px; }
.statsrow .bell svg { width: 24px; height: 24px; }
#secAlert { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
#secAlert[hidden] { display: none; }
.alert-x { flex: none; padding: 2px 10px; font-size: 18px; line-height: 1; background: transparent; }
