/* Blendwright — Mortar-and-Pestle Bench theme */

:root {
  --paper: #f4e7ce;
  --paper-deep: #eddcba;
  --cumin: #8c5a2b;
  --cumin-soft: #a5713d;
  --paprika: #c84b31;
  --paprika-deep: #a63b25;
  --herb: #5f7a4a;
  --ink: #3d2c1c;
  --ink-faint: #7a6650;
  --card: #fbf3e1;
  --edge: #d9c49a;
  --radius: 14px;
  --tabbar-h: 62px;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { height: 100%; }

body {
  min-height: 100%;
  background: var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 480px;
  margin: 0 auto;
  padding: 14px 14px calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 26px);
}

/* ---------- headings ---------- */
.tab-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin: 6px 2px 2px;
}
.tab-sub {
  font-size: 13px;
  color: var(--ink-faint);
  margin: 0 2px 14px;
}

/* ---------- seed dots ---------- */
.seed {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid var(--cumin);
  vertical-align: middle;
  flex: none;
}
.seed.filled { background: var(--cumin); }
.seed.paprika { border-color: var(--paprika); }
.seed.paprika.filled { background: var(--paprika); }
.seed.herb { border-color: var(--herb); }
.seed.herb.filled { background: var(--herb); }

/* ---------- mortar-bowl focus card (Bench) ---------- */
.mortar-card {
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--radius);
  padding: 18px 16px 16px;
  margin-bottom: 14px;
  text-align: center;
}
.mortar-bowl {
  width: 108px;
  height: 54px;
  margin: 2px auto 14px;
  position: relative;
}
.mortar-bowl .bowl-body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 50px;
  background: var(--cumin);
  border-radius: 8px 8px 54px 54px / 8px 8px 50px 50px;
}
.mortar-bowl .bowl-rim {
  position: absolute;
  left: -6px; right: -6px; top: 0;
  height: 16px;
  background: var(--cumin-soft);
  border-radius: 50%;
}
.mortar-bowl .pestle {
  position: absolute;
  top: -12px;
  right: 14px;
  width: 10px;
  height: 34px;
  background: var(--paprika);
  border-radius: 5px;
  transform: rotate(28deg);
}
.mortar-bowl .pestle::before {
  content: "";
  position: absolute;
  top: -7px; left: -3px;
  width: 16px; height: 16px;
  background: var(--paprika);
  border-radius: 50%;
}
.mortar-bowl .bowl-seeds {
  position: absolute;
  bottom: 12px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 7px;
}
.mortar-bowl .bowl-seeds i {
  width: 6px; height: 6px;
  background: var(--paper);
  border-radius: 50%;
  opacity: 0.85;
}
.bench-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--cumin);
  margin-bottom: 12px;
}

.seed-counters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}
.seed-counter {
  flex: 1;
  max-width: 160px;
  background: var(--paper);
  border: 1.5px solid var(--edge);
  border-radius: 12px;
  padding: 10px 8px 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.seed-counter .num {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  min-width: 20px;
  text-align: center;
}
.seed-counter .lbl {
  font-size: 12px;
  color: var(--ink-faint);
}

/* wide paprika add strip */
.add-strip {
  display: block;
  width: 100%;
  border: none;
  background: var(--paprika);
  color: #fdf3e3;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.4px;
  padding: 14px 16px;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 0 var(--paprika-deep);
}
.add-strip:active { transform: translateY(1px); box-shadow: none; }

/* ---------- seed-strip rows ---------- */
.strip-row {
  display: flex;
  align-items: stretch;
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 9px;
}
.strip-edge {
  width: 7px;
  flex: none;
}
.strip-edge.stage-Mixing { background: var(--paprika); }
.strip-edge.stage-Keep { background: var(--herb); }
.strip-edge.stage-Toss { background: var(--cumin); }
.strip-main {
  flex: 1;
  min-width: 0;
  padding: 10px 10px 9px 12px;
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.strip-main .row-name {
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-main .row-ratio {
  font-size: 13px;
  color: var(--ink-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.strip-main .row-note {
  font-size: 12.5px;
  color: var(--cumin);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}
.strip-side {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px 0 2px;
}
.strip-side button {
  border: 1.5px solid var(--edge);
  background: var(--paper);
  color: var(--cumin);
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 7px 9px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
}
.strip-side button:active { background: var(--paper-deep); }
.strip-side button.danger {
  color: var(--paprika);
  border-color: #e0a08f;
}

.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 16px 2px 8px;
}
.section-label:first-of-type { margin-top: 4px; }

.group-empty {
  font-size: 13px;
  color: var(--ink-faint);
  padding: 2px 2px 6px;
}

/* ---------- empty state: faint mortar ring ---------- */
.empty-state {
  text-align: center;
  padding: 30px 16px 26px;
  color: var(--ink-faint);
}
.mortar-ring {
  width: 84px;
  height: 42px;
  margin: 0 auto 14px;
  border: 2.5px dashed #cbb488;
  border-top: none;
  border-radius: 0 0 84px 84px / 0 0 42px 42px;
  opacity: 0.7;
}
.mortar-ring::after {
  content: "";
  display: block;
  width: 96px;
  height: 22px;
  margin: -12px 0 0 -6px;
  border: 2.5px dashed #cbb488;
  border-radius: 50%;
  background: transparent;
}
.empty-state p {
  font-size: 14px;
  max-width: 260px;
  margin: 0 auto;
}

/* ---------- form (Mix tab) ---------- */
.form-card {
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--radius);
  padding: 16px 14px 14px;
  margin-bottom: 14px;
}
.form-mode {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--paprika);
  margin-bottom: 12px;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--cumin);
  margin-bottom: 5px;
}
.field label .opt {
  font-weight: 400;
  color: var(--ink-faint);
}
.field input[type="text"],
.field select,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--edge);
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.field textarea { resize: vertical; min-height: 64px; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--cumin) 50%),
    linear-gradient(135deg, var(--cumin) 50%, transparent 50%);
  background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--cumin);
}
.field.invalid input, .field.invalid select {
  border-color: var(--paprika);
  background: #faeae2;
}
.err-msg {
  display: none;
  font-size: 12.5px;
  color: var(--paprika);
  margin-top: 4px;
}
.field.invalid .err-msg { display: block; }

