/* The Gathering: spaces, channels, threads and live chat, in the Ananda Loka design language.
   Layout: rail of spaces | channel list | the room | members. Every color comes from the theme tokens. */

.g-page { height: 100vh; height: 100dvh; overflow: hidden; }

.g-app {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 76px 268px minmax(0, 1fr) 256px;
  height: calc(100vh - 72px); height: calc(100dvh - 72px);
}
.g-app.members-hidden { grid-template-columns: 76px 268px minmax(0, 1fr); }
.g-app.members-hidden .g-members { display: none; }
.g-nav { display: contents; }

/* ---------- Rail of spaces ---------- */
.g-rail {
  grid-column: 1;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 16px 0;
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  overflow-y: auto; scrollbar-width: none;
}
.g-rail::-webkit-scrollbar { display: none; }
.g-space {
  position: relative; flex: none;
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink-2);
  font: 600 18px/1 var(--serif); letter-spacing: 0.02em;
  transition: border-radius 0.35s var(--ease), background-color 0.25s, color 0.25s, border-color 0.25s;
}
.g-space svg { width: 24px; height: 24px; }
.g-space:hover { border-radius: 16px; color: var(--ink); border-color: var(--ink-3); }
.g-space[aria-current="true"] { border-radius: 16px; background: var(--ink); border-color: var(--ink); color: var(--bg); }
.g-space::before {
  content: ""; position: absolute; left: -15px; top: 50%;
  width: 4px; height: 0; border-radius: 0 4px 4px 0;
  background: var(--accent); transform: translateY(-50%);
  transition: height 0.3s var(--ease);
}
.g-space:hover::before { height: 16px; }
.g-space[aria-current="true"]::before { height: 32px; }
.g-space .lock {
  position: absolute; right: -4px; bottom: -4px;
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg-2); color: var(--ink-3);
  border: 1px solid var(--line);
}
.g-space .lock svg { width: 11px; height: 11px; }
.g-rail-sep { width: 28px; height: 1px; background: var(--line-strong); flex: none; }

/* ---------- Channel list ---------- */
.g-side {
  grid-column: 2;
  display: flex; flex-direction: column; min-height: 0;
  background: var(--bg);
  border-right: 1px solid var(--line);
}
.g-side-head { padding: 22px 20px 16px; border-bottom: 1px solid var(--line); }
.g-side-head h2 { font-size: 28px; }
.g-side-head p { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-3); }
.g-channels { flex: 1; overflow-y: auto; padding: 6px 10px 18px; }
.g-group {
  padding: 18px 10px 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
}
.g-chan {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; color: var(--ink-2);
  transition: background-color 0.2s, color 0.2s;
}
.g-chan svg { width: 16px; height: 16px; flex: none; color: var(--ink-3); }
.g-chan span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-chan:hover { background: var(--surface-2); color: var(--ink); }
.g-chan[aria-current="page"] { background: var(--surface-2); color: var(--ink); font-weight: 600; }
.g-chan[aria-current="page"] > svg { color: var(--accent); }
.g-chan.locked { color: var(--ink-3); }
.g-chan .lk { margin-left: auto; width: 13px; height: 13px; opacity: 0.8; }
.g-chan .ro { font-style: normal; margin-left: auto; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* You panel */
.g-me { border-top: 1px solid var(--line); background: var(--bg-2); padding: 14px 14px 12px; display: grid; gap: 10px; }
.g-me-row { display: flex; align-items: center; gap: 10px; }
.g-me-name { font-size: 14px; font-weight: 700; line-height: 1.2; }
.g-me-row small { display: block; font-size: 12px; color: var(--ink-3); }
.g-viewas { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; font-size: 12px; font-weight: 600; color: var(--ink-3); letter-spacing: 0.04em; }
.g-select {
  appearance: none; -webkit-appearance: none;
  height: 34px; width: 100%; padding: 0 30px 0 12px;
  border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238f887a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  color: var(--ink); font: 600 13px var(--sans); cursor: pointer;
}
.g-select:focus { outline: none; border-color: var(--accent); }
.g-proto { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--ink-3); line-height: 1.35; }
.g-link { background: none; border: 0; padding: 0; font: 600 11.5px var(--sans); color: var(--accent); cursor: pointer; white-space: nowrap; }
.g-link:hover { text-decoration: underline; }

