:root {
  --bg: #f5efe4;
  --card: #fcf6ea;
  --card-alt: #f1efe0;
  --line: #e8dcc6;
  --ink: #241f18;
  --muted: #8a8172;
  --accent: #a2572f;
  --accent-soft: #f0e2d2;
  --dinner: #55672f;
  --danger: #a8362a;
  --serif: 'Newsreader', Georgia, serif;
  --ui: 'Space Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

body[data-role='husband'] {
  --bg: #14161a;
  --card: #1b1e24;
  --card-alt: #23272f;
  --line: #2b303a;
  --ink: #e9e6df;
  --muted: #6f7885;
  --accent: #d9a441;
  --accent-soft: #2b303a;
  --dinner: #c88257;
  --danger: #b4674a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ui);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 430px;
  margin: 0 auto;
  padding: 24px 16px 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.05;
}

body[data-role='husband'] h1 {
  font-family: var(--ui);
  font-size: 26px;
  font-weight: 500;
}

h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

.head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card.alt {
  background: var(--card-alt);
}

.dish {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.15;
}

body[data-role='husband'] .dish {
  font-family: var(--ui);
  font-size: 17px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.row.product {
  align-items: center;
}

.grow {
  flex: 1;
  min-width: 0;
}

/* белый фон снимков канала садится на бумагу её половины только через multiply */
.thumb {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  background: var(--card-alt);
  overflow: hidden;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
}

body[data-role='husband'] .thumb img {
  mix-blend-mode: normal;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

/* ответ и «что умею» приходят строками: переносы в них несут смысл списка */
.answer {
  white-space: pre-wrap;
  line-height: 1.45;
}

.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

button {
  font-family: var(--ui);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 11px 14px;
  cursor: pointer;
}

button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff8ef;
}

button.ghost {
  background: transparent;
}

button:disabled {
  opacity: 0.45;
  cursor: default;
}

.buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.buttons button {
  flex: 1 1 42%;
}

.week {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.week-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.week-day {
  width: 34px;
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-top: 8px;
}

.week-row .eyebrow {
  flex: 1;
}

.week-slot {
  flex: 1;
  min-height: 74px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 9px;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.week-slot.dinner {
  background: var(--card-alt);
}

.week-slot .dish {
  font-size: 14.5px;
}

.past {
  opacity: 0.45;
}

.tag {
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--dinner);
}

.tag.warn {
  color: var(--danger);
}

.bar {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  background: var(--accent);
}

.total {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 3px 0;
}

.total.sum {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 8px;
  font-weight: 700;
  font-size: 15px;
}

.notice {
  border-left: 2px solid var(--accent);
  padding-left: 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}

.error {
  border-left-color: var(--danger);
  color: var(--danger);
}

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}

input,
select {
  font-family: var(--ui);
  font-size: 15px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px 14px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}

nav[hidden] {
  display: none;
}

nav button {
  flex: 1 1 0;
  max-width: 140px;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 10px 6px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

nav button.on {
  color: var(--accent);
  border-color: var(--line);
  background: var(--card);
}

.login {
  margin-top: 18vh;
}
