/* Together — pair space
   Scoped under .tg-page so it can live alongside the main app chrome without leaking. */

.tg-page {
  --tg-bg:#150B1C;
  --tg-bg2:#1F1226;
  --tg-card:#281830;
  --tg-card2:#311E3A;
  --tg-hair:rgba(255,255,255,0.07);
  --tg-hairStrong:rgba(255,255,255,0.14);
  --tg-text:#FBF3F7;
  --tg-dim:rgba(251,243,247,0.66);
  --tg-mute:rgba(251,243,247,0.44);
  --tg-him:#7EB8FF;
  --tg-himDeep:#3A7BD9;
  --tg-her:#FF8FB8;
  --tg-herDeep:#D95F8E;
  --tg-pairGrad:linear-gradient(135deg,#7EB8FF 0%,#A68CFF 48%,#FF8FB8 100%);
  --tg-pairGradSoft:linear-gradient(135deg,rgba(126,184,255,0.2) 0%,rgba(255,143,184,0.2) 100%);
  --tg-amber:#FFC878;
  --tg-mint:#7FE3B6;

  color: var(--tg-text);
  background:
    radial-gradient(80% 50% at 50% 0%,   rgba(126,184,255,0.08) 0%, transparent 55%),
    radial-gradient(60% 40% at 50% 100%, rgba(255,143,184,0.08) 0%, transparent 55%),
    var(--tg-bg);
  min-height: 100vh;
}

/* The page owns its own background, so neutralise the outer app chrome spacing. */
.tg-page-wrap main.app-main { padding: 0; max-width: none; }
.tg-page-wrap .top-bar { display: none; }
@media (min-width: 900px) {
  .tg-page-wrap main.app-main { padding: 0; }
}

.tg-page .mono-num { font-variant-numeric: tabular-nums; }
.tg-page .tg-fade-in { animation: tg-fade .45s ease both; }
@keyframes tg-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes tg-breathe { 0%, 100% { transform: scale(1); opacity: 0.4; } 50% { transform: scale(1.06); opacity: 0.7; } }
@keyframes tg-heartbeat { 0%, 60%, 100% { transform: scale(1); } 30% { transform: scale(1.12); } 45% { transform: scale(1.06); } }

/* ═════════ MODE SWITCH ═════════ */
.tg-mode-switch {
  position: fixed; top: 14px; right: 14px; z-index: 40;
  display: flex; gap: 4px; padding: 4px; border-radius: 100px;
  background: rgba(40,24,48,0.88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--tg-hair);
}
.tg-mode-switch button {
  padding: 7px 14px; border-radius: 100px; border: none; cursor: pointer;
  background: transparent; color: var(--tg-dim); font-size: 11px; font-weight: 600; letter-spacing: 0.4px;
  font-family: inherit;
}
.tg-mode-switch button.active {
  background: var(--tg-pairGrad); color: #fff; box-shadow: 0 4px 12px rgba(255,143,184,0.3);
}

/* ═════════ BOND VISUAL ═════════ */
.tg-bond-viz { position: relative; width: 160px; height: 60px; }
.tg-bond-av {
  width: 54px; height: 54px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: #fff; position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  box-shadow: 0 0 0 4px rgba(0,0,0,0.15), 0 8px 20px rgba(0,0,0,0.3);
}
.tg-bond-av.him { background: linear-gradient(135deg,#7EB8FF,#3A7BD9); left: 0; }
.tg-bond-av.her { background: linear-gradient(135deg,#FF8FB8,#D95F8E); right: 0; }
.tg-bond-line {
  position: absolute; left: 27px; right: 27px; top: 50%; height: 2px; margin-top: -1px; z-index: 1;
  background: linear-gradient(90deg,#7EB8FF 0%,#FF8FB8 100%);
}
.tg-bond-heart {
  position: absolute; left: 50%; top: 50%; margin: -14px 0 0 -14px; z-index: 3;
  width: 28px; height: 28px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  animation: tg-heartbeat 2.4s ease-in-out infinite;
  box-shadow: 0 4px 14px rgba(255,143,184,0.6);
}
.tg-bond-pulse {
  position: absolute; left: 50%; top: 50%; margin: -15px 0 0 -15px; z-index: 0;
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,143,184,0.5);
  animation: tg-breathe 2.4s ease-in-out infinite;
}
.tg-bond-viz.big .tg-bond-av { width: 64px; height: 64px; font-size: 26px; }
.tg-bond-viz.big { width: 180px; }

/* ═════════ SHARED PIECES ═════════ */
.tg-section-h {
  font-size: 11px; letter-spacing: 1.8px; font-weight: 700; color: var(--tg-mute); text-transform: uppercase;
  margin: 22px 0 12px; display: flex; align-items: center; gap: 8px;
}
.tg-section-h .tg-see-all {
  margin-left: auto; color: var(--tg-dim); font-size: 11px; letter-spacing: 0.6px; text-transform: none; font-weight: 600;
  cursor: pointer;
}

/* Whisper */
.tg-whisper {
  border-radius: 22px; padding: 16px 18px; margin-bottom: 14px;
  background: linear-gradient(135deg, rgba(255,143,184,0.16) 0%, rgba(126,184,255,0.08) 100%);
  border: 1px solid rgba(255,143,184,0.22);
  display: flex; gap: 12px; align-items: flex-start;
}
.tg-whisper .tg-who {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; flex-shrink: 0; font-size: 14px;
}
.tg-whisper .tg-who.her { background: linear-gradient(135deg,#FF8FB8,#D95F8E); }
.tg-whisper .tg-who.him { background: linear-gradient(135deg,#7EB8FF,#3A7BD9); }
.tg-whisper .body { flex: 1; min-width: 0; }
.tg-whisper .txt { font-size: 14px; line-height: 1.4; }
.tg-whisper .meta { font-size: 11px; color: var(--tg-dim); margin-top: 4px; display: flex; gap: 6px; align-items: center; }
.tg-reply { margin-top: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.tg-reply-chip {
  padding: 6px 10px; border-radius: 100px; font-size: 12px;
  background: rgba(255,255,255,0.06); cursor: pointer; border: 1px solid var(--tg-hair);
  color: var(--tg-text);
}
.tg-reply-chip:active { background: rgba(255,255,255,0.1); }

/* Paired run card */
.tg-run {
  border-radius: 22px; padding: 18px; margin-bottom: 14px;
  background: var(--tg-card); border: 1px solid var(--tg-hair); overflow: hidden; position: relative;
}
.tg-run .head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tg-run .pair { display: flex; }
.tg-run .pair .tg-bond-av { width: 34px; height: 34px; font-size: 14px; border: 2px solid var(--tg-card); position: static; transform: none; box-shadow: none; }
.tg-run .pair .tg-bond-av + .tg-bond-av { margin-left: -10px; }
.tg-run .who { flex: 1; min-width: 0; }
.tg-run .title { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
.tg-run .when { font-size: 11px; color: var(--tg-dim); margin-top: 2px; }
.tg-run .badge {
  padding: 4px 9px; border-radius: 100px; font-size: 9.5px; font-weight: 700; letter-spacing: 1.2px;
  background: rgba(255,143,184,0.18); color: #FFB5D0; border: 1px solid rgba(255,143,184,0.3);
}

.tg-route {
  height: 120px; border-radius: 16px; overflow: hidden; position: relative; margin-bottom: 12px;
  background: linear-gradient(180deg,#22122A 0%,#0E0614 100%);
}
.tg-dual { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tg-side { padding: 12px; border-radius: 14px; background: rgba(255,255,255,0.03); border: 1px solid var(--tg-hair); }
.tg-side .lbl { font-size: 9.5px; letter-spacing: 1px; font-weight: 700; text-transform: uppercase;
  display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.tg-side.him .lbl { color: var(--tg-him); }
.tg-side.her .lbl { color: var(--tg-her); }
.tg-side .stats { display: flex; gap: 14px; }
.tg-side .v { font-size: 15px; font-weight: 700; letter-spacing: -0.2px; }
.tg-side .k { font-size: 9.5px; color: var(--tg-mute); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 1px; }
.tg-run .window { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--tg-hair);
  font-size: 10.5px; color: var(--tg-dim); font-variant-numeric: tabular-nums; letter-spacing: 0.3px; }
.tg-combined {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--tg-hair);
  display: flex; align-items: center; justify-content: space-between;
}
.tg-combined .t { font-size: 11px; color: var(--tg-dim); }
.tg-combined .v { font-size: 14px; font-weight: 700; }

/* Calendar */
.tg-cal {
  background: var(--tg-card); border: 1px solid var(--tg-hair);
  border-radius: 22px; padding: 18px; margin-bottom: 14px;
}
.tg-cal .head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tg-cal .m { font-size: 15px; font-weight: 700; }
.tg-cal .dots { display: flex; gap: 10px; align-items: center; font-size: 10px; color: var(--tg-dim); }
.tg-cal .dots .d { width: 8px; height: 8px; border-radius: 4px; display: inline-block; }
.tg-cal .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; text-align: center; }
.tg-cal .days .h { font-size: 9px; color: var(--tg-mute); font-weight: 700; letter-spacing: 0.5px; margin-bottom: 6px; }
.tg-day {
  aspect-ratio: 1; border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; position: relative;
  background: rgba(255,255,255,0.02);
}
.tg-day.today { background: rgba(255,143,184,0.18); border: 1px solid rgba(255,143,184,0.4); }
.tg-day .dots { display: flex; gap: 2px; margin-top: 2px; height: 5px; }
.tg-day .dots span { width: 4px; height: 4px; border-radius: 2px; display: inline-block; }
.tg-day .dots .him-d { background: var(--tg-him); }
.tg-day .dots .her-d { background: var(--tg-her); }

/* Challenge */
.tg-challenge {
  border-radius: 22px; padding: 18px; margin-bottom: 14px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, rgba(255,200,120,0.12) 0%, rgba(255,143,184,0.1) 100%);
  border: 1px solid rgba(255,200,120,0.22);
}
.tg-challenge .head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tg-challenge .ic {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg,#FFC878,#FF8FB8);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 16px rgba(255,143,184,0.3);
}
.tg-challenge .title { font-size: 15px; font-weight: 700; }
.tg-challenge .sub { font-size: 11px; color: var(--tg-dim); margin-top: 2px; }
.tg-progress { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.tg-bar {
  flex: 1; height: 10px; border-radius: 5px;
  background: rgba(255,255,255,0.06); overflow: hidden; position: relative;
}
.tg-bar .fill {
  position: absolute; inset: 0; width: var(--p, 50%);
  background: linear-gradient(90deg,#FFC878 0%,#FF8FB8 100%);
  border-radius: 5px;
}
.tg-progress .value {
  font-size: 13px; font-weight: 700; letter-spacing: -0.2px; min-width: 70px; text-align: right;
}
.tg-contrib { display: flex; gap: 16px; margin-top: 12px; font-size: 11px; }
.tg-contrib span { display: flex; align-items: center; gap: 4px; }
.tg-contrib .d { width: 8px; height: 8px; border-radius: 4px; display: inline-block; }

/* Gallery */
.tg-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.tg-ph {
  aspect-ratio: 1; border-radius: 14px; overflow: hidden; position: relative; cursor: pointer;
}
.tg-ph svg { width: 100%; height: 100%; display: block; }
.tg-ph .loc {
  position: absolute; bottom: 6px; left: 6px; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 100px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  color: var(--tg-text);
}

/* Wish card */
.tg-wish {
  padding: 14px; border-radius: 16px; background: var(--tg-card);
  border: 1px solid var(--tg-hair); margin-bottom: 10px;
}
.tg-wish .w { font-size: 13px; font-weight: 600; }
.tg-wish .m { font-size: 11px; color: var(--tg-dim); margin-top: 3px; }

/* Quick actions */
.tg-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.tg-action-btn {
  padding: 14px; border-radius: 18px; background: var(--tg-card);
  border: 1px solid var(--tg-hair);
  display: flex; align-items: center; gap: 12px; cursor: pointer; text-align: left;
  color: var(--tg-text); font-family: inherit;
}
.tg-action-btn:active, .tg-action-btn:hover { background: var(--tg-card2); }
.tg-action-btn .ai {
  width: 36px; height: 36px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tg-action-btn .at { font-size: 13px; font-weight: 600; }
.tg-action-btn .asub { font-size: 10px; color: var(--tg-dim); margin-top: 2px; }

/* ═════════ MOBILE LAYOUT (single column) ═════════ */
.tg-mobile-view {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  padding: 0 0 90px;
}
.tg-mobile-view .tg-app-head {
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px 14px;
  display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 10;
  background: rgba(21,11,28,0.84); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--tg-hair);
}
.tg-app-head .back, .tg-app-head .action {
  width: 34px; height: 34px; border-radius: 12px;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  color: var(--tg-text); border: none; font-family: inherit;
}
.tg-app-head .title-wrap { flex: 1; min-width: 0; text-align: center; }
.tg-app-head .eyebrow { font-size: 10px; letter-spacing: 2.5px; font-weight: 700; color: var(--tg-mute); text-transform: uppercase; }
.tg-app-head .title { font-size: 15px; font-weight: 700; margin-top: 1px; }

.tg-mobile-view .content { flex: 1; padding: 16px 20px 24px; }

/* Hero card */
.tg-hero {
  border-radius: 28px; padding: 22px 20px 18px; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #3A1E5A 0%, #5C2A4A 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 30px 60px rgba(0,0,0,0.4);
}
.tg-hero .hero-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 40% at 20% 20%, rgba(126,184,255,0.45) 0%, transparent 60%),
    radial-gradient(60% 40% at 80% 90%, rgba(255,143,184,0.45) 0%, transparent 60%);
}
.tg-hero .inner { position: relative; z-index: 1; }
.tg-hero .tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 100px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.8px; color: #fff;
  background: rgba(255,255,255,0.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.15);
}
.tg-hero .avs { display: flex; margin-top: 18px; margin-bottom: 14px; align-items: center; justify-content: center; }
.tg-hero .names { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -0.4px; margin-top: 2px; }
.tg-hero .streak { text-align: center; margin-top: 6px; font-size: 12px; color: rgba(255,255,255,0.75); }
.tg-hero .streak .flame { color: var(--tg-amber); }
.tg-hero .stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.1);
}
.tg-hero .stat { text-align: center; }
.tg-hero .stat .v { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.tg-hero .stat .l {
  font-size: 9.5px; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-top: 2px;
}

/* Mobile bottom tab bar for Together */
.tg-tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: 10px 20px calc(env(safe-area-inset-bottom, 0px) + 10px);
  display: flex; justify-content: space-around; gap: 4px;
  border-top: 1px solid var(--tg-hair);
  background: rgba(40,24,48,0.92); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
}
.tg-tabbar .t {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; color: var(--tg-mute); font-size: 9.5px; font-weight: 600; cursor: pointer;
  background: transparent; border: none; font-family: inherit; text-decoration: none;
}
.tg-tabbar .t .iwrap { width: 30px; height: 24px; display: flex; align-items: center; justify-content: center; }
.tg-tabbar .t.active { color: #FF8FB8; }

/* ═════════ DESKTOP LAYOUT ═════════ */
.tg-desktop-view {
  display: grid;
  grid-template-columns: 280px 1fr 360px;
  background: var(--tg-bg);
  min-height: 100vh;
}
@media (max-width: 1200px) { .tg-desktop-view { grid-template-columns: 240px 1fr 320px; } }
@media (max-width: 1000px) { .tg-desktop-view { grid-template-columns: 240px 1fr; } .tg-desktop-right { display: none; } }
@media (max-width: 760px)  { .tg-desktop-view { grid-template-columns: 1fr; } .tg-desktop-side { display: none; } }

.tg-desktop-side {
  padding: 28px 20px; border-right: 1px solid var(--tg-hair);
  background: var(--tg-bg2);
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.tg-desktop-side .brand {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px 20px;
  text-decoration: none; color: var(--tg-text);
}
.tg-desktop-side .brand-logo {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--tg-pairGrad);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(255,143,184,0.3);
}
.tg-desktop-side .brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.3px; }
.tg-desktop-side .nav-group {
  padding: 6px 12px; font-size: 10px; letter-spacing: 1.5px;
  color: var(--tg-mute); font-weight: 700; text-transform: uppercase; margin-top: 14px;
}
.tg-desktop-side .nav-item {
  padding: 10px 12px; border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  font-size: 14px; color: var(--tg-dim); cursor: pointer; font-weight: 500;
  text-decoration: none; border: none; background: transparent; font-family: inherit; text-align: left;
}
.tg-desktop-side .nav-item:hover { background: rgba(255,255,255,0.04); color: var(--tg-text); }
.tg-desktop-side .nav-item.active { background: rgba(255,143,184,0.14); color: #FFB5D0; }
.tg-desktop-side .nav-item .count {
  margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 100px;
  background: rgba(255,255,255,0.08); font-weight: 700;
}
.tg-desktop-side .pair-chip {
  margin-top: auto; padding: 14px; border-radius: 18px;
  background: linear-gradient(135deg, rgba(126,184,255,0.12), rgba(255,143,184,0.12));
  border: 1px solid var(--tg-hair);
}
.tg-desktop-side .pair-chip .avs { display: flex; margin-bottom: 10px; position: relative; height: 34px; }
.tg-desktop-side .pair-chip .avs .tg-bond-av {
  width: 34px; height: 34px; font-size: 13px; border: 3px solid var(--tg-bg2);
  position: static; transform: none; box-shadow: none;
}
.tg-desktop-side .pair-chip .avs .tg-bond-av + .tg-bond-av { margin-left: -10px; }
.tg-desktop-side .pair-chip .n { font-size: 13px; font-weight: 700; }
.tg-desktop-side .pair-chip .d { font-size: 11px; color: var(--tg-dim); margin-top: 2px; }

.tg-desktop-main { padding: 32px 40px 60px; overflow-y: auto; }
.tg-desktop-main .page-head {
  display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 28px; gap: 20px; flex-wrap: wrap;
}
.tg-desktop-main .page-head h1 {
  font-size: 34px; font-weight: 700; letter-spacing: -1px; margin: 0;
  background: linear-gradient(180deg, #fff 0%, #FFB5D0 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.tg-desktop-main .page-head .eyebrow {
  font-size: 10px; letter-spacing: 2.5px; font-weight: 700;
  color: var(--tg-mute); text-transform: uppercase; margin-bottom: 8px;
}
.tg-desktop-main .page-head .page-sub { font-size: 14px; color: var(--tg-dim); margin-top: 6px; }
.tg-desktop-main .page-head .actions-row { display: flex; gap: 8px; }
.tg-desktop-main .btn-primary {
  padding: 10px 18px; border-radius: 14px;
  background: var(--tg-pairGrad); border: none; color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 18px rgba(255,143,184,0.3);
  font-family: inherit;
}
.tg-desktop-main .btn-ghost {
  padding: 10px 18px; border-radius: 14px;
  background: var(--tg-card); border: 1px solid var(--tg-hair);
  color: var(--tg-text); font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}

.tg-desktop-hero {
  border-radius: 28px; padding: 32px; margin-bottom: 28px; position: relative; overflow: hidden;
  background: linear-gradient(135deg,#3A1E5A 0%,#5C2A4A 100%);
  border: 1px solid rgba(255,255,255,0.08);
  min-height: 260px; display: flex; flex-direction: column; justify-content: space-between;
}
.tg-desktop-hero .hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(126,184,255,0.4) 0%, transparent 60%),
    radial-gradient(60% 50% at 80% 90%, rgba(255,143,184,0.4) 0%, transparent 60%);
}
.tg-desktop-hero .inner { position: relative; z-index: 1; }
.tg-desktop-hero .big-bond { display: flex; align-items: center; gap: 24px; margin-bottom: 22px; flex-wrap: wrap; }
.tg-desktop-hero .eyebrow {
  font-size: 10px; letter-spacing: 2; font-weight: 700;
  color: rgba(255,255,255,0.6); text-transform: uppercase; margin-bottom: 6px;
}
.tg-desktop-hero .names { font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.tg-desktop-hero .streak-row {
  margin-top: 8px; font-size: 14px; color: rgba(255,255,255,0.75);
  display: flex; gap: 20px; flex-wrap: wrap;
}
.tg-desktop-hero .stats-row {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 600px) { .tg-desktop-hero .stats-row { grid-template-columns: repeat(2, 1fr); } }
.tg-desktop-hero .stat .v { font-size: 26px; font-weight: 700; letter-spacing: -0.6px; }
.tg-desktop-hero .stat .l {
  font-size: 10px; color: rgba(255,255,255,0.6);
  text-transform: uppercase; letter-spacing: 1px; font-weight: 600; margin-top: 4px;
}

.tg-two-col { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; margin-bottom: 28px; }
@media (max-width: 1100px) { .tg-two-col { grid-template-columns: 1fr; } }

.tg-desktop-right {
  padding: 28px 20px; border-left: 1px solid var(--tg-hair);
  background: var(--tg-bg2);
  overflow-y: auto; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 16px;
}
.tg-desktop-right h3 {
  font-size: 14px; font-weight: 700; margin: 0 0 12px;
  display: flex; align-items: center; gap: 8px;
}

.tg-composer {
  padding: 14px; border-radius: 18px; background: var(--tg-card);
  border: 1px solid var(--tg-hair);
}
.tg-composer textarea {
  width: 100%; background: transparent; border: none; outline: none;
  color: var(--tg-text); resize: none; font-size: 13px; min-height: 60px; line-height: 1.4;
  font-family: inherit;
}
.tg-composer textarea::placeholder { color: var(--tg-mute); }
.tg-composer .row {
  display: flex; gap: 8px; margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--tg-hair); align-items: center;
}
.tg-composer .attach { display: flex; gap: 4px; }
.tg-composer .attach button {
  width: 32px; height: 32px; border-radius: 10px;
  background: rgba(255,255,255,0.04); border: none; color: var(--tg-dim); cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.tg-composer .send {
  margin-left: auto; padding: 7px 14px; border-radius: 100px;
  background: var(--tg-pairGrad); border: none; color: #fff; font-size: 12px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 12px rgba(255,143,184,0.3);
  display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
}

/* ═════════ MODE VISIBILITY ═════════ */
/* By default: let media queries drive the layout. */
.tg-mobile-view { display: none; }
.tg-desktop-view { display: grid; }
@media (max-width: 760px) {
  .tg-mobile-view { display: flex; }
  .tg-desktop-view { display: none; }
}

/* Explicit modes override media query when user picks. */
body.tg-mode-mobile .tg-mobile-view { display: flex; }
body.tg-mode-mobile .tg-desktop-view { display: none; }
body.tg-mode-desktop .tg-mobile-view { display: none; }
body.tg-mode-desktop .tg-desktop-view { display: grid; }
@media (max-width: 760px) {
  body.tg-mode-desktop .tg-desktop-view { display: block; }
}

/* SPEC_PALM_COLORS.md §Decisions Q3 — identity-relative palm color.
   4-value palette (blue, pink, orange, purple) drives the avatar
   identity ring on every Together-equivalent web surface via
   shared/_avatar.html.erb. iOS migration is closed; the legacy
   .pair-color-{blue|pink} classes that lived alongside this block
   were retired with the column drop (SPEC §Decisions Q2 ordering). */
:root {
  --palm-color-blue:    #7EB8FF;
  --palm-color-pink:    #FF8FB8;
  --palm-color-orange:  #FFA86B;
  --palm-color-purple:  #A06BFF;
}
.palm-color-blue   { color: var(--palm-color-blue); }
.palm-color-pink   { color: var(--palm-color-pink); }
.palm-color-orange { color: var(--palm-color-orange); }
.palm-color-purple { color: var(--palm-color-purple); }
.avatar.palm-color-blue,
.avatar-img.palm-color-blue   { box-shadow: 0 0 0 2px var(--palm-color-blue); }
.avatar.palm-color-pink,
.avatar-img.palm-color-pink   { box-shadow: 0 0 0 2px var(--palm-color-pink); }
.avatar.palm-color-orange,
.avatar-img.palm-color-orange { box-shadow: 0 0 0 2px var(--palm-color-orange); }
.avatar.palm-color-purple,
.avatar-img.palm-color-purple { box-shadow: 0 0 0 2px var(--palm-color-purple); }
