/* Soulpreneurs shell styles. v0.1.0 (Sep 23, 2026).
   The sage palette and the two fonts carry over from the Content Manager.
   Every page loads this file and nothing else for styling. */

:root {
  --paper: #F6F3EC;
  --card: #FDFBF7;
  --ink: #21393C;
  --ink-soft: #4E6467;
  --ink-faint: #8A9B9C;
  --sage: #C2D9D9;
  --sage-soft: #E4EEEE;
  --teal: #2F6660;
  --teal-deep: #234E49;
  --gold: #B8892E;
  --gold-soft: #F3E9D3;
  --line: #E3DDD0;
  --line-soft: #EDE8DE;
  --rose: #B3563F;
  --page-max: 1080px;
  --x: 24px;
  --band-h: 56px;
  --tabs-h: 60px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
}
@media (max-width: 700px) { :root { --x: 16px; } }
@media (min-width: 900px) { :root { --x: 40px; } }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Karla', sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
}
body.has-tabs { padding-bottom: calc(var(--tabs-h) + var(--sab)); }
@media (min-width: 701px) { body.has-tabs { padding-bottom: 0; } }

h1, h2, h3 { font-family: 'Fraunces', serif; font-weight: 500; line-height: 1.15; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(30px, 3.6vw, 40px); }
h2 { font-size: 24px; }
h3 { font-size: 20px; }
p { margin: 0; }
a { color: var(--teal-deep); }
.sub { color: var(--ink-soft); margin-top: 6px; max-width: 56ch; }
.faint { color: var(--ink-faint); }
.small { font-size: 15px; }

button, input, select, textarea { font-family: inherit; font-size: 16px; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* ================= Nav band ================= */
.band {
  background: var(--sage-soft);
  border-bottom: 1px solid var(--sage);
  padding-top: var(--sat);
  position: sticky;
  top: 0;
  z-index: 50;
}
.band-in {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 8px var(--x);
  min-height: var(--band-h);
  display: flex;
  align-items: center;
  gap: 6px;
}
.band .brand {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 500;
  color: var(--teal-deep);
  text-decoration: none;
  margin-right: 10px;
  white-space: nowrap;
}
.band .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--teal-deep);
  background: transparent;
  border: 1px solid transparent;
  text-decoration: none;
}
.band .pill:hover { background: #fff; }
.band .pill.here { background: #fff; border-color: var(--sage); }
.band .sp { flex: 1 1 auto; }
.band .who {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--teal-deep);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  max-width: 220px;
}
.band .who:hover { background: #fff; }
.band .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 700px) {
  .band .pill { display: none; }
  .band .who span { display: none; }
  .band .who { padding: 4px; }
}

/* ================= Bottom tab bar (phones) ================= */
.tabs {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--sage-soft);
  border-top: 1px solid var(--sage);
  padding-bottom: var(--sab);
  z-index: 50;
}
.tabs-in { display: flex; }
.tabs a {
  flex: 1 1 0;
  min-height: var(--tabs-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.tabs a svg { width: 24px; height: 24px; }
.tabs a.here { color: var(--teal-deep); }
@media (max-width: 700px) { .tabs { display: block; } }

/* ================= Avatar ================= */
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--teal-deep);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  overflow: hidden;
  flex: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 96px; height: 96px; font-size: 32px; }

