/* StatsPoint Feed v2 adoption layer (handoff: IMPLEMENTATION.md + statspoint.css).
   The base file (statspoint.css) loads BEFORE styles.css and the zz_ skins, so
   on its own it loses every conflict. This file loads LAST (zz_ + "st" sorts
   after zz_site_chrome), mirrors the ID-scoped selectors of the older bands,
   and makes the v2 look actually win — on the whole feed page, not just cards.

   Strategy (same as the 2026-08 dark pass): the feed routes its colors through
   the --feed-* tokens and the global header through --spc-* tokens, so section
   1-2 just RETOKEN both to the statspoint palette. Sections 3-5 handle what
   tokens can't reach: fonts on Mantine controls and the reel-card geometry. */

/* ---- 1. feed palette → statspoint tokens ---------------------------------- */

.feed-theme-shell.feed-theme-dark {
  --feed-bg: var(--sp-bg);
  --feed-panel: var(--sp-surface);
  --feed-panel-strong: var(--sp-surface);
  --feed-card-bg: var(--sp-chrome);
  --feed-card-border: var(--sp-border-strong);
  --feed-card-shadow: none;
  --feed-border: var(--sp-border-strong);
  --feed-divider: var(--sp-border);
  --feed-input-bg: var(--sp-surface);
  --feed-input-border: var(--sp-border-strong);
  --feed-text: var(--sp-text);
  --feed-title: var(--sp-text);
  --feed-subtitle: var(--sp-text-2);
  --feed-meta: var(--sp-text-3);
  --feed-muted: var(--sp-text-3);
  --feed-accent: var(--sp-accent);
  --feed-primary: var(--sp-accent);
  --feed-primary-strong: var(--sp-accent-hover);
  --feed-track: var(--sp-chip);
  --feed-badge-bg: var(--sp-surface);
  --feed-badge-border: var(--sp-border-strong);
  --feed-badge-text: var(--sp-text-2);
  --feed-type-question-bg: color-mix(in srgb, var(--sp-accent) 14%, transparent);
  --feed-type-stat-bg: color-mix(in srgb, var(--sp-accent) 14%, transparent);
  --feed-type-pill-border: color-mix(in srgb, var(--sp-accent) 30%, transparent);
  --feed-type-pill-text: var(--sp-accent-hover);
  --feed-answered-badge-bg: var(--sp-border);
  --feed-answered-badge-border: var(--sp-border-strong);
  --feed-answered-badge-text: var(--sp-text-2);
  --feed-icon-btn-bg: var(--sp-surface);
  --feed-icon-btn-border: var(--sp-border-strong);
  --feed-icon-btn-color: var(--sp-text-2);
  --feed-icon-btn-hover: var(--sp-chip);
  --feed-icon-btn-accent-bg: color-mix(in srgb, var(--sp-accent) 14%, transparent);
  --feed-icon-btn-accent-border: color-mix(in srgb, var(--sp-accent) 30%, transparent);
  --feed-icon-btn-accent-color: var(--sp-accent-hover);
  --feed-icon-btn-accent-hover: color-mix(in srgb, var(--sp-accent) 20%, transparent);
  --feed-mode-switch-bg: var(--sp-chrome);
  --feed-mode-switch-border: var(--sp-border-strong);
  --feed-mode-switch-label: var(--sp-text-3);
  --feed-mode-switch-indicator-bg: color-mix(in srgb, var(--sp-accent) 14%, transparent);
  --feed-mode-switch-indicator-border: color-mix(in srgb, var(--sp-accent) 30%, transparent);
  --feed-mode-switch-label-active: var(--sp-accent-hover);
  --feed-result-surface: var(--sp-surface);
  --feed-result-border: var(--sp-border-strong);
  --feed-result-track: var(--sp-chip);
  --feed-result-track-selected: color-mix(in srgb, var(--sp-accent) 20%, transparent);
  --feed-result-fill: #3a3a41;
  --feed-result-fill-selected: var(--sp-accent);
  --feed-result-label: var(--sp-text);
  --feed-result-accent: var(--sp-accent-hover);
  --feed-answer-bg: var(--sp-surface);
  --feed-answer-border: var(--sp-border-strong);
  --feed-answer-text: var(--sp-text);
  --feed-answer-hover: var(--sp-chip);
  --feed-note-bg: var(--sp-surface);
  --feed-note-border: var(--sp-border-strong);
  --feed-note-border-strong: var(--sp-border-strong);
  --feed-note-icon: var(--sp-text-3);
  --feed-note-text: var(--sp-text-2);
  --feed-stage-bg: var(--sp-bg);
  --feed-video-stage-bg: #000000;
  --feed-stage-border: var(--sp-border-strong);
  --feed-control-panel-bg: var(--sp-surface);
  --feed-skeleton-fill: rgba(42, 42, 47, 0.9);
  --feed-skeleton-fill-selected: color-mix(in srgb, var(--sp-accent) 35%, transparent);
  --feed-order-surface: var(--sp-surface);
  --feed-order-active: var(--sp-chip);
  --feed-chart-chip-surface: var(--sp-surface);
  --feed-chart-chip-border: var(--sp-border-strong);
  --feed-chart-chip-text: #c9c6bf;
  --feed-header-bg: rgba(12, 12, 14, 0.92);
  --feed-header-border: var(--sp-border-strong);
  --feed-header-text: var(--sp-text);
  --feed-header-muted: var(--sp-text-3);
  --feed-header-muted-hover: var(--sp-text-2);
  --feed-theme-btn-bg: var(--sp-surface);
  --feed-theme-btn-border: var(--sp-border-strong);
  --feed-theme-btn-color: var(--sp-text-2);
  --feed-user-bg: var(--sp-accent);
  --feed-user-color: var(--sp-bg);
  --feed-category-bg: color-mix(in srgb, var(--sp-accent) 12%, transparent);
  --feed-category-border: color-mix(in srgb, var(--sp-accent) 28%, transparent);
  --feed-category-text: var(--sp-accent-hover);
  --feed-loader-bg: var(--sp-surface);
  --feed-loader-border: var(--sp-border-strong);
  --feed-loader-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
  --feed-loader-orb: var(--sp-accent);
  --feed-loader-orb-soft: color-mix(in srgb, var(--sp-accent) 35%, transparent);
  --feed-loader-detail: var(--sp-text-2);
}

