/* Step 66: keep the Rust feed visually aligned with the Flask-origin feed theme.
   The shared Rust CSS is still loaded for navbar helpers, but these scoped rules restore
   the Flask feed variable set after generic app styles and make manual themes deterministic. */

html[data-theme="dark"] body.pc-feed-shell,
html:not([data-theme]) body.pc-feed-shell {
  --bg: #0f1117;
  --bg2: #151924;
  --bg3: #1f2634;
  --bg4: #263044;
  --card: color-mix(in srgb, var(--bg2) 92%, white 8%);
  --card-strong: color-mix(in srgb, var(--bg3) 92%, white 8%);
  --border: rgba(148, 163, 184, .18);
  --border2: rgba(148, 163, 184, .28);
  --text: #eef2ff;
  --text2: #aab6cf;
  --text3: #718096;
  --accent: #5b6cff;
  --accent-hover: #4657f0;
  --accent-soft: color-mix(in srgb, var(--accent) 13%, transparent);
  --green: #34d399;
  --red: #fb7185;
  --partner: #2dd4bf;
  --metamour: #f59e0b;
  --ex: #ec4899;
  --other: #94a3b8;
  --row-hover: color-mix(in srgb, var(--accent) 10%, transparent);
  --shadow: 0 20px 60px rgba(0,0,0,.30);
  --shadow-soft: 0 14px 34px rgba(0,0,0,.18);
  --radius: 20px;
  --radius-sm: 14px;
  --glow: radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 20%, transparent), transparent 36%);
}

html[data-theme="light"] body.pc-feed-shell {
  --bg: #f5f7fb;
  --bg2: #ffffff;
  --bg3: #f1f4f9;
  --bg4: #e9edf6;
  --card: rgba(255,255,255,.92);
  --card-strong: #ffffff;
  --border: rgba(15, 23, 42, .10);
  --border2: rgba(15, 23, 42, .16);
  --text: #172033;
  --text2: #64748b;
  --text3: #94a3b8;
  --accent: #4f63ff;
  --accent-hover: #3448e6;
  --accent-soft: color-mix(in srgb, var(--accent) 11%, transparent);
  --green: #10b981;
  --red: #ef4444;
  --partner: #14b8a6;
  --metamour: #f59e0b;
  --ex: #ec4899;
  --other: #94a3b8;
  --row-hover: rgba(79,99,255,.08);
  --shadow: 0 24px 80px rgba(15, 23, 42, .12);
  --shadow-soft: 0 12px 35px rgba(15, 23, 42, .09);
  --radius: 20px;
  --radius-sm: 14px;
  --glow: radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 16%, transparent), transparent 36%);
}

html[data-theme="dracula"] body.pc-feed-shell {
  --bg: #282a36;
  --bg2: #343746;
  --bg3: #44475a;
  --bg4: #4d5066;
  --card: rgba(68, 71, 90, .92);
  --card-strong: rgba(68, 71, 90, .98);
  --border: rgba(248, 248, 242, .16);
  --border2: rgba(248, 248, 242, .24);
  --text: #f8f8f2;
  --text2: #c7c7d2;
  --text3: #9aa0b4;
  --accent: #bd93f9;
  --accent-hover: #ff79c6;
  --accent-soft: rgba(189, 147, 249, .14);
  --green: #50fa7b;
  --red: #ff5555;
  --partner: #8be9fd;
  --metamour: #f1fa8c;
  --ex: #ff79c6;
  --other: #bfbfd5;
  --row-hover: rgba(189, 147, 249, .13);
  --shadow: 0 24px 72px rgba(0,0,0,.28);
  --shadow-soft: 0 14px 38px rgba(0,0,0,.20);
}

html[data-theme="blue_bird"] body.pc-feed-shell {
  --bg: #f5f8fa;
  --bg2: #ffffff;
  --bg3: #eff3f4;
  --bg4: #e6ecf0;
  --card: rgba(255,255,255,.94);
  --card-strong: #ffffff;
  --border: rgba(15, 23, 42, .10);
  --border2: rgba(15, 23, 42, .16);
  --text: #0f1419;
  --text2: #536471;
  --text3: #8b98a5;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --accent-soft: rgba(29, 155, 240, .12);
  --partner: #00ba7c;
  --metamour: #f5a400;
  --ex: #f91880;
  --row-hover: rgba(29, 155, 240, .08);
  --shadow: 0 18px 58px rgba(15, 20, 25, .10);
  --shadow-soft: 0 10px 28px rgba(15, 20, 25, .08);
}

