body[data-route="together"] {
  --tg-shell-surface: color-mix(in oklab, var(--surface-2) 92%, rgba(9, 14, 28, 0.88));
  --tg-shell-surface-strong: color-mix(in oklab, var(--surface-3) 88%, rgba(17, 24, 39, 0.92));
  --tg-shell-surface-soft: color-mix(in oklab, var(--accent-shared) 10%, var(--surface-2));
  --tg-shell-border: color-mix(in oklab, var(--accent-shared) 18%, rgba(255, 255, 255, 0.12));
  --tg-shell-border-strong: color-mix(in oklab, var(--accent-shared) 30%, rgba(255, 255, 255, 0.22));
  --tg-shell-ink: color-mix(in oklab, #fff 92%, var(--ink));
  --tg-shell-ink-muted: color-mix(in oklab, var(--tg-shell-ink) 60%, transparent);
  --tg-shell-shadow: 0 18px 48px rgba(3, 8, 20, 0.28);
  --tg-shell-shadow-soft: 0 12px 28px rgba(3, 8, 20, 0.18);
  --tg-shell-accent: color-mix(in oklab, var(--accent-shared) 86%, white 8%);
  --tg-shell-alert: color-mix(in oklab, #ff7a8a 72%, var(--accent-shared) 18%);
}

[data-theme="light"] body[data-route="together"],
body[data-route="together"][data-theme="light"],
[data-theme="light"] body[data-route="together"] {
  --tg-shell-surface: rgba(255, 255, 255, 0.94);
  --tg-shell-surface-strong: rgba(248, 250, 255, 0.98);
  --tg-shell-surface-soft: color-mix(in oklab, var(--accent-shared) 8%, white);
  --tg-shell-border: color-mix(in oklab, var(--accent-shared) 18%, rgba(15, 23, 42, 0.12));
  --tg-shell-border-strong: color-mix(in oklab, var(--accent-shared) 28%, rgba(15, 23, 42, 0.2));
  --tg-shell-ink: #162033;
  --tg-shell-ink-muted: rgba(22, 32, 51, 0.68);
  --tg-shell-shadow: 0 18px 44px rgba(118, 135, 164, 0.18);
  --tg-shell-shadow-soft: 0 10px 24px rgba(118, 135, 164, 0.14);
}

body[data-route="together"] #app {
  width: min(1420px, calc(100vw - 24px));
}

body[data-route="together"] .together-scroll,
body[data-route="together"] .tg-section-sheet,
body[data-route="together"] .tg-note-modal,
body[data-route="together"] .tg-note-compose-modal,
body[data-route="together"] .tg-pulse-history-modal,
body[data-route="together"] .tg-ritual-modal {
  color: var(--tg-shell-ink);
}

body[data-route="together"] .together-scroll {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-bottom: 40px;
}

body[data-route="together"] .together-scroll .glass-card,
body[data-route="together"] .tg-section-sheet,
body[data-route="together"] .tg-note-modal,
body[data-route="together"] .tg-note-compose-modal,
body[data-route="together"] .tg-pulse-history-modal,
body[data-route="together"] .tg-ritual-modal {
  background: var(--tg-shell-surface);
  border: 1px solid var(--tg-shell-border);
  border-radius: 24px;
  box-shadow: var(--tg-shell-shadow-soft);
}

body[data-route="together"] .together-scroll .glass-card::after,
body[data-route="together"] .tg-section-sheet::after,
body[data-route="together"] .tg-note-modal::after,
body[data-route="together"] .tg-note-compose-modal::after,
body[data-route="together"] .tg-pulse-history-modal::after,
body[data-route="together"] .tg-ritual-modal::after {
  display: none;
  content: none;
}

body[data-route="together"] .together-scroll .btn,
body[data-route="together"] .tg-note-modal .btn,
body[data-route="together"] .tg-note-compose-modal .btn,
body[data-route="together"] .tg-pulse-history-modal .btn,
body[data-route="together"] .tg-ritual-modal .btn,
body[data-route="together"] .tg-section-sheet button,
body[data-route="together"] .tg-hub-card {
  appearance: none;
  border-radius: 16px;
  border: 1px solid var(--tg-shell-border-strong);
  box-shadow: none;
  font-family: var(--font-body);
  transition:
    transform 180ms var(--ease-out),
    border-color 180ms var(--ease-out),
    background-color 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    color 180ms var(--ease-out);
}

body[data-route="together"] .together-scroll .btn,
body[data-route="together"] .tg-note-modal .btn,
body[data-route="together"] .tg-note-compose-modal .btn,
body[data-route="together"] .tg-pulse-history-modal .btn,
body[data-route="together"] .tg-ritual-modal .btn {
  min-height: 44px;
  padding: 0 16px;
  background: var(--tg-shell-surface-strong);
  color: var(--tg-shell-ink);
  font-size: 0.94rem;
  font-weight: 600;
}

body[data-route="together"] .together-scroll .btn:hover,
body[data-route="together"] .tg-note-modal .btn:hover,
body[data-route="together"] .tg-note-compose-modal .btn:hover,
body[data-route="together"] .tg-pulse-history-modal .btn:hover,
body[data-route="together"] .tg-ritual-modal .btn:hover,
body[data-route="together"] .tg-hub-card:hover,
body[data-route="together"] .tg-section-sheet button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in oklab, var(--accent-shared) 36%, var(--tg-shell-border-strong));
  background: color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface-strong));
}

body[data-route="together"] .together-scroll .btn:active,
body[data-route="together"] .tg-note-modal .btn:active,
body[data-route="together"] .tg-note-compose-modal .btn:active,
body[data-route="together"] .tg-pulse-history-modal .btn:active,
body[data-route="together"] .tg-ritual-modal .btn:active,
body[data-route="together"] .tg-hub-card:active,
body[data-route="together"] .tg-section-sheet button:active {
  transform: translateY(0);
}

