/*
 * Mobile UX v7 (shared by all screen sizes): reply/like styles, legal links, swipe edge hints, first-visit hint.
 * The stage layout itself (compact question strip + comments) lives in stage.v7.css.
 */
.mobile-discussion { display: none; }

/* ---------- comment replies + likes (all screens) ---------- */
.comment-copy > .comment-actions { grid-column: 1 / -1; grid-row: 3; display: flex; align-items: center; gap: 4px; margin: 3px 0 0 -8px; }
.comment-like, .comment-reply {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 4px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 750;
}
.comment-like svg { width: 17px; height: 17px; fill: none; transition: transform .15s ease; }
.comment-like[aria-pressed='true'] { color: var(--accent-red); background: #fff1f0; }
.comment-like[aria-pressed='true'] svg { fill: currentColor; transform: scale(1.08); }
.comment-like .like-count:empty { display: none; }
.comment-like:focus-visible, .comment-reply:focus-visible { outline-offset: -2px; }
.comment-reply:hover, .comment-like:hover { background: var(--paper); }
.comment.comment-reply-item {
  margin-left: 22px;
  padding-left: 10px;
  border-left: 2px solid var(--accent-soft);
}
.comment.comment-reply-item .avatar { width: 26px; height: 26px; }
.comment.comment-reply-item .avatar svg { width: 14px; height: 14px; }
.comment-reply-to { color: var(--accent-deep); font-weight: 700; }

.reply-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 6px;
  padding: 3px 4px 3px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 750;
}
.reply-chip[hidden] { display: none; }
.reply-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reply-chip button { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: #ffffffaa; color: var(--accent-deep); font-size: 15px; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .comment-like svg { transition: none; } }

/* ---------- legal links (sidebar footer on desktop, sign-in dialog everywhere) ---------- */
.site-legal { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 14px; padding: 0 12px; font-size: 12px; }
.site-legal a { color: var(--muted); text-decoration: none; }
.site-legal a:hover, .site-legal a:focus-visible { color: var(--accent-deep); text-decoration: underline; }
.auth-legal { margin: 2px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.auth-legal a { color: var(--accent-deep); font-weight: 650; }

/* ================= v6: swipe navigation, edge hints, first-visit hint ================= */
.main-content { position: relative; }
html { overscroll-behavior-x: none; }
body.swiping { user-select: none; -webkit-user-select: none; }

/* ‹ › controls: faint hints on phones, round buttons on wide screens (see desktop-ux.v6.css) */
.swipe-arrows { position: absolute; z-index: 2; pointer-events: none; }
.swipe-arrow {
  position: absolute;
  top: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: var(--accent-deep);
  background: #ffffffd9;
  box-shadow: 0 1px 6px #19392a2b;
  font: 400 30px/1 var(--sans);
  opacity: .78;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity .2s ease, background .15s ease, color .15s ease;
}
.swipe-arrow span { margin-top: -3px; }
.swipe-prev { left: 0; width: 18px; height: 46px; border-radius: 0 14px 14px 0; }
.swipe-next { right: 0; width: 18px; height: 46px; border-radius: 14px 0 0 14px; }
.swipe-arrow.is-edge { opacity: 0; }
body.comment-focus .swipe-arrows { display: none; }

/* ---------- first-visit hint ---------- */
.swipe-hint {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #0f2218a8;
  animation: hint-fade .25s ease both;
}
.swipe-hint-card {
  width: min(100%, 330px);
  display: grid;
  gap: 14px;
  padding: 20px 18px 18px;
  border-radius: 22px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 50px #0b1a1260;
  text-align: center;
}
.swipe-hint-wide .swipe-hint-card { width: min(100%, 400px); }
.swipe-hint-card h2 { margin: 0; font: 400 28px/1 var(--serif); letter-spacing: -.01em; }
.hint-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--paper); text-align: left; }
.hint-row p { margin: 0; font-size: 14.5px; line-height: 1.3; }
.hint-demo { position: relative; display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 4px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-deep); overflow: hidden; }
.hint-demo-y { justify-content: center; }
.hint-arrow { font: 400 28px/1 var(--sans); opacity: .55; animation: hint-pulse 1.8s ease-in-out infinite; }
.hint-arrow:last-child { animation-delay: .9s; }
.hint-arrow-up { position: absolute; top: 2px; left: 50%; margin-left: -9px; font-size: 22px; animation: hint-pulse-y 1.8s ease-in-out infinite; }
.hint-demo-x .hint-hand { position: absolute; left: 50%; top: 12px; width: 40px; height: 40px; margin-left: -20px; animation: hint-x 1.8s ease-in-out infinite; }
/* tap demo */
.hint-demo-tap { justify-content: center; }
.hint-demo-tap .hint-hand { width: 40px; height: 40px; margin-top: 10px; animation: hint-tap 1.8s ease-in-out infinite; }
.hint-ripple { position: absolute; left: 50%; top: 24px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: currentColor; opacity: 0; animation: hint-ripple 1.8s ease-out infinite; }
.hint-demo-y .hint-hand { width: 40px; height: 40px; margin-top: 10px; animation: hint-y 1.8s ease-in-out infinite; }
.swipe-hint-ok { width: 100%; min-height: 48px; font-size: 15px; }
@keyframes hint-tap { 0%, 55%, 100% { transform: translateY(4px) scale(1); } 70% { transform: translateY(0) scale(.92); } }
@keyframes hint-ripple { 0%, 60% { opacity: 0; transform: scale(.4); } 70% { opacity: .35; transform: scale(.6); } 100% { opacity: 0; transform: scale(2.6); } }
@keyframes hint-fade { from { opacity: 0; } }
@keyframes hint-x { 0%, 100% { transform: translateX(-24px); } 50% { transform: translateX(24px); } }
@keyframes hint-y { 0%, 100% { transform: translateY(12px); } 50% { transform: translateY(-14px); } }
@keyframes hint-pulse { 0%, 100% { opacity: .25; } 50% { opacity: .8; } }
@keyframes hint-pulse-y { 0%, 100% { opacity: .2; transform: translateY(4px); } 50% { opacity: .8; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) {
  .swipe-hint, .hint-arrow, .hint-hand { animation: none !important; }
  .swipe-arrow { transition: none; }
}
