/* =========================================================
   Calm social layout — Instagram / TikTok inspired
   Soft chrome, full-bleed reels, airy posts, quiet panels
   ========================================================= */

.page-social {
  background: #0b0f1a;
  color: #f2eee6;
  /* Phone-app shell: lock to viewport like a native screen stack */
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.page-social input,
.page-social textarea,
.page-social [contenteditable] {
  user-select: text;
  -webkit-user-select: text;
}

.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---- Top bar: one slim row + soft mode switch ---- */

.page-social .social-top {
  padding: 0.55rem 0.9rem 0.35rem;
  padding-top: max(0.55rem, env(safe-area-inset-top));
  background: linear-gradient(
    to bottom,
    rgba(10, 12, 18, 0.92) 0%,
    rgba(10, 12, 18, 0.55) 70%,
    transparent 100%
  );
  pointer-events: none;
}

.page-social .social-top > * {
  pointer-events: auto;
}

.page-social .social-top-row {
  max-width: 480px;
  margin: 0 auto;
  min-height: 2.5rem;
}

.page-social .social-product {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #f2eee6;
}

.page-social .brand-mark-lite {
  width: 1.6rem;
  height: 1.6rem;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  filter: saturate(2.1) brightness(1.2) drop-shadow(0 0 4px rgba(231, 201, 138, 0.6));
}

.page-social .brand-word {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: #e7c98a;
}

.page-social .top-actions {
  display: flex;
  align-items: center;
  gap: 0.1rem;
  margin-left: auto;
}

/* Flat icons — no boxes (Instagram / TikTok style) */
.page-social .icon-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 2.4rem;
  height: 2.4rem;
  min-width: 2.4rem;
  min-height: 2.4rem;
  max-height: 2.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none;
  color: rgba(242, 238, 230, 0.9);
  opacity: 1;
  display: grid;
  place-items: center;
  line-height: 0;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.page-social .icon-btn:hover,
.page-social .icon-btn.is-active {
  background: transparent !important;
  color: #fff;
  opacity: 1;
  transform: none;
}

.page-social .icon-btn:active {
  opacity: 0.65;
}

.page-social .icon-btn:focus-visible {
  outline: 2px solid rgba(231, 201, 138, 0.7);
  outline-offset: 3px;
  border-radius: 8px;
}

.page-social .icon-btn .nav-badge,
.page-social .icon-btn .top-badge {
  position: absolute;
  top: -0.05rem;
  right: -0.05rem;
  z-index: 1;
  min-width: 0.95rem;
  height: 0.95rem;
  padding: 0 0.22rem;
  border-radius: 999px;
  background: #e85a5a;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 0.95rem;
  text-align: center;
  pointer-events: none;
}

html.comfort-mode.comfort-roomy-fields .page-social .icon-btn {
  min-height: 2.4rem;
  margin-block: 0;
}

/* Mode row under brand — TikTok-like text tabs + soft Posts/Reels */

.feed-mode-row {
  max-width: 480px;
  margin: 0.15rem auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.audience-tabs--text {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0;
  border: 0;
  background: transparent;
}

.audience-tabs--text .audience-tab {
  position: relative;
  min-height: 2.2rem;
  min-width: 0;
  padding: 0.35rem 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(242, 238, 230, 0.45);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.audience-tabs--text .audience-tab.is-active {
  color: #fff;
  background: transparent;
}

.audience-tabs--text .audience-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: #fff;
}

.audience-tabs--text .audience-tab#open-saved {
  color: rgba(242, 238, 230, 0.55);
  padding: 0.35rem;
}

.audience-tabs--text .audience-tab#open-saved.is-active,
.audience-tabs--text .audience-tab#open-saved:hover {
  color: #e7c98a;
}