body[data-route="together"] .together-scroll .btn.solid,
body[data-route="together"] .tg-note-modal .btn.solid,
body[data-route="together"] .tg-note-compose-modal .btn.solid,
body[data-route="together"] .tg-pulse-history-modal .btn.solid,
body[data-route="together"] .tg-ritual-modal .btn.solid {
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent-shared) 84%, #fff 6%), color-mix(in oklab, var(--accent-shared) 56%, #1d4ed8 18%));
  border-color: color-mix(in oklab, var(--accent-shared) 56%, rgba(255, 255, 255, 0.22));
  color: #f8fbff;
  box-shadow: 0 12px 26px color-mix(in oklab, var(--accent-shared) 22%, transparent);
}

body[data-route="together"] .together-scroll .btn.outline,
body[data-route="together"] .tg-note-modal .btn.outline,
body[data-route="together"] .tg-note-compose-modal .btn.outline,
body[data-route="together"] .tg-pulse-history-modal .btn.outline,
body[data-route="together"] .tg-ritual-modal .btn.outline {
  background: transparent;
}

body[data-route="together"] .together-scroll .btn.ghost,
body[data-route="together"] .tg-section-sheet .btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .together-scroll textarea,
body[data-route="together"] .together-scroll input,
body[data-route="together"] .together-scroll select,
body[data-route="together"] .tg-note-modal textarea,
body[data-route="together"] .tg-note-modal input,
body[data-route="together"] .tg-note-compose-modal textarea,
body[data-route="together"] .tg-note-compose-modal input,
body[data-route="together"] .tg-ritual-modal textarea,
body[data-route="together"] .tg-ritual-modal input {
  width: 100%;
  border-radius: 18px;
  border: 1px solid var(--tg-shell-border);
  background: var(--tg-shell-surface-strong);
  color: var(--tg-shell-ink);
  font-family: var(--font-body);
  font-size: 0.96rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

body[data-route="together"] .together-scroll textarea::placeholder,
body[data-route="together"] .together-scroll input::placeholder,
body[data-route="together"] .tg-note-modal textarea::placeholder,
body[data-route="together"] .tg-note-compose-modal textarea::placeholder,
body[data-route="together"] .tg-ritual-modal textarea::placeholder {
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .together-scroll :focus-visible,
body[data-route="together"] .tg-note-modal :focus-visible,
body[data-route="together"] .tg-note-compose-modal :focus-visible,
body[data-route="together"] .tg-pulse-history-modal :focus-visible,
body[data-route="together"] .tg-ritual-modal :focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent-shared) 62%, white);
  outline-offset: 2px;
}

body[data-route="together"] .tg-hero {
  display: grid;
  gap: 18px;
  padding: 26px;
  border: 1px solid var(--tg-shell-border-strong);
  border-radius: 30px;
  background:
    linear-gradient(155deg, color-mix(in oklab, var(--accent-shared) 11%, transparent) 0%, transparent 48%),
    linear-gradient(180deg, color-mix(in oklab, var(--surface-3) 92%, rgba(8, 12, 24, 0.9)) 0%, var(--tg-shell-surface) 100%);
  box-shadow: var(--tg-shell-shadow);
}

body[data-route="together"] .tg-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  align-items: stretch;
}

body[data-route="together"] .tg-hero-copy {
  display: grid;
  gap: 14px;
  align-content: start;
}

body[data-route="together"] .tg-hero-kicker,
body[data-route="together"] .tg-hero-focus-kicker,
body[data-route="together"] .tg-section-sheet-kicker,
body[data-route="together"] .tg-hub-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-hero-avatars {
  display: flex;
  align-items: center;
  gap: 10px;
}

body[data-route="together"] .tg-hero-avatar {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  border: 1px solid var(--tg-shell-border-strong);
  box-shadow: 0 10px 24px rgba(4, 10, 24, 0.18);
}

body[data-route="together"] .tg-hero-avatar.left,
body[data-route="together"] .tg-hero-avatar.right {
  margin: 0;
}

body[data-route="together"] .tg-hero-avatar.initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
  font-weight: 700;
}

body[data-route="together"] .tg-hero-heart {
  display: none;
}

body[data-route="together"] .tg-hero-names {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.06em;
}

body[data-route="together"] .tg-hero-counter {
  margin: 0;
  font-size: 1rem;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-hero-counter-note {
  margin: 2px 0 0;
  font-size: 0.84rem;
  line-height: 1.45;
  color: color-mix(in oklab, var(--accent-shared) 64%, var(--tg-shell-ink-muted));
}

body[data-route="together"] .tg-hero-counter-subnote {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-hero-moods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-route="together"] .tg-mood-chip,
body[data-route="together"] .tg-hero-focus-cue,
body[data-route="together"] .tg-goal-chip,
body[data-route="together"] .tg-hub-metric,
body[data-route="together"] .tg-checkin-status-chip,
body[data-route="together"] .tg-checkin-pulse-chip,
body[data-route="together"] .tg-chat-thread-chip,
body[data-route="together"] .tg-goal-filter,
body[data-route="together"] .tg-section-sheet-tab,
body[data-route="together"] .tg-notify-read-flag,
body[data-route="together"] .tg-pulse-risk-pill,
body[data-route="together"] .tg-pulse-history-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--tg-shell-border);
  background: var(--tg-shell-surface-strong);
  color: var(--tg-shell-ink);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: none;
}

body[data-route="together"] .tg-hero-online {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-online-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.55);
  box-shadow: 0 0 0 6px rgba(148, 163, 184, 0.08);
}

body[data-route="together"] .tg-online-dot.online {
  background: #40d98d;
  box-shadow: 0 0 0 6px rgba(64, 217, 141, 0.12);
}

