:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --paper: #ffffff;
  --ink: #1c1c1e;
  --muted: #6e737a;
  --line: #e6e8ec;
  --accent: #ff6a00;
  --accent-soft: #fff1e6;
  --warn: #8a4b12;
  --warn-soft: #fff6ea;
  --miss: #d32f2f;
  --shadow: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}

.top, .tabs, main {
  width: min(980px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.top {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  padding: 28px 0 12px;
}

.top-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
}

h1, h2, h3, p { margin: 0; }

h1 { font-size: 40px; letter-spacing: -0.04em; font-weight: 650; }

.eyebrow {
  margin-bottom: 4px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status {
  margin: 0;
  padding: 8px 12px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
}

.status strong { color: var(--ink); font-weight: 650; }

.top-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.top-row > div:first-child { flex: none; }

.brand h1 {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: 0;
  line-height: 0;
}

a.logo {
  display: inline-block;
  line-height: 0;
  margin: 16px 0 20px;
}

a.logo img {
  display: block;
  height: 72px;
  width: auto;
  max-width: min(640px, 78vw);
  object-fit: contain;
  mix-blend-mode: multiply;
}

.ucet-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.ucet {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

button.ucet-osoba {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: grid;
  place-items: center;
}

button.ucet-osoba svg {
  width: 20px;
  height: 20px;
  display: block;
}

.ucet-jmeno {
  font-weight: 650;
}

.ucet-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 6;
  min-width: 180px;
  padding: 6px;
  display: grid;
  gap: 2px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(26, 28, 30, 0.12);
}

.ucet-menu[hidden] { display: none; }

.ucet-menu button {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  text-align: left;
  background: transparent;
}

.ucet-menu button:hover { background: var(--bg); }

.hlasky {
  display: grid;
  gap: 8px;
  width: 100%;
}

.hlasky:empty { display: none; }

.hlaska {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 14px;
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 12px;
}

.hlaska p { flex: 1; min-width: 0; }

button.hlaska-close {
  position: static;
  flex: none;
}

.gate {
  position: relative;
  width: min(440px, calc(100% - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: auto;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.gate-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid var(--miss);
  border-radius: 50%;
  background: #fff;
  color: var(--miss);
  display: grid;
  place-items: center;
  line-height: 0;
}

.gate-close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.gate::backdrop { background: rgba(28, 28, 28, 0.35); }

.gate h1 { margin-bottom: 8px; }

.gate form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.gate form[hidden] { display: none !important; }

.offer-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

button.offer {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  text-align: left;
}

button.offer img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

button.offer strong { display: block; }

button.offer span { color: var(--muted); font-size: 14px; }

button.offer[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

button.text-btn {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 650;
}

.price-box { display: contents; }

.price-toggle {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  margin: 0;
  padding: 2px 0 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.price-toggle .gicon {
  width: 22px;
  height: 22px;
  font-size: 22px;
  flex-basis: 22px;
}

.price-sheet {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  justify-items: start;
  overflow-x: auto;
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.price-table th,
.price-table td {
  padding: 8px 16px 8px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.price-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.price-table .num {
  text-align: right;
  white-space: nowrap;
  padding-right: 0;
}

.price-table tfoot td { font-weight: 700; }

.price-table tr.meal-cost td { border-bottom: 0; }

.gate form button[type="submit"] {
  width: 100%;
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.gate-link {
  justify-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-weight: 600;
}

.turnstile-wrap { min-height: 65px; }

.gate label { display: grid; gap: 4px; }

.gate label:has(input[type="checkbox"]),
.gate label:has(input[type="radio"]) {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="checkbox"] {
  appearance: none;
  width: 32px;
  height: 32px;
  margin: 0;
  flex: 0 0 32px;
  border: 2px solid #c5cbc0;
  border-radius: 8px;
  background: #fff center / 18px 18px no-repeat;
  cursor: pointer;
  vertical-align: middle;
}

input[type="checkbox"]:checked {
  border-color: #74d38a;
  background-color: #74d38a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.2 6.4 11.1 12.5 4.8' fill='none' stroke='white' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gate input[type="email"],
.gate input[type="password"],
.gate input[type="number"],
.gate select {
  font: inherit;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

#form-start {
  gap: 22px;
}

#form-start fieldset {
  display: grid;
  gap: 14px;
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}

#form-start legend {
  font-weight: 650;
  display: block;
  margin: 0 0 12px;
  padding: 2px 0 0;
}

#form-start label {
  margin: 0;
  min-width: 0;
  gap: 8px;
}

#form-start input[type="number"],
#form-start select {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

#form-start label:has(input[type="checkbox"]),
#form-start label:has(input[name="kitchen"]) {
  gap: 14px;
  min-height: 44px;
}

#form-start input[name="kitchen"] {
  appearance: none;
  width: 40px;
  height: 40px;
  min-width: 40px;
  max-width: 40px;
  min-height: 40px;
  max-height: 40px;
  margin: 0;
  padding: 0;
  flex: 0 0 40px;
  align-self: center;
  border: 2px solid #c5cbc0;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

#form-start input[name="kitchen"]:checked {
  border-color: var(--accent);
  background: radial-gradient(circle, var(--accent) 0 7px, white 8px);
}

.goals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#form-start label.goal {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  min-height: 96px;
  margin: 0;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
  cursor: pointer;
}

#form-start label.goal input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
}

#form-start label.goal svg {
  width: 36px;
  height: 36px;
  color: var(--muted);
}

#form-start label.goal:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
}

#form-start label.goal:has(input:checked) svg {
  color: var(--accent);
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 8px 0 18px;
}

