/* Colloquill — garden.css
 * Speaking-Stick Circle Panel: muted sage paper, parchment slips, rust accent.
 * Single column, mobile-first, safe-area aware. No images, no icons, no checks. */

:root {
  --sage: #6f8065;
  --sage-deep: #57654e;
  --sage-mist: #e7ead9;
  --parchment: #f2e8d5;
  --paper: #fbf7ee;
  --rust: #c66b4e;
  --rust-deep: #a8563c;
  --teal: #3f7d74;
  --charcoal: #55524a;
  --ink: #34332c;
  --ink-soft: #6d6b5f;
  --line: rgba(111, 128, 101, 0.28);
  --shadow-lift: 0 10px 22px rgba(52, 51, 44, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Avenir Next", "Seravek", "Gill Sans", Verdana, system-ui, sans-serif;
  background: var(--sage-mist);
  color: var(--ink);
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

.view {
  max-width: 560px;
  margin: 0 auto;
  padding: 18px 16px calc(112px + env(safe-area-inset-bottom)) 16px;
}

/* ---------- shared bits ---------- */

.kicker {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

h1.view-title {
  margin: 0 0 2px;
  font-size: 24px;
  font-weight: 650;
  letter-spacing: -0.01em;
  color: var(--sage-deep);
}

.view-sub {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--ink-soft);
}

.btn {
  font: inherit;
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-rust {
  background: var(--rust);
  color: #fdf6ec;
  font-weight: 600;
}

.btn-rust:active { background: var(--rust-deep); }

.btn-ghost {
  background: transparent;
  color: var(--sage-deep);
  border: 1.5px solid var(--line);
}

.btn-quiet {
  background: transparent;
  color: var(--rust-deep);
  border: 1.5px solid rgba(198, 107, 78, 0.45);
}

.btn-small { padding: 7px 12px; font-size: 13px; }

.btn-full { width: 100%; }

/* stage words with plain dots — never check marks */
.stage-word {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  white-space: nowrap;
}

.stage-word .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}

.dot.filled { background: currentColor; }
.dot.hollow { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }

.stage-cold   { color: var(--rust); }
.stage-warm   { color: var(--teal); }
.stage-used   { color: var(--charcoal); }
.strip-cold   { background: var(--rust); }
.strip-warm   { background: var(--teal); }
.strip-used   { background: var(--charcoal); }

/* ---------- Circle: round speaking-stick focus card ---------- */

.focus-wrap {
  display: flex;
  justify-content: center;
  margin: 6px 0 20px;
}

.focus-card {
  width: 216px;
  height: 216px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--line);
  box-shadow: 0 6px 16px rgba(52, 51, 44, 0.10);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
}

.stick {
  width: 8px;
  height: 34px;
  border-radius: 4px;
  background: var(--rust);
  position: relative;
  margin-bottom: 10px;
}

.stick::before {
  content: "";
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--teal);
}

.focus-label {
  margin: 0 0 6px;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.focus-prompt {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink);
  font-style: italic;
}

.focus-counts {
  display: flex;
  gap: 18px;
}

.focus-counts .count {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-soft);
}

.focus-counts b { font-size: 15px; color: var(--ink); }