body[data-route="together"] .tg-hero-focus {
  display: grid;
  gap: 12px;
  padding: 18px;
  align-content: start;
  background:
    linear-gradient(160deg, color-mix(in oklab, var(--accent-shared) 14%, transparent) 0%, transparent 60%),
    var(--tg-shell-surface);
}

body[data-route="together"] .tg-hero-focus-title,
body[data-route="together"] .tg-section-sheet-title,
body[data-route="together"] .tg-focus-title,
body[data-route="together"] .tg-hub-heading {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.05em;
}

body[data-route="together"] .tg-hero-focus-title {
  font-size: 1.36rem;
  line-height: 1.06;
}

body[data-route="together"] .tg-hero-focus-text,
body[data-route="together"] .tg-focus-copy,
body[data-route="together"] .tg-hub-intro,
body[data-route="together"] .tg-section-sheet-subtitle {
  margin: 0;
  color: var(--tg-shell-ink-muted);
  line-height: 1.5;
}

body[data-route="together"] .tg-hero-focus-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-route="together"] .tg-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-route="together"] .tg-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-route="together"] .tg-hero-stat,
body[data-route="together"] .tg-goal-stat,
body[data-route="together"] .tg-digest-score,
body[data-route="together"] .tg-digest-item {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 116px;
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid var(--tg-shell-border);
  background: var(--tg-shell-surface-strong);
  overflow: hidden;
  position: relative;
}

body[data-route="together"] .tg-hero-stat::before,
body[data-route="together"] .tg-hub-card::before {
  content: '';
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, color-mix(in oklab, var(--tg-card-accent, var(--accent-shared)) 14%, transparent) 0%, transparent 52%);
  opacity: 0.92;
}

body[data-route="together"] .tg-hero-stat.is-live {
  border-color: color-mix(in oklab, var(--accent-shared) 32%, var(--tg-shell-border));
}

body[data-route="together"] .tg-hero-stat.is-alert,
body[data-route="together"] .tg-goal-card.is-overdue,
body[data-route="together"] .tg-goal-chip.due.overdue {
  border-color: color-mix(in oklab, var(--tg-shell-alert) 42%, var(--tg-shell-border-strong));
  background: color-mix(in oklab, var(--tg-shell-alert) 9%, var(--tg-shell-surface-strong));
}

