@import url("https://fonts.googleapis.com/css2?family=Golos+Text:wght@400;500;600&family=Oswald:wght@400;500;600&display=swap");

:root {
  --soil: #433b32;
  --soil-2: #504638;
  --milk: #fff8e7;
  --dust: #e3dacc;
  --stone: #6a5a4e;
  --red: #7f180d;
  --safe: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--milk); color: var(--soil); }
body {
  font-family: "Golos Text", "Segoe UI", sans-serif;
  min-height: 100vh;
  padding-bottom: calc(92px + var(--safe));
}
button, input, select { font: inherit; }
h1, h2, .display { font-family: Oswald, sans-serif; font-weight: 500; letter-spacing: .02em; }

.app-header {
  background: var(--soil);
  color: var(--milk);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.app-header img.logo { height: 36px; width: auto; display: block; }
.app-header img.logo-line { height: 34px; max-width: 280px; }

.page { display: none; padding: 16px; max-width: 560px; margin: 0 auto; }
.page.active { display: block; }

.hero {
  margin: -16px -16px 16px;
  min-height: 210px;
  background: var(--soil-2) center/cover no-repeat;
  color: var(--milk);
  padding: 28px 16px 20px;
}
.hero h1 { font-size: 28px; line-height: 1.15; margin: 0 0 8px; text-transform: uppercase; }
.hero p { margin: 0 0 16px; color: var(--dust); font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--red);
  color: var(--milk);
  min-height: 44px;
  padding: 0 16px;
  cursor: pointer;
  text-decoration: none;
}
.btn.ghost {
  background: transparent;
  color: var(--milk);
  border: 1px solid var(--dust);
}
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; }

.row { display: flex; gap: 8px; flex-wrap: wrap; }
.list { background: var(--milk); border-top: 1px solid var(--dust); }
.list a, .list button.item {
  display: flex;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--dust);
  padding: 14px 4px;
  color: var(--soil);
  cursor: pointer;
  justify-content: space-between;
}

.kicker { color: var(--stone); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 6px; }
.night {
  background: var(--soil);
  color: var(--milk);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
}
.tabs { display: flex; gap: 6px; margin: 12px 0; }
.tabs button {
  flex: 1;
  border: 1px solid var(--soil);
  background: transparent;
  color: var(--soil);
  min-height: 40px;
  cursor: pointer;
}
.tabs button.on { background: var(--red); border-color: var(--red); color: var(--milk); }

table.price { width: 100%; border-collapse: collapse; font-size: 14px; }
table.price th, table.price td { border: 1px solid var(--dust); padding: 10px 8px; text-align: left; }
table.price tr.peak td { color: var(--red); background: #efe6d8; }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.toolbar select, .toolbar button {
  border: 1px solid var(--dust);
  background: var(--milk);
  color: var(--soil);
  min-height: 36px;
  padding: 0 8px;
}
.days { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; }
.days button {
  border: 0;
  background: transparent;
  color: var(--soil);
  min-width: 52px;
  padding: 8px 6px;
}
.days button.on { color: var(--red); border-bottom: 2px solid var(--red); }

.hours { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.hours button {
  border: 1px solid var(--dust);
  background: var(--milk);
  min-height: 48px;
  font-size: 12px;
  color: var(--soil);
}
.hours button .ht { color: var(--red); font-weight: 600; }
.hours button .hp { color: var(--soil); font-weight: 400; }
.hours button.busy { background: var(--dust); color: var(--stone); }
.hours button.busy .ht { color: var(--stone); font-weight: 400; }
.hours button.sel,
.hours button.cell.sel {
  background: var(--red) !important;
  color: var(--milk) !important;
  border-color: var(--red) !important;
}
.hours button.sel .ht,
.hours button.sel .hp { color: var(--milk) !important; }
.admin-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.admin-grid .ag {
  border: 1px solid var(--dust);
  background: var(--milk);
  min-height: 52px;
  font-size: 11px;
  color: var(--soil);
  padding: 6px 4px;
  text-align: center;
}
.admin-grid .ag.busy { background: var(--soil); color: var(--milk); }
.admin-grid .ag.wait { background: var(--stone); color: var(--milk); }
.admin-grid .ag.now { outline: 2px solid var(--red); }

.sheet {
  margin-top: 14px;
  background: var(--dust);
  padding: 12px;
}
.sheet .sum { font-family: Oswald, sans-serif; font-size: 22px; }
.err { color: var(--red); min-height: 1.2em; font-size: 13px; }
.field { display: block; margin: 8px 0; }
.field input {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--dust);
  background: var(--milk);
  min-height: 40px;
  padding: 0 10px;
}

.card {
  border: 1px solid var(--dust);
  padding: 12px;
  margin: 8px 0;
}
.pill { display: inline-block; background: var(--soil); color: var(--milk); font-size: 11px; padding: 2px 8px; }
.pill.wait { background: var(--stone); }
.pill.off { background: var(--dust); color: var(--stone); }

.tabs-bottom {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--soil);
  color: var(--dust);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 10px 4px calc(12px + var(--safe));
  z-index: 30;
}
.tabs-bottom button {
  background: none;
  border: 0;
  color: var(--dust);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  min-height: 52px;
  cursor: pointer;
  padding: 6px 2px;
}
.tabs-bottom button.on { color: var(--milk); }
.hero-contact { margin-top: 10px !important; }
.hero-contact a { color: var(--milk); text-decoration: underline; }

.howto { white-space: pre-wrap; line-height: 1.45; }
.muted { color: var(--stone); font-size: 13px; }
.stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0; }
.stats div { background: var(--dust); padding: 12px 8px; text-align: center; }
.stats b { display: block; font-family: Oswald, sans-serif; font-size: 20px; }
