@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,100;0,9..144,300;0,9..144,400;0,9..144,600;1,9..144,100;1,9..144,300;1,9..144,400;1,9..144,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:      #faf8f3;
  --cream2:     #f4f0e8;
  --cream3:     #ebe4d8;
  --cream4:     #ddd4c4;
  --parchment:  #cfc3b0;

  --ink:        #1a1612;
  --ink2:       #362e24;
  --ink3:       #5a4e42;
  --ink4:       #8c7d6e;
  --ink5:       #b8a898;

  --terra:      #c5673e;
  --terra2:     #e08258;
  --terra3:     #eea882;
  --terra4:     #f5cdb4;
  --terra-dim:  rgba(197,103,62,0.10);
  --terra-glow: rgba(197,103,62,0.22);

  --sage:       #6e9e72;
  --sage2:      #96be9a;
  --sage3:      #c8e0ca;
  --sage-dim:   rgba(110,158,114,0.12);

  --lavender:   #9280c0;
  --lavender2:  #bcb0d8;
  --lavender3:  #ddd8ee;
  --lavender-dim: rgba(146,128,192,0.12);

  --gold:       #b8862e;
  --gold2:      #ddb060;
  --gold3:      #f0d49a;

  --rose:       #c4607a;
  --rose-dim:   rgba(196,96,122,0.10);

  --bg:         var(--cream);
  --bg2:        var(--cream2);
  --bg3:        var(--cream3);
  --surface:    #ffffff;
  --border:     var(--cream3);
  --border2:    var(--cream4);
  --text:       var(--ink);
  --text2:      var(--ink3);
  --text3:      var(--ink4);
  --text-dim:   var(--ink5);
  --violet:     var(--lavender);
  --violet2:    var(--lavender2);
  --teal:       var(--sage);
  --amber:      var(--gold2);
  --copper:     var(--terra2);

  --serif:      'Fraunces', Georgia, serif;
  --sans:       'DM Sans', system-ui, sans-serif;
  --mono:       'Courier New', monospace;
  --ease:       cubic-bezier(0.23, 1, 0.32, 1);
  --spring:     cubic-bezier(0.34, 1.56, 0.64, 1);
  --r:          8px;
  --r-lg:       16px;
  --r-xl:       24px;
  --r-2xl:      36px;
  --r-pill:     999px;
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.65;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* layout */
.container      { max-width: 640px;  margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 1; }
.container-wide { max-width: 1080px; margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 1; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 500;
  background: rgba(250,248,243,0.92);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-bottom: 1px solid var(--cream3);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem 1.25rem; gap: 1rem;
}
.nav-logo {
  display: flex; align-items: center; gap: 0.6rem;
  text-decoration: none; color: var(--ink);
  font-family: var(--serif); font-size: 1.1rem; font-weight: 400;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--terra); position: relative; flex-shrink: 0;
  box-shadow: 0 2px 12px var(--terra-glow);
}
.logo-mark::after {
  content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--cream);
}
.nav-links { display: flex; align-items: center; gap: 0.2rem; }
.nav-links a {
  text-decoration: none; color: var(--ink3);
  font-size: 14px; font-weight: 500;
  padding: 6px 13px; border-radius: var(--r-pill);
  transition: all 0.18s;
}
.nav-links a:hover { color: var(--ink); background: var(--cream3); }
.nav-links a.active { color: var(--terra); background: var(--terra-dim); }

.nav-bell-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: transparent; border: 1.5px solid var(--cream3);
  color: var(--ink4); font-size: 14px; cursor: pointer;
  transition: all 0.18s; text-decoration: none;
}
.nav-bell-btn:hover { border-color: var(--terra); color: var(--terra); background: var(--terra-dim); }

.nav-avatar-wrap { position: relative; display: inline-flex; }
.nav-avatar-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--terra); color: #fff; border: 2px solid var(--cream);
  font-size: 12px; font-weight: 600; font-family: var(--sans);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.18s; box-shadow: 0 2px 10px var(--terra-glow);
}
.nav-avatar-btn:hover { transform: scale(1.06); }
.nav-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-lg);
  min-width: 172px; box-shadow: 0 16px 48px rgba(28,22,18,0.14);
  z-index: 9999; display: none; flex-direction: column; overflow: hidden;
}
.nav-dropdown.open { display: flex; }
.nav-dropdown a, .nav-dropdown button {
  display: block; width: 100%; padding: 10px 16px;
  text-align: left; background: none; border: none;
  color: var(--ink2); font-size: 14px; font-family: var(--sans);
  cursor: pointer; text-decoration: none; transition: background 0.15s;
}
.nav-dropdown a:hover, .nav-dropdown button:hover { background: var(--cream2); }
.nav-dropdown .drop-divider { height: 1px; background: var(--cream3); margin: 4px 0; }
.nav-notif-wrap { position: relative; display: inline-flex; }
.notif-badge {
  position: absolute; top: 0; right: 0;
  background: var(--terra); color: #fff;
  font-size: 8px; font-weight: 700;
  width: 14px; height: 14px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; border: 2px solid var(--cream);
}

/* bottom nav mobile */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 400;
  background: rgba(250,248,243,0.96); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px); border-top: 1px solid var(--cream3);
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
}
.bottom-nav-inner { display: flex; justify-content: space-around; max-width: 480px; margin: 0 auto; }
.bnav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--ink5); font-size: 10px; font-family: var(--sans);
  padding: 4px 12px; border-radius: var(--r);
  transition: color 0.18s; text-decoration: none;
}
.bnav-btn svg { width: 22px; height: 22px; stroke-width: 1.8; }
.bnav-btn.active { color: var(--terra); }
.bnav-btn:hover { color: var(--terra); }

@media (max-width: 720px) {
  .bottom-nav { display: block; }
  .nav-links a:not(.nav-avatar-btn):not(.nav-bell-btn) { display: none; }
  body { padding-bottom: 72px; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 22px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font-family: var(--sans); font-size: 14px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.22s var(--ease); white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--terra); color: #fff; border-color: var(--terra); }
.btn-primary:hover { background: var(--terra2); border-color: var(--terra2); box-shadow: 0 6px 24px var(--terra-glow); }
.btn-secondary { background: transparent; color: var(--ink2); border-color: var(--cream3); }
.btn-secondary:hover { background: var(--cream3); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink4); border-color: transparent; }
.btn-ghost:hover { background: var(--cream2); color: var(--ink2); }
.btn-sm { padding: 7px 16px; font-size: 13px; }
.btn-lg { padding: 13px 30px; font-size: 15px; }
.btn-full { width: 100%; }

/* cards */
.card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); box-shadow: 0 2px 16px rgba(28,22,18,0.06); }
.surface { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); }

