/* Shared Pulse application palette for the public site and Pulse Web. */
:root {
  color-scheme: dark;
  --ink: #F3F6FC;
  --muted: #B5C2D4;
  --line: #344964;
  --surface: #101E32;
  --pulse-canvas: #0A1424;
  --pulse-raised: #1A2B43;
  --pulse-accent: #9BBFFE;
  --pulse-on-accent: #0B1728;
  --pulse-success: #55B895;
}

html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body {
  color: #F3F6FC;
  background:
    radial-gradient(900px 560px at 84% -12%, #1A2B43 0, transparent 66%),
    radial-gradient(700px 440px at -10% 44%, #13263D 0, transparent 65%),
    #0A1424;
}

html[data-theme="light"] {
  color-scheme: light;
  --ink: #222A36;
  --muted: #596373;
  --line: #DED8CD;
  --surface: #FFFCF7;
  --pulse-canvas: #F4F1EB;
  --pulse-raised: #F0EAE0;
  --pulse-accent: #426DA6;
  --pulse-on-accent: #FFFFFF;
}
html[data-theme="light"] body {
  color: #222A36;
  background:
    radial-gradient(900px 560px at 84% -12%, #E5EAF0 0, transparent 66%),
    radial-gradient(700px 440px at -10% 44%, #E9E7E0 0, transparent 65%),
    #F4F1EB;
}

.eyebrow,
.card .number,
.arrow,
.account-heading span,
.reset-mode .eyebrow { color: var(--pulse-accent) !important; }
.hero h1 span { background-image: linear-gradient(90deg, var(--ink), var(--pulse-accent) 72%); }
.button,
.auth-submit,
.account-save {
  color: var(--pulse-on-accent) !important;
  background: linear-gradient(135deg, var(--pulse-accent), var(--pulse-raised)) !important;
  box-shadow: 0 12px 28px rgba(66, 109, 166, .2) !important;
}
.button.secondary,
.account-secondary,
.nav-signup {
  color: var(--ink) !important;
  background: var(--pulse-raised) !important;
  border-color: var(--line) !important;
}
.mark {
  background: linear-gradient(145deg, var(--pulse-accent), var(--pulse-raised));
  box-shadow: 0 8px 24px rgba(66, 109, 166, .2);
}
.phone {
  border-color: var(--pulse-raised);
  background: linear-gradient(165deg, var(--pulse-raised), var(--pulse-canvas) 55%, var(--surface));
}
.phone:before { background: var(--pulse-raised); }
.feed-card { background: linear-gradient(145deg, #426DA6, #1A2B43 58%, #101E32); }
.policy,
.card,
.auth-card,
.account-panel,
.web-coming-soon,
.pulse-web-profile-card {
  color: var(--ink);
  background: linear-gradient(145deg, var(--surface), var(--pulse-canvas));
  border-color: var(--line);
}
.auth-field,
.account-panel label:not(.privacy-toggle) { color: var(--ink); }
.auth-tabs,
.auth-field input,
.account-panel input,
.account-panel textarea,
.delete-form input[type="password"] {
  color: var(--ink) !important;
  background: var(--pulse-canvas) !important;
  border-color: var(--line) !important;
}
.auth-tabs button.active { color: var(--ink) !important; background: var(--pulse-raised) !important; }
.auth-field input:focus,
.account-panel input:focus,
.account-panel textarea:focus {
  border-color: var(--pulse-accent) !important;
  box-shadow: 0 0 0 3px rgba(155, 191, 254, .2) !important;
}
.legal p,
.legal li,
.notice p { color: var(--muted); }
.theme-toggle {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  backdrop-filter: blur(14px);
}

/* Pulse Web profile: uses the same app palette without changing its data/actions. */
.pulse-web-profile { padding-top: clamp(48px, 9vh, 86px); }
.pulse-web-profile-card { padding: 0; overflow: hidden; border-radius: 30px; box-shadow: 0 24px 70px rgba(0, 0, 0, .2); }
.profile-cover {
  height: 128px;
  display: flex;
  align-items: flex-end;
  padding: 17px 26px;
  color: rgba(243, 246, 252, .78);
  background: linear-gradient(120deg, var(--pulse-raised), #263D5C 58%, var(--surface));
  font-weight: 850;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.profile-content { padding: 0 28px 28px; }
.profile-identity { display: flex; align-items: center; gap: 18px; margin-top: -42px; }
.pulse-web-avatar {
  width: 88px;
  height: 88px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 5px solid var(--surface);
  border-radius: 28px;
  color: var(--ink);
  background: var(--pulse-raised);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  font-size: 30px;
  font-weight: 850;
}
.pulse-web-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-title-block { min-width: 0; flex: 1; padding-top: 44px; }
.profile-title-block .eyebrow { margin: 0 0 3px; font-size: .64rem; }
.profile-title-block h1 {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.55rem, 4vw, 2.15rem);
  letter-spacing: -.055em;
}
.profile-verified {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  overflow: visible;
  transform: translateY(-4px);
}
.profile-verified .verified-mark-bg { fill:#1877F2; }
.profile-verified .verified-mark-check { fill:#FFFFFF; }
.pulse-web-handle { margin: 2px 0 0; color: var(--muted); }
.profile-privacy-badge {
  align-self: flex-start;
  margin: 51px 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--pulse-raised);
  font-size: .72rem;
  font-weight: 750;
  white-space: nowrap;
}
.pulse-web-bio { max-width: 720px; margin: 20px 0 0; color: var(--ink); line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.profile-empty-bio { color: var(--muted); }
.profile-private-notice { margin: 18px 0 0; padding: 12px 15px; border: 1px solid var(--line); border-radius: 16px; color: var(--muted); background: var(--pulse-raised); font-size: .88rem; }
.pulse-web-stats { gap: 12px; margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.pulse-web-stats div { padding: 15px; border-color: var(--line); border-radius: 18px; background: var(--pulse-raised); }
.pulse-web-stats strong { font-size: 1.35rem; letter-spacing: -.03em; }
.pulse-web-stats span { color: var(--muted); }
.pulse-web-profile-actions .button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }

html[data-theme="light"] .button.secondary,
html[data-theme="light"] .account-secondary,
html[data-theme="light"] .nav-signup { color: #222A36 !important; background: #F0EAE0 !important; border-color: #DED8CD !important; }
html[data-theme="light"] .feed-card { background: linear-gradient(145deg, #7895B6, #426DA6 58%, #6D849F); }
html[data-theme="light"] .phone { border-color: #DED8CD; background: linear-gradient(165deg, #FFFCF7, #F4F1EB 55%, #F0EAE0); }
html[data-theme="light"] .phone:before { background: #DED8CD; }
html[data-theme="light"] .policy,
html[data-theme="light"] .card,
html[data-theme="light"] .auth-card,
html[data-theme="light"] .account-panel,
html[data-theme="light"] .web-coming-soon,
html[data-theme="light"] .pulse-web-profile-card { background: linear-gradient(145deg, #FFFCF7, #F0EAE0); border-color: #DED8CD; }
html[data-theme="light"] .auth-tabs,
html[data-theme="light"] .auth-field input,
html[data-theme="light"] .account-panel input,
html[data-theme="light"] .account-panel textarea,
html[data-theme="light"] .delete-form input[type="password"] { color: #222A36 !important; background: #FFFCF7 !important; border-color: #DED8CD !important; }
html[data-theme="light"] .auth-tabs button.active { color: #222A36 !important; background: #F0EAE0 !important; }
html[data-theme="light"] .profile-cover { color: #344964; background: linear-gradient(120deg, #F0EAE0, #DCE5F0); }
html[data-theme="light"] .pulse-web-avatar { color: #222A36; background: #F0EAE0; border-color: #FFFCF7; }
html[data-theme="light"] .pulse-web-bio { color: #222A36; }
html[data-theme="light"] .pulse-web-stats div,
html[data-theme="light"] .profile-private-notice { background: #F0EAE0; border-color: #DED8CD; }
html[data-theme="light"] .theme-toggle { color: #222A36; background: #FFFCF7; border-color: #DED8CD; }

/* Bring older landing, auth, legal and feed components onto the shared palette. */
.text-action,
.password-toggle,
.legal a:not(.brand),
.contact-card>a:not(.button) { color: var(--pulse-accent) !important; }
.contact-card,
.post-menu-panel,
.pulse-web-modal section,
.web-post-card {
  color: var(--ink) !important;
  background: var(--surface) !important;
  border-color: var(--line) !important;
}
.web-comment-form input,
.web-report-form select,
.web-report-form textarea {
  color: var(--ink) !important;
  background: var(--pulse-canvas) !important;
  border-color: var(--line) !important;
}
.web-comment-form button,
.web-report-form button,
.auth-tabs button.active,
.nav-signup {
  color: var(--pulse-on-accent) !important;
  background: var(--pulse-accent) !important;
  border-color: var(--pulse-accent) !important;
}
.post-menu-panel button { color: var(--muted) !important; }
.post-actions button.liked { color: #D94D70 !important; }
.auth-field input::placeholder,
.account-panel input::placeholder,
.account-panel textarea::placeholder,
.web-comment-form input::placeholder { color: var(--muted) !important; opacity: .8; }
html[data-theme="light"] .contact-card,
html[data-theme="light"] .post-menu-panel,
html[data-theme="light"] .pulse-web-modal section,
html[data-theme="light"] .web-post-card { color: #222A36 !important; background: #FFFCF7 !important; border-color: #DED8CD !important; }
html[data-theme="light"] .text-action,
html[data-theme="light"] .password-toggle,
html[data-theme="light"] .legal a:not(.brand),
html[data-theme="light"] .contact-card>a:not(.button) { color: #426DA6 !important; }
html[data-theme="light"] .web-comment-form button,
html[data-theme="light"] .web-report-form button,
html[data-theme="light"] .auth-tabs button.active,
html[data-theme="light"] .nav-signup { color: #FFFFFF !important; background: #426DA6 !important; border-color: #426DA6 !important; }

@media (max-width: 600px) {
  .pulse-web-profile { padding-top: 38px; }
  .profile-cover { height: 104px; padding: 14px 19px; }
  .profile-content { padding: 0 19px 20px; }
  .profile-identity { gap: 12px; margin-top: -35px; }
  .pulse-web-avatar { width: 72px; height: 72px; border-radius: 23px; }
  .profile-title-block { padding-top: 39px; }
  .profile-privacy-badge { margin-top: 45px; padding: 6px 8px; font-size: .65rem; }
  .pulse-web-stats { gap: 8px; }
  .pulse-web-stats div { padding: 12px 9px; text-align: center; }
  .pulse-web-profile-actions { display: grid; grid-template-columns: 1fr; }
  .pulse-web-profile-actions .button { min-width: 0; }
}

/* Web profile wrapper mirrors the information hierarchy of the Android profile. */
.profile-page-heading { display:flex; justify-content:space-between; align-items:center; gap:18px; margin:0 0 20px; }
.profile-page-heading h1 { margin:0; color:var(--ink); font-size:clamp(1.75rem,4vw,2.35rem); letter-spacing:-.055em; }
.profile-page-heading .eyebrow,.profile-library-heading .eyebrow { margin:0 0 5px; font-size:.66rem; }
.profile-heading-actions { display:flex; align-items:center; gap:10px; }
.profile-wallet { display:flex; align-items:center; gap:10px; min-width:152px; padding:8px 12px; border:1px solid rgba(195,143,36,.28); border-radius:17px; color:#3D2800; background:linear-gradient(135deg,#FFD46D,#F6B935); box-shadow:0 8px 20px rgba(66,109,166,.12); }
.wallet-icon { display:grid; place-items:center; width:34px; height:34px; flex:0 0 auto; border-radius:50%; color:#5D3B00; background:rgba(190,132,23,.22); font-weight:900; }
.profile-wallet small,.profile-wallet strong { display:block; line-height:1.2; }
.profile-wallet small { color:#725214; font-size:.65rem; font-weight:750; }
.profile-wallet strong { font-size:.96rem; font-weight:900; }
.profile-wallet strong i { font-size:.63rem; font-style:normal; font-weight:700; }
.wallet-arrow { margin-left:auto; font-size:1.5rem; line-height:1; }
.profile-settings-link { display:grid; place-items:center; width:44px; height:44px; border:1px solid var(--line); border-radius:50%; color:var(--ink); background:var(--surface); font-size:1.1rem; box-shadow:0 6px 20px rgba(0,0,0,.08); }
.profile-content { padding:0 30px 26px; }
.profile-title-block h2 { display:flex; align-items:center; gap:7px; margin:0; overflow-wrap:anywhere; color:var(--ink); font-size:clamp(1.5rem,4vw,2.1rem); letter-spacing:-.05em; }
.profile-identity-badge { display:inline-flex; margin-top:7px; padding:4px 8px; border:1px solid var(--line); border-radius:8px; color:var(--pulse-accent); background:var(--pulse-raised); font-size:.57rem; font-weight:850; letter-spacing:.08em; }
.profile-inline-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; margin-top:19px; }
.profile-action { display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:44px; padding:0 17px; border:1px solid var(--line); border-radius:14px; color:var(--ink); background:var(--pulse-raised); font:inherit; font-size:.82rem; font-weight:800; cursor:pointer; transition:transform .16s ease,box-shadow .16s ease,background .16s ease; }
.profile-action:hover,.profile-settings-link:hover,.profile-wallet:hover { transform:translateY(-1px); }
.profile-action.primary { color:var(--pulse-on-accent); background:var(--pulse-accent); border-color:var(--pulse-accent); }
.profile-action.quiet { color:var(--ink); background:var(--surface); }
.profile-action:disabled { opacity:.65; cursor:wait; }
.online-pulse { display:inline-flex; align-items:center; gap:7px; min-height:39px; padding:5px 12px; border:1px solid rgba(53,200,109,.2); border-radius:13px; color:#176B3B; background:#E3F6E9; font-size:.73rem; font-weight:750; }
.online-pulse[hidden] { display:none; }
.online-pulse strong { color:#123421; font-size:.9rem; font-weight:900; }
.online-dot { width:7px; height:7px; border-radius:50%; background:#35C86D; box-shadow:0 0 0 4px rgba(53,200,109,.13); }
.pulse-web-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:22px 0 0; padding-top:17px; border-top:1px solid var(--line); }
.pulse-web-stats>div,.pulse-web-stats>button { min-width:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; padding:12px 7px; border:1px solid var(--line); border-radius:16px; color:var(--ink); background:var(--pulse-raised); font:inherit; text-align:center; }
.pulse-web-stats>button { cursor:pointer; }
.pulse-web-stats>button:disabled { cursor:default; opacity:.82; }
.pulse-web-stats>button:hover { border-color:var(--pulse-accent); }
.pulse-web-stats strong { color:var(--ink); font-size:1.18rem; font-weight:900; letter-spacing:-.03em; }
.pulse-web-stats span { color:var(--muted); font-size:.68rem; font-weight:700; }
.profile-library { margin:28px 0 0; }
.profile-library-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:12px; margin-bottom:14px; }
.profile-library-heading h2 { margin:0; color:var(--ink); font-size:1.35rem; font-weight:850; letter-spacing:-.04em; }
.profile-content-count { color:var(--muted); font-size:.77rem; font-weight:700; }
.profile-tab-row { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.profile-content-tabs,.profile-library-tabs { display:flex; align-items:center; gap:4px; padding:4px; border:1px solid var(--line); border-radius:15px; background:var(--surface); }
.profile-content-tabs button,.profile-library-tabs button { min-height:35px; padding:0 14px; border:0; border-radius:11px; color:var(--muted); background:transparent; font:inherit; font-size:.75rem; font-weight:800; cursor:pointer; }
.profile-content-tabs button.active { color:var(--pulse-on-accent); background:var(--pulse-accent); box-shadow:0 4px 12px rgba(66,109,166,.16); }
.profile-library-tabs button.active { color:var(--ink); background:var(--pulse-raised); box-shadow:inset 0 0 0 1px var(--line); }
.profile-library-tabs[hidden] { display:none; }
.profile-content-area { min-height:220px; }
.profile-media-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.profile-media-tile { position:relative; display:block; width:100%; min-width:0; aspect-ratio:.72; overflow:hidden; padding:0; border:1px solid var(--line); border-radius:17px; color:var(--ink); background:var(--pulse-raised); cursor:pointer; text-align:left; }
.profile-media-tile.photo-tile { aspect-ratio:1; }
.profile-media-tile img { display:block; width:100%; height:100%; object-fit:cover; transition:transform .22s ease; }
.profile-media-tile:hover img { transform:scale(1.035); }
.media-play { position:absolute; right:9px; bottom:9px; display:grid; place-items:center; width:29px; height:29px; border:1px solid rgba(255,255,255,.24); border-radius:50%; color:#fff; background:rgba(10,20,36,.72); backdrop-filter:blur(10px); font-size:.72rem; }
.video-placeholder { display:grid; place-items:center; width:100%; height:100%; color:var(--muted); background:linear-gradient(145deg,var(--pulse-raised),var(--pulse-canvas)); }
.media-caption { position:absolute; right:0; bottom:0; left:0; padding:32px 10px 9px; overflow:hidden; color:#fff; background:linear-gradient(transparent,rgba(5,9,16,.8)); font-size:.7rem; font-weight:700; text-overflow:ellipsis; white-space:nowrap; }
.profile-post-list { display:grid; gap:12px; max-width:760px; margin:0 auto; }
.profile-post-card { overflow:hidden; border:1px solid var(--line); border-radius:19px; color:var(--ink); background:var(--surface); box-shadow:0 8px 24px rgba(0,0,0,.06); }
.profile-post-image { display:block; width:100%; max-height:520px; object-fit:cover; background:var(--pulse-raised); }
.profile-post-copy { padding:15px 17px 17px; }
.post-author-line { display:flex; align-items:center; gap:9px; }
.post-author-line>span:last-child { display:grid; gap:2px; }
.post-author-line strong { color:var(--ink); font-size:.79rem; font-weight:850; }
.post-author-line small { color:var(--muted); font-size:.68rem; }
.post-avatar,.list-person-avatar { display:grid; place-items:center; width:36px; height:36px; overflow:hidden; flex:0 0 auto; border:1px solid var(--line); border-radius:50%; color:var(--ink); background:var(--pulse-raised); font-weight:850; }
.post-avatar img { width:100%; height:100%; object-fit:cover; }
.profile-post-copy>p { margin:13px 0 0; color:var(--ink); font-size:.9rem; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
.profile-post-reactions { display:flex; align-items:center; gap:7px; margin-top:14px; padding-top:11px; border-top:1px solid var(--line); }
.post-reaction-button,.post-comment-count,.post-more-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:37px; padding:0 12px; border:1px solid transparent; border-radius:11px; color:var(--muted); background:transparent; font:inherit; font-size:.78rem; font-weight:750; cursor:pointer; transition:color .16s ease,background .16s ease,transform .16s ease,border-color .16s ease; }
.post-reaction-button:hover,.post-comment-count:hover,.post-more-button:hover,.post-like-count:hover { color:var(--ink); background:var(--pulse-raised); }
.post-reaction-button:active,.post-comment-count:active,.post-more-button:active { transform:scale(.96); }
.post-reaction-button svg,.post-comment-count svg,.post-more-button svg { width:19px; height:19px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.post-reaction-button.liked { color:#E85D75; }
.post-reaction-button.liked svg { fill:currentColor; stroke:currentColor; }
.post-reaction-button:disabled { opacity:.65; cursor:wait; }
.post-comment-count strong { color:inherit; font-size:.72rem; font-weight:850; }
.post-like-count { min-height:34px; padding:0 8px; border:0; border-radius:9px; color:var(--muted); background:transparent; font:inherit; font-size:.74rem; font-weight:850; cursor:pointer; }
.post-like-count span { font-weight:650; }
.pulse-verified-badge { display:inline-block; width:16px; height:16px; flex:0 0 auto; overflow:visible; vertical-align:-3px; }
.pulse-verified-badge .verified-mark-bg { fill:#1877F2; }
.pulse-verified-badge .verified-mark-check { fill:#FFFFFF; }
img.pulse-verified-badge { object-fit:contain; border-radius:0; }
.profile-title-block .profile-verified { width:20px; height:20px; transform:translateY(-4px); }
.feed-author .feed-verified { display:inline-block !important; width:14px; height:14px; margin-left:4px; border-radius:0; background:transparent; vertical-align:-2px; }
.post-author-line .pulse-verified-badge { width:14px; height:14px; vertical-align:-2px; }
.profile-list-person .pulse-verified-badge { width:13px; height:13px; vertical-align:-2px; }
.web-comment .comment-verified { width:13px; height:13px; vertical-align:-2px; }
.web-comments .web-comment { display:grid; gap:5px; margin-left:calc(var(--comment-depth, 0) * 13px); padding:9px 11px; border:1px solid var(--line); border-radius:13px; color:var(--ink); background:var(--pulse-raised); }
.web-comment-copy { display:grid; gap:3px; min-width:0; }
.web-comment-copy>b { display:flex; align-items:center; gap:4px; font-size:.78rem; }
.web-comment-copy>span { font-size:.84rem; line-height:1.4; overflow-wrap:anywhere; }
.web-comment-actions { display:flex; align-items:center; gap:12px; }
.web-comment-actions button { padding:2px 0; border:0; color:var(--muted); background:transparent; font:inherit; font-size:.72rem; font-weight:750; cursor:pointer; }
.web-comment-actions button.liked { color:#E85D75; }
.web-comment-actions button:disabled { opacity:.6; cursor:wait; }
.web-comment-actions button span { margin-left:3px; }
.web-comment [hidden] { display:none !important; }
.web-action-error { grid-column:1/-1; color:#E85D75; font-size:.72rem; }
.web-reply-form[hidden] { display:none !important; }
.web-reply-form { display:grid; grid-template-columns:1fr auto; gap:7px; margin-top:4px; }
.web-reply-form input { min-width:0; padding:8px 10px; border:1px solid var(--line); border-radius:10px; color:var(--ink); background:var(--pulse-canvas); font:inherit; font-size:.78rem; }
.web-reply-form button { padding:7px 10px; border:0; border-radius:10px; color:var(--pulse-on-accent); background:var(--pulse-accent); font:inherit; font-size:.75rem; font-weight:800; cursor:pointer; }
.web-reply-form button:disabled { opacity:.6; cursor:wait; }
.profile-post-more { position:relative; margin-left:auto; }
.post-more-button { width:38px; padding:0; }
.post-more-button svg { width:20px; fill:currentColor; stroke:none; }
.profile-post-menu { position:absolute; z-index:5; right:0; bottom:calc(100% + 7px); display:none; min-width:150px; padding:5px; border:1px solid var(--line); border-radius:13px; background:var(--surface); box-shadow:0 12px 30px rgba(0,0,0,.24); }
.profile-post-card.menu-open .profile-post-menu { display:block; }
.profile-post-menu button { width:100%; min-height:37px; padding:8px 10px; border:0; border-radius:9px; color:#E85D75; background:transparent; font:inherit; font-size:.78rem; font-weight:800; text-align:left; cursor:pointer; }
.profile-post-menu button:hover { background:var(--pulse-raised); }
.profile-post-menu button:disabled { opacity:.65; cursor:wait; }
.web-likers { display:grid; gap:8px; max-height:55vh; overflow:auto; }
.profile-liker-row { display:flex; align-items:center; gap:11px; min-height:52px; padding:7px 10px; border:1px solid var(--line); border-radius:14px; color:var(--ink); background:var(--pulse-raised); }
.profile-liker-row>span:last-child { display:grid; gap:3px; min-width:0; }
.profile-liker-row strong { overflow:hidden; font-size:.84rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-liker-row small { color:var(--muted); font-size:.72rem; }
.profile-liker-row .list-person-avatar { width:36px; height:36px; flex-basis:36px; }
.profile-liker-row .list-person-avatar>span { font-size:.8rem; }
.profile-loading,.profile-empty { display:flex; min-height:210px; flex-direction:column; align-items:center; justify-content:center; gap:9px; color:var(--muted); text-align:center; }
.profile-loading>span { width:24px; height:24px; border:2px solid var(--line); border-top-color:var(--pulse-accent); border-radius:50%; animation:profile-spin .8s linear infinite; }
@keyframes profile-spin { to { transform:rotate(360deg); } }
.profile-empty strong { color:var(--ink); font-size:.95rem; }
.profile-empty>span:not(.empty-mark) { font-size:.79rem; }
.profile-empty button { margin-top:7px; padding:8px 14px; border:1px solid var(--line); border-radius:12px; color:var(--ink); background:var(--pulse-raised); font:inherit; font-size:.77rem; font-weight:800; cursor:pointer; }
.empty-mark { display:grid; place-items:center; width:42px; height:42px; border:1px solid var(--line); border-radius:15px; color:var(--pulse-accent); background:var(--pulse-raised); font-weight:900; }
.profile-private-notice { display:flex; align-items:center; gap:11px; }
.profile-private-notice>div { display:grid; gap:2px; }
.profile-private-notice strong { color:var(--ink); font-size:.84rem; }
.profile-private-notice span:not(.profile-private-icon) { color:var(--muted); font-size:.74rem; }
.profile-private-icon { display:grid; place-items:center; width:34px; height:34px; flex:0 0 auto; border-radius:12px; color:var(--pulse-accent); background:var(--surface); }
.profile-bottom-links { display:flex; justify-content:space-between; gap:14px; margin:27px 0 10px; padding-top:14px; border-top:1px solid var(--line); color:var(--muted); font-size:.72rem; }
.profile-bottom-links a { color:var(--pulse-accent); font-weight:750; }
.profile-error { padding:58px 8px; text-align:center; }
.profile-error h1 { margin:0; color:var(--ink); }
.profile-error>p:not(.eyebrow) { color:var(--muted); }
.profile-media-viewer,.profile-list-viewer { position:fixed; z-index:80; inset:0; display:grid; place-items:center; padding:18px; }
.media-viewer-backdrop { position:absolute; inset:0; background:rgba(3,8,15,.78); backdrop-filter:blur(9px); }
.profile-media-viewer section,.profile-list-viewer section { position:relative; z-index:1; width:min(100%,760px); max-height:min(88vh,900px); overflow:auto; padding:20px; border:1px solid var(--line); border-radius:24px; color:var(--ink); background:var(--surface); box-shadow:0 28px 90px rgba(0,0,0,.32); }
.profile-media-viewer section { display:grid; justify-items:center; gap:10px; }
.profile-media-viewer img,.profile-media-viewer video { display:block; max-width:100%; max-height:72vh; border-radius:15px; object-fit:contain; background:#000; }
.profile-media-viewer section>p { margin:0; color:var(--ink); font-size:.85rem; text-align:center; }
.media-viewer-close { position:absolute; z-index:2; top:10px; right:10px; display:grid; place-items:center; width:36px; height:36px; border:1px solid var(--line); border-radius:50%; color:var(--ink); background:var(--surface); font-size:1.35rem; cursor:pointer; }
.profile-list-viewer section { width:min(100%,480px); }
.profile-list-viewer h2 { margin:0 0 15px; color:var(--ink); font-size:1.45rem; }
.profile-list-content { display:grid; gap:7px; max-height:65vh; overflow:auto; }
.profile-list-person { display:flex; align-items:center; gap:10px; padding:9px; border:1px solid var(--line); border-radius:14px; color:var(--ink); background:var(--pulse-raised); }
.profile-list-person>span:nth-child(2) { display:grid; gap:2px; min-width:0; }
.profile-list-person strong { overflow:hidden; color:var(--ink); font-size:.8rem; text-overflow:ellipsis; white-space:nowrap; }
.profile-list-person small,.profile-list-empty { color:var(--muted); font-size:.72rem; }
.list-person-avatar img { width:100%; height:100%; object-fit:cover; }
.list-person-arrow { margin-left:auto; color:var(--muted); font-size:1.3rem; }
html[data-theme="light"] .online-pulse { color:#176B3B; background:#E3F6E9; }
html[data-theme="dark"] .online-pulse { color:#CBF8DB; background:#163523; }
html[data-theme="dark"] .online-pulse strong { color:#fff; }
/* Keep the landing-page phone mockup decoration out of real feed posts. */
.pulse-feed .web-post-card { height:auto; min-height:0; align-self:start; }
.pulse-feed .web-post-card::before,.pulse-feed .web-post-card::after { content:none; display:none; }
.pulse-web-profile-card[data-profile-theme="midnight_glass"] .profile-cover { background:linear-gradient(120deg,#17233C,#223252 58%,#101E32); }
.pulse-web-profile-card[data-profile-theme="lavender_glow"] .profile-cover { background:linear-gradient(120deg,#36264D,#4A3567 58%,#241A35); }
.pulse-web-profile-card[data-profile-theme="ocean_bloom"] .profile-cover { background:linear-gradient(120deg,#123B46,#1B5260 58%,#102B35); }
.pulse-web-profile-card[data-profile-theme="sunset_signal"] .profile-cover { background:linear-gradient(120deg,#51302B,#704239 58%,#382522); }
.pulse-web-profile-card[data-profile-theme="gold_creator"] .profile-cover { background:linear-gradient(120deg,#3C321A,#574723 58%,#2A2417); }
.pulse-web-profile-card[data-profile-theme="halloween_night"] .profile-cover { background:linear-gradient(120deg,#241532,#3B2052 58%,#191124); }
.pulse-web-profile-card[data-profile-theme="winter_wonder"] .profile-cover { background:linear-gradient(120deg,#17384F,#21536E 58%,#112C40); }
.pulse-web-profile-card[data-profile-theme="new_year_glow"] .profile-cover { background:linear-gradient(120deg,#20213F,#333562 58%,#16172E); }
html[data-theme="light"] .pulse-web-profile-card[data-profile-theme="lavender_glow"] .profile-cover { color:#36264D; background:linear-gradient(120deg,#F0E8F7,#E7DDF2); }
html[data-theme="light"] .pulse-web-profile-card[data-profile-theme="ocean_bloom"] .profile-cover { color:#123B46; background:linear-gradient(120deg,#DCEFEB,#CBE8E4); }
html[data-theme="light"] .pulse-web-profile-card[data-profile-theme="sunset_signal"] .profile-cover { color:#51302B; background:linear-gradient(120deg,#F5E4DA,#F0D8C7); }
html[data-theme="light"] .pulse-web-profile-card[data-profile-theme="gold_creator"] .profile-cover { color:#3C321A; background:linear-gradient(120deg,#F4EACB,#EFE0AE); }
html[data-theme="light"] .pulse-web-profile-card[data-profile-theme="halloween_night"] .profile-cover { color:#3B2052; background:linear-gradient(120deg,#EAE0F1,#DCCDE9); }
html[data-theme="light"] .pulse-web-profile-card[data-profile-theme="winter_wonder"] .profile-cover { color:#17384F; background:linear-gradient(120deg,#DDECF2,#C9E1EC); }
html[data-theme="light"] .pulse-web-profile-card[data-profile-theme="new_year_glow"] .profile-cover { color:#20213F; background:linear-gradient(120deg,#E4E5F3,#D7D9EE); }
html[data-theme="light"] .profile-media-viewer section,
html[data-theme="light"] .profile-list-viewer section { color:#222A36; background:#FFFCF7; border-color:#DED8CD; }
html[data-theme="light"] .profile-media-viewer section>p,
html[data-theme="light"] .profile-list-person strong { color:#222A36; }
@media (max-width:600px) {
  .profile-page-heading { align-items:flex-start; }
  .profile-page-heading h1 { font-size:1.55rem; }
  .profile-heading-actions { gap:7px; }
  .profile-wallet { min-width:0; gap:7px; padding:6px 9px; }
  .profile-wallet small { font-size:.58rem; }
  .profile-wallet strong { font-size:.85rem; }
  .wallet-icon { width:30px; height:30px; }
  .profile-settings-link { width:40px; height:40px; }
  .profile-content { padding:0 18px 19px; }
  .profile-inline-actions { gap:7px; }
  .profile-action { min-height:40px; padding:0 12px; font-size:.74rem; }
  .online-pulse { min-height:35px; gap:5px; padding:5px 8px; font-size:.65rem; }
  .pulse-web-stats { gap:6px; }
  .pulse-web-stats>div,.pulse-web-stats>button { padding:10px 4px; border-radius:13px; }
  .pulse-web-stats strong { font-size:1rem; }
  .pulse-web-stats span { font-size:.61rem; }
  .profile-tab-row { align-items:flex-start; flex-direction:column; }
  .profile-library-tabs { width:100%; justify-content:space-between; }
  .profile-library-tabs button { flex:1; padding:0 8px; }
  .profile-media-grid { gap:7px; }
  .profile-media-tile { border-radius:12px; }
  .profile-media-viewer section,.profile-list-viewer section { padding:17px; border-radius:20px; }
}

/* Profile web layout: familiar cover, overlapping portrait, actions, and timeline tabs. */
.pulse-web-profile {
  --pulse-accent:#5B7C70;
  --pulse-on-accent:#FFFFFF;
  --pulse-raised:#EDF2EF;
  --line:#D8E0DB;
}
html[data-theme="dark"] .pulse-web-profile {
  --pulse-accent:#A2C2B5;
  --pulse-on-accent:#10221D;
  --pulse-raised:#1B2A2B;
  --line:#334546;
}
.pulse-web-profile-card { display:block; overflow:hidden; border-radius:20px; }
.profile-cover { position:relative; height:240px; overflow:hidden; padding:24px 30px; align-items:flex-end; }
.profile-cover:after { content:""; position:absolute; width:310px; height:310px; top:-105px; right:10%; border:1px solid rgba(255,255,255,.13); border-radius:50%; box-shadow:0 0 0 36px rgba(255,255,255,.035),0 0 0 76px rgba(255,255,255,.025); }
.profile-cover>span:first-child { position:absolute; z-index:1; top:24px; left:30px; font-size:.72rem; letter-spacing:.19em; opacity:.82; }
.profile-content { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr); grid-template-areas:"identity actions" "bio stats" "private private"; align-items:center; column-gap:28px; row-gap:14px; padding:0 30px 25px; }
.profile-identity { grid-area:identity; position:relative; z-index:1; min-width:0; margin-top:-66px; gap:17px; }
.pulse-web-avatar { width:118px; height:118px; flex-basis:118px; border:7px solid var(--surface); border-radius:50%; }
.profile-title-block { min-width:0; padding:61px 0 0; }
.profile-title-block .eyebrow { color:var(--pulse-accent); font-weight:900; }
.profile-title-block h2 { font-size:clamp(1.5rem,3vw,2rem); }
.profile-privacy-badge { margin:56px 0 0 auto; }
.profile-inline-actions { grid-area:actions; justify-content:flex-end; align-self:end; margin:0 0 4px; }
.pulse-web-bio { grid-area:bio; max-width:760px; margin:0; padding:7px 0; }
.profile-private-notice { grid-area:private; }
.pulse-web-stats { grid-area:stats; gap:10px; margin:0; padding-top:16px; border-top:1px solid var(--line); }
.pulse-web-stats>div,.pulse-web-stats>button { padding:13px 8px; border:1px solid var(--line); border-radius:14px; background:var(--pulse-raised); }
.pulse-web-stats>button:hover { background:var(--pulse-raised); }
.pulse-web-stats strong { font-size:1.12rem; }
.pulse-web-stats span { font-size:.74rem; }
.profile-identity-badge { border:0; border-radius:999px; }
.profile-action { border-radius:10px; }
.profile-library { margin-top:20px; padding:0 22px 24px; border:1px solid var(--line); border-radius:20px; background:var(--surface); box-shadow:0 10px 28px rgba(0,0,0,.055); }
.profile-library-heading { margin:0 -22px 0; padding:18px 22px 14px; border-bottom:1px solid var(--line); }
.profile-library-heading .eyebrow { display:none; }
.profile-library-heading h2 { font-size:1.2rem; }
.profile-tab-row { margin:0 -22px 18px; padding:0 22px; border-bottom:1px solid var(--line); }
.profile-content-tabs,.profile-library-tabs { padding:0; gap:12px; border:0; border-radius:0; background:transparent; }
.profile-content-tabs button,.profile-library-tabs button { min-height:48px; padding:0 13px; border-radius:0; color:var(--muted); background:transparent; }
.profile-content-tabs button.active { position:relative; color:var(--pulse-accent); background:transparent; box-shadow:none; }
.profile-content-tabs button.active:after { content:""; position:absolute; right:8px; bottom:-1px; left:8px; height:3px; border-radius:3px 3px 0 0; background:var(--pulse-accent); }
.profile-library-tabs button.active { color:var(--ink); background:var(--pulse-raised); border-radius:9px; box-shadow:none; }
.profile-media-grid { grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.profile-media-tile { border-radius:13px; }
.profile-media-tile.photo-tile { aspect-ratio:.92; }
.profile-post-list { grid-template-columns:minmax(0,1fr); width:100%; max-width:760px; margin-inline:auto; gap:14px; }
.profile-post-card { border-radius:15px; box-shadow:none; }
.profile-bottom-links { margin-top:19px; }
@media (min-width:1200px) {
  .pulse-web-profile { width:min(760px,100%); max-width:1120px; margin-inline:auto; }
  .profile-cover { height:270px; }
  .profile-content { grid-template-columns:minmax(0,1fr); padding-inline:38px; }
  .profile-library-heading,.profile-tab-row { margin-inline:-22px; padding-inline:28px; }
  .profile-media-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
  .profile-post-list { grid-template-columns:minmax(0,1fr); }
}
@media (min-width:601px) and (max-width:979px) {
  .profile-cover { height:205px; }
  .profile-content { grid-template-columns:minmax(0,1fr); column-gap:16px; padding-inline:22px; }
  .pulse-web-avatar { width:100px; height:100px; flex-basis:100px; }
  .profile-identity { margin-top:-57px; }
  .profile-title-block { padding-top:54px; }
  .profile-privacy-badge { margin-top:51px; }
  .profile-library { padding-inline:16px; }
  .profile-library-heading,.profile-tab-row { margin-inline:-16px; padding-inline:16px; }
  .profile-media-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
@media (max-width:600px) {
  .profile-cover { height:150px; padding:16px 19px; }
  .profile-cover:after { width:210px; height:210px; top:-88px; right:3%; }
  .profile-content { display:flex; flex-direction:column; align-items:stretch; gap:12px; padding:0 18px 20px; }
  .profile-identity { margin-top:-47px; gap:12px; }
  .pulse-web-avatar { width:82px; height:82px; flex-basis:82px; border-width:5px; }
  .profile-title-block { padding-top:48px; }
  .profile-title-block h2 { font-size:1.3rem; }
  .profile-privacy-badge { margin-top:46px; }
  .profile-inline-actions { justify-content:flex-start; margin:0; }
  .pulse-web-stats { margin-top:4px; padding-top:12px; border-top:1px solid var(--line); }
  .pulse-web-stats>div,.pulse-web-stats>button { padding:10px 3px; }
  .pulse-web-stats span { font-size:.62rem; }
  .profile-library { padding:0 14px 18px; }
  .profile-library-heading,.profile-tab-row { margin-inline:-14px; padding-inline:14px; }
  .profile-library-heading { padding-block:15px 12px; }
  .profile-tab-row { gap:5px; }
  .profile-content-tabs,.profile-library-tabs { gap:2px; }
  .profile-content-tabs button,.profile-library-tabs button { min-height:43px; padding-inline:9px; font-size:.69rem; }
  .profile-media-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  .profile-post-list { grid-template-columns:1fr; }
}
@media (min-width:601px) {
  /* Give the identity row the full card width so long display names never
     collapse into one character per line beside the avatar. */
  .profile-content {
    grid-template-areas:"identity" "bio" "private" "actions" "stats";
    grid-template-columns:minmax(0,1fr);
    align-items:start;
    row-gap:15px;
  }
  .profile-identity { width:100%; min-width:0; }
  .profile-title-block { flex:1 1 auto; min-width:0; }
  .profile-title-block h2 { display:block; min-width:0; overflow-wrap:normal; word-break:normal; }
  .profile-inline-actions { justify-content:flex-end; align-self:center; margin:0; }
}

/* Wider, calmer Pulse Web post timeline. */
.pulse-web-shell { max-width:1320px; }
.pulse-feed .posts-stream { width:100%; grid-template-columns:minmax(0,1040px); gap:22px; }
.pulse-feed .web-post-card { display:grid; width:100%; height:auto; min-height:0; align-self:start; overflow:hidden; border:1px solid var(--line); border-radius:24px; background:var(--surface)!important; box-shadow:0 14px 38px rgba(15,25,39,.09); }
.pulse-feed .web-post-card::before,.pulse-feed .web-post-card::after { content:none; display:none; }
.pulse-feed .web-post-card .feed-author { min-height:76px; gap:13px; padding:17px 24px; }
.pulse-feed .web-post-card .feed-avatar { width:44px; height:44px; flex-basis:44px; overflow:hidden; border:1px solid var(--line); border-radius:50%; }
.pulse-feed .web-post-card .feed-avatar img { display:block; width:100%; height:100%; object-fit:cover; }
.pulse-feed .web-post-card .feed-author strong { color:var(--ink); font-size:.96rem; }
.pulse-feed .web-post-card .feed-author span { color:var(--muted); font-size:.78rem; }
.pulse-feed .web-post-card .feed-post-image { display:block; width:100%; max-height:min(70vh,760px); aspect-ratio:auto; object-fit:contain; margin:0; border-radius:0; background:var(--pulse-canvas); }
.pulse-feed .post-actions { display:flex; align-items:center; gap:10px; padding:12px 21px 9px; border-top:1px solid var(--line); line-height:1; }
.pulse-feed .post-actions button { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-width:44px; min-height:44px; padding:0 13px; border:1px solid transparent; border-radius:13px; color:var(--muted); background:transparent; font:inherit; font-size:.84rem; font-weight:800; line-height:1; cursor:pointer; transition:background .16s ease,color .16s ease,transform .16s ease; }
.pulse-feed .post-actions button:hover { color:var(--ink); background:var(--pulse-raised); }
.pulse-feed .post-actions button:active { transform:scale(.97); }
.pulse-feed .post-actions button svg { width:19px; height:19px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:1.9; stroke-linecap:round; stroke-linejoin:round; }
.pulse-feed .post-actions button.liked { color:#E34F70; }
.pulse-feed .post-actions button.liked svg { fill:currentColor; stroke:currentColor; }
.pulse-feed .post-menu { margin-left:auto; }
.pulse-feed .post-menu>button { width:44px; padding:0; }
.pulse-feed .post-menu>button svg { width:21px; fill:currentColor; stroke:none; }
.pulse-feed .post-menu-panel { top:auto; bottom:calc(100% + 8px); min-width:160px; border-color:var(--line); border-radius:14px; background:var(--surface); }
.pulse-feed .post-menu-panel button { justify-content:flex-start; color:#D94D70; }
.pulse-feed .post-details { gap:10px; padding:3px 25px 24px; }
.pulse-feed .post-details>strong { color:var(--ink); font-size:.88rem; font-weight:850; }
.pulse-feed .post-details p { color:var(--ink); font-size:.98rem; line-height:1.65; overflow-wrap:anywhere; }
.pulse-feed .post-comments { width:max-content; color:var(--muted); font-size:.84rem; }
.pulse-feed .post-date { color:var(--muted); font-size:.67rem; }
@media (max-width:760px) {
  .pulse-web-shell { max-width:100%; }
  .pulse-feed .posts-stream { grid-template-columns:minmax(0,1fr); gap:14px; }
  .pulse-feed .web-post-card { border-radius:18px; }
  .pulse-feed .web-post-card .feed-author { min-height:66px; padding:12px 15px; }
  .pulse-feed .web-post-card .feed-post-image { max-height:72vh; }
  .pulse-feed .post-actions { gap:5px; padding:9px 10px 6px; }
  .pulse-feed .post-actions button { min-height:42px; padding:0 10px; font-size:.78rem; }
  .pulse-feed .post-details { padding:3px 16px 18px; }
}

/* Editorial split-card layout for desktop; stack naturally on smaller screens. */
@media (min-width:901px) {
  .pulse-feed .web-post-card {
    display:grid;
    grid-template-columns:minmax(0,1.35fr) minmax(330px,.85fr);
    grid-template-rows:auto minmax(300px,auto) auto;
    grid-template-areas:"author author" "image details" "image actions";
    column-gap:0;
  }
  .pulse-feed .web-post-card .feed-author { grid-area:author; border-bottom:1px solid var(--line); }
  .pulse-feed .web-post-card .feed-post-image { grid-area:image; width:100%; height:100%; min-height:300px; max-height:none; object-fit:cover; }
  .pulse-feed .web-post-card .post-details { grid-area:details; align-content:start; min-width:0; padding:23px 24px 16px; border-left:1px solid var(--line); }
  .pulse-feed .web-post-card .post-actions { grid-area:actions; align-self:end; border-top:1px solid var(--line); border-left:1px solid var(--line); }
  .pulse-feed .web-post-card:not(:has(.feed-post-image)) { grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto auto; grid-template-areas:"author" "actions" "details"; }
  .pulse-feed .web-post-card:not(:has(.feed-post-image)) .post-details { border-left:0; padding:3px 25px 24px; }
  .pulse-feed .web-post-card:not(:has(.feed-post-image)) .post-actions { border-left:0; }
}
@media (max-width:900px) {
  .pulse-feed .web-post-card { grid-template-columns:minmax(0,1fr); grid-template-areas:"author" "image" "actions" "details"; grid-template-rows:auto auto auto auto; }
  .pulse-feed .web-post-card .feed-author { grid-area:author; }
  .pulse-feed .web-post-card .feed-post-image { grid-area:image; width:100%; height:auto; min-height:0; max-height:72vh; object-fit:contain; }
  .pulse-feed .web-post-card .post-actions { grid-area:actions; border-left:0; }
  .pulse-feed .web-post-card .post-details { grid-area:details; border-left:0; }
}