/* page ground (same selectors as zz_feed_redesign; this file loads later) */
body:where([data-sp-has~="app"]):not(#sp-s):where([data-sp-has~="feed-dark"]):not(.sp-s):not(.sp-s) {
  background: var(--sp-bg) !important;
}

body:where([data-sp-has~="app"]):not(#sp-s):where([data-sp-has~="feed-dark"]):not(.sp-s):not(.sp-s) #app-container {
  background-color: var(--sp-bg) !important;
}

/* hard-coded oranges in zz_site_chrome that bypass the tokens */


/* active Feed pill: styles.css keys it to the accent-blue --feed-primary;
   the dark header redesign is orange, so recolor it to match */


/* ---- 3. top-chrome typography --------------------------------------------- */
/* Clear feed refinement. Scope the UI family to this surface, leaving the
   shared header, detail page, chart fonts and saved media unchanged. */

#main-feed-shell.main-feed-page-shell {
  --feed-ui-font: var(--sp-font-ui);
  --feed-muted: var(--sp-text-2);
  font-family: var(--feed-ui-font);
}

#main-feed-shell.main-feed-page-shell .feed-content-tabs .mantine-SegmentedControl-label {
  font-family: var(--feed-ui-font);
  font-weight: 600;
}

#main-feed-shell.main-feed-page-shell .feed-order-select .mantine-Input-input,
#main-feed-shell.main-feed-page-shell .feed-find-btn,
#main-feed-shell.main-feed-page-shell .feed-search-input,
#main-feed-shell.main-feed-page-shell .feed-search-input .mantine-Input-input {
  font-family: var(--feed-ui-font);
}

/* Everyday filter labels use the same readable family as the other controls. */
#main-feed-shell.main-feed-page-shell .feed-topic-chip .mantine-Chip-label {
  font-family: var(--feed-ui-font);
  font-size: 13px !important;
  font-weight: 500 !important;
}

#main-feed-shell.feed-theme-dark .feed-topic-chip input:checked + .mantine-Chip-label {
  color: var(--sp-bg) !important;
}

#main-feed-shell.main-feed-page-shell .feed-chart-chip {
  font-family: var(--feed-ui-font);
}

#main-feed-shell.main-feed-page-shell .feed-topic-chip .mantine-Text-root {
  /* The component supplies inline size and weight; keep labels at 13/500. */
  font: inherit !important;
}

#main-feed-shell.main-feed-page-shell .feed-search-open-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px !important;
  border-color: transparent !important;
  background: transparent !important;
}

#main-feed-shell.main-feed-page-shell .feed-order-select {
  width: 87px !important;
}

#main-feed-shell.main-feed-page-shell .feed-order-select .mantine-Input-input {
  height: 40px;
  min-height: 40px;
  padding-left: 8px !important;
  padding-right: 20px !important;
  border-radius: 8px !important;
  border-color: transparent !important;
  background: transparent !important;
  font-size: 13px;
  font-weight: 500;
}