/* ── REEL ── */
.reel-container {
  height: 100dvh; overflow-y: scroll;
  scroll-snap-type: y mandatory; -webkit-overflow-scrolling: touch;
}
.reel-card {
  height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always;
  position: relative; display: flex; flex-direction: column; overflow: hidden;
}
.reel-card[data-kind="fragment"] { background: var(--cream); }
.reel-card[data-kind="fragment"]::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 80% 10%, var(--terra4) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 10% 90%, var(--sage3) 0%, transparent 60%);
  opacity: 0.8;
}
.reel-card[data-kind="circle"] { background: var(--cream); }
.reel-card[data-kind="circle"]::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 65% 55% at 15% 15%, var(--lavender3) 0%, transparent 60%),
              radial-gradient(ellipse 55% 45% at 85% 85%, var(--gold3) 0%, transparent 55%);
  opacity: 0.75;
}
.reel-card[data-kind="compose"] { background: var(--cream2); }
.reel-card[data-kind="compose"]::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, var(--cream3) 0%, transparent 70%);
}
.reel-card[data-kind="intro"] { background: var(--cream); }
.reel-card[data-kind="intro"]::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 30% 20%, var(--terra4) 0%, transparent 55%),
              radial-gradient(ellipse 60% 50% at 80% 80%, var(--lavender3) 0%, transparent 55%),
              radial-gradient(ellipse 50% 40% at 60% 50%, var(--sage3) 0%, transparent 50%);
  opacity: 0.7;
}

.reel-top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem 0;
}
.reel-pill {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(10px);
  border: 1px solid rgba(28,22,18,0.08);
  border-radius: var(--r-pill); padding: 5px 12px;
  font-size: 11px; font-weight: 600; color: var(--ink3);
  letter-spacing: 0.05em; text-transform: uppercase;
}
.reel-pill .dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.dot-fragment { background: var(--terra); }
.dot-circle   { background: var(--lavender); }
.dot-private  { background: var(--sage); }
.dot-compose  { background: var(--gold); }

.reel-body {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem 1.25rem;
  padding-bottom: calc(1.75rem + env(safe-area-inset-bottom));
}
.reel-quote {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 4.5vw, 1.85rem);
  font-weight: 300; font-style: italic; line-height: 1.45; color: var(--ink);
  margin-bottom: 1rem;
  background: rgba(255,255,255,0.80); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(28,22,18,0.07); border-radius: var(--r-xl); padding: 1.4rem 1.5rem;
}
.reel-quote-mark { display: block; font-family: var(--serif); font-size: 3rem; line-height: 0.6; color: var(--terra3); margin-bottom: 0.4rem; }
.reel-circle-header {
  background: rgba(255,255,255,0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(28,22,18,0.07); border-radius: var(--r-xl); padding: 1.2rem 1.4rem; margin-bottom: 0.75rem;
}
.reel-circle-title { font-family: var(--serif); font-size: clamp(1.25rem, 4vw, 2rem); font-weight: 400; line-height: 1.25; color: var(--ink); margin-bottom: 0.4rem; }
.reel-circle-subtitle { font-size: 13px; color: var(--ink4); line-height: 1.55; }
.reel-synthesis {
  font-size: 13px; color: var(--ink2); line-height: 1.7;
  background: rgba(255,255,255,0.68); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(28,22,18,0.06); border-radius: var(--r-lg); padding: 0.9rem 1.1rem; margin-bottom: 0.75rem;
}
.reel-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.reel-author { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--ink2); }
.reel-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.75);
}
.reel-actions { display: flex; gap: 0.5rem; }
.reel-action-btn {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(28,22,18,0.10); border-radius: var(--r-pill);
  padding: 7px 14px; font-size: 12px; font-weight: 600;
  color: var(--ink3); cursor: pointer; transition: all 0.18s;
}
.reel-action-btn:hover, .reel-action-btn.active { background: var(--terra); color: #fff; border-color: var(--terra); }
.reel-action-btn svg { width: 14px; height: 14px; }

/* compose card in reel */
.reel-compose {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; justify-content: center;
  padding: 2rem 1.5rem;
}
.compose-eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terra); font-weight: 600; margin-bottom: 0.75rem; }
.compose-title { font-family: var(--serif); font-size: 2rem; font-weight: 300; color: var(--ink); line-height: 1.2; margin-bottom: 1.5rem; }
.compose-textarea {
  width: 100%; background: rgba(255,255,255,0.92); border: 1.5px solid var(--cream3);
  border-radius: var(--r-xl); padding: 1.25rem;
  font-family: var(--serif); font-size: 1.05rem; font-weight: 300; font-style: italic;
  color: var(--ink); line-height: 1.65; resize: none; min-height: 130px; transition: border-color 0.2s;
}
.compose-textarea::placeholder { color: var(--ink5); }
.compose-textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px var(--terra-dim); }

/* reel intro card */
.reel-intro {
  position: relative; z-index: 2; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem 2rem; text-align: center;
}
.reel-intro-logo { width: 64px; height: 64px; border-radius: 50%; background: var(--terra); position: relative; margin: 0 auto 1.5rem; box-shadow: 0 8px 40px var(--terra-glow); }
.reel-intro-logo::after { content: ''; position: absolute; inset: 10px; border-radius: 50%; background: rgba(255,255,255,0.9); }
.reel-intro h1 { font-family: var(--serif); font-size: clamp(2rem, 6vw, 4rem); font-weight: 100; font-style: italic; line-height: 1.1; color: var(--ink); margin-bottom: 1rem; }
.reel-intro h1 em { font-style: normal; font-weight: 400; color: var(--terra); }
.reel-intro p { font-size: 1rem; color: var(--ink3); line-height: 1.8; max-width: 420px; margin: 0 auto 1.5rem; }
.reel-intro-ctas { display: flex; gap: 0.65rem; justify-content: center; flex-wrap: wrap; }

/* scroll hint */
.reel-scroll-hint {
  position: absolute; bottom: 5.5rem; left: 50%; transform: translateX(-50%);
  z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 4px;
  opacity: 0.4; animation: bounce-hint 2.2s ease-in-out infinite; pointer-events: none;
}
@keyframes bounce-hint {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(7px); }
}
.reel-scroll-hint svg { width: 20px; height: 20px; color: var(--ink4); }
.reel-scroll-hint span { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink5); }

/* reel side dots */
.reel-dots {
  position: fixed; right: 12px; top: 50%; transform: translateY(-50%);
  z-index: 300; display: flex; flex-direction: column; gap: 6px;
}
.reel-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--ink5); opacity: 0.35;
  transition: all 0.3s var(--ease); cursor: pointer;
}
.reel-dot.active { background: var(--terra); opacity: 1; transform: scale(1.5); }