body[data-route="together"] .tg-hero-stat.is-calm {
  border-color: color-mix(in oklab, #40d98d 24%, var(--tg-shell-border));
}

body[data-route="together"] .tg-hero-stat-kicker {
  position: relative;
  z-index: 1;
  color: var(--tg-shell-ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body[data-route="together"] .tg-hero-stat-value,
body[data-route="together"] .tg-goal-stat-value,
body[data-route="together"] .tg-digest-score-value,
body[data-route="together"] .tg-digest-value {
  position: relative;
  z-index: 1;
  font-family: var(--font-display);
  font-size: 1.2rem;
  line-height: 1;
  letter-spacing: -0.04em;
}

body[data-route="together"] .tg-hero-stat-label,
body[data-route="together"] .tg-goal-stat-label,
body[data-route="together"] .tg-digest-score-label,
body[data-route="together"] .tg-digest-label {
  position: relative;
  z-index: 1;
  color: var(--tg-shell-ink-muted);
  font-size: 0.82rem;
}

body[data-route="together"] .tg-hero-stat-detail {
  position: relative;
  z-index: 1;
  margin: auto 0 0;
  color: var(--tg-shell-ink-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

body[data-route="together"] .tg-focus-head,
body[data-route="together"] .tg-hub-header {
  display: grid;
  gap: 6px;
}

body[data-route="together"] .tg-focus-title,
body[data-route="together"] .tg-hub-heading,
body[data-route="together"] .tg-section-sheet-title {
  font-size: 1.28rem;
  line-height: 1.08;
}

body[data-route="together"] .tg-focus-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-route="together"] .tg-focus-action,
body[data-route="together"] .tg-digest-action {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 136px;
  padding: 16px 18px;
  text-align: left;
  border-radius: 22px;
  border: 1px solid var(--tg-shell-border);
  background: var(--tg-shell-surface);
  color: var(--tg-shell-ink);
}

body[data-route="together"] .tg-focus-action {
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(160deg, color-mix(in oklab, var(--accent-shared) 7%, transparent) 0%, transparent 72%),
    var(--tg-shell-surface);
}

body[data-route="together"] .tg-focus-action.is-lead {
  grid-column: span 2;
  min-height: 164px;
  padding: 20px 22px;
  border-color: color-mix(in oklab, var(--accent-shared) 26%, var(--tg-shell-border-strong));
  background:
    linear-gradient(145deg, color-mix(in oklab, var(--accent-shared) 16%, transparent) 0%, transparent 58%),
    linear-gradient(180deg, color-mix(in oklab, var(--tg-shell-surface-strong) 94%, transparent) 0%, var(--tg-shell-surface) 100%);
  box-shadow: 0 18px 38px color-mix(in oklab, var(--accent-shared) 12%, transparent);
}

body[data-route="together"] .tg-focus-action.is-primary {
  border-color: color-mix(in oklab, var(--accent-karina) 30%, var(--tg-shell-border-strong));
  background:
    linear-gradient(145deg, color-mix(in oklab, var(--accent-karina) 14%, transparent) 0%, transparent 62%),
    linear-gradient(180deg, color-mix(in oklab, var(--tg-shell-surface-strong) 94%, transparent) 0%, var(--tg-shell-surface) 100%);
}

body[data-route="together"] .tg-focus-action-kicker {
  color: var(--tg-shell-ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body[data-route="together"] .tg-focus-action-label,
body[data-route="together"] .tg-digest-action-label {
  font-size: 0.98rem;
  font-weight: 700;
}

body[data-route="together"] .tg-focus-action-hint,
body[data-route="together"] .tg-digest-action-hint {
  font-size: 0.84rem;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-focus-action-meta {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: fit-content;
  margin-top: auto;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--tg-shell-border);
  background: var(--tg-shell-surface-strong);
  color: var(--tg-shell-ink);
  font-size: 0.78rem;
  font-weight: 700;
}

body[data-route="together"] .tg-hub-section {
  gap: 16px;
}

body[data-route="together"] .tg-hub-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

body[data-route="together"] .tg-hub-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  min-height: 188px;
  text-align: left;
  overflow: hidden;
  position: relative;
  background:
    linear-gradient(155deg, color-mix(in oklab, var(--tg-card-accent, var(--accent-shared)) 10%, transparent) 0%, transparent 54%),
    var(--tg-shell-surface);
}

body[data-route="together"] .tg-hub-card.active {
  border-color: color-mix(in oklab, var(--accent-shared) 34%, var(--tg-shell-border-strong));
  background:
    linear-gradient(155deg, color-mix(in oklab, var(--tg-card-accent, var(--accent-shared)) 16%, transparent) 0%, transparent 56%),
    color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface));
  box-shadow: 0 16px 32px color-mix(in oklab, var(--accent-shared) 12%, transparent);
}

body[data-route="together"] .tg-hub-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

body[data-route="together"] .tg-hub-card-index,
body[data-route="together"] .tg-hub-card-state {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid var(--tg-shell-border);
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 92%, transparent);
  color: var(--tg-shell-ink-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body[data-route="together"] .tg-hub-card.is-attention .tg-hub-card-state {
  border-color: color-mix(in oklab, var(--tg-shell-alert) 42%, var(--tg-shell-border));
  color: color-mix(in oklab, var(--tg-shell-alert) 76%, white 10%);
}

body[data-route="together"] .tg-hub-card.is-calm .tg-hub-card-state {
  border-color: color-mix(in oklab, #40d98d 28%, var(--tg-shell-border));
  color: color-mix(in oklab, #40d98d 72%, white 10%);
}

body[data-route="together"] .tg-hub-card.is-live .tg-hub-card-state,
body[data-route="together"] .tg-hub-card.is-spotlight .tg-hub-card-state {
  border-color: color-mix(in oklab, var(--tg-card-accent, var(--accent-shared)) 30%, var(--tg-shell-border));
  color: color-mix(in oklab, var(--tg-card-accent, var(--accent-shared)) 76%, white 8%);
}

body[data-route="together"] .tg-hub-card-head {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

body[data-route="together"] .tg-hub-card-text {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-route="together"] .tg-hub-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.03em;
}

body[data-route="together"] .tg-hub-subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: var(--tg-shell-ink-muted);
  line-height: 1.45;
}

body[data-route="together"] .tg-hub-badge {
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid color-mix(in oklab, var(--tg-shell-alert) 40%, var(--tg-shell-border));
  background: color-mix(in oklab, var(--tg-shell-alert) 10%, var(--tg-shell-surface-strong));
  color: var(--tg-shell-ink);
  font-size: 0.82rem;
  font-weight: 800;
}

body[data-route="together"] .tg-hub-card-foot {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 12px;
  margin-top: auto;
}

body[data-route="together"] .tg-hub-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-route="together"] .tg-hub-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: color-mix(in oklab, var(--accent-shared) 76%, white 12%);
}

body[data-route="together"] .tg-section-sheet {
  display: grid;
  gap: 20px;
  padding: 22px;
}

body[data-route="together"] .tg-section-sheet.no-enter {
  animation: none;
}

body[data-route="together"] .tg-section-sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

body[data-route="together"] .tg-section-sheet-copy {
  display: grid;
  gap: 6px;
}

body[data-route="together"] .tg-section-sheet-close {
  min-height: 38px;
  padding: 0 14px;
  background: transparent;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-section-sheet-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-route="together"] .tg-section-sheet-tab.active,
body[data-route="together"] .tg-chat-thread-chip.active,
body[data-route="together"] .tg-goal-filter.active {
  background: color-mix(in oklab, var(--accent-shared) 18%, var(--tg-shell-surface-strong));
  border-color: color-mix(in oklab, var(--accent-shared) 34%, var(--tg-shell-border));
  color: var(--tg-shell-ink);
}

body[data-route="together"] .tg-section-sheet-body {
  display: grid;
  gap: 18px;
}

body[data-route="together"] .tg-section-sheet-title {
  font-size: clamp(1.46rem, 1.2rem + 0.65vw, 1.9rem);
  line-height: 0.98;
}

body[data-route="together"] .tg-section-sheet-subtitle {
  max-width: 42ch;
  font-size: 0.98rem;
}

body[data-route="together"] .tg-section-sheet-tabs {
  padding-bottom: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

body[data-route="together"] .tg-section-sheet-tabs::-webkit-scrollbar {
  display: none;
}

body[data-route="together"] .tg-section-sheet-tab {
  min-height: 38px;
  padding-inline: 14px;
  white-space: nowrap;
}

body[data-route="together"] .tg-section,
body[data-route="together"] .tg-chat-section {
  display: grid;
  gap: 14px;
}

body[data-route="together"] .tg-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

body[data-route="together"] .tg-section-head > .btn,
body[data-route="together"] .tg-section-head > button {
  margin-left: auto;
}

body[data-route="together"] .tg-section-emoji {
  display: none;
}

body[data-route="together"] .tg-section-title,
body[data-route="together"] .tg-note-modal-title,
body[data-route="together"] .tg-pulse-history-title,
body[data-route="together"] .tg-ritual-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.04em;
}

body[data-route="together"] .tg-empty,
body[data-route="together"] .tg-notify-summary,
body[data-route="together"] .tg-goal-context,
body[data-route="together"] .tg-goal-hint,
body[data-route="together"] .tg-pulse-explain,
body[data-route="together"] .tg-pulse-summary,
body[data-route="together"] .tg-pulse-next,
body[data-route="together"] .tg-digest-summary,
body[data-route="together"] .tg-digest-note,
body[data-route="together"] .tg-note-modal-from,
body[data-route="together"] .tg-note-modal-time {
  margin: 0;
  color: var(--tg-shell-ink-muted);
  font-style: normal;
  line-height: 1.5;
}

body[data-route="together"] .tg-empty {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border: 1px dashed color-mix(in oklab, var(--accent-shared) 24%, var(--tg-shell-border));
  border-radius: 22px;
  background:
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--accent-shared) 7%, var(--tg-shell-surface-strong)) 0%,
      color-mix(in oklab, var(--tg-shell-surface) 96%, transparent) 100%
    );
}