.tabs button, button, .chip {
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.tabs button[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}

.banner {
  padding: 14px 16px;
  margin-bottom: 16px;
  background: var(--warn-soft);
  color: var(--warn);
  border-radius: 12px;
}

.banner.ok {
  background: var(--accent-soft);
  color: var(--ink);
}

.warnings {
  margin: 0 0 16px;
  padding: 14px 16px 14px 32px;
  display: grid;
  gap: 8px;
}

.stat-pies {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 16px;
}

.nutrient-pies { grid-template-columns: repeat(4, 1fr); }

.stat-pie {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 14px 8px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.stat-name { font-weight: 650; }

.stat-pie .pie-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 6px 0;
}

.stat-pie .pie-wrap svg { width: 100%; height: 100%; margin: 0; }

.pie-percent {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-pie strong {
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
}

.hero, .card, .day, .group, .settings {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.hero {
  padding: 22px 22px 18px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  align-items: start;
}

.hero .when {
  font-size: 56px;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  line-height: 0.95;
}

.hero .name { font-size: 22px; margin-top: 8px; }

.meta, .muted { color: var(--muted); }

.side-stat {
  min-width: 0;
  padding: 12px 14px;
  background: #f0f1f4;
  border-radius: 12px;
}

.side-stat strong {
  display: block;
  font-size: 28px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.section-title { margin: 18px 0 6px; font-size: 22px; }

.ask-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

button.ask {
  width: 100%;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  padding: 22px 16px;
  border: 0;
  border-radius: 16px;
  background: white;
  white-space: normal;
  box-shadow: none;
}

button.ask:hover,
button.ask:focus-visible {
  border: 0;
  background: var(--accent-soft);
}

.name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.name-line h2,
.name-line h3,
.name-line strong { margin: 0; }

.prep {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.prep-michane {
  background: #e5f6ea;
  color: #1d6b3a;
}

.prep-varene {
  background: var(--accent-soft);
  color: var(--warn);
}

button.offer .name-line strong { display: inline; }

button.offer .prep { font-size: 12px; }

.db-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.db-filter button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.db-filter button[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}

.db-count { margin: 0 0 14px; }

.db-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.db-pager button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
}

.db-pager button[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}

.db-pager button:disabled {
  opacity: 0.4;
}

.db-list { padding: 6px 16px; }

.db-meal {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 18px;
  align-items: start;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.db-meal:first-child { border-top: 0; }

.db-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.db-meal h3 { margin: 0; font-size: 20px; }

.db-meal .prep { flex: 0 0 auto; }

.db-facts {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.db-facts li {
  position: relative;
  padding-left: 16px;
  line-height: 1.5;
}

.db-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.db-score { margin: 8px 0 0; }

.db-photo,
.db-meal .dish {
  width: 320px;
  height: 240px;
  border-radius: 14px;
}

.cues {
  display: grid;
  gap: 8px;
  margin: 16px 0;
}

.trainer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 8px 0 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--accent-soft);
}

.trainer strong {
  display: block;
  margin-bottom: 4px;
}

.trainer p {
  margin: 0;
  color: var(--ink);
}

button.cue {
  display: flex;
  width: 100%;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  cursor: pointer;
}

.mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
}

.mark.open { background: var(--miss); }
.mark.done { background: #74d38a; }

.mark svg {
  width: 16px;
  height: 16px;
  display: block;
}

button.zoom {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
  display: block;
  line-height: 0;
}

.zoom img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

.hero-photo {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  border-radius: 14px;
  justify-self: stretch;
}

.hero-photo img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.dish {
  width: 240px;
  height: 180px;
  border-radius: 12px;
}

.dish-sm {
  width: 88px;
  height: 66px;
  border-radius: 8px;
  align-self: center;
}

.lightbox {
  position: relative;
  border: 0;
  padding: 0;
  background: transparent;
  width: min(880px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
}

.lightbox::backdrop {
  background: rgba(28, 25, 22, 0.78);
}

.lightbox img {
  width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  border-radius: 16px;
  background: #1c1916;
}

.lightbox p {
  margin: 12px 0 0;
  color: #fbf8f3;
  text-align: center;
  font-size: 18px;
}

.lightbox form { margin: 0; }

.lightbox .gate-close {
  z-index: 1;
}

.meal {
  position: relative;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.meal:first-child { border-top: 0; }

.meal time {
  font-variant-numeric: tabular-nums;
  font-size: 18px;
  font-weight: 650;
}

.meal.past .ahead-top,
.meal.past .meal-photo,
.meal.past .ahead-facts { opacity: 0.48; }

.meal-photo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.meal-photo > .zoom { flex: 0 0 auto; }

.meal.next {
  background: var(--accent-soft);
  border-top: 0;
  border-radius: 12px;
}

.card { overflow: hidden; }

.card > .meal.next {
  margin-left: -16px;
  margin-right: -16px;
  padding-left: 16px;
  padding-right: 16px;
  border-radius: 0;
}

.card > .meal.next:first-child {
  margin-top: -6px;
}

.day-meals > .meal.next {
  margin-left: -18px;
  margin-right: -18px;
  padding-left: 18px;
  padding-right: 18px;
  border-radius: 0;
}

.meal h3 { font-size: 18px; }

.how { margin-top: 6px; }

.items {
  margin: 8px 0 0;
  padding: 0 0 0 1.15em;
  list-style: disc;
  color: var(--muted);
}

.items li + li { margin-top: 4px; }

.kcal {
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.eaten-form, .eaten {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.upload-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.meal:has(.meal-mark) .ahead-top { padding-right: 48px; }

.plate-extra { grid-column: 2; }

.meal-mark {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  cursor: pointer;
}

.meal-mark.ok {
  cursor: default;
  background: #74d38a;
}

.meal-mark.miss {
  background: #fff;
  color: var(--miss);
  border: 2px solid var(--miss);
}

.meal-mark.miss svg {
  width: 18px;
  height: 18px;
}

.meal-mark.busy { opacity: 0.55; }

.upload-input:focus-visible + .meal-mark {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.card .meal-mark,
.day .meal-mark { right: 16px; }

.meal-mark svg {
  width: 26px;
  height: 26px;
  display: block;
}

.eaten-form .note { flex-basis: 100%; }

.shot, .history-card img {
  width: min(100%, 280px);
  border-radius: 12px;
  display: block;
}

.meal.wants-photo { outline: 2px solid var(--accent); outline-offset: 4px; }

.history-list { display: grid; gap: 12px; }

.history-card { padding: 16px; }

.history-card h2 { font-size: 20px; margin-bottom: 4px; }

.meter {
  height: 8px;
  background: #d5d8de;
  border-radius: 99px;
  margin-top: 14px;
  overflow: hidden;
}

.meter span {
  display: block;
  height: 100%;
  background: #74d38a;
}

.days { display: grid; gap: 24px; }

.gicon {
  font-size: 20px;
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 20px;
  line-height: 1;
  color: var(--muted);
  user-select: none;
}

.kind-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.day {
  position: relative;
  padding: 10px 18px 16px;
}

.day header {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
  padding: 12px 56px 12px 0;
  cursor: pointer;
}

.day-toggle {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 2px solid var(--miss);
  border-radius: 50%;
  background: #fff;
  color: var(--miss);
}

.day-toggle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.ahead { margin: 8px 0 22px; }

.meal.plate,
.ahead .compact li.ahead-meal {
  display: grid;
  grid-template-columns: 450px 1fr;
  gap: 8px 18px;
  align-items: start;
  padding: 14px 0;
}

.meal.lunch {
  background: var(--accent-soft);
  border-radius: 10px;
  padding-left: 8px;
  padding-right: 8px;
}

.ahead-top {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.ahead-top time,
.ahead-top .slot-name {
  line-height: 28px;
}

.ahead-top time { font-weight: 700; font-variant-numeric: tabular-nums; }

.ahead .slot-name { font-weight: 650; }

.plate .rate {
  margin: 0;
  padding: 0;
  align-self: center;
  flex-direction: row;
  align-items: center;
}

.plate button.star {
  width: 22px;
  height: 28px;
}

.plate .dish {
  width: 450px;
  height: 315px;
}

.ahead-facts {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.ahead-facts li {
  position: relative;
  padding-left: 16px;
  line-height: 1.55;
}

.ahead-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
}

.ahead-day header { padding-right: 0; }

.compact { list-style: none; margin: 0; padding: 0 0 8px; }

.compact li.lunch {
  background: var(--accent-soft);
  border-radius: 10px;
  padding-left: 8px;
  padding-right: 8px;
}

.who { color: var(--muted); font-weight: 650; }

.who.mine { color: var(--accent); }

.compact li {
  display: grid;
  grid-template-columns: 64px auto 110px 1fr;
  gap: 8px;
  align-items: start;
  padding: 6px 0;
  border-top: 1px solid var(--line);
}

.ahead .ahead-facts li {
  display: block;
  border: 0;
  padding: 2px 0 2px 16px;
}

.shop-views {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.shop-views button {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.shop-views button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.shop-count { margin: 0 0 8px; }

.shop-bulk {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  margin: 0 0 16px;
}

.shop-bulk button.text-btn { margin-top: 0; }

.shop-sheet { overflow-x: auto; }

.shop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.shop-table th,
.shop-table td {
  padding: 10px 14px 10px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.shop-table th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.shop-table .shop-mark {
  width: 44px;
  padding-right: 8px;
  vertical-align: middle;
}

.shop-table .num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.shop-where {
  display: block;
  margin-top: 2px;
  font-size: 13px;
}

.shop-table tr.done td { color: var(--muted); }

.shop-table tr.done s { color: var(--muted); }

.shop-table .store-link { margin: 0; white-space: nowrap; }

.shop-table tr.shop-offer td { border-bottom: 0; padding-top: 0; }

.group { padding: 8px 16px 16px; margin-bottom: 12px; }

.group h2 { padding-top: 12px; font-size: 18px; }

.check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
}

#potraviny .check {
  align-items: flex-start;
}

.food-label { display: grid; gap: 4px; }

.food-nuts {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.choice {
  display: grid;
  gap: 12px;
  margin: 8px 0 16px;
}

.choice label,
.day-pick h3 {
  margin: 0;
}

.choice label {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}

.day-pick h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 8px 0 16px;
}

.shop-item { border-top: 1px solid var(--line); padding: 14px 0; }

.shop-item .check { border-top: 0; padding: 0; }

.shop-item .check strong,
.shop-item .check s {
  font-size: 22px;
  line-height: 1.25;
}

.shop-item .buy,
.shop-item .muted {
  font-size: 17px;
}

.buy { display: block; margin-top: 2px; }

.store-link {
  display: inline-block;
  margin: 6px 0 0 52px;
  color: var(--accent);
  font-weight: 650;
}

.check s { color: var(--muted); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 16px; }

.kosik-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px 6px;
  margin-bottom: 16px;
}

.kosik-panel h2 { font-size: 18px; padding-bottom: 6px; }

.kosik-panel .actions { margin-top: 12px; }

.kosik-insert { justify-content: flex-start; margin: 4px 0 12px; }

.kosik-row {
  display: grid;
  grid-template-columns: 32px 52px 1fr;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px 30px;
  padding: 8px 10px;
  background: white;
  border-radius: 12px;
}

.kosik-row img, .kosik-photo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  background: white;
}

.kosik-table a { color: var(--accent); font-weight: 650; }

.kosik-table .shop-photo { width: 48px; padding-right: 8px; }

.kosik-table img,
.kosik-table .kosik-photo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  background: white;
}

.kosik-table .shop-cat th {
  padding-top: 18px;
  color: var(--ink);
  font-size: 16px;
  border-bottom: 0;
}

.kosik-table tfoot td { font-weight: 700; border-bottom: 0; }

.kosik-row p { font-size: 14px; }

.kosik-miss { margin: 0 0 10px 30px; font-size: 14px; }

.actions button, .primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

button.save,
.gate form button.save {
  width: fit-content;
  justify-self: center;
  margin-left: auto;
  margin-right: auto;
  background: #74d38a;
  color: var(--ink);
  border-color: #74d38a;
  font-weight: 700;
}

button:disabled:not(.star),
.actions button:disabled,
.gate form button[type="submit"]:disabled,
button.save:disabled {
  background: #d5d8de;
  color: var(--muted);
  border-color: #d5d8de;
  opacity: 1;
  cursor: not-allowed;
}

.rate {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  align-self: stretch;
  flex: 0 0 auto;
  margin-top: auto;
  margin-bottom: auto;
  padding-top: 16px;
}

.compact .rate { padding-bottom: 10px; }

.plate .rate { padding: 0; }

.rate-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.rate-line button.text-btn {
  margin: 0;
  font-size: 15px;
  white-space: nowrap;
}

.rate-stat {
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rate-stat:empty { display: none; }

.rate-note:empty { display: none; }

.stars {
  display: inline-flex;
  gap: 0;
  padding: 0;
  background: transparent;
}

button.star {
  width: 22px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c5cbc0;
  display: grid;
  place-items: center;
  overflow: visible;
}

button.star svg { width: 28px; height: 28px; }

.rate[data-level="1"] button.star.on { color: #c4483a; }
.rate[data-level="2"] button.star.on { color: #d4782a; }
.rate[data-level="3"] button.star.on { color: #c89612; }
.rate[data-level="4"] button.star.on { color: #7ea024; }
.rate[data-level="5"] button.star.on { color: #4c8f22; }

.rate-note { color: var(--miss); font-size: 13px; }

.settings { padding: 18px; display: grid; gap: 8px; }

.set-block {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.set-block + .set-block {
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.set-block h2 {
  margin: 8px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.range-field { display: grid; gap: 8px; }

.range-title { font-size: 14px; color: var(--muted); }

.range {
  --range-inset: 28px;
  position: relative;
  padding: 42px 16px 28px;
  background: #eef0f3;
  border-radius: 16px;
  user-select: none;
  touch-action: none;
}

.range-track {
  position: relative;
  height: 26px;
  border-radius: 999px;
  background: #d7f4f2;
  cursor: pointer;
}

.range-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8ee0a8, #5fd0c4);
}

.range-scale {
  position: absolute;
  left: var(--range-inset);
  right: var(--range-inset);
  top: 0;
  bottom: 0;
  pointer-events: none;
}

.range-dots { position: absolute; inset: 0; }

.range-dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.range-handle {
  position: absolute;
  top: 50%;
  z-index: 1;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 4px 10px rgba(255, 106, 0, 0.28);
  cursor: grab;
  pointer-events: auto;
}

.range-bubble {
  position: absolute;
  top: -36px;
  transform: translateX(-50%);
  padding: 4px 10px;
  border-radius: 999px;
  background: #1f6b45;
  color: white;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}

.range-bubble.edge-start { transform: translateX(0); }
.range-bubble.edge-end { transform: translateX(-100%); }

.range-labels {
  position: relative;
  height: 18px;
  margin: 10px var(--range-inset) 0;
}

.range-label {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: #1d6b3a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.range-label.edge-start { transform: translateX(0); }
.range-label.edge-end { transform: translateX(-100%); }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }

label { display: grid; gap: 6px; font-size: 14px; color: var(--muted); }

input, select {
  font: inherit;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}

.note { font-size: 14px; }

.foot {
  width: min(980px, calc(100% - 32px));
  margin: 28px auto 40px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.foot strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

.foot p { margin: 0; }

@media (max-width: 720px) {
  :root {
    --shadow: 0 10px 28px rgba(26, 28, 30, 0.08);
  }

  body { padding-bottom: 148px; }

  .top, .tabs, main, .foot { width: min(980px, calc(100% - 28px)); }

  .top {
    padding-top: 18px;
    gap: 10px;
  }

  .top-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: start;
    gap: 10px;
  }

  .top-side { margin-left: auto; width: auto; }

  .eyebrow { letter-spacing: 0.04em; }

  h1 { font-size: 32px; letter-spacing: -0.045em; }

  a.logo { margin: 12px 0 16px; }
  a.logo img { height: 52px; }

  .status {
    justify-self: start;
    max-width: 100%;
    border: 0;
    box-shadow: var(--shadow);
  }

  .stat-pies { gap: 8px; }

  .nutrient-pies { grid-template-columns: repeat(2, 1fr); }

  .stat-pie { padding: 10px 4px 12px; }

  .stat-pie .pie-wrap { width: 72px; height: 72px; }

  .pie-percent { font-size: 13px; }

  .stat-pie strong { font-size: 22px; }

  .tabs {
    position: fixed;
    z-index: 20;
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
    margin: 0;
    padding: 6px;
    gap: 2px 4px;
    flex-wrap: wrap;
    justify-content: center;
    overflow: visible;
    background: white;
    border-radius: 22px;
    box-shadow: 0 12px 32px rgba(26, 28, 30, 0.16);
  }

  .tabs button {
    flex: 1 1 30%;
    max-width: calc(33.33% - 4px);
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 650;
  }

  .hero, .day header, .grid { display: grid; grid-template-columns: 1fr; }

  .hero {
    padding: 14px;
    gap: 12px;
    border: 0;
    border-radius: 28px;
    box-shadow: var(--shadow);
  }

  .hero .when { font-size: 36px; color: var(--accent); }

  .hero .name { font-size: 22px; letter-spacing: -0.03em; }

  .side-stat { min-width: 0; }

  .hero-photo { width: 100%; height: auto; border-radius: 20px; }

  .dish { width: 100%; height: 210px; border-radius: 20px; }

  .section-title { font-size: 22px; letter-spacing: -0.03em; }

  button.ask { font-size: 16px; padding: 18px 10px; }

  .db-meal { grid-template-columns: 1fr; }

  .db-photo,
  .db-meal .dish {
    width: 100%;
    height: 220px;
  }

  .card {
    padding: 0 !important;
    background: transparent;
    border: 0;
  }

  .meal,
  .meal.plate {
    grid-template-columns: 1fr;
    margin: 0 0 14px;
    padding: 14px;
    background: white;
    border: 0;
    border-radius: 28px;
    box-shadow: var(--shadow);
  }

  .meal.plate > .meal-photo,
  .meal.plate > .ahead-facts,
  .meal.plate > .plate-extra,
  .price-toggle,
  .price-sheet {
    grid-column: 1 / -1;
  }

  .meal.plate .meal-photo {
    align-items: stretch;
    width: 100%;
  }

  .meal.plate .dish,
  .ahead .dish {
    width: 100%;
    height: auto;
    aspect-ratio: 10 / 7;
    object-fit: cover;
  }

  .meal .ahead-top time {
    font-size: inherit;
    color: inherit;
    background: none;
    padding: 0;
  }

  .meal > div:not(.meal-photo) { padding-right: 0; }

  .meal.next { background: var(--accent-soft); }

  .card > .meal.next,
  .day-meals > .meal.next {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
    padding-left: 14px;
    padding-right: 14px;
    border-radius: 28px;
  }

  .card .meal-mark,
  .day .meal-mark { top: 22px; right: 22px; }

  .day {
    background: transparent;
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  .days { gap: 8px; }

  .day header {
    margin-bottom: 0;
    padding: 8px 52px 8px 14px;
    background: white;
    border-radius: 4px;
    box-shadow: var(--shadow);
  }

  .day header[aria-expanded="true"] {
    margin-bottom: 8px;
    position: relative;
  }

  .day-toggle {
    top: 50%;
    right: 8px;
    width: 36px;
    height: 36px;
    transform: translateY(-50%);
  }

  .day-toggle svg { width: 18px; height: 18px; }

  .compact li { grid-template-columns: 56px 1fr; }

  .ahead .compact li.ahead-meal,
  .meal.plate { grid-template-columns: 1fr; }

  .ahead .compact .meal-photo { grid-column: auto; }

  .compact .slot-name { display: none; }

  .ahead .compact .slot-name { display: inline; }

  .compact .meal-name {
    grid-column: 1 / -1;
    white-space: normal;
    font-size: 14px;
  }

  .shop-sheet { max-width: 100%; }

  .shop-table:not(.kosik-table):not(.admin-table) thead { display: none; }

  .shop-table:not(.kosik-table):not(.admin-table) tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    column-gap: 8px;
    align-items: start;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .shop-table:not(.kosik-table):not(.admin-table) td {
    border: 0;
    padding: 0;
    min-width: 0;
  }

  .shop-table:not(.kosik-table):not(.admin-table) td:nth-child(1) { grid-row: 1 / span 3; }

  .shop-table:not(.kosik-table):not(.admin-table) td:nth-child(2),
  .shop-table:not(.kosik-table):not(.admin-table) td:nth-child(3) { grid-column: 2 / -1; }

  .shop-table:not(.kosik-table):not(.admin-table) td:nth-child(4) { grid-column: 2; }

  .shop-table:not(.kosik-table):not(.admin-table) td:nth-child(5) { grid-column: 3; align-self: end; }

  .kosik-table { min-width: 640px; }

  .admin-table { min-width: 640px; }

  .group, .settings, .kosik-panel {
    border: 0;
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .kosik-row { margin-left: 0; }
}

@media print {
  .top, .tabs, .no-print, #dnes, #tyden, #oblibene, #historie, #nastaveni, .foot { display: none !important; }
  #nakup { display: block !important; }
  body { background: white; }
  .group { break-inside: avoid; }
}