html[data-theme="blue_bird_dark"] body.pc-feed-shell {
  --bg: #000000;
  --bg2: #16181c;
  --bg3: #202327;
  --bg4: #2f3336;
  --card: rgba(22, 24, 28, .94);
  --card-strong: #16181c;
  --border: rgba(239, 243, 244, .14);
  --border2: rgba(239, 243, 244, .22);
  --text: #e7e9ea;
  --text2: #8b98a5;
  --text3: #71767b;
  --accent: #1d9bf0;
  --accent-hover: #1a8cd8;
  --accent-soft: rgba(29, 155, 240, .14);
  --partner: #00ba7c;
  --metamour: #ffd400;
  --ex: #f91880;
  --row-hover: rgba(29, 155, 240, .10);
  --shadow: 0 24px 72px rgba(0,0,0,.42);
  --shadow-soft: 0 14px 38px rgba(0,0,0,.30);
}

html[data-theme="trans_pride"] body.pc-feed-shell {
  --bg: #f7fbff;
  --bg2: rgba(255,255,255,.74);
  --bg3: rgba(255,255,255,.62);
  --bg4: rgba(245, 171, 185, .20);
  --card: rgba(255,255,255,.78);
  --card-strong: rgba(255,255,255,.90);
  --border: rgba(16,32,51,.14);
  --border2: rgba(16,32,51,.22);
  --text: #102033;
  --text2: #45556b;
  --text3: #64748b;
  --accent: #5bcffa;
  --accent-hover: #38bdf8;
  --accent-soft: rgba(91,207,250,.20);
  --green: #10b981;
  --red: #ef5f7a;
  --partner: #5bcffa;
  --metamour: #f5abb9;
  --ex: #e879f9;
  --other: #64748b;
  --row-hover: rgba(91,207,250,.14);
  --shadow: 0 24px 80px rgba(91,207,250,.16);
  --shadow-soft: 0 12px 35px rgba(91,207,250,.12);
  --glow: radial-gradient(circle at top left, rgba(91,207,250,.26), transparent 34%),
          radial-gradient(circle at top right, rgba(245,171,185,.24), transparent 32%);
}

html[data-theme="trans_pride"] body.pc-feed-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(91,207,250,.24), transparent 32%),
    radial-gradient(circle at 94% 12%, rgba(245,171,185,.22), transparent 30%),
    linear-gradient(135deg, #5bcffa 0%, #f5abb9 38%, #ffffff 50%, #f5abb9 62%, #5bcffa 100%);
  background-attachment: fixed;
}

body.pc-feed-shell {
  background:
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 32%),
    radial-gradient(circle at 94% 12%, color-mix(in srgb, var(--partner) 10%, transparent), transparent 30%),
    var(--bg) !important;
  color: var(--text) !important;
}

html[data-theme="trans_pride"] body.pc-feed-shell {
  background:
    radial-gradient(circle at 8% 0%, rgba(91,207,250,.24), transparent 32%),
    radial-gradient(circle at 94% 12%, rgba(245,171,185,.22), transparent 30%),
    linear-gradient(135deg, #5bcffa 0%, #f5abb9 38%, #ffffff 50%, #f5abb9 62%, #5bcffa 100%) !important;
}

body.pc-feed-shell :where(.panel, .composer, .post, .feed-card, .right-rail .panel, .left-rail .panel) {
  background: var(--card) !important;
  border-color: var(--border) !important;
  box-shadow: var(--shadow-soft) !important;
}

body.pc-feed-shell :where(button, .button, .btn):not(.app-nav-toggle):not(.app-nav-dropdown-btn):not(.composer-tool):not(.composer-tab):not(.secondary) {
  border-radius: 12px;
  background: var(--accent);
  color: var(--on-accent, #fff);
  box-shadow: none;
}

body.pc-feed-shell :where(button.secondary, .secondary) {
  background: color-mix(in srgb, var(--bg3) 88%, transparent) !important;
  color: var(--text2) !important;
  border: 1px solid var(--border2) !important;
  box-shadow: none !important;
}

body.pc-feed-shell :where(input, textarea, select) {
  background: var(--bg2) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

body.pc-feed-shell .app-nav {
  --panel2: var(--bg2);
  --card2: var(--bg3);
  --liquid-line: var(--border);
  --liquid-tint-a: var(--accent);
}

body.pc-feed-shell .feed-hero,
body.pc-feed-shell .feed-app,
body.pc-feed-shell .timeline,
body.pc-feed-shell .rail {
  color: var(--text);
}
