/* Layout: cabecera con buscador, barra de filtros fija y rejilla de latas; ficha de detalle en panel modal con review oficial y reseñas de usuarios. */
:root {
  --bg: #E9ECE6;
  --surface: #F5F6F2;
  --fg: #1D2320;
  --muted: #5B655F;
  --line: #CBD1C8;
  --accent: #3E5A2B; --hill-a: #B9C9A6; --hill-b: #8FAE74; --door: #2F6B33; --door-ring: #7A4F2A; --knob: #E0A82E;
  --accent-fg: #F5F6F2;
  --danger: #8E2B22;
  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121614; --surface: #1A201D; --fg: #E6EAE3; --muted: #9AA59D;
    --line: #2B342F; --accent: #9DC27A; --accent-fg: #121614; --danger: #E88F86; --hill-a: #24352A; --hill-b: #2F4A31; --door: #3F8A43; --door-ring: #8A6034; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121614; --surface: #1A201D; --fg: #E6EAE3; --muted: #9AA59D;
  --line: #2B342F; --accent: #9DC27A; --accent-fg: #121614; --danger: #E88F86; --hill-a: #24352A; --hill-b: #2F4A31; --door: #3F8A43; --door-ring: #8A6034; color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 16px; line-height: 1.5;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 40px;
}
.wrap { max-width: 1120px; margin: 0 auto; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

header { padding-block: 40px 24px; display: grid; gap: 12px; }
.brand { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
h1 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 6.4vw, 3.2rem); line-height: 1; margin: 0; letter-spacing: -0.01em; }
.brand .tag { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.lede { margin: 0; max-width: 60ch; color: var(--muted); font-size: 1.05rem; text-wrap: pretty; }
.notice { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); border: 1px dashed var(--line); padding: 8px 12px; border-radius: 4px; max-width: 72ch; margin: 0; }

.bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg); padding-block: 12px; border-block: 1px solid var(--line); display: grid; gap: 10px; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.field { display: grid; gap: 4px; min-width: 0; flex: 1 1 150px; }
.field.search { flex: 2 1 260px; }
@media (min-width: 1100px) {
  .bar .row { display: grid; grid-template-columns: minmax(0, 2.2fr) repeat(6, minmax(0, 1fr)); }
}
label { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
input[type="search"], input[type="text"], input[type="url"], input[type="email"], input[type="password"], select, textarea {
  width: 100%; font: inherit; color: var(--fg); background: var(--surface);
  border: 1px solid var(--line); border-radius: 4px; padding: 9px 10px; min-height: 42px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.45; }
.count { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
button.link { font: inherit; background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; padding: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); gap: 18px; padding-top: 22px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; display: grid; grid-template-rows: auto 1fr; text-align: left; font: inherit; color: inherit; padding: 0; cursor: pointer; min-width: 0; overflow: hidden; }
.card:hover { border-color: var(--accent); }
a.card { text-decoration: none; }
.card .art { padding: 16px 16px 4px; background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--line) 35%, transparent)); }
.card .art svg { display: block; width: 100%; max-width: 170px; height: auto; margin: 0 auto; }
.card .body { padding: 12px 16px 16px; display: grid; gap: 8px; align-content: start; min-width: 0; }
.brandname { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.card h2 { font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.15; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.card p { margin: 0; font-size: 0.93rem; color: var(--muted); text-wrap: pretty; line-height: 1.4;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; height: 7em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-family: var(--mono); font-size: 0.7rem; padding: 2px 8px; border: 1px solid var(--line); border-radius: 99px; color: var(--fg); }
.chip.official { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.str { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.pips { display: inline-flex; gap: 3px; }
.pips i { width: 14px; height: 6px; border-radius: 2px; background: var(--line); }
.pips i.on { background: var(--accent); }
.rate { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.empty { grid-column: 1 / -1; padding: 40px 0; text-align: center; color: var(--muted); }

footer { margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 0.85rem; color: var(--muted); }
footer strong { color: var(--fg); font-weight: 600; }
footer .legal-links a { color: var(--muted); }
.lg-priv { font-size: 0.8rem; }
.lg-priv a { color: inherit; }
footer .visitas { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.02em; }

/* Detalle */
.overlay { position: fixed; inset: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 82%, #000); display: grid; place-items: start center; padding: 16px; overflow-y: auto; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; width: min(100%, 860px); display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); margin-block: auto; }
.panel .art { padding: 28px 20px; display: grid; place-items: center; background: color-mix(in srgb, var(--line) 35%, transparent); border-radius: 8px 0 0 0; }
.panel .art svg { width: 100%; max-width: 210px; height: auto; }
/* Marco fijo con la proporción de la lata dibujada: todas las fotos ocupan lo mismo, sin recortarlas. */
.photo { display: block; width: 100%; height: auto; aspect-ratio: 200 / 170; object-fit: contain; margin: 0 auto; border-radius: 4px; }
.card .photo { max-width: 170px; }
.panel .photo { max-width: 220px; }
.panel .info { padding: 24px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.d-title { display: grid; gap: 4px; min-width: 0; }
.nota { flex: none; display: grid; justify-items: center; gap: 6px; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--line) 22%, transparent); }
.nota-n { font-family: var(--display); font-size: 3rem; line-height: .9; color: var(--fg); }
.nota-n small { font-size: 1.1rem; color: var(--muted); margin-left: 2px; }
.nota-l { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.panel h2 { font-family: var(--display); font-weight: 400; font-size: 1.9rem; line-height: 1.1; margin: 0; overflow-wrap: anywhere; }
.panel p { margin: 0; text-wrap: pretty; }
dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 0.92rem; }
dt { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
dd { margin: 0; min-width: 0; }
.close { justify-self: start; font: inherit; font-weight: 500; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 4px; padding: 9px 16px; cursor: pointer; min-height: 42px; }

.sections { grid-column: 1 / -1; border-top: 1px solid var(--line); display: grid; gap: 0; min-width: 0; }
.sec { padding: 22px 24px; display: grid; gap: 14px; min-width: 0; align-content: start; }
.sec + .sec { border-top: 1px solid var(--line); }
.sec h3 { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0; font-weight: 500; }
.sec h3 small { color: var(--muted); font-size: inherit; letter-spacing: 0.04em; text-transform: none; }
.muted { color: var(--muted); font-size: 0.93rem; margin: 0; }
.ofc { display: grid; gap: 12px; min-width: 0; }
.ofc h4 { font-family: var(--display); font-weight: 400; font-size: 1.45rem; line-height: 1.2; margin: 0; text-wrap: balance; overflow-wrap: anywhere; }
.ofc .text { display: grid; gap: 10px; max-width: 68ch; overflow-wrap: anywhere; }
.ofc .text p { margin: 0; }
.yt { position: relative; width: 100%; max-width: 640px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #111; }
.yt iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-link { font-size: 0.85rem; color: var(--muted); justify-self: start; }
.video { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; color: inherit; text-decoration: none; background: color-mix(in srgb, var(--line) 25%, transparent); max-width: 460px; }
.video:hover { border-color: var(--accent); }
.video .play { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--accent); display: grid; place-items: center; }
.video .play svg { width: 18px; height: 18px; margin-left: 3px; fill: var(--accent-fg); }
.video span.t { display: grid; min-width: 0; }
.video strong { font-weight: 600; }
.video small { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); overflow-wrap: anywhere; }
.btn { font: inherit; font-weight: 500; background: transparent; color: var(--fg); border: 1px solid var(--line); border-radius: 4px; padding: 9px 14px; cursor: pointer; min-height: 42px; justify-self: start; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.btn.danger { color: var(--danger); }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
form.f { display: grid; gap: 12px; max-width: 640px; }
form.f .two { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.msg { font-size: 0.88rem; color: var(--danger); min-height: 1.2em; margin: 0; }
.reviews { display: grid; gap: 14px; }
.caract { display: grid; gap: 14px; margin-top: 22px; padding: 16px 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: color-mix(in srgb, var(--line) 15%, transparent); }
.caract h3 { padding-bottom: 10px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; margin: 0; font-weight: 500; color: var(--muted); }
.car { display: grid; gap: 5px; }
.car + .car { padding-top: 12px; border-top: 1px dashed color-mix(in srgb, var(--line) 80%, transparent); }
.car-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.car-l { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.car-h strong { font-weight: 600; font-size: 0.95rem; text-align: right; }
.car ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.car li { display: grid; grid-template-columns: minmax(0, 9.5em) 1fr 2ch; align-items: center; gap: 8px; font-size: 0.8rem; color: var(--muted); }
.car .barra { height: 6px; border-radius: 3px; background: color-mix(in srgb, var(--line) 70%, transparent); overflow: hidden; }
.car .barra i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.car .n { text-align: right; font-family: var(--mono); font-size: 0.72rem; }
.rev-car { grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 0.85rem; }
.rev-car dt { font-size: 0.66rem; }
.rev { display: grid; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); min-width: 0; }
.rev:first-child { border-top: 0; padding-top: 0; }
.rev .head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.rev .who { font-weight: 600; overflow-wrap: anywhere; display: inline-flex; align-items: center; gap: 8px; }
.rev .when { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.rev p { margin: 0; max-width: 68ch; overflow-wrap: anywhere; white-space: pre-line; }
.rev .acts { display: flex; gap: 14px; }
.rev-pie { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 2px; }
.gusta-btn, .gusta-ct { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 0.85rem; }
.gusta-btn { background: none; border: 0; padding: 3px 2px; cursor: pointer; color: var(--muted); }
.gusta-btn:hover { color: var(--danger, #9A3324); }
.gusta-btn .ico, .gusta-ct .ico { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.gusta-btn.on { color: var(--danger, #9A3324); }
.gusta-btn.on .ico { fill: currentColor; }
.gusta-ct { color: var(--muted); }
@media (max-width: 600px) {
  .panel { grid-template-columns: minmax(0, 1fr); }
  .panel .art { padding: 18px; border-radius: 8px 8px 0 0; }
  .panel .art svg { max-width: 150px; }
  .sec, .panel .info { padding: 18px; }
}

/* Aviso de edad */
.gate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, var(--bg) 94%, #000); }
.gate .box { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 28px; max-width: 440px; display: grid; gap: 14px; }
.gate h2 { font-family: var(--display); font-weight: 400; font-size: 1.7rem; margin: 0; line-height: 1.1; }
.gate p { margin: 0; color: var(--muted); }
.gate .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.gate button { font: inherit; font-weight: 500; border-radius: 4px; padding: 10px 16px; cursor: pointer; min-height: 44px; border: 1px solid var(--line); background: transparent; color: var(--fg); }
.gate button.yes { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }

@media (prefers-reduced-motion: no-preference) { .card, .video, .btn { transition: border-color .15s; } }
.hero { padding-block: 28px 0; gap: 0; }
.hero-top { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); }
.logo-link { flex: none; display: block; line-height: 0; border-radius: 50%; }
.logo { flex: none; width: clamp(84px, 20vw, 132px); height: auto; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 2px 0 var(--line), 0 6px 18px rgb(0 0 0 / .18); }
.hero-text { display: grid; gap: 6px; min-width: 0; }
.eyebrow { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-family: "Uncial Antiqua", var(--display); letter-spacing: 0.01em; line-height: 1.08; text-wrap: balance; color: var(--fg); font-size: clamp(1.9rem, 6.6vw, 3.4rem); }
.hero .tag { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hills { display: block; width: 100%; height: clamp(54px, 9vw, 96px); margin-top: 14px; }
.hills .h-back { fill: var(--hill-a); } .hills .h-front { fill: var(--hill-b); }
.hills .d-frame { fill: var(--door-ring); } .hills .d-door { fill: var(--door); } .hills .d-knob { fill: var(--knob); }
.hills .flowers circle:nth-child(odd) { fill: #D9644A; } .hills .flowers circle:nth-child(even) { fill: #E8C14A; }
.hero .lede { margin-top: 16px; } .hero .notice { margin-top: 12px; }
.count { align-items: center; justify-content: flex-start; gap: 6px 16px; }
.count-acts { display: contents; }
#admin-bar { margin-left: auto; }
.confirm { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; background: color-mix(in srgb, #000 55%, transparent); }
.confirm .box { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 22px; width: min(100%, 420px); display: grid; gap: 12px; }
.confirm h2 { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin: 0; line-height: 1.1; }
.confirm p { margin: 0; overflow-wrap: anywhere; }
.confirm .acts { display: flex; gap: 10px; flex-wrap: wrap; }
.confirm .btn.danger { border-color: var(--danger); }
.status { font-family: var(--mono); font-size: 0.72rem; }

/* ---------- Acceso y paneles de colaboradores ---------- */
.acceso { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
#login .box form.f { max-width: none; }
.panel .adm, .panel .aviso-ok { grid-column: 1 / -1; padding: 24px; display: grid; gap: 14px; min-width: 0; }
.prop { border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; display: grid; gap: 8px; background: var(--bg); }
.prop + .prop { margin-top: 12px; }
.prop h3 { margin: 0; font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }
.prop .nota { margin: 0; font-style: italic; }
dl.diff { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 4px 14px; margin: 0; }
dl.diff dt { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); padding-top: 3px; }
dl.diff dd { margin: 0; overflow-wrap: anywhere; }
dl.diff .antes { color: var(--muted); text-decoration: line-through; }
.prop-foto { max-width: min(100%, 260px); border-radius: 6px; border: 1px solid var(--line); }
table.usuarios { width: 100%; border-collapse: collapse; }
table.usuarios th, table.usuarios td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
table.usuarios th { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
table.usuarios select { min-width: 110px; }
#admin-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.panel .editor { grid-column: 1 / -1; padding: 24px; max-width: none; }

/* ---------- Paginador ---------- */
.pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; padding-top: 28px; }
.pager .btn { min-width: 42px; padding-inline: 12px; justify-self: auto; }
.pager .btn[disabled] { opacity: .45; cursor: default; }
.pager .btn[disabled]:hover { border-color: var(--line); }
.pager .gap { color: var(--muted); padding-inline: 4px; }
@media (max-width: 480px) { .pager .txt { display: none; } }

/* ---------- Hojas en el editor ---------- */
fieldset.hojas-ed { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px 12px; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; min-width: 0; }
fieldset.hojas-ed legend { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); padding: 0 4px; }
label.check { font-family: var(--body); font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--fg); display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 32px; }
label.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* Botón de cerrar la ficha: X arriba a la derecha */
.panel { position: relative; }
.panel .info { padding-right: 64px; }
.x-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 42px; height: 42px; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--fg); cursor: pointer; }
.x-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.x-close:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 600px) { .panel .info { padding-right: 18px; } .x-close { top: 10px; right: 10px; } }

/* Mi bodega */
.btns.bodega { margin: 4px 0 12px; }
.bodega-lista { list-style: none; padding: 0; margin: 6px 0 0; }
.bodega-lista li { border-bottom: 1px solid var(--line, rgba(0,0,0,.1)); }
.bd-item { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 2px; }
.bd-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bd-item:hover .bd-nom { text-decoration: underline; }
.bd-mini { flex: none; width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 6px; background: var(--surface-2, transparent); }
.bd-mini svg, .bd-mini img { width: 48px; height: 48px; object-fit: cover; }
.bd-txt { display: grid; gap: 2px; min-width: 0; flex: 1; }
.bd-nom { font-weight: 600; color: var(--fg); overflow-wrap: anywhere; }
.bd-gr { flex: none; font-family: var(--mono); font-size: 0.9rem; color: var(--fg); }
.bd-cant { margin: -4px 0 8px; }
.confirm .box label { font-size: 0.9rem; color: var(--muted); }
.confirm .box input[type=number] { font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--fg); }

/* Botón de cuenta arriba a la derecha y sección Mi cuenta */
.topbar { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding-top: 12px; min-height: 54px; }
.topbar .btn { justify-self: auto; }
.cuenta-btn { display: inline-flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: none; display: inline-grid; place-items: center;
  background: var(--accent); color: var(--accent-fg); font-weight: 600; font-size: 0.95rem; line-height: 1; }
.avatar.big { width: 96px; height: 96px; font-size: 2.4rem; }
.cuenta-cab { display: flex; align-items: center; gap: 16px; margin: 6px 0 16px; overflow-wrap: anywhere; }
.cuenta .btns { margin-bottom: 12px; }
.cuenta-nombre { display: grid; gap: 6px; margin-top: 4px; }
.cuenta-nombre input { flex: 1 1 200px; min-width: 0; font: inherit; padding: 9px 10px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--fg); }
.hero { padding-top: 4px; }
@media (max-width: 600px) { .topbar { padding-top: 8px; min-height: 48px; } }

.bd-total { display: grid; gap: 2px; justify-items: start; padding: 12px 16px; margin: 4px 0 8px; border: 1px solid var(--line); border-radius: 8px; width: fit-content; max-width: 100%; }
.bd-total-lbl { font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.bd-total-num { font-family: var(--display); font-size: 2rem; line-height: 1.1; color: var(--fg); }

/* Distintivo de España: circulito con los colores de la bandera y una E */
.es-badge { display: inline-grid; place-items: center; width: 1.15em; height: 1.15em; margin-left: 0.3em; vertical-align: 0.12em;
  border-radius: 50%; font: 700 0.55em/1 system-ui, sans-serif; color: #AA151B;
  background: linear-gradient(#AA151B 0 25%, #F1BF00 25% 75%, #AA151B 75%); box-shadow: 0 0 0 1px rgba(0,0,0,.18); }
.es-check { display: inline-flex; align-items: center; gap: 8px; font-size: 1rem; }
.es-check .es-badge { font-size: 1.4rem; margin-left: 0; }

/* Medias de las reseñas en la ficha */
.medias { display: grid; gap: 18px; padding: 16px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.md-top { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 20px; align-items: center; }
.md-nota { display: grid; justify-items: center; gap: 4px; text-align: center; }
.md-nota strong { font-family: var(--display); font-weight: 400; font-size: 2.4rem; line-height: 1; }
.md-nota .muted { font-family: var(--mono); font-size: 0.72rem; }
.md-est { display: flex; gap: 3px; }
.md-est i { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--accent); }
.md-est i.on { background: var(--accent); }
.md-est i.half { background: linear-gradient(90deg, var(--accent) 50%, transparent 50%); }
.md-br { display: grid; grid-template-columns: 14px minmax(0, 1fr) 24px; gap: 8px; align-items: center; font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-bottom: 4px; }
.md-bb { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.md-bb span { display: block; height: 100%; background: var(--accent); }
.md-escalas { display: grid; gap: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.md-escalas h4 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.05rem; }
.md-fila { display: grid; grid-template-columns: 150px minmax(0, 1fr) 110px; gap: 4px 14px; align-items: center; }
.md-lab { font-size: 0.9rem; }
.md-esc { position: relative; height: 8px; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); }
.md-esc span { position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); transform: translate(-50%, -50%); }
.md-val { font-size: 0.85rem; color: var(--muted); }
.md-ext { grid-column: 2; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.66rem; color: var(--muted); }
@media (max-width: 560px) {
  .md-top { grid-template-columns: 1fr; }
  .md-fila { grid-template-columns: minmax(0, 1fr) auto; }
  .md-lab { grid-column: 1; } .md-val { grid-column: 2; text-align: right; }
  .md-esc, .md-ext { grid-column: 1 / -1; }
}

/* Socios del Pipa Club */
.sello-socio { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; flex: none; }
.carne { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; max-width: 380px;
  margin: 0 0 16px; padding: 14px 16px; border: 2px solid var(--door-ring); border-radius: 10px;
  background: color-mix(in srgb, var(--hill-a) 45%, var(--surface)); }
.carne img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.carne div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.carne-club { font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.carne strong { font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.us-socio { white-space: nowrap; }
.us-socio label { display: inline-flex; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-family: var(--body); font-size: 0.9rem; color: var(--fg); }
.us-socio input[type=number] { width: 84px; min-height: 34px; margin-left: 8px; }

/* Tarros y latas de Mi bodega */
.tarros { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 12px; background: var(--surface); }
.tarros > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; }
.tarros > summary::-webkit-details-marker { display: none; }
.tr-chev { font-size: 1.3rem; line-height: 1; color: var(--muted); transition: transform .15s; width: 10px; }
.tarros[open] .tr-chev { transform: rotate(90deg); }
.tr-res { flex: 1; font-size: 0.95rem; }
.tr-viejo { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); }
.tr-cuerpo { border-top: 1px solid var(--line); padding: 4px 12px 12px; display: grid; gap: 10px; justify-items: start; }
.tr-lista { list-style: none; margin: 0; padding: 0; width: 100%; }
.tr-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.tr-ic { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--accent);
  background: color-mix(in srgb, var(--hill-a) 40%, transparent); }
.tr-ic.sm { width: 26px; height: 26px; background: none; }
.tr-txt { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.tr-txt .muted { font-size: 0.82rem; }
.tr-der { display: flex; align-items: center; gap: 12px; }
.tr-edad { font-family: var(--mono); font-size: 0.72rem; padding: 2px 8px; border-radius: 99px; white-space: nowrap;
  background: color-mix(in srgb, var(--hill-a) 45%, transparent); color: var(--fg); }
.tarro-form .tf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.tarro-form .tf-grid > div { display: grid; gap: 4px; }
.tarro-form select, .tarro-form input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 4px; background: transparent; color: var(--fg); width: 100%; }
.confirm .box.tarro-form { width: min(100%, 480px); max-height: calc(100vh - 32px); overflow: auto; }
@media (max-width: 520px) {
  .tr-item { grid-template-columns: 36px minmax(0, 1fr); }
  .tr-der { grid-column: 2; }
}
.bd-env { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.72rem; color: var(--accent); }
.bd-env svg { width: 15px; height: 15px; flex: none; }

/* Rangos por reseñas */
.rango { font-family: var(--mono); font-size: 0.66rem; font-weight: 400; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 99px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.rango.r3, .rango.r4 { border-color: var(--accent); color: var(--accent); }
.rango.r5 { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.mi-rango { display: grid; gap: 8px; max-width: 380px; margin: 0 0 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.mi-rango > div:first-child { display: grid; gap: 2px; }
.mi-rango strong { font-family: var(--display); font-weight: 400; font-size: 1.25rem; }
.mi-rango .muted { font-size: 0.85rem; }
.mr-barra { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.mr-barra span { display: block; height: 100%; background: var(--accent); }

/* Compartir e instalar */
.compartir { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 4px 0 10px; }
.compartir .muted { font-size: 0.85rem; overflow-wrap: anywhere; }
.instalar { display: grid; gap: 6px; justify-items: start; max-width: 380px; margin: 0 0 16px; padding: 14px 16px; border: 1px dashed var(--line); border-radius: 10px; }
.instalar .muted { font-size: 0.88rem; }
.meta .es-badge.es-lista { font-size: 1.05rem; margin-left: 0; vertical-align: middle; align-self: center; }

/* Ficha abierta en pantalla ancha: la foto arriba de su columna (no centrada en vertical)
   y fija mientras se baja por la ficha. En el móvil ya va arriba. */
@media (min-width: 601px) {
  .panel .art { align-items: start; align-content: start; }
  .panel .art > * { position: sticky; top: 28px; }
}

/* ---------- Ficha abierta: «despensa de la Comarca» ----------
   Franja con colinas y puerta redonda, la lata en una hornacina con balda, datos en casillas,
   inicial en uncial, reseña vacía que invita a escribir y otras latas de la misma marca. */
:root {
  --nicho-a: #F6E3B4; --nicho-b: #EBD9AE; --nicho-c: #DCC79A; --nicho-borde: #7A4F2A; --nicho-filo: #A87A4A;
  --balda: #8A5A2E; --balda-l: #A8743F; --balda-d: #6B4322;
  --oro-tinta: #8A5F12; --sabor-bg: #F6E1C9; --sabor-fg: #7A3E12; --casilla: #F7EFDC;
}
:root[data-theme="dark"] {
  --nicho-a: #4A3F2A; --nicho-b: #3A3222; --nicho-c: #2C261B; --nicho-borde: #6B4A2E; --nicho-filo: #8A6440;
  --balda: #5E4027; --balda-l: #7A5534; --balda-d: #45301D;
  --oro-tinta: #E2B551; --sabor-bg: #3D2C1D; --sabor-fg: #F0BE93; --casilla: #2B271D;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --nicho-a: #4A3F2A; --nicho-b: #3A3222; --nicho-c: #2C261B; --nicho-borde: #6B4A2E; --nicho-filo: #8A6440;
    --balda: #5E4027; --balda-l: #7A5534; --balda-d: #45301D;
    --oro-tinta: #E2B551; --sabor-bg: #3D2C1D; --sabor-fg: #F0BE93; --casilla: #2B271D;
  }
}
.overlay:has(.panel.ficha) { background: rgb(46 36 24 / .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.panel.ficha { width: min(100%, 1040px); grid-template-columns: minmax(0, 340px) minmax(0, 1fr); column-gap: 44px; overflow: hidden; }
.panel.ficha .ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.d-franja { grid-column: 1 / -1; height: 128px; background: linear-gradient(color-mix(in srgb, var(--surface) 55%, var(--gold-soft, var(--bg))), color-mix(in srgb, var(--gold-soft, var(--bg)) 75%, var(--surface))); position: relative; }
.d-franja svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 120px; display: block; }
.d-franja .fr-a { fill: var(--hill-a); } .d-franja .fr-b { fill: var(--hill-b); } .d-franja .fr-m { fill: color-mix(in srgb, var(--hill-a) 60%, var(--hill-b)); }
.d-franja .fr-ring { fill: var(--door-ring); } .d-franja .fr-door { fill: var(--door); } .d-franja .fr-knob { fill: var(--knob); }
.d-franja .fr-glass { fill: var(--glass, #E9B44C); } .d-franja .fr-f1 { fill: #C8553D; } .d-franja .fr-f2 { fill: #E2B551; }
.d-ruta { position: absolute; left: 32px; top: 22px; z-index: 2; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: calc(100% - 120px);
  font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.03em; color: var(--muted); }
.d-ruta button.link { color: var(--muted); text-decoration: none; min-height: 32px; }
.d-ruta button.link:hover { color: var(--accent); text-decoration: underline; }
.d-ruta .d-r-yo { color: var(--fg); }
.panel.ficha .x-close { top: 18px; right: 22px; width: 44px; height: 44px; }

.d-lado { display: grid; gap: 18px; align-content: start; padding: 0 0 32px 48px; margin-top: -54px; position: relative; z-index: 1; }
.nicho { height: 330px; border-radius: 180px 180px 16px 16px; border: 6px solid var(--nicho-borde);
  background: radial-gradient(ellipse at 50% 70%, var(--nicho-a) 0%, var(--nicho-b) 45%, var(--nicho-c) 100%);
  box-shadow: inset 0 0 0 2px var(--nicho-filo), 0 12px 26px -16px rgb(60 40 10 / .6);
  display: flex; flex-direction: column; justify-content: flex-end; align-items: center; overflow: hidden; }
.panel.ficha .nicho .art { padding: 0; background: none; border-radius: 0; display: block; width: 250px; margin-bottom: -6px; }
.panel.ficha .nicho .art > * { position: static; }
.panel.ficha .nicho .art svg { max-width: none; width: 100%; display: block; }
.panel.ficha .nicho .art .photo { max-width: none; width: 100%; margin-bottom: 8px; border-radius: 6px; }
.balda { width: 100%; height: 22px; flex: none; background: var(--balda); border-top: 3px solid var(--balda-l); box-shadow: inset 0 -5px 0 var(--balda-d); }
.bodega-t { margin: 0 0 8px; font-family: var(--mono); font-size: 0.95rem; color: var(--muted); }
.d-lado .btns.bodega { margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.d-lado .bodega .btn { min-height: 64px; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px 6px; font-weight: 400; font-size: 0.92rem; line-height: 1.15; text-align: center; justify-self: stretch; background: var(--surface); }
.d-lado .bodega .btn.primary { background: var(--accent); color: var(--accent-fg); }
.d-lado .compartir { margin: 0; display: grid; gap: 6px; }
.d-lado .compartir .btn { justify-self: stretch; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--accent); border-radius: 10px; min-height: 44px; }

.panel.ficha .info { padding: 8px 48px 32px 0; gap: 22px; }
.panel.ficha #d-meta { display: grid; gap: 20px; min-width: 0; }
.panel.ficha #rv-medias:empty, .panel.ficha #rv-mine:empty { display: none; }
.panel.ficha .d-title { gap: 6px; }
.panel.ficha .brandname { color: var(--oro-tinta); letter-spacing: 0.08em; font-size: 1rem; }
.panel.ficha h2 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); line-height: 1.02; }
.d-rate { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; color: var(--muted); font-size: 1rem; margin-top: 4px !important; }
.d-pips { display: inline-flex; gap: 4px; }
.d-pips i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid color-mix(in srgb, var(--line) 60%, var(--muted)); }
.d-datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 10px; }
.d-dato { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--casilla); color: var(--oro-tinta); align-content: start; }
.d-dato .ico { width: 22px; height: 22px; }
.d-dato-l { font-family: var(--mono); font-size: 0.9rem; color: var(--muted); }
.d-dato-v { font-size: 1.08rem; font-weight: 500; color: var(--fg); overflow-wrap: anywhere; }
.panel.ficha dl.d-chips { grid-template-columns: 150px minmax(0, 1fr); gap: 12px 10px; align-items: center; font-size: 1rem; }
.panel.ficha dl.d-chips dt { font-size: 0.95rem; padding: 0; }
.panel.ficha dl.d-chips dd { display: flex; flex-wrap: wrap; gap: 8px; }
.panel.ficha .chip { font-family: var(--body); font-size: 0.98rem; letter-spacing: 0; padding: 3px 12px; border: 0; background: color-mix(in srgb, var(--gold-soft, var(--line)) 75%, var(--surface)); display: inline-flex; align-items: center; gap: 6px; }
.chip.hoja::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #9C8466; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 22%, transparent); }
.chip.h-virginia::before { background: #C99A3B; } .chip.h-burley::before { background: #9C6B3A; } .chip.h-oriental::before { background: #B8863A; }
.chip.h-latakia::before { background: #4A3B2E; } .chip.h-perique::before { background: #6B2E2A; } .chip.h-kentucky::before { background: #5E4630; }
.chip.h-cavendish::before { background: #2E2219; } .chip.h-cigarro::before { background: #7A5A3A; }
.panel.ficha .chip.sabor { background: var(--sabor-bg); color: var(--sabor-fg); }
.d-sep { border: 0; border-top: 1px solid var(--line); margin: 0; width: 100%; }
.panel.ficha .d-desc { font-size: 1.12rem; line-height: 1.6; max-width: 62ch; }
.d-desc::first-letter { float: left; font-family: "Uncial Antiqua", var(--display); font-size: 3.4em; line-height: 0.85; color: var(--accent); margin: 0.08em 0.12em 0 0; }

.d-orn { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 48px; color: var(--gold, var(--accent)); }
.d-orn span { flex: 1; height: 1px; background: var(--line); }
.d-orn .ico { width: 22px; height: 22px; stroke-width: 1.4; }
.panel.ficha .sections { border-top: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 40px; padding: 8px 48px 40px; }
.panel.ficha .sections:not(:has(.sec-mas)) { grid-template-columns: minmax(0, 1fr); }
/* Reseñas: medias y la última a la izquierda, tabacos relacionados a la derecha, y el resto debajo a todo lo ancho */
.panel.ficha .sections { grid-template-areas: "video video" "res mas" "resto resto"; }
.panel.ficha .sections:not(:has(.sec-mas)) { grid-template-areas: "video" "res" "resto"; }
.panel.ficha #d-video { grid-area: video; }
.panel.ficha .sec-resenas { grid-area: res; }
.panel.ficha .sec-mas { grid-area: mas; }
.panel.ficha .sec-resto { grid-area: resto; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 26px; }
.rev-etq { font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.reviews.rev-rejilla { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 16px; align-items: start; }
.rev-rejilla .rev, .rev-rejilla .rev:first-child { padding: 16px 18px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.panel.ficha .sec { padding: 20px 0; }
.panel.ficha .sec + .sec { border-top: 0; }
.panel.ficha #d-video { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
.panel.ficha .sec h3 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; letter-spacing: 0; text-transform: none; color: var(--accent); }
.rv-vacio { display: flex; gap: 22px; align-items: center; padding: 24px 26px; border: 1.5px dashed color-mix(in srgb, var(--line) 50%, var(--muted)); border-radius: 14px; background: var(--casilla); }
.rv-vacio svg { width: 78px; height: 78px; flex: none; fill: none; stroke: var(--door-ring); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rv-vacio svg .humo { stroke: var(--gold, var(--muted)); }
.rv-vacio-t { display: grid; gap: 10px; }
.rv-vacio-t > p:first-child { font-size: 1.12rem; }
.rv-vacio-t .muted { font-size: 1rem; }
.mas-lista { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mas-item { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 8px 10px; min-height: 64px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--fg); }
.mas-item:hover { border-color: var(--accent); }
.mas-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mas-art { flex: none; width: 64px; }
.mas-art svg, .mas-art .photo { width: 64px; height: auto; display: block; }
.mas-nom { font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }

@media (min-width: 601px) {
  .d-lado { position: sticky; top: 0; align-self: start; }
}
@media (max-width: 860px) and (min-width: 601px) {
  .panel.ficha { grid-template-columns: minmax(0, 280px) minmax(0, 1fr); column-gap: 28px; }
  .d-lado { padding-left: 28px; } .panel.ficha .info { padding-right: 28px; }
  .nicho { height: 280px; } .panel.ficha .nicho .art { width: 210px; }
  .panel.ficha .sections { grid-template-columns: minmax(0, 1fr); padding-inline: 28px; }
  .panel.ficha .sections, .panel.ficha .sections:not(:has(.sec-mas)) { grid-template-areas: "video" "res" "resto" "mas"; }
  .d-orn { padding-inline: 28px; }
  .panel.ficha dl.d-chips { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .overlay:has(.panel.ficha) { padding: 0; }
  .overlay .panel.ficha { grid-template-columns: minmax(0, 1fr); border-radius: 0; border: 0; min-height: 100dvh; margin-block: 0; box-shadow: none; }
  .d-franja { height: 104px; }
  .d-franja svg { height: 100px; }
  .d-ruta { display: none; }
  .panel.ficha .x-close { top: 12px; right: 12px; }
  .d-lado { display: contents; }
  .nicho { order: 1; justify-self: center; width: 230px; height: 230px; border-width: 5px; margin-top: -44px; position: relative; z-index: 1; }
  .panel.ficha .nicho .art { width: 180px; margin-bottom: -5px; }
  .balda { height: 18px; }
  .panel.ficha .info { order: 2; padding: 18px 20px 0; }
  .panel.ficha .d-head { flex-direction: column; align-items: center; text-align: center; }
  .panel.ficha .d-title { justify-items: center; }
  .d-rate { justify-content: center; }
  .d-datos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .d-dato .ico { display: none; }
  .panel.ficha dl.d-chips { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .panel.ficha dl.d-chips dd + dt { margin-top: 8px; }
  #d-bodega { order: 3; padding: 18px 20px 0; }
  #d-bodega:empty { display: none; }
  .d-lado .compartir { order: 4; padding: 12px 20px 0; }
  .d-orn { order: 5; padding: 18px 20px 0; }
  .panel.ficha .sections { order: 6; grid-template-columns: minmax(0, 1fr); padding: 0 20px 32px; }
  .panel.ficha .sections, .panel.ficha .sections:not(:has(.sec-mas)) { grid-template-areas: "video" "res" "resto" "mas"; }
  .rv-vacio { flex-direction: column; text-align: center; padding: 20px; }
  .rv-vacio svg { width: 60px; height: 60px; }
  .rv-vacio-t { justify-items: center; }
  .mas-lista { display: flex; overflow-x: auto; gap: 10px; margin-right: -20px; padding-right: 20px; scroll-snap-type: x mandatory; }
  .mas-item { flex: none; width: 132px; flex-direction: column; text-align: center; scroll-snap-align: start; }
  .mas-art, .mas-art svg, .mas-art .photo { width: 90px; }
}

/* ---------- Mi bodega: la estantería ---------- */
.overlay:has(.panel.bodega-p) { background: rgb(46 36 24 / .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.panel.bodega-p { display: block; width: min(100%, 1040px); overflow: hidden; }
.panel.bodega-p .x-close { top: 18px; right: 22px; width: 44px; height: 44px; }
.panel.bodega-p .ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.panel.bodega-p .d-franja { height: 150px; }
.bd-cab { position: absolute; left: 48px; top: 30px; right: 90px; display: flex; gap: 16px; align-items: center; z-index: 1; }
.bd-baul { flex: none; width: 56px; height: 56px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--surface); }
.bd-baul svg { width: 28px; height: 28px; }
.bd-cab h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1; margin: 0; }
.bd-cab .muted { font-size: 1rem; }
.bd-cuerpo { padding: 28px 48px 44px; display: grid; gap: 28px; }

.bd-casillas { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.bd-casilla { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--casilla); min-width: 0; }
.bd-casilla .l { font-family: var(--mono); font-size: 0.95rem; color: var(--muted); }
.bd-casilla .n { font-family: var(--display); font-size: 2.5rem; line-height: 1; overflow-wrap: anywhere; }
.bd-casilla .n.medio { font-size: 1.6rem; line-height: 1.1; }
.bd-casilla .s { font-size: 0.95rem; color: var(--muted); }
.bd-casilla.principal { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.bd-casilla.principal .l, .bd-casilla.principal .s { color: inherit; opacity: .85; }

.bd-barra { display: flex; justify-content: space-between; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.bd-tabs { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: color-mix(in srgb, var(--gold-soft, var(--line)) 80%, var(--surface)); }
.bd-tabs button { font: inherit; font-size: 1.05rem; min-height: 44px; padding: 0 18px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.bd-tabs button span { margin-left: 2px; }
.bd-tabs button[aria-selected="true"] { background: var(--surface); color: var(--fg); box-shadow: 0 1px 3px rgb(60 40 10 / .2); }
.bd-orden { display: flex; align-items: center; gap: 8px; font-family: var(--body); font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.bd-orden select { min-height: 44px; width: auto; }

.bd-estanteria { display: grid; gap: 22px; }
.bd-rotulo { margin: 0 0 6px; display: inline-flex; align-items: baseline; gap: 8px; padding: 3px 14px; border-radius: 6px;
  background: var(--balda); color: #F6E9CC; font-family: var(--mono); font-size: 1rem; box-shadow: inset 0 -2px 0 var(--balda-d); }
.bd-rotulo small { font-size: 0.85rem; opacity: .8; }
.bd-estante { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); row-gap: 18px; }
.bd-estante.compacta { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.bd-lata { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.bd-lata:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.bd-lata .bd-chip { flex: none; height: 1.75em; line-height: 1.75em; font-size: 0.85rem; padding: 0 10px; border-radius: 999px; background: color-mix(in srgb, var(--gold-soft, var(--line)) 60%, var(--surface)); color: var(--muted); margin-bottom: 4px; max-width: 95%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-sizing: border-box; }
.bd-lata .bd-chip.viejo { background: var(--gold-soft, var(--line)); color: var(--oro-tinta); }
.bd-lata .bd-chip.vacio { opacity: .8; }
.bd-art { flex: none; width: 140px; height: 119px; margin-bottom: -10px; position: relative; z-index: 1; transition: transform .15s; display: flex; align-items: flex-end; justify-content: center; }
.bd-art svg { width: 100%; height: 100%; display: block; }
.bd-art .photo { display: block; width: 100%; max-width: 100%; height: calc(100% - 10px); aspect-ratio: auto; object-fit: contain; object-position: center bottom; margin: 0; border-radius: 4px; }
.bd-lata:hover .bd-art { transform: translateY(-3px); }
.bd-balda { align-self: stretch; height: 22px; background: var(--balda); border-top: 4px solid var(--balda-l); box-shadow: inset 0 -6px 0 var(--balda-d); }
.bd-lata .bd-nombre { margin-top: 10px; font-size: 1.05rem; font-weight: 500; line-height: 1.2; padding: 0 6px; overflow-wrap: anywhere; }
.bd-lata .bd-marca { font-size: 0.9rem; color: var(--muted); padding: 0 6px; }
.bd-lata .bd-gramos { font-family: var(--display); font-size: 1.2rem; color: var(--accent); }
.bd-estante.compacta .bd-art { width: 96px; height: 82px; margin-bottom: -7px; }
.bd-estante.compacta .bd-art .photo { height: calc(100% - 7px); }
.bd-estante.compacta .bd-balda { height: 16px; border-top-width: 3px; box-shadow: inset 0 -4px 0 var(--balda-d); }
.bd-estante.compacta .bd-nombre { font-size: 0.92rem; }
.bd-estante.compacta .bd-gramos { font-size: 1rem; }
.bd-vacio { margin: 0; padding: 24px; border: 1.5px dashed color-mix(in srgb, var(--line) 50%, var(--muted)); border-radius: 14px; background: var(--casilla); color: var(--muted); text-align: center; }

.bd-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.bd-sec-h h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.55rem; color: var(--accent); }
.bd-mezclas { display: grid; gap: 14px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--casilla); }
.bd-mz-barra { display: flex; gap: 2px; height: 14px; border-radius: 7px; overflow: hidden; }
.bd-mz-lista { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; }
.bd-mz-lista li { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto 3.4em; gap: 10px; align-items: center; }
.bd-mz-lista .sw { width: 12px; height: 12px; border-radius: 3px; }
.bd-mz-lista .t { font-size: 1.05rem; overflow-wrap: anywhere; }
.bd-mz-lista .g { font-family: var(--display); font-size: 1.1rem; }
.bd-mz-lista .p { font-size: 0.95rem; color: var(--muted); text-align: right; }

.panel.bodega-p .d-orn { padding: 0; }
.bd-madura { display: grid; gap: 14px; }
.bd-md-lista { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.bd-md { display: grid; grid-template-columns: 56px minmax(0, 1.3fr) minmax(0, 1.2fr) minmax(160px, 1fr) auto; gap: 16px; align-items: center; padding: 12px 18px; background: var(--surface); }
.bd-md:nth-child(even) { background: var(--casilla); }
.bd-md + .bd-md { border-top: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.bd-md-ic { position: relative; width: 56px; height: 48px; display: grid; place-items: end center; }
.bd-md-ic .bd-md-art { width: 56px; height: 48px; display: flex; align-items: flex-end; justify-content: center; }
.bd-md-ic .bd-md-art svg, .bd-md-ic .bd-md-art .photo { width: 100%; height: 100%; object-fit: contain; display: block; margin: 0; }
.bd-md-ic .bd-md-env { position: absolute; right: -6px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--accent); display: grid; place-items: center; }
.bd-md-ic .bd-md-env svg { width: 15px; height: 15px; }
.bd-md-q { display: grid; min-width: 0; }
.bd-md-q strong { font-weight: 500; font-size: 1.05rem; overflow-wrap: anywhere; }
.bd-md-q .muted, .bd-md-f, .bd-md-e .muted { font-size: 0.9rem; }
.bd-md-e { display: grid; gap: 4px; }
.bd-md-b { height: 8px; border-radius: 4px; background: color-mix(in srgb, var(--gold-soft, var(--line)) 85%, var(--surface)); overflow: hidden; }
.bd-md-b span { display: block; height: 100%; background: var(--gold, var(--accent)); border-radius: 4px; }

@media (max-width: 600px) {
  .overlay:has(.panel.bodega-p) { padding: 0; }
  .overlay .panel.bodega-p { border-radius: 0; border: 0; min-height: 100dvh; margin-block: 0; box-shadow: none; }
  .panel.bodega-p .x-close { top: 12px; right: 12px; }
  .panel.bodega-p .d-franja { height: 130px; }
  .bd-cab { left: 20px; top: 16px; right: 64px; gap: 12px; align-items: flex-start; }
  .bd-baul { width: 44px; height: 44px; box-shadow: 0 0 0 3px var(--surface); }
  .bd-baul svg { width: 22px; height: 22px; }
  .bd-cab h2 { font-size: 1.9rem; }
  .bd-cab .muted { font-size: 0.92rem; }
  .bd-cuerpo { padding: 18px 20px 32px; gap: 22px; }
  .bd-casillas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .bd-casilla { padding: 12px 14px; border-radius: 12px; }
  .bd-casilla .n { font-size: 1.8rem; }
  .bd-casilla .n.medio { font-size: 1.15rem; }
  .bd-barra { display: grid; }
  .bd-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bd-tabs button { padding: 4px 4px; font-size: 0.95rem; line-height: 1.15; min-height: 48px; }
  .bd-tabs button span { display: block; margin: 0; }
  .bd-orden { justify-content: flex-end; }
  .bd-estante { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bd-estante.compacta { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bd-art { width: 100px; height: 85px; margin-bottom: -7px; }
  .bd-art .photo { height: calc(100% - 7px); }
  .bd-balda { height: 18px; border-top-width: 3px; box-shadow: inset 0 -5px 0 var(--balda-d); }
  .bd-lata .bd-chip { font-size: 0.75rem; padding: 1px 6px; }
  .bd-lata .bd-nombre { font-size: 0.92rem; }
  .bd-lata .bd-marca { display: none; }
  .bd-estante.compacta .bd-art { width: 72px; height: 61px; margin-bottom: -5px; }
  .bd-estante.compacta .bd-art .photo { height: calc(100% - 5px); }
  .bd-estante.compacta .bd-nombre { font-size: 0.8rem; }
  .bd-mezclas { padding: 16px; }
  .bd-mz-lista { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .bd-md { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 6px 12px; padding: 12px 14px; }
  .bd-md-f { grid-column: 2 / -1; }
  .bd-md-e { grid-column: 1 / -1; }
  .bd-md > button { grid-column: 3; grid-row: 1; }
}
.bd-prueba { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding: 12px 16px;
  border: 1.5px dashed var(--gold, var(--accent)); border-radius: 12px; background: color-mix(in srgb, var(--gold-soft, var(--line)) 55%, var(--surface)); color: var(--oro-tinta); }
.bd-prueba .btns { gap: 8px; }

/* ---------- Mi cuenta: la puerta de casa ---------- */
.overlay:has(.panel.cuenta-p) { background: rgb(46 36 24 / .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.panel.cuenta-p { display: block; width: min(100%, 1040px); overflow: hidden; }
.panel.cuenta-p .x-close { top: 18px; right: 22px; width: 44px; height: 44px; }
.panel.cuenta-p .ico { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.panel.cuenta-p .d-franja { height: 150px; }
.cu-cab { display: flex; gap: 28px; align-items: flex-end; padding: 0 48px; margin-top: -80px; position: relative; z-index: 1; flex-wrap: wrap; }
.cu-puerta { flex: none; width: 152px; height: 152px; border-radius: 50%; background: var(--nicho-borde); padding: 8px; box-sizing: border-box;
  box-shadow: 0 0 0 4px var(--surface), 0 12px 26px -14px rgb(60 40 10 / .7); }
.cu-piedras { width: 100%; height: 100%; border-radius: 50%; border: 3px dashed var(--stone, #BCAE92); box-sizing: border-box; padding: 5px; }
.cu-piedras .avatar.big { width: 100%; height: 100%; font-size: 3.2rem; font-family: var(--display); }
.cu-quien { flex: 1 1 280px; display: grid; gap: 8px; padding-bottom: 12px; min-width: 0; }
.cu-quien h2 { font-family: var(--display); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3rem); line-height: 1; margin: 0; overflow-wrap: anywhere; }
.cu-et { margin: 0; font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.04em; color: var(--muted); }
.cu-et.oro { color: var(--oro-tinta); letter-spacing: 0.08em; font-size: 1rem; }
.cu-chips { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.cu-chips .muted { margin-right: 4px; overflow-wrap: anywhere; }
.cu-chip { font-size: 0.88rem; padding: 2px 10px; border-radius: 999px; }
.cu-chip.rol { background: var(--accent); color: var(--accent-fg); }
.cu-chip.rango { background: var(--gold-soft, var(--line)); color: var(--oro-tinta); }
.cu-foto { padding-bottom: 14px; gap: 8px; }
.cu-foto .btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; background: var(--surface); }
.cu-cuerpo { padding: 32px 48px 44px; display: grid; gap: 26px; }
.cu-fila { display: grid; gap: 18px; }
.cu-fila.dos { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.cu-carne { display: flex; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 16px; border: 2px solid var(--gold, #A8761E);
  background: linear-gradient(135deg, color-mix(in srgb, var(--gold-soft, #F1E2BC) 80%, var(--surface)), var(--gold-soft, #E9D6A6));
  box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--gold-soft, #F1E2BC) 80%, var(--surface)), inset 0 0 0 5px color-mix(in srgb, var(--gold, #A8761E) 70%, transparent); }
.cu-carne img { width: 92px; height: 92px; border-radius: 50%; flex: none; box-shadow: 0 6px 14px -8px rgb(60 40 10 / .7); }
.cu-carne div { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.cu-carne .cu-et { color: var(--oro-tinta); }
.cu-club { font-family: "Uncial Antiqua", var(--display); font-size: 1.35rem; line-height: 1.15; color: var(--accent); }
.cu-carne strong { font-family: var(--display); font-weight: 400; font-size: 1.5rem; margin-top: 4px; }
.cu-carne span:last-child { color: var(--oro-tinta); }
.cu-camino-c { display: grid; gap: 14px; padding: 20px 22px; border-radius: 16px; border: 1px solid var(--line); background: var(--casilla); }
.cu-sec-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cu-camino-w { position: relative; }
.cu-linea { position: absolute; left: 10%; right: 10%; top: 15px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--gold-soft, var(--line)) 80%, var(--line)); }
.cu-linea span { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 2px; background: var(--accent); max-width: 100%; }
.cu-camino { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: start; }
.cu-camino li { display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--muted); }
.cu-parada { width: 34px; height: 34px; border-radius: 50%; box-sizing: border-box; display: grid; place-items: center; font-size: 0.85rem;
  background: var(--surface); border: 2px solid color-mix(in srgb, var(--gold-soft, var(--line)) 50%, var(--line)); }
.cu-rn { font-size: 0.88rem; line-height: 1.15; overflow-wrap: anywhere; padding: 0 2px; }
.cu-camino li.hecho { color: var(--fg); }
.cu-camino li.hecho .cu-parada { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.cu-camino li.aqui { color: var(--fg); }
.cu-camino li.aqui .cu-parada { background: var(--gold, var(--accent)); border-color: var(--gold, var(--accent)); color: #FBF6EA; box-shadow: 0 0 0 4px var(--gold-soft, var(--line)); }
.cu-camino li.aqui .cu-rn { font-weight: 700; font-size: 0.95rem; }
.cu-falta { margin: 0; }
.cu-casillas { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.cu-ir { all: unset; box-sizing: border-box; cursor: pointer; }
.panel.cuenta-p .cu-ir.bd-casilla { display: grid; gap: 4px; align-content: start; padding: 16px 18px; border-radius: 14px; background: var(--accent); color: var(--accent-fg); border: 1px solid var(--accent); }
.cu-ir:hover { filter: brightness(1.08); }
.panel.cuenta-p .cu-ir.cu-pend.bd-casilla { background: var(--casilla); color: inherit; border-color: var(--line); }
.panel.cuenta-p .cu-pend .l, .panel.cuenta-p .cu-pend .s { color: var(--muted); }
.panel.cuenta-p .cu-pend:hover { border-color: var(--accent); filter: none; }
.cu-ir:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.cu-admin { border-style: dashed; border-color: var(--gold, var(--accent)); background: var(--surface); gap: 8px; }
.cu-admin .l { color: var(--oro-tinta); }
.cu-admin .btn { justify-self: stretch; border-radius: 10px; background: var(--casilla); text-align: left; }
.panel.cuenta-p .d-orn { padding: 0; }
.cu-abajo { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.cu-datos { display: grid; gap: 12px; }
.cu-datos h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--accent); }
.cu-datos .cuenta-nombre label { font-family: var(--body); font-size: 1rem; letter-spacing: 0; text-transform: none; }
.cu-datos .cuenta-nombre input { min-height: 46px; border-radius: 10px; background: var(--surface); font-size: 1.05rem; }
.cu-datos .btn { border-radius: 10px; }
.cu-datos .msg:empty { display: none; }
.panel.cuenta-p .instalar { max-width: none; margin: 0; padding: 18px 20px 18px 74px; border: 1.5px dashed color-mix(in srgb, var(--line) 50%, var(--muted)); border-radius: 14px; background: var(--casilla) no-repeat 20px 18px / 36px 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237A4F2A' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6' y='2.5' width='12' height='19' rx='2.5'/%3E%3Cpath d='M10.5 18.5h3'/%3E%3C/svg%3E"); }
.panel.cuenta-p .instalar strong { font-weight: 500; font-size: 1.1rem; }

@media (max-width: 600px) {
  .overlay:has(.panel.cuenta-p) { padding: 0; }
  .overlay .panel.cuenta-p { border-radius: 0; border: 0; min-height: 100dvh; margin-block: 0; box-shadow: none; }
  .panel.cuenta-p .x-close { top: 12px; right: 12px; }
  .panel.cuenta-p .d-franja { height: 120px; }
  .cu-cab { flex-direction: column; align-items: center; text-align: center; margin-top: -64px; padding: 0 20px; gap: 10px; }
  .cu-puerta { width: 128px; height: 128px; padding: 7px; }
  .cu-quien { flex: none; justify-items: center; padding: 0; }
  .cu-chips { justify-content: center; }
  .cu-chips .muted { flex-basis: 100%; margin: 0; }
  .cu-foto { padding: 0; justify-content: center; }
  .cu-cuerpo { padding: 22px 20px 32px; gap: 18px; }
  .cu-fila.dos { grid-template-columns: minmax(0, 1fr); }
  .cu-carne { padding: 16px; gap: 14px; }
  .cu-carne img { width: 72px; height: 72px; }
  .cu-club { font-size: 1.1rem; }
  .cu-carne strong { font-size: 1.2rem; }
  .cu-camino-c { padding: 16px; }
  .cu-linea { display: none; }
  .cu-camino { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cu-camino li { grid-template-columns: 30px minmax(0, 1fr); justify-items: start; align-items: center; text-align: left; gap: 10px; }
  .cu-parada { width: 30px; height: 30px; font-size: 0.8rem; }
  .cu-rn { font-size: 0.95rem; }
  .cu-casillas { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .cu-admin { grid-column: 1 / -1; }
  .cu-abajo { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .cu-datos .btns { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .panel.cuenta-p .instalar { padding: 14px 16px 14px 62px; background-position: 16px 16px; background-size: 30px 30px; }
}
@media (max-width: 600px) {
  .panel.cuenta-p .d-orn, .panel.bodega-p .d-orn { order: 0; padding: 0; }
}

/* ---------- Usuarios (solo admin): los vecinos de la Comarca ---------- */
.overlay:has(.panel.usuarios-p) { background: rgb(46 36 24 / .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.panel.usuarios-p .ico { width: 18px; height: 18px; }
.us-barra { display: grid; gap: 12px; }
.us-busca { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.us-busca input[type=search] { flex: 1 1 220px; max-width: 440px; min-height: 44px; font: inherit; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--fg); }
.us-lista { display: grid; gap: 10px; }
.us-fila { display: grid; grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1fr); gap: 10px 20px; align-items: center;
  padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--casilla); }
.us-fila:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.us-foto { width: 64px; height: 64px; border-radius: 50%; padding: 4px; box-sizing: border-box; background: var(--nicho-borde);
  box-shadow: 0 0 0 3px var(--surface); }
.us-foto .avatar { width: 100%; height: 100%; font-family: var(--display); font-size: 1.5rem; font-weight: 400; }
.us-quien { display: grid; gap: 2px; min-width: 0; }
.us-nombre { font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.15; overflow-wrap: anywhere; }
.us-nombre .muted { font-family: var(--body); font-style: italic; font-size: 1rem; }
.us-correo { color: var(--muted); font-size: 0.95rem; overflow-wrap: anywhere; }
.us-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.us-chips .cu-chip { font-size: 0.82rem; display: inline-flex; align-items: center; gap: 5px; }
.us-chips .cu-chip.rol.r-lector { background: color-mix(in srgb, var(--line) 70%, var(--surface)); color: var(--fg); }
.us-chips .cu-chip.rol.r-editor { background: color-mix(in srgb, var(--accent) 18%, var(--surface)); color: var(--accent); }
.us-chips .cu-chip.tu { border: 1px dashed var(--muted); color: var(--muted); }
.us-socio-chip img { width: 16px; height: 16px; border-radius: 50%; }
.us-datos { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3px; font-size: 0.95rem; min-width: 0; }
.us-datos > div { display: flex; gap: 2px 6px; flex-wrap: wrap; align-items: baseline; }
.us-datos dt, .us-datos dd { display: inline; padding: 0; border: 0; }
.us-datos dt { color: var(--muted); font-family: var(--body); letter-spacing: 0; text-transform: none; font-size: 0.95rem; }
.us-datos dt::after { content: ":"; }
.us-datos dd { margin: 0; }
.us-acc { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line); }
.us-campo { display: flex; align-items: center; gap: 6px; font-family: var(--body); font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--muted); }
.us-campo select, .us-campo input[type=number] { min-height: 40px; border-radius: 10px; background: var(--surface); font: inherit; color: var(--fg); border: 1px solid var(--line); padding: 6px 10px; }
.us-campo input[type=number] { width: 84px; }
.us-campo label.check { color: var(--fg); display: inline-flex; align-items: center; gap: 6px; }
.us-acc-d { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; justify-content: flex-end; }
.us-mini { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; background: var(--surface); min-height: 40px; padding: 6px 12px; }
.us-mini[disabled] { opacity: .45; cursor: not-allowed; }
.us-mini[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.us-mini.suspender:hover { border-color: var(--gold, var(--danger)); color: var(--oro-tinta); }
.us-mini.readmitir { border-color: var(--accent); color: var(--accent); }
.us-borrar:not([disabled]):hover { border-color: var(--danger); }
.us-borrar[disabled] { opacity: .45; cursor: not-allowed; }
.us-confirma { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 10px; border: 1.5px dashed var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.us-confirma p { margin: 0; flex: 1 1 320px; }
.us-confirma .btns { gap: 8px; }
.btn.danger.fuerte { background: var(--danger); border-color: var(--danger); color: var(--surface); }
.us-vacio { padding: 18px 0; text-align: center; }
.panel.usuarios-p .notice { max-width: none; }
.panel.usuarios-p .msg:empty { display: none; }
@media (max-width: 860px) {
  .us-fila { grid-template-columns: 56px minmax(0, 1fr); }
  .us-foto { width: 56px; height: 56px; }
  .us-datos, .us-acc { grid-column: 1 / -1; }
  .us-datos { padding-left: 76px; }
}
@media (max-width: 600px) {
  .overlay:has(.panel.usuarios-p) { padding: 0; }
  .overlay .panel.usuarios-p { border-radius: 0; border: 0; min-height: 100dvh; margin-block: 0; box-shadow: none; }
  .us-busca { justify-content: stretch; }
  .us-busca input[type=search] { max-width: none; }
  .panel.usuarios-p .bd-tabs button { font-size: 0.85rem; padding: 2px; }
  .panel.usuarios-p .bd-tabs button span { display: block; }
  .us-fila { padding: 12px 14px; }
  .us-datos { padding-left: 0; }
}

/* Panel de usuarios: suspender, notas, reseñas, exportar y aviso de nuevos */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.us-top { position: relative; }
.us-badge { position: absolute; top: -6px; left: 26px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px;
  background: var(--danger); color: #fff; font-size: 0.75rem; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.us-busca-d { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; }
.us-exportar { display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; background: var(--surface); min-height: 44px; }
.panel.usuarios-p .bd-tabs { flex-wrap: wrap; }
.us-fila.nueva { border-color: var(--gold, var(--accent)); box-shadow: inset 4px 0 0 var(--gold, var(--accent)); }
.us-fila.suspendida { background: repeating-linear-gradient(135deg, var(--casilla) 0 14px, color-mix(in srgb, var(--line) 35%, var(--casilla)) 14px 28px); }
.us-fila.suspendida .us-foto { filter: grayscale(1); opacity: .7; }
.us-chips .cu-chip.nuevo { background: var(--gold, var(--accent)); color: #FBF6EA; }
.us-chips .cu-chip.suspendida { background: color-mix(in srgb, var(--danger) 14%, var(--surface)); color: var(--danger); }
.us-chips .cu-chip .ico { width: 13px; height: 13px; }
.us-nota-ver { display: flex; gap: 6px; align-items: flex-start; margin-top: 6px; font-size: 0.92rem; font-style: italic; color: var(--oro-tinta); white-space: pre-line; overflow-wrap: anywhere; }
.us-nota-ver .ico { width: 15px; height: 15px; margin-top: 3px; }
.us-extra { grid-column: 1 / -1; display: grid; gap: 10px; padding: 14px 16px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); }
.us-extra-t { margin: 0; font-family: var(--display); font-size: 1.15rem; color: var(--accent); }
.us-nota label { font-family: var(--body); font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--fg); }
.us-nota textarea { font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--casilla); color: var(--fg); resize: vertical; min-height: 80px; }
.us-nota .btns { gap: 8px; }
.us-res { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.us-res:first-of-type { border-top: 0; padding-top: 0; }
.us-res-c { min-width: 0; display: grid; gap: 4px; }
.us-res-c p { margin: 0; overflow-wrap: anywhere; }
.us-res-h { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; }
.us-res-p { color: var(--gold, var(--accent)); letter-spacing: 1px; }
.us-res-p span { color: var(--line); }
@media (max-width: 860px) { .us-acc-d { margin-left: 0; justify-content: flex-start; } }
@media (max-width: 600px) {
  .us-badge { left: 22px; }
  .panel.usuarios-p .bd-tabs { display: flex; }
  .panel.usuarios-p .bd-tabs button { flex: 1 1 30%; }
  .us-busca-d { width: 100%; justify-content: space-between; }
  .us-res { flex-direction: column; }
}
.us-mini > svg { width: 18px; height: 18px; flex: none; }
.bd-ajena .btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 10px; background: var(--surface); }
.bd-ajena .btn svg { width: 18px; height: 18px; }

/* ---------- Últimas reseñas (portada) ---------- */
.ult { padding-top: 22px; display: grid; gap: 14px; }
.ult[hidden] { display: none; }
.ult-h { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.ult-h h2 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--accent); display: flex; align-items: center; gap: 10px; }
.ult-h h2 svg { width: 24px; height: 24px; color: var(--gold, var(--accent)); flex: none; }
.ult-h .link { font-size: 1rem; }
.ult .est, .resenas-p .est { color: var(--gold, var(--accent)); letter-spacing: 1px; white-space: nowrap; flex: none; }
.ult .est span, .resenas-p .est span { color: var(--line); }
.ult .firma, .resenas-p .firma { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: .95rem; }
.ult .firma b, .resenas-p .firma b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ult .firma .avatar, .resenas-p .firma .avatar { width: 28px; height: 28px; font-size: .85rem; }
.ult .sello-socio, .resenas-p .sello-socio { width: 16px; height: 16px; }
.ult-fila { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.ult-tj { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-rows: auto 1fr auto auto; gap: 10px; min-width: 0;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--casilla, var(--surface)); }
.ult-tj:hover { border-color: var(--accent); }
.ult-tj:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ult-c { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 10px; align-items: center; }
.ult-art { width: 52px; height: 44px; display: grid; place-items: center; }
.ult-art svg, .ult-art .photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.ult-n { display: grid; min-width: 0; }
.ult-n strong { font-family: var(--display); font-weight: 400; font-size: 1.05rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ult-n small { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ult-tj q { font-style: italic; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.ult-tj q::before { content: "«"; } .ult-tj q::after { content: "»"; }
.ult-solo { font-size: .95rem; }
.ult-pie { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.ult-pie .est { font-size: .9rem; }
.ult-cuando { color: var(--muted); font-size: .88rem; }
@media (max-width: 860px) {
  .ult-fila { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; margin-right: -16px; padding-right: 16px; padding-bottom: 4px; }
  .ult-tj { flex: none; width: min(78%, 320px); scroll-snap-align: start; }
}

/* Todas las reseñas */
.overlay:has(.panel.resenas-p) { background: rgb(46 36 24 / .45); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
.resenas-p .bd-baul svg { width: 28px; height: 28px; }
.tr-lista { display: grid; gap: 10px; }
.tr-item { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 16px; align-items: start; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--casilla, var(--surface)); }
.tr-art { all: unset; cursor: pointer; width: 72px; height: 61px; display: grid; place-items: center; }
.tr-art svg, .tr-art .photo { width: 100%; height: 100%; object-fit: contain; display: block; }
.tr-c { display: grid; gap: 6px; min-width: 0; }
.tr-c p { margin: 0; line-height: 1.45; overflow-wrap: anywhere; white-space: pre-line; }
.tr-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.tr-nom { font-family: var(--display); font-size: 1.2rem; text-decoration: none; color: var(--fg); }
.tr-nom:hover { color: var(--accent); text-decoration: underline; }
.tr-pie { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: .95rem; }
.tr-mas { justify-self: center; border-radius: 10px; }
@media (max-width: 600px) {
  .overlay:has(.panel.resenas-p) { padding: 0; }
  .overlay .panel.resenas-p { border-radius: 0; border: 0; min-height: 100dvh; margin-block: 0; box-shadow: none; }
  .tr-item { grid-template-columns: 52px minmax(0, 1fr); gap: 12px; padding: 12px 14px; }
  .tr-art { width: 52px; height: 44px; }
}

/* ---------- Ayuda de Mi bodega ---------- */
.bodega-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; }
.bodega-h .bodega-t { margin: 0; }
.ayuda-btn { flex: none; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--accent);
  font: 600 0.95rem var(--display, inherit); cursor: pointer; display: grid; place-items: center; padding: 0; }
.ayuda-btn:hover, .ayuda-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent); color: var(--accent-fg); }
.ayuda-caja { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--casilla, var(--surface));
  font-size: 0.92rem; line-height: 1.4; display: grid; gap: 6px; }
.ayuda-caja[hidden] { display: none; }
.ayuda-caja ul { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; }
.ayuda-caja p { margin: 0; color: var(--muted); }
.ayuda-caja a { color: var(--accent); }
.tarro-form .tf-ayuda { margin: 10px 0 4px; font-size: 0.85rem; line-height: 1.4; }

.bd-guia { display: grid; gap: 16px; padding: 20px 22px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); border-radius: 14px; background: var(--casilla); }
.bd-gu-pasos { list-style: none; margin: 0; padding: 0; counter-reset: paso; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.bd-gu-pasos li { counter-increment: paso; display: grid; gap: 4px; align-content: start; }
.bd-gu-pasos li::before { content: counter(paso); width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; font-family: var(--mono); font-size: 0.9rem; margin-bottom: 4px; }
.bd-gu-pasos strong { font-weight: 600; }
.bd-gu-pasos span { color: var(--muted); font-size: 0.95rem; line-height: 1.4; }
.bd-guia .btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.bd-guia a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.bd-barra-d { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; }
.bd-como { font-size: 1rem; }
@media (max-width: 760px) { .bd-gu-pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .bd-guia { padding: 16px; } .bd-gu-pasos { grid-template-columns: 1fr; gap: 12px; }
  .bd-gu-pasos li { grid-template-columns: 30px 1fr; column-gap: 10px; } .bd-gu-pasos li::before { grid-row: span 2; margin: 0; } }
.topbar a.cuenta-btn { text-decoration: none; color: var(--fg); }
.ayuda-top .avatar { font-family: var(--display, inherit); font-size: 1.15rem; font-weight: 400; }
.topbar { flex-wrap: wrap; }
@media (max-width: 600px) {
  /* En el móvil, los botones de arriba son solo el círculo con su icono, todos en una fila */
  .topbar { flex-wrap: nowrap; }
  .topbar .cuenta-btn { padding: 4px; min-width: 42px; justify-content: center; position: relative; }
  .topbar .tb-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
a.btn { text-decoration: none; }