body[data-route="together"] .tg-checkin-card,
body[data-route="together"] .tg-chat-panel,
body[data-route="together"] .tg-notify-card,
body[data-route="together"] .tg-countdown-card,
body[data-route="together"] .tg-goal-card,
body[data-route="together"] .tg-secret-note-bubble,
body[data-route="together"] .tg-memory-content,
body[data-route="together"] .tg-suggestion-card,
body[data-route="together"] .tg-pulse-analytic-card,
body[data-route="together"] .tg-ritual-game,
body[data-route="together"] .tg-ritual-card,
body[data-route="together"] .tg-ritual-adv-block,
body[data-route="together"] .tg-ritual-overview,
body[data-route="together"] .tg-care-shop-panel,
body[data-route="together"] .tg-nudge-received-card,
body[data-route="together"] .tg-nudge-quick-btn {
  background: var(--tg-shell-surface);
  border: 1px solid var(--tg-shell-border);
  border-radius: 22px;
  box-shadow: none;
}

body[data-route="together"] .tg-checkin-card,
body[data-route="together"] .tg-chat-panel,
body[data-route="together"] .tg-memory-content,
body[data-route="together"] .tg-goal-card,
body[data-route="together"] .tg-pulse-analytic-card,
body[data-route="together"] .tg-ritual-game,
body[data-route="together"] .tg-countdown-card {
  padding: 18px;
}

body[data-route="together"] .tg-checkin-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  background:
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface-strong)) 0%,
      color-mix(in oklab, var(--tg-shell-surface) 96%, transparent) 100%
    );
}

body[data-route="together"] .tg-checkin-question,
body[data-route="together"] .tg-goal-title,
body[data-route="together"] .tg-countdown-title,
body[data-route="together"] .tg-notify-title,
body[data-route="together"] .tg-memory-title,
body[data-route="together"] .tg-pulse-analytic-main,
body[data-route="together"] .tg-secret-note-from {
  margin: 0;
  font-weight: 700;
  color: var(--tg-shell-ink);
}

body[data-route="together"] .tg-checkin-question {
  font-size: clamp(1.18rem, 1.06rem + 0.45vw, 1.42rem);
  line-height: 1.22;
  font-weight: 800;
  text-wrap: balance;
}

body[data-route="together"] .tg-checkin-status-row,
body[data-route="together"] .tg-goal-chips,
body[data-route="together"] .tg-chat-thread-row,
body[data-route="together"] .tg-pulse-history-chips,
body[data-route="together"] .tg-notify-actions,
body[data-route="together"] .tg-goal-actions,
body[data-route="together"] .tg-goal-filters,
body[data-route="together"] .tg-checkin-pulse-person-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-route="together"] .tg-checkin-status-row {
  align-items: center;
}

body[data-route="together"] .tg-checkin-streak,
body[data-route="together"] .tg-chat-day-divider span,
body[data-route="together"] .tg-countdown-kind,
body[data-route="together"] .tg-notify-time,
body[data-route="together"] .tg-memory-date,
body[data-route="together"] .tg-goal-updated,
body[data-route="together"] .tg-pulse-analytic-kicker,
body[data-route="together"] .tg-pulse-analytic-note,
body[data-route="together"] .tg-pulse-history-sub {
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-checkin-streak {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid color-mix(in oklab, var(--accent-shared) 22%, var(--tg-shell-border));
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface-strong));
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-route="together"] .tg-checkin-pulse-panel,
body[data-route="together"] .tg-checkin-pulse-item,
body[data-route="together"] .tg-pulse-reco-item,
body[data-route="together"] .tg-nudge-history-item,
body[data-route="together"] .tg-nudge-received-card,
body[data-route="together"] .tg-goal-stat,
body[data-route="together"] .tg-digest-item,
body[data-route="together"] .tg-digest-score {
  background: var(--tg-shell-surface-strong);
  border: 1px solid var(--tg-shell-border);
  border-radius: 20px;
}

body[data-route="together"] .tg-chat-panel {
  display: grid;
  gap: 16px;
  padding: 20px;
  border-radius: 24px;
  background:
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--accent-shared) 6%, var(--tg-shell-surface-strong)) 0%,
      color-mix(in oklab, var(--tg-shell-surface) 94%, transparent) 100%
    );
}

body[data-route="together"] .tg-chat-messages {
  display: grid;
  gap: 12px;
  max-height: 420px;
  padding-right: 4px;
}

body[data-route="together"] .tg-chat-msg-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

body[data-route="together"] .tg-chat-msg-row.mine {
  justify-content: flex-end;
}

