/* Build 130: Together (together.html, blend.html). Kept apart from app.css.
   Build 133: the Together page as panels: header with numbers, Song of the day, For you | From you, Blends. */
.tg-who { display: inline-flex; align-items: center; gap: .3rem; color: var(--text); font-weight: 700; min-width: 0; }
.tg-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-who .face, .tg-by .face { width: 1.3rem; height: 1.3rem; border-radius: 50%; object-fit: cover; flex: none;
  display: inline-grid; place-items: center; font-size: .66rem; font-weight: 800; color: #fff; }

/* header */
.tg-head { padding: 1.4rem 0 1rem; display: flex; flex-direction: column; gap: .8rem; }
.tg-head h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.8rem); }
.tg-head .lede { margin: .2rem 0 0; color: var(--muted); }
.tg-stats { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.tg-stats li { display: inline-block; padding: .3rem .75rem; border-radius: 999px; font-size: .88rem;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text); }
.tg-stats li a { color: inherit; }
.tg-stats li b { font-weight: 800; }
.tg-stats li.warm { border-color: rgba(255, 170, 90, .4); background: rgba(255, 140, 60, .1); }
.tg-stats li.mint b { color: var(--mint); }

/* panels */
.tg-panel { background: var(--card-bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem;
  margin: 0 0 1rem; min-width: 0; scroll-margin-top: calc(var(--top-h, 0px) + .8rem); }
.tg-panel-head { margin-bottom: .8rem; }
.tg-panel-head h2 { margin: 0; font-size: 1.25rem; }
.tg-panel-head p { margin: .2rem 0 0; color: var(--muted); font-size: .9rem; }
.tg-cols { display: grid; gap: 0 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .tg-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }

/* Song of the day */
.tg-partners { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.tg-partner { display: flex; flex-direction: column; gap: .5rem; padding: .8rem; border-radius: .9rem;
  background: var(--surface-1); border: 1px solid var(--line); min-width: 0; }
.tg-partner.hot { border-color: rgba(255, 170, 90, .4); background: linear-gradient(160deg, rgba(255, 140, 60, .1), var(--surface-1) 60%); }
.tg-partner.turn { box-shadow: inset 3px 0 0 var(--warn); }
.tg-partner-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.tg-partner-who { display: flex; align-items: center; gap: .55rem; color: var(--text); min-width: 0; }
.tg-partner-who .face { width: 2.1rem; height: 2.1rem; border-radius: 50%; object-fit: cover; flex: none; display: grid; place-items: center; font-weight: 800; color: #fff; }
.tg-partner-who b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-flame { flex: none; font-weight: 800; font-size: .9rem; padding: .1rem .5rem; border-radius: 999px; background: rgba(255, 140, 60, .16); }
.tg-state { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.35; }
.tg-state .ok { color: var(--ok); font-weight: 700; }
.tg-sotd-song { display: flex; gap: .55rem; align-items: center; padding: .4rem; border-radius: .6rem; background: var(--surface-2); color: var(--text); min-width: 0; }
.tg-sotd-song img { width: 2.5rem; height: 2.5rem; border-radius: .4rem; object-fit: cover; flex: none; }
.tg-sotd-song span { min-width: 0; display: flex; flex-direction: column; }
.tg-sotd-song b, .tg-sotd-song small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-sotd-song small { color: var(--mint); font-size: .7rem; font-weight: 800; }
.tg-sotd-song small.dim { color: var(--muted); font-weight: 600; }
.tg-sotd-go { align-self: flex-start; margin-top: auto; }

/* rows (For you, From you, the song picker) */
.tg-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tg-panel > .tg-rows { max-height: 36rem; overflow-y: auto; margin: 0 -.5rem; padding: 0 .5rem; overscroll-behavior: contain; }
.tg-row { display: flex; gap: .75rem; align-items: center; padding: .55rem .5rem; margin: 0 -.5rem; border-radius: .7rem; min-width: 0; position: relative; }
.tg-row + .tg-row { border-top: 1px solid var(--line); }
.tg-row:hover { background: var(--surface-1); }
.tg-row .art-wrap { flex: none; position: relative; }
.tg-row .art { width: 3rem; height: 3rem; border-radius: .45rem; object-fit: cover; display: grid; place-items: center; background: var(--surface-2);
  font-family: var(--display); font-weight: 900; color: #fff; }
.tg-row .meta { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.tg-row .t { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-row .s { color: var(--muted); font-size: .85rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-from { display: flex; align-items: center; gap: .35rem; font-size: .82rem; color: var(--faint); min-width: 0; flex-wrap: wrap; }
.tg-tag { font-size: .7rem; font-weight: 800; padding: .02rem .45rem; border-radius: 999px; white-space: nowrap; }
.tg-tag.sotd { background: rgba(159, 243, 214, .14); color: var(--mint); }
.tg-tag.cap { background: var(--info-bg); color: var(--accent-hi); }
.tg-row.fresh::before { content: ""; position: absolute; left: -.15rem; top: 50%; width: .4rem; height: .4rem; margin-top: -.2rem;
  border-radius: 50%; background: var(--pink); }
.tg-row.sealed .t { color: var(--accent-hi); }
.tg-seal { width: 3rem; height: 3rem; border-radius: .45rem; display: grid; place-items: center; font-size: 1.35rem; flex: none;
  background: linear-gradient(135deg, rgba(167, 123, 255, .25), rgba(243, 168, 255, .18)); }

/* React: one button, the stickers in a small panel under it */
.tg-react-wrap { position: relative; flex: none; }
.tg-react { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.1rem; padding: .25rem .65rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: .82rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line); }
.tg-react svg { width: 1.05rem; height: 1.05rem; }
.tg-react:hover { color: var(--text); border-color: var(--line-2); }
.tg-react.set { padding: .15rem .45rem; background: var(--info-bg); border-color: rgba(167, 123, 255, .45); }
.tg-react .emo, .tg-stk .emo { font-size: 1.25rem; line-height: 1; }
.tg-pop { position: absolute; right: 0; top: calc(100% + .35rem); z-index: 30; display: grid; grid-template-columns: repeat(4, 4.3rem); gap: .25rem;
  padding: .45rem; border-radius: .9rem; background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0, 0, 0, .55); }
.tg-pop[hidden] { display: none; }
.tg-stk { appearance: none; display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem .1rem; min-height: 0;
  border: 1px solid transparent; background: none; border-radius: .6rem; cursor: pointer; color: var(--muted); font: inherit; }
.tg-stk small { display: block; max-width: 100%; font-size: .62rem; line-height: 1.15; text-align: center; white-space: normal; overflow-wrap: anywhere; }
.tg-stk:hover, .tg-stk:focus-visible { background: var(--surface-2); color: var(--text); }
.tg-stk[aria-pressed="true"] { background: var(--info-bg); border-color: var(--accent); color: var(--text); }

/* From you: one status per send */
.tg-status { flex: none; display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; max-width: 45%; }
.tg-st { font-size: .78rem; font-weight: 700; padding: .12rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.tg-st.ok { background: var(--ok-bg); color: var(--ok); }
.tg-st.dim { color: var(--faint); background: none; padding-inline: .2rem; }
.tg-their { font-size: 1.3rem; line-height: 1; }

/* dialogs */
.tg-dialog { width: min(30rem, calc(100vw - 2rem)); max-height: min(40rem, calc(100vh - 3rem)); padding: 1rem 1.1rem 1.1rem; color: var(--text);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 1.1rem; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); overflow: auto; }
.tg-dialog::backdrop { background: rgba(5, 3, 10, .6); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.tg-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; }
.tg-dialog-head h2 { margin: 0; font-size: 1.15rem; }
.tg-close { appearance: none; border: 0; background: var(--surface-2); color: var(--muted); width: 2rem; height: 2rem; min-height: 0; padding: 0;
  border-radius: 50%; cursor: pointer; font-size: .9rem; }
.tg-dialog .hint { margin: .5rem 0 .7rem; }
.tg-pick-list { margin: 0 0 .8rem; }
.tg-dialog .tg-pick-song { width: 100%; text-align: left; font: inherit; font-weight: 400; color: inherit; background: none; border: 0; box-shadow: none;
  cursor: pointer; margin: 0; min-height: 0; padding: .5rem; border-radius: .7rem; letter-spacing: normal; text-transform: none; }
.tg-dialog .tg-pick-song:hover, .tg-dialog .tg-pick-song:focus-visible { background: var(--surface-2); transform: none; filter: none; }
.tg-pick-list li + li .tg-row { border-top: 1px solid var(--line); }
.tg-send-word { flex: none; font-size: .8rem; font-weight: 800; color: var(--accent-hi); }
.tg-dialog .checklist { max-height: 22rem; overflow: auto; margin: .4rem 0 .8rem; }

/* Blends */
.tg-acts { display: flex; gap: .4rem; flex: none; }
.tg-blends { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); }
.tg-blend-card { display: flex; flex-direction: column; gap: .3rem; padding: .9rem; border-radius: var(--radius); color: var(--text); min-width: 0;
  background: linear-gradient(150deg, rgba(243, 168, 255, .16), rgba(143, 211, 255, .12)); border: 1px solid var(--line); }
.tg-blend-card:hover { border-color: var(--line-2); }
.tg-blend-card b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tg-blend-card small { color: var(--muted); }
.tg-blends { margin: 0; }
.tg-blends > li { display: flex; min-width: 0; }
.tg-blends > li > .tg-blend-card { flex: 1; }
.tg-blend-card.invite { border-color: rgba(243, 168, 255, .45); box-shadow: inset 3px 0 0 var(--pink); }
.tg-blend-card.invite .tg-acts { margin-top: .3rem; }
.tg-blend-card.new { appearance: none; font: inherit; text-align: center; align-items: center; cursor: pointer; background: none; border: 1.5px dashed var(--line-2);
  justify-content: center; width: 100%; white-space: normal; box-shadow: none; min-height: 7.5rem; }
.tg-blend-card.new:hover:not(:disabled) { border-color: var(--accent); background: var(--surface-1); }
.tg-blend-card.new:disabled { cursor: default; opacity: .6; }
.tg-blend-card .plus { font-size: 1.5rem; line-height: 1; color: var(--accent-hi); }
.tg-blend-faces { display: flex; }
.tg-blend-faces .face { width: 2.4rem; height: 2.4rem; border-radius: 50%; object-fit: cover; border: 2px solid var(--panel);
  display: grid; place-items: center; font-weight: 800; color: #fff; }
.tg-blend-faces .face + .face { margin-left: -.7rem; }
.tg-blend-faces.big .face { width: 3.6rem; height: 3.6rem; font-size: 1.3rem; }
.tg-blend-faces.big .face + .face { margin-left: -1rem; }
.tg-blend-hero h1 { margin: .5rem 0 .2rem; }
.tg-match { color: var(--pink); }
.tg-blend-actions { margin-top: .8rem; }
.tg-blend-actions .tg-play { border-radius: 999px; padding-inline: 1.6rem; }
.tg-by { display: flex; flex: none; }
.tg-by .face { border: 2px solid var(--panel); width: 1.6rem; height: 1.6rem; }
.tg-by .face + .face { margin-left: -.45rem; }
.tg-mix .rank { width: 1.6rem; text-align: right; color: var(--faint); font-variant-numeric: tabular-nums; flex: none; }
.tg-mix li { align-items: center; }
.tg-start summary { cursor: pointer; font-weight: 800; }
.tg-start .checklist { max-height: 22rem; overflow: auto; margin: .6rem 0; }
.tg-blend-foot { display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; }
.tg-blend-foot .tg-start { align-self: stretch; }

.tg-toast { position: fixed; left: 50%; bottom: calc(var(--tabbar) + 6rem); transform: translate(-50%, 1rem); z-index: 200; pointer-events: none;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: .55rem 1.1rem;
  font-weight: 700; box-shadow: 0 8px 30px rgba(0, 0, 0, .5); opacity: 0; transition: opacity .2s, transform .2s; max-width: 90vw; }
.tg-toast.show { opacity: 1; transform: translate(-50%, 0); }
.tg-toast.bad { color: var(--err); }
@media (max-width: 700px) {
  .tg-panel { padding: .85rem .8rem 1rem; border-radius: .9rem; }
  .tg-partners { grid-template-columns: minmax(0, 1fr); }
  .tg-panel > .tg-rows { max-height: none; overflow: visible; }
  #sent .tg-row { flex-wrap: wrap; }
  #sent .tg-row .meta { flex: 1 1 0; }
  #sent .tg-status { flex-basis: 100%; max-width: none; justify-content: flex-start; padding-left: 3.75rem; margin-top: -.15rem; }
  .tg-pop { grid-template-columns: repeat(4, 3.9rem); }
  .tg-blends { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tg-mix .dur { display: none; }
}
/* the Send dialog's "how" (app.js sendTo) */
.send-how { display: flex; flex-wrap: wrap; gap: .5rem; margin: .2rem 0 .8rem; }
.send-how select, .send-how input { flex: 1 1 12rem; min-width: 0; }
/* build 131: colours for the new notification kinds (the bell's tag and the chip on the picture) */
.k-react { background: linear-gradient(135deg, #ffd36a, #ff7ab6); }
.k-played { background: linear-gradient(135deg, #9ff3d6, #37b8d3); }
.k-blend { background: linear-gradient(135deg, #f3a8ff, #8fd3ff); }
/* build 133: panel empty states are a line of text (Kal shows once, only when the whole page is empty) */
.tg-empty { margin: 0; color: var(--muted); font-size: .9rem; }