/* ---------- The room ---------- */
.g-main { grid-column: 3; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--surface); }
.g-head {
  flex: none; display: flex; align-items: center; gap: 14px;
  height: 64px; padding: 0 16px 0 24px;
  border-bottom: 1px solid var(--line);
}
.g-head h1 { display: flex; align-items: center; gap: 9px; font-size: 25px; white-space: nowrap; }
.g-head h1 svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.g-topic {
  margin: 0; min-width: 0; padding-left: 14px; border-left: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.g-head-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex: none; }
.g-here { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink-3); margin-right: 6px; white-space: nowrap; }
.g-here i { width: 8px; height: 8px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px var(--online-soft); }
.g-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 1px solid transparent; background: none; color: var(--ink-2); cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.g-icon-btn svg { width: 20px; height: 20px; }
.g-icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.g-icon-btn[aria-pressed="true"] { color: var(--accent); }
.g-only-m { display: none; }

.g-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 28px clamp(16px, 3vw, 40px) 32px; }
.g-col { max-width: 800px; margin-inline: auto; }

.g-intro { margin-bottom: 22px; }
.g-intro h2 { font-size: clamp(30px, 3.2vw, 40px); margin: 12px 0 8px; }
.g-intro p { margin: 0; color: var(--ink-2); font-size: 15.5px; max-width: 40em; }
.g-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.g-toolbar .muted { font-size: 13.5px; }
.g-note {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 16px; margin-bottom: 18px; border-radius: 12px;
  background: var(--accent-soft); color: var(--ink-2); font-size: 13.5px; line-height: 1.55;
}
.g-note svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }

/* Avatars: a hue per person, softened for each theme */
.av {
  --h: 30;
  position: relative; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 15px/1 var(--sans);
  background: hsl(var(--h) 40% 86%); color: hsl(var(--h) 48% 26%);
}
[data-theme="dark"] .av { background: hsl(var(--h) 24% 25%); color: hsl(var(--h) 50% 84%); }
.av.sm { width: 32px; height: 32px; font-size: 12.5px; }
.av.founder { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3.5px var(--accent); }
.av .dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--online); border: 2.5px solid var(--bg); }
.g-me .av .dot { border-color: var(--bg-2); }