/* ── DASHBOARD ── */
.dashboard-shell { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; position: relative; z-index: 1; }
.dashboard-hero { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.9fr); gap: 1rem; margin-bottom: 1rem; }
.hero-card {
  background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl);
  padding: 1.5rem; position: relative; overflow: hidden;
  box-shadow: 0 4px 28px rgba(28,22,18,0.07);
}
.hero-card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at top right, var(--terra4) 0%, transparent 50%),
              radial-gradient(ellipse at bottom left, var(--sage3) 0%, transparent 50%);
  opacity: 0.5;
}
.hero-inner { position: relative; z-index: 1; }
.hero-title { font-family: var(--serif); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.05; margin-bottom: 0.55rem; font-weight: 300; }
.hero-copy { color: var(--ink3); font-size: 15px; line-height: 1.75; max-width: 54ch; margin-bottom: 1rem; }
.hero-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.meta-pill { border: 1px solid var(--cream3); border-radius: var(--r-pill); padding: 0.45rem 0.85rem; background: rgba(255,255,255,0.75); color: var(--ink4); font-size: 11px; letter-spacing: 0.02em; }
.hero-stack { display: flex; flex-direction: column; gap: 1rem; }
.side-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 1.1rem; }
.side-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink5); margin-bottom: 0.75rem; font-weight: 600; }
.signal-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem; }
.signal-card { border: 1px solid var(--cream3); background: var(--cream2); border-radius: var(--r-lg); padding: 0.9rem; }
.signal-num { font-family: var(--serif); font-size: 1.75rem; line-height: 1; margin-bottom: 0.3rem; color: var(--terra); }
.signal-label { color: var(--ink5); font-size: 10px; text-transform: uppercase; letter-spacing: 0.11em; }
.signal-copy { color: var(--ink3); font-size: 13px; line-height: 1.65; }

.tabs-wrap {
  position: sticky; top: 57px; z-index: 200;
  background: rgba(250,248,243,0.94); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--cream3); margin: 0 -1.5rem; padding: 0 1.5rem;
}
.tabs { display: flex; gap: 0; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 0.85rem 1rem; border: none; background: none;
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--ink5); cursor: pointer; white-space: nowrap;
  border-bottom: 2px solid transparent; transition: all 0.18s; flex-shrink: 0;
}
.tab-btn:hover { color: var(--ink3); }
.tab-btn.active { color: var(--terra); border-bottom-color: var(--terra); }
.tab-icon { font-size: 14px; }
.tab-panel { padding-top: 1.5rem; }

/* fragment & frag rows */
.fragment-card, .frag-row {
  background: #fff; border: 1px solid var(--cream3);
  border-radius: var(--r-xl); margin-bottom: 0.75rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.fragment-card { padding: 1.25rem; }
.fragment-card:hover, .frag-row:hover { box-shadow: 0 6px 28px rgba(28,22,18,0.09); transform: translateY(-1px); }
.fragment-text { font-family: var(--serif); font-size: 1.15rem; font-weight: 300; font-style: italic; line-height: 1.65; color: var(--ink); margin-bottom: 0.85rem; }
.frag-text { font-size: 14px; color: var(--ink2); line-height: 1.65; }
.fragment-meta { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }
.frag-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 1rem; padding: 1.1rem; align-items: start; }
.frag-main { min-width: 0; }
.frag-headline { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.frag-kicker { font-size: 10px; color: var(--ink5); text-transform: uppercase; letter-spacing: 0.11em; }
.frag-side { display: flex; flex-direction: column; gap: 0.4rem; align-items: flex-end; min-width: 100px; }
.frag-link { font-size: 12px; font-weight: 600; color: var(--terra); text-decoration: none; }
.frag-link:hover { text-decoration: underline; }

/* status pills */
.status-pill, .state-badge, .frag-mode-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 11px; border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
}
.status-pending   { background: var(--terra-dim);    color: var(--terra);    border: 1px solid rgba(197,103,62,0.2); }
.status-embedded  { background: var(--lavender-dim); color: var(--lavender); border: 1px solid rgba(146,128,192,0.2); }
.status-in_circle { background: var(--sage-dim);     color: var(--sage);     border: 1px solid rgba(110,158,114,0.2); }
.status-closed    { background: var(--cream3);        color: var(--ink4);     border: 1px solid var(--cream4); }
.frag-mode-badge.collective { background: var(--lavender-dim); color: var(--lavender); border: 1px solid rgba(146,128,192,0.2); }
.frag-mode-badge.private    { background: var(--sage-dim);     color: var(--sage);     border: 1px solid rgba(110,158,114,0.2); }

/* circle cards */
.circle-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); overflow: hidden; margin-bottom: 0.75rem; transition: box-shadow 0.2s, transform 0.2s; }
.circle-card:hover { box-shadow: 0 6px 28px rgba(28,22,18,0.09); transform: translateY(-1px); }
.circle-card-header { display: flex; align-items: flex-start; gap: 0.85rem; padding: 1.1rem 1.25rem 0; }
.circle-color-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }
.circle-card-title { font-family: var(--serif); font-size: 1.05rem; font-weight: 400; line-height: 1.3; color: var(--ink); }
.circle-card-body { padding: 0.5rem 1.25rem 1.1rem; }
.circle-synthesis { font-size: 13px; color: var(--ink3); line-height: 1.65; }
.circle-card-footer { padding: 0.7rem 1.25rem; border-top: 1px solid var(--cream2); display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* chip */
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; font-weight: 500; background: var(--cream2); color: var(--ink4); border: 1px solid var(--cream3); }

/* forms */
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 0.4rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; background: #fff; border: 1.5px solid var(--cream3); border-radius: var(--r-lg);
  padding: 10px 14px; font-family: var(--sans); font-size: 14px; color: var(--ink);
  transition: border-color 0.2s, box-shadow 0.2s; appearance: none;
}
.form-textarea { font-family: var(--serif); font-style: italic; font-size: 1rem; font-weight: 300; resize: vertical; line-height: 1.6; }
.form-input::placeholder, .form-textarea::placeholder { color: var(--ink5); }
.form-input:focus, .form-select:focus, .form-textarea:focus { outline: none; border-color: var(--terra); box-shadow: 0 0 0 3px var(--terra-dim); }

/* notifications */
.notif-item { display: flex; align-items: flex-start; gap: 0.85rem; padding: 1rem 0; border-bottom: 1px solid var(--cream2); transition: background 0.15s; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: rgba(197,103,62,0.04); border-radius: var(--r-lg); padding: 1rem; margin: 0 -1rem; }
.notif-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--cream2); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.notif-title { font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.notif-body  { font-size: 13px; color: var(--ink3); line-height: 1.55; }
.notif-time  { font-size: 11px; color: var(--ink5); margin-top: 3px; }
.list-shell  { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 0.5rem 1rem; }

/* empty state */
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 1rem; text-align: center; color: var(--ink5); }
.empty-state .glyph { font-size: 2rem; margin-bottom: 0.75rem; font-family: var(--serif); }
.empty-state p { font-size: 14px; line-height: 1.65; }