body[data-route="together"] .tg-chat-msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--tg-shell-surface-strong);
  border: 1px solid var(--tg-shell-border);
  color: var(--tg-shell-ink-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

body[data-route="together"] .tg-chat-msg {
  max-width: min(100%, 38rem);
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid var(--tg-shell-border);
  background: var(--tg-shell-surface-strong);
}

body[data-route="together"] .tg-chat-msg.mine {
  background: color-mix(in oklab, var(--accent-shared) 14%, var(--tg-shell-surface-strong));
  border-color: color-mix(in oklab, var(--accent-shared) 30%, var(--tg-shell-border));
}

body[data-route="together"] .tg-chat-msg-text,
body[data-route="together"] .tg-memory-text,
body[data-route="together"] .tg-goal-details,
body[data-route="together"] .tg-notify-text,
body[data-route="together"] .tg-note-modal-text,
body[data-route="together"] .tg-secret-note-text {
  margin: 0;
  line-height: 1.55;
  color: var(--tg-shell-ink);
}

body[data-route="together"] .tg-chat-msg-meta,
body[data-route="together"] .tg-chat-shortcut,
body[data-route="together"] .tg-chat-charcount,
body[data-route="together"] .tg-chat-typing-text,
body[data-route="together"] .tg-checkin-shortcut,
body[data-route="together"] .tg-checkin-charcount,
body[data-route="together"] .tg-note-compose-count {
  color: var(--tg-shell-ink-muted);
  font-size: 0.82rem;
}

body[data-route="together"] .tg-chat-composer,
body[data-route="together"] .tg-checkin-composer,
body[data-route="together"] .tg-memory-composer {
  display: grid;
  gap: 12px;
}

body[data-route="together"] .tg-checkin-composer {
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--tg-shell-border);
}

body[data-route="together"] .tg-nudge-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-route="together"] .tg-nudge-stat {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--tg-shell-border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 94%, transparent);
  color: var(--tg-shell-ink-muted);
  font-size: 0.8rem;
  font-weight: 700;
}

body[data-route="together"] .tg-nudge-quick {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--tg-shell-border);
  border-radius: 24px;
  background:
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface-strong)) 0%,
      color-mix(in oklab, var(--tg-shell-surface) 96%, transparent) 100%
    );
}

body[data-route="together"] .tg-nudge-quick-title {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-nudge-quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-route="together"] .tg-nudge-quick-btn,
body[data-route="together"] .tg-nudge-btn,
body[data-route="together"] .tg-nudge-reply-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
}

body[data-route="together"] .tg-nudge-quick-btn,
body[data-route="together"] .tg-nudge-btn,
body[data-route="together"] .tg-nudge-reply-btn,
body[data-route="together"] .tg-chat-jump-btn {
  border: 1px solid var(--tg-shell-border);
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 94%, transparent);
  color: var(--tg-shell-ink);
}

body[data-route="together"] .tg-nudge-quick-btn:hover,
body[data-route="together"] .tg-nudge-btn:hover,
body[data-route="together"] .tg-nudge-reply-btn:hover,
body[data-route="together"] .tg-chat-jump-btn:hover {
  border-color: color-mix(in oklab, var(--accent-shared) 32%, var(--tg-shell-border));
  background: color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface-strong));
}

body[data-route="together"] .tg-nudge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-route="together"] .tg-nudge-btn.is-priority {
  border-color: color-mix(in oklab, var(--accent-shared) 34%, var(--tg-shell-border));
  background: color-mix(in oklab, var(--accent-shared) 12%, var(--tg-shell-surface-strong));
}

body[data-route="together"] .tg-nudge-received-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

body[data-route="together"] .tg-nudge-received-body {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body[data-route="together"] .tg-nudge-received-emoji {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface));
  font-size: 1.05rem;
}

body[data-route="together"] .tg-nudge-received-actions {
  display: flex;
  justify-content: flex-end;
}

body[data-route="together"] .tg-nudge-empty,
body[data-route="together"] .tg-nudge-received {
  margin: 0;
  padding: 16px 18px;
  border: 1px dashed color-mix(in oklab, var(--accent-shared) 24%, var(--tg-shell-border));
  border-radius: 20px;
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 96%, transparent);
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-chat-thread-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body[data-route="together"] .tg-chat-thread-chip {
  min-height: 38px;
  padding-inline: 14px;
}

body[data-route="together"] .tg-chat-thread-badge {
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent-shared) 24%, var(--tg-shell-surface));
  color: var(--tg-shell-ink);
  font-size: 0.72rem;
  font-weight: 800;
}

body[data-route="together"] .tg-chat-empty {
  margin: 0;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed var(--tg-shell-border);
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 94%, transparent);
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-chat-input {
  width: 100%;
  min-height: 120px;
  padding: 16px 18px;
  border: 1px solid var(--tg-shell-border);
  border-radius: 20px;
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 98%, transparent);
  color: var(--tg-shell-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
}

body[data-route="together"] .tg-checkin-input {
  width: 100%;
  min-height: 156px;
  padding: 18px 20px;
  border: 1px solid var(--tg-shell-border);
  border-radius: 22px;
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 98%, transparent);
  color: var(--tg-shell-ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  resize: vertical;
}

body[data-route="together"] .tg-checkin-input:focus {
  outline: 2px solid color-mix(in oklab, var(--accent-shared) 46%, white 8%);
  outline-offset: 2px;
  border-color: color-mix(in oklab, var(--accent-shared) 32%, var(--tg-shell-border));
}

body[data-route="together"] .tg-chat-input:focus {
  outline: 2px solid color-mix(in oklab, var(--accent-shared) 46%, white 8%);
  outline-offset: 2px;
  border-color: color-mix(in oklab, var(--accent-shared) 32%, var(--tg-shell-border));
}

body[data-route="together"] .tg-chat-actions {
  display: flex;
  justify-content: flex-end;
}

body[data-route="together"] .tg-chat-send-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 16px;
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
}

body[data-route="together"] .tg-chat-composer {
  padding-top: 12px;
  border-top: 1px solid var(--tg-shell-border);
}

body[data-route="together"] .tg-chat-composer-meta,
body[data-route="together"] .tg-checkin-meta,
body[data-route="together"] .tg-memory-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

body[data-route="together"] .tg-checkin-meta {
  padding-top: 4px;
}

body[data-route="together"] .tg-checkin-meta .btn.solid {
  min-width: 164px;
}

