/* truke.net — base styles. Mobile first, no framework. */

@font-face {
  font-family: "Noto Sans";
  src: url("/static/fonts/noto-sans-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Noto Sans";
  src: url("/static/fonts/noto-sans-latin-600.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}

/* One weight serves all the headings: no separate file for 800. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/static/fonts/plus-jakarta-sans-latin-700.woff2") format("woff2");
  font-weight: 700 800;
  font-display: swap;
}

:root {
  --primary: #00362d;
  --primary-2: #124e43;
  --primary-3: #1f7767;
  --ink: #2b3036;
  --muted: #6b737c;
  --line: #e2e5e8;
  --rule: #c3c9cf;
  --soft: #fbfcfd;
  --bg: #f2f2f2;
  --card: #f7f7f7;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .05);
  --bar: #5b5b5b;
  --bar-ink: #fff;
  --bar-muted: #b4bac1;
  --accent: #1f7767;
  --accent-ink: #fff;
  --radius: 4px;
  --shadow: 0 1px 4px rgba(0, 0, 0, .18);
  --wrap: 70rem;
  --heading: var(--primary-2);
  --font: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Plus Jakarta Sans", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 400 1rem/1.55 var(--font);
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 { color: var(--heading); font-family: var(--display); font-weight: 700; line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Navbar ------------------------------------------------------------ */

.nav {
  background: var(--primary-2);
  color: var(--bar-ink);
  box-shadow: var(--shadow);
}
.nav-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  column-gap: 1.5rem;
  min-height: 3.5rem;
}
.nav-brand {
  color: var(--bar-ink);
  text-decoration: none;
  font-size: 1.25rem;
  padding: .75rem 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}
.nav-brand span { color: var(--bar-muted); }

/* On narrow screens the links get their own row and scroll sideways. */
.nav-links {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scrollbar-width: none;
  width: 100%;
  padding-bottom: .6rem;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  color: var(--bar-muted);
  text-decoration: none;
  text-transform: uppercase;
  font-size: .8rem;
  letter-spacing: .03em;
  white-space: nowrap;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--bar-ink); }
.nav-links a[aria-current="page"] { border-bottom-color: var(--bar-ink); }

/* Save button: a heart beside the name on phones, after the links on wide screens. */
.nav-fav { order: 1; }
.nav-search { order: 1; }
.nav-links { order: 2; }
.nav-fav form { margin: 0; }
.favbtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -.6rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--bar-muted);
  cursor: pointer;
}
.favbtn .ico { width: 1.4rem; height: 1.4rem; }
.favbtn:hover { color: var(--bar-ink); }
.favbtn:focus-visible { outline: 2px solid var(--bar-ink); outline-offset: -2px; }
.favbtn.is-on { color: #ff8a80; }
.favbtn.is-on .ico { fill: currentColor; }
.nav-search {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-right: -.6rem;
  border-radius: 50%;
  color: var(--bar-ink);
}
.nav-search .ico { width: 1.5rem; height: 1.5rem; }
.nav-search:hover { background: rgba(255, 255, 255, .15); }
.nav-search:focus-visible { outline: 2px solid var(--bar-ink); outline-offset: -2px; }

@media (min-width: 48rem) {
  .nav-links { width: auto; padding-bottom: 0; margin-left: auto; }
  .nav-fav { order: 3; }
  .nav-search { order: 4; }
}

/* Main --------------------------------------------------------------- */

main.wrap { padding-top: 1.5rem; padding-bottom: 3rem; }
.lead { color: var(--muted); font-size: 1.05rem; }

/* Forms and buttons -------------------------------------------------- */

label { display: block; font-size: .9rem; color: var(--muted); margin: 0 0 .25rem; }

input, select, textarea, button { font: inherit; color: inherit; }

input[type="text"], input[type="search"], input[type="email"],
input[type="tel"], input[type="url"], input[type="number"],
input[type="password"], select, textarea {
  width: 100%;
  min-height: 3rem;
  padding: .6rem .75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
input:focus, select:focus, textarea:focus, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.btn {
  display: inline-block;
  min-height: 3rem;
  padding: .6rem 1.5rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--primary-3);
  color: var(--accent-ink);
  text-transform: uppercase;
  font-size: .85rem;
  letter-spacing: .03em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.07); }