/* spinner */
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--cream3); border-top-color: var(--terra); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* toast */
.toast { position: fixed; bottom: calc(1.5rem + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--cream); padding: 10px 22px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; box-shadow: 0 8px 32px rgba(28,22,18,0.22); opacity: 0; pointer-events: none; z-index: 9999; transition: opacity 0.3s, transform 0.3s; white-space: nowrap; max-width: 90vw; text-align: center; }
.toast.show { opacity: 1; pointer-events: auto; }
.toast.error { background: #b83232; }

/* stats strip */
.stats-strip { display: flex; gap: 0; border: 1px solid var(--cream3); border-radius: var(--r-xl); overflow: hidden; background: #fff; margin-bottom: 1rem; box-shadow: 0 2px 12px rgba(28,22,18,0.05); }
.stat { flex: 1; padding: 1.1rem; text-align: center; border-right: 1px solid var(--cream3); }
.stat:last-child { border-right: none; }
.stat-num { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 400; color: var(--terra); line-height: 1; }
.stat-label { font-size: 11px; color: var(--ink5); margin-top: 3px; letter-spacing: 0.02em; }

/* landing hero */
.hero-landing { padding: 3.5rem 0 2.5rem; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--terra); font-weight: 600; margin-bottom: 0.75rem; }
.hero-landing h1 { font-family: var(--serif); font-size: clamp(2.8rem, 8vw, 5.5rem); font-weight: 300; line-height: 1.0; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 1.25rem; }
.hero-landing h1 em { font-style: italic; color: var(--terra); }
.hero-landing p { font-size: 1.05rem; color: var(--ink3); line-height: 1.8; max-width: 540px; margin-bottom: 2rem; }

/* auth */
.auth-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 2rem 1.25rem; background: var(--cream); }
.auth-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-2xl); padding: 2.5rem; width: 100%; max-width: 400px; box-shadow: 0 12px 60px rgba(28,22,18,0.10); }
.auth-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 2rem; }
.auth-logo .logo-mark { width: 32px; height: 32px; }
.auth-logo span { font-family: var(--serif); font-size: 1.3rem; font-weight: 400; color: var(--ink); }
.auth-title { font-family: var(--serif); font-size: 1.9rem; font-weight: 300; color: var(--ink); margin-bottom: 0.35rem; }
.auth-sub { font-size: 14px; color: var(--ink4); margin-bottom: 1.75rem; }
.auth-alt { margin-top: 1.25rem; text-align: center; font-size: 13px; color: var(--ink4); }
.auth-alt a { color: var(--terra); text-decoration: none; font-weight: 600; }

/* profile */
.profile-header { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: 1.5rem; padding: 1.5rem; background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); }
.profile-avatar-lg { width: 72px; height: 72px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 600; color: #fff; border: 3px solid rgba(255,255,255,0.8); }
.profile-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 400; color: var(--ink); }
.profile-bio { font-size: 14px; color: var(--ink3); line-height: 1.6; margin-top: 0.3rem; }

.section-head { margin-bottom: 1rem; }
.section-title { font-family: var(--serif); font-size: 1.4rem; font-weight: 400; color: var(--ink); }
.section-copy { font-size: 13px; color: var(--ink4); margin-top: 0.25rem; }
.page-shell { max-width: 720px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; position: relative; z-index: 1; }