/* ================= Page and cards ================= */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 28px var(--x) 60px;
  width: 100%;
}
.page.narrow { max-width: 640px; }
.top { margin-bottom: 22px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  margin-bottom: 18px;
}
.card h2 { margin-bottom: 4px; }
.card .sub { margin-bottom: 16px; }
.stack > * + * { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
hr { border: 0; border-top: 1px solid var(--line-soft); margin: 18px 0; }

/* ================= Fields ================= */
.field { display: block; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-size: 16px;
}
input:focus { border-color: var(--teal); }
input.code {
  font-size: 28px;
  letter-spacing: .3em;
  text-align: center;
  font-family: 'Karla', monospace;
  padding: 14px;
}
.hint { font-size: 14px; color: var(--ink-faint); margin-top: 6px; }

/* ================= Buttons ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--teal-deep);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}
.btn:hover { background: var(--sage-soft); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-deep); }
.btn.quiet { background: transparent; border-color: transparent; }
.btn.quiet:hover { background: var(--sage-soft); }
.btn.gold { background: var(--gold-soft); border-color: var(--gold); color: #7b5a13; }
.btn.wide { width: 100%; }
.btn.sm { min-height: 38px; padding: 6px 14px; font-size: 15px; }
.btn[disabled] { opacity: .55; cursor: default; }
.link { background: none; border: 0; padding: 0; color: var(--teal-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; font-size: 16px; }

/* ================= Notes, tags, toast ================= */
.note {
  background: var(--sage-soft);
  border: 1px solid var(--sage);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
}
.note.gold { background: var(--gold-soft); border-color: var(--gold); }
.note.plain { background: transparent; border-color: var(--line); }
.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  background: var(--sage);
  color: var(--teal-deep);
}
.tag.gold { background: var(--gold-soft); color: #7b5a13; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabs-h) + var(--sab) + 18px);
  transform: translateX(-50%);
  background: var(--sage);
  color: var(--ink);
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 600;
  box-shadow: 0 12px 40px rgba(33, 57, 60, .18);
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  max-width: min(420px, calc(100% - 32px));
  text-align: center;
}
@media (min-width: 701px) { .toast { bottom: 28px; } }
.toast.show { opacity: 1; }
.hidden { display: none !important; }

/* ================= Lists ================= */
.list { list-style: none; margin: 0; padding: 0; }
.list li {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
}
.list li:first-child { border-top: 0; }
.list .grow { flex: 1 1 auto; min-width: 0; word-break: break-all; }

/* ================= Login ================= */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(24px + var(--sat)) var(--x) calc(24px + var(--sab));
}
.login .card { width: 100%; max-width: 440px; padding: 28px; margin: 0; }
.login .wordmark {
  font-family: 'Fraunces', serif;
  font-size: 34px;
  font-weight: 500;
  color: var(--teal-deep);
  margin-bottom: 4px;
}
.login .sub { margin-bottom: 22px; }
.foot { margin-top: 26px; font-size: 13px; color: var(--ink-faint); text-align: center; }

/* ===================================================================================
   Phase 1 (v0.2.0): the switcher, the block tree, feeds, reactions, sheets, kinds.
   =================================================================================== */