#main-feed-shell.main-feed-page-shell .feed-order-select .mantine-Select-section[data-position="left"] {
  display: none;
}

#main-feed-shell.main-feed-page-shell .feed-search-open-btn:hover,
#main-feed-shell.main-feed-page-shell .feed-order-select .mantine-Input-input:hover {
  background: var(--sp-surface) !important;
}

#main-feed-shell.main-feed-page-shell :is(.feed-search-open-btn, .feed-search-close-btn, .feed-order-select input, .feed-content-tabs input, .feed-topic-chip input):focus-visible {
  outline: 2px solid var(--sp-accent);
  outline-offset: 2px;
}

#main-feed-shell.main-feed-page-shell .feed-search-input input {
  font-family: var(--feed-ui-font);
  font-size: 16px !important;
}

@media (max-width: 359px) {
  #main-feed-shell.main-feed-page-shell .feed-order-select {
    width: 79px !important;
  }
  #main-feed-shell.main-feed-page-shell .feed-search-open-btn {
    width: 34px;
    height: 34px;
  }
}

/* ---- 4. reel card: v2 skin wins over the legacy reels band ---------------- */

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel {
  border-radius: 20px;
  overflow: hidden;
  background: var(--sp-card, var(--sp-chrome));
  /* the 9:16 frame is enforced by .sp-reels-video-stage; the base file's
     aspect-ratio on the wrapper would clip the expanding info/filter panels */
  aspect-ratio: auto;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reels-video-stage {
  background: var(--sp-card, var(--sp-chrome));
}

/* Bottom block = Instagram-reels caption geometry (user 2026-08-28: the
   18px two-line title read as a separate "post text" area instead of a
   caption over the video). Author row (34px) -> 8px -> ONE-LINE 14px title
   at full width; ~74px of content under a 44px fade. Tap-to-expand is the
   legacy .is-expanded mechanic (full title + subtitle) and is untouched.
   BOTH MODES: section 4b docks the transport right above this block.
   !important: a mobile band in styles.css (~8406) insets/lifts the overlay
   with !important; the block must span the full card width everywhere. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__bottom {
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  padding: 44px 16px 14px;
  background: linear-gradient(0deg, rgba(8, 8, 10, 0.94) 0%, rgba(8, 8, 10, 0.7) 55%, transparent 100%);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reels-video-meta {
  max-width: none;
  width: 100%;
  gap: 8px;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__author {
  gap: 10px;
  padding-right: 120px; /* keep the name clear of the Explore/Back pill */
}

/* avatar: dark tile, accent glyph, 34px on every breakpoint (the mobile band
   already pins 34px; desktop was 36px) */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  background: var(--sp-surface-2, var(--sp-chip));
  border: 1px solid #3a3a41;
  box-shadow: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-avatar .sp-reels-video-author-mark {
  background: var(--sp-accent, var(--sp-accent));
}

/* name: reels handle weight. !important: the mobile band pins 0.82rem with
   !important, so the size has to be forced to stay identical on phones. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__name .sp-reels-video-author-name {
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 14px !important;
  font-weight: 700;
  color: var(--sp-text, var(--sp-text));
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__name .sp-reels-video-author-verified {
  color: var(--sp-verified, var(--sp-accent));
}

/* category line: plain 12px secondary copy under the name (was 9px mono
   uppercase tracking, which read as noise next to the reels reference) */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__meta {
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(244, 242, 238, 0.78);
}