/* tunnel messages */
.msg { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 1.1rem 1.25rem; margin-bottom: 0.65rem; }
.msg.is-mine { background: var(--cream2); }
.msg-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 0.5rem; }
.who { display: flex; align-items: center; gap: 8px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: #fff; flex-shrink: 0; }
.name { font-size: 13px; font-weight: 600; color: var(--ink2); }
.sub  { font-size: 11px; color: var(--ink5); }
.body { font-size: 14px; color: var(--ink); line-height: 1.65; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.5rem; margin-top: 0.75rem; }
.media-grid img, .media-grid video { width: 100%; border-radius: var(--r-lg); object-fit: cover; max-height: 300px; }
.media-grid video { background: #000; }
.media-grid video::-webkit-media-controls-panel { background: rgba(0,0,0,0.8); }

/* Full-width media on mobile (Facebook-style) */
@media (max-width: 720px) {
  .media-grid { 
    grid-template-columns: 1fr; 
    gap: 0; 
    margin-left: -1rem; 
    margin-right: -1rem; 
    border-radius: 0; 
  }
  .media-grid img, .media-grid video { 
    border-radius: 0; 
    max-height: 400px; 
    width: 100vw;
  }
}
.pill { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: var(--r-pill); font-size: 11px; background: var(--cream2); color: var(--ink4); border: 1px solid var(--cream3); }

/* orbs */
.orb-field { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.30; }
.orb-1 { width: 600px; height: 600px; top: -20%; left: -10%; background: var(--terra4); animation: orbdrift 20s ease-in-out infinite; }
.orb-2 { width: 500px; height: 500px; top: 40%; right: -15%; background: var(--sage3); animation: orbdrift 26s ease-in-out infinite reverse; }
.orb-3 { width: 440px; height: 440px; bottom: -15%; left: 30%; background: var(--lavender3); animation: orbdrift 22s ease-in-out infinite 5s; }
@keyframes orbdrift {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(32px, -28px); }
  66% { transform: translate(-24px, 22px); }
}

/* field vibration */
.field-vibration { position: relative; width: 100%; height: 560px; border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--cream3); background: radial-gradient(ellipse at 50% 30%, rgba(197,103,62,0.10), transparent 55%), radial-gradient(ellipse at 80% 70%, rgba(110,158,114,0.08), transparent 50%), var(--cream); box-shadow: 0 4px 32px rgba(28,22,18,0.06); }
.field-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.field-topline, .field-fragment, .field-hint, .field-stats { position: absolute; left: 50%; transform: translateX(-50%); z-index: 2; pointer-events: none; }
.field-topline { top: 1rem; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink5); white-space: nowrap; width: min(92%, 760px); text-align: center; }
.field-fragment { top: 2.4rem; width: min(92%, 640px); color: var(--ink3); font-family: var(--serif); font-size: 12px; font-style: italic; line-height: 1.5; text-align: center; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; background: rgba(255,255,255,0.72); backdrop-filter: blur(6px); border-radius: var(--r-pill); padding: 0.35rem 0.85rem; }
.field-hint { bottom: 1.2rem; width: min(92%, 640px); color: var(--ink5); font-size: 11px; letter-spacing: 0.06em; text-align: center; }
.field-stats { top: 5rem; display: flex; gap: 0.45rem; flex-wrap: wrap; justify-content: center; width: min(92%, 760px); }
.field-stat { border-radius: var(--r-pill); border: 1px solid var(--cream3); background: rgba(255,255,255,0.78); color: var(--ink4); font-size: 10px; letter-spacing: 0.07em; text-transform: uppercase; padding: 0.4rem 0.75rem; }
.field-overlay { position: absolute; inset: 7rem 1rem 4.5rem; z-index: 3; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.field-transmission { width: min(100%, 760px); max-height: 100%; overflow: auto; border-radius: var(--r-xl); border: 1px solid var(--cream3); background: rgba(255,255,255,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 1.4rem 1.3rem 1.2rem; box-shadow: 0 8px 40px rgba(28,22,18,0.12); text-align: left; opacity: 0; transform: translateY(12px) scale(0.98); transition: opacity 320ms ease, transform 320ms ease; pointer-events: none; }
.field-transmission.visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.field-transmission-label { margin-bottom: 0.65rem; color: var(--ink5); font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; text-align: center; }
.field-quote { color: var(--ink); font-family: var(--serif); font-size: 1rem; font-style: italic; line-height: 1.8; text-align: center; white-space: pre-wrap; }
.field-candidate { margin-top: 1rem; padding: 1rem; border-radius: var(--r-lg); border: 1px solid var(--terra4); background: var(--terra-dim); }
.field-candidate-label { margin-bottom: 0.55rem; color: var(--ink5); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; text-align: center; }
.field-candidate-text  { color: var(--ink); font-family: var(--serif); font-style: italic; font-size: 14px; line-height: 1.75; text-align: center; }
.field-candidate-meta  { margin-top: 0.65rem; color: var(--ink5); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; text-align: center; }
.field-actions { display: flex; justify-content: center; gap: 0.7rem; flex-wrap: wrap; margin-top: 0.95rem; }
.field-actions .btn { min-width: 160px; }
.field-empty { color: var(--ink4); text-align: center; line-height: 1.75; font-size: 14px; }
.field-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) 300px; gap: 1rem; align-items: start; }
.field-stage, .field-side { border: 1px solid var(--cream3); border-radius: var(--r-xl); background: #fff; }
.field-stage { padding: 1rem; }
.field-side { padding: 1rem; display: grid; gap: 1rem; }
.field-block-card { border: 1px solid var(--cream3); border-radius: var(--r-lg); background: var(--cream2); padding: 0.9rem; }
.field-list { display: grid; gap: 0.65rem; }
.field-fragment-chip { width: 100%; text-align: left; border: 1.5px solid var(--cream3); border-radius: var(--r-lg); background: #fff; color: var(--ink); padding: 0.85rem; cursor: pointer; transition: all 0.18s; }
.field-fragment-chip:hover, .field-fragment-chip.active { border-color: var(--terra3); background: var(--terra-dim); }
.field-fragment-chip strong { display: block; font-size: 13px; margin-bottom: 0.3rem; color: var(--ink); }
.field-fragment-chip p { font-size: 13px; color: var(--ink4); line-height: 1.55; }
.field-fragment-chip small { display: block; margin-top: 0.4rem; color: var(--ink5); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.ambient-grid { display: grid; gap: 0.65rem; }
.ambient-card { border: 1px solid var(--cream3); border-radius: var(--r-lg); background: var(--cream2); padding: 0.85rem; }
.ambient-card p { color: var(--ink3); font-size: 13px; line-height: 1.65; font-family: var(--serif); font-style: italic; }
.ambient-meta { margin-top: 0.5rem; color: var(--ink5); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.field-empty-state { display: grid; gap: 0.85rem; }
.field-empty-state p { color: var(--ink3); font-size: 14px; line-height: 1.7; }

/* submit/compose */
.submit-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) 290px; gap: 1rem; align-items: start; }
.composer-card, .guide-card { border: 1px solid var(--cream3); border-radius: var(--r-xl); background: #fff; padding: 1.25rem; }
.guide-card { position: sticky; top: 78px; background: var(--cream2); }
.mode-rail { margin-bottom: 1rem; padding: 1rem; border: 1px solid var(--terra4); border-radius: var(--r-lg); background: var(--terra-dim); }
.mode-toggle { display: flex; gap: 0.35rem; background: rgba(255,255,255,0.7); border: 1px solid var(--cream3); border-radius: var(--r-pill); padding: 4px; margin-bottom: 0.75rem; }
.mode-btn { flex: 1; padding: 0.5rem 1rem; border-radius: var(--r-pill); border: none; font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s; background: transparent; color: var(--ink4); }
.mode-btn.active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(28,22,18,0.10); }
.mode-note { color: var(--ink3); font-size: 13px; line-height: 1.65; }
.prompt-grid { display: grid; gap: 0.65rem; margin-bottom: 1rem; }
.prompt-card { margin-bottom: 0; border-radius: var(--r-lg); padding: 1rem 1.1rem; border: 1.5px solid var(--cream3); background: var(--cream2); transition: all 0.18s; cursor: pointer; }
.prompt-card:hover { border-color: var(--terra3); background: var(--terra-dim); }
.prompt-card.selected { border-color: var(--terra); background: var(--terra-dim); }
.prompt-card p { font-family: var(--serif); font-size: 1rem; line-height: 1.5; font-style: italic; color: var(--ink); }
.hint { margin-top: 0.4rem; font-size: 10px; color: var(--ink5); }
.compose-grid { display: grid; gap: 0.85rem; }
.field-block { border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 0.95rem; background: var(--cream2); }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.field-label span:first-child { color: var(--ink); font-size: 13px; font-weight: 600; }
textarea#fragment-text { min-height: 160px; border-radius: var(--r-lg); font-size: 15px; line-height: 1.75; }
.char-count { margin-top: 0.4rem; font-size: 11px; color: var(--ink5); }
.domain-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.domain-pill { padding: 0.45rem 0.85rem; border-radius: var(--r-pill); font-size: 11px; font-weight: 500; border: 1.5px solid var(--cream3); background: #fff; color: var(--ink3); cursor: pointer; transition: all 0.15s; }
.domain-pill:hover { border-color: var(--terra3); }
.domain-pill.active { border-color: var(--terra); background: var(--terra-dim); color: var(--terra); }
.media-uploader { border: 1.5px dashed var(--cream4); border-radius: var(--r-lg); padding: 1rem; background: rgba(255,255,255,0.5); }
.media-note { margin-bottom: 0.7rem; color: var(--ink4); font-size: 13px; line-height: 1.65; }
.media-preview-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.8rem; }
.media-preview-pill { border-radius: var(--r-pill); border: 1px solid var(--cream4); padding: 0.35rem 0.65rem; background: #fff; color: var(--ink3); font-size: 10px; }
.collective-options { padding: 1rem; border-radius: var(--r-lg); border: 1px solid var(--lavender3); background: var(--lavender-dim); }
.collective-label { margin-bottom: 0.75rem; font-size: 13px; font-weight: 600; color: var(--lavender); }
.color-row { display: flex; gap: 0.6rem; margin-top: 0.75rem; }
.color-swatch { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; transition: all 0.18s; border: 3px solid transparent; }
.color-swatch.active { border-color: var(--ink); transform: scale(1.15); }
.action-row { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; margin-top: 0.35rem; }
.micro-copy { color: var(--ink5); font-size: 11px; line-height: 1.6; }
.guide-list { display: grid; gap: 0.65rem; }
.guide-item { border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 0.85rem; background: #fff; }
.guide-step { color: var(--terra); font-size: 10px; text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: 0.3rem; }
.guide-item strong { display: block; color: var(--ink); font-size: 14px; margin-bottom: 0.2rem; }
.guide-item p { color: var(--ink3); font-size: 13px; line-height: 1.6; }
.sent-state { padding: 2.4rem 1rem 1.6rem; text-align: center; }
.sent-glyph { display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%; border: 1px solid var(--terra4); background: var(--terra-dim); color: var(--terra); font-family: var(--serif); font-size: 2rem; margin-bottom: 0.85rem; }

/* circles public */
.circles-shell { max-width: 860px; margin: 0 auto; padding: 0 1.25rem; position: relative; z-index: 1; }
.hero-band { background: linear-gradient(135deg, var(--lavender-dim) 0%, var(--terra-dim) 100%); border: 1px solid var(--lavender3); border-radius: var(--r-xl); padding: 1.5rem; margin-bottom: 1.25rem; }
.hero-kicker { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--terra); margin-bottom: 0.7rem; }
.hero-band h1 { font-family: var(--serif); font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.05; margin-bottom: 0.55rem; font-weight: 300; }
.hero-band p { max-width: 62ch; color: var(--ink3); font-size: 15px; }
.filter-bar { margin-bottom: 1.25rem; display: flex; gap: 0.55rem; flex-wrap: wrap; }
.feed { display: flex; flex-direction: column; gap: 1rem; }
.feed-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); overflow: hidden; cursor: pointer; transition: all 0.2s var(--ease); }
.feed-card:hover { border-color: var(--terra3); transform: translateY(-2px); box-shadow: 0 12px 40px rgba(28,22,18,0.10); }
.feed-media { width: 100%; background: var(--cream3); aspect-ratio: 16/9; overflow: hidden; position: relative; border-bottom: 1px solid var(--cream3); }
.feed-media img, .feed-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-media video { background: #000; }

/* Full-width cards on mobile (Facebook-style) */
@media (max-width: 720px) {
  .feed-card { 
    border-radius: 0; 
    border-left: none; 
    border-right: none; 
    margin-left: -1rem; 
    margin-right: -1rem; 
    margin-bottom: 0.5rem;
  }
  .feed-media { border-radius: 0; }
}
.feed-body { padding: 1rem; }
.feed-topline { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.8rem; flex-wrap: wrap; }
.author-chip { display: flex; align-items: center; gap: 0.7rem; min-width: 0; }
.author-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: #fff; flex-shrink: 0; }
.author-name { font-size: 14px; font-weight: 600; color: var(--ink); }
.author-time { font-size: 11px; color: var(--ink5); }
.feed-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 400; line-height: 1.3; color: var(--ink); margin-bottom: 0.5rem; }
.feed-synthesis { font-size: 13px; color: var(--ink3); line-height: 1.7; margin-bottom: 0.75rem; }
.feed-footer { display: flex; align-items: center; gap: 0.65rem; flex-wrap: wrap; }

/* vote */
.vote-option { display: flex; align-items: center; gap: 0.75rem; padding: 0.85rem; border: 1.5px solid var(--cream3); border-radius: var(--r-lg); cursor: pointer; transition: all 0.18s; background: #fff; }
.vote-option:hover { border-color: var(--terra3); background: var(--terra-dim); }
.vote-option.selected { border-color: var(--terra); background: var(--terra-dim); }

/* resonance */
.resonance-card { display: grid; gap: 0.8rem; padding: 1rem; border: 1px solid var(--cream3); border-radius: var(--r-xl); background: #fff; }
.resonance-top { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; flex-wrap: wrap; }
.resonance-kicker { font-size: 10px; color: var(--terra); text-transform: uppercase; letter-spacing: 0.12em; }
.resonance-copy { color: var(--ink2); font-size: 14px; line-height: 1.75; font-family: var(--serif); font-style: italic; }
.resonance-meta { color: var(--ink5); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; }
.resonance-media { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 0.6rem; }
.resonance-media img, .resonance-media video { width: 100%; height: 180px; object-fit: cover; border-radius: var(--r-lg); border: 1px solid var(--cream3); display: block; }
.resonance-media video { background: #000; }

/* responsive */
@media (max-width: 980px) {
  .dashboard-hero, .submit-layout, .field-layout { grid-template-columns: 1fr; }
  .guide-card { position: static; }
}
@media (max-width: 700px) {
  .dashboard-shell { padding: 0 1rem; }
  main { padding: 1rem 0 3rem; }
  .tabs-wrap { margin: 0 -1rem; padding: 0 1rem; }
  .frag-row { grid-template-columns: 1fr; }
  .frag-side { align-items: flex-start; min-width: 0; }
  .action-row .btn, .field-actions .btn { width: 100%; justify-content: center; }
}
@media (max-width: 640px) {
  .auth-card { padding: 1.75rem 1.25rem; }
  .stats-strip .stat-label { display: none; }
  .profile-header { flex-direction: column; }
}

/* animations */
@keyframes fadein { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.fadein { animation: fadein 0.45s var(--ease) both; }
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.65s var(--ease), transform 0.65s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

/* shimmer */
@keyframes shimmer { 0% { background-position: -600px 0; } 100% { background-position: 600px 0; } }
.shimmer-wrap { position: relative; background: var(--cream3); overflow: hidden; border-radius: inherit; }
.shimmer-wrap::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.55) 40%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0.55) 60%, transparent 100%); background-size: 600px 100%; animation: shimmer 1.4s infinite linear; }
.s-img { opacity: 0; transition: opacity 0.35s; width: 100%; height: 100%; object-fit: cover; display: block; }
.s-img.s-loaded { opacity: 1; }

/* lightbox */
#lightbox { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(28,22,18,0.90); align-items: center; justify-content: center; cursor: zoom-out; }
#lightbox.open { display: flex; }
#lightbox img, #lightbox video { max-width: min(92vw,1200px); max-height: 88vh; object-fit: contain; border-radius: var(--r-lg); }
#lightbox video { background: #000; }
#lb-close { position: fixed; top: 1.2rem; right: 1.4rem; background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.2); color: #fff; border-radius: 50%; width: 40px; height: 40px; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10000; }

/* ── Circle & Tunnel page styles ─────────────────────────────────────────── */
.shell { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }
.hero { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 1.5rem; margin-bottom: 1rem; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at top right, var(--terra4) 0%, transparent 60%), radial-gradient(ellipse at bottom left, var(--lavender3) 0%, transparent 60%); opacity: 0.45; }
.hero .eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terra); font-weight: 600; margin-bottom: 0.5rem; position: relative; z-index: 1; }
.hero .title { font-family: var(--serif); font-size: clamp(1.4rem, 4vw, 2.2rem); font-weight: 300; line-height: 1.2; color: var(--ink); margin-bottom: 0.5rem; position: relative; z-index: 1; }
.hero .copy { color: var(--ink3); font-size: 14px; line-height: 1.7; position: relative; z-index: 1; }
.hero .meta { font-size: 12px; color: var(--ink5); margin-top: 0.5rem; position: relative; z-index: 1; }
/* circle hero aliases */
.hero-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 1.5rem; position: relative; overflow: hidden; margin-bottom: 1rem; }
.hero-card::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at top right, var(--terra4) 0%, transparent 60%), radial-gradient(ellipse at bottom left, var(--lavender3) 0%, transparent 60%); opacity: 0.45; }
.hero-inner { position: relative; z-index: 1; }
.hero-title { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.5rem); font-weight: 300; line-height: 1.1; color: var(--ink); margin-bottom: 0.5rem; }
.hero-summary { color: var(--ink3); font-size: 14px; line-height: 1.7; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.hero-metrics { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.metric-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; background: var(--cream2); border: 1px solid var(--cream3); color: var(--ink4); }
.mode-badge { padding: 3px 10px; border-radius: var(--r-pill); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-open { background: var(--sage-dim); color: var(--sage); border: 1px solid var(--sage3); }
.badge-closed { background: var(--lavender-dim); color: var(--lavender); border: 1px solid var(--lavender3); }
/* insight cards */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.insight-card { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 1rem; }
.insight-card strong { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink5); margin-bottom: 0.4rem; }
.insight-card p { font-size: 14px; color: var(--ink2); line-height: 1.65; margin: 0; }
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.75rem; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; background: var(--lavender-dim); color: var(--lavender); border: 1px solid var(--lavender3); }
/* lifecycle */
.lifecycle-bar { display: flex; gap: 0.4rem; margin-bottom: 0.75rem; }
.lifecycle-step { flex: 1; height: 6px; border-radius: 3px; background: var(--cream3); }
.lifecycle-step.done { background: var(--terra); }
.lifecycle-step.active { background: var(--sage); }
.lifecycle-label { font-size: 11px; color: var(--ink5); text-transform: uppercase; letter-spacing: 0.06em; }
.lifecycle-desc { font-size: 13px; color: var(--ink3); line-height: 1.65; margin: 0; }
/* gate */
.gate-wrap { display: flex; align-items: center; justify-content: center; min-height: 50vh; }
.gate-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 2rem; max-width: 480px; width: 100%; text-align: center; }
.gate-card h1 { font-family: var(--serif); font-weight: 300; margin-bottom: 0.75rem; }
.gate-icon { font-size: 2.5rem; margin-bottom: 1rem; }
.gate-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center; margin-top: 1rem; }