/* ---- Band: community switcher and the two doors ---- */
.band-in { flex-wrap: nowrap; }
.band .sw {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex: 1 1 auto;
  min-width: 0;
  padding: 2px 0;
}
.band .sw::-webkit-scrollbar { display: none; }
.band .chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--teal-deep);
  border: 1px solid transparent;
  text-decoration: none;
  background: transparent;
}
.band .chip:hover { background: #fff; }
.band .chip.here { background: #fff; border-color: var(--sage); }
.band .chip small { font-size: 12px; color: var(--ink-faint); }
.band .chip.new { border: 1px dashed var(--teal); color: var(--teal); }
.band .doors { display: flex; gap: 12px; align-items: center; margin-left: 6px; }
.band .doors a { font-size: 14px; color: var(--ink-soft); text-decoration: none; white-space: nowrap; }
.band .doors a:hover { color: var(--teal-deep); text-decoration: underline; }
@media (max-width: 700px) {
  .band .doors a { display: none; }
  .band .chip { padding: 6px 10px; font-size: 14px; }
  .band .chip small { display: none; }
}

/* ---- Two-column body: the tree and the main pane ---- */
.body { display: grid; grid-template-columns: 250px 1fr; gap: 0; max-width: var(--page-max); margin: 0 auto; width: 100%; min-height: 60vh; }
.side { border-right: 1px solid var(--line); padding: 22px 14px 40px var(--x); }
.main { padding: 28px var(--x) 60px 28px; min-width: 0; }
@media (max-width: 860px) {
  .body { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px var(--x); }
  .main { padding: 24px var(--x) 60px; }
  .body.on-channel .side { display: none; }
  .body.on-tree .main { display: none; }
}
@media (min-width: 861px) { .back { display: none; } }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--teal-deep); text-decoration: none; font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.side h4 { font-family: 'Karla', sans-serif; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); margin: 18px 8px 6px; }
.side h4:first-child { margin-top: 0; }
.ch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
  font-size: 16px;
  border: 1px solid transparent;
  min-height: 42px;
}
.ch:hover { background: #fff; }
.ch.here { background: #fff; border-color: var(--line); }
.ch .k { color: var(--ink-faint); width: 18px; text-align: center; font-size: 14px; flex: none; }
.ch .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch.sub { padding-left: 30px; }
.ch .badge { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; flex: none; }
.badge.lock { background: var(--gold-soft); color: #7b5a13; }
.badge.hidden-block { background: var(--line-soft); color: var(--ink-soft); }
.badge.live { background: #F6E0DB; color: var(--rose); }
.side .add {
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 1px dashed var(--sage);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--teal);
  background: transparent;
  font-weight: 600;
  text-align: left;
  font-size: 15px;
}
.side .add:hover { background: #fff; }

/* ---- Page head inside the main pane ---- */
.head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 2px; }
.head h1 { font-size: clamp(26px, 3vw, 34px); }
.head .sp { flex: 1 1 auto; }
.crumb { color: var(--ink-faint); font-size: 14px; margin-bottom: 4px; }

/* ---- Composer and posts ---- */
.compose {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  margin: 16px 0;
}
.compose textarea {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  resize: none;
  padding: 8px 4px;
  min-height: 44px;
  font-size: 16px;
  color: var(--ink);
  outline: 0;
  line-height: 1.4;
}
.compose .acts { display: flex; gap: 6px; align-items: center; flex: none; }
.post { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px; margin-bottom: 12px; }
.post .who { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.post .who b { font-weight: 600; display: block; line-height: 1.2; }
.post .who small { display: block; color: var(--ink-faint); font-size: 13px; }
.post .who .sp { flex: 1 1 auto; }
.post .body { white-space: pre-wrap; word-wrap: break-word; }
.post .gif { display: block; max-width: 320px; width: 100%; border-radius: 12px; margin-top: 8px; }
.post .meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; color: var(--ink-faint); font-size: 14px; }
.post .meta .sp { flex: 1 1 auto; }
.post .from { font-size: 13px; color: var(--ink-faint); }
.post .from a { color: var(--teal-deep); font-weight: 600; text-decoration: none; }
.post.reply { padding: 12px 14px; margin: 8px 0 0 0; border-radius: 14px; background: #fff; }
.replies { margin-top: 10px; padding-left: 14px; border-left: 2px solid var(--line-soft); }
.reply-box { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; }
.reply-box textarea { flex: 1 1 auto; min-width: 0; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; font-size: 16px; resize: none; background: #fff; color: var(--ink); }

/* ---- Reactions: the heart is an SVG, the rest are emoji ---- */
.react { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 10px; }
.react button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: #fff;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1;
}
.react button:hover { border-color: var(--sage); }
.react button.on { background: var(--sage-soft); border-color: var(--sage); color: var(--teal-deep); font-weight: 700; }
.react button svg { width: 18px; height: 18px; }
.react button .n { font-size: 13px; font-weight: 700; }
.react button:not(.on) .n:empty { display: none; }
.heart-svg path { fill: none; stroke: var(--sage); stroke-width: 2; }
.on .heart-svg path { fill: var(--teal-deep); stroke: var(--teal-deep); }

/* ---- GIF picker ---- */
.gif-pick { margin-top: 8px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; max-height: 260px; overflow: auto; }
.gif-grid button { padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--line-soft); aspect-ratio: 1; }
.gif-grid img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gif-picked { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.gif-picked img { height: 72px; border-radius: 8px; }

/* ---- Cards in grids: communities, people, folders, kinds ---- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.card.tight { padding: 16px 18px; margin: 0; }
.card h3 + .meta, .card .meta { color: var(--ink-faint); font-size: 14px; margin-top: 6px; }
.cardh { display: flex; align-items: center; gap: 10px; }
.cardh .sp { flex: 1 1 auto; }
.person { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.person b { display: block; font-weight: 600; }
.person .tl { color: var(--ink-soft); font-size: 15px; }
.person .links { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.person .links a { font-size: 14px; }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); white-space: nowrap; }
.pill.sp { background: var(--gold-soft); color: #7b5a13; border-color: transparent; }
.pill.sf { background: var(--sage); color: var(--teal-deep); border-color: transparent; }
.kind { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; text-align: left; min-height: 120px; cursor: pointer; font: inherit; color: var(--ink); }
.kind .ico { font-size: 22px; margin-bottom: 6px; color: var(--teal-deep); }
.kind h4 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 18px; margin: 0 0 4px; }
.kind p { color: var(--ink-soft); font-size: 14px; }
.kind.pick { border-color: var(--teal); box-shadow: 0 0 0 2px var(--sage); }
.kind[disabled] { opacity: .55; cursor: default; border-style: dashed; }
.folder .files { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.folder .files a, .folder .files button.link { font-size: 15px; text-align: left; }
.folder .files .f { display: flex; gap: 8px; align-items: center; }
.folder .files .f .sp { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dashed { border-style: dashed; display: flex; align-items: center; justify-content: center; color: var(--teal); min-height: 90px; text-align: center; }

/* ---- Toggles ---- */
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line-soft); cursor: pointer; }
.toggle:first-child { border-top: 0; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .sw-ui { width: 42px; height: 24px; border-radius: 999px; background: #CFCBC2; position: relative; flex: none; margin-top: 2px; transition: background .15s; }
.toggle .sw-ui:after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle input:checked + .sw-ui { background: var(--teal); }
.toggle input:checked + .sw-ui:after { left: 21px; }
.toggle input:focus-visible + .sw-ui { outline: 2px solid var(--teal); outline-offset: 2px; }
.toggle b { display: block; font-weight: 600; }
.toggle span.d { color: var(--ink-soft); font-size: 15px; }
.toggle.off { opacity: .6; cursor: default; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; background: #fff; }
.seg label { padding: 8px 14px; font-size: 15px; font-weight: 600; color: var(--ink-soft); cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg input:checked + label { background: var(--teal); color: #fff; }

/* ---- Sheet: the block sheet and other inline forms ---- */
.sheet-wrap { position: fixed; inset: 0; background: rgba(33, 57, 60, .35); z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 701px) { .sheet-wrap { align-items: center; padding: 24px; } }
.sheet { background: var(--paper); width: 100%; max-width: 760px; max-height: calc(100dvh - var(--sat)); overflow: auto; border-radius: 22px 22px 0 0; padding: 22px var(--x) calc(24px + var(--sab)); }
@media (min-width: 701px) { .sheet { border-radius: 22px; padding: 28px; } }
.sheet h2 { margin-bottom: 4px; }
select { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; }
input[type=url], input[type=search] { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; }
textarea.full { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px; min-height: 90px; }
.address { display: flex; align-items: center; gap: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.address span { padding: 12px 0 12px 14px; color: var(--ink-faint); font-size: 16px; white-space: nowrap; }
.address input { border: 0; border-radius: 0; flex: 1 1 auto; min-width: 0; padding-left: 2px; }
.copybox { display: flex; gap: 8px; align-items: center; }
.copybox input { flex: 1 1 auto; min-width: 0; font-size: 16px; }
.porch-video { width: 100%; border-radius: 18px; background: #000; margin-bottom: 18px; max-height: 60vh; }
.empty { color: var(--ink-faint); padding: 18px 0; }
.check { display: flex; gap: 10px; align-items: center; font-size: 16px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--teal); }