/* wide rust quick-action strip */
.add-strip {
  display: block;
  width: 100%;
  text-align: left;
  background: var(--rust);
  color: #fdf6ec;
  border: none;
  border-radius: 14px;
  padding: 16px 18px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  margin: 0 0 18px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.add-strip:active { background: var(--rust-deep); }

.add-strip small {
  display: block;
  font-weight: 400;
  font-size: 12px;
  opacity: 0.85;
  margin-top: 2px;
}

/* recent warm strip */
.warm-strip {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.warm-strip-title {
  margin: 0;
  padding: 10px 14px 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.warm-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--line);
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.warm-row:active { background: var(--sage-mist); }

.warm-row .cue { font-size: 12px; color: var(--ink-soft); flex: none; }
.warm-row .txt { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- slim speech-tab rows ---------- */

.group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 22px 0 8px;
}

.group-head:first-of-type { margin-top: 4px; }

.group-head .g-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}

.group-head .g-count {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
}

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

.tn-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 4px 14px 14px 14px;
  padding: 11px 12px 11px 18px;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.tn-row:active { background: var(--sage-mist); }

.tn-row .stripe {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
}

.tn-main { flex: 1; min-width: 0; }

.tn-prompt {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.tn-cue {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- Capture form ---------- */

.capture-slip {
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 16px 16px 16px 4px;
  padding: 16px;
}

.field { display: block; margin-bottom: 14px; }

.field-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}

.field-label .req {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  color: var(--rust-deep);
  margin-left: 6px;
  font-size: 11px;
}

.field input[type="text"] {
  width: 100%;
  font: inherit;
  font-size: 16px; /* avoids iOS zoom-on-focus */
  color: var(--ink);
  background: var(--parchment);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.field input[type="text"]:focus {
  border-color: var(--sage);
  background: #fffdf6;
}

.form-error {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--rust-deep);
}

.stage-pick {
  display: flex;
  gap: 8px;
}

.stage-opt {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 4px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--parchment);
  font: inherit;
  font-size: 13.5px;
  cursor: pointer;
  color: var(--ink-soft);
  -webkit-tap-highlight-color: transparent;
}

.stage-opt[aria-pressed="true"] {
  background: var(--paper);
  border-color: currentColor;
  font-weight: 600;
}

.stage-opt.stage-cold[aria-pressed="true"] { color: var(--rust-deep); }
.stage-opt.stage-warm[aria-pressed="true"] { color: var(--teal); }
.stage-opt.stage-used[aria-pressed="true"] { color: var(--charcoal); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.form-actions .btn-rust { flex: 1.4; }
.form-actions .btn-ghost { flex: 1; }

/* ---------- Lookup ---------- */

.search-wrap { margin-bottom: 14px; }

.search-wrap input {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px 14px 14px 4px;
  padding: 13px 14px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.search-wrap input:focus { border-color: var(--sage); }

.result-note {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

/* settings / about area */
.about-area {
  margin-top: 26px;
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  padding: 14px;
}

.about-area h2 {
  margin: 0 0 6px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.about-area p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.about-area p b { color: var(--sage-deep); }

.about-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ---------- empty states: faint speech-bubble outline ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 30px 16px 26px;
  text-align: center;
}

.bubble-ghost {
  width: 74px;
  height: 52px;
  border: 2px solid rgba(111, 128, 101, 0.35);
  border-radius: 14px 14px 14px 4px;
  position: relative;
}

.bubble-ghost::after {
  content: "";
  position: absolute;
  left: 8px;
  bottom: -10px;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(111, 128, 101, 0.35);
  border-top: none;
  border-right: none;
  border-radius: 0 0 0 10px;
  background: transparent;
}

.empty p {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink-soft);
  max-width: 240px;
  line-height: 1.45;
}

/* ---------- fixed bottom tab bar: four speech bubbles ---------- */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  display: flex;
  gap: 4px;
  justify-content: space-around;
  align-items: flex-end;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: var(--sage-deep);
  border-top: 1px solid rgba(242, 232, 213, 0.15);
}

.tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tab-bubble {
  display: block;
  position: relative;
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(242, 232, 213, 0.75);
  background: rgba(242, 232, 213, 0.10);
  border-radius: 12px 12px 12px 3px;
  padding: 10px 2px 12px;
  margin: 0 6px;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tab-bubble::after {
  content: "";
  position: absolute;
  left: 9px;
  bottom: -7px;
  width: 9px;
  height: 9px;
  background: inherit;
  border-radius: 0 0 0 8px;
}

.tab[aria-selected="true"] .tab-bubble {
  background: var(--parchment);
  color: var(--rust-deep);
  font-weight: 600;
  transform: translateY(-5px);
  box-shadow: var(--shadow-lift);
}

.tab[aria-selected="true"] .tab-bubble::after { background: var(--parchment); }

/* ---------- slip (detail / edit sheet) ---------- */

.slip-scrim {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(52, 51, 44, 0.45);
}

.slip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-width: 560px;
  margin: 0 auto;
  background: var(--parchment);
  border-radius: 18px 18px 0 0;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom));
  box-shadow: 0 -8px 30px rgba(52, 51, 44, 0.25);
}

.slip-grab {
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: rgba(111, 128, 101, 0.4);
  margin: 2px auto 10px;
}

.slip-kicker {
  margin: 0 0 12px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.slip-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 2px;
}

.slip-date {
  margin: 0 0 14px;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.slip-actions { display: flex; gap: 8px; }
.slip-actions .btn-rust { flex: 1.2; }
.slip-actions .btn-quiet { flex: 1; }
.slip-actions .btn-ghost { flex: 0.9; }

[hidden] { display: none !important; }