/* Search form -------------------------------------------------------- */

.search { display: grid; gap: .75rem; margin: 0 0 1.5rem; }
.search .btn { width: 100%; }
.field { min-width: 0; }
.linkbtn {
  background: none;
  border: 0;
  padding: .4rem 0 0;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
  font-size: .9rem;
}
.check { display: flex; align-items: center; gap: .5rem; color: var(--ink); font-size: 1rem; min-height: 3rem; margin: 0; }
.check input { width: 1.25rem; height: 1.25rem; }

@media (min-width: 48rem) {
  .search { grid-template-columns: 1fr 1fr auto; align-items: start; gap: .5rem; }
  .search .btn { width: auto; margin-top: 1.55rem; }
  .search-full { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .75rem 1rem; }
  .search-full .field { flex: 1 1 13rem; }
  .search-full .field:has(#radio) { flex: 0 0 7.5rem; }
  .search-full .check { margin-top: 1.55rem; }
}

.summary { color: var(--muted); margin: 0 0 .5rem; }
.matches { list-style: none; margin: -.4rem 0 0 7rem; padding: 0 0 .8rem; font-size: .9rem; border-bottom: 1px solid var(--line); }
.matches a { color: var(--ink); }
.list-item:has(.matches) > a { border-bottom: 0; }
.matches li { padding: .1rem 0; }
.credit { margin: .5rem 0 0; font-size: .75rem; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Footer ------------------------------------------------------------- */

.foot {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  padding-bottom: 2rem;
  font-size: .85rem;
  text-align: center;
}
.foot a { color: var(--muted); text-decoration: none; }
.foot a span { color: var(--bar-muted); }

/* Shared bits ------------------------------------------------------- */

.muted { color: var(--muted); }
.auth-alt { margin-top: 1.5rem; text-align: center; }
.prose { white-space: pre-line; }
.crumbs { font-size: .9rem; margin: 0 0 1rem; color: var(--muted); }
.crumbs a { color: var(--muted); }
.notice {
  background: #fff8e6;
  border: 1px solid #f0dfb0;
  border-radius: var(--radius);
  padding: .6rem .9rem;
  margin: 0 0 1.25rem;
}
.empty { max-width: 34rem; margin: 3rem auto; text-align: center; }

.btn-block { display: block; width: 100%; }
.btn-line { background: var(--bg); color: var(--accent); border: 1px solid var(--accent); }
.btn-wa { background: #1f8f4e; }
.btn-sm { min-height: 2.5rem; padding: .45rem 1rem; font-size: .8rem; }

.status { font-weight: 600; color: var(--muted); margin: 0 0 .5rem; }
.status.is-open { color: #1f8f4e; }

/* Home widgets: small blocks pair up on wide screens, as in the mock-up. */

.node-summary { margin: 0 0 1rem; }
.widgets { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; margin-bottom: 1rem; }
@media (min-width: 48rem) {
  .widgets { grid-template-columns: 1fr 1fr; gap: 3rem 3.5rem; }
  .w-full { grid-column: 1 / -1; }
}
.w-title { font-size: 1.15rem; margin: 0 0 .75rem; }
.w > :last-child { margin-bottom: 0; }

.w-h { font-size: 1.6rem; margin: 0 0 1.25rem; }

.ico {
  width: 1.25rem;
  height: 1.25rem;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Text: justified Markdown, no frame. */
.w-text { padding: .75rem 0; }
.w-text .md {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
  /* max-width: 48rem; */
}
.md > :first-child { margin-top: 0; }
.md > :last-child { margin-bottom: 0; }
.md h3, .md h4, .md h5, .md h6 {
  color: var(--heading);
  font-family: var(--display);
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 1.4em 0 .4em;
  text-align: left;
}
.md h3 { font-size: 1.2rem; }
.md blockquote { margin-inline: 0; padding-left: .9rem; border-left: 3px solid var(--line); }
.md pre { overflow-x: auto; }

/* Highlights */
.w-highlights .card-link:hover h3 { color: var(--accent); }

/* Hours and contact: white cards, like the catalogue cards. */
.w-hours, .w-contact {
  padding: 1.25rem;
  border-radius: .9rem;
  background: var(--card);
  box-shadow: var(--card-shadow);
}
@media (min-width: 48rem) { .w-hours, .w-contact { padding: 1.5rem 1.75rem; } }

/* Hours: status pill, then a light table with today marked. */
.w-hours .status {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1rem;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: var(--soft);
  font-size: .9rem;
}
.w-hours .status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: currentColor; }
.w-hours .status.is-open { background: #e5f4ec; color: #1a7a44; }
.w-hours .hours th, .w-hours .hours td { padding: .5rem .75rem; }
.w-hours .hours td { text-align: right; }
.w-hours .hours td .nw { display: block; }
.w-hours .hours .today th, .w-hours .hours .today td { background: var(--soft); }
.w-hours .hours .today th { border-radius: .5rem 0 0 .5rem; }
.w-hours .hours .today td { border-radius: 0 .5rem .5rem 0; }
.w-hours > .muted { margin: .75rem .75rem 0; font-style: italic; }
.tag {
  display: inline-block;
  margin-left: .35rem;
  padding: .05rem .45rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: .1em;
}

/* Contact: address with a pin, then one large row per channel. */
.addr { display: flex; gap: .75rem; align-items: flex-start; margin: 0 0 1.25rem; line-height: 1.5; }
.addr .ico { margin-top: .1rem; color: var(--accent); }
.acts { display: grid; gap: .6rem; }
.act {
  display: flex;
  align-items: center;
  gap: .9rem;
  min-height: 3.6rem;
  padding: .6rem 1rem;
  border-radius: .75rem;
  background: var(--soft);
  color: var(--ink);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.act .ico { width: 1.4rem; height: 1.4rem; color: var(--accent); }
.act span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.act strong { font-weight: 600; }
.act small { font-size: .85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act:hover { filter: brightness(.97); }
.act:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.act-call { background: var(--accent); color: var(--accent-ink); }
.act-wa { background: #1f8f4e; color: #fff; }
.act-call .ico, .act-wa .ico, .act-call small, .act-wa small { color: inherit; }
.act-call small, .act-wa small { opacity: .85; }

/* Slideshow without JavaScript: horizontal scroll with snap points. */
.slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  background: var(--soft);
}
.slides::-webkit-scrollbar { display: none; }
.slides img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: start; }
@media (min-width: 48rem) { .slides { aspect-ratio: 2 / 1; } }

/* Hours */
.hours { border-collapse: collapse; width: 100%; margin: 0 0 .5rem; }
.hours th, .hours td { text-align: left; padding: .3rem 0; vertical-align: top; font-weight: 400; }
.hours th { padding-right: 1rem; white-space: nowrap; }
.hours .today th, .hours .today td { font-weight: 600; }

/* Map: a quiet box until the visitor asks for it. */
.map {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  min-height: 14rem;
  border-radius: .75rem;
  overflow: hidden;
  font-size: .9rem;
  /* A hint of streets until the real map loads. */
  background-color: #eef1ee;
  background-image:
    linear-gradient(28deg, transparent 48%, rgba(255, 255, 255, .95) 48%, rgba(255, 255, 255, .95) 50.5%, transparent 50.5%),
    linear-gradient(90deg, rgba(255, 255, 255, .7) 2px, transparent 2px),
    linear-gradient(rgba(255, 255, 255, .7) 2px, transparent 2px);
  background-size: 100% 100%, 84px 84px, 84px 84px;
  background-position: 0 0, 30px 30px, 30px 30px;
  box-shadow: var(--card-shadow);
}
.map .btn-line { background: var(--bg); }
.map > a { color: var(--ink); background: rgba(255, 255, 255, .8); padding: .1rem .5rem; border-radius: 999px; }
.map-pin { display: flex; color: #c2410c; }
.map-pin .ico { width: 2.5rem; height: 2.5rem; fill: #fff; stroke-width: 1.6; }
.map.map-live { display: block; height: 20rem; padding: 0; background: var(--soft); }

/* Cards (catalogue, highlights) */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 48rem) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
@media (min-width: 64rem) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.card-item {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  overflow: hidden;
  border-radius: .75rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
  transition: box-shadow .2s ease-out;
}
.card-item:hover { box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.card-item h3 { font-size: 1.05rem; margin: .6rem 1rem 0; }
.card-item > .muted { margin: 0 1rem; font-size: .85rem; }
.card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-top: auto;
  padding: .25rem 1rem 1rem;
}
.card-foot .price { font-size: 1.15rem; white-space: nowrap; }
.card-foot .price small { display: block; font-size: .75rem; font-weight: 400; line-height: 1.2; color: var(--muted); }
.card-foot .btn { min-height: 2.25rem; padding: .4rem .75rem; }
.card-link { color: inherit; text-decoration: none; }
.card-link img, .noimg {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: .6rem;
  background: var(--soft);
}
.card-item .card-link img, .card-item .noimg { border-radius: 0; }
.price { font-weight: 600; margin: 0; }
.price-lg { font-size: 1.3rem; margin: 0 0 1rem; }
.is-off img, .is-off h3, .is-off .price { opacity: .55; }
.section { margin: 0 0 2rem; }

/* Product detail */
.detail { display: grid; gap: 1.5rem; }
.detail-img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
@media (min-width: 48rem) { .detail { grid-template-columns: 1fr 1fr; align-items: start; } }

/* Menu: one column on phones, two on wider screens (three is too dense).
   Sections stay whole; the server marks where the second column starts
   (see internal/web/menu.go). */
.carta { max-width: 35rem; margin: 0 auto; }
@media (min-width: 45rem) {
  .carta { max-width: 58.5rem; }
  .menu-cols { column-count: 2; column-gap: 3rem; column-rule: 1px solid var(--line); }
  .menu-cols .col2 { break-before: column; margin-top: 0; }
}
.menu-sec { margin: 1.5rem 0 2.5rem; container-type: inline-size; }
.menu-cols > .menu-sec:first-child { margin-top: 0; }
.menu-sec > h2 { font-size: 1.35rem; margin: 0 0 .75rem; }
.menu { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
/* Name and price on the first row; allergens below on phones, between them on wide screens. */
.dish {
  display: flex;
  gap: .9rem;
  align-items: flex-start;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
  break-inside: avoid;
}
.dish[hidden] { display: none; }
/* Dishes with an allergen the visitor marked: still listed, but crossed out. */
.al-match .dish-img, .al-match h3, .al-match .price, .al-match .dish-body > p { opacity: .45; }
.al-match h3, .al-match .price { text-decoration: line-through; text-decoration-thickness: 1.5px; }
.dish-img {
  flex: none;
  width: 5rem;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: .5rem;
  background: var(--soft);
}
.dish-body {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1rem;
  align-items: baseline;
}
.dish-main { display: contents; }
.dish h3 { grid-row: 1; grid-column: 1; font-size: 1rem; margin: 0; }
.dish .price { grid-row: 1; grid-column: 2; white-space: nowrap; }
.dish-body > p, .dish-body > .allergens { grid-column: 1 / -1; }
.dish p { margin: .2rem 0 0; }
@container (min-width: 30rem) {
  .dish-img { width: 7rem; }
  .dish-body { grid-template-columns: auto minmax(0, 1fr) auto; }
  .dish .price { grid-column: 3; }
  .dish-body > .allergens { grid-row: 1; grid-column: 2; align-self: center; margin: 0; }
}

.allergens { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 0; padding: 0; }
.al {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: .7rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  cursor: help;
}
.al-tap { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.al-tap:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.al[aria-pressed="true"] { background: #fde8d7; border-color: #f3b98a; }
.al-bar[hidden] { display: none; }
.al-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem max(1rem, calc((100% - var(--wrap)) / 2 + 1rem));
  background: var(--bar);
  color: var(--bar-ink);
  box-shadow: var(--shadow);
}
.al-bar p { margin: 0; font-size: .9rem; }
.al-bar .linkbtn { color: var(--bar-ink); white-space: nowrap; padding: 0; }
body.al-on { padding-bottom: 5rem; }
.legend { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.legend h2 { font-size: 1.05rem; }
.legend [data-al-hint] { margin-top: 0; }
.legend-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .5rem 1rem; margin-bottom: 1rem; }
.legend-list li { display: flex; align-items: center; gap: .5rem; font-size: .9rem; }

/* Category chips */

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.5rem; padding: 0; }
.chips a {
  display: inline-block;
  padding: .35rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  font-size: .9rem;
}

/* Listings */
.list { list-style: none; margin: 0; padding: 0; }
.list-item > a {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.list-item img, .list-item .noimg { flex: 0 0 6rem; width: 6rem; aspect-ratio: 4 / 3; height: auto; }
.list-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.list-text .status { margin: 0; font-size: .9rem; }

.nw { white-space: nowrap; }
.noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--bar-muted);
}
.list-item .noimg { font-size: 1.5rem; }

/* Panel ------------------------------------------------------------- */

.narrow { max-width: 34rem; margin: 0 auto; }
.narrow h2 { font-size: 1.15rem; margin-top: 2rem; }
.flash { background: #e8f6ee; border: 1px solid #bfe3cd; color: #1f6b3e; border-radius: var(--radius); padding: .6rem .9rem; margin: 0 0 1rem; }
.field-error { color: #b42318; font-size: .95rem; margin: .25rem 0 .75rem; }
.ok { color: #1f8f4e; }

form label { margin-top: 1rem; }
form > label:first-of-type, fieldset label { margin-top: 0; }
textarea { min-height: 8rem; resize: vertical; }
input[type="time"] { min-height: 3rem; padding: .4rem .5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
input:disabled { opacity: .45; }

fieldset { border: 0; padding: 0; margin: 1.25rem 0 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin: 0 0 .4rem; }
.choices { display: grid; gap: .4rem; }
.choice {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-height: 3rem;
  margin: 0;
  padding: .5rem .8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 1rem;
  cursor: pointer;
}
.choice .muted { margin-left: auto; font-size: .85rem; text-align: right; }
.choice input { width: 1.25rem; height: 1.25rem; flex: none; margin: 0; accent-color: var(--accent); }
.choice:has(input:checked) { border-color: var(--accent); background: #eef8fa; }
.choice.inline { border: 0; padding: 0; min-height: 2.5rem; background: none; }

.progress-text { margin: 0 0 .3rem; color: var(--muted); font-size: .9rem; }
.progress { height: .35rem; background: var(--soft); border-radius: 999px; overflow: hidden; margin: 0 0 1.5rem; }
.progress span { display: block; height: 100%; background: var(--accent); }
.step h1 { font-size: 1.5rem; }
.step-actions { display: grid; gap: .6rem; margin-top: 1.75rem; }
.skip { text-align: center; color: var(--muted); padding: .5rem; }

.prefix { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.prefix span { display: flex; align-items: center; padding: 0 .1rem 0 .75rem; color: var(--muted); background: var(--soft); white-space: nowrap; font-size: .9rem; }
.prefix input { border: 0; border-radius: 0; min-width: 0; }
.slug-status { min-height: 1.5rem; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.slug-status .field-error { margin: 0; }
.chip { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .9rem; cursor: pointer; }

.picker { margin-top: 1rem; }
.picker-map { height: 16rem; border-radius: var(--radius); border: 1px solid var(--line); margin: .5rem 0; }

.day { border-top: 1px solid var(--line); padding-top: .75rem; margin-top: .75rem; }
.day legend { float: left; width: 6.5rem; margin: .7rem 0 0; }
.day .choice.inline { justify-content: flex-end; }
.ranges { clear: both; display: grid; gap: .4rem; }
.range { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.range input { flex: 1; min-width: 0; }

.upload { margin: 1rem 0 0; }
.upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload input:focus-visible + .btn { outline: 2px solid var(--accent); outline-offset: 1px; }
.thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 1rem 0; }
.thumbs img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }

.cards { list-style: none; margin: 0 0 1rem; padding: 0; }
.card-row a { display: flex; flex-direction: column; padding: .8rem 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.logout { margin-top: 2.5rem; }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.badge-ok { background: #e8f6ee; border-color: #bfe3cd; color: #1f6b3e; }
.status-line { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

.ficha { list-style: none; margin: 1.5rem 0; padding: 0; border-top: 1px solid var(--line); }
.ficha a { display: grid; grid-template-columns: 1fr auto; gap: 0 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.ficha-k { font-weight: 600; }
.ficha-v { grid-column: 1; color: var(--ink); overflow-wrap: anywhere; }
.ficha-go { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--muted); font-size: 1.5rem; }

.blocks { list-style: none; margin: 1rem 0; padding: 0; counter-reset: b; }
.block { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; margin-bottom: .6rem; }
.block-head { margin-bottom: .5rem; }
.block-actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.block-actions form { display: contents; }
.block-actions .btn[disabled] { opacity: .35; cursor: default; }
.add-block { margin: 1.5rem 0; display: grid; gap: .5rem; }
.btn-danger { color: #b42318; border-color: #e5a29c; }

.pick-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: 1rem 0; }
.pick { position: relative; margin: 0; cursor: pointer; }
.pick input { position: absolute; top: .5rem; left: .5rem; width: 1.4rem; height: 1.4rem; accent-color: var(--accent); }
.pick img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); border: 3px solid transparent; }
.pick:has(input:checked) img { border-color: var(--accent); }

.gallery { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 1.5rem; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.alt-form { display: grid; gap: .4rem; margin-top: .5rem; }
.alt-form label { margin: 0; }


/* Catalogue and menu in the panel ----------------------------------- */

.quick { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin: 0 0 1.5rem; box-shadow: var(--shadow); }
.quick-top { display: flex; gap: .9rem; align-items: flex-end; }
.quick-fields { flex: 1; min-width: 0; }
.quick-fields label { margin-top: 0; }
.quick-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }

.photo-pick {
  position: relative;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.5rem;
  aspect-ratio: 1;
  margin: 0;
  border: 2px dashed var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  overflow: hidden;
  cursor: pointer;
}
.photo-pick-lg { width: 100%; aspect-ratio: 4 / 3; }
.photo-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-pick-icon { font-size: 1.8rem; }
.photo-pick:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.pills { display: flex; gap: .5rem; margin: 1rem 0 0; }
.pill { display: flex; align-items: center; gap: .4rem; margin: 0; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); cursor: pointer; }
.pill input { accent-color: var(--accent); }
.pill:has(input:checked) { border-color: var(--accent); background: #eef8fa; }

.allergen-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .75rem; }
.allergen-pick legend { grid-column: 1 / -1; }
.al-check { display: flex; align-items: center; gap: .45rem; margin: 0; min-height: 2.6rem; color: var(--ink); font-size: .95rem; cursor: pointer; }
.al-check input { width: 1.2rem; height: 1.2rem; accent-color: var(--accent); flex: none; }
.al-check:has(input:checked) .al { background: #fde8d7; border-color: #f3b98a; }

.offers { list-style: none; margin: 0 0 1.5rem; padding: 0; border-top: 1px solid var(--line); }
.offer { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.offer-main { flex: 1 1 12rem; display: flex; gap: .75rem; align-items: center; color: inherit; text-decoration: none; min-width: 0; }
.offer-main img, .offer-main .noimg { flex: none; width: 3.5rem; height: 3.5rem; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); font-size: 1.2rem; box-shadow: none; }
.offer-text { display: flex; flex-direction: column; min-width: 0; }
.offer-text strong { overflow-wrap: anywhere; }
.offer-actions { display: flex; gap: .3rem; }
.offer-actions .btn { padding: .4rem .7rem; min-height: 2.4rem; }
.btn-line.is-on { background: #fff4d6; border-color: #e7c35a; color: #8a6400; }
.danger-zone { margin-top: 2rem; }

/* Claiming ---------------------------------------------------------- */

.claim-card { display: flex; flex-direction: column; gap: .2rem; padding: 1rem; margin: 0 0 1rem; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.code-input { font-size: 1.4rem; letter-spacing: .15em; text-transform: uppercase; text-align: center; }
.member { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.member form { margin: 0; }

.sheet-brand { font-size: 1.4rem; margin: 0 0 1rem; }
.sheet-brand span { color: var(--muted); }
.sheet-qr { display: grid; gap: 1rem; align-items: center; }
.qr svg { display: block; width: 100%; max-width: 14rem; height: auto; margin: 0 auto; }
.sheet-steps { margin: 0; padding-left: 1.25rem; }
.sheet-steps li { margin-bottom: .4rem; overflow-wrap: anywhere; }
.code-big { font-size: 2.4rem; font-weight: 600; letter-spacing: .12em; text-align: center; margin: 1.5rem 0 .25rem; font-variant-numeric: tabular-nums; }
@media (min-width: 40rem) { .sheet-qr { grid-template-columns: 14rem 1fr; } }

@media print {
  .nav, .foot, .no-print, .flash { display: none !important; }
  body { color: #000; }
  main.wrap { padding: 0; }
  .sheet { max-width: none; }
  .sheet-qr { grid-template-columns: 6cm 1fr; }
  .qr svg { max-width: 6cm; }
}

/* Obligations tool */
.oblig-options { border: 0; padding: 0; margin: 0; display: grid; gap: .6rem; }
.oblig-skip { margin-top: .6rem; }
.oblig-notice { color: var(--muted); font-size: .9rem; border-left: 3px solid var(--accent); padding-left: .75rem; }
.oblig-result { max-width: 42rem; margin-inline: auto; }
.oblig-item { border-top: 1px solid rgba(0,0,0,.12); padding: .75rem 0; }
.oblig-item h3 { margin: 0 0 .25rem; font-size: 1.05rem; }
.oblig-item p { margin: .25rem 0; }
.oblig-src { font-size: .85rem; overflow-wrap: anywhere; }
.oblig-draft { color: #9a5b00; font-size: .75rem; font-weight: 400; text-transform: uppercase; }
.oblig-dates { list-style: none; padding: 0; }
.oblig-dates li { padding: .4rem 0; }
.oblig-dates span { display: block; font-size: .9rem; }
.oblig-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.oblig-answers dd { margin: 0 0 .6rem; }
.oblig-cta { margin-top: 1.5rem; }
@media print {
  .nav, .foot, .noprint { display: none; }
  .oblig-item details[open] > *, .oblig-item details > * { display: block; }
}