body[data-route="together"] .tg-goal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

body[data-route="together"] .tg-goal-toolbar {
  display: grid;
  gap: 12px;
}

body[data-route="together"] .tg-goal-card {
  display: grid;
  gap: 12px;
}

body[data-route="together"] .tg-goal-head,
body[data-route="together"] .tg-goal-foot,
body[data-route="together"] .tg-notify-card,
body[data-route="together"] .tg-note-modal-head,
body[data-route="together"] .tg-pulse-history-head,
body[data-route="together"] .tg-ritual-modal-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

body[data-route="together"] .tg-goal-progress,
body[data-route="together"] .tg-digest-bar,
body[data-route="together"] .tg-pulse-bar,
body[data-route="together"] .tg-pulse-mini-bar,
body[data-route="together"] .tg-pulse-history-bar,
body[data-route="together"] .tg-ritual-game-bar,
body[data-route="together"] .tg-ritual-challenge-bar {
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent-shared) 8%, rgba(255, 255, 255, 0.08));
}

body[data-route="together"] .tg-goal-progress-fill,
body[data-route="together"] .tg-digest-bar-fill,
body[data-route="together"] .tg-pulse-bar-fill,
body[data-route="together"] .tg-pulse-mini-fill,
body[data-route="together"] .tg-pulse-history-fill,
body[data-route="together"] .tg-ritual-game-bar-fill,
body[data-route="together"] .tg-ritual-challenge-fill {
  background: linear-gradient(90deg, color-mix(in oklab, var(--accent-shared) 70%, white 12%), color-mix(in oklab, var(--accent-shared) 40%, #38bdf8 28%));
}

body[data-route="together"] .tg-countdown-grid,
body[data-route="together"] .tg-pulse-analytics,
body[data-route="together"] .tg-digest-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body[data-route="together"] .tg-countdown-card {
  display: grid;
  gap: 6px;
  min-height: 170px;
}

body[data-route="together"] .tg-countdown-days {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--countdown-accent, var(--tg-shell-accent));
}

body[data-route="together"] .tg-countdown-unit,
body[data-route="together"] .tg-countdown-date {
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-notify-card {
  padding: 16px 18px;
  align-items: flex-start;
}

body[data-route="together"] .tg-notify-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body[data-route="together"] .tg-notify-open,
body[data-route="together"] .tg-notify-read,
body[data-route="together"] .tg-memory-delete,
body[data-route="together"] .tg-note-modal-close,
body[data-route="together"] .tg-pulse-history-close,
body[data-route="together"] .tg-ritual-modal-close {
  min-height: 34px;
  min-width: 34px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--tg-shell-border);
  background: var(--tg-shell-surface-strong);
  color: var(--tg-shell-ink);
}

body[data-route="together"] .tg-secret-notes-section,
body[data-route="together"] .tg-notify-group,
body[data-route="together"] .tg-memory-timeline,
body[data-route="together"] .tg-nudge-history {
  display: grid;
  gap: 12px;
}

body[data-route="together"] .tg-secret-notes-section {
  gap: 14px;
}

body[data-route="together"] .tg-secret-note-bubble {
  padding: 16px 18px;
  display: grid;
  gap: 12px;
  background:
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--accent-shared) 8%, var(--tg-shell-surface-strong)) 0%,
      color-mix(in oklab, var(--tg-shell-surface) 96%, transparent) 100%
    );
}

body[data-route="together"] .tg-secret-note-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

body[data-route="together"] .tg-secret-note-from {
  font-size: 0.94rem;
  line-height: 1.35;
}

body[data-route="together"] .tg-secret-note-text,
body[data-route="together"] .tg-note-modal-text {
  white-space: pre-wrap;
}

body[data-route="together"] .tg-secret-note-hint {
  color: var(--tg-shell-ink-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

body[data-route="together"] .tg-memory-timeline {
  position: relative;
  padding-left: 12px;
}

body[data-route="together"] .tg-memory-item {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

body[data-route="together"] .tg-memory-dot {
  width: 10px;
  height: 10px;
  margin-top: 18px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--accent-shared) 72%, white 10%);
  box-shadow: 0 0 0 6px color-mix(in oklab, var(--accent-shared) 18%, transparent);
}

body[data-route="together"] .tg-memory-photo {
  width: 100%;
  margin-top: 12px;
  border-radius: 18px;
  border: 1px solid var(--tg-shell-border);
}

body[data-route="together"] .tg-memory-content {
  display: grid;
  gap: 12px;
}

body[data-route="together"] .tg-memory-foot {
  padding-top: 12px;
  border-top: 1px solid var(--tg-shell-border);
}

body[data-route="together"] .tg-memory-author {
  color: var(--tg-shell-ink-muted);
  font-size: 0.84rem;
  font-weight: 700;
}

body[data-route="together"] .tg-pulse-controls,
body[data-route="together"] .tg-pulse-reco-list,
body[data-route="together"] .tg-suggestions,
body[data-route="together"] .tg-digest-insights,
body[data-route="together"] .tg-pulse-factors {
  display: grid;
  gap: 12px;
}

body[data-route="together"] .tg-pulse-reco-item,
body[data-route="together"] .tg-suggestion-card,
body[data-route="together"] .tg-digest-insight,
body[data-route="together"] .tg-pulse-factor {
  padding: 16px 18px;
}

body[data-route="together"] .tg-pulse-analytic-badge,
body[data-route="together"] .tg-pulse-risk-pill,
body[data-route="together"] .tg-pulse-history-chip {
  font-size: 0.78rem;
}

body[data-route="together"] .tg-note-modal-overlay,
body[data-route="together"] .tg-pulse-history-overlay,
body[data-route="together"] .tg-ritual-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 980;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(6, 10, 22, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body[data-route="together"] .tg-note-modal,
body[data-route="together"] .tg-pulse-history-modal,
body[data-route="together"] .tg-ritual-modal {
  width: min(980px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  padding: 18px;
  box-shadow: var(--tg-shell-shadow);
}

body[data-route="together"] .tg-note-compose-modal {
  width: min(620px, calc(100vw - 24px));
  padding: 18px;
  box-shadow: var(--tg-shell-shadow);
}

body[data-route="together"] .tg-note-modal,
body[data-route="together"] .tg-note-compose-modal {
  display: grid;
  gap: 18px;
  padding: 24px;
  background:
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--accent-shared) 10%, var(--tg-shell-surface-strong)) 0%,
      color-mix(in oklab, var(--tg-shell-surface) 96%, transparent) 100%
    );
}