/* tunnel messages (different from circle messages) */
.msg { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 0.85rem; margin-bottom: 0.65rem; }
.msg-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.4rem; }
.msg .body { font-size: 14px; color: var(--ink2); line-height: 1.7; }

/* reflection */
.reflection-item { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 1rem; margin-bottom: 0.75rem; }
.reflection-q { font-size: 13px; font-weight: 600; color: var(--ink3); margin-bottom: 0.3rem; }
.reflections-list { display: flex; flex-direction: column; gap: 0.5rem; }
/* fragment card (circle) */
.fragment-list { display: flex; flex-direction: column; gap: 0.75rem; }
.fragment-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 1rem; }
.fragment-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.5rem; }
.fragment-text { font-size: 14px; color: var(--ink2); line-height: 1.7; }
/* member */
.member-list { display: flex; flex-direction: column; gap: 0.5rem; }
.member-row { display: flex; align-items: center; gap: 0.75rem; }
.member-copy { font-size: 13px; color: var(--ink2); }
.member-role { font-size: 11px; color: var(--ink5); }
/* request list */
.request-list { display: flex; flex-direction: column; gap: 0.5rem; }
.request-row { display: flex; align-items: center; gap: 0.75rem; background: var(--cream2); border-radius: var(--r-lg); padding: 0.75rem; }
.request-actions { margin-left: auto; display: flex; gap: 0.4rem; }
/* action pill */
.action-pill { display: inline-flex; align-items: center; gap: 0.4rem; padding: 6px 14px; border-radius: var(--r-pill); background: var(--cream2); border: 1px solid var(--cream3); color: var(--ink3); font-size: 13px; text-decoration: none; transition: all 0.15s; }
.action-pill:hover { background: var(--terra-dim); color: var(--terra); border-color: var(--terra4); }
/* composer */
.composer { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 1rem; }
.composer-preview { font-size: 13px; color: var(--ink4); font-style: italic; margin-bottom: 0.5rem; }
.composer-tools { display: flex; align-items: center; gap: 0.4rem; margin-top: 0.5rem; flex-wrap: wrap; }
.composer-meta { font-size: 11px; color: var(--ink5); }
.msg-head { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.4rem; }
.file-pill { display: inline-flex; align-items: center; gap: 0.3rem; padding: 3px 8px; border-radius: var(--r-pill); background: var(--cream2); border: 1px solid var(--cream3); font-size: 11px; color: var(--ink4); }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 0.4rem; margin-top: 0.5rem; }
/* tunnel-specific */
.why-matched { background: var(--lavender-dim); border: 1px solid var(--lavender3); border-radius: var(--r-lg); padding: 1rem; margin-bottom: 1rem; }
.why-matched .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--lavender); font-weight: 600; margin-bottom: 0.4rem; }
.fragment-preview { background: var(--terra-dim); border: 1px solid var(--terra4); border-radius: var(--r-lg); padding: 1rem; margin-bottom: 1rem; font-size: 14px; color: var(--ink2); line-height: 1.7; font-style: italic; }
.mediation-bar { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.75rem; flex-wrap: wrap; }
.med-btn { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-pill); padding: 4px 12px; font-size: 12px; color: var(--ink3); cursor: pointer; transition: all 0.15s; }
.med-btn:hover { background: var(--lavender-dim); color: var(--lavender); border-color: var(--lavender3); }
.mediation-result { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 0.85rem; margin-bottom: 0.75rem; min-height: 3rem; }
.mediation-mode-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink5); margin-bottom: 0.3rem; }
.declined-banner { text-align: center; padding: 3rem 1rem; color: var(--ink3); }
/* msg in tunnel */
.msg { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 0.85rem; margin-bottom: 0.5rem; }
.msg .who { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.3rem; }
.msg .name { font-size: 13px; font-weight: 600; color: var(--ink); }
.msg .sub { font-size: 11px; color: var(--ink5); }
.msg .body { font-size: 14px; color: var(--ink2); line-height: 1.7; }
.msg .pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: var(--r-pill); font-size: 10px; background: var(--sage-dim); color: var(--sage); border: 1px solid var(--sage3); margin-top: 0.3rem; }
.msg-form { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 1rem; }
.pending-gate { text-align: center; padding: 3rem 1rem; }
/* vote section */
.vote-section { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-xl); padding: 1rem; margin-bottom: 1rem; }
/* side-copy */
.side-copy { font-size: 13px; color: var(--ink3); line-height: 1.65; margin-top: 0.4rem; }
/* section-title & eyebrow (aliases) */
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--terra); font-weight: 600; margin-bottom: 0.3rem; }