.layout-tabs--segment {
  display: inline-flex;
  gap: 0;
  margin: 0;
  padding: 0.15rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.layout-tabs--segment .layout-tab {
  min-height: 1.85rem;
  min-width: 0;
  padding: 0.25rem 0.7rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(242, 238, 230, 0.5);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.layout-tabs--segment .layout-tab.is-active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Hide old banner noise */
.page-social .placeholder-banner {
  display: none !important;
}

/* ---- Bottom nav: Instagram quiet ---- */

.page-social .bottom-nav {
  display: flex;
  height: calc(3.4rem + env(safe-area-inset-bottom));
  padding: 0.35rem 0.5rem calc(0.35rem + env(safe-area-inset-bottom));
  background: rgba(10, 12, 18, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: none;
  gap: 0;
  justify-content: space-around;
  max-width: 100%;
  grid-template-columns: none;
}

.page-social .bottom-nav .nav-item {
  flex: 1;
  max-width: 4.5rem;
  min-height: 2.75rem;
  border-radius: 12px;
  color: rgba(242, 238, 230, 0.45);
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.page-social .bottom-nav .nav-item.is-active {
  color: #fff;
  background: transparent !important;
}

.page-social .bottom-nav .nav-icon {
  color: inherit;
}

.page-social .bottom-nav .nav-item.is-active .nav-icon--live {
  color: #ff5a5a;
}

/* ---- Flicks: true full-bleed ---- */

.page-social .social-root[data-view="feed"][data-layout="flicks"] .flicks {
  height: 100dvh;
}

.page-social .flick-card {
  height: 100dvh;
}

.page-social .flick-body {
  padding: 1rem 0.9rem calc(4.6rem + env(safe-area-inset-bottom));
}

.page-social .flick-actions {
  gap: 0.85rem;
}

.page-social .action-btn {
  background: transparent;
  border: 0;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.page-social .flick-actions .action-btn .count {
  font-size: 0.72rem;
  opacity: 0.9;
}

.page-social .flick-actions .action-btn[data-save-for] .count {
  display: none;
}

.page-social .follow-chip {
  position: static;
  margin-left: auto;
  opacity: 0.95;
}

.page-social .feed-load-more,
.page-social .frontier-load-more {
  display: block;
  width: calc(100% - 1.8rem);
  max-width: 40rem;
  margin: 0.75rem auto 1.5rem;
  min-height: 2.75rem;
}

.page-social .scroll-hint {
  opacity: 0.55;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---- Instagram-style Posts feed ---- */

.page-social .ig-feed {
  max-width: 480px;
  margin: 0 auto;
  height: 100dvh;
  overflow-y: auto;
  padding: 5.6rem 0 calc(4.5rem + env(safe-area-inset-bottom));
  scrollbar-width: thin;
  background: #0b0f1a;
}

.page-social .ig-post {
  margin: 0 0 1.35rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-social .ig-head {
  padding: 0.55rem 0.9rem;
  gap: 0.65rem;
}

.page-social .avatar {
  width: 36px;
  height: 36px;
  border-width: 1px;
  border-color: rgba(231, 201, 138, 0.55);
  background: rgba(231, 201, 138, 0.12);
  color: #e7c98a;
  font-size: 0.78rem;
}

.page-social .ig-media {
  aspect-ratio: 4 / 5;
  max-height: min(72vh, 560px);
  border-radius: 0;
  margin: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(231, 201, 138, 0.18), transparent 40%),
    linear-gradient(165deg, #121722, #0b0f1a);
}

.page-social .ig-actions-row {
  padding: 0.45rem 0.65rem 0.15rem;
  gap: 0.15rem;
}

.page-social .ig-caption {
  padding: 0.15rem 0.9rem 0.85rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(242, 238, 230, 0.92);
}

.page-social .ig-tag,
.page-social .flick-tag {
  color: #9bb7e8;
  opacity: 0.9;
}

/* ---- App panels: calm reading surfaces ---- */

.page-social .app-panel {
  background: #0b0f1a;
  padding: 4.75rem 1.1rem calc(5rem + env(safe-area-inset-bottom));
}

.page-social .panel-intro {
  max-width: 420px;
  margin: 0 auto 1.35rem;
}

.page-social .panel-kicker {
  color: rgba(231, 201, 138, 0.85);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

.page-social .panel-intro h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.7rem, 5vw, 2.1rem);
  letter-spacing: 0.01em;
  margin: 0.15rem 0 0.45rem;
  color: #f7f3ea;
}

.page-social .panel-intro p {
  color: rgba(242, 238, 230, 0.62);
  font-size: 0.95rem;
  line-height: 1.5;
}

.page-social .frontier-card,
.page-social .person-card,
.page-social .inbox-row,
.page-social .search-row,
.page-social .notif-row,
.page-social .room-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(18, 22, 34, 0.92);
  box-shadow: none;
}

/* Frontiers list is flat rows — not chunky cards */
.page-social .frontier-row.frontier-card,
.page-social article.frontier-row {
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.page-social .frontier-card:hover,
.page-social .inbox-row:hover,
.page-social .search-row:hover {
  border-color: rgba(231, 201, 138, 0.28);
}

.page-social .btn-primary {
  border-radius: 999px;
}

.page-social .btn-secondary {
  border-radius: 999px;
}

/* "Tap again to remove" - armed state for the friend-remove tap-twice
   confirm (see social.js). A visible, unmistakable "this will actually
   do it now" cue, not just a text change. */
.page-social .btn-secondary.is-danger-armed {
  border-color: #e08a8a;
  color: #e08a8a;
  background: rgba(224, 138, 138, 0.12);
}

/* Sheets feel like iOS / IG bottom sheets */

.page-social .sheet-panel {
  border-radius: 20px 20px 0 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(20, 26, 44, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  max-height: min(88vh, 720px);
}

.page-social .sheet-handle {
  width: 2.4rem;
  height: 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0.55rem auto 0.25rem;
}

/* Hide feed chrome outside feed */
body[data-social-view]:not([data-social-view="feed"]) #feed-chrome {
  display: none !important;
}

body[data-social-view="feed"] .social-top {
  /* keep light overlay on reels */
}

body[data-social-view="feed"] .social-root[data-layout="feed"] .social-product .brand-word {
  display: inline;
}

/* Empty following */
.page-social .empty-state {
  max-width: 320px;
  margin: 6rem auto;
  text-align: center;
  color: rgba(242, 238, 230, 0.55);
  line-height: 1.5;
  padding: 0 1rem;
}

/* Comfort: bigger targets, less motion already handled */
html.comfort-mode .page-social .audience-tabs--text .audience-tab {
  font-size: 1.05rem;
  min-height: 2.6rem;
}

html.comfort-mode .page-social .bottom-nav .nav-item {
  min-height: 3rem;
}

/* An older 700px-based "sidebar" system used to live here (before the
   real desktop-sidebar system in social.css existed, keyed to 1000px).
   It assumed a 232px sidebar was already present at 700px+ (shifting
   .social-top over for it) and force-showed .desktop-sidebar at
   <700px "to keep it reachable in narrow panes" - but social.css's
   .desktop-sidebar doesn't exist below 1000px at all, so that just
   forced the full desktop rail on top of the still-visible mobile top
   bar/bottom-nav on any real narrow window or phone, which is exactly
   the "cramped sidebar + two logos" bug reported live. Removed outright
   rather than reconciled with social.css's system - it was never doing
   anything the 1000px system doesn't already do correctly. */

/* ---- Frontiers workshop: phone list + filters ---- */

.page-social .panel-frontiers .panel-intro--compact {
  max-width: 40rem;
  margin: 0 auto 0.55rem;
}

.page-social .panel-intro--compact h2 {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 3.5vw, 1.85rem);
  margin: 0.1rem 0 0.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.page-social .frontier-brand-mark {
  color: var(--gold);
  font-weight: 500;
  line-height: 1;
}

.page-social .panel-intro--compact p {
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0;
  color: rgba(242, 238, 230, 0.62);
}

.page-social .frontier-filter-tabs {
  max-width: 40rem;
  margin: 0 auto 0.55rem;
  display: flex;
  gap: 0.25rem;
  padding: 0.2rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.page-social .frontier-filter {
  appearance: none;
  flex: 1;
  border: 0;
  background: transparent;
  color: rgba(242, 238, 230, 0.55);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  min-height: 2.5rem;
  border-radius: 10px;
  cursor: pointer;
}

.page-social .frontier-filter.is-active {
  background: rgba(231, 201, 138, 0.14);
  color: var(--cream);
}

.page-social .frontier-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 40rem;
  margin: 0 auto 0.55rem;
}

.page-social .frontier-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.page-social .frontier-search {
  width: 100%;
  min-height: 2.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 26, 0.55);
  color: var(--cream);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem 0.55rem 2.5rem;
}

.page-social .frontier-search::placeholder {
  color: rgba(242, 238, 230, 0.35);
}

.page-social .frontier-search:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.page-social .frontier-toolbar {
  max-width: 40rem;
  margin: 0 auto 0.45rem;
  display: flex;
  gap: 0.15rem;
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-social .frontier-tool {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(242, 238, 230, 0.55);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  min-height: 2.4rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.page-social .frontier-tool:hover,
.page-social .frontier-tool:focus-visible {
  color: #f2eee6;
}

.page-social .frontier-tool--accent {
  color: #e7c98a;
}

.page-social .frontiers-list {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 5.5rem;
}

.page-social .frontier-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.page-social .frontier-row:hover {
  background: rgba(255, 255, 255, 0.025);
  border-color: rgba(255, 255, 255, 0.06);
}

.page-social .frontier-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.9rem 0.35rem 0.9rem 0.15rem;
  cursor: pointer;
  min-height: 3.25rem;
}

.page-social .frontier-row .frontier-glyph {
  flex-shrink: 0;
  width: 2.65rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  color: var(--gold);
  margin: 0.15rem 0 0;
  opacity: 0.95;
}

.page-social .frontier-row-copy {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  min-width: 0;
}

.page-social .frontier-row-title-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.page-social .frontier-row-title {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 500;
  color: #f7f3ea;
  line-height: 1.25;
}

.page-social .frontier-field {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(231, 201, 138, 0.85);
  background: rgba(231, 201, 138, 0.1);
  border: 1px solid rgba(231, 201, 138, 0.22);
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  white-space: nowrap;
}

.page-social .frontier-row .frontier-hook {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: rgba(242, 238, 230, 0.58);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-social .frontier-row .frontier-meta {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  color: rgba(242, 238, 230, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-social .frontier-star {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(242, 238, 230, 0.45);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: 3.25rem;
  min-height: 2.75rem;
  align-self: center;
  cursor: pointer;
  flex-shrink: 0;
}

.page-social .frontier-star[aria-pressed="true"] {
  color: var(--gold);
}

.page-social .frontier-milestones {
  list-style: none;
  margin: 0.35rem 0 1rem;
  padding: 0;
  display: grid;
  gap: 0;
  border-left: 2px solid rgba(231, 201, 138, 0.28);
}

.page-social .frontier-milestone {
  display: grid;
  grid-template-columns: 4.25rem 1fr;
  gap: 0.55rem;
  padding: 0.45rem 0 0.45rem 0.85rem;
  position: relative;
}

.page-social .frontier-milestone::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.7rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(242, 238, 230, 0.25);
  border: 2px solid #141a2c;
}

.page-social .frontier-milestone.is-done::before {
  background: var(--gold);
}

.page-social .frontier-milestone-y {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}

.page-social .frontier-milestone-t {
  font-size: 0.86rem;
  line-height: 1.35;
  color: rgba(242, 238, 230, 0.72);
}

.page-social .frontier-move-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  margin-top: 0.35rem;
}

.page-social .frontier-vote {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(242, 238, 230, 0.65);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  min-height: 2rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  cursor: pointer;
}

.page-social .frontier-vote:hover,
.page-social .frontier-vote:focus-visible {
  color: var(--cream);
  border-color: rgba(231, 201, 138, 0.45);
}

/* ---- Shared flat-row list (Friends, Inbox, Notifications, Search,
   Math Memory, Creator drafts/schedule, Live rooms) — same lean look
   as Frontiers, not chunky cards. Feed/Flicks intentionally excluded. */

.page-social .panel-intro,
.page-social .panel-frontiers .panel-intro--compact,
.page-social .app-panel:not(.panel-live) .panel-intro {
  max-width: 40rem;
}

.page-social .app-panel .panel-intro h2 {
  font-size: clamp(1.35rem, 3.5vw, 1.75rem);
  margin: 0.1rem 0 0.25rem;
}

.page-social .app-panel .panel-intro p {
  font-size: 0.88rem;
  line-height: 1.4;
}

.page-social .flat-list {
  max-width: 40rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-social .flat-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  border-radius: 0;
  padding: 0;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.page-social .flat-row:hover,
.page-social .flat-row:focus-visible {
  background: rgba(255, 255, 255, 0.025);
}

.page-social .flat-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0.85rem 0.35rem 0.85rem 0.15rem;
  min-height: 3.25rem;
}

.page-social .flat-row-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--bg);
  background: var(--gold);
  margin-top: 0.1rem;
}

.page-social .flat-row-glyph {
  flex-shrink: 0;
  width: 2.5rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.2;
  color: #e7c98a;
  margin: 0.1rem 0 0;
  opacity: 0.9;
}

.page-social .flat-row-thumb {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  background-color: var(--panel-raised, rgba(17, 23, 38, 0.6));
}

.page-social .flat-row-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.page-social .flat-row-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f7f3ea;
  line-height: 1.25;
}

.page-social .flat-row-sub {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.35;
  color: rgba(242, 238, 230, 0.58);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-social .flat-row-meta {
  margin: 0.15rem 0 0;
  font-size: 0.72rem;
  letter-spacing: 0.01em;
  color: rgba(242, 238, 230, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.page-social .flat-row-aside {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding: 0 0.35rem;
}

#notif-list .flat-row-title,
#notif-quick-list .flat-row-title {
  font-weight: 400;
}

.page-social .flat-row.is-unread .flat-row-title::after {
  content: "";
  display: inline-block;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--gold);
  margin-left: 0.4rem;
  vertical-align: middle;
}

@media (min-width: 540px) {
  .page-social .flat-list,
  .page-social .people-list,
  .page-social .inbox-list,
  .page-social .search-results {
    max-width: 40rem;
  }
}

.page-social .frontier-tabs,
.page-social .contribute-mode-tabs {
  display: flex;
  gap: 0.15rem;
  padding: 0 0.85rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-social .frontier-tab {
  flex: 1;
  min-height: 2.35rem;
  border: 0;
  background: transparent;
  color: rgba(242, 238, 230, 0.5);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.page-social .frontier-tab.is-active {
  color: #f2eee6;
  border-bottom-color: #e7c98a;
}

.page-social .sheet-panel--tall {
  max-height: min(92vh, 820px);
}

.page-social .frontier-sheet-actions {
  display: flex;
  gap: 0.25rem;
  justify-content: flex-end;
  padding: 0.75rem 0.15rem 0;
  margin-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.page-social .frontier-detail-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.15rem 0.5rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.page-social .frontier-detail-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #f2eee6;
}

.page-social .frontier-body {
  padding: 0.65rem 0.15rem 0.85rem;
}

.page-social .frontier-empty {
  margin: 2rem auto !important;
}

.page-social .frontier-thread {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.page-social .frontier-move {
  padding: 0.75rem 0.15rem;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  border-left: 2px solid rgba(231, 201, 138, 0.4);
  padding-left: 0.75rem;
}

.page-social .frontier-move.kind-question {
  border-left-color: rgba(120, 170, 220, 0.65);
}

.page-social .frontier-move.kind-counter {
  border-left-color: rgba(220, 140, 120, 0.65);
}

.page-social .frontier-move.kind-cite {
  border-left-color: rgba(160, 200, 150, 0.65);
}

.page-social .frontier-move.kind-sketch {
  border-left-color: rgba(200, 170, 230, 0.65);
}

.page-social .frontier-move.kind-correction {
  border-left-color: rgba(231, 138, 138, 0.75);
}

.page-social .frontier-move.is-accepted {
  background: rgba(120, 200, 150, 0.07);
}

.page-social .frontier-move.is-needs-help {
  background: rgba(231, 201, 138, 0.06);
}

.page-social .frontier-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}

.page-social .frontier-badge--accepted {
  color: #8fe0a8;
  background: rgba(120, 200, 150, 0.16);
}

.page-social .frontier-badge--agreed {
  color: #e7c98a;
  background: rgba(231, 201, 138, 0.14);
}

.page-social .frontier-badge--help {
  color: #f2b98a;
  background: rgba(231, 150, 100, 0.14);
}

.page-social .frontier-board-filters {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  padding: 0 0 0.6rem;
}

.page-social .board-filter-tab {
  flex: none;
  min-height: 1.9rem;
  padding: 0 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: rgba(242, 238, 230, 0.55);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.page-social .board-filter-tab.is-active {
  color: #0b0f1a;
  background: #e7c98a;
  border-color: #e7c98a;
}

.page-social .frontier-accept-btn,
.page-social .frontier-help-btn,
.page-social .frontier-correct-btn {
  font-size: 0.82rem;
}

.page-social .frontier-move-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.25rem;
}

.page-social .frontier-move-kind {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e7c98a;
  font-weight: 700;
}

.page-social .frontier-move-time {
  margin-left: auto;
  font-size: 0.7rem;
  color: rgba(242, 238, 230, 0.38);
}

.page-social .frontier-move-reply {
  margin: 0 0 0.3rem;
  font-size: 0.78rem;
  color: rgba(242, 238, 230, 0.42);
  font-style: italic;
}

.page-social .frontier-move-text {
  margin: 0 0 0.3rem;
  color: #f2eee6;
  line-height: 1.45;
  font-size: 0.92rem;
}

.page-social .frontier-reply-btn {
  font-size: 0.82rem;
}

.page-social .frontier-clips {
  display: grid;
  gap: 0.75rem;
}

.page-social .frontier-clip {
  padding: 0.55rem 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
}

.page-social .frontier-clip h3 {
  margin: 0.45rem 0 0.2rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.02rem;
  color: #f2eee6;
}

.page-social .frontier-clip p {
  margin: 0 0 0.3rem;
  color: rgba(242, 238, 230, 0.65);
  font-size: 0.88rem;
  line-height: 1.4;
}

.page-social .frontier-clip-video,
.page-social .frontier-clip-preview {
  width: 100%;
  border-radius: 10px;
  background: #000;
  max-height: 240px;
  object-fit: contain;
}

.page-social .frontier-clip-placeholder {
  display: grid;
  place-items: center;
  height: 5.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(242, 238, 230, 0.45);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.page-social .contribute-form {
  padding: 0.75rem 0.95rem 1.25rem;
}

.page-social .btn-small {
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
}

/* Web: slightly roomier reading column, still one composition */
@media (min-width: 720px) {
  .page-social .panel-frontiers {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* .panel-intro--compact/.frontier-toolbar/.frontiers-list used to be
     forced to 44rem here - an older tablet breakpoint (720px) that
     predates social.css's real desktop-sidebar system (1000px) and, at
     >=1000px, was fighting it: `.page-social X` (2 classes) beats
     social.css's plain `.frontier-toolbar`/`.frontiers-list` (1 class)
     regardless of source order, so the toolbar/list rendered 64px wider
     than - and misaligned against - the header/search bar above them.
     Confirmed live at 1200px: list left:364/width:704 vs header
     left:396/width:640. Both selectors now live in social.css's real
     centering lists instead; removed here rather than duplicated. */

  .page-social .frontier-row-main {
    padding: 0.95rem 0.5rem 0.95rem 0.25rem;
  }

  .page-social .frontier-row-title {
    font-size: 1.22rem;
  }

  .page-social .sheet-panel--tall {
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
  }
}

/* ---- Code pad (Live-embedded) ---- */

.page-social .code-textarea {
  display: block;
  width: 100%;
  max-width: 40rem;
  min-height: 50vh;
  margin: 0 auto;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 26, 0.75);
  color: var(--cream);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
}

.page-social .code-textarea--live {
  min-height: 10rem;
}

.page-social .code-view {
  width: 100%;
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(11, 15, 26, 0.75);
  color: var(--cream);
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.page-social .live-tool-panel {
  max-width: 34rem;
  margin: 0.75rem auto;
}

.page-social .code-editor-shell {
  width: 100%;
  max-width: 44rem;
  height: 60vh;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.page-social .code-editor-shell--live {
  max-width: 100%;
  height: 14rem;
}

.page-social .code-view {
  max-width: 44rem;
}

#code-run-images img,
#studio-code-run-images img {
  max-width: 100%;
  border-radius: 8px;
  margin: 0.5rem auto;
  display: block;
}

/* ---- Draggable Live tool panels (whiteboard) — soft floating window ---- */

.page-social .draggable-panel {
  position: relative;
  max-width: 100%;
  width: min(100%, 34rem);
  margin: 0.75rem auto;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(17, 23, 38, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
  touch-action: none;
}

.page-social .draggable-panel.is-dragging {
  position: fixed;
  z-index: 60;
  margin: 0;
}

.page-social .draggable-handle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: rgba(231, 201, 138, 0.1);
  border-bottom: 1px solid var(--line);
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: grab;
  user-select: none;
}

.page-social .draggable-handle:active {
  cursor: grabbing;
}

.page-social .whiteboard-canvas {
  display: block;
  width: 100%;
  aspect-ratio: 8 / 5;
  touch-action: none;
  cursor: crosshair;
}

/* Smooth open transition for Live tool panels (calculator/code/whiteboard) */
.page-social .live-tool-panel,
.page-social .draggable-panel {
  transition: opacity 0.22s ease, transform 0.22s ease;
  opacity: 1;
  transform: translateY(0);
}

.page-social .live-tool-panel.is-entering,
.page-social .draggable-panel.is-entering {
  opacity: 0;
  transform: translateY(6px);
}

/* Age + terms gate styles now live in legal-gate.css */