.stage-picker {
  display: flex;
  gap: 8px;
}
.stage-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1.5px solid var(--edge);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 6px;
  border-radius: 10px;
  cursor: pointer;
}
.stage-opt[aria-pressed="true"] {
  border-color: var(--cumin);
  background: var(--paper-deep);
  box-shadow: inset 0 2px 0 rgba(140, 90, 43, 0.18);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}
.btn {
  flex: 1;
  border: none;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 12px;
  border-radius: 11px;
  cursor: pointer;
}
.btn-save {
  background: var(--cumin);
  color: #fdf3e3;
  box-shadow: 0 2px 0 #6f4620;
}
.btn-cancel {
  background: var(--paper);
  color: var(--cumin);
  border: 1.5px solid var(--edge);
}
.btn:active { transform: translateY(1px); box-shadow: none; }

.mix-hint {
  font-size: 12.5px;
  color: var(--ink-faint);
  text-align: center;
  margin-top: 4px;
}

/* ---------- Find tab ---------- */
.search-wrap { margin-bottom: 14px; }
.search-wrap input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.search-wrap input:focus { border-color: var(--cumin); }
.search-wrap input::placeholder { color: #b39b74; }

.about-card {
  background: var(--card);
  border: 1.5px solid var(--edge);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 18px;
}
.about-card h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 8px;
}
.about-card p {
  font-size: 13px;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.about-stats {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--cumin);
  font-weight: 600;
  margin-bottom: 12px;
}
.link-btn {
  display: inline-block;
  border: 1.5px solid #e0a08f;
  background: none;
  color: var(--paprika);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
}
.link-btn:active { background: #faeae2; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0px) + 14px);
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  padding: 9px 16px;
  border-radius: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  max-width: 86%;
  text-align: center;
  z-index: 60;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- bottom tab bar: four mortar-bowl silhouettes ---------- */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--paper-deep);
  border-top: 1.5px solid var(--edge);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  display: flex;
  max-width: 480px;
  margin: 0 auto;
}
.tabbar button {
  flex: 1;
  border: none;
  background: none;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 2px 0 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.tab-glyph {
  width: 34px;
  height: 17px;
  position: relative;
  margin-bottom: 1px;
}
/* bowl silhouette */
.tab-glyph .g-bowl {
  position: absolute;
  left: 2px; right: 2px; bottom: 0;
  height: 14px;
  border: 2px solid currentColor;
  border-top: none;
  border-radius: 0 0 30px 30px / 0 0 14px 14px;
}
/* rim */
.tab-glyph .g-rim {
  position: absolute;
  left: 0; right: 0; bottom: 12px;
  height: 6px;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: var(--paper-deep);
}
/* angled pestle */
.tab-glyph .g-pestle {
  position: absolute;
  top: -1px;
  right: 6px;
  width: 3.5px;
  height: 12px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(30deg);
}
/* three tiny seed dots inside bowl */
.tab-glyph .g-seeds {
  position: absolute;
  bottom: 4px; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 3px;
}
.tab-glyph .g-seeds i {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: currentColor;
}
.tabbar button.active {
  color: var(--paprika);
}
/* active bowl presses down with a short soft shadow */
.tabbar button.active .tab-glyph {
  transform: translateY(2px);
  filter: drop-shadow(0 2px 2px rgba(61, 44, 28, 0.35));
}
.tabbar button:not(.active) {
  color: #a08a67;
}