/* ── Circle page — missing pieces ────────────────────────────────────────── */
/* Two-column layout: section + aside */
.page-shell section { min-width: 0; }
.page-shell aside { display: flex; flex-direction: column; gap: 0.75rem; min-width: 0; }
@media (min-width: 720px) {
  .page-shell { display: grid; grid-template-columns: 1fr 260px; gap: 1.25rem; max-width: 1000px; align-items: start; }
}

/* surface padding */
.surface { padding: 1.1rem; margin-bottom: 0.85rem; }
.surface .section-title { margin-bottom: 0.75rem; }

/* mode badges */
.mode-badge.open       { background: var(--sage-dim);     color: var(--sage);     border: 1px solid var(--sage3); }
.mode-badge.closed     { background: var(--lavender-dim); color: var(--lavender); border: 1px solid var(--lavender3); }
.mode-badge.private    { background: var(--terra-dim);    color: var(--terra);    border: 1px solid var(--terra4); }
.mode-badge.collective { background: var(--cream2);       color: var(--ink4);     border: 1px solid var(--cream3); }

/* generic .badge + dot (used alongside mode-badge) */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* action-pill primary variant */
.action-pill.primary { background: var(--terra); color: #fff; border-color: var(--terra); }
.action-pill.primary:hover { background: var(--terra2,#b85c30); border-color: var(--terra2,#b85c30); color: #fff; }
.action-pill.liked { background: var(--lavender-dim); color: var(--lavender); border-color: var(--lavender3); }

/* approve / deny buttons in requests list */
.approve, .deny { padding: 4px 12px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid; transition: all 0.15s; }
.approve { background: var(--sage-dim); color: var(--sage); border-color: var(--sage3); }
.approve:hover { background: var(--sage); color: #fff; }
.deny { background: var(--cream2); color: var(--ink4); border-color: var(--cream3); }
.deny:hover { background: var(--terra-dim); color: var(--terra); border-color: var(--terra4); }

/* lifecycle labels row */
.lifecycle-labels { display: flex; gap: 0; margin-bottom: 0.4rem; }
.lifecycle-labels .lifecycle-label { flex: 1; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink5); }
.lifecycle-labels .lifecycle-label.done   { color: var(--terra); }
.lifecycle-labels .lifecycle-label.active { color: var(--sage); font-weight: 600; }
.lifecycle-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink5); }

/* reflection r-* helpers */
.r-who  { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.r-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.r-time { font-size: 11px; color: var(--ink5); margin-left: auto; }
.r-text { font-size: 14px; color: var(--ink2); line-height: 1.7; }

/* hero-card glow via CSS var */
.hero-card { --hero-glow: rgba(107,88,232,0.15); }
.hero-card::before { background: radial-gradient(ellipse at top right, var(--hero-glow) 0%, transparent 55%), radial-gradient(ellipse at bottom left, var(--lavender3) 0%, transparent 55%); }

/* side-card spacing */
.side-card { margin-bottom: 0; }
.side-card .section-title { font-size: 1rem; margin-bottom: 0.65rem; }

/* member-list gap */
.member-list { display: flex; flex-direction: column; gap: 0.6rem; }
.request-list { display: flex; flex-direction: column; gap: 0.5rem; }
.request-row { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.request-actions { margin-left: auto; display: flex; gap: 0.35rem; }

/* messages */
.messages { display: flex; flex-direction: column; gap: 0.65rem; margin-top: 0.75rem; }
.message-card { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); overflow: hidden; }
.message-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.45rem; }
.message-text { font-size: 14px; color: var(--ink2); line-height: 1.7; }

/* composer */
.msg-composer textarea, .composer textarea {
  width: 100%; background: var(--cream2); border: 1px solid var(--cream3);
  border-radius: var(--r-lg); padding: 0.75rem; font-family: var(--sans);
  font-size: 14px; color: var(--ink); resize: vertical; min-height: 80px;
  outline: none; transition: border-color 0.15s;
}
.msg-composer textarea:focus, .composer textarea:focus { border-color: var(--terra3); }
.composer-tools { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.6rem; flex-wrap: wrap; }
.composer-meta { display: flex; align-items: center; gap: 0.5rem; flex: 1; flex-wrap: wrap; }
.composer-preview { font-size: 12px; color: var(--ink5); margin-top: 0.35rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* join-card / admin-card */
#join-card, #admin-card, #governance-card { display: none; }

/* fragment-card */
.fragment-card { background: #fff; border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 1rem; margin-bottom: 0.65rem; }
.fragment-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.5rem; }
.fragment-text { font-size: 14px; color: var(--ink2); line-height: 1.7; }
.fragment-list { display: flex; flex-direction: column; }

/* person-chip */
.person-chip { display: flex; align-items: center; gap: 0.55rem; flex: 1; min-width: 0; }
.person-chip > div:last-child { flex: 1; min-width: 0; }
.person-name { font-size: 13px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-sub  { font-size: 11px; color: var(--ink5); margin-top: 1px; }

/* avatar */
.avatar { border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0;
  width: 34px; height: 34px; }

/* tag-row */
.tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.65rem; }
.tag { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; background: var(--lavender-dim); color: var(--lavender); border: 1px solid var(--lavender3); }

/* insight-grid */
.insight-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.65rem; margin-bottom: 0.65rem; }
.insight-card { background: var(--cream2); border: 1px solid var(--cream3); border-radius: var(--r-lg); padding: 0.85rem; }
.insight-card strong { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink5); margin-bottom: 0.35rem; }
.insight-card p { font-size: 13px; color: var(--ink2); line-height: 1.65; margin: 0; }

/* media-grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.4rem; margin-top: 0.6rem; border-radius: var(--r-lg); overflow: hidden; }

/* hero-metrics / hero-actions / hero-badges */
.hero-badges  { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.6rem; }
.hero-metrics { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.metric-pill  { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: var(--r-pill); font-size: 11px; background: var(--cream2); border: 1px solid var(--cream3); color: var(--ink4); }
.hero-title   { font-family: var(--serif); font-size: clamp(1.5rem, 4vw, 2.4rem); font-weight: 300; line-height: 1.15; color: var(--ink); margin-bottom: 0.4rem; }
.hero-summary { color: var(--ink3); font-size: 14px; line-height: 1.7; }