:root, [data-theme="light"] { --online: #3f8a5a; --online-soft: rgba(63, 138, 90, 0.16); }
[data-theme="dark"] { --online: #6cc08b; --online-soft: rgba(108, 192, 139, 0.16); }

/* ---------- Live chat ---------- */
.g-chat { display: flex; flex-direction: column; justify-content: flex-end; min-height: 100%; }
.g-chat-start { padding: 8px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.g-chat-start .seal { width: 56px; height: 56px; margin-bottom: 14px; }
.g-chat-start h2 { font-size: 32px; margin-bottom: 6px; }
.g-chat-start p { margin: 0; color: var(--ink-2); font-size: 15px; }
.g-day { display: flex; align-items: center; gap: 14px; margin: 18px 0 6px; font-size: 12px; font-weight: 600; color: var(--ink-3); }
.g-day::before, .g-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.g-msg { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 0 14px; padding: 8px 10px; margin: 0 -10px; border-radius: 12px; }
.g-msg:hover { background: var(--bg); }
.g-msg.cont { padding-top: 1px; }
.g-msg.cont .av { visibility: hidden; height: 0; }
.g-msg.mine .g-msg-name { color: var(--accent); }
.g-msg-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 9px; }
.g-msg-name { font-size: 14.5px; font-weight: 700; }
.g-role { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); }
.g-time { font-size: 12px; color: var(--ink-3); }
.g-msg-body { font-size: 15.5px; line-height: 1.6; color: var(--ink); overflow-wrap: anywhere; }
.g-msg-body p { margin: 0 0 0.5em; }
.g-msg-body p:last-child { margin: 0; }
.g-msg.fresh { animation: g-in 0.45s var(--ease); }
@keyframes g-in { from { opacity: 0; transform: translateY(6px); } }

/* Composer */
.g-composer { flex: none; padding: 0 clamp(16px, 3vw, 40px) 18px; }
.g-composer.inline { padding: 0; margin-top: 22px; }
.g-compose {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 7px 7px 7px 18px; border-radius: 18px;
  border: 1px solid var(--line-strong); background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.g-compose:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.g-compose textarea {
  flex: 1; min-width: 0; max-height: 180px; min-height: 26px;
  padding: 9px 0; border: 0; outline: none; resize: none;
  background: none; color: var(--ink); font: 500 15.5px/1.5 var(--sans);
}
.g-compose textarea::placeholder, .g-input::placeholder { color: var(--ink-3); }
.g-send {
  width: 42px; height: 42px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  border: 0; background: var(--ink); color: var(--bg); cursor: pointer;
  transition: background-color 0.2s, transform 0.2s var(--ease);
}
.g-send svg { width: 18px; height: 18px; }
.g-send:hover { background: var(--accent); color: var(--on-accent); transform: translateY(-1px); }
.g-hint { margin: 7px 0 0 6px; font-size: 12px; color: var(--ink-3); }
.g-gate {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 10px 10px 10px 18px; border-radius: 18px;
  border: 1px dashed var(--line-strong); background: var(--bg);
  font-size: 14.5px; color: var(--ink-2);
}
.g-gate.quiet { justify-content: center; text-align: center; padding: 14px 18px; }

/* ---------- Threads ---------- */
.g-threads { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.g-thread {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 16px 18px; transition: background-color 0.2s;
}
.g-thread + .g-thread { border-top: 1px solid var(--line); }
.g-thread:hover { background: var(--surface-2); }
.g-thread h3 { font-family: var(--sans); font-size: 16px; font-weight: 700; line-height: 1.35; letter-spacing: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-thread p { margin: 4px 0 0; font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g-thread-meta { margin-top: 7px; font-size: 12.5px; color: var(--ink-3); }
.g-thread-stats { text-align: right; font-size: 12px; color: var(--ink-3); white-space: nowrap; line-height: 1.2; }
.g-thread-stats strong { display: block; font-family: var(--serif); font-size: 24px; font-weight: 500; color: var(--ink); }
.g-pinned { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.g-empty { padding: 34px 20px; text-align: center; color: var(--ink-3); font-size: 14.5px; }

.g-form { display: grid; gap: 12px; padding: 20px; margin-bottom: 16px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--bg); }
.g-form h3 { font-size: 24px; }
.g-input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 500 15.5px/1.5 var(--sans);
  transition: border-color 0.2s, box-shadow 0.2s;
}
textarea.g-input { min-height: 120px; resize: vertical; }
.g-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.g-form-actions { display: flex; justify-content: flex-end; gap: 10px; }

.g-back { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.g-back svg { width: 16px; height: 16px; }
.g-back:hover { color: var(--accent); }
.g-post { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.g-post h2 { font-size: clamp(30px, 3.4vw, 40px); margin: 14px 0 14px; }
.g-post-body p { font-size: 16.5px; line-height: 1.7; }
.g-post-body p:last-child { margin-bottom: 0; }
.g-byline { display: flex; align-items: center; gap: 12px; }
.g-byline .g-msg-name { display: block; }
.g-replies-head { margin: 30px 0 4px; }
.g-reply { padding: 14px 10px; }
.g-reply + .g-reply { border-top: 1px solid var(--line); border-radius: 0; }

/* ---------- Council: proposals ---------- */
.g-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.g-props { display: grid; gap: 16px; }
.g-prop { padding: clamp(18px, 2.6vw, 26px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.g-prop-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-prop h3 { font-size: clamp(24px, 2.4vw, 29px); margin: 12px 0 8px; }
.g-prop > p { margin: 0; color: var(--ink-2); font-size: 15px; }
.g-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 18px 0 4px; }
.g-track span { padding-top: 8px; border-top: 3px solid var(--line-strong); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.g-track span.done { border-color: var(--gold-line); color: var(--ink-2); }
.g-track span.on { border-color: var(--accent); color: var(--accent); }
.g-tally { display: grid; gap: 8px; margin: 18px 0 6px; }
.g-bar { display: grid; grid-template-columns: 70px minmax(0, 1fr) 34px; align-items: center; gap: 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.g-bar i { position: relative; display: block; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.g-bar b { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--ink-3); transition: width 0.7s var(--ease); }
.g-bar.yes b { background: var(--accent); }
.g-bar.no b { background: var(--ink-2); }
.g-bar strong { text-align: right; color: var(--ink); font-variant-numeric: tabular-nums; }
.g-prop-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-3); }
.g-vote { display: flex; flex-wrap: wrap; gap: 6px; }
.g-result { font-family: var(--serif); font-style: italic; font-size: 19px; color: var(--accent); }

/* ---------- Projects ---------- */
.g-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.g-proj { display: flex; flex-direction: column; gap: 12px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.g-proj h3 { font-size: 25px; }
.g-proj > p { margin: 0; font-size: 14px; color: var(--ink-2); }
.g-proj-lead { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-3); }
.g-proj-lead strong { color: var(--ink); font-weight: 600; }
.g-tasks { list-style: none; margin: 4px 0 0; padding: 0; border-top: 1px solid var(--line); }
.g-tasks li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.g-tasks li.done span { text-decoration: line-through; color: var(--ink-3); }
.g-tasks small { font-size: 12px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.g-claim { height: 28px; padding: 0 12px; font-size: 12.5px; flex: none; }
.g-meter { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.g-meter b { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width 0.6s var(--ease); }

/* ---------- Events ---------- */
.g-events { display: grid; gap: 12px; }
.g-event { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.g-date { text-align: center; padding-right: 16px; border-right: 1px solid var(--line); line-height: 1; }
.g-date small { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.g-date strong { display: block; margin-top: 4px; font-family: var(--serif); font-size: 32px; font-weight: 500; }
.g-event h3 { font-size: 22px; }
.g-event p { margin: 3px 0 0; font-size: 13.5px; color: var(--ink-3); }

/* ---------- Decisions log ---------- */
.g-log { border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); overflow: hidden; }
.g-log-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 18px; align-items: baseline; padding: 16px 18px; }
.g-log-row + .g-log-row { border-top: 1px solid var(--line); }
.g-log-row time { font-size: 13px; font-weight: 600; color: var(--ink-3); }
.g-log-row h3 { font-family: var(--sans); font-size: 15.5px; font-weight: 700; letter-spacing: 0; line-height: 1.4; }
.g-log-row p { margin: 3px 0 0; font-size: 14px; color: var(--ink-2); }

/* ---------- Locked room ---------- */
.g-locked { max-width: 540px; margin: 7vh auto 0; padding: 40px clamp(20px, 4vw, 36px); text-align: center; border: 1px solid var(--line); border-radius: 24px; background: var(--bg); }
.seal { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold-line); color: var(--gold); }
.seal svg { width: 26px; height: 26px; }
.g-chat-start .seal { margin-left: 0; }
.g-locked h2 { font-size: 34px; margin-bottom: 10px; }
.g-locked p { color: var(--ink-2); font-size: 15.5px; }
.g-locked .acts { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.g-locked small { display: block; margin-top: 22px; font-size: 12.5px; line-height: 1.55; color: var(--ink-3); }

/* ---------- Members ---------- */
.g-members { grid-column: 4; overflow-y: auto; padding: 18px 14px 24px; background: var(--bg); border-left: 1px solid var(--line); }
.g-members h3 { padding: 16px 8px 6px; font: 700 11px var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.g-members h3:first-child { padding-top: 4px; }
.g-member { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.g-member:hover { background: var(--surface-2); }
.g-member .who { min-width: 0; line-height: 1.25; }
.g-member .who small { display: block; font-size: 12px; font-weight: 500; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g-member.off { opacity: 0.5; }
.g-member.me .who > span { color: var(--accent); }

/* ---------- Ways of the Loka dialog ---------- */
.g-dialog { width: 100%; max-width: min(560px, calc(100% - 32px)); padding: 0; border: 0; background: transparent; color: var(--ink); }
.g-dialog::backdrop { background: rgba(8, 8, 12, 0.5); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.g-dialog-inner { padding: clamp(24px, 4vw, 38px); border: 1px solid var(--line); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow); }
.g-dialog h2 { font-size: 38px; margin: 14px 0 8px; }
.g-dialog .muted { font-size: 15px; margin: 0; }
.g-dialog .honor { margin: 18px 0 0; }
.g-dialog .honor li { font-size: 15px; padding: 12px 0; }
.g-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.g-dialog[open] .g-dialog-inner { animation: g-pop 0.35s var(--ease); }
@keyframes g-pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

.g-scrim { display: none; position: fixed; inset: 72px 0 0 0; z-index: 35; background: rgba(8, 8, 12, 0.42); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .g-app, .g-app.members-hidden { grid-template-columns: 76px 252px minmax(0, 1fr); }
  .g-app .g-members, .g-app.members-hidden .g-members {
    display: block; position: fixed; top: 72px; right: 0; bottom: 0; z-index: 40;
    width: min(290px, 86vw);
    transform: translateX(100%); visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
    box-shadow: var(--shadow);
  }
  .g-app.members-open .g-members { transform: none; visibility: visible; transition: transform 0.35s var(--ease); }
  .g-app.members-open .g-scrim { display: block; }
}
@media (max-width: 820px) {
  .g-app, .g-app.members-hidden { grid-template-columns: minmax(0, 1fr); }
  .g-nav {
    display: flex; position: fixed; top: 72px; left: 0; bottom: 0; z-index: 40;
    width: min(344px, 90vw);
    transform: translateX(-100%); visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
    box-shadow: var(--shadow);
  }
  .g-app.nav-open .g-nav { transform: none; visibility: visible; transition: transform 0.35s var(--ease); }
  .g-app.nav-open .g-scrim { display: block; }
  .g-rail { flex: none; width: 72px; }
  .g-side { flex: 1; min-width: 0; }
  .g-main { grid-column: 1; }
  .g-only-m { display: grid; }
  .g-head { padding: 0 10px; gap: 6px; }
  .g-head h1 { font-size: 22px; min-width: 0; }
  .g-head h1 span { overflow: hidden; text-overflow: ellipsis; }
  .g-topic, .g-here { display: none; }
  .g-scroll { padding: 20px 16px 24px; }
  .g-composer { padding: 0 12px 12px; }
  .g-thread { grid-template-columns: 32px minmax(0, 1fr); padding: 14px; }
  .g-thread .av { width: 32px; height: 32px; font-size: 12.5px; }
  .g-thread-stats { grid-column: 2; text-align: left; }
  .g-thread-stats strong { display: inline; font-size: 15px; margin-right: 4px; }
  .g-event { grid-template-columns: 54px minmax(0, 1fr); }
  .g-event .chip { grid-column: 2; justify-self: start; }
  .g-log-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .g-track span { font-size: 9.5px; letter-spacing: 0.04em; }
  .g-hint { display: none; }
}

/* ---------- Live Gathering: accounts, tools, and feedback ---------- */
.g-me-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.g-me-acts .g-link { margin-left: auto; }
.g-msg { position: relative; }
.g-tools { position: absolute; top: 6px; right: 8px; display: flex; gap: 6px; opacity: 0; transition: opacity 0.15s; }
.g-msg:hover .g-tools, .g-msg:focus-within .g-tools { opacity: 1; }
.g-tool { background: none; border: 0; padding: 2px 4px; font: 600 12px var(--sans); color: var(--ink-3); cursor: pointer; border-radius: 6px; }
.g-tool:hover, .g-tool:focus-visible { color: var(--accent); background: var(--accent-soft); outline: none; }
.g-tools-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }
.g-steps { border-top: 0; margin: 0 0 8px; padding-top: 0; }
.g-person-link { background: none; border: 0; padding: 0; color: inherit; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 700; }
.g-person-link:hover { text-decoration: underline; }
button.g-member { width: 100%; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; font: inherit; font-size: 14px; font-weight: 600; }
button.g-member.me .who span { color: var(--accent); }
.g-members-note { padding: 0 8px; font-size: 13px; color: var(--ink-3); line-height: 1.45; }
.g-older { display: flex; justify-content: center; padding: 8px 0 16px; }
.g-loading::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: g-dots 1.2s steps(4) infinite; }
@keyframes g-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.g-busy { cursor: progress; }
.g-busy button[type="submit"], .g-busy .g-send { opacity: 0.6; pointer-events: none; }
.g-inline-form { display: flex; gap: 8px; margin-top: 12px; }
.g-inline-form .g-input { flex: 1; min-width: 0; }
.g-status { margin-top: 10px; }
.g-task-acts { display: inline-flex; align-items: center; gap: 6px; flex-shrink: 0; }
.g-tasks li.done .g-task-acts { text-decoration: none; }
.g-prop-open { display: inline-block; margin-top: 12px; font-size: 13.5px; font-weight: 700; color: var(--accent); }
.g-prop-open:hover { text-decoration: underline; }
.g-person .g-dialog-inner { display: grid; gap: 16px; }
.g-person-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.g-pause { margin: 0; }
.g-pause input[type="number"] { flex: 0 0 84px; }
.g-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: min(560px, calc(100% - 32px));
  padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14.5px; line-height: 1.45;
  box-shadow: var(--shadow); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s;
}
.g-toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .g-toast, .g-tools { transition: none; } .g-loading::after { animation: none; content: '...'; } }