/* title = the reels caption: body size, one line + ellipsis, full width
   (was 18px/700, two lines, 44px right pad). !important on the size: the
   mobile band pins 0.8rem with !important. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__title {
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 14px !important;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--sp-text, var(--sp-text));
  padding-right: 0;
  -webkit-line-clamp: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* expanded (tap on the caption): full title a touch bolder, subtitle joins
   in body size (the legacy band only un-clamps it) */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reels-video-meta.is-expanded .sp-reel__title {
  font-weight: 600;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reels-video-meta.is-expanded .sp-reels-video-caption-subtitle {
  margin-top: 2px;
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  color: rgba(244, 242, 238, 0.82);
}

/* Explore CTA: ghost pill on the author row (was: blue gradient). top =
   the block's 44px fade, so the pill (32px + 1px borders) sits on the 34px
   avatar row. Both modes share the position; the legacy Back-state rule
   (higher specificity) still restyles the pill's look in interactive mode. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-btn-explore {
  top: 44px;
  right: 16px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(20, 20, 23, 0.6);
  color: var(--sp-text, var(--sp-text));
  box-shadow: none;
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(6px);
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-btn-explore:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(20, 20, 23, 0.78);
  box-shadow: none;
  transform: none;
}

/* action rail: reels anchoring. Bottom-anchored 14px above the author row
   (74px block content + 14px), bare icons with their drop shadow; the
   capsule scrim from styles.css (~11073) is dropped for reels parity.
   Both modes; 4b lifts it above the transport in interactive mode.
   !important: the legacy band centers the rail with top/transform
   !important. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__rail {
  top: auto !important;
  bottom: 88px !important;
  height: auto !important;
  max-height: none !important;
  padding: 0 !important;
  transform: none !important;
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* rail counters in mono, per the v2 spec */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__rail .sp-card-count-text {
  font-family: var(--sp-mono, "JetBrains Mono", monospace) !important;
}

/* ---- 4b. interactive (explore) mode: maximize the graph ------------------- */
/* Same overlay layout as video mode (author + title at the bottom, side
   rail, Back pill); the transport panel docks directly above the bottom
   block and the plot claims everything above it (user 2026-08-28). Vertical
   stack from the stage bottom, in px: 74 block content -> 10 gap ->
   transport (84..156, measured 72px tall) -> 12 clearance for the in-figure
   frame label (it overhangs the plot edge by ~5px) -> plot bottom at 168.
   Figure margins come from the author pipeline (the step-6 margin patch is
   gone). */

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-card-interactive-stage {
  --sp-reels-interactive-top-safe: 12px;
  --sp-reels-interactive-side-safe: 8px;
  --sp-reels-interactive-footer-safe: 168px;
  --sp-reels-interactive-bottom-safe: 168px;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-card-interactive-action-panel {
  left: 14px !important;
  right: 14px !important;
  bottom: 84px !important;
}

/* The in-figure frame label ("Age 623") is a paper-fraction annotation
   (y = -0.17 of the plot height, yanchor bottom) under a fixed 72px bottom
   margin, so on the tall reels plot it hangs 3-10px past the SVG edge and
   the SVG/graph wrappers clip it. Let those two wrappers overflow into the
   12px clearance above the transport; the stage still clips everything
   else (figure untouched). */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-card-interactive-stage .dash-graph,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-card-interactive-stage svg.main-svg {
  overflow: visible !important;
}

/* rail clears the transport (panel top 156 + 10) */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-reel__rail {
  bottom: 166px !important;
}

/* fine-tune sheet opens above the transport (legacy: 146-188px / 154px
   mobile, which now lands on the panel's top edge) */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-card-interactive-filter-collapse {
  bottom: 164px !important;
}

/* ---- 4c. scroll-mode post card (backlog 2.3, D-11 / D-44 / D-45) ---------- */
/* Instagram post: header row · media at the VIDEO's own aspect · action row ·
   caption · time (mockups B1 / B3). The wrapper carries .sp-feed-post.sp-feed-post--video
   and NOT .sp-reels-video-card / .sp-reel, so the legacy reel bands (styles.css
   ~6797-7690: 9:16 stage, absolute stack, right rail; statspoint.css §reel)
   never match it — they stay for the SP_FEED_IN_CARD_MODE composition and
   for 2.4's swipe mode. The frame's aspect is written inline by
   assets/video_feed_autoplay.js at loadedmetadata (videoWidth / videoHeight);
   the 4:5 below is only the placeholder until the metadata arrives.
   !important only where an inline style (Mantine `styles=` props, the card
   shell) or a legacy !important band has to be beaten. */

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post {
  --sp-feed-post-x: 16px;
  display: block !important;
  width: 100% !important;
  padding-bottom: 0;
  margin-bottom: 20px !important;
  border-bottom: 0;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-feed-card-shell--post {
  padding: 0 !important;
  max-height: none !important;
  overflow: visible !important;
  /* D-45: the post sits on the page ground — no card chrome at ANY width.
     styles.css ~5541 paints the shell (bg / 1px border / 18px radius / shadow)
     and only its ≤640 band clears it; on desktop the post used to sit inside
     that rounded card with a 0 gutter and a second rounded tile (the media)
     inside it — the "weird corners" + caption on the edge. */
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-feed-card-shell--post > .mantine-Stack-root {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 !important;
}

/* Share the media's grid cell: the safe-zone controls add no card height.
   They remain siblings of the media link, so actions never activate it. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__head,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__footer {
  grid-area: 1 / 1;
}

#main-feed-shell.main-feed-page-shell #feed-initial-skeleton .sp-feed-post {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__head,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__footer {
  position: relative;
  z-index: 2;
  --sp-text: #f7f8fa;
  --sp-text-dim-2: #d3d6dc;
  --sp-text-dim: #aeb4be;
  pointer-events: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__footer {
  align-self: end;
  min-width: 0;
  padding: 8px 0 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, .9), rgba(0, 0, 0, .65) 70%, transparent);
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__footer a,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__footer button {
  pointer-events: auto;
}

/* the column wrapper: no extra rhythm / divider of its own (the post draws one) */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .feed-card-enter:has(.sp-feed-post) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  border-bottom: 0 !important;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .feed-card-enter:has(.sp-feed-post)::after {
  display: none !important;
}

/* header row: avatar · statspoint ✓ · category */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px var(--sp-feed-post-x) 10px;
  align-self: start;
  background: linear-gradient(to bottom, rgba(0, 0, 0, .65), transparent);
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sp-surface-2, var(--sp-chip));
  border: 1.5px solid var(--sp-accent, var(--sp-accent));
  box-shadow: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-avatar .sp-reels-video-author-mark {
  width: 18px;
  height: 18px;
  background: var(--sp-accent, var(--sp-accent));
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__author-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-reel__name {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.2;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-reel__name .sp-reels-video-author-name {
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 14px !important;
  font-weight: 700;
  color: var(--sp-text, var(--sp-text));
  text-shadow: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-reel__name .sp-reels-video-author-verified {
  color: var(--sp-verified, var(--sp-accent));
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-reel__meta {
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 12px !important;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0;
  text-transform: none;
  color: var(--sp-text-dim-2, var(--sp-text-2));
  text-shadow: none;
}

/* media: full width, the box follows the video (D-44) */
/* Since 2.4 (D-46a) the media wrapper is a dcc.Link (<a>) to the swipe-mode
   viewer — reset to the block it was as a div, so the feed's pixels do not move. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  background: #000000;
  outline: 1px solid var(--sp-border-strong);
  outline-offset: -1px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .sp-visual-stack {
  width: 100%;
  gap: 0 !important;
}

/* Post cards have no shell padding to cancel. Legacy feed rules otherwise
   shift this 100%-wide pane left and clip the chart's Y-axis labels. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .sp-visual-pane-video {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .sp-visual-pane-video,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .sp-feed-video-box {
  width: 100%;
  max-height: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .sp-feed-video-frame,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .autoplay-feed-video-frame {
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  border-radius: 0 !important;
  background: #000000 !important;
  /* The frame is a flex item of .sp-feed-video-box. With the default alignment (normal), WebKit (Safari,
     every iOS browser) keeps the height of the 4:5 placeholder after the video script writes the video's
     aspect, so a 9:16 video was letterboxed at the sides on iPhones. With an explicit alignment the height
     follows the aspect-ratio in every engine. */
  align-self: flex-start;
}

/* Loading skeletons and video frames reserve the same media area. The video
   script replaces this placeholder aspect with the intrinsic dimensions. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .sp-feed-video-frame,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .autoplay-feed-video-frame,
#main-feed-shell.main-feed-page-shell .sp-feed-post__media.feed-skel-reel {
  aspect-ratio: 4 / 5;
}

/* Preserve the whole chart, including while metadata is still loading. */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media .autoplay-feed-video {
  object-fit: contain !important;
  object-position: center center !important;
}

/* action row: ♡ count · Explore · share · ⛶ … ⓘ (bare icons, mockup B1) */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions.sp-card-toolbar {
  margin: 0 !important;
  padding: 0 var(--sp-feed-post-x) !important;
  border-top: 0 !important;
  min-height: 0 !important;
  gap: 8px !important;
  background: transparent;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions > .sp-card-toolbar-primary {
  gap: 10px !important;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions > .sp-card-toolbar-secondary {
  margin-left: auto;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions .sp-card-like-group {
  gap: 6px !important;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions .sp-card-icon-btn.mantine-ActionIcon-root {
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  border-radius: 999px !important;
  background: transparent !important;
  border-color: transparent !important;
  color: var(--sp-text, var(--sp-text)) !important;
  box-shadow: none !important;
  filter: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions .sp-card-icon-btn.mantine-ActionIcon-root:hover {
  background: var(--feed-icon-btn-hover, var(--sp-chip)) !important;
  border-color: transparent !important;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions .sp-card-icon-btn .iconify,
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions .sp-card-icon-btn svg {
  width: 20px !important;
  height: 20px !important;
  color: inherit !important;
  opacity: 1 !important;
}

/* a liked heart (tabler:heart-filled) in the like colour */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions .sp-card-like-btn.mantine-ActionIcon-root:has(svg[data-icon="tabler:heart-filled"]) {
  color: var(--sp-like, #e5484d) !important;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__actions .sp-card-count-text {
  min-width: 0 !important;
  font-family: var(--sp-font, "Space Grotesk", sans-serif) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  color: var(--sp-text, var(--sp-text)) !important;
  text-shadow: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__explore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid color-mix(in srgb, var(--sp-accent) 75%, white);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--sp-accent-hover), var(--sp-accent));
  color: var(--sp-bg);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--sp-accent) 18%, transparent);
  text-decoration: none;
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: box-shadow 180ms ease, filter 180ms ease;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__explore:hover {
  color: var(--sp-bg);
  filter: brightness(1.08);
  box-shadow: 0 4px 18px color-mix(in srgb, var(--sp-accent) 30%, transparent);
  text-decoration: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__explore:focus-visible {
  outline: 2px solid var(--sp-text);
  outline-offset: 4px;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__explore:active {
  filter: brightness(0.94);
  box-shadow: none;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__explore .sp-feed-post__explore-icon {
  width: 16px;
  height: 16px;
  flex: none;
}

@media (prefers-reduced-motion: reduce) {
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__explore {
    transition: none;
  }
}

/* caption: "statspoint <title>", one line + ellipsis; tap = the existing
   video-meta-more toggle (className "sp-reels-video-meta is-expanded") */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__caption {
  padding: 3px var(--sp-feed-post-x) 0;
  min-width: 0;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__caption .sp-reels-video-meta {
  position: static;
  display: block;
  width: 100%;
  max-width: none;
  max-height: none;
  overflow: visible;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--sp-text, var(--sp-text));
  text-align: left;
  text-shadow: none;
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__caption-line {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__handle {
  font-weight: 700;
  margin-right: 5px;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__title {
  font-weight: 400;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__subtitle {
  display: none;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 400;
  color: var(--sp-text-dim-2, var(--sp-text-2));
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__caption .sp-reels-video-meta.is-expanded .sp-feed-post__caption-line {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__caption .sp-reels-video-meta.is-expanded .sp-feed-post__subtitle {
  display: block;
}

/* time: "3 days ago" */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__time {
  padding: 4px var(--sp-feed-post-x) 0;
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  font-size: 12px;
  line-height: 1.2;
  color: var(--sp-text-dim, var(--sp-text-3));
}

/* the ⓘ info / filter panels keep the card's gutter */
:is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post .sp-feed-card-shell--post > .mantine-Stack-root > .mantine-Collapse-root {
  padding: 8px var(--sp-feed-post-x) 0;
}

@media (min-width: 641px) {
  /* Keep the overlay controls inset within the rounded media on desktop. */
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post {
    --sp-feed-post-x: 16px;
    border-bottom: 0;
    padding-bottom: 0;
  }

  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__media {
    border-radius: 16px;
  }

  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__head {
    border-radius: 16px 16px 0 0;
  }

  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post__footer {
    border-radius: 0 0 16px 16px;
  }
}

/* Approved feed-only card typography. The shared detail rules above retain
   their original family and dimensions. No chart or video selector here. */
#main-feed-shell.main-feed-page-shell .sp-feed-post :is(.sp-reels-video-author-name, .sp-reel__meta, .sp-reels-video-meta, .sp-card-count-text, .sp-feed-post__explore, .sp-feed-post__time) {
  font-family: var(--feed-ui-font) !important;
}

#main-feed-shell.main-feed-page-shell .sp-feed-post .sp-reel__name .sp-reels-video-author-name,
#main-feed-shell.main-feed-page-shell .sp-feed-post .sp-feed-post__handle {
  font-weight: 600;
}

#main-feed-shell.main-feed-page-shell .sp-feed-post__head {
  gap: 8px;
}

#main-feed-shell.main-feed-page-shell .sp-feed-post .sp-reels-video-meta {
  line-height: 1.45;
}

#main-feed-shell.main-feed-page-shell .sp-feed-post__explore {
  min-height: 36px;
  border-color: transparent;
  background: var(--sp-accent);
  box-shadow: none;
  font-size: 13px;
  font-weight: 600;
}

#main-feed-shell.main-feed-page-shell .sp-feed-post__explore:hover {
  background: var(--sp-accent-hover);
  filter: none;
  box-shadow: none;
}

/* Keep all existing actions, while moving the primary Explore affordance
   beside information as in the approved mockup. */
#main-feed-shell.main-feed-page-shell .sp-feed-post__actions > .sp-card-toolbar-primary {
  flex: 1 1 auto !important;
  gap: 4px !important;
}

#main-feed-shell.main-feed-page-shell .sp-feed-post__actions .sp-feed-post__explore {
  order: 1;
  margin-left: auto;
}

@media (max-width: 767px), (max-height: 600px) and (pointer: coarse) {
  #main-feed-shell.main-feed-page-shell .sp-feed-post {
    --sp-feed-post-x: 12px;
  }

  #main-feed-shell.main-feed-page-shell :is(.sp-feed-post__media, .sp-feed-post__head, .sp-feed-post__footer, .sp-reel) {
    border-radius: 0;
  }
}

/* ---- 4d. register promo: an inline feed item (UX 2.5, D-14) ---------------- */
/* Anonymous visitors only, after the 2nd post (pages/feed/page.py
   `_with_feed_promo`, markup pages/feed/layout.py `build_feed_promo_card`):
   Instagram's "Suggested for you" card — eyebrow + x, avatar · title / copy ·
   orange "Register" pill. Never fixed; NOT a .feed-card-enter. Phones: full
   width between hairlines (mockup B1 rhythm); desktop: a rounded tile like the
   post's media (B3). Dismissed = .sp-feed-promo--dismissed (clientside). */
#main-feed-shell.main-feed-page-shell .sp-feed-promo {
  --sp-feed-post-x: 12px;
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 10px var(--sp-feed-post-x) 14px;
  background: var(--sp-card, var(--sp-chrome));
  border-top: 1px solid var(--feed-divider, var(--sp-border));
  border-bottom: 1px solid var(--feed-divider, var(--sp-border));
  font-family: var(--sp-font, "Space Grotesk", sans-serif);
  color: var(--sp-text, var(--sp-text));
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo--dismissed {
  display: none !important;
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__eyebrow {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--sp-text-dim, var(--sp-text-3));
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__x {
  width: 28px;
  height: 28px;
  margin-right: -6px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--sp-text-dim, var(--sp-text-3));
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__x:hover {
  color: var(--sp-text, var(--sp-text));
  background: var(--sp-surface-2, var(--sp-chip));
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo .sp-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--sp-surface-2, var(--sp-chip));
  border: 1.5px solid var(--sp-accent, var(--sp-accent));
  box-shadow: none;
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo .sp-avatar .sp-reels-video-author-mark {
  width: 18px;
  height: 18px;
  background: var(--sp-accent, var(--sp-accent));
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__copy {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--sp-text, var(--sp-text));
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__text {
  font-size: 13px;
  line-height: 1.35;
  color: var(--sp-text-dim, var(--sp-text-3));
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__cta {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--sp-accent, var(--sp-accent));
  color: var(--sp-bg);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}

#main-feed-shell.main-feed-page-shell .sp-feed-promo__cta:hover {
  filter: brightness(1.06);
  color: var(--sp-bg);
  text-decoration: none;
}

@media (min-width: 641px) {
  #main-feed-shell.main-feed-page-shell .sp-feed-promo {
    --sp-feed-post-x: 16px;
    padding-top: 12px;
    border: 1px solid var(--sp-border, var(--sp-border));
    border-radius: 16px;
  }
}

/* ---- 5. mobile: edge-to-edge reels ---------------------------------------- */
/* Phone best practices (user 2026-08-27): the card runs edge to edge with no
   rounded inset, the column packs tighter, and every inset that CSS controls
   goes to (near) zero; see feedback-graph-full-width. NOTE: in video mode
   most of the perceived side gap is baked INSIDE the mp4 (figure margins +
   title are part of the exported frames); that part needs re-exported videos,
   not CSS. */

@media (max-width: 640px) {
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed {
    padding-left: 0;
    padding-right: 0;
  }

  /* tighter vertical rhythm between cards */
  #main-feed-shell.main-feed-page-shell #results-cards-container {
    gap: 10px;
  }

  /* full-bleed card: no rounded-inset look on phones */
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel {
    border-radius: 0;
  }

  /* Text keeps its gutter; the centered video fills the entire card width. */
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-feed-post {
    --sp-feed-post-x: 12px;
  }

  /* interactive mode: plot side insets 0 (hard rule), top nearly 0 */
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-card-interactive-stage {
    --sp-reels-interactive-side-safe: 0px;
    --sp-reels-interactive-top-safe: 8px;
  }

  /* transport panel hugs the edges */
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel.is-exploring .sp-card-interactive-action-panel {
    left: 8px !important;
    right: 8px !important;
  }

  /* overlay blocks sit a touch closer to the edges */
  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-reel__bottom {
    padding-left: 12px;
    padding-right: 12px;
  }

  :is(#main-feed-shell.main-feed-page-shell, #detail-feed-shell.detail-page-shell) .sp-reel .sp-btn-explore {
    right: 12px;
  }
}

/* Share is rendered in a portal, outside the feed's theme scope. Use the
   application tokens directly so its text and controls retain their contrast. */
.sp-share-modal .mantine-Modal-content {
  background: var(--sp-surface);
  color: var(--sp-text);
  border: 1px solid var(--sp-border-strong);
  border-radius: var(--sp-radius-sheet);
  box-shadow: 0 24px 64px var(--sp-scrim);
  font-family: var(--sp-font-ui);
}

.sp-share-modal .mantine-Modal-header {
  padding: 24px 24px 20px;
  background: var(--sp-surface);
  border-bottom: 1px solid var(--sp-border);
  align-items: flex-start;
}

.sp-share-modal .mantine-Modal-body { padding: 20px 24px 24px; }
.sp-share-modal .mantine-Modal-title { color: var(--sp-text); }
.sp-share-modal .mantine-CloseButton-root {
  flex-shrink: 0;
  color: var(--sp-text-2);
  border-radius: var(--sp-radius-pill);
}
.sp-share-modal .mantine-CloseButton-root:hover {
  color: var(--sp-text);
  background: var(--sp-chip);
}

.sp-share-modal__title-wrap { gap: 12px; align-items: flex-start; }
.sp-share-modal__title-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--sp-radius-pill);
  color: var(--sp-text);
  background: var(--sp-chip);
  border: none;
  box-shadow: none;
}
.sp-share-modal .sp-share-modal__title {
  color: var(--sp-text);
  font-family: var(--sp-font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
}
.sp-share-modal .sp-share-modal__subtitle {
  margin-top: 5px;
  color: var(--sp-text-2);
  font-family: var(--sp-font-ui);
  font-size: 13px;
  line-height: 1.5;
}
.sp-share-modal__body { padding: 0; gap: 20px; }
.sp-share-modal__url-row { gap: 8px; }
.sp-share-modal__url-field {
  min-width: 0;
  min-height: 46px;
  background: var(--sp-bg);
  border: 1px solid var(--sp-border-strong);
  border-radius: var(--sp-radius-card);
}
.sp-share-modal__url-field:focus-within {
  background: var(--sp-bg);
  border-color: var(--sp-accent);
}
.sp-share-modal__url-icon { color: var(--sp-text-2); }
.sp-share-modal__url-input .mantine-Input-input {
  color: var(--sp-text) !important;
  font-family: var(--sp-font-ui);
  font-size: 13px;
  font-weight: 400;
}
.sp-share-modal__clipboard {
  flex-shrink: 0;
  min-width: 46px;
  min-height: 46px;
  border-radius: var(--sp-radius-card);
  background: var(--sp-accent);
  border-color: var(--sp-accent);
  color: var(--sp-on-accent);
  box-shadow: none;
}
.sp-share-modal__clipboard:hover {
  background: var(--sp-accent-hover);
  border-color: var(--sp-accent-hover);
  box-shadow: none;
  transform: none;
}
.sp-share-modal .sp-share-modal__copied {
  color: var(--sp-text);
  background: var(--sp-chip);
  border-color: var(--sp-border-strong);
}
.sp-share-modal__copied::before { background: var(--sp-accent); box-shadow: none; }
.sp-share-modal__divider { margin: 0; }
.sp-share-modal__divider::before,
.sp-share-modal__divider::after { background: var(--sp-border-strong); }
.sp-share-modal__divider-label { color: var(--sp-text-2); font-weight: 500; }
.sp-share-modal__quick-row { padding: 0; gap: 12px; flex-wrap: wrap; }
.sp-share-modal__quick.mantine-ActionIcon-root {
  width: 44px;
  height: 44px;
  border-radius: var(--sp-radius-pill);
  color: var(--sp-text);
  background: var(--sp-chip);
  border-color: var(--sp-border-strong);
}
.sp-share-modal__quick.mantine-ActionIcon-root:hover {
  color: var(--sp-text);
  background: var(--sp-border-strong);
  border-color: var(--sp-text-2);
  box-shadow: none;
  transform: none;
}
.sp-share-modal__clipboard:focus-visible,
.sp-share-modal__quick.mantine-ActionIcon-root:focus-visible {
  outline: 2px solid var(--sp-accent);
  outline-offset: 3px;
}
@media (max-width: 480px) {
  .sp-share-modal .mantine-Modal-header { padding: 20px 16px 16px; }
  .sp-share-modal .mantine-Modal-body { padding: 16px 16px 20px; }
}
