/* =====================================================================
   The app look: a magical, glassy feed + a server area, in LIGHT and DARK.
   Colours come from the original palette: violet, pink, peach/orange, sky.
   Everything only applies to logged-in pages (body.app-body).
   The theme lives on <html data-theme="light|dark"> and is set by a tiny script.
   ===================================================================== */

:root { --a1: #7c3aed; --a2: #db2777; --a3: #f97316; }
[data-accent="ocean"] { --a1: #0ea5e9; --a2: #6366f1; --a3: #a855f7; }
[data-accent="sunset"] { --a1: #f43f5e; --a2: #f97316; --a3: #eab308; }
[data-accent="forest"] { --a1: #10b981; --a2: #0ea5e9; --a3: #6366f1; }

:root,
[data-theme="light"] {
  --bg: #f5f3ff;
  --card: rgba(255, 255, 255, .72);
  --card-solid: #ffffff;
  --line: rgba(124, 58, 237, .18);
  --text: #2e1065;
  --text-2: #4c4470;
  --muted: #7a7399;
  --hover: rgba(124, 58, 237, .08);
  --raised: rgba(124, 58, 237, .14);
  --input: rgba(255, 255, 255, .85);
  --shadow: 0 10px 30px rgba(91, 33, 182, .13);
  --shadow-lg: 0 18px 44px rgba(124, 58, 237, .25);
  --nav: rgba(255, 255, 255, .7);
  --b1: rgba(139, 92, 246, .55);
  --b2: rgba(236, 72, 153, .42);
  --b3: rgba(14, 165, 233, .42);
  --b4: rgba(251, 146, 60, .42);
  --dust: .7;
  --rail: linear-gradient(180deg, #4c1d95, #6d28d9 55%, #a21caf);
}

[data-theme="dark"] {
  --bg: #0c0720;
  --card: rgba(32, 21, 72, .62);
  --card-solid: #1a1238;
  --line: rgba(167, 139, 250, .22);
  --text: #f3efff;
  --text-2: #cfc6ee;
  --muted: #a79fc9;
  --hover: rgba(167, 139, 250, .12);
  --raised: rgba(167, 139, 250, .2);
  --input: rgba(12, 7, 32, .6);
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, .6), 0 0 40px rgba(167, 139, 250, .18);
  --nav: rgba(20, 12, 46, .72);
  --b1: rgba(124, 58, 237, .38);
  --b2: rgba(219, 39, 119, .26);
  --b3: rgba(14, 165, 233, .22);
  --b4: rgba(249, 115, 22, .2);
  --dust: 1;
  --rail: linear-gradient(180deg, #08041a, #170c3a 60%, #2a0f4d);
}

.app-body {
  --accent: var(--a1);
  --pink: var(--a2);
  --orange: var(--a3);
  --sky: #0ea5e9;
  --grad: linear-gradient(90deg, var(--a1), var(--a2), var(--a3));
  --grad-d: linear-gradient(135deg, #8b5cf6, #ec4899 60%, #fb923c);
  --bs-body-bg: var(--card-solid);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-secondary-color: var(--muted);
  --bs-dropdown-bg: var(--card-solid);
  --bs-dropdown-link-color: var(--text);
  --bs-dropdown-link-hover-bg: var(--hover);
  --bs-dropdown-link-hover-color: var(--text);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
}

.app-body a { color: inherit; }
.app-body :where(h1, h2, h3, h4, h5, h6) { color: inherit; }
.app-body .muted, .muted { color: var(--muted) !important; }
.app-body .form-control, .app-body .form-select, .app-body .input-group-text {
  background: var(--input); border-color: var(--line); color: var(--text);
}
.app-body .form-control:focus, .app-body .form-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(124, 58, 237, .25);
}
.app-body .form-control::placeholder { color: var(--muted); }
.app-body hr { border-color: var(--line); opacity: 1; }
.app-body .btn-primary {
  --bs-btn-bg: transparent; --bs-btn-border-color: transparent; --bs-btn-hover-bg: transparent; --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: transparent; --bs-btn-active-border-color: transparent; --bs-btn-color: #fff; --bs-btn-hover-color: #fff;
  background: var(--grad); border: 0; border-radius: 999px; font-weight: 600; box-shadow: 0 .4rem 1rem rgba(219, 39, 119, .3);
}
.app-body .btn-primary:hover { filter: brightness(1.1); }
.app-body .btn-secondary, .app-body .btn-outline-secondary {
  --bs-btn-color: var(--text); --bs-btn-hover-color: var(--text); --bs-btn-bg: var(--raised); --bs-btn-hover-bg: var(--raised);
  --bs-btn-border-color: transparent; --bs-btn-hover-border-color: transparent;
  border-radius: 999px; font-weight: 600;
}

/* ---------- Magic backdrop: colour blobs that drift + twinkling stardust ---------- */
.app-body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(circle at 10% 18%, var(--b1), transparent 42%),
    radial-gradient(circle at 92% 12%, var(--b2), transparent 42%),
    radial-gradient(circle at 78% 88%, var(--b3), transparent 42%),
    radial-gradient(circle at 12% 92%, var(--b4), transparent 42%);
  animation: magic-shift 22s ease-in-out infinite alternate;
}
.app-body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: var(--dust);
  background-image:
    radial-gradient(2px 2px at 12% 18%, #fff, transparent), radial-gradient(1.5px 1.5px at 28% 62%, #fff, transparent),
    radial-gradient(2.5px 2.5px at 47% 30%, #fff, transparent), radial-gradient(1.5px 1.5px at 63% 78%, #fff, transparent),
    radial-gradient(2px 2px at 82% 40%, #fff, transparent), radial-gradient(1.5px 1.5px at 92% 88%, #fff, transparent),
    radial-gradient(2px 2px at 6% 82%, #fff, transparent), radial-gradient(1.5px 1.5px at 72% 12%, #fff, transparent);
  background-size: 420px 420px;
  animation: twinkle 4s ease-in-out infinite alternate;
}
@keyframes magic-shift { from { filter: hue-rotate(0deg); transform: scale(1); } to { filter: hue-rotate(50deg); transform: scale(1.12); } }
@keyframes twinkle { from { opacity: calc(var(--dust) * .3); } to { opacity: var(--dust); } }
@keyframes shimmer { to { background-position: 200% center; } }
@keyframes spin-ring { to { transform: rotate(360deg); } }
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin-border { to { --angle: 360deg; } }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-10px) rotate(4deg); } }

.shimmer-text {
  background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3), var(--a2), var(--a1)); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite;
}

/* Reusable glass surface */
.glass {
  background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 1.25rem; box-shadow: var(--shadow);
}

/* ---------- Floating flash messages ---------- */
.flash-stack { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 2000; width: min(460px, 92vw); transition: opacity .5s; }
.flash-stack .alert { margin-bottom: 8px; box-shadow: var(--shadow-lg); border-radius: 999px; text-align: center; }
.flash-hide { opacity: 0; pointer-events: none; }
.auth-card .flash-stack { position: static; transform: none; width: auto; }
.auth-card .flash-stack .alert { border-radius: .5rem; box-shadow: none; text-align: left; }

/* ---------- Shell + floating glass navigation ---------- */
.shell { display: flex; min-height: 100vh; }
.app-main { margin-left: 264px; flex: 1; min-width: 0; }

.sidenav {
  position: fixed; left: 12px; top: 12px; bottom: 12px; width: 240px; z-index: 60;
  padding: 10px; display: flex; flex-direction: column; gap: 4px;
  background: var(--nav); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); border-radius: 1.75rem; box-shadow: var(--shadow);
}
.sn-logo { display: flex; align-items: center; gap: 10px; padding: 16px 12px 20px; text-decoration: none; }
.sn-logo-mark { font-size: 1.6rem; filter: drop-shadow(0 0 10px rgba(236, 72, 153, .7)); animation: float 5s ease-in-out infinite; }
.sn-brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -.3px; background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3), var(--a2), var(--a1)); background-size: 200% auto; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
.sn-link { display: flex; align-items: center; gap: 14px; padding: 11px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--text-2) !important; transition: background .2s, transform .2s; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; }
.sn-link:hover { background: var(--hover); transform: translateX(3px); }
.sn-link .ico { flex-shrink: 0; }
.sn-link.active { background: var(--grad); color: #fff !important; font-weight: 700; box-shadow: 0 .4rem 1rem rgba(219, 39, 119, .35); }
.sn-link.active:hover { transform: none; }
.sn-bottom { margin-top: auto; }
.sn-icon { position: relative; display: inline-flex; }
.sn-badge { position: absolute; top: -5px; right: -7px; background: var(--pink); color: #fff; font-style: normal; font-size: .66rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; box-shadow: 0 0 10px rgba(219, 39, 119, .7); }

@media (max-width: 1263px) {
  .sidenav { width: 68px; align-items: center; padding: 10px 6px; }
  .sn-label { display: none; }
  .sn-link { width: auto; padding: 11px; justify-content: center; }
  .sn-logo { padding: 14px 0 16px; }
  .app-main { margin-left: 92px; }
}
@media (max-width: 767px) {
  .sidenav { top: auto; bottom: 8px; left: 8px; right: 8px; width: auto; height: 56px; flex-direction: row; justify-content: space-around; align-items: center; padding: 0 6px; gap: 0; border-radius: 999px; }
  .sn-logo, .sn-bottom { display: none; }
  .sn-link { padding: 8px; }
  .app-main { margin-left: 0; padding-bottom: 80px; }
}

/* ---------- Small shared parts ---------- */
.ico { display: block; }
.icon-btn { background: none; border: 0; color: inherit; padding: 6px; display: inline-flex; border-radius: 50%; cursor: pointer; text-decoration: none; transition: transform .15s, background .15s; }
.icon-btn:hover { background: var(--hover); transform: scale(1.1); }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 700; font-size: .85rem; padding: 0; cursor: pointer; }
.link-btn:hover { color: var(--pink); }
[data-theme="dark"] .link-btn { color: #c4b5fd; }
.muted-link { color: var(--muted) !important; text-decoration: none; font-size: .9rem; }
.page-title { font-weight: 800; margin: 32px 0 20px; background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-title { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 700; margin: 28px 0 12px; }
[data-theme="dark"] .section-title { color: #c4b5fd; }
.narrow { max-width: 660px; margin: 0 auto; padding: 0 16px 60px; }
.tag { display: inline-block; font-size: .75rem; font-weight: 600; padding: 3px 11px; border-radius: 999px; background: var(--raised); color: var(--text-2); }
.side-title { padding: 14px 18px 6px; font-weight: 700; font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.avatar-x { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; color: #fff !important; font-weight: 700; text-decoration: none; background: var(--grad-d); box-shadow: 0 0 14px rgba(139, 92, 246, .35); }
.avatar-x.xs { width: 26px; height: 26px; font-size: .75rem; box-shadow: none; }
.avatar-x.sm { width: 32px; height: 32px; font-size: .85rem; }
.avatar-x.xl { width: 140px; height: 140px; font-size: 3.2rem; }
/* Avatar with a slowly spinning rainbow ring */
.story-ring { position: relative; display: inline-flex; padding: 3px; border-radius: 50%; isolation: isolate; overflow: hidden; }
.story-ring::before { content: ""; position: absolute; inset: -50%; z-index: -1; background: conic-gradient(#a78bfa, #ec4899, #fb923c, #38bdf8, #a78bfa); animation: spin-ring 5s linear infinite; }
.story-ring .avatar-x { border: 3px solid var(--card-solid); box-sizing: content-box; }
.story-ring.sm { padding: 2px; }
.story-ring.sm .avatar-x { border-width: 2px; }
.story-ring.xl { padding: 4px; }
.story-ring.xl .avatar-x { width: 140px; height: 140px; border-width: 5px; }

.row-card { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 10px; background: var(--card); backdrop-filter: blur(12px); border: 1px solid var(--line); border-radius: 1.1rem; box-shadow: var(--shadow); }
.row-card form { margin: 0; }
.row-card h6 { font-weight: 700; margin-bottom: 14px; }
.act-icon { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--raised); }
.act-icon.like { color: var(--pink); }
.act-icon.comment { color: var(--sky); }

.offer-state { font-size: .8rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--raised); margin-left: auto; }
.offer-pending { color: #d97706; }
.offer-accepted { color: #059669; }
.offer-declined { color: #e11d48; }
[data-theme="dark"] .offer-pending { color: #fbbf24; }
[data-theme="dark"] .offer-accepted { color: #34d399; }
[data-theme="dark"] .offer-declined { color: #fb7185; }

.empty-state, .chat-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 16px; gap: 4px; flex: 1; }
.empty-ring { width: 92px; height: 92px; border-radius: 50%; font-size: 2.2rem; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; background: radial-gradient(circle at 30% 30%, #fff, #c4b5fd 45%, #8b5cf6); color: #4c1d95; box-shadow: 0 0 28px rgba(139, 92, 246, .6), inset 0 0 10px rgba(255, 255, 255, .8); animation: float 5s ease-in-out infinite; }

/* ---------- Feed ---------- */
.feed-wrap { display: flex; justify-content: center; gap: 48px; padding: 24px 16px 40px; }
.feed-col { width: 520px; max-width: 100%; }

.feed-hero { padding: 6px 4px 14px; }
.feed-hero h1 { font-size: clamp(1.7rem, 3.5vw, 2.3rem); font-weight: 800; margin: 0; }
.feed-hero p { margin: 2px 0 0; color: var(--text-2); }

.stories { display: flex; gap: 14px; overflow-x: auto; padding: 8px 4px 18px; scrollbar-width: none; }
.stories::-webkit-scrollbar { display: none; }
.story { display: flex; flex-direction: column; align-items: center; gap: 5px; width: 68px; text-decoration: none; flex-shrink: 0; }
.story .avatar-x { width: 54px; height: 54px; font-size: 1.2rem; }
.story small { font-size: .72rem; max-width: 68px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

.me-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; text-decoration: none; }
/* The suggestions circle in the corner of the home page. It sits in the page (absolute, not fixed), so it
   scrolls away with the feed. Opening it grows the pill to the left and reveals up to five faces. */
.feed-wrap { position: relative; }
.who { position: absolute; top: 24px; right: 24px; z-index: 6; display: flex; align-items: center; padding: 6px; border-radius: 999px; background: var(--card); backdrop-filter: blur(12px); border: 1px solid var(--line); box-shadow: var(--shadow); transition: border-radius .35s, box-shadow .35s; }
.who.open { border-radius: 1.75rem; background: var(--card-solid); box-shadow: var(--shadow), 0 0 28px rgba(139, 92, 246, .28); }
.who-btn { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; width: 48px; height: 48px; border: 0; border-radius: 50%; color: #fff; background: var(--grad-d); box-shadow: 0 0 16px rgba(139, 92, 246, .45); cursor: pointer; transition: transform .35s cubic-bezier(.2, .8, .2, 1); }
.who-btn:hover { transform: scale(1.08); }
.who.open .who-btn { transform: rotate(-12deg) scale(.94); }
.who-panel { display: flex; align-items: flex-start; gap: 2px; max-width: 0; max-height: 48px; opacity: 0; overflow: hidden; transition: max-width .5s cubic-bezier(.2, .8, .2, 1), max-height .5s cubic-bezier(.2, .8, .2, 1), opacity .3s, margin .5s; }
.who.open .who-panel { max-width: min(470px, calc(100vw - 120px)); max-height: 120px; opacity: 1; margin: 0 8px 0 6px; overflow-x: auto; scrollbar-width: none; }
.who-item { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; width: 86px; padding: 8px 4px 6px; border-radius: 1rem; text-decoration: none; color: var(--text); transition: transform .2s, background .2s; }
.who-item:hover { transform: translateY(-3px); background: var(--raised); color: var(--text); }
.who-item small { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .74rem; font-weight: 600; }
.who-item .verified { width: 12px; height: 12px; font-size: .5rem; margin-left: 0; vertical-align: 0; }
.who-empty { padding: 10px 12px; font-size: .85rem; white-space: nowrap; }
@media (max-width: 1000px) { .feed-hero { padding-right: 64px; } }   /* keep the greeting clear of the circle */
@media (max-width: 720px) { .who { top: 10px; right: 10px; } .who-btn { width: 40px; height: 40px; } .who:not(.open) .who-panel { max-height: 40px; } }
@media (prefers-reduced-motion: reduce) { .who, .who-btn, .who-panel { transition: none; } }

/* A post is a glass card with a rainbow border that spins on hover */
.post { position: relative; background: var(--card); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-radius: 1.5rem; padding: 14px 16px 12px; margin-bottom: 26px; box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s; }
.post::before { content: ""; position: absolute; inset: 0; padding: 1.5px; border-radius: inherit; pointer-events: none; background: var(--line); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.post:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post:hover::before { background: conic-gradient(from var(--angle), #a78bfa, #ec4899, #fb923c, #38bdf8, #a78bfa); animation: spin-border 6s linear infinite; }
.post-head { display: flex; align-items: center; gap: 10px; padding: 0 0 12px; }
.post-user { font-weight: 700; text-decoration: none; color: inherit; }
.post-user:hover { color: var(--accent); }
.post-dot { color: var(--muted); margin: 0 4px; }
.post-time, .post-sub { color: var(--muted); font-size: .8rem; }

.post-media { position: relative; background: var(--raised); border-radius: 1.1rem; overflow: hidden; user-select: none; }
.post-media img, .post-media video { display: block; width: 100%; height: auto; max-height: 700px; object-fit: contain; }
.post-media.square { border-radius: 0; height: 100%; }
.post-media.square img, .post-media.square video { height: 100%; max-height: none; object-fit: contain; background: rgba(0, 0, 0, .85); }
.video-sound { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .55); border: 0; color: #fff; border-radius: 50%; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }

.text-card { aspect-ratio: 1 / 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 8%; color: #fff; position: relative; }
.text-card::after { content: "✨"; position: absolute; top: 14px; right: 18px; font-size: 1.4rem; opacity: .8; }
.text-card h3 { font-weight: 800; font-size: 1.7rem; margin-bottom: .6rem; text-shadow: 0 2px 14px rgba(0, 0, 0, .25); }
.text-card p { opacity: .94; margin: 0; }
.text-card h5 { font-weight: 700; margin: 0; }
.grad-0 { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.grad-1 { background: linear-gradient(135deg, #0ea5e9, #8b5cf6); }
.grad-2 { background: linear-gradient(135deg, #fb923c, #ec4899); }
.grad-3 { background: linear-gradient(135deg, #8b5cf6, #38bdf8); }
.grad-4 { background: linear-gradient(135deg, #db2777, #7c3aed); }
.grad-5 { background: linear-gradient(135deg, #f97316, #a855f7); }

.heart-burst { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; opacity: 0; pointer-events: none; filter: drop-shadow(0 0 20px rgba(236, 72, 153, .9)); }
.heart-burst.go { animation: heart-pop .9s ease; }
@keyframes heart-pop { 0% { opacity: 0; transform: scale(.3); } 20% { opacity: 1; transform: scale(1.15); } 40% { transform: scale(.95); } 70% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }

.post-actions { display: flex; align-items: center; gap: 4px; padding: 10px 0 4px; }
.post-actions form { margin: 0; }
.post-actions .icon-btn { padding: 6px; }
.like-btn.liked { color: var(--pink); filter: drop-shadow(0 0 8px rgba(236, 72, 153, .6)); }
.btn-sponsor { display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 999px; padding: 8px 18px; font-weight: 700; font-size: .85rem; color: #fff !important; text-decoration: none; cursor: pointer; background: var(--grad); box-shadow: 0 .4rem 1rem rgba(219, 39, 119, .35); transition: transform .2s, filter .2s; }
.btn-sponsor:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-sponsor.ghost { background: var(--raised); color: var(--text) !important; box-shadow: none; }

.post-body { font-size: .93rem; }
.caption { margin: 4px 0; word-break: break-word; }
.fund { margin: 10px 0; }
.fund-bar { height: 8px; background: var(--raised); border-radius: 4px; overflow: hidden; }
.fund-bar i { display: block; height: 100%; background: linear-gradient(90deg, #0ea5e9, #8b5cf6, #ec4899); border-radius: 4px; box-shadow: 0 0 10px rgba(139, 92, 246, .6); }
.fund small { color: var(--muted); }
.comment-form { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.comment-form input { flex: 1; background: none; border: 0; outline: 0; color: inherit; padding: 6px 0; font-size: .9rem; }
.comment-form input::placeholder { color: var(--muted); }
.comment-form button { background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; }
[data-theme="dark"] .comment-form button { color: #c4b5fd; }
.feed-end { text-align: center; padding: 24px 0 8px; }

/* Single post page */
.post-page { display: flex; justify-content: center; padding: 28px 16px 40px; }
/* Instagram-style close: the × in the corner; clicking the empty space around the post also closes it */
.post-page { min-height: calc(100vh - 24px); align-items: center; }
.post-close { position: fixed; top: 16px; right: 24px; z-index: 20; font-size: 2.6rem; line-height: 1; color: var(--text); opacity: .75; text-decoration: none; }
.post-close:hover { opacity: 1; color: var(--text); }
.post-detail { display: grid; grid-template-columns: minmax(0, 1fr) 400px; width: min(1000px, 100%); height: min(86vh, 720px); padding: 0; margin: 0; overflow: hidden; }
.post-detail:hover { transform: none; }
.detail-side { display: flex; flex-direction: column; border-left: 1px solid var(--line); padding: 14px 16px 12px; min-height: 0; }
.detail-scroll { flex: 1; overflow-y: auto; padding: 4px 0 12px; }
.detail-desc { white-space: pre-wrap; }
@media (max-width: 900px) {
  .post-detail { grid-template-columns: 1fr; height: auto; }
  .post-media.square { height: auto; aspect-ratio: 1 / 1; }
  .detail-side { border-left: 0; }
  .detail-scroll { max-height: 40vh; }
}

/* Create post */
.create-page { display: flex; justify-content: center; padding: 28px 16px 40px; }
.create-card { width: min(940px, 100%); background: var(--card); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 1.5rem; overflow: hidden; box-shadow: var(--shadow); }
.create-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); }
.create-body { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
.drop { display: block; margin: 12px; cursor: pointer; min-height: 520px; border: 2px dashed rgba(124, 58, 237, .45); border-radius: 1.2rem; background: var(--hover); overflow: hidden; transition: border-color .2s, background .2s; }
.drop:hover { border-color: var(--pink); background: var(--raised); }
.drop-preview { height: 100%; min-height: 516px; display: flex; align-items: center; justify-content: center; }
.drop-preview img, .drop-preview video { width: 100%; height: 100%; max-height: 640px; object-fit: contain; }
.drop-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); text-align: center; padding: 24px; }
.create-fields { padding: 20px; }
@media (max-width: 800px) { .create-body { grid-template-columns: 1fr; } .drop, .drop-preview { min-height: 280px; } }

dialog.modal-card { background: var(--card-solid); color: var(--text); border: 1px solid var(--line); border-radius: 1.5rem; padding: 22px; width: min(440px, 92vw); box-shadow: var(--shadow-lg); }
dialog.modal-card::backdrop { background: rgba(20, 8, 50, .6); backdrop-filter: blur(4px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }

/* ---------- Search / grid ---------- */
.search-page { max-width: 935px; margin: 0 auto; padding: 28px 20px 60px; }
.search-bar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 12px 20px; margin-bottom: 14px; box-shadow: var(--shadow); color: var(--muted); }
.search-bar input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-link { text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 15px; font-size: .85rem; font-weight: 600; color: var(--text-2) !important; transition: transform .15s; }
.chip-link:hover { transform: translateY(-2px); }
.chip-link.on { background: var(--grad); border-color: transparent; color: #fff !important; box-shadow: 0 0 14px rgba(219, 39, 119, .4); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.grid-item { text-decoration: none; position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: var(--raised); display: block; border-radius: 1rem; box-shadow: var(--shadow); transition: transform .25s, box-shadow .25s; }
.grid-item:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--shadow-lg); }
.grid-item img, .grid-item video { width: 100%; height: 100%; object-fit: cover; display: block; }
.grid-item .text-card { aspect-ratio: auto; height: 100%; padding: 12%; }
.grid-hover { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(76, 29, 149, .75), rgba(219, 39, 119, .25)); opacity: 0; display: flex; align-items: center; justify-content: center; gap: 24px; font-weight: 700; color: #fff; transition: opacity .2s; }
.grid-hover span { display: inline-flex; align-items: center; gap: 6px; }
.grid-item:hover .grid-hover { opacity: 1; }

/* ---------- Profile ---------- */
.profile-page { max-width: 935px; margin: 0 auto; padding: 36px 20px 60px; }
.profile-head { display: flex; gap: 56px; align-items: center; padding: 32px 40px; margin-bottom: 28px; background: var(--card); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 1.75rem; box-shadow: var(--shadow); }
.profile-info { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.profile-line { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.profile-line h2 { font-size: 1.6rem; font-weight: 800; margin: 0; background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.profile-line form { margin: 0; }
.profile-stats { display: flex; gap: 28px; }
.profile-stats span { padding: 4px 14px; border-radius: 999px; background: var(--raised); }
.profile-bio { white-space: pre-wrap; color: var(--text-2); }
.profile-tab { text-align: center; padding: 10px 0 16px; font-size: .78rem; letter-spacing: .18em; font-weight: 700; display: flex; justify-content: center; gap: 6px; align-items: center; color: var(--accent); }
@media (max-width: 700px) {
  .profile-head { gap: 20px; flex-direction: column; text-align: center; padding: 24px 16px; }
  .profile-line, .profile-stats { justify-content: center; }
  .story-ring.xl .avatar-x { width: 90px; height: 90px; font-size: 2rem; }
}

/* ---------- Direct messages ---------- */
.dm-shell { display: flex; height: calc(100vh - 24px); margin: 12px 12px 12px 0; background: var(--card); backdrop-filter: blur(16px); border: 1px solid var(--line); border-radius: 1.75rem; box-shadow: var(--shadow); overflow: hidden; }
.dm-list { width: 340px; flex-shrink: 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dm-list-head { padding: 24px 20px 10px; font-size: 1.2rem; font-weight: 800; }
.dm-search { display: flex; align-items: center; gap: 8px; margin: 4px 16px 10px; background: var(--input); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--muted); }
.dm-search input { flex: 1; background: none; border: 0; outline: 0; color: var(--text); font-size: .9rem; }
.dm-scroll { flex: 1; overflow-y: auto; }
.dm-row { display: flex; align-items: center; gap: 12px; padding: 10px 20px; text-decoration: none; margin: 0; transition: background .15s; }
.dm-row:hover { background: var(--hover); }
.dm-row.active { background: var(--raised); }
.dm-row-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.dm-row-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dm-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.dm-head { display: flex; align-items: center; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.dm-back { display: none; font-size: 2rem; line-height: 1; text-decoration: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; }
.dm-log { gap: 3px; }
.dm-log .avatar-sm, .dm-log .msg-meta { display: none; }
.dm-log .msg { display: flex; max-width: 68%; align-self: flex-start; margin-top: 8px; }
.dm-log .msg.grouped { margin-top: 0; }
.dm-log .msg.mine { align-self: flex-end; }
.dm-log .msg-body { background: var(--raised); padding: 9px 15px; border-radius: 20px; white-space: pre-wrap; word-break: break-word; }
.dm-log .msg.mine .msg-body { background: var(--grad-d); color: #fff; box-shadow: 0 .3rem .9rem rgba(219, 39, 119, .3); }
.dm-form { display: flex; align-items: flex-end; gap: 8px; margin: 12px 20px 20px; background: var(--input); border: 1px solid var(--line); border-radius: 1.4rem; padding: 6px 8px 6px 18px; }
.dm-form textarea { flex: 1; background: none; border: 0; outline: 0; resize: none; color: inherit; font: inherit;
  padding: 8px 0; line-height: 1.35; max-height: 40vh; overflow-y: auto; }
.dm-form > button { flex-shrink: 0; margin-bottom: 3px; border: 0; border-radius: 999px; padding: 6px 16px; background: var(--grad); color: #fff; font-weight: 700; }
.chat-note { margin: 8px 20px 20px; padding: 12px 16px; background: var(--hover); border-radius: 1rem; font-size: .9rem; }
@media (max-width: 767px) {
  .dm-shell { height: calc(100vh - 92px); margin: 8px; }
  .dm-list { width: 100%; }
  .dm-shell.has-thread .dm-list { display: none; }
  .dm-shell:not(.has-thread) .dm-main { display: none; }
  .dm-back { display: block; }
}

/* =====================================================================
   Servers: a Discord-style layout in the same magical colours
   ===================================================================== */
.app-body.discord-page { overflow: hidden; }
.discord-page .srv-muted { color: var(--muted); }
.srv-app { display: flex; height: 100vh; }

/* Every scrolling region in the servers UI keeps scrolling but hides the scrollbar track/thumb,
   to match the rest of the app's chrome-free look (see .stories/.slides above for the same trick). */
.srv-rail, .srv-scroll, .srv-members, .srv-home, .panel-body, .chat-log.srv-log { scrollbar-width: none; }
.srv-rail::-webkit-scrollbar, .srv-scroll::-webkit-scrollbar, .srv-members::-webkit-scrollbar,
.srv-home::-webkit-scrollbar, .panel-body::-webkit-scrollbar, .chat-log.srv-log::-webkit-scrollbar { display: none; }

.srv-rail { width: 76px; flex-shrink: 0; background: var(--rail); display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 12px 0; overflow-y: auto; scrollbar-width: none; }
.rail-sep { width: 32px; height: 2px; background: rgba(255, 255, 255, .25); border-radius: 1px; }
.rail-btn { position: relative; width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--c, rgba(255, 255, 255, .16)); color: #fff !important; font-weight: 700; text-decoration: none; font-size: 1.05rem; border: 0; transition: border-radius .2s, transform .2s, box-shadow .2s; flex-shrink: 0; cursor: pointer; overflow: hidden; }
.rail-btn:hover, .rail-btn.active { border-radius: 16px; transform: translateY(-2px); box-shadow: 0 0 18px rgba(255, 255, 255, .35); }
.rail-btn.home { background: var(--grad-d); font-size: 1.4rem; }
.rail-btn.add { background: rgba(255, 255, 255, .14); font-size: 1.6rem; font-weight: 400; }
.rail-btn.add:hover { background: #10b981; }
.rail-btn::before { content: ""; position: absolute; left: -14px; width: 5px; height: 8px; border-radius: 0 4px 4px 0; background: #fff; transform: scaleY(0); transition: all .2s; }
.rail-btn:hover::before { transform: scaleY(1); }
.rail-btn.active::before { height: 36px; transform: scaleY(1); }

.srv-channels { width: 250px; flex-shrink: 0; background: var(--card); backdrop-filter: blur(16px); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.srv-name { width: 100%; height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; background: none; border: 0; border-bottom: 1px solid var(--line); color: var(--text); font-weight: 800; }
.srv-name:hover { background: var(--hover); }
.srv-menu { --bs-dropdown-link-hover-bg: var(--accent); --bs-dropdown-link-hover-color: #fff; min-width: 210px; padding: 6px; border-radius: 1rem; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.srv-menu .dropdown-item { border-radius: .6rem; font-size: .9rem; }
.srv-scroll { flex: 1; overflow-y: auto; padding: 8px 10px; }
.cat { display: flex; justify-content: space-between; align-items: center; padding: 16px 8px 4px 4px; color: var(--accent); font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; }
[data-theme="dark"] .cat { color: #c4b5fd; }
.cat a { color: var(--muted); text-decoration: none; font-size: 1.2rem; line-height: 1; }
.cat a:hover { color: var(--pink); }
.ch { display: flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: .7rem; color: var(--text-2) !important; text-decoration: none; font-weight: 500; margin-bottom: 2px; transition: background .15s, transform .15s; }
.ch:hover { background: var(--hover); transform: translateX(3px); }
.ch.active { background: var(--grad); color: #fff !important; font-weight: 700; box-shadow: 0 .3rem .8rem rgba(219, 39, 119, .3); }
.ch span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-gear { display: none; cursor: pointer; }
.ch:hover .ch-gear { display: inline-flex; }
.srv-me { display: flex; align-items: center; gap: 8px; padding: 0 10px; height: 56px; background: var(--hover); border-top: 1px solid var(--line); }
.srv-me small { color: var(--muted); }
.srv-icon-btn { display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); background: none; border: 0; padding: 7px; border-radius: 50%; text-decoration: none; cursor: pointer; }
.srv-icon-btn:hover { color: var(--accent); background: var(--hover); }

.srv-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--card); backdrop-filter: blur(8px); }
.srv-chat-head { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 18px; border-bottom: 1px solid var(--line); color: var(--muted); flex-shrink: 0; }
.srv-chat-head b { color: var(--text); font-weight: 800; }
.srv-divider { width: 1px; height: 24px; background: var(--line); margin: 0 8px; }
.srv-log { padding: 16px 0 8px; }
.srv-log .msg { display: flex; gap: 14px; padding: 3px 18px; margin-top: 16px; align-items: flex-start; }
.srv-log .msg:hover { background: var(--hover); }
.srv-log .msg.grouped { margin-top: 0; }
.srv-log .msg.grouped .avatar-sm { visibility: hidden; height: 0; }
.srv-log .msg.grouped .msg-meta { display: none; }
.srv-log .msg-main { min-width: 0; }
.srv-log .msg-meta strong { font-size: 1rem; color: var(--text); }
.srv-log .msg-meta small { color: var(--muted); margin-left: 4px; font-size: .75rem; }
.srv-log .msg-body { white-space: pre-wrap; word-break: break-word; line-height: 1.45; }
.avatar-sm { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-d); color: #fff !important; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.srv-form { margin: 0 18px 22px; flex-shrink: 0; }
.srv-input-wrap { display: flex; align-items: flex-end; gap: 4px; background: var(--input); border: 1px solid var(--line); border-radius: 1.4rem; padding: 4px 14px 4px 10px; }
.srv-input-wrap:focus-within { box-shadow: 0 0 0 .2rem rgba(124, 58, 237, .25); }
.srv-form #chat-input { flex: 1; width: auto; background: none !important; border: 0 !important; outline: 0; box-shadow: none !important;
  padding: 10px 6px !important; color: var(--text); resize: none; font: inherit; line-height: 1.35; max-height: 40vh; overflow-y: auto; }
.srv-form.locked { background: var(--hover); border-radius: 999px; padding: 12px 20px; color: var(--muted); display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.discord-page .chat-empty { align-items: flex-start; text-align: left; justify-content: flex-end; padding: 16px 20px; }
.discord-page .empty-ring { width: 68px; height: 68px; font-size: 2rem; }

.srv-members { width: 240px; flex-shrink: 0; background: var(--card); backdrop-filter: blur(16px); border-left: 1px solid var(--line); overflow-y: auto; padding: 8px 10px 24px; }
.srv-members.hidden { display: none; }
@media (max-width: 1100px) { .srv-members { display: none; } }
.mem-title { padding: 22px 8px 4px; color: var(--accent); font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
[data-theme="dark"] .mem-title { color: #c4b5fd; }
.mem { display: flex; align-items: center; gap: 12px; padding: 6px 8px; border-radius: .7rem; text-decoration: none; font-weight: 500; }
.mem:hover { background: var(--hover); }
.mem .avatar-sm { width: 32px; height: 32px; font-size: .85rem; }
@media (max-width: 700px) { .srv-channels { width: 180px; } .srv-rail { width: 64px; } }

.srv-home { flex: 1; overflow-y: auto; padding: 40px 48px; }
.srv-home h2 { font-weight: 800; background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.srv-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 24px; }
.srv-card { background: var(--card); backdrop-filter: blur(14px); border: 1px solid var(--line); border-radius: 1.4rem; padding: 22px; box-shadow: var(--shadow); }
.srv-card h5 { font-weight: 800; margin-bottom: 14px; }
.srv-card.explore { display: flex; align-items: center; gap: 14px; transition: transform .25s, box-shadow .25s; }
.srv-card.explore:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.srv-explore { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; margin-top: 16px; }
.srv-icon { width: 52px; height: 52px; border-radius: 18px; background: var(--c, #7c3aed); display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 1.2rem; flex-shrink: 0; box-shadow: 0 0 16px var(--c, #7c3aed); overflow: hidden; }
.srv-icon img, .rail-btn img, .dc-tile-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.srv-icon.xl { width: 140px; height: 140px; border-radius: 32px; font-size: 3rem; }
@media (max-width: 700px) { .srv-icon.xl { width: 96px; height: 96px; font-size: 2rem; } }

.discord-page label { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; margin: 14px 0 6px; letter-spacing: .06em; }
.discord-page input:not([type=checkbox]):not([type=color]), .discord-page select, .discord-page textarea {
  width: 100%; background: var(--input); border: 1px solid var(--line); outline: 0; border-radius: .8rem; padding: 10px 14px; color: var(--text);
}
.discord-page input:focus, .discord-page select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(124, 58, 237, .25); }
.discord-page .srv-check { display: flex; align-items: center; gap: 8px; text-transform: none; font-size: .9rem; color: var(--text); font-weight: 400; margin: 12px 0 0; letter-spacing: 0; }
.srv-color { width: 52px; height: 42px; padding: 0; border: 0; background: none; border-radius: .6rem; cursor: pointer; }
.srv-row { display: flex; gap: 12px; align-items: flex-end; }
.srv-row.wrap { flex-wrap: wrap; gap: 4px 18px; }
.srv-row .grow, .grow { flex: 1; min-width: 0; }
.srv-btn { background: var(--grad); color: #fff; border: 0; border-radius: 999px; padding: 10px 22px; font-weight: 700; margin-top: 16px; cursor: pointer; box-shadow: 0 .4rem 1rem rgba(219, 39, 119, .3); transition: filter .2s, transform .2s; }
.srv-btn:hover { filter: brightness(1.1); transform: translateY(-2px); }
.srv-btn.small { padding: 6px 16px; margin-top: 0; font-size: .85rem; }
.srv-btn.danger { background: linear-gradient(90deg, #e11d48, #f97316); }

.srv-settings { display: flex; height: 100vh; }
.set-nav { flex: 0 0 34%; background: var(--card); backdrop-filter: blur(16px); border-right: 1px solid var(--line); display: flex; justify-content: flex-end; padding: 60px 8px 0 0; overflow-y: auto; }
.set-nav-inner { width: 218px; }
.set-tab { display: block; padding: 8px 14px; border-radius: 999px; color: var(--text-2) !important; text-decoration: none; margin-bottom: 3px; font-weight: 500; }
.set-tab:hover { background: var(--hover); }
.set-tab.active { background: var(--grad); color: #fff !important; font-weight: 700; }
.set-main { flex: 1; overflow-y: auto; padding: 60px 40px 80px; max-width: 800px; position: relative; }
.set-main h3 { font-weight: 800; margin-bottom: 16px; }
.set-close { position: fixed; top: 60px; right: 40px; display: flex; flex-direction: column; align-items: center; color: var(--muted) !important; text-decoration: none; }
.set-close span { width: 38px; height: 38px; border: 2px solid currentColor; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.set-close:hover { color: var(--pink) !important; }
.set-form.inline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-form.inline input:not([type=checkbox]):not([type=color]) { width: auto; flex: 1; min-width: 140px; }
.set-form .srv-btn { align-self: flex-start; }
.set-form.inline .srv-btn { margin-top: 0; }
.set-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 1rem; margin-top: 10px; }
.set-item form { margin: 0; }
.set-box { background: var(--card); border: 1px solid var(--line); border-radius: 1.2rem; padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.set-box h5 { font-size: 1rem; font-weight: 800; }
.set-box summary { cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 700; }
.role-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px currentColor; }
.mem-item { flex-wrap: wrap; }
.mem-item { flex-wrap: wrap; }
.mem-item .avatar-sm { width: 36px; height: 36px; }
.mem-item .mem-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.mem-item .role-form { flex: 1 1 100%; order: 9; padding-top: 8px; border-top: 1px solid var(--line); }
.mem-item .mem-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.mem-item .role-form { flex: 1 1 100%; order: 9; padding-top: 8px; border-top: 1px solid var(--line); }
.badge-owner { font-size: .7rem; background: var(--grad); color: #fff; border-radius: 999px; padding: 2px 8px; margin-left: 6px; }
.danger-zone { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-zone h5 { color: #e11d48; font-weight: 800; }
.invite-box { font-family: ui-monospace, Consolas, monospace; font-size: 2rem; letter-spacing: .3em; background: var(--card); border: 1px solid var(--line); padding: 18px 28px; border-radius: 1.2rem; display: inline-block; box-shadow: var(--shadow), 0 0 30px rgba(139, 92, 246, .3); }
@media (max-width: 800px) {
  .srv-settings { flex-direction: column; overflow-y: auto; height: 100vh; }
  .set-nav { flex: none; padding: 20px 16px 0; justify-content: flex-start; }
  .set-main { padding: 20px 16px 60px; }
  .set-close { top: 12px; right: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .app-body::before, .app-body::after, .story-ring::before, .sn-brand, .shimmer-text, .sn-logo-mark, .empty-ring, .post:hover::before { animation: none; }
}


/* ---------- Calm mode (Settings > Appearance) ---------- */
[data-calm="1"] .app-body::after { display: none; }
[data-calm="1"] *, [data-calm="1"] *::before, [data-calm="1"] *::after { animation: none !important; }

/* ---------- Profile pictures ---------- */
.avatar-x, .avatar-sm { overflow: hidden; }
.avatar-x img, .avatar-sm img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }

/* ---------- Carousel for posts with several photos/videos ---------- */
.slides { display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; height: 100%; }
.post-media.square .slides { align-items: stretch; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; min-width: 0; }
.slide img, .slide video { width: 100%; }
.post-media.square .slide { height: 100%; }
.slide-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .85); color: #2e1065; font-size: 1.3rem; line-height: 1; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s; cursor: pointer; z-index: 3; }
.slide-nav.prev { left: 10px; }
.slide-nav.next { right: 10px; }
.post-media:hover .slide-nav { opacity: 1; }
.slide-count { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; z-index: 3; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; z-index: 3; pointer-events: none; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .5); }
.dots i.on { background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .9); }
.grid-multi { position: absolute; top: 10px; right: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 4px; background: rgba(0, 0, 0, .55); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }

/* ---------- Create / edit post: several files ---------- */
.drop-col { display: flex; flex-direction: column; }
.current-media { margin: 12px 12px 0; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.thumb { position: relative; width: 84px; height: 84px; border-radius: .8rem; overflow: hidden; cursor: pointer; background: var(--raised); }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb input { position: absolute; opacity: 0; }
.thumb-x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: flex; align-items: center; justify-content: center; opacity: .7; }
.thumb:has(input:checked) { outline: 3px solid #e11d48; }
.thumb:has(input:checked) img, .thumb:has(input:checked) video { opacity: .35; }
.thumb:has(input:checked) .thumb-x { background: #e11d48; opacity: 1; }
.drop { flex: 1; min-height: 360px; }
.drop-preview { min-height: 356px; flex-direction: column; }
.pv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; width: 100%; padding: 12px; }
.pv { aspect-ratio: 1 / 1; border-radius: .8rem; overflow: hidden; background: var(--raised); }
.pv img, .pv video { width: 100%; height: 100%; object-fit: cover; }
.pv-note { color: var(--muted); font-size: .85rem; padding-bottom: 12px; }

/* ---------- Settings ---------- */
.settings-page { max-width: 940px; margin: 0 auto; padding: 0 20px 60px; }
.settings-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.settings-tabs { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 24px; }
.settings-tab { padding: 10px 18px; border-radius: 999px; text-decoration: none; font-weight: 600; color: var(--text-2) !important; }
.settings-tab:hover { background: var(--hover); }
.settings-tab.active { background: var(--grad); color: #fff !important; box-shadow: 0 .4rem 1rem rgba(219, 39, 119, .3); }
.settings-panel { padding: 26px 28px; }
.settings-panel h5 { font-weight: 800; margin-bottom: 14px; }
.settings-panel h6 { font-weight: 800; }
.photo-row { display: flex; align-items: center; gap: 24px; margin-bottom: 26px; flex-wrap: wrap; }
.photo-row .story-ring.xl .avatar-x { width: 110px; height: 110px; font-size: 2.4rem; }

/* Crop step shown after choosing a photo, before it's uploaded -- see avatar-crop.js. The visible
   "hole" trick: a square overlay the size of .crop-frame, with a huge spread box-shadow outside a
   circular border-radius, which paints everything except that circle. */
.crop-modal { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
              background: rgba(8, 4, 24, .72); backdrop-filter: blur(10px); }
.crop-modal[hidden] { display: none; }
.crop-card { background: var(--card-solid, #1e143c); color: var(--text); border: 1px solid var(--line); border-radius: 1.4rem;
             box-shadow: var(--shadow-lg); padding: 22px; max-width: 92vw; animation: ring-pop .2s ease both; }
.crop-frame { position: relative; width: 280px; height: 280px; overflow: hidden; border-radius: .8rem; background: #000; touch-action: none; cursor: move; }
.crop-frame img { position: absolute; left: 0; top: 0; max-width: none; user-select: none; -webkit-user-drag: none; }
.crop-circle { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(8, 4, 24, .6); pointer-events: none; }
.set-label { display: block; font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--accent); margin: 22px 0 10px; }
[data-theme="dark"] .set-label { color: #c4b5fd; }
.choice-row { display: flex; gap: 12px; flex-wrap: wrap; }
.choice { cursor: pointer; margin: 0; }
.choice-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; border: 2px solid var(--line); border-radius: 1.1rem; background: var(--input); transition: border-color .2s, transform .2s, box-shadow .2s; min-width: 108px; }
.choice-card.sm { flex-direction: row; min-width: auto; padding: 8px 14px; border-radius: 999px; }
.choice:hover .choice-card { transform: translateY(-3px); }
.choice input:checked + .choice-card { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, .2), 0 0 18px rgba(219, 39, 119, .25); }
.theme-preview { width: 84px; height: 54px; border-radius: .7rem; border: 1px solid rgba(124, 58, 237, .3); }
.tp-light { background: linear-gradient(135deg, #f5f3ff, #fbcfe8 60%, #bae6fd); }
.tp-dark { background: linear-gradient(135deg, #0c0720, #3b1d7a 60%, #1e3a8a); }
.tp-system { background: linear-gradient(90deg, #f5f3ff 50%, #0c0720 50%); }
.swatch { width: 84px; height: 30px; border-radius: 999px; }
.sw-aurora { background: linear-gradient(90deg, #7c3aed, #db2777, #f97316); }
.sw-ocean { background: linear-gradient(90deg, #0ea5e9, #6366f1, #a855f7); }
.sw-sunset { background: linear-gradient(90deg, #f43f5e, #f97316, #eab308); }
.sw-forest { background: linear-gradient(90deg, #10b981, #0ea5e9, #6366f1); }
.switch-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 1rem; margin: 0 0 8px; cursor: pointer; background: var(--input); }
.switch-row input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.danger-zone-app { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); }
.danger-zone-app h6 { color: #e11d48; }
@media (max-width: 760px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-tabs { flex-direction: row; overflow-x: auto; position: static; }
}

/* ---------- "New post" button: the main call to action in the side menu ---------- */
.sn-create { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 4px 12px; padding: 12px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; color: #fff !important; background: var(--grad); box-shadow: 0 .5rem 1.2rem rgba(219, 39, 119, .35); transition: transform .2s, filter .2s; }
.sn-create:hover { transform: translateY(-2px); filter: brightness(1.1); }
@media (max-width: 1263px) {
  .sn-create { width: 46px; height: 46px; padding: 0; margin: 0 0 10px; }
}
@media (max-width: 767px) {
  /* On phones it floats above the bottom bar, like a camera button */
  .sn-create { position: fixed; right: 18px; bottom: 82px; width: 56px; height: 56px; margin: 0; z-index: 70; box-shadow: 0 .6rem 1.6rem rgba(219, 39, 119, .5); }
}

.pv { position: relative; }
.pv-x { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .65); color: #fff; font-size: 1.1rem; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pv-x:hover { background: #e11d48; }
.drop.over { border-color: var(--pink); background: var(--raised); }

.offer-edit { border: 0; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.offer-edit:hover { transform: translateY(-2px); box-shadow: 0 0 14px rgba(124, 58, 237, .4); }

.offer-withdrawn { color: var(--muted); }


/* ---------- Chat: attachments, tools, delete ---------- */
.msg { position: relative; }
.msg-att { margin-top: 4px; }
.att-img { display: block; max-width: min(320px, 100%); max-height: 320px; border-radius: 1rem; object-fit: cover; box-shadow: var(--shadow); }
.att-video { display: block; max-width: min(380px, 100%); max-height: 320px; border-radius: 1rem; background: #000; }
.att-audio { max-width: 100%; height: 40px; }
.att-file { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 1rem; background: var(--raised); text-decoration: none; font-weight: 600; max-width: 100%; }
.att-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-file:hover { background: var(--hover); box-shadow: 0 0 0 1px var(--accent); }

.dm-log .msg-main { display: flex; flex-direction: column; gap: 3px; }
.dm-log .msg.mine .msg-main { align-items: flex-end; }

.chat-tools { position: relative; display: flex; align-items: center; gap: 2px; flex-shrink: 0; margin-bottom: 2px; }
.tool-btn { background: none; border: 0; color: var(--text-2); width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s, color .15s; padding: 0; }
.tool-btn:hover { background: var(--hover); color: var(--accent); }
.pop { position: absolute; bottom: calc(100% + 14px); left: 0; z-index: 60; background: var(--card-solid); color: var(--text); border: 1px solid var(--line); border-radius: 1.1rem; padding: 10px; box-shadow: var(--shadow-lg); }
.pop[hidden] { display: none; }
.uploading { opacity: .6; pointer-events: none; }
.uploading .chat-tools::after { content: "Sending…"; position: absolute; bottom: calc(100% + 6px); left: 8px; font-size: .75rem; color: var(--muted); }


/* ---------- WhatsApp-style panel: all emoji + GIFs ---------- */
.picker-pop { width: 360px; padding: 0; overflow: hidden; }
.picker-tabs { display: flex; gap: 4px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); }
.picker-tabs button { flex: 1; background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 10px; color: var(--muted); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; }
.picker-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
[data-theme="dark"] .picker-tabs button.on { color: #c4b5fd; border-bottom-color: #c4b5fd; }
.gif-badge { font-size: .72rem; letter-spacing: .05em; border: 1.5px solid currentColor; border-radius: .4rem; padding: 0 6px; }
.picker-pane[hidden] { display: none; }
.picker-pane emoji-picker { width: 100%; height: 340px; --num-columns: 8; --border-size: 0; --background: transparent;
  --input-border-color: var(--line); --input-font-color: var(--text); --input-placeholder-color: var(--muted);
  --button-hover-background: var(--hover); --button-active-background: var(--raised);
  --indicator-color: var(--accent); --category-font-color: var(--muted); --outline-color: var(--accent); }
.gif-pane { padding: 10px; height: 340px; display: flex; flex-direction: column; }
.gif-pane input { width: 100%; background: var(--input); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--text); outline: 0; }
.gif-grid { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); grid-auto-rows: 110px; gap: 6px; overflow-y: auto; margin: 8px 0 4px; }
.gif-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: .7rem; cursor: pointer; }
.gif-grid img:hover { outline: 2px solid var(--accent); }
.gif-setup { padding: 8px 6px; font-size: .9rem; }
.gif-setup ol { padding-left: 1.1rem; margin: 8px 0 0; color: var(--text-2); }
.gif-setup code { background: var(--raised); padding: 1px 6px; border-radius: .4rem; }
@media (max-width: 767px) { .picker-pop { width: min(340px, 90vw); } }

/* ---------- reply / edit bar above the message box ---------- */
.compose-bar { display: flex; align-items: center; gap: 10px; margin: 0 20px 6px; padding: 8px 14px; background: var(--raised); border-left: 4px solid var(--accent); border-radius: .8rem; font-size: .88rem; }
.compose-bar[hidden] { display: none; }
.compose-bar .cb-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-bar .cb-text span { color: var(--muted); }
.compose-bar button { background: none; border: 0; color: var(--muted); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.compose-bar button:hover { color: #e11d48; }
.srv-form .compose-bar { margin: 0 0 6px; border-radius: 1rem; }

/* ---------- quoted message, "(edited)" ---------- */
.msg-reply { display: flex; flex-direction: column; border-left: 3px solid var(--accent); background: var(--hover); border-radius: .6rem; padding: 3px 10px; margin: 2px 0 3px; max-width: 100%; cursor: pointer; font-size: .82rem; }
.msg-reply b { color: var(--accent); }
[data-theme="dark"] .msg-reply b { color: #c4b5fd; }
.msg-reply span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.edited { color: var(--muted); font-size: .7rem; }
.msg.selected { background: var(--hover); border-radius: 1rem; }
.msg.flash { animation: msg-flash 1.4s ease; }
@keyframes msg-flash { 0%, 60% { background: rgba(124, 58, 237, .25); border-radius: 1rem; } 100% { background: transparent; } }

/* ---------- right-click menu ---------- */
.msg-menu { position: fixed; z-index: 3000; min-width: 180px; padding: 6px; background: var(--card-solid); color: var(--text); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow-lg); }
.msg-menu[hidden] { display: none; }
.msg-menu button { display: block; width: 100%; text-align: left; padding: 9px 14px; border: 0; background: none; color: inherit; border-radius: .7rem; cursor: pointer; font-size: .92rem; }
.msg-menu button[hidden] { display: none; }
.msg-menu button:hover { background: var(--hover); }
.msg-menu button.danger { color: #e11d48; }

/* live feed bits */

/* notifications */
.sn-badge[hidden], .ch-count[hidden] { display: none; }
.rail-btn .sn-badge { top: -3px; right: -3px; }
.ch-count, .dm-count { background: var(--pink); color: #fff; font-style: normal; font-size: .66rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0 5px; box-shadow: 0 0 10px rgba(219, 39, 119, .55); flex-shrink: 0; margin-left: auto; }
.dm-row .dm-count { margin-left: 8px; }

/* online dots, status menu, mute buttons */
[class*="avatar-"] { position: relative; }
.pdot { position: absolute; right: 4%; bottom: 4%; width: 28%; height: 28%; min-width: 9px; min-height: 9px; border-radius: 50%; border: 2px solid var(--card-solid, #fff); box-sizing: border-box; }
.pdot.solo { position: static; display: inline-block; width: 12px; height: 12px; min-width: 0; min-height: 0; border-width: 0; vertical-align: middle; flex-shrink: 0; }
.s-online { background: #22c55e; box-shadow: 0 0 8px rgba(34, 197, 94, .7); }
.s-idle { background: #f59e0b; }
.s-dnd { background: #ef4444; }
.s-offline, .s-invisible { background: #94a3b8; }
.solo.s-invisible, .solo.s-offline { background: transparent; border: 2px solid #94a3b8; }
.status-menu .dropdown-item { display: flex; align-items: center; gap: 10px; }
.mute-btn::before { font-size: 1.15rem; }
.mute-btn[data-on="0"]::before { content: "🔔"; }
.mute-btn[data-on="1"]::before { content: "🔕"; }

/* typing + seen */
.typing-note { padding: 2px 24px 6px; font-size: .8rem; font-style: italic; color: var(--muted); min-height: 0; }
.typing-note[hidden] { display: none; }
.seen-mark { font-size: .7rem; color: var(--muted); text-align: right; margin-top: 2px; }

/* calls */
.s-call { background: #a855f7; box-shadow: 0 0 8px rgba(168, 85, 247, .8); }
.call-btn { font-size: 1.1rem; }
.call-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 20px; background: linear-gradient(135deg, rgba(34, 197, 94, .25), rgba(168, 85, 247, .25)); border-bottom: 1px solid var(--line); }
.call-banner[hidden] { display: none; }
.ring-screen { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center; background: rgba(8, 4, 24, .72); backdrop-filter: blur(10px); }
/* Profile photo lightbox: any element with [data-lightbox="<img url>"] pops it up full-size,
   see micro.js. */
[data-lightbox] { cursor: zoom-in; }
.pfp-lightbox { position: fixed; inset: 0; z-index: 3000; display: flex; align-items: center; justify-content: center;
                background: rgba(8, 4, 24, .82); backdrop-filter: blur(10px); cursor: zoom-out; animation: ring-pop .2s ease both; }
.pfp-lightbox[hidden] { display: none; }
.pfp-lightbox img { max-width: min(90vw, 480px); max-height: 80vh; border-radius: 1.4rem; object-fit: contain;
                     box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 60px rgba(139, 92, 246, .35); }
.ring-card { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 44px; border-radius: 28px; background: var(--card-solid, #1e143c); color: var(--text); border: 1px solid var(--line); box-shadow: 0 20px 60px rgba(0, 0, 0, .5), 0 0 60px rgba(139, 92, 246, .35); animation: ring-pop .35s ease both; }
.ring-avatar { width: 104px; height: 104px; border-radius: 50%; overflow: hidden; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; font-weight: 700; color: #fff; background: var(--grad); animation: ring-pulse 1.6s ease-out infinite; }
.ring-avatar img { width: 100%; height: 100%; object-fit: cover; }
.ring-name { font-size: 1.4rem; }
.ring-kind { color: var(--muted); }
.ring-actions { display: flex; gap: 34px; margin-top: 18px; }
.ring-btn { width: 64px; height: 64px; border-radius: 50%; border: 0; font-size: 1.6rem; color: #fff; cursor: pointer; transition: transform .15s; }
.ring-btn:hover { transform: scale(1.1); }
.ring-btn.accept { background: #22c55e; box-shadow: 0 0 24px rgba(34, 197, 94, .6); }
.ring-btn.decline { background: #ef4444; box-shadow: 0 0 24px rgba(239, 68, 68, .6); }
@keyframes ring-pulse { 0% { box-shadow: 0 0 0 0 rgba(168, 85, 247, .6); } 100% { box-shadow: 0 0 0 28px rgba(168, 85, 247, 0); } }
@keyframes ring-pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

.call-page { background: #0b0620; }
.call-room { position: fixed; inset: 0; display: flex; flex-direction: column; color: #fff; background: radial-gradient(circle at 20% 10%, #3b1d7a 0, #0b0620 55%); }
.call-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; }
.call-title { display: flex; flex-direction: column; }
.call-title small { color: #c4b5fd; }
.call-timer { font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .12); padding: 4px 12px; border-radius: 999px; }
.call-timer[hidden] { display: none; }
.call-grid { flex: 1; min-height: 0; display: grid; gap: 12px; padding: 8px 16px 16px; grid-template-columns: 1fr; position: relative; }
.call-grid[data-count="3"], .call-grid[data-count="4"] { grid-template-columns: 1fr 1fr; }
.call-grid[data-count="5"], .call-grid[data-count="6"] { grid-template-columns: repeat(3, 1fr); }
.call-grid[data-count="7"], .call-grid[data-count="8"], .call-grid[data-count="9"] { grid-template-columns: repeat(3, 1fr); }
.tile { position: relative; border-radius: 20px; overflow: hidden; background: rgba(255, 255, 255, .08); border: 2px solid transparent; min-height: 0; display: flex; align-items: center; justify-content: center; transition: border-color .2s, box-shadow .2s; }
.tile video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.tile.sharing video { object-fit: contain; }
.tile.me video { transform: scaleX(-1); }
.tile.me.sharing video { transform: none; }
.tile.no-video video { visibility: hidden; position: absolute; }
.tile-avatar { display: none; width: 22vmin; height: 22vmin; max-width: 140px; max-height: 140px; border-radius: 50%; overflow: hidden; align-items: center; justify-content: center; font-size: 3rem; font-weight: 700; background: var(--grad); }
.tile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tile.no-video .tile-avatar { display: flex; }
.tile.speaking { border-color: #22c55e; box-shadow: 0 0 24px rgba(34, 197, 94, .55); }
.tile-name { position: absolute; left: 12px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: .85rem; }
.tile-mic { position: absolute; right: 12px; bottom: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(239, 68, 68, .85); font-size: .85rem; }
.tile-mic[hidden] { display: none; }
.call-grid[data-count="2"] .tile.me { position: absolute; right: 28px; bottom: 28px; width: min(26vw, 240px); aspect-ratio: 4 / 3; z-index: 2; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.call-bar { display: flex; justify-content: center; gap: 16px; padding: 14px 0 22px; }
.call-ctl { width: 58px; height: 58px; border-radius: 50%; border: 0; font-size: 1.4rem; color: #fff; background: rgba(255, 255, 255, .16); cursor: pointer; transition: transform .15s, background .2s; }
.call-ctl:hover { transform: scale(1.08); background: rgba(255, 255, 255, .26); }
.call-ctl.off { background: rgba(239, 68, 68, .75); }
.call-ctl.on { background: #22c55e; }
.call-ctl.hang { background: #ef4444; }
.call-error { position: absolute; left: 50%; top: 64px; transform: translateX(-50%); max-width: 90vw; padding: 8px 16px; border-radius: 12px; background: rgba(239, 68, 68, .9); font-size: .9rem; }
.call-error[hidden] { display: none; }

/* ---------- Servers home: a living space scene + Discord-style add/explore dialogs ---------- */
.srv-home.sky-mode { padding: 0; position: relative; overflow: hidden; background: #03020a; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sky-caption { position: absolute; left: 32px; bottom: 26px; max-width: min(560px, 80%); color: #e8ecf8; pointer-events: none; display: flex; flex-direction: column; gap: 4px; opacity: 0; animation: sky-in 2.4s 1.2s ease forwards; }
.sky-caption b { font-size: .78rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; }
.sky-caption span { font-size: .8rem; font-weight: 300; letter-spacing: .06em; opacity: .7; }
.sky-caption kbd { background: rgba(255, 255, 255, .12); color: #fff; border-radius: 4px; padding: 0 5px; font-size: .72rem; }
@keyframes sky-in { to { opacity: 1; } }

.dc-modal { border: 0; padding: 0; border-radius: 14px; background: #313338; color: #dbdee1; width: min(440px, 94vw); max-height: 90vh; overflow: hidden; box-shadow: 0 20px 70px rgba(0, 0, 0, .6); }
.dc-modal.wide { width: min(860px, 95vw); padding: 28px 28px 24px; overflow-y: auto; }
.dc-modal::backdrop { background: rgba(0, 0, 0, .72); }
.dc-modal[open] { animation: dc-pop .18s ease-out; }
@keyframes dc-pop { from { transform: scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.dc-x { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: #949ba4; cursor: pointer; z-index: 2; }
.dc-x:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.dc-modal h3 { text-align: center; font-weight: 800; font-size: 1.5rem; margin: 0 0 8px; color: #f2f3f5; }
.dc-modal.wide h3 { text-align: left; }
.dc-sub { text-align: center; color: #b5bac1; font-size: .95rem; margin: 0 0 18px; }
.dc-modal.wide .dc-sub { text-align: left; }
.dc-modal section { display: none; padding: 26px 22px 0; }
.dc-modal section.on { display: block; }
.dc-option { width: 100%; display: flex; align-items: center; gap: 14px; padding: 8px 16px 8px 8px; border: 1px solid #3f4147; border-radius: 10px; background: none; color: #f2f3f5; cursor: pointer; text-align: left; transition: background .15s; }
.dc-option:hover { background: #3a3c42; }
.dc-option b { flex: 1; font-size: 1rem; }
.dc-option i { font-style: normal; font-size: 1.5rem; color: #b5bac1; }
.dc-opt-icon { width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, #5865f2, #a855f7); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.dc-foot { margin: 22px -22px 0; padding: 16px 22px 20px; background: #2b2d31; text-align: center; }
.dc-foot h6 { font-weight: 700; margin: 0 0 10px; color: #f2f3f5; }
.dc-modal label { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #b5bac1; margin: 14px 0 7px; }
.dc-modal label em { color: #f23f42; font-style: normal; }
.dc-modal input[type=text], .dc-modal input:not([type]), .dc-modal input[name=code], .dc-modal input[name=name], .dc-modal input[name=description], .dc-emoji { width: 100%; padding: 11px 12px; border: 0; border-radius: 6px; background: #1e1f22; color: #dbdee1; outline: 0; }
.dc-modal input:focus { box-shadow: 0 0 0 2px #5865f2; }
.dc-row { display: flex; justify-content: center; gap: 22px; }
.dc-pick { text-align: center; }
.dc-pick label { margin-top: 0; }
.dc-emoji { width: 84px !important; height: 84px; border-radius: 50% !important; text-align: center; font-size: 2rem; border: 2px dashed #4e5058 !important; }
.dc-color { width: 84px; height: 84px; padding: 0; border: 2px dashed #4e5058; border-radius: 50%; background: none; cursor: pointer; overflow: hidden; }
.dc-color::-webkit-color-swatch-wrapper { padding: 0; } .dc-color::-webkit-color-swatch { border: 0; border-radius: 50%; }
.dc-check { display: flex !important; align-items: center; gap: 8px; text-transform: none !important; letter-spacing: 0 !important; font-size: .9rem !important; font-weight: 500 !important; color: #dbdee1 !important; }
.dc-hint { font-size: .8rem; color: #949ba4; margin: 8px 0 0; }
.dc-hint code { background: #1e1f22; padding: 1px 6px; border-radius: 4px; color: #dbdee1; }
.dc-actions { display: flex; align-items: center; justify-content: space-between; margin: 22px -22px 0; padding: 16px 22px; background: #2b2d31; }
.dc-btn { border: 0; border-radius: 4px; padding: 10px 22px; background: #5865f2; color: #fff; font-weight: 600; cursor: pointer; transition: background .15s; }
.dc-btn:hover { background: #4752c4; }
.dc-btn.alt { width: 100%; background: #4e5058; }
.dc-btn.alt:hover { background: #6d6f78; }
.dc-btn.small { padding: 6px 16px; font-size: .85rem; }
.dc-link { border: 0; background: none; color: #dbdee1; cursor: pointer; padding: 10px 6px; }
.dc-link:hover { text-decoration: underline; }
.dc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.dc-tile { position: relative; background: #2b2d31; border-radius: 10px; overflow: hidden; padding: 0 14px 14px; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.dc-tile:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
.dc-banner { height: 64px; margin: 0 -14px; background: linear-gradient(135deg, var(--c), #141226); }
.dc-tile-icon { margin-top: -26px; border: 4px solid #2b2d31; width: 52px; height: 52px; }
.dc-tile b { color: #f2f3f5; margin-top: 8px; }
.dc-tile p { color: #b5bac1; font-size: .85rem; margin: 4px 0 12px; flex: 1; }
.dc-tile-foot { display: flex; align-items: center; justify-content: space-between; color: #949ba4; }

/* ---------- Servers, round two: powers, companions, formatting, panels ---------- */
.srv-chat { position: relative; }
.srv-goal { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.srv-goal .goal-top { display: flex; justify-content: space-between; font-weight: 700; }
.srv-goal small { color: var(--muted); }
.goal-bar { height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; margin: 6px 0 4px; }
.goal-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--a1), var(--a2), var(--a3)); transition: width .6s; }
.ch-emoji { font-size: .95rem; width: 16px; text-align: center; }
.ch-live { font-style: normal; font-size: .7rem; color: var(--muted); margin-left: auto; }
.srv-topic { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 30vw; }
.srv-search { position: relative; display: flex; align-items: center; }
.srv-search input { width: 150px; padding: 5px 30px 5px 12px; border-radius: 999px; font-size: .85rem; background: var(--input); border: 1px solid var(--line); color: var(--text); transition: width .2s; }
.srv-search input:focus { width: 230px; outline: 0; }
.srv-search svg { position: absolute; right: 10px; color: var(--muted); pointer-events: none; }
.mem { background: none; border: 0; width: 100%; text-align: left; display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-radius: .6rem; color: var(--text); cursor: pointer; }
.mem:hover { background: var(--hover); }
.bot-tag { font-style: normal; font-size: .62rem; font-weight: 800; letter-spacing: .04em; color: #fff; background: #5865f2; border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }

/* voice room card */
.voice-card { display: flex; align-items: center; gap: 16px; margin: 14px 18px 0; padding: 16px 20px; border-radius: 1.2rem; background: linear-gradient(120deg, rgba(124, 58, 237, .18), rgba(14, 165, 233, .14)); border: 1px solid var(--line); flex-wrap: wrap; }
.voice-card .srv-btn { margin-top: 0; }
.vc-ring { width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--hover); box-shadow: 0 0 0 3px var(--a1), 0 0 22px var(--a1); }

/* forum / pitch board */
.forum { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.pitch-new { background: var(--hover); border: 1px solid var(--line); border-radius: 1.2rem; padding: 12px 16px; }
.pitch-new summary { cursor: pointer; font-weight: 800; }
.pitch-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; border-radius: 1.1rem; background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.pitch-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pitch-card small { color: var(--muted); }
.chip-ask { align-self: flex-start; font-size: .75rem; font-weight: 800; color: #fff; background: var(--grad); border-radius: 999px; padding: 2px 10px; }

/* formatted text */
.msg-body .fmt-code, .embed-desc .fmt-code { background: var(--hover); border-radius: 5px; padding: 1px 6px; font-size: .88em; }
.fmt-pre { background: rgba(0, 0, 0, .28); color: #e5e7eb; border-radius: .7rem; padding: 10px 14px; margin: 4px 0; overflow-x: auto; white-space: pre; }
.fmt-quote { border-left: 4px solid var(--a1); margin: 2px 0; padding: 0 0 0 10px; color: var(--text-2); }
.fmt-link { color: var(--accent); }
.mention { background: rgba(88, 101, 242, .22); color: #6d78ff; border-radius: 5px; padding: 0 4px; font-weight: 600; cursor: pointer; text-decoration: none; }
.mention.me, .mention.all { background: rgba(250, 166, 26, .26); color: #d98a05; }
.mention.role { background: color-mix(in srgb, var(--rc, #888) 25%, transparent); color: var(--rc, inherit); }
.spoiler { background: #1f2937; color: transparent; border-radius: 4px; cursor: pointer; padding: 0 3px; user-select: none; }
.spoiler.revealed { background: var(--hover); color: inherit; user-select: auto; }
.cemoji { width: 1.4em; height: 1.4em; vertical-align: -.3em; object-fit: contain; }
.msg.pinned { box-shadow: inset 3px 0 0 #f59e0b; }
.msg.mentioned { background: rgba(250, 166, 26, .12); box-shadow: inset 3px 0 0 #faa61a; }
.msg.ephemeral { opacity: .85; border-left: 3px dashed var(--a1); background: var(--hover); }
.msg.ephemeral .avatar-sm { background: var(--hover); }
.eph-x { border: 0; background: none; color: var(--accent); font-size: .75rem; cursor: pointer; }
.srv-log .msg.is-bot .msg-meta strong { color: var(--a1); }

/* embeds + polls */
.embed { border-left: 4px solid var(--ec, var(--a1)); background: var(--hover); border-radius: .5rem .9rem .9rem .5rem; padding: 10px 14px 12px; margin-top: 6px; max-width: 520px; }
.embed-title { font-weight: 800; color: var(--text); display: block; text-decoration: none; }
a.embed-title:hover { text-decoration: underline; }
.embed-desc { margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.embed-fields { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 8px; }
.embed-fields > div { flex: 1 1 100%; }
.embed-fields > div.inline { flex: 0 1 auto; }
.embed-fields b { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.embed-progress { margin-top: 8px; }
.embed-progress small, .embed-foot { color: var(--muted); }
.embed-foot { display: block; margin-top: 8px; font-size: .75rem; }
.embed-img { max-width: 100%; border-radius: .6rem; margin-top: 8px; }
.poll { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.poll-opt { position: relative; display: flex; justify-content: space-between; gap: 10px; text-align: left; padding: 8px 12px; border-radius: .7rem; border: 1px solid var(--line); background: var(--card); color: var(--text); overflow: hidden; cursor: pointer; }
.poll-opt > * { position: relative; }
.poll-fill { position: absolute !important; inset: 0 auto 0 0; background: linear-gradient(90deg, rgba(124, 58, 237, .35), rgba(14, 165, 233, .25)); transition: width .4s; }
.poll-opt.mine { border-color: var(--a1); box-shadow: 0 0 0 1px var(--a1); }
.poll-total { color: var(--muted); }

/* reactions + threads */
.rx-bar { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rx { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--hover); color: var(--text); font-size: .85rem; cursor: pointer; }
.rx.mine { border-color: var(--a1); background: rgba(124, 58, 237, .18); }
.rx span { font-weight: 700; font-size: .78rem; }
.thread-chip { display: inline-block; margin-top: 4px; font-size: .8rem; font-weight: 700; color: var(--accent); text-decoration: none; }
.thread-chip:hover { text-decoration: underline; }
.react-pop { position: fixed; z-index: 3000; padding: 8px; border-radius: 1rem; background: var(--card); backdrop-filter: blur(18px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.quick-rx { display: flex; gap: 2px; flex-wrap: wrap; max-width: 330px; }
.quick-rx button { border: 0; background: none; font-size: 1.35rem; border-radius: .6rem; padding: 2px 6px; cursor: pointer; }
.quick-rx button:hover { background: var(--hover); }
.react-pop emoji-picker { margin-top: 6px; --num-columns: 8; height: 320px; width: 330px; }

/* slash + mention autocomplete */
.srv-form { position: relative; }
.slash-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); background: var(--card); backdrop-filter: blur(18px); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; max-height: 300px; overflow-y: auto; }
.slash-pop[hidden] { display: none; }
.slash-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: .7rem; color: var(--text); cursor: pointer; }
.slash-item span { color: var(--muted); font-size: .82rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slash-item.on, .slash-item:hover { background: var(--hover); box-shadow: inset 3px 0 0 var(--a1); }

/* side panel + member card */
.srv-panel { position: absolute; top: 52px; right: 0; bottom: 0; width: 340px; max-width: 92%; z-index: 30; background: var(--card); backdrop-filter: blur(22px); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.srv-panel[hidden] { display: none; }
/* The deal room is a normal scrolling article, not a position:relative full-height shell like the
   servers page, so this panel has to be viewport-anchored instead of .srv-panel's position:absolute. */
.coach-panel { position: fixed; top: 76px; bottom: 16px; right: 16px; border-radius: 1.2rem; border: 1px solid var(--line); border-left: 1px solid var(--line); overflow: visible; }
.coach-panel .panel-head { position: relative; }
/* Floats half outside the panel's own left edge, straddling the boundary with the deal room behind
   it -- .coach-panel is the positioned ancestor (position: fixed), so this anchors to the panel
   itself and stays put regardless of how #panel-body scrolls. */
.coach-mascot { position: absolute; left: -62px; bottom: 96px; width: 130px; height: auto;
                z-index: 5; filter: drop-shadow(0 10px 18px rgb(0 0 0 / .28)); animation: coach-bob 3s ease-in-out infinite; }
@keyframes coach-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.coach-form.nova-form { margin: 12px; }
/* Mini standalone mascot, floats bottom-right whenever the coach panel itself isn't open --
   lets the user call Nova back after closing the panel instead of being stuck re-triggering it
   via the counter radio. JS moves this to a direct child of <body>, same containing-block reason
   as .coach-panel above. */
.coach-fab { position: fixed; right: 20px; bottom: 20px; width: 60px; height: 60px; padding: 0;
             border: 1px solid var(--line); border-radius: 50%; background: var(--card-solid);
             display: flex; align-items: center; justify-content: center; z-index: 40; cursor: pointer;
             box-shadow: 0 .6rem 1.4rem rgb(0 0 0 / .3); transition: transform .2s, filter .2s;
             animation: coach-bob 3s ease-in-out infinite; }
.coach-fab[hidden] { display: none; }
.coach-fab img { width: 42px; height: auto; }
.coach-fab:hover { transform: translateY(-3px); filter: brightness(1.08); }
.deal-timeline.compact .round { margin-bottom: 6px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-body { flex: 1; overflow-y: auto; padding: 10px 12px 20px; }
.p-item { display: block; padding: 10px 12px; border-radius: .9rem; border: 1px solid var(--line); margin-bottom: 8px; color: var(--text); text-decoration: none; background: var(--hover); word-break: break-word; }
a.p-item:hover { border-color: var(--a1); }
.p-item small { color: var(--muted); }
.panel-form { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.srv-btn.ghost { background: var(--hover); color: var(--text); box-shadow: none; }
.member-card { position: fixed; z-index: 3000; width: 300px; border-radius: 1.2rem; overflow: hidden; background: var(--card); backdrop-filter: blur(22px); border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.member-card[hidden] { display: none; }
.mc-banner { height: 70px; }
.mc-body { padding: 0 16px 16px; }
.mc-avatar { margin-top: -34px; margin-bottom: 6px; }
.mc-bio { margin: 8px 0; font-size: .88rem; }
.mc-roles { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.role-chip { display: inline-flex; align-items: center; gap: 5px; font-size: .75rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--hover); }
.role-chip i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.mc-actions { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mc-warn { background: rgba(245, 158, 11, .2); border-radius: .6rem; padding: 4px 10px; margin-top: 8px; font-size: .82rem; }
.mc-mod { margin-top: 10px; }
.mc-mod summary { cursor: pointer; color: var(--muted); font-size: .85rem; }
.mc-mod form { margin-top: 6px; }
.mc-mod .srv-btn { margin-top: 0; }

/* settings: powers, companions, misc */
.power-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin: 10px 0 14px; }
.power { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border-radius: .8rem; border: 1px solid var(--line); background: var(--hover); cursor: pointer; text-transform: none; letter-spacing: 0; margin: 0; font-weight: 400; }
.power.locked { opacity: .5; cursor: not-allowed; }
.power b { display: block; font-size: .88rem; color: var(--text); }
.power small { color: var(--muted); font-size: .76rem; }
.comp-ico { display: inline-flex; width: 38px; height: 38px; border-radius: 12px; align-items: center; justify-content: center; font-size: 1.2rem; margin-right: 8px; }
.comp summary { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.comp-card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 1.2rem; border: 1px solid var(--line); background: var(--card); }
.comp-card p { flex: 1; font-size: .85rem; margin: 0 0 6px; }
.comp-card .srv-btn { align-self: flex-start; margin-top: 0; }
.token-box { background: rgba(16, 185, 129, .14); border: 1px solid #10b981; border-radius: 1rem; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; word-break: break-all; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 14px; margin-top: 18px; }
.emoji-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 1rem; background: var(--hover); }
.emoji-item img { width: 48px; height: 48px; object-fit: contain; }
.emoji-item .srv-btn { margin-top: 0; }
.audit-row { display: flex; gap: 12px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.audit-row small { color: var(--muted); min-width: 110px; }
.api-doc { white-space: pre-wrap; background: rgba(0, 0, 0, .3); color: #e5e7eb; border-radius: .8rem; padding: 14px; font-size: .78rem; overflow-x: auto; }
.gate { display: flex; align-items: center; justify-content: center; }
.gate-card { max-width: 520px; width: 100%; }
.gate-rules { white-space: pre-wrap; background: var(--hover); border-radius: 1rem; padding: 14px 16px; max-height: 260px; overflow-y: auto; }
.set-main select, .set-form select, .panel-form select { background: var(--input); color: var(--text); border: 1px solid var(--line); border-radius: .7rem; padding: 7px 10px; }
.ch .ch-emoji { flex: 0 0 16px; }

/* project servers: status card */
.srv-proj { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); font-size: .8rem; }
.proj-title { display: block; font-weight: 800; color: var(--text); text-decoration: none; margin-bottom: 8px; }
.proj-title:hover { text-decoration: underline; }
.srv-proj small { color: var(--muted); }
.stage-steps { display: flex; gap: 4px; }
.stage-steps i { flex: 1; text-align: center; font-style: normal; padding: 3px 0; border-radius: 999px; background: var(--hover); color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: capitalize; }
.stage-steps i.done { background: rgba(124, 58, 237, .3); color: var(--text); }
.stage-steps i.now { background: var(--grad); color: #fff; }
.proj-link { font-size: .85rem; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--hover); color: var(--text); border: 1px solid var(--line); }

/* project posts: chip, follow, milestones, updates */
.proj-extra { padding: 4px 16px 8px; }
.proj-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.proj-chip { display: inline-block; font-size: .8rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: var(--hover); color: var(--text); border: 1px solid var(--line); cursor: pointer; }
.proj-chip.on { background: rgba(124, 58, 237, .22); border-color: var(--a1); }
.proj-chip:hover { border-color: var(--a1); }
.proj-h { margin: 14px 0 6px; font-weight: 800; }
.ms { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: .8rem; background: var(--hover); margin-bottom: 5px; flex-wrap: wrap; }
.ms-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; color: #fff; }
.ms.funded .ms-dot { background: #f59e0b; border-color: #f59e0b; }
.ms.done .ms-dot { background: #10b981; border-color: #10b981; }
.ms-title { font-weight: 700; flex: 1; }
.ms small { color: var(--muted); }
.ms-btn { border: 0; background: none; color: var(--accent); font-size: .75rem; cursor: pointer; }
.ms-add-block { margin: 12px 0 4px; padding: 12px 14px; border: 2px dashed var(--accent); border-radius: 12px; background: rgba(99,102,241,.05); }
.ms-add-label { font-size: .82rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; letter-spacing: .01em; }
.ms-form, .upd-form { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.upd-form { flex-direction: column; }
.ms-form input, .upd-form textarea { flex: 1; min-width: 120px; padding: 6px 10px; border-radius: .7rem; border: 1px solid var(--line); background: var(--input); color: var(--text); }
.ms-form button, .upd-form button { border: 0; border-radius: 999px; padding: 6px 16px; background: var(--grad); color: #fff; font-weight: 700; }
.upd { border-left: 3px solid var(--a1); padding: 2px 0 2px 12px; margin: 10px 0; }
.upd p { margin: 2px 0; white-space: pre-wrap; }
.upd img { max-width: 100%; border-radius: .8rem; margin-top: 4px; }

/* Milestone escrow: locked / in review / released, proof and sponsor votes */
.ms.review .ms-dot { background: #0ea5e9; border-color: #0ea5e9; }
.ms.released .ms-dot { background: #10b981; border-color: #10b981; }
.escrow-sum { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 8px 12px; margin-bottom: 8px; border-radius: .8rem; border: 1px dashed var(--a1); font-size: .85rem; }
.ms-proof, .ms-proof-form, .ms-sent-back { flex-basis: 100%; }
.ms-proof { padding: 8px 0 2px 28px; }
.ms-proof p { margin: 0 0 4px; white-space: pre-wrap; }
.ms-proof img { max-width: 100%; max-height: 220px; border-radius: .8rem; margin-bottom: 6px; }
.ms-vote-bar { display: flex; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; margin: 4px 0; }
.ms-vote-bar .yes { background: #10b981; }
.ms-vote-bar .no { background: #e11d48; margin-left: auto; }
.ms-vote { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ms-vote input { flex: 1; min-width: 140px; padding: 5px 10px; border-radius: .7rem; border: 1px solid var(--line); background: var(--input); color: var(--text); }
.ms-vote button { border: 0; border-radius: 999px; padding: 5px 14px; font-weight: 700; font-size: .8rem; background: var(--grad); color: #fff; }
.ms-vote button.ghost { background: none; border: 1px solid var(--line); color: var(--text); }
.ms-vote button.on { box-shadow: 0 0 0 2px var(--a1); }
.ms-sent-back { color: #e11d48; padding-left: 28px; }
.ms-proof-form { padding-left: 28px; }
.ms-proof-form summary { cursor: pointer; font-size: .82rem; font-weight: 700; color: var(--accent); }
[data-theme="dark"] .ms-proof-form summary { color: #c4b5fd; }

/* Trust badges: verified college email (✓) and faculty-mentor endorsements (🎓) */
.verified { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #0ea5e9; color: #fff; font-size: .62rem; font-weight: 900; vertical-align: middle; margin-left: 2px; }
.verified.lg { width: 24px; height: 24px; font-size: .9rem; }
.endorsed-mark { font-size: .85rem; vertical-align: middle; }
.endorse { margin: 6px 0 10px; }
.endorse .ms-proof-form { padding-left: 0; margin-top: 4px; }
.endorse-chip { display: inline-block; font-size: .8rem; padding: 5px 12px; border-radius: 999px; margin: 0 6px 6px 0; background: rgba(16, 185, 129, .14); border: 1px solid rgba(16, 185, 129, .45); color: var(--text); }
.verify-done { display: flex; align-items: center; gap: 12px; }
.code-input { max-width: 160px; letter-spacing: .4em; font-weight: 700; text-align: center; }
.endorse-page { display: flex; justify-content: center; padding: 48px 16px; }
.endorse-card { max-width: 520px; width: 100%; padding: 32px 28px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.endorse-summary { font-style: italic; margin: 10px 0; }
.join-proj { text-align: left; background: var(--hover); border-radius: 1rem; padding: 12px 14px; margin: 10px 0; display: flex; flex-direction: column; gap: 6px; }
/* Explore: project cards + filters */
.dc-tabs { display: flex; gap: 6px; margin: 12px 0 6px; }
.dc-tabs button { border: 0; border-radius: 999px; padding: 6px 16px; background: #2b2d31; color: #dbdee1; cursor: pointer; font-weight: 600; }
.dc-tabs button.on { background: #5865f2; color: #fff; }
.dc-filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.dc-filters select { background: #1e1f22; color: #dbdee1; border: 0; border-radius: 6px; padding: 6px 10px; }
.dc-stage { font-size: .7rem; font-weight: 800; text-transform: uppercase; color: #f0b232; letter-spacing: .04em; }
.dc-mini { height: 6px; border-radius: 99px; background: #1e1f22; overflow: hidden; margin: 4px 0 8px; }
.dc-mini i { display: block; height: 100%; background: linear-gradient(90deg, #7c3aed, #0ea5e9, #10b981); }
.srv-ms { margin: 6px 0 0; font-size: .75rem; color: var(--muted); }
.srv-ms span.ok { color: #10b981; }

/* =====================================================================
   Welcome tour + micro-interactions
   ===================================================================== */

/* ---------- Page enter: content rises in, first posts cascade ---------- */
.app-main { animation: page-in .5s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#feed > .post { animation: card-in .6s cubic-bezier(.2, .8, .2, 1) both; }
#feed > .post:nth-child(2) { animation-delay: .08s; }
#feed > .post:nth-child(3) { animation-delay: .16s; }
#feed > .post:nth-child(n+4) { animation-delay: .22s; }
@keyframes card-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.stories .story { animation: card-in .55s cubic-bezier(.2, .8, .2, 1) both; }
.stories .story:nth-child(2) { animation-delay: .05s; } .stories .story:nth-child(3) { animation-delay: .1s; }
.stories .story:nth-child(4) { animation-delay: .15s; } .stories .story:nth-child(n+5) { animation-delay: .2s; }
.story { transition: transform .25s; } .story:hover { transform: translateY(-4px) scale(1.06); }

/* ---------- Buttons: lift on hover, squash on press, ripple ---------- */
.app-body .btn-primary, .sn-create, .tour-next { position: relative; overflow: hidden; transition: transform .2s, filter .2s, box-shadow .2s; }
.app-body .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 .6rem 1.4rem rgba(219, 39, 119, .4); }
.app-body .btn-primary:active, .sn-create:active { transform: scale(.96); }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .55); transform: scale(0); animation: ripple .65s ease-out forwards; pointer-events: none; }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
.sn-link .ico { transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); }
.sn-link:hover .ico { transform: scale(1.18) rotate(-6deg); }
.like-btn.pop .ico { animation: like-pop .5s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes like-pop { 0% { transform: scale(1); } 35% { transform: scale(1.45) rotate(-8deg); } 100% { transform: scale(1); } }

/* ---------- Skeleton loaders ---------- */
.sk { display: block; border-radius: .7rem; background: linear-gradient(100deg, var(--hover) 30%, var(--raised) 50%, var(--hover) 70%); background-size: 250% 100%; animation: sk-shimmer 1.4s linear infinite; }
@keyframes sk-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skeleton-post { text-align: left; pointer-events: none; margin-bottom: 0; }
.sk-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.sk-circle { width: 40px; height: 40px; border-radius: 50%; }
.sk-line { height: 12px; margin: 10px 0; } .sk-row .sk-line { margin: 0; flex: 1; }
.sk-block { height: 220px; border-radius: 1.1rem; }
.w40 { max-width: 40%; } .w50 { max-width: 50%; } .w70 { max-width: 70%; }
.post-media img.img-loading { min-height: 260px; opacity: 0; }
.post-media:has(img.img-loading) { background: linear-gradient(100deg, var(--hover) 30%, var(--raised) 50%, var(--hover) 70%); background-size: 250% 100%; animation: sk-shimmer 1.4s linear infinite; }
.post-media img { transition: opacity .5s; }

/* ---------- Confetti canvas ---------- */
.confetti { position: fixed; inset: 0; z-index: 3000; pointer-events: none; }

/* ---------- Welcome tour ---------- */
.tour { position: fixed; inset: 0; z-index: 2500; opacity: 0; transition: opacity .35s; }
.tour.on { opacity: 1; } .tour.out { opacity: 0; }
.tour-spot {
  position: fixed; border: 2px solid rgba(255, 255, 255, .85); pointer-events: none;
  box-shadow: 0 0 0 100vmax rgba(12, 7, 32, .72), 0 0 0 5px rgba(139, 92, 246, .55), 0 0 36px 6px rgba(236, 72, 153, .55);
  transition: left .45s cubic-bezier(.2, .8, .2, 1), top .45s cubic-bezier(.2, .8, .2, 1), width .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1), border-radius .3s;
  animation: spot-pulse 2s ease-in-out infinite;
}
.tour-spot.none { left: 50%; top: 50%; width: 0; height: 0; border-color: transparent; box-shadow: 0 0 0 100vmax rgba(12, 7, 32, .72); animation: none; }
@keyframes spot-pulse { 50% { box-shadow: 0 0 0 100vmax rgba(12, 7, 32, .72), 0 0 0 9px rgba(139, 92, 246, .3), 0 0 46px 10px rgba(236, 72, 153, .6); } }
.tour-card {
  position: fixed; width: min(340px, calc(100vw - 24px)); padding: 20px 20px 16px; border-radius: 1.5rem;
  background: var(--card-solid); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); opacity: 0; transition: left .45s cubic-bezier(.2, .8, .2, 1), top .45s cubic-bezier(.2, .8, .2, 1);
}
.tour-card::before { content: ""; position: absolute; inset: -3px; z-index: -1; border-radius: calc(1.5rem + 3px); background: var(--grad-d); opacity: .6; filter: blur(16px); }
.tour-card { isolation: auto; z-index: 0; }
.tour-card::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--card-solid); }
.tour-card.in { opacity: 1; animation: tour-card-in .45s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes tour-card-in { from { opacity: 0; scale: .92; } to { opacity: 1; scale: 1; } }
.tour-card h5 { font-weight: 800; margin: 10px 0 6px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tour-card p { margin: 0 0 14px; color: var(--text-2); line-height: 1.5; font-size: .95rem; }
.tour-dots { display: flex; gap: 5px; }
.tour-dots i { height: 5px; flex: 1; border-radius: 99px; background: var(--raised); transition: background .3s; }
.tour-dots i.past { background: var(--a2); opacity: .6; } .tour-dots i.on { background: var(--grad); }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-gap { flex: 1; }
.tour-skip, .tour-back { border: 0; background: none; color: var(--muted); font-weight: 600; padding: 8px 12px; border-radius: 999px; cursor: pointer; }
.tour-skip:hover, .tour-back:hover { background: var(--hover); color: var(--text); }
.tour-next { border: 0; border-radius: 999px; padding: 9px 22px; font-weight: 700; color: #fff; background: var(--grad); box-shadow: 0 .4rem 1rem rgba(219, 39, 119, .35); cursor: pointer; }
.tour-next:hover { transform: translateY(-2px); filter: brightness(1.08); }

@media (prefers-reduced-motion: reduce) {
  .app-main, #feed > .post, .stories .story, .sk, .tour-spot, .tour-card.in { animation: none; }
}

/* =====================================================================
   Sponsorship kinds + the deal room
   ===================================================================== */

/* ---------- badges on posts ---------- */
.kind-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.kb { font-size: .72rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--raised); color: var(--text); border: 1px solid var(--line); }
.kb-money { background: rgba(245, 158, 11, .16); border-color: rgba(245, 158, 11, .4); }
.kb-pilot { background: rgba(16, 185, 129, .16); border-color: rgba(16, 185, 129, .4); }
.kb-goods { background: rgba(14, 165, 233, .16); border-color: rgba(14, 165, 233, .4); }
.offer-counter { background: var(--grad); color: #fff !important; box-shadow: 0 0 14px rgba(236, 72, 153, .45); text-decoration: none; animation: counter-glow 2s ease-in-out infinite; }
@keyframes counter-glow { 50% { box-shadow: 0 0 22px rgba(236, 72, 153, .75); } }

/* ---------- choosing kinds in the project form ---------- */
.kind-pick { display: grid; gap: 8px; }
.kind-opt { cursor: pointer; }
.kind-opt input { position: absolute; opacity: 0; pointer-events: none; }
.kind-opt > span { display: grid; grid-template-columns: 38px 1fr; column-gap: 12px; align-items: center; padding: 10px 14px; border-radius: 1rem; background: var(--input); border: 1.5px solid var(--line); transition: border-color .2s, background .2s, transform .2s, box-shadow .2s; }
.kind-opt i { grid-row: span 2; font-style: normal; font-size: 1.5rem; text-align: center; }
.kind-opt small { color: var(--muted); }
.kind-opt:hover > span { transform: translateY(-2px); }
.kind-opt input:checked + span { border-color: var(--a1); background: var(--raised); box-shadow: 0 0 0 3px rgba(124, 58, 237, .18), var(--shadow); }
.kind-opt input:focus-visible + span { outline: 2px solid var(--a1); outline-offset: 2px; }

/* ---------- the sponsor dialog ---------- */
.kind-box { border: 1.5px solid var(--line); border-radius: 1rem; padding: 10px 14px; margin-bottom: 8px; background: var(--input); transition: border-color .2s, box-shadow .2s; }
.kind-box[hidden] { display: none; }
.kind-box.open { border-color: var(--a1); box-shadow: 0 0 0 3px rgba(124, 58, 237, .15); }
.kind-row { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 0; }
.kind-row input { width: 18px; height: 18px; accent-color: var(--a1); }
.kind-fields { display: none; margin-top: 8px; }
.kind-box.open .kind-fields { display: block; animation: page-in .3s both; }
.kind-box.single .kind-row input { display: none; }

/* ---------- deal room ---------- */
.deal-head { display: flex; align-items: center; gap: 14px; margin: 14px 0 18px; padding: 14px 16px; border-radius: 1.4rem; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.deal-now { padding: 16px 18px; border-radius: 1.4rem; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.deal-now.agreed { border-color: rgba(16, 185, 129, .6); box-shadow: var(--shadow), 0 0 28px rgba(16, 185, 129, .25); }
.deal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.dchip { font-weight: 700; font-size: .9rem; padding: 6px 14px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); }
.dchip.money { background: rgba(245, 158, 11, .18); border-color: rgba(245, 158, 11, .45); }
.dchip.goods { background: rgba(14, 165, 233, .18); border-color: rgba(14, 165, 233, .45); }
.dchip.pilot { background: rgba(16, 185, 129, .18); border-color: rgba(16, 185, 129, .45); }
.deal-timeline { position: relative; padding-left: 6px; }
.deal-timeline::before { content: ""; position: absolute; left: 21px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--a1), var(--a2), transparent); opacity: .5; }
.round { display: flex; gap: 14px; margin-bottom: 14px; animation: card-in .5s cubic-bezier(.2, .8, .2, 1) both; }
.round-dot { flex: none; z-index: 1; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--card-solid); border: 2px solid var(--a1); font-size: .95rem; }
.round-accept .round-dot { border-color: #10b981; box-shadow: 0 0 14px rgba(16, 185, 129, .6); }
.round-decline .round-dot, .round-withdraw .round-dot { border-color: #e11d48; }
.round-counter .round-dot { border-color: var(--a2); box-shadow: 0 0 14px rgba(236, 72, 153, .5); }
.round-body { flex: 1; padding: 10px 14px; border-radius: 1.1rem; background: var(--card); border: 1px solid var(--line); }
.round-body .deal-chips { margin-top: 6px; }
.round-sum { margin-top: 6px; font-size: .85rem; color: var(--text-2); }
.round-note { margin-top: 6px; font-style: italic; color: var(--text-2); }
.deal-part { padding: 12px 14px; border-radius: 1.1rem; background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.deal-part-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg label { flex: 1; min-width: 90px; margin: 0; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 8px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; background: var(--input); border: 1.5px solid var(--line); transition: all .2s; }
.seg input:checked + span { color: #fff; border-color: transparent; background: var(--grad); box-shadow: 0 .3rem .8rem rgba(219, 39, 119, .3); }
.seg input[value=decline]:checked + span { background: #e11d48; }
.seg input[value=accept]:checked + span { background: linear-gradient(90deg, #10b981, #0ea5e9); }
.deal-counter { margin-top: 8px; }
.deal-outcome { font-size: .9rem; font-weight: 600; color: var(--text-2); margin-bottom: 10px; min-height: 1.3em; }
.deal-wait { margin-top: 22px; padding: 18px; border-radius: 1.4rem; text-align: center; background: var(--card); border: 1px dashed var(--line); color: var(--text-2); }
.deal-wait.done { border-style: solid; border-color: rgba(16, 185, 129, .5); }
.wait-dots { display: inline-flex; gap: 4px; margin-right: 8px; vertical-align: middle; }
.wait-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--a2); animation: wait-bounce 1.2s ease-in-out infinite; }
.wait-dots i:nth-child(2) { animation-delay: .15s; } .wait-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes wait-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .5; } 40% { transform: scale(1.1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .offer-counter, .round, .wait-dots i, .coach-mascot, .coach-fab { animation: none; } }

/* ---------- Nova ---------- */
.nova-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; background: radial-gradient(circle at 30% 30%, #fff, #c4b5fd 45%, #8b5cf6); flex-shrink: 0; }
.nova-memory { padding: 10px; min-width: 280px; max-height: 320px; overflow-y: auto; }
.nova-fact { display: flex; align-items: flex-start; gap: 8px; padding: 6px 8px; border-radius: .7rem; font-size: .85rem; }
.nova-fact:hover { background: var(--hover); }
.nova-fact span { flex: 1; }
.nova-forget { border: 0; background: none; color: var(--muted); font-size: 1.1rem; line-height: 1; cursor: pointer; }
.nova-forget:hover { color: #e11d48; }
.nova-thinking .msg-body { opacity: .6; }
.nova-actions { display: flex; flex-direction: column; gap: 10px; padding: 0 20px; }
.nova-action { padding: 12px 16px; border-radius: 1rem; background: var(--raised); border: 1px solid var(--line); }
.nova-action-head { font-weight: 700; margin-bottom: 4px; }
.nova-action-body { white-space: pre-wrap; color: var(--text-2); font-size: .92rem; margin-bottom: 10px; }
.nova-action-buttons { display: flex; gap: 8px; }
.nova-form { display: flex; align-items: flex-end; gap: 10px; margin: 12px 20px 20px; padding: 6px 6px 6px 10px;
  background: var(--input); border: 1.5px solid var(--line); border-radius: 1.4rem; }
.nova-form textarea { flex: 1; background: none; border: 0; outline: 0; resize: none; color: var(--text);
  font: inherit; padding: 9px 0; line-height: 1.35; max-height: 40vh; overflow-y: auto; }
.nova-form .btn { flex-shrink: 0; margin-bottom: 3px; }
.nova-attach-btn { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px;
  border-radius: 50%; cursor: pointer; font-size: 1.1rem; flex-shrink: 0; margin-bottom: 3px; }
.nova-attach-btn:hover { background: var(--hover); }
.nova-preview { display: flex; align-items: center; gap: 10px; margin: 0 20px 10px; padding: 8px 12px;
  background: var(--raised); border-radius: 1rem; font-size: .85rem; }
.nova-preview img { width: 40px; height: 40px; object-fit: cover; border-radius: .6rem; }
.nova-preview span { flex: 1; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nova-preview button { border: 0; background: none; color: var(--muted); font-size: 1.2rem; cursor: pointer; }
.nova-preview button:hover { color: #e11d48; }
.msg .nova-edit-btn { display: none; position: absolute; top: 50%; transform: translateY(-50%); left: -28px;
  border: 0; background: none; color: var(--muted); font-size: .9rem; cursor: pointer; padding: 4px; }
.msg:hover .nova-edit-btn { display: inline-block; }
.nova-editor { width: 100%; margin-top: 6px; }
.nova-editor textarea { width: 100%; min-height: 60px; resize: vertical; }
.nova-editor-buttons { display: flex; gap: 8px; margin-top: 6px; justify-content: flex-end; }

/* ---------- AI sponsor match ---------- */
.match-page { max-width: 640px; margin: 0 auto; padding: 24px 16px 60px; }
.match-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.match-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; background: var(--grad); flex-shrink: 0; }
.match-body { background: var(--card); border: 1px solid var(--line); border-radius: 1.5rem;
  box-shadow: var(--shadow); backdrop-filter: blur(16px); padding: 28px 24px; }
.match-qs { display: flex; flex-direction: column; gap: 14px; }
.match-field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.match-input { width: 100%; background: var(--input); border: 1px solid var(--line); border-radius: .8rem;
  padding: 9px 12px; color: var(--text); }
.match-results { display: flex; flex-direction: column; gap: 16px; }
.match-card { padding: 16px 18px; border-radius: 1rem; background: var(--raised); border: 1px solid var(--line); }
.match-card-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.match-card-head h6 { margin: 0; margin-right: auto; }
.match-email { background: var(--hover); border-radius: .9rem; padding: 10px 14px; }
.match-email-subject { font-weight: 600; margin-bottom: 6px; }
.match-email-body { white-space: pre-wrap; font-family: inherit; margin: 0; color: var(--text-2); }
.match-contact { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: .9rem; }
.match-contact a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; word-break: break-all; }
.match-note { font-size: .82rem; margin-top: 14px; }

/* ---------- Portfolio pages (backed + project) ---------- */
.portfolio-wrap { max-width: 760px; margin: 2rem auto; padding: 0 1rem 4rem; }
.pfolio-head { margin-bottom: 2rem; }
.pfolio-hero { display: flex; gap: 1.25rem; align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.25rem; }
.pfolio-hero-info { flex: 1; min-width: 0; }
.pfolio-title { font-size: 1.45rem; font-weight: 800; margin: 0 0 .2rem; line-height: 1.2; }
.pfolio-handle { font-size: .88rem; margin-bottom: .4rem; }
.pfolio-bio { font-size: .9rem; color: var(--text-2); margin-bottom: .6rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.pfolio-kpis { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
.pfolio-kpi { display: flex; flex-direction: column; align-items: center;
  background: var(--raised); border-radius: .75rem; padding: .5rem .9rem; min-width: 70px; }
.pfolio-kpi-num { font-size: 1.3rem; font-weight: 800;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; line-height: 1.1; }
.pfolio-kpi-lbl { font-size: .72rem; color: var(--muted); margin-top: .1rem; }

/* Share bar */
.share-bar { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .75rem; }
.share-btn { display: inline-flex; align-items: center; gap: .35rem; padding: .42rem .9rem;
  border-radius: 999px; font-size: .82rem; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  text-decoration: none; transition: filter .15s, transform .1s; white-space: nowrap; }
.share-btn:hover { filter: brightness(1.1); transform: translateY(-1px); color: var(--text); }
.share-li { background: #0a66c2; color: #fff !important; border-color: transparent; }
.share-wa { background: #25d366; color: #fff !important; border-color: transparent; }
.share-copy, .share-print { background: var(--raised); }

/* Deal / Project cards */
.pfolio-list { display: flex; flex-direction: column; gap: 1rem; }
.pfolio-card { background: var(--card); border: 1px solid var(--line); border-radius: 1.1rem;
  padding: 1.2rem 1.4rem; box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.pfolio-card-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .5rem; }
.pfolio-card-title { font-weight: 700; font-size: 1.05rem; margin-right: auto; }
.pfolio-domain-tag, .pfolio-stage-tag { font-size: .72rem; font-weight: 600; padding: .18rem .6rem;
  border-radius: 999px; background: var(--raised); color: var(--muted); text-transform: capitalize; }
.pfolio-card-meta { font-size: .85rem; color: var(--text-2); margin-bottom: .65rem; line-height: 1.6; }
.pfolio-link { color: var(--accent); text-decoration: none; }
.pfolio-link:hover { text-decoration: underline; }
.pfolio-share-proj { margin-left: auto; background: none; border: none; cursor: pointer;
  font-size: .85rem; color: var(--muted); padding: .15rem .35rem; border-radius: 6px;
  transition: color .15s, background .15s; }
.pfolio-share-proj:hover { color: var(--accent); background: var(--raised); }
.pfolio-progress-wrap { display: flex; align-items: center; gap: .75rem; margin-bottom: .65rem; }
.pfolio-progress { flex: 1; height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.pfolio-progress-bar { height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--a1), var(--a2)); }
.pfolio-progress-label { font-size: .78rem; white-space: nowrap; }
.pfolio-certs { display: flex; gap: .5rem; flex-wrap: wrap; }
.pfolio-cert-btn { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem;
  font-weight: 600; padding: .28rem .75rem; border-radius: 999px;
  background: rgba(16,185,129,.12); color: #059669; border: 1px solid rgba(16,185,129,.3);
  text-decoration: none; transition: background .15s; }
.pfolio-cert-btn:hover { background: rgba(16,185,129,.22); color: #059669; }
.pfolio-footer { text-align: center; font-size: .8rem; margin-top: 2rem; }

/* Profile page portfolio links */
.profile-pfolio-links { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.pfolio-pill { display: inline-block; font-size: .78rem; font-weight: 600; padding: .25rem .75rem;
  border-radius: 999px; background: var(--raised); border: 1px solid var(--line);
  color: var(--text-2); text-decoration: none; transition: background .15s, color .15s; }
.pfolio-pill:hover { background: var(--hover); color: var(--text); }

/* QR code on certificate */
.cert-qr-wrap { display: flex; justify-content: center; margin-bottom: .75rem; }
.cert-qr-wrap canvas, .cert-qr-wrap img { border: 4px solid #fff; border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); }

/* ---------- Portfolio: print / PDF export ---------- */
@media print {
  /* Hide all chrome */
  .sidenav, .app-navbar, .no-print, .flash-stack { display: none !important; }
  /* Kill the magic backdrop — fixed pseudo-elements that cover the page */
  .app-body::before, .app-body::after { display: none !important; }
  /* Reset layout so content fills the paper */
  html, body, .app-body { overflow: visible !important; height: auto !important;
    min-height: 0 !important; background: #fff !important; color: #000 !important; }
  .shell { display: block !important; min-height: 0 !important; }
  .app-main { margin-left: 0 !important; flex: none !important; display: block !important;
    padding: 0 !important; }
  /* Portfolio container */
  .portfolio-wrap { max-width: 100% !important; margin: 0 !important; padding: 1rem !important; }
  /* Force all text to black (dark-mode vars print as near-white otherwise) */
  .pfolio-title, .pfolio-handle, .pfolio-bio, .pfolio-card-title,
  .pfolio-card-meta, .pfolio-progress-label, .pfolio-footer,
  .pfolio-kpi-lbl, .pfolio-link, .pfolio-cert-btn { color: #000 !important; }
  /* Gradient text has -webkit-text-fill-color that overrides color — reset both */
  .grad-text, .pfolio-kpi-num {
    background: none !important;
    -webkit-text-fill-color: #000 !important;
    color: #000 !important;
  }
  /* Cards: opaque, no blur */
  .pfolio-card {
    break-inside: avoid;
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .pfolio-kpi { background: #f0f0f0 !important; }
  /* Progress bar visible on paper */
  .pfolio-progress { background: #e0e0e0 !important; }
  .pfolio-progress-bar { background: #555 !important; }
  /* Cert buttons */
  .pfolio-cert-btn { background: #eee !important; border-color: #ccc !important; color: #000 !important; }
}

/* ---------- Mentor management (project post page) ---------- */
.ms-mentors-box { margin-top:1rem; border:1px solid var(--line); border-radius:10px; padding:.7rem 1rem; }
.ms-mentors-box summary { cursor:pointer; font-weight:600; font-size:.9rem; }
.ms-mentors-list { margin:.6rem 0; display:flex; flex-direction:column; gap:.4rem; }
.ms-mentor-row { display:flex; align-items:center; gap:.6rem; font-size:.88rem; }
.ms-mentor-status { font-size:.75rem; width:18px; text-align:center; }
.ms-mentor-status.accepted { color:#22c55e; }
.ms-mentor-status.invited  { color:#f59e0b; }
.ms-mentor-status.declined { color:#ef4444; }
.ms-mentor-invite { display:flex; gap:.5rem; margin-top:.6rem; }
.ms-mentor-invite input { flex:1; font-size:.85rem; }
.deal-dispute-banner { display:flex; align-items:center; gap:.5rem; padding:.7rem 1rem; margin-bottom:1rem;
  background:#fef3c722; border:1px solid #f59e0b55; border-radius:10px; font-size:.88rem; flex-wrap:wrap; }
.ms-dispute-btn { background:transparent; border:1px solid #f59e0b; color:#f59e0b; border-radius:6px; padding:.2rem .7rem; font-size:.8rem; cursor:pointer; margin-top:.4rem; }
.ms-dispute-btn:hover { background:#f59e0b22; }
.ms-dispute-link { display:inline-block; margin-top:.4rem; font-size:.8rem; color:var(--accent); text-decoration:none; border:1px solid var(--accent); border-radius:6px; padding:.2rem .7rem; }
.ms-dispute-link:hover { background:var(--accent); color:#fff; }

/* ---------- Dispute thread page ---------- */
.dispute-wrap { max-width:700px; margin:1.5rem auto; padding:0 1rem 4rem; display:flex; flex-direction:column; gap:1.2rem; }
.dispute-header { display:flex; flex-direction:column; gap:.2rem; }
.dispute-status-badge { display:inline-block; font-size:.75rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase;
  padding:.25rem .7rem; border-radius:20px; width:fit-content; }
.dispute-status-badge.status-open    { background:#fef3c7; color:#92400e; }
.dispute-status-badge.status-voting  { background:#ede9fe; color:#4c1d95; }
.dispute-status-badge.status-resolved{ background:#dcfce7; color:#14532d; }
.dispute-proof-card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:1rem 1.2rem; }
.dispute-proof-label { font-size:.7rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:.4rem; }
.dispute-proof-img { max-width:100%; border-radius:8px; margin-top:.5rem; }
.dispute-sent-back { font-size:.82rem; color:#f59e0b; margin-top:.5rem; }
.dispute-section-label { font-size:.7rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:.5rem; }
.dispute-mentors { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:1rem 1.2rem; }
.dispute-mentor-row { display:flex; align-items:center; gap:.6rem; padding:.35rem 0; font-size:.88rem; }
.dispute-mentor-row + .dispute-mentor-row { border-top:1px solid var(--line); }
.dispute-vote-pill { margin-left:auto; font-size:.75rem; font-weight:600; padding:.2rem .6rem; border-radius:20px; white-space:nowrap; }
.dispute-vote-pill.vote-release  { background:#dcfce7; color:#14532d; }
.dispute-vote-pill.vote-partial  { background:#fef9c3; color:#713f12; }
.dispute-vote-pill.vote-refund   { background:#fee2e2; color:#7f1d1d; }
.dispute-vote-pill.vote-pending       { background:var(--surface); color:var(--muted); }
.dispute-vote-pill.vote-voted         { background:rgba(99,102,241,.12); color:var(--accent); }
.dispute-vote-pill.vote-panel-ruling  { background:#ede9fe; color:#4c1d95; }
.dispute-resolved-banner { padding:.9rem 1.1rem; border-radius:10px; font-weight:600; }
.dispute-resolved-banner.resolution-release { background:#dcfce7; color:#14532d; }
.dispute-resolved-banner.resolution-partial { background:#fef9c3; color:#713f12; }
.dispute-resolved-banner.resolution-refund  { background:#fee2e2; color:#7f1d1d; }
.dispute-vote-form { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:1rem 1.2rem; }
.dispute-vote-options { display:flex; flex-direction:column; gap:.5rem; }
.dispute-vote-opt { display:flex; align-items:flex-start; gap:.6rem; cursor:pointer; }
.dispute-vote-opt input[type=radio] { margin-top:.35rem; flex-shrink:0; }
.dispute-vote-card { display:flex; flex-direction:column; gap:.1rem; padding:.5rem .8rem; border:1px solid var(--line); border-radius:8px; flex:1; transition:border-color .2s; }
.dispute-vote-opt:has(input:checked) .dispute-vote-card { border-color:var(--accent); background:var(--accent)11; }
.dispute-vote-card b { font-size:.9rem; }
.dispute-vote-card small { color:var(--muted); font-size:.78rem; }
.dispute-partial-amount { margin-top:.6rem; }
.dispute-thread { background:var(--card); border:1px solid var(--line); border-radius:10px; overflow:hidden; }
.dispute-messages { max-height:420px; overflow-y:auto; padding:1rem; display:flex; flex-direction:column; gap:.8rem; }
.dispute-msg { display:flex; gap:.6rem; align-items:flex-start; }
.dispute-msg.mine { flex-direction:row-reverse; }
.dispute-msg-body { background:var(--surface); border-radius:10px; padding:.5rem .8rem; max-width:80%; }
.dispute-msg.mine .dispute-msg-body { background:var(--accent)22; }
.dispute-msg-author { font-weight:600; font-size:.8rem; }
.dispute-msg-time { font-size:.72rem; margin-left:.4rem; }
.dispute-msg-body p { margin:0; font-size:.88rem; margin-top:.2rem; }
.dispute-compose { display:flex; gap:.5rem; padding:.7rem 1rem; border-top:1px solid var(--line); }
.dispute-compose textarea { flex:1; resize:none; border:1px solid var(--line); border-radius:8px; padding:.4rem .7rem;
  background:var(--surface); color:var(--text); font-size:.88rem; }
.dispute-compose button { align-self:flex-end; }

/* compose: file attachment area */
.dispute-compose-inner { display:flex; flex-direction:column; flex:1; gap:.35rem; }
.dispute-compose-inner textarea { resize:none; border:1px solid var(--line); border-radius:8px; padding:.4rem .7rem;
  font-size:.9rem; background:var(--surface); color:inherit; width:100%; }
.dispute-compose-bar { display:flex; align-items:center; gap:.5rem; }
.dispute-attach-btn { font-size:1.1rem; cursor:pointer; padding:.15rem .4rem; border-radius:6px;
  border:1px solid var(--line); background:var(--surface); line-height:1; user-select:none; }
.dispute-attach-btn:hover { background:var(--accent)22; }
.dispute-attach-label { font-size:.78rem; flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }

/* panel ruling note */
.dispute-panel-note-wrap { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:1rem 1.2rem; }
.dispute-panel-note-text { font-size:.9rem; white-space:pre-wrap; word-break:break-word; min-height:1.4rem; }
.dispute-panel-note-form { display:flex; flex-direction:column; gap:.4rem; margin-top:.6rem; }
.dispute-panel-note-input { width:100%; resize:none; border:1px solid var(--line); border-radius:8px;
  padding:.4rem .7rem; font-size:.88rem; background:var(--surface); color:inherit; }

/* mentor vote reasoning */
.dispute-vote-note { font-size:.74rem; max-width:170px; text-align:right; word-break:break-word; }

/* attachments inside messages */
.dispute-attach-img { max-width:100%; border-radius:8px; margin-top:.35rem; display:block; max-height:300px; object-fit:contain; }
.dispute-attach-file { display:inline-flex; align-items:center; gap:.35rem; margin-top:.35rem; font-size:.82rem;
  padding:.25rem .6rem; border:1px solid var(--line); border-radius:6px; background:var(--surface);
  color:var(--accent); text-decoration:none; }
.dispute-attach-file:hover { background:var(--accent)22; }

/* pending page: second link */
.pending-certs-link { display:flex; flex-direction:column; gap:.4rem; margin-top:2rem; padding-top:1.2rem;
  border-top:1px solid var(--line); }
.pending-certs-link a { color:var(--muted); text-decoration:none; font-size:.88rem; }
.pending-certs-link a:hover { color:var(--accent); }

/* ---------- Deal ratings: form ---------- */
.rate-wrap { max-width: 480px; margin: 2.5rem auto; padding: 0 1rem 3rem; }
.rate-card { background: var(--card); border: 1px solid var(--line); border-radius: 1.4rem;
  padding: 2rem 2rem 1.75rem; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.rate-head { text-align: center; margin-bottom: .25rem; }
.rate-head h3 { margin: .8rem 0 .3rem; font-size: 1.25rem; font-weight: 700; }
.rate-name { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; }
.rate-sub { font-size: .88rem; }
.rate-divider { height: 1px; background: var(--line); margin: 1.4rem 0; }

.rate-categories { display: flex; flex-direction: column; gap: .75rem; margin-bottom: 1.4rem; }
.rate-cat { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1rem; background: var(--raised); border-radius: .9rem;
  transition: background .15s; }
.rate-cat:hover { background: var(--hover); }
.rate-cat-label { flex: 1; min-width: 0; }
.rate-cat-name { display: block; font-weight: 600; font-size: .95rem; }
.rate-cat-desc { display: block; font-size: .77rem; }

.star-picker { display: flex; gap: .15rem; flex-shrink: 0; }
.star { background: none; border: none; cursor: pointer; padding: 2px 1px; font-size: 1.7rem;
  color: var(--line); transition: color .12s, transform .1s; line-height: 1; user-select: none; }
.star:hover, .star.on { color: #f59e0b; }
.star:hover { transform: scale(1.2); }

.rate-comment-wrap { margin-bottom: 1.25rem; }
.rate-comment-label { display: block; font-size: .84rem; color: var(--muted); margin-bottom: .4rem; }
.rate-comment { width: 100%; background: var(--input); border: 1px solid var(--line);
  border-radius: .8rem; padding: .65rem .9rem; color: var(--text); resize: vertical;
  font-size: .93rem; min-height: 80px; font-family: inherit; transition: border-color .15s; }
.rate-comment:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124,58,237,.12); }

.btn-full { width: 100%; }
.rate-submit:disabled { opacity: .45; cursor: not-allowed; }
.rate-footer-note { text-align: center; font-size: .78rem; margin-top: .9rem; }

/* ---------- Deal ratings: profile widget ---------- */
.rating-widget { background: var(--card); border: 1px solid var(--line); border-radius: 1.2rem;
  padding: 1.4rem 1.6rem; box-shadow: var(--shadow); backdrop-filter: blur(12px); margin-bottom: 1.25rem; }
.rating-top { display: flex; align-items: flex-start; gap: 1.5rem; flex-wrap: wrap; }
.rating-left { display: flex; flex-direction: column; align-items: center; min-width: 90px; }
.rating-score { display: flex; align-items: baseline; gap: .18rem; }
.rating-score-num { font-size: 2.6rem; font-weight: 800; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; }
.rating-score-denom { font-size: 1.1rem; font-weight: 600; color: var(--muted); }
.rating-count { font-size: .78rem; color: var(--muted); margin-top: .15rem; white-space: nowrap; }
.rating-bars { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: .55rem; justify-content: center; }
.rating-bar-row { display: flex; align-items: center; gap: .65rem; }
.rating-bar-label { font-size: .8rem; color: var(--text-2); width: 108px; flex-shrink: 0; }
.rating-bar-track { flex: 1; height: 7px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.rating-bar-fill { height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--a1), var(--a2)); }
.rating-bar-val { font-size: .78rem; color: var(--muted); width: 26px; text-align: right; flex-shrink: 0; }
.rating-comments { margin-top: 1.1rem; display: flex; flex-direction: column; gap: .55rem; }
.rating-comment { padding: .65rem .9rem; background: var(--raised); border-radius: .75rem;
  border-left: 3px solid var(--a1); }
.rating-comment-text { font-size: .88rem; font-style: italic; color: var(--text-2); margin-bottom: .28rem; }
.rating-comment-by { font-size: .75rem; color: var(--muted); }
.rating-comment-by a { color: var(--accent); text-decoration: none; }
.rating-comment-by a:hover { text-decoration: underline; }

/* ---------- Certificates: mine list ---------- */
.cert-mine-wrap { max-width: 660px; margin: 2rem auto; padding: 0 1rem 4rem; }
.cert-mine-head { margin-bottom: 1.75rem; }
.cert-mine-head h2 { margin-bottom: .25rem; }
.cert-mine-list { display: flex; flex-direction: column; gap: .85rem; }
.cert-mine-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem;
  border-radius: 1rem; background: var(--card); border: 1px solid var(--line);
  box-shadow: var(--shadow); backdrop-filter: blur(10px); flex-wrap: wrap; }
.cert-mine-final { border-left: 3px solid #10b981; }
.cert-mine-pending { border-left: 3px solid var(--accent); }
.cert-mine-status { flex-shrink: 0; }
.cert-mine-info { flex: 1; min-width: 0; }
.cert-mine-title { font-weight: 700; font-size: 1rem; margin-bottom: .2rem; }
.cert-mine-sub { font-size: .82rem; color: var(--text-2); line-height: 1.5; }
.cert-mine-code { font-size: .75rem; font-family: monospace; letter-spacing: .08em; margin-top: .3rem; }
.cert-mine-actions { flex-shrink: 0; }
.badge-pill { display: inline-block; padding: .28rem .75rem; border-radius: 999px;
  font-size: .75rem; font-weight: 600; }
.badge-green  { background: rgba(16,185,129,.15); color: #059669; }
.badge-amber  { background: rgba(245,158,11,.15);  color: #d97706; }
.badge-red    { background: rgba(239,68,68,.12);   color: #dc2626; }
/* .pending-certs-link moved to dispute styles block above */

/* ---------- Certificates ---------- */
.cert-wrapper { max-width: 760px; margin: 2rem auto; padding: 0 1rem 3rem; }
.cert-sheet { background: #fff; color: #111; border: 2px solid #c8a84b; border-radius: 4px;
  padding: 3rem 3.5rem; position: relative; box-shadow: 0 4px 32px rgba(0,0,0,.12); }
.cert-sheet::before { content: ''; position: absolute; inset: 10px; border: 1px solid #e8d48a;
  border-radius: 2px; pointer-events: none; }
.cert-letterhead { text-align: center; margin-bottom: .5rem; }
.cert-logo { font-size: 1.6rem; font-weight: 800; letter-spacing: .04em; color: #1a1a1a; }
.cert-logo-sub { font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: #666; margin-top: .1rem; }
.cert-rule { border: none; border-top: 1px solid #c8a84b; margin: 1.4rem 0; }
.cert-title-block { text-align: center; }
.cert-eyebrow { font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: #777; margin: .9rem 0 .2rem; }
.cert-eyebrow:first-child { margin-top: 0; }
.cert-sponsor-name { font-size: 1.9rem; font-weight: 700; letter-spacing: .01em; color: #111; }
.cert-amount { font-size: 2.2rem; font-weight: 800; color: #1a6b3c; }
.cert-milestone { font-size: 1.15rem; font-weight: 600; font-style: italic; color: #333; }
.cert-project { font-size: 1.1rem; font-weight: 600; color: #333; }
.cert-owner-name { font-size: 1.3rem; font-weight: 600; color: #111; margin-bottom: .4rem; }
.cert-sigs { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; }
.cert-sig-block { flex: 1; text-align: center; }
.cert-sig-name { font-size: 1.1rem; font-style: italic; font-weight: 600; color: #1a3a6b; min-height: 1.8rem; }
.cert-sig-line { border-bottom: 1px solid #555; margin: .3rem 0; }
.cert-sig-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: #555; }
.cert-sig-date { font-size: .72rem; color: #888; margin-top: .2rem; }
.cert-sig-seal { font-size: 2.4rem; text-align: center; padding-bottom: .4rem; }
.cert-pending-notice { text-align: center; color: #888; font-size: .9rem; padding: .5rem 0; }
.cert-verify { text-align: center; }
.cert-verify-label { font-size: .7rem; letter-spacing: .15em; text-transform: uppercase; color: #999; margin-bottom: .2rem; }
.cert-verify-code { font-size: 1.1rem; font-weight: 700; letter-spacing: .15em; font-family: monospace; color: #333; }
.cert-verify-url { font-size: .72rem; color: #aaa; margin-top: .2rem; word-break: break-all; }
.cert-actions { display: flex; gap: .75rem; justify-content: center; margin-top: 1.25rem; }
@media print {
  .sidenav, .app-main > *:not(.cert-wrapper), .cert-actions, .navbar { display: none !important; }
  .cert-wrapper { margin: 0; padding: 0; max-width: 100%; }
  .cert-sheet { box-shadow: none; border-color: #999; }
  body { background: #fff !important; }
}

/* ---------- first-login welcome ---------- */
.welcome-page { background: var(--bg); }
.welcome-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.welcome-card { width: 100%; max-width: 620px; padding: 26px 28px 30px; border-radius: 1.6rem; background: var(--card-solid);
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); color: var(--text); }
.welcome-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.welcome-brand { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.welcome-skip { border: 0; background: none; color: var(--muted); font-size: .9rem; cursor: pointer; padding: 4px 8px; border-radius: 999px; }
.welcome-skip:hover { background: var(--hover); color: var(--text); }
.welcome-title { font-size: 1.45rem; font-weight: 800; margin-bottom: 6px; }
.welcome-intents { display: grid; gap: 12px; margin-top: 18px; }
.welcome-intent { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; align-items: center; text-align: left; padding: 14px 16px;
  border: 2px solid var(--line); border-radius: 1.1rem; background: var(--input); color: var(--text); cursor: pointer;
  transition: border-color .2s, transform .2s, box-shadow .2s; }
.welcome-intent i { grid-row: span 2; font-style: normal; font-size: 1.7rem; text-align: center; }
.welcome-intent small { color: var(--muted); }
.welcome-intent:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(124, 58, 237, .18); }
.welcome-progress { height: 6px; border-radius: 999px; background: var(--hover); overflow: hidden; margin: 14px 0; }
.welcome-progress span { display: block; height: 100%; width: 0; background: var(--grad); transition: width .3s; }
.taste-card { border: 1px solid var(--line); border-radius: 1.2rem; overflow: hidden; background: var(--raised); }
.taste-card.taste-in { animation: taste-in .28s ease; }
@keyframes taste-in { from { opacity: 0; transform: translateX(18px); } to { opacity: 1; transform: none; } }
.taste-img { height: 190px; background-size: cover; background-position: center; }
.taste-img[hidden] { display: none; }
.taste-body { padding: 16px 18px; }
.taste-body h4 { margin: 8px 0 6px; font-weight: 700; }
.taste-body p { margin-bottom: 8px; color: var(--text-2); }
.taste-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.taste-buttons { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.welcome-fields { margin-top: 16px; }
[data-calm="1"] .taste-card.taste-in { animation: none; }
.post-city { white-space: nowrap; }

/* ---------- Company pages ---------- */
/* A company's logo is a rounded square, so it never reads as a person (people are round). */
.co-logo { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; overflow: hidden; width: 44px; height: 44px; border-radius: 28%; color: #fff !important; font-weight: 800; text-decoration: none; background: var(--grad-d); }
.co-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.co-logo.xs { width: 20px; height: 20px; font-size: .65rem; vertical-align: -4px; }
.co-logo.sm { width: 32px; height: 32px; font-size: .85rem; }
.co-logo.xl { width: 140px; height: 140px; font-size: 3.2rem; }
.story-ring.co-ring { border-radius: 2.4rem; }
.co-ring .co-logo { border: 5px solid var(--card-solid); box-sizing: content-box; border-radius: 2rem; }
.co-tag { display: inline-block; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; background: var(--raised); color: var(--accent); vertical-align: middle; }
[data-theme="dark"] .co-tag { color: #c4b5fd; }
.co-tag.fund { background: rgba(16, 185, 129, .16); color: #059669; }
.co-tag.wait { background: rgba(245, 158, 11, .18); color: #b45309; }
[data-theme="dark"] .co-tag.fund { color: #6ee7b7; }
[data-theme="dark"] .co-tag.wait { color: #fcd34d; }
.co-team { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.co-person { display: flex; align-items: center; gap: 10px; padding: 10px 16px 10px 10px; border-radius: 999px; text-decoration: none; color: var(--text); transition: transform .2s, box-shadow .2s; }
.co-person:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--text); }
.co-person span { display: flex; flex-direction: column; line-height: 1.2; }
.co-person small { color: var(--muted); }
.co-invite-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 20px; margin-bottom: 18px; border-radius: 1.25rem; }
.co-invite-banner span { flex: 1; min-width: 220px; }
.co-invite-banner form { margin: 0; }
.co-card { padding: 22px; border-radius: 1.5rem; }
.co-logo-pick { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.co-logo-pick .co-logo.xl { width: 96px; height: 96px; font-size: 2.2rem; }
.co-member-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.co-member-form .form-control { max-width: 220px; }
.co-tick { display: inline-flex; align-items: center; gap: 6px; font-size: .85rem; cursor: pointer; margin: 0; white-space: nowrap; }
/* "for Tata Trusts": the company an offer was made for, wherever a sponsor's name is shown. */
.co-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--text); padding: 1px 10px 1px 3px; border-radius: 999px; background: var(--raised); vertical-align: middle; }
.co-chip:hover { color: var(--accent); }
.co-signer { color: var(--muted); font-size: .85rem; }
.co-dir-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-top: 8px; border-radius: 1rem; background: var(--raised); border: 1px solid var(--line); }
.co-dir-mark { font-size: 1.5rem; line-height: 1; }
.co-listed { display: inline-block; margin-top: 10px; font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: rgba(14, 165, 233, .14); color: #0284c7; }
[data-theme="dark"] .co-listed { color: #7dd3fc; }
.co-star { font-weight: 700; color: var(--text); white-space: nowrap; }
.match-card-head h6 a { color: inherit; text-decoration: none; }
.match-card-head h6 a:hover { color: var(--accent); }
@media (max-width: 720px) { .co-ring .co-logo.xl { width: 90px; height: 90px; font-size: 2rem; } }

/* ======================================================================================================
   The portal: a post's card glides left, a half circle glides in from the right, pills sit on its curve.
   Everything animated here uses @keyframes, so Calm mode (which switches animations off) shows it all
   at rest, and so does "reduce motion". Colours come from the theme and accent tokens.
   ====================================================================================================== */
.portal-stage { --R: 500px; --W: 372px; position: fixed; inset: 0 0 0 264px; z-index: 50; display: flex; align-items: center; overflow: hidden;
  background: color-mix(in srgb, var(--card-solid) 55%, transparent); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
@media (max-height: 800px) { .portal-stage { --R: 440px; --W: 336px; } }
.portal-stage.entering { animation: portal-fade .35s both; }
.portal-stage.leaving { animation: portal-fade .38s reverse both; pointer-events: none; }
@keyframes portal-fade { from { opacity: 0; } to { opacity: 1; } }

.portal-cardwrap { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 20px 24px 40px; }
.portal-cardwrap .post { width: min(440px, 100%); margin: 0; }
.portal-cardwrap .post:hover { transform: none; }
.portal-cardwrap .post-media img, .portal-cardwrap .post-media video { max-height: 52vh; }
.portal-cardwrap .text-card { aspect-ratio: auto; height: min(440px, 46vh); }
.portal-ghost { visibility: hidden; }

.portal-slot { flex: 0 0 calc(var(--R) + 208px); align-self: stretch; position: relative; }
.portal { position: absolute; inset: 0; }

/* the half circle: a full circle centred on the right edge of the screen, so only its left half shows */
.portal-disc { position: absolute; right: calc(var(--R) * -1); top: 50%; width: calc(var(--R) * 2); height: calc(var(--R) * 2); margin-top: calc(var(--R) * -1);
  border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 0% 50%, color-mix(in srgb, var(--a1) 14%, var(--card-solid)), var(--card-solid) 62%);
  border: 1.5px solid var(--line); box-shadow: var(--shadow-lg), 0 0 70px color-mix(in srgb, var(--a1) 32%, transparent); }
.portal-disc::before { content: ""; position: absolute; inset: 0; border-radius: 50%; padding: 3px; pointer-events: none; opacity: .9;
  background: conic-gradient(from var(--angle), var(--a1), var(--a2), var(--a3), #38bdf8, var(--a1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-border 9s linear infinite; }
.portal-disc i { position: absolute; width: 150px; height: 150px; border-radius: 50%; opacity: .22; filter: blur(6px); pointer-events: none;
  background: radial-gradient(circle, var(--a2), transparent 70%); animation: portal-drift 11s ease-in-out infinite; }
.portal-disc i:nth-child(1) { left: 9%; top: 18%; }
.portal-disc i:nth-child(2) { left: 22%; top: 66%; background: radial-gradient(circle, var(--a1), transparent 70%); animation-duration: 14s; animation-delay: -4s; }
.portal-disc i:nth-child(3) { left: 4%; top: 44%; width: 90px; height: 90px; background: radial-gradient(circle, var(--a3), transparent 70%); animation-duration: 9s; animation-delay: -2s; }
@keyframes portal-drift { 0%, 100% { translate: 0 0; } 50% { translate: 22px -26px; } }
.portal-stage.entering .portal-disc { animation: disc-in .65s cubic-bezier(.2, .8, .2, 1) both; }
.portal-stage.leaving .portal-disc { animation: disc-in .38s ease-in reverse both; }
@keyframes disc-in { from { transform: translateX(62%); opacity: 0; } to { transform: none; opacity: 1; } }

/* what shows inside it */
.portal-body { position: absolute; right: 0; top: 50%; width: var(--W); height: min(640px, calc(100vh - 140px)); transform: translateY(-50%);
  display: flex; flex-direction: column; padding-right: 18px; }
.portal-stage.entering .portal-body { animation: body-in .55s .18s cubic-bezier(.2, .8, .2, 1) both; }
.portal-stage.leaving .portal-body { animation: body-in .25s reverse both; }
@keyframes body-in { from { opacity: 0; translate: 60px 0; } to { opacity: 1; translate: 0 0; } }
.portal-head { display: flex; align-items: center; gap: 10px; padding: 2px 0 10px; border-bottom: 1px solid var(--line); }
.portal-who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.portal-view-name { color: var(--muted); font-size: .78rem; }
.portal-back { display: none; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: var(--raised); color: var(--text); font-weight: 800; cursor: pointer; transition: transform .15s; }
.portal-back:hover { transform: translateX(-3px); }
.portal:not([data-view="details"]) .portal-back { display: inline-flex; }
.portal-x { margin-left: auto; }
.portal-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; padding: 10px 6px 10px 0; scrollbar-width: thin; }
.portal .upd-form input[type=file] { width: 100%; min-width: 0; font-size: .8rem; }
.portal .upd-form .d-flex { flex-wrap: wrap; }
.portal .ms-form input, .portal .ms-vote input { min-width: 0; width: 100%; }
.portal-foot { border-top: 1px solid var(--line); padding-top: 6px; }
.portal-foot .comment-form { margin-top: 4px; }
.portal .proj-h:first-child { margin-top: 4px; }
.portal-offer { display: flex; align-items: center; gap: 10px; padding: 8px 10px; margin-bottom: 6px; border-radius: .8rem; background: var(--hover); }
.portal .sponsor-form .btn { border-radius: 999px; }

/* one view at a time: "details" is the old post page (details, milestones, updates, comments in one scroll) */
.portal [data-sec="sponsor"], .portal [data-sec="offers"], .portal [data-sec="mentors"] { display: none; }
.portal[data-view="sponsor"] [data-sec]:not([data-sec="sponsor"]),
.portal[data-view="comments"] [data-sec]:not([data-sec="comments"]),
.portal[data-view="milestones"] [data-sec]:not([data-sec="milestones"]),
.portal[data-view="updates"] [data-sec]:not([data-sec="updates"]),
.portal[data-view="offers"] [data-sec]:not([data-sec="offers"]),
.portal[data-view="mentors"] [data-sec]:not([data-sec="mentors"]) { display: none; }
.portal[data-view="sponsor"] [data-sec="sponsor"], .portal[data-view="offers"] [data-sec="offers"], .portal[data-view="mentors"] [data-sec="mentors"] { display: block; }
.portal:not([data-view="details"]):not([data-view="comments"]) .portal-foot { display: none; }

/* the pills along the curve (their place is set by portal.js) */
.portal-pills > * { position: absolute; top: calc(50% + var(--y, 0px) - 19px); right: var(--x, 514px); margin: 0; z-index: 2;
  animation: portal-bob 6s ease-in-out calc(.9s + var(--i, 0) * .35s) infinite; }
.portal-stage.entering .portal-pills > * { animation: pill-in .55s cubic-bezier(.2, .8, .2, 1) calc(.3s + var(--i, 0) * .06s) both,
  portal-bob 6s ease-in-out calc(1.2s + var(--i, 0) * .35s) infinite; }
.portal-stage.leaving .portal-pills > * { animation: pill-in .25s ease-in reverse both; }
@keyframes portal-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -5px; } }
@keyframes pill-in { from { opacity: 0; transform: translateX(90px) scale(.9); } to { opacity: 1; transform: none; } }
.portal-pill { display: inline-flex; align-items: center; gap: 8px; width: 208px; height: 38px; padding: 0 12px 0 10px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--card-solid); color: var(--text); font-weight: 700; font-size: .84rem; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s, border-color .2s, background .2s, box-shadow .2s; }
.portal-pill i { font-style: normal; width: 22px; text-align: center; flex-shrink: 0; }
.portal-pill:hover { transform: translateX(-5px); border-color: var(--a1); color: var(--text); }
/* "hot" = needs your attention (a counter-offer waiting): a glowing edge, not a filled pill */
.portal-pill.hot { border-color: var(--a2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a2) 24%, transparent), var(--shadow); }
.portal-pill.on { background: color-mix(in srgb, var(--a1) 22%, var(--card-solid)); border-color: var(--a1); }
.portal-pill.off { opacity: .65; cursor: default; }
.portal-pill.off:hover { transform: none; border-color: var(--line); }
/* the pill for the view you are on is filled with the accent gradient; all the others stay plain */
.portal[data-view="sponsor"] .portal-pill[data-view="sponsor"], .portal[data-view="comments"] .portal-pill[data-view="comments"],
.portal[data-view="milestones"] .portal-pill[data-view="milestones"], .portal[data-view="updates"] .portal-pill[data-view="updates"],
.portal[data-view="offers"] .portal-pill[data-view="offers"], .portal[data-view="mentors"] .portal-pill[data-view="mentors"] {
  background: var(--grad); color: #fff !important; border-color: transparent; box-shadow: 0 .4rem 1rem rgba(219, 39, 119, .35); }

/* the add-milestone form inside the portal: one labelled field per row, with a hint under it */
.portal .ms-form-tall { flex-direction: column; flex-wrap: nowrap; gap: 14px; }
.portal .ms-field { display: flex; flex-direction: column; gap: 4px; width: 100%; margin: 0; }
.portal .ms-field > span { font-weight: 700; font-size: .86rem; }
.portal .ms-field input { height: 42px; padding: 8px 12px; }
.portal .ms-field small { font-size: .76rem; line-height: 1.3; }
.portal .ms-add-block { padding: 14px; }
.portal .ms-vote { flex-wrap: wrap; }
.portal .ms-vote button { flex: 1 1 auto; }
.portal .ms-vote-tall { flex-direction: column; flex-wrap: nowrap; gap: 12px; margin-top: 10px; }
.portal .ms-field textarea { width: 100%; min-height: 88px; padding: 10px 12px; border-radius: .7rem; border: 1px solid var(--line); background: var(--input); color: var(--text); resize: vertical; font: inherit; }
.portal .ms-vote-actions { display: flex; flex-direction: column; gap: 8px; }
.portal .ms-vote-actions button { width: 100%; padding: 10px 14px; font-size: .88rem; }
.portal .ms-dispute-btn { width: 100%; margin-top: 8px; padding: 8px 12px; font-size: .85rem; }

/* ======================================================================================================
   PLAIN look (Plain light / Plain dark). Calmer and flat: solid colours, one blue accent, no gradients,
   glow, shimmer or floating colours, smaller corners. It is an extra layer on top of the normal light or
   dark rules (<html data-theme="light|dark" data-look="plain">), and every rule below starts with
   [data-look="plain"], so the coloured Light and Dark looks are not touched by any of it.
   ====================================================================================================== */
[data-look="plain"][data-theme="light"] {
  --bg: #f3f5f7; --card: #ffffff; --card-solid: #ffffff; --line: #dde2e8; --text: #1a1f26; --text-2: #3b4452; --muted: #66717e;
  --hover: #eef1f5; --raised: #e6ebf0; --input: #ffffff; --nav: #ffffff; --dust: 0; --rail: #1f2933;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08); --shadow-lg: 0 6px 18px rgba(16, 24, 40, .14);
}
[data-look="plain"][data-theme="dark"] {
  --bg: #111418; --card: #1a1e24; --card-solid: #1a1e24; --line: #2c333c; --text: #e8ebef; --text-2: #c3cad3; --muted: #8b96a3;
  --hover: #242a32; --raised: #2b323b; --input: #12161a; --nav: #161a1f; --dust: 0; --rail: #14181c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 8px 22px rgba(0, 0, 0, .55);
}
/* one calm blue (the other accents stay available, as flat colours) */
[data-look="plain"][data-theme="light"][data-accent="aurora"] { --a1: #2563eb; --a2: #2563eb; --a3: #2563eb; }
[data-look="plain"][data-theme="dark"][data-accent="aurora"] { --a1: #4f8df7; --a2: #4f8df7; --a3: #4f8df7; }
[data-look="plain"][data-accent="ocean"], [data-look="plain"][data-accent="sunset"], [data-look="plain"][data-accent="forest"] { --a2: var(--a1); --a3: var(--a1); }
[data-look="plain"] .app-body { --grad: var(--a1); --grad-d: var(--a1); --pink: #e0245e; --orange: #d97706; }

/* nothing moves, glows or shimmers */
[data-look="plain"] *, [data-look="plain"] *::before, [data-look="plain"] *::after { animation: none !important; }
[data-look="plain"] .app-body::before, [data-look="plain"] .app-body::after { display: none; }
[data-look="plain"] .post, [data-look="plain"] .glass, [data-look="plain"] .sidenav { backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-look="plain"] .post:hover { transform: none; box-shadow: var(--shadow-lg); }
[data-look="plain"] .post:hover::before { background: var(--a1); }
[data-look="plain"] .story-ring::before { background: var(--line); }
[data-look="plain"] .empty-ring { background: var(--raised); }
[data-look="plain"] .avatar-x { box-shadow: none; }
[data-look="plain"] .sn-logo-mark, [data-look="plain"] .like-btn.liked { filter: none; }
[data-look="plain"] .app-body .btn-primary, [data-look="plain"] .btn-sponsor, [data-look="plain"] .sn-link.active,
[data-look="plain"] .portal-pill.hot { box-shadow: none; }
[data-look="plain"] .btn-sponsor:hover, [data-look="plain"] .app-body .btn-primary:hover { transform: none; box-shadow: none; filter: brightness(1.08); }

/* text that was a colour-shifting gradient becomes plain text */
[data-look="plain"] .shimmer-text, [data-look="plain"] .page-title, [data-look="plain"] .profile-line h2, [data-look="plain"] .srv-home h2 {
  background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--text); }
[data-look="plain"] .sn-brand { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--text); }

/* post cards without a picture: a quiet panel instead of a coloured gradient */
[data-look="plain"] .text-card[class*="grad-"] { background: var(--raised); color: var(--text); }
[data-look="plain"] .text-card h3 { text-shadow: none; }
[data-look="plain"] .fund-bar i { background: var(--a1); box-shadow: none; }
[data-look="plain"] .grid-hover { background: rgba(17, 20, 24, .55); }
[data-look="plain"] .srv-btn.danger { background: #dc2626; }
[data-look="plain"] .dc-opt-icon { background: var(--a1); }
[data-look="plain"] .voice-card { background: var(--raised); }
[data-look="plain"] .poll-fill { background: color-mix(in srgb, var(--a1) 28%, transparent); }
[data-look="plain"] .dc-mini i { background: var(--a1); }
[data-look="plain"] .seg input[value=accept]:checked + span { background: #16a34a; }

/* smaller corners: buttons, big surfaces and the portal pills stop being pills and bubbles */
[data-look="plain"] .app-body .btn-primary, [data-look="plain"] .app-body .btn-secondary, [data-look="plain"] .app-body .btn-outline-secondary,
[data-look="plain"] .btn-sponsor, [data-look="plain"] .sn-link, [data-look="plain"] .portal-pill, [data-look="plain"] .offer-state,
[data-look="plain"] .proj-chip { border-radius: 10px; }
[data-look="plain"] .post, [data-look="plain"] .glass, [data-look="plain"] .co-card, [data-look="plain"] .row-card, [data-look="plain"] .create-card,
[data-look="plain"] dialog.modal-card, [data-look="plain"] .match-card, [data-look="plain"] .kind-box, [data-look="plain"] .choice-card { border-radius: 12px; }
[data-look="plain"] .sidenav { border-radius: 16px; }
[data-look="plain"] .post-media { border-radius: 8px; }

/* the portal: a flat half circle with a thin edge */
[data-look="plain"] .portal-stage { background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: none; -webkit-backdrop-filter: none; }
[data-look="plain"] .portal-disc { background: var(--card-solid); box-shadow: var(--shadow-lg); border: 1.5px solid var(--line); }
[data-look="plain"] .portal-disc::before { background: var(--line); }
[data-look="plain"] .portal-disc i { display: none; }

/* the previews in Settings -> Appearance */
.tp-plain-light { background: linear-gradient(90deg, #f3f5f7 70%, #2563eb 70%); }
.tp-plain-dark { background: linear-gradient(90deg, #111418 70%, #4f8df7 70%); }

/* plain: the pink and purple glows under buttons, tabs, chips and focus rings go (a thin blue edge stays where it helps) */
[data-look="plain"] .sn-create, [data-look="plain"] .settings-tab.active, [data-look="plain"] .ch.active, [data-look="plain"] .chip-link.on,
[data-look="plain"] .dm-log .msg.mine .msg-body, [data-look="plain"] .srv-btn, [data-look="plain"] .tour-next,
[data-look="plain"] .seg input:checked + span, [data-look="plain"] .proj-chip.on, [data-look="plain"] .offer-edit:hover,
[data-look="plain"] .who-btn, [data-look="plain"] .sn-badge, [data-look="plain"] .unread-dot { box-shadow: none; }
[data-look="plain"] .sn-create { border-radius: 10px; }
[data-look="plain"] .who, [data-look="plain"] .who.open { box-shadow: var(--shadow); }
[data-look="plain"] .choice input:checked + .choice-card { box-shadow: 0 0 0 2px color-mix(in srgb, var(--a1) 35%, transparent); }
[data-look="plain"] .app-body .form-control:focus, [data-look="plain"] .app-body .form-select:focus,
[data-look="plain"] .discord-page input:focus, [data-look="plain"] .discord-page select:focus { box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--a1) 25%, transparent); }
[data-look="plain"] .settings-tab, [data-look="plain"] .ch { border-radius: 10px; }