body[data-route="together"] .tg-note-modal-head {
  align-items: flex-start;
}

body[data-route="together"] .tg-note-modal-close,
body[data-route="together"] .tg-pulse-history-close,
body[data-route="together"] .tg-ritual-modal-close {
  font-size: 0.88rem;
}

body[data-route="together"] .tg-note-modal-close {
  min-width: 42px;
  min-height: 42px;
  border-radius: 16px;
  font-size: 1rem;
}

body[data-route="together"] .tg-note-modal-from {
  font-size: 0.96rem;
  font-weight: 600;
}

body[data-route="together"] .tg-note-reply-input,
body[data-route="together"] .tg-note-compose-input,
body[data-route="together"] .tg-input {
  min-height: 48px;
  padding: 0 16px;
  line-height: 1.55;
}

body[data-route="together"] textarea.tg-input,
body[data-route="together"] .tg-note-reply-input,
body[data-route="together"] .tg-note-compose-input {
  min-height: 144px;
  padding: 18px 20px;
  resize: vertical;
}

body[data-route="together"] .tg-note-compose-count {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--tg-shell-border);
  border-radius: 999px;
  background: color-mix(in oklab, var(--tg-shell-surface-strong) 96%, transparent);
}

body[data-route="together"] .tg-note-compose-count.warn {
  border-color: color-mix(in oklab, var(--tg-shell-alert) 32%, var(--tg-shell-border));
  color: color-mix(in oklab, var(--tg-shell-alert) 76%, var(--tg-shell-ink));
}

body[data-route="together"] .tg-note-modal-error {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in oklab, var(--tg-shell-alert) 30%, var(--tg-shell-border));
  border-radius: 18px;
  background: color-mix(in oklab, var(--tg-shell-alert) 10%, var(--tg-shell-surface-strong));
  color: color-mix(in oklab, var(--tg-shell-alert) 78%, var(--tg-shell-ink));
  line-height: 1.45;
}

body[data-route="together"] .tg-note-modal-actions,
body[data-route="together"] .tg-ritual-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

body[data-route="together"] .tg-note-modal-actions {
  justify-content: flex-start;
}

body[data-route="together"] .tg-note-modal-actions .btn.solid {
  min-width: 160px;
}

body[data-route="together"] .tg-memory-composer {
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--tg-shell-border);
  border-radius: 22px;
  background:
    linear-gradient(
      165deg,
      color-mix(in oklab, var(--accent-shared) 8%, var(--tg-shell-surface-strong)) 0%,
      color-mix(in oklab, var(--tg-shell-surface) 96%, transparent) 100%
    );
}

body[data-route="together"] .tg-memory-composer-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tg-shell-ink-muted);
}

body[data-route="together"] .tg-memory-composer .btn.solid {
  justify-content: center;
}

@media (max-width: 1080px) {
  body[data-route="together"] .tg-hero-top {
    grid-template-columns: 1fr;
  }

  body[data-route="together"] .tg-hero-stats,
  body[data-route="together"] .tg-goal-stats,
  body[data-route="together"] .tg-focus-actions,
  body[data-route="together"] .tg-countdown-grid,
  body[data-route="together"] .tg-pulse-analytics,
  body[data-route="together"] .tg-digest-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body[data-route="together"] #app {
    width: min(100vw - 16px, 100%);
  }

  body[data-route="together"] .together-scroll {
    gap: 16px;
  }

  body[data-route="together"] .tg-hero {
    padding: 18px;
    border-radius: 24px;
  }

  body[data-route="together"] .tg-hero-names {
    font-size: clamp(1.7rem, 10vw, 2.4rem);
  }

  body[data-route="together"] .tg-hero-stats,
  body[data-route="together"] .tg-focus-actions,
  body[data-route="together"] .tg-hub-grid,
  body[data-route="together"] .tg-goal-stats,
  body[data-route="together"] .tg-countdown-grid,
  body[data-route="together"] .tg-pulse-analytics,
  body[data-route="together"] .tg-digest-grid {
    grid-template-columns: 1fr;
  }

  body[data-route="together"] .tg-focus-action.is-lead {
    grid-column: span 1;
    min-height: 0;
  }

  body[data-route="together"] .tg-section-sheet,
  body[data-route="together"] .tg-note-modal,
  body[data-route="together"] .tg-note-compose-modal,
  body[data-route="together"] .tg-pulse-history-modal,
  body[data-route="together"] .tg-ritual-modal {
    border-radius: 20px;
    padding: 16px;
  }

  body[data-route="together"] .tg-section-sheet-head,
  body[data-route="together"] .tg-goal-head,
  body[data-route="together"] .tg-goal-foot,
  body[data-route="together"] .tg-chat-composer-meta,
  body[data-route="together"] .tg-checkin-meta,
  body[data-route="together"] .tg-memory-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  body[data-route="together"] .tg-note-modal-actions .btn,
  body[data-route="together"] .tg-checkin-meta .btn,
  body[data-route="together"] .tg-memory-composer .btn {
    width: 100%;
  }

  body[data-route="together"] .tg-hub-card {
    min-height: 0;
  }

  body[data-route="together"] .tg-chat-msg {
    max-width: 100%;
  }
}
