/* ================================================================
   SONG COMMENTS — the For You comment layer (assets/comments.js).
   ================================================================ */

/* ---- on the card ---- */
.fy-cmt {
  position: absolute; right: 10px; bottom: 54px; z-index: 3;
  width: 36px; min-height: 36px; border-radius: 18px; border: none; padding: 0;
  background: rgba(10,9,8,.55); backdrop-filter: blur(6px);
  color: rgba(255,245,235,.85); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.fy-cmt svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.fy-cmt-n { font: 700 10px/1 var(--font-body); margin-top: 1px; }
.fy-cmt-n:empty { display: none; }
.fy-cmt:has(.fy-cmt-n:not(:empty)) { padding: 6px 0 5px; }
.fy-cmt:active { transform: scale(.88); }

/* The thread's best line, laid over the foot of the sleeve. It belongs to the
   song, not a moment of it, so it simply arrives once the thread has loaded
   and stays put. Absolutely placed, so arriving never moves anything. */
.fy-peek {
  position: absolute; left: 10px; bottom: 10px; z-index: 3;
  max-width: calc(100% - 66px); min-height: 32px; box-sizing: border-box;
  display: flex; align-items: center; gap: 7px;
  padding: 5px 11px 5px 5px; border: 0; border-radius: 16px; cursor: pointer;
  background: rgba(10,9,8,.6); backdrop-filter: blur(10px);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fy-tint, #fff) 28%, transparent);
  color: #fff; font: 13px/1.25 var(--font-body); text-align: left;
  opacity: 0; translate: 0 6px; transition: opacity .38s ease, translate .38s var(--ease);
}
.fy-peek.on { opacity: 1; translate: 0 0; }
.fy-peek[hidden] { display: none; }
.fy-peek img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.fy-peek b { flex: 0 0 auto; font-weight: 700; font-size: 12px; color: color-mix(in srgb, var(--fy-tint, #fff) 65%, #fff); }
.fy-peek b:first-child { margin-left: 6px; }
.fy-peek span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: rgba(255,245,235,.9); }
.fy-peek em { flex: 0 0 auto; font-style: normal; font-size: 11px; font-weight: 700; color: rgba(255,245,235,.55); }
.fy-peek:active { scale: .97; }

/* ---- the sheet ----
   Lighter than other modals on purpose: the record stays visible above it
   and the song keeps playing underneath. z 198 keeps ask() and the report
   sheet (200) on top of it. */
.modal.sc-modal { z-index: 198; padding: 0; align-items: flex-end; background: rgba(5,4,3,0); backdrop-filter: none; transition: background 260ms ease; }
.modal.sc-modal.in { background: rgba(5,4,3,.42); }
.sc-panel {
  width: 100%; max-width: 560px; height: min(72dvh, 680px);
  display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(22px) saturate(1.3);
  border: 1px solid var(--border-strong); border-bottom: 0;
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -24px 60px rgba(0,0,0,.55);
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  margin-bottom: var(--kb, 0px);
  transform: translateY(100%); transition: transform 320ms cubic-bezier(.2,.9,.25,1);
}
.sc-modal.in .sc-panel { transform: none; }
.sc-grab { flex: 0 0 auto; height: 22px; display: grid; place-items: center; cursor: grab; touch-action: none; }
.sc-grab::before { content: ''; width: 38px; height: 4px; border-radius: 2px; background: var(--border-strong); }
.sc-top { display: flex; align-items: center; gap: 12px; padding: 0 16px 10px; }
.sc-art { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex: 0 0 auto; }
.sc-art[hidden] { display: none; }
.sc-ttl { min-width: 0; flex: 1; }
.sc-ttl h2 { font-size: 16px; margin: 0; letter-spacing: -.01em; }
.sc-ttl p { margin: 2px 0 0; font-size: 12.5px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-modal .modal-close.sc-x { position: static; width: 36px; height: 36px; flex: 0 0 auto; }
.sc-sort { display: flex; gap: 6px; padding: 0 16px 10px; border-bottom: 1px solid var(--border); }
.sc-sort button {
  border: 1px solid var(--border); background: transparent; color: var(--text-dim);
  font: 600 12.5px/1 var(--font-body); padding: 7px 12px; border-radius: 99px; cursor: pointer;
}
.sc-sort button.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.sc-list { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 6px 0; }
.sc-row {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: start;
  padding: 10px 16px; animation: scRowIn 300ms ease backwards; animation-delay: calc(var(--k, 0) * 22ms);
}
.sc-row.fresh { animation: scFresh 900ms ease; }
.sc-row.is-hidden { opacity: .55; }
@keyframes scRowIn { from { opacity: 0; translate: 0 6px; } }
@keyframes scFresh { from { background: color-mix(in srgb, var(--gold) 16%, transparent); } }
.sc-av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; border: 0; padding: 0; cursor: pointer;
  background: var(--surface-2); color: var(--text-dim); font: 700 14px/36px var(--font-body); }
.sc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sc-body { min-width: 0; }
.sc-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 12px; color: var(--text-faint); }
.sc-meta b { color: var(--text); font-size: 13px; }
.sc-meta em { font-style: normal; color: var(--red); }
.sc-body p { margin: 3px 0 0; font-size: 14px; line-height: 1.42; color: var(--text); overflow-wrap: anywhere; white-space: pre-wrap; }
.sc-acts { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.sc-like, .sc-more { border: 0; background: none; color: var(--text-faint); cursor: pointer; padding: 6px; min-width: 32px; min-height: 32px;
  display: flex; flex-direction: column; align-items: center; gap: 1px; font: 600 11px/1 var(--font-body); }
.sc-like svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.sc-like.on { color: var(--gold); }
.sc-like.on svg { fill: currentColor; }
.sc-like:disabled { opacity: .35; cursor: default; }
.sc-like.pop svg { animation: fyLikePop .38s var(--ease); }
.sc-more { letter-spacing: 1px; font-size: 9px; }
.sc-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 48px 24px; color: var(--text-dim); font-size: 13.5px; }
.sc-empty b { color: var(--text); font-size: 15px; }
.sc-empty-mark { width: 52px; height: 52px; border-radius: 50%; margin-bottom: 6px;
  background: radial-gradient(circle at 50% 45%, color-mix(in srgb, var(--gold) 40%, transparent), transparent 70%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--gold) 55%, transparent); }
.sc-loading { display: flex; justify-content: center; gap: 6px; padding: 40px 0; }
.sc-loading i { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); animation: scDot 1s ease-in-out infinite; }
.sc-loading i:nth-child(2) { animation-delay: .15s; }
.sc-loading i:nth-child(3) { animation-delay: .3s; }
@keyframes scDot { 50% { opacity: .25; translate: 0 -4px; } }
.sc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 4px; border-top: 1px solid var(--border); }
.sc-field { position: relative; flex: 1; min-width: 0; }
.sc-field textarea {
  display: block; width: 100%; box-sizing: border-box; resize: none; min-height: 38px; max-height: 120px;
  padding: 9px 40px 9px 14px; border-radius: 19px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font: 16px/1.3 var(--font-body);
}
.sc-field textarea:focus { outline: none; border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.sc-left { position: absolute; right: 12px; bottom: 11px; font: 600 11px/1 var(--font-body); color: var(--text-faint); }
.sc-left.low { color: var(--red); }
.sc-send {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--surface-2); color: var(--text-faint); display: grid; place-items: center;
  transition: background .2s ease, color .2s ease, transform .15s var(--ease);
}
.sc-send.ready { background: var(--gold); color: #120f0a; }
.sc-send:active { transform: scale(.9); }
.sc-err { padding: 0 16px; font-size: 12.5px; color: var(--red); }
.sc-err:not(:empty) { padding: 4px 16px 0; }

@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) .sc-panel, html:not([data-motion="full"]) .modal.sc-modal { transition: none; }
  html:not([data-motion="full"]) .sc-row { animation: none; }
  html:not([data-motion="full"]) .fy-peek { transition: opacity .2s ease; translate: none; }
}
html[data-motion="none"] .sc-panel, html[data-motion="none"] .modal.sc-modal { transition: none; }
html[data-motion="none"] .sc-row { animation: none; }
html[data-motion="none"] .fy-peek { transition: none; translate: none; }
