:root {
  --papel: #f3efe6;
  --tarjeta: #fffdf8;
  --tinta: #241c16;
  --suave: #6e6258;
  --linea: #e4d9c8;
  --acento: #b8431f;
  --acento-oscuro: #8d3014;
  --aviso: #efe2c4;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background:
    radial-gradient(circle at top, #fff8ee 0, var(--papel) 42%);
  color: var(--tinta);
  font: 17px/1.45 "Segoe UI", "Helvetica Neue", sans-serif;
}

main {
  width: min(720px, calc(100% - 32px));
  margin: 0 auto 48px;
}

a { color: inherit; }

.barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(720px, calc(100% - 32px));
  margin: 0 auto;
  padding: 18px 0 8px;
}

.marca {
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.volver, .enlace {
  color: var(--acento);
  background: transparent;
  border: 0;
  font: 600 1rem/1 inherit;
  text-decoration: none;
  cursor: pointer;
}

.bajada, .nota, .alergenos, .url {
  color: var(--suave);
}

.bajada { margin-top: 0; }

.categorias {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.categorias a {
  flex: none;
  text-decoration: none;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 8px 14px;
}

.bloque h2, .plato h2, .titulo-admin {
  font-family: Georgia, "Iowan Old Style", serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.platos, .edicion {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.tarjeta {
  display: flex;
  gap: 14px;
  align-items: center;
  min-height: 96px;
  padding: 8px;
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 18px;
  text-decoration: none;
}

.tarjeta img, .poster-solo {
  width: 96px;
  height: 96px;
  object-fit: cover;
  border-radius: 12px;
  background: #efe6d8;
}

.ficha { display: grid; gap: 4px; }

.nombre { font-weight: 650; }

.precio { color: var(--acento-oscuro); font-variant-numeric: tabular-nums; }

.precio.grande { font-size: 1.4rem; margin: 0; }

.agotado {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--aviso);
  color: var(--tinta);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 650;
}

.agotado.grande { margin: 0 0 8px; }

model-viewer {
  width: 100%;
  height: 68vw;
  min-height: 280px;
  max-height: 460px;
  background: radial-gradient(circle at 50% 42%, #fff, #efe6d8 72%);
  border-radius: 22px;
  overflow: hidden;
}

.boton-ar {
  position: absolute;
  z-index: 2;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: var(--acento);
  color: #fffdf8;
  border: 0;
  border-radius: 999px;
  padding: 14px 18px;
  font: 650 1.05rem/1 inherit;
  cursor: pointer;
}

.boton-ar[hidden] {
  display: none;
}

.cabecera-plato h1 {
  margin: 16px 0 4px;
  font-family: Georgia, "Iowan Old Style", serif;
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
}

.chips li {
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 999px;
  padding: 6px 12px;
}

.poster-solo {
  width: 100%;
  height: 280px;
}

.aviso {
  background: var(--aviso);
  border-radius: 12px;
  padding: 10px 12px;
}

.panel, .edicion form, .qr-hoja {
  background: var(--tarjeta);
  border: 1px solid var(--linea);
  border-radius: 18px;
  padding: 16px;
}

.panel, .edicion form {
  display: grid;
  gap: 12px;
}

label { display: grid; gap: 6px; font-weight: 650; }

.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

input[type="password"], input[name="precio"] {
  width: 100%;
  border: 1px solid var(--linea);
  border-radius: 12px;
  padding: 12px;
  font: inherit;
  background: #fff;
}

button[type="submit"] {
  justify-self: start;
  background: var(--acento);
  color: #fffdf8;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: 650 1rem/1 inherit;
  cursor: pointer;
}

.qr-hoja { text-align: center; }

.qr-hoja img {
  width: min(280px, 100%);
  height: auto;
  background: var(--papel);
}

.url { word-break: break-all; }

@media (min-width: 800px) {
  .platos { grid-template-columns: 1fr 1fr; }
}
