/* X H5 shell — LAYOUT breakpoints · day/night via data-x-theme */
:root {
  --x-bg: #ffffff;
  --x-fg: #0f1419;
  --x-muted: #536471;
  --x-line: #eff3f4;
  --x-accent: #1d9bf0;
  --x-surface: #f7f9f9;
  --x-elevated: #ffffff;
  --x-hover: rgba(15, 20, 25, 0.06);
  --x-input-bg: #eff3f4;
  --x-topbar-bg: rgba(255, 255, 255, 0.92);
  --x-chip-active-bg: #e8f5fd;
  --x-vis-info-bg: #e8f5fd;
  --x-vis-info-fg: #0f1419;
  --x-skeleton: #cfd9de;
  --x-danger: #f4212e;
  --x-warn: #c2410c;
  --x-like: #f91880;
  --x-nav: 275px;
  --x-main: 600px;
  --x-rail: 350px;
  --x-topbar-h: 52px;
  --x-border: #cfd9de;
  color-scheme: light;
}

html[data-x-theme="dark"] {
  color-scheme: dark;
  --x-bg: #0f1419;
  --x-fg: #e7e9ea;
  --x-muted: #8b98a5;
  --x-line: #2f3336;
  --x-accent: #1d9bf0;
  --x-surface: #16181c;
  --x-elevated: #16181c;
  --x-hover: rgba(231, 233, 234, 0.08);
  --x-input-bg: #202327;
  --x-topbar-bg: rgba(15, 20, 25, 0.92);
  --x-chip-active-bg: rgba(29, 155, 240, 0.16);
  --x-vis-info-bg: rgba(29, 155, 240, 0.16);
  --x-vis-info-fg: #e7e9ea;
  --x-skeleton: #2f3336;
  --x-danger: #f4212e;
  --x-warn: #ff7a45;
  --x-like: #f91880;
  --x-border: #2f3336;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--x-bg); color: var(--x-fg);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

/* Hide scrollbar tracks (scroll still works) — PC + mobile */
html, body, .x-rail, .x-main, .x-feed, .x-panel, .x-dm-messages, .x-dlg {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
.x-rail::-webkit-scrollbar,
.x-main::-webkit-scrollbar,
.x-feed::-webkit-scrollbar,
.x-panel::-webkit-scrollbar,
.x-dm-messages::-webkit-scrollbar,
.x-dlg::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
.x-muted { color: var(--x-muted); }

.x-offline {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 16px; background: #fff4e5; color: #7a4100; border-bottom: 1px solid #f5d0a9;
  font-size: .9rem; font-weight: 600; position: sticky; top: 0; z-index: 40;
}
.x-offline[hidden] { display: none !important; }
.x-offline-dismiss {
  border: 0; background: transparent; color: inherit; font-size: 1.25rem; line-height: 1;
  padding: 0 4px; cursor: pointer;
}
.x-rail-open { display: none !important; }
.x-rail-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 19; background: rgba(15,20,25,.35);
}
.x-rail-backdrop[hidden] { display: none !important; }

.x-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; border-bottom: 1px solid var(--x-line);
  position: sticky; top: 0; z-index: 30; background: var(--x-topbar-bg);
  backdrop-filter: blur(8px);
}
.x-topbar-brand {
  display: inline-flex; align-items: center; gap: 0;
  min-height: 56px; line-height: 0; flex-shrink: 0;
}
/* Topbar: only wordmark (icon+text). Never show separate mark beside it. */
.x-topbar-brand > .x-brand-mark { display: none !important; }
.x-topbar-brand > .x-brand-word {
  height: 52px; width: auto; max-width: min(280px, 62vw); object-fit: contain;
}
.x-topbar-brand > .x-brand-word.x-brand-light { display: block !important; }
.x-topbar-brand > .x-brand-word.x-brand-dark { display: none !important; }
html[data-x-theme="dark"] .x-topbar-brand > .x-brand-word.x-brand-light { display: none !important; }
html[data-x-theme="dark"] .x-topbar-brand > .x-brand-word.x-brand-dark { display: block !important; }
/* Left nav: mark only, theme-aware */
.x-logo .x-brand-mark.x-brand-light { display: block !important; }
.x-logo .x-brand-mark.x-brand-dark { display: none !important; }
html[data-x-theme="dark"] .x-logo .x-brand-mark.x-brand-light { display: none !important; }
html[data-x-theme="dark"] .x-logo .x-brand-mark.x-brand-dark { display: block !important; }
.x-topbar-actions {
  display: flex; align-items: center; gap: 8px;
  flex: 1; min-width: 0; justify-content: flex-end;
}
.x-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 8px 16px; font-weight: 700; border: 1px solid var(--x-line);
  background: var(--x-bg); color: var(--x-fg); cursor: pointer;
}
.x-btn[hidden], .x-topbar-user[hidden] { display: none !important; }
.x-btn.primary { background: var(--x-accent); color: #fff; border-color: var(--x-accent); }
.x-btn.ghost:hover { background: var(--x-surface); }
.x-btn.is-dimmed,
#notify-mark-read.is-dimmed {
  opacity: .45;
}
#notify-mark-read.is-dimmed:hover {
  opacity: .65;
}
.x-topbar-user {
  font-weight: 600; color: var(--x-muted); margin-inline-end: 4px;
  text-decoration: none; max-width: 28vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer; position: relative; z-index: 1; -webkit-tap-highlight-color: transparent;
}
.x-topbar-user:hover { color: var(--x-accent); }
.x-lang-wrap select {
  border: 1px solid var(--x-line); border-radius: 999px; padding: 6px 10px;
  background: var(--x-elevated); font-weight: 600; font-size: .85rem; color: var(--x-fg);
}
.x-locale-slot { display: inline-flex; align-items: center; }
.x-theme-toggle {
  min-width: 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
  border-radius: 999px;
  flex-shrink: 0;
}
.x-card-post .actions button.reposted { color: var(--x-accent); }
.x-repost-flag { color: var(--x-muted); font-size: .85rem; margin-bottom: 6px; font-weight: 600; }
.x-quote { margin-bottom: 8px; }
.x-original {
  border: 1px solid var(--x-line); border-radius: 12px; padding: 10px 12px; margin: 8px 0;
}
.x-badge {
  display: inline-block; min-width: 1.1rem; padding: 0 5px; margin-inline-start: 4px;
  border-radius: 999px; background: #f4212e; color: #fff;
  font-size: .7rem !important; font-weight: 700; line-height: 1.3; vertical-align: text-top;
}
.x-badge[hidden] { display: none !important; }
.x-role-badge {
  display: inline-block;
  margin-inline-start: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(29, 155, 240, 0.12);
  color: #1d9bf0;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1.2;
}
.x-live-now-badge {
  display: inline-block;
  margin-inline-start: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #f4212e;
  color: #fff !important;
  font-size: 0.72rem;
  font-weight: 700;
  vertical-align: middle;
  line-height: 1.2;
  text-decoration: none !important;
}
.x-live-now-badge:hover { filter: brightness(1.08); }
.x-live-now-badge.is-voice { background: #7856ff; }
.x-anchor-card {
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--x-line, rgba(0,0,0,0.08));
}
.x-anchor-apply-dlg {
  width: min(420px, 94vw);
  padding: 20px 20px 16px;
}
.x-anchor-apply-hint {
  margin: 0 0 14px;
  font-size: 0.9rem;
  line-height: 1.4;
}
.x-anchor-apply-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.x-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-size: 0.9rem;
  color: var(--x-fg);
}
.x-field-lab {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--x-fg);
}
.x-field-ctrl {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--x-line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 0.95rem;
  background: var(--x-bg, #fff);
  color: var(--x-fg);
  outline: none;
}
.x-field-ctrl:focus {
  border-color: var(--x-accent);
  box-shadow: 0 0 0 2px rgba(29, 155, 240, 0.18);
}
.x-field select.x-field-ctrl {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--x-muted) 50%),
    linear-gradient(135deg, var(--x-muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-inline-end: 28px;
}
.x-field textarea.x-field-ctrl {
  resize: vertical;
  min-height: 4.5rem;
  line-height: 1.4;
}
.x-field-err {
  margin: 0;
  color: #f4212e;
  font-size: 0.85rem;
  font-weight: 600;
}
.x-field-err[hidden] { display: none !important; }
.x-nav-list a[data-nav="notify"],
.x-bottom a[data-nav="notify"] {
  position: relative;
}
.x-nav-list a[data-nav="notify"] .x-badge {
  position: absolute; top: 6px; inset-inline-end: 10px; margin: 0;
}
.x-bottom a[data-nav="notify"] .x-badge {
  position: absolute; top: 0; inset-inline-end: calc(50% - 22px); margin: 0;
}
.x-card-post .actions .x-act-count {
  min-width: 1.5rem; padding: 4px 6px; color: var(--x-muted); font-weight: 600;
}
.x-card-post .actions .x-act-count:hover { color: var(--x-accent); }
.x-engagers {
  padding: 8px 16px 12px; border-top: 1px solid var(--x-line); background: var(--x-surface);
}
.x-engagers-title { margin: 0 0 8px; font-size: .85rem; font-weight: 600; }
.x-engagers-list { background: var(--x-elevated); border-radius: 10px; padding: 0 8px; }
.x-post-metrics {
  display: flex; flex-wrap: wrap; gap: 4px 16px;
  padding: 10px 16px; border-top: 1px solid var(--x-line);
}
.x-post-metrics .x-metric {
  border: 0; background: transparent; padding: 0; font: inherit;
  color: var(--x-muted); cursor: pointer;
}
.x-post-metrics .x-metric strong { color: var(--x-fg); margin-inline-end: 4px; }
.x-post-metrics .x-metric:hover { text-decoration: underline; }
.x-card-post.is-detail .x-post-metrics { font-size: 1rem; }
.x-post-metrics .x-metric-share {
  margin-inline-start: auto;
  color: var(--x-accent, #1d9bf0);
  font-weight: 600;
}
.x-url-media-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.x-url-media-row { display: flex; gap: 8px; align-items: flex-start; }
.x-url-media-row .compose-media-url { flex: 1; min-width: 0; }
.x-url-thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--x-line); flex-shrink: 0; background: var(--x-surface);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}
.x-url-thumb[hidden] { display: none !important; }
.x-url-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.x-url-thumb.is-error { border-color: #f4212e; opacity: .55; }
.x-alt-field { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.x-alt-field input { width: 100%; border: 1px solid var(--x-line); border-radius: 8px; padding: 6px 8px; font: inherit; font-size: .9rem; }
.x-alt-empty-hint {
  font-size: .75rem;
  color: var(--x-warn);
}
.x-compose-thumb.is-alt-empty .x-alt-field input {
  border-color: #fdba74;
}
.x-alt-count { font-size: .75rem; align-self: flex-end; }
.x-alt-count.is-near-limit { color: #f4212e; }
.x-compose-thumb .x-alt-field { margin-top: 4px; }
.x-card-post.is-pin-anim {
  animation: x-pin-pulse 0.45s ease;
}
@keyframes x-pin-pulse {
  0% { transform: scale(1); box-shadow: none; }
  35% { transform: scale(1.01); box-shadow: 0 0 0 3px rgba(29, 155, 240, 0.35); }
  100% { transform: scale(1); box-shadow: none; }
}
.x-card-post.is-notify-target {
  animation: x-notify-pulse 1.6s ease;
}
.x-detail-nav {
  position: sticky;
  top: var(--x-topbar-h);
  z-index: 6;
  margin: 0 0 8px;
  padding: 6px 0;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--x-line);
}
.x-detail-nav-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 4px 8px;
}
.x-detail-back {
  flex: 0 0 auto;
  min-width: 36px;
  font-size: 1.15rem;
  line-height: 1;
}
.x-detail-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}
.x-detail-share {
  flex: 0 0 auto;
  margin-left: auto;
}
.x-detail-nav .x-btn { padding: 6px 10px; font-weight: 600; }
.x-panel > .x-detail-nav:first-child {
  margin-top: -4px;
  padding-top: 8px;
}
html[data-x-theme="dark"] .x-detail-nav {
  background: rgba(0, 0, 0, 0.72);
}
.x-vis-banner {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 12px;
  background: var(--x-vis-info-bg); color: var(--x-vis-info-fg); font-size: .9rem; line-height: 1.35;
  border: 1px solid #c6e4f7;
}
.x-vis-banner.is-private {
  background: var(--x-surface); border-color: var(--x-line); color: var(--x-muted);
}
@keyframes x-notify-pulse {
  0% { box-shadow: 0 0 0 0 rgba(29, 155, 240, 0.45); }
  40% { box-shadow: 0 0 0 4px rgba(29, 155, 240, 0.25); }
  100% { box-shadow: none; }
}
.x-composer-wrap.is-near-limit .x-composer-backdrop,
.x-composer-wrap.is-near-limit textarea {
  border-color: #f4212e;
}
.x-composer-wrap.is-limit-shake {
  animation: x-limit-shake 0.4s ease;
}
@keyframes x-limit-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.x-settings-links { list-style: none; margin: 0; padding: 0; }
.x-settings-links li { border-bottom: 1px solid var(--x-line); }
.x-settings-links li:last-child { border-bottom: 0; }
.x-settings-links a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 2px; font-size: .95rem; font-weight: 600;
  color: inherit; text-decoration: none; line-height: 1.35;
}
.x-settings-links a::after {
  content: "›"; color: var(--x-muted); font-weight: 400; font-size: 1.1rem;
  margin-inline-start: 8px;
}
.x-settings-links a:hover { color: var(--x-accent); }

/* Hub pages: Me / Settings / Tips / Drafts / Bookmarks / Creator */
.x-panel {
  padding: 12px 16px 28px;
}
.x-hub,
.x-me,
.x-settings,
.x-drafts-page,
.x-tips-page,
.x-creator-page {
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--x-fg);
}
.x-hub-title,
.x-hub > .x-hub-title,
.x-me > .x-hub-title,
.x-settings > .x-hub-title,
.x-drafts-page > .x-hub-title,
.x-tips-page > .x-hub-title,
.x-creator-page .x-hub-title,
.x-panel > h1 {
  margin: 4px 0 16px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.x-hub-lead {
  margin: -8px 0 16px;
  font-size: .875rem;
  line-height: 1.4;
  color: var(--x-muted);
}
.x-hub-sec {
  margin: 0 0 8px;
}
.x-hub-sec + .x-hub-sec {
  margin-top: 4px;
}
.x-settings-h {
  margin: 18px 0 6px;
  padding: 0;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--x-muted);
  line-height: 1.3;
}
.x-hub-sec > .x-settings-h:first-child {
  margin-top: 12px;
}
.x-hub-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 12px;
}
.x-hub-foot {
  margin: 20px 0 8px;
  padding-top: 8px;
}
.x-hub-logout {
  width: 100%;
  justify-content: center;
}
.x-tip-presets {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0;
}
.x-tip-preset {
  min-width: 56px; padding: 8px 12px; border: 1px solid var(--x-line);
  border-radius: 999px; background: transparent; font-weight: 600; cursor: pointer;
}
.x-tip-preset.is-on, .x-tip-preset:hover {
  border-color: var(--x-accent); color: var(--x-accent);
}
.x-tip-balance { margin: 0 0 4px; }
.x-tip-recharge-row { margin: 0 0 8px; }
.x-tip-custom-lab { display: block; margin: 8px 0; }
.x-tip-custom-lab input {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--x-line); border-radius: 10px; font-size: 1rem;
  background: var(--x-bg, #fff); color: inherit;
}
.x-tip-hint { margin: 0 0 8px; font-size: .85rem; }
.x-default-vis-lab { display: block; margin: 0 0 12px; font-size: .875rem; }
.x-default-vis-lab select,
#x-display-pref {
  display: block; width: 100%; max-width: 100%; margin-top: 6px;
  padding: 10px 12px; border: 1px solid var(--x-line); border-radius: 10px;
  background: var(--x-elevated); color: var(--x-fg); font-size: .95rem;
}
.x-drafts-page { /* padding via .x-hub */ }
.x-draft-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start;
  justify-content: space-between; padding: 14px 2px;
  border-bottom: 1px solid var(--x-line);
}
.x-draft-main { flex: 1; min-width: 0; }
.x-draft-main strong { font-size: .95rem; }
.x-draft-preview {
  margin: 6px 0; color: inherit; white-space: pre-wrap; word-break: break-word;
  font-size: .9rem; line-height: 1.4;
}
.x-draft-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.x-avatar-link {
  display: inline-flex; flex-shrink: 0; border-radius: 50%;
  line-height: 0; text-decoration: none; color: inherit;
}
.x-avatar-link:hover { opacity: .92; }
.x-avatar-link .x-avatar { display: block; }
.x-author-name {
  font-weight: 700; color: var(--x-fg); text-decoration: none;
}
.x-author-name:hover { text-decoration: underline; }
.x-author-handle {
  color: var(--x-muted); text-decoration: none; font-weight: 500;
}
.x-author-handle:hover { color: var(--x-accent); text-decoration: underline; }
.x-profile-name-link,
.x-me-name-link {
  color: inherit; text-decoration: none;
}
.x-profile-name-link:hover,
.x-me-name-link:hover { text-decoration: underline; }
.x-me-handle a { color: inherit; text-decoration: none; }
.x-me-handle a:hover { color: var(--x-accent); text-decoration: underline; }

/* Me / Creator: same type scale as Settings / Tips (no larger overrides) */
.x-me.x-hub,
.x-hub.x-me,
.x-creator-page.x-hub {
  font-size: 15px;
  line-height: 1.45;
}
.x-me > .x-hub-title,
.x-creator-page .x-dm-page-head .x-hub-title {
  margin: 4px 0 16px;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}
.x-me .x-settings-h,
.x-creator-page .x-settings-h {
  margin: 18px 0 6px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--x-muted);
}
.x-me .x-hub-sec > .x-settings-h:first-child,
.x-creator-page .x-hub-sec > .x-settings-h:first-child { margin-top: 12px; }
.x-me .x-settings-links a,
.x-creator-page .x-settings-links a {
  padding: 14px 2px;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.35;
}
.x-me .x-me-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.25;
}
.x-me .x-me-handle {
  margin: 2px 0 0;
  font-size: .875rem;
  font-weight: 500;
  color: var(--x-muted);
}
.x-me .x-me-stats {
  margin: 8px 0 0;
  font-size: .8125rem;
  line-height: 1.4;
  color: var(--x-muted);
}
.x-me .x-hub-cards { gap: 10px; margin: 0 0 12px; }
.x-me .x-balance-label,
.x-me .x-me-notify-meta .x-muted {
  font-size: .8125rem;
  font-weight: 500;
}
.x-me .x-balance-amt {
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1.2;
}
.x-me .x-me-notify-link {
  font-size: .95rem;
  font-weight: 700;
}
.x-me .x-hub-foot {
  margin-top: 20px;
  padding-top: 8px;
}
.x-me .x-muted,
.x-creator-page .x-muted { font-size: .8125rem; }
.x-me-notify-card,
.x-balance-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--x-line); border-radius: 14px;
  background: var(--x-surface);
}
.x-me-notify-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.x-me-notify-link { font-weight: 700; font-size: .95rem; }
.x-me-notify-link:hover { color: var(--x-accent); }
.x-me-notify-meta .x-muted { font-size: .8125rem; }
.x-local-data-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.x-push-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: 0 0 4px; padding: 0;
}
.x-push-row .x-muted { font-size: .8125rem; }
.x-tips-list { margin-top: 8px; }
.x-tip-row {
  padding: 12px 2px; border-bottom: 1px solid var(--x-line); line-height: 1.45;
  font-size: .95rem;
}
.x-tip-row a { color: var(--x-accent); text-decoration: none; font-weight: 600; }
.x-profile-edit label { display: block; margin-bottom: 12px; font-size: .875rem; }
.x-profile-edit .x-char-count { display: block; margin-top: 4px; font-size: .8rem; text-align: end; }
.x-balance-meta { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.x-balance-acts { display: flex; flex-wrap: wrap; gap: 8px; flex-shrink: 0; justify-content: flex-end; }
.x-balance-label { font-size: .8125rem; color: var(--x-muted); font-weight: 500; }
.x-balance-amt { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.x-me-head {
  display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
}
.x-me-id { min-width: 0; flex: 1; }
.x-me-name {
  margin: 0; font-size: 1.1rem; font-weight: 800; line-height: 1.25;
  letter-spacing: -0.01em;
}
.x-me-handle {
  margin: 2px 0 0; font-size: .875rem; color: var(--x-muted); font-weight: 500;
}
.x-me-stats {
  margin: 8px 0 0; font-size: .8125rem; color: var(--x-muted); line-height: 1.4;
}
.x-me-stats strong { color: var(--x-fg); font-weight: 700; }
.x-me-stats a { color: inherit; text-decoration: none; }
.x-me-stats a:hover { color: var(--x-accent); }
.x-settings-lang { margin-bottom: 4px; }
.x-hub .x-muted { font-size: .8125rem; }
.x-empty-guide > p:first-child {
  font-size: 1rem; font-weight: 700; color: var(--x-fg); margin: 0 0 6px;
}
.x-empty-guide .x-muted {
  font-size: .875rem;
}
.x-avatar-edit-wrap {
  position: relative; display: inline-block; flex-shrink: 0;
}
.x-avatar-edit-wrap .x-avatar.lg { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.x-avatar-edit-btn {
  display: block; margin-top: 6px; text-align: center;
  font-size: .75rem; font-weight: 600; color: var(--x-accent); cursor: pointer;
}
.x-avatar-edit-btn:hover { text-decoration: underline; }
.x-follows-you {
  display: inline-block; margin-inline-start: 6px; padding: 1px 6px;
  border: 1px solid var(--x-line); border-radius: 999px;
  font-size: .7rem; font-weight: 600; color: var(--x-muted); vertical-align: middle;
}
.x-mutual {
  display: inline-block; margin-inline-start: 6px; padding: 1px 6px;
  border: 1px solid var(--x-accent); border-radius: 999px;
  font-size: .7rem; font-weight: 700; color: var(--x-accent); vertical-align: middle;
}
.x-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 8px;
}
.x-card-head h2 { margin: 0; }
.x-card-head-actions { display: flex; align-items: center; gap: 4px; }
.x-who-refresh, .x-trends-refresh, .x-card-more { padding: 4px 10px; font-size: .8rem; }
.x-who-refresh.is-spin,
.x-trends-refresh.is-spin { animation: x-spin .6s linear; opacity: .7; }
.x-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(12px);
  z-index: 100; max-width: min(90vw, 360px);
  padding: 10px 16px; border-radius: 999px;
  background: #0f1419; color: #fff; font-size: .9rem; font-weight: 600;
  opacity: 0; pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.x-toast.is-on {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
.x-toast.has-action { pointer-events: auto; }
.x-toast-link {
  color: #8ecdf8; text-decoration: underline; margin-inline-start: 8px; font-weight: 700;
}
.x-toast-link:hover { color: #fff; }
.x-empty-guide .x-empty-cta { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.x-empty-guide .x-btn { display: inline-block; text-decoration: none; }

.x-app {
  display: grid;
  grid-template-columns: var(--x-nav) minmax(0, var(--x-main)) var(--x-rail);
  justify-content: center;
  min-height: calc(100% - 52px);
  max-width: 1280px;
  margin: 0 auto;
  column-gap: 16px;
}

/* PC · soft columns: no boxed sidebar frames */
@media (min-width: 1100px) {
  .x-app {
    column-gap: 28px;
    max-width: 1320px;
  }
  .x-nav {
    border-inline-end: 0 !important;
    background: transparent;
    padding: 12px 8px 12px 12px;
  }
  .x-main {
    border-inline: 0 !important;
    background: transparent;
  }
  .x-main-tabs {
    border-bottom: 0;
    background: color-mix(in srgb, var(--x-topbar-bg) 88%, transparent);
  }
  .x-rail {
    background: transparent;
    padding: 12px 4px 28px 0;
  }
  .x-rail .x-card,
  html[data-x-theme="dark"] .x-rail .x-card {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 10px 2px 18px;
    margin-bottom: 4px;
    border-radius: 0;
  }
  .x-rail .x-card h2 {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
  }
  .x-rail .x-card-head {
    padding: 0 2px 4px;
  }
  .x-rail .x-card .x-btn.ghost,
  .x-rail .x-card .x-btn:not(.primary) {
    border: 0;
    background: transparent;
    padding: 4px 8px;
    color: var(--x-accent);
  }
  .x-rail .x-trends li,
  .x-rail .x-who-row {
    border-bottom: 0;
    padding: 10px 2px;
    border-radius: 12px;
  }
  .x-rail .x-trends li:hover,
  .x-rail .x-who-row:hover {
    background: var(--x-hover);
  }
  .x-rail-search input,
  html[data-x-theme="dark"] .x-rail-search input {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0;
    padding: 10px 2px 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid color-mix(in srgb, var(--x-line) 40%, transparent) !important;
  }
  .x-rail-search input:focus,
  html[data-x-theme="dark"] .x-rail-search input:focus {
    outline: none;
    box-shadow: none !important;
    background: transparent !important;
    border-bottom-color: var(--x-accent) !important;
  }
  .x-rail .x-ad.is-placeholder .x-ad-frame {
    border: 0;
    border-radius: 0;
    background: transparent;
    min-height: 0;
    padding: 8px 2px;
    align-items: flex-start;
  }
  .x-rail .x-ad-label {
    padding-inline-start: 2px;
  }
}

/* Left nav */
.x-nav {
  position: sticky; top: 0; align-self: start;
  height: 100vh; padding: 12px 16px;
  display: flex; flex-direction: column; gap: 8px;
  border-inline-end: 1px solid var(--x-line);
  background: var(--x-bg);
  color: var(--x-fg);
}
.x-logo {
  display: inline-flex; align-items: center; justify-content: flex-start;
  padding: 8px 10px; line-height: 0;
}
.x-logo .x-brand-mark {
  width: 72px; height: 72px; object-fit: contain; display: block;
  border-radius: 16px;
}
.x-nav-list { display: flex; flex-direction: column; gap: 4px; }
.x-nav-list a {
  padding: 12px 16px; border-radius: 999px; font-weight: 600;
}
.x-nav-list a:hover, .x-nav-list a.is-active { background: var(--x-hover); }
.x-post-btn {
  margin-top: 8px; background: var(--x-accent); color: #fff; border: 0;
  border-radius: 999px; padding: 14px; font-weight: 700;
}
.x-nav-account { margin-top: auto; padding: 12px; border-radius: 999px; color: var(--x-muted); font-size: .9rem; }
.x-nav-account a { color: inherit; text-decoration: none; font-weight: 600; }
.x-nav-account a:hover { color: var(--x-accent); }

/* Main */
.x-main {
  border-inline: 1px solid var(--x-line);
  min-height: 100vh;
  background: var(--x-bg);
  color: var(--x-fg);
}
.x-main-tabs {
  position: sticky; top: 0; z-index: 2; display: flex;
  background: var(--x-topbar-bg); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--x-line);
}
/* display:flex above must not defeat the hidden attribute */
.x-main-tabs[hidden],
.x-main-tabs.is-off {
  display: none !important;
}
.x-main-tabs button {
  flex: 1; border: 0; background: transparent; padding: 16px;
  font-weight: 600; color: var(--x-muted);
}
.x-main-tabs button.is-active {
  color: var(--x-fg);
  box-shadow: inset 0 -3px 0 var(--x-accent);
}
.x-main-tabs .x-feed-refresh {
  flex: 0 0 auto; min-width: 48px; padding: 16px 12px; color: var(--x-accent);
}
.x-main-tabs .x-feed-refresh.is-spin { animation: x-spin .6s linear; }
.x-feed-refresh-hint {
  flex: 0 0 auto; align-self: center; font-size: .75rem; color: var(--x-muted);
  white-space: nowrap; margin: 0 10px 0 0; cursor: pointer;
  max-width: 36vw; overflow: hidden; text-overflow: ellipsis;
}
.x-feed-pull {
  display: flex; align-items: flex-end; justify-content: center;
  overflow: hidden; height: 0; color: var(--x-muted); font-size: .85rem;
  font-weight: 600; transition: none;
}
.x-feed-pull[hidden] { display: none !important; }
.x-feed-pull.is-armed { color: var(--x-accent); }
@keyframes x-spin { to { transform: rotate(360deg); } }

.x-feed { padding-bottom: 80px; }
.x-card-post {
  padding: 12px 16px; border-bottom: 1px solid var(--x-line);
}
.x-card-post:not(.is-detail) {
  cursor: pointer;
}
.x-card-post:not(.is-detail):hover {
  background: rgba(0, 0, 0, 0.02);
}
.x-card-post:not(.is-detail) a,
.x-card-post:not(.is-detail) button,
.x-card-post:not(.is-detail) input,
.x-card-post:not(.is-detail) textarea,
.x-card-post:not(.is-detail) .media,
.x-card-post:not(.is-detail) .actions {
  cursor: pointer;
}
.x-card-post .meta { color: var(--x-muted); font-size: .9rem; margin-bottom: 6px; }
.x-card-post .body {
  white-space: pre-wrap;
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: start;
  max-width: 100%;
  font-size: 0.98rem;
}
.x-card-post .media { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
.x-card-post .media.is-video { grid-template-columns: 1fr; }
.x-card-post .media img,
.x-card-post .media .x-media-poster,
.x-card-post .media .x-media-img { width: 100%; border-radius: 12px; max-height: 200px; object-fit: cover; cursor: zoom-in; }
.x-card-post .media.is-video video.x-media-vid { width: 100%; border-radius: 12px; max-height: 420px; background: #000; }
.x-media-video.is-pending { min-height: 160px; background: #111; border-radius: 12px; overflow: hidden; }
.x-media-poster-ph { display: block; min-height: 160px; background: #222; }
.x-media-dur {
  position: absolute; right: 8px; bottom: 8px; z-index: 2;
  background: rgba(0,0,0,.65); color: #fff; font-size: 12px;
  padding: 2px 6px; border-radius: 6px;
}
.x-profile-banner {
  margin: 0 0 12px; border: 1px solid var(--x-line, #e5e7eb);
  border-radius: 12px; overflow: hidden; background: var(--x-surface, #fff);
}
.x-profile-banner .x-ad-label { display: inline-block; margin: 8px 12px 0; font-size: 12px; color: var(--x-muted, #6b7280); }
.x-profile-banner-media { display: block; }
.x-profile-banner-img { display: block; width: 100%; aspect-ratio: 3 / 1; max-height: 160px; object-fit: cover; }
.x-profile-banner.is-mobile .x-profile-banner-img { max-height: 120px; }
.x-profile-banner .x-ad-video { aspect-ratio: 16 / 9; max-height: 220px; }
.x-ad-img {
  display: block; width: 100%; object-fit: cover; background: var(--x-elevated, #f3f4f6);
}
.x-ad-right .x-ad-img,
.x-ad[data-ad="pc_right_display"] .x-ad-img { aspect-ratio: 1 / 1; max-height: 280px; }
.x-ad-feed .x-ad-img,
.x-ad-post-below .x-ad-img { aspect-ratio: 16 / 9; max-height: 360px; }
.x-ad-video {
  display: block; width: 100%; max-height: 360px; aspect-ratio: 16 / 9;
  object-fit: contain; background: #000; border-radius: 8px;
}
.x-ad-media-wrap { display: block; margin: 8px 0 0; }
.x-ad-post-below { margin: 12px 0; }
.x-post-below-slot {
  margin: 10px 0 4px;
  min-height: 48px;
}
.x-post-below-slot .x-ad-post-below {
  margin: 0;
  border: 1px solid var(--x-line, #e7e7e8);
  border-radius: 12px;
  background: var(--x-bg, #fff);
}
.x-ad-adsense { min-height: 90px; padding: 8px 12px 12px; }
.x-ad-adsense .adsbygoogle { min-height: 80px; }
.x-profile-banner .x-ad-frame { padding: 10px 12px 12px; }
.x-card-post .actions { display: flex; gap: 20px; margin-top: 10px; color: var(--x-muted); font-size: .9rem; align-items: center; }
.x-card-post .actions button { border: 0; background: transparent; color: inherit; padding: 0; }
.x-card-post .actions button.liked { color: #f91880; }
.x-more-menu { position: relative; margin-inline-start: auto; }
.x-more-pop {
  position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 8;
  min-width: 160px; padding: 6px; border-radius: 12px;
  background: var(--x-bg, #fff); border: 1px solid var(--x-line);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  display: grid; gap: 2px;
}
.x-more-pop[hidden] { display: none !important; }
.x-more-pop button {
  text-align: start; padding: 8px 10px !important; border-radius: 8px; width: 100%;
}
.x-more-pop button:hover { background: rgba(0,0,0,.05); }
.x-empty { padding: 32px 16px; text-align: center; color: var(--x-muted); }
.x-empty .x-btn { margin-top: 12px; display: inline-block; }
.x-dm-page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.x-dm-page-head .x-hub-title { margin: 0; }
.x-dm-updated { margin: 0 0 8px; font-size: .8125rem; }
.x-creator-tips-sum a { color: inherit; text-decoration: none; }
.x-creator-tips-sum a:hover { color: var(--x-accent); }
.x-dm-thread-list { list-style: none; margin: 0; padding: 0; }
.x-dm-thread-list li { border-bottom: 1px solid var(--x-line); }
.x-dm-thread {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 4px; text-decoration: none; color: inherit;
}
.x-dm-thread:hover { background: var(--x-hover); }
.x-dm-thread-meta { flex: 1; min-width: 0; }
.x-dm-thread-top {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.x-dm-unread {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.25rem; height: 1.25rem; padding: 0 6px;
  border-radius: 999px; background: var(--x-accent); color: #fff;
  font-size: .7rem; font-weight: 700;
}
.x-dm-handle { font-size: .8rem; margin-top: 2px; }
.x-dm-preview {
  margin-top: 4px; font-size: .875rem; color: var(--x-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.x-dm-chat { display: flex; flex-direction: column; min-height: min(70vh, 640px); }
.x-dm-chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 10px; border-bottom: 1px solid var(--x-line);
}
.x-dm-chat-peer {
  display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0;
  color: inherit; text-decoration: none;
}
.x-dm-chat-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.x-dm-chat-title a { color: inherit; text-decoration: none; }
.x-dm-profile-btn { flex-shrink: 0; font-size: .8rem; padding: 6px 10px; }
.x-dm-msgs {
  flex: 1; overflow-y: auto; padding: 12px 0;
  display: flex; flex-direction: column; gap: 8px;
  max-height: min(55vh, 480px);
}
.x-dm-bubble {
  max-width: min(85%, 420px); padding: 8px 12px; border-radius: 14px;
  background: var(--x-hover); align-self: flex-start;
}
.x-dm-bubble.is-mine {
  align-self: flex-end; background: var(--x-accent); color: #fff;
}
.x-dm-bubble.is-mine .x-dm-bubble-time { color: rgba(255,255,255,.75); }
.x-dm-bubble-body { font-size: .9375rem; line-height: 1.4; word-break: break-word; }
.x-dm-bubble-time { margin-top: 4px; font-size: .7rem; color: var(--x-muted); }
.x-dm-compose {
  display: flex; gap: 8px; align-items: flex-end;
  padding-top: 10px; border-top: 1px solid var(--x-line);
}
.x-dm-compose textarea {
  flex: 1; border: 1px solid var(--x-line); border-radius: 12px;
  padding: 10px 12px; font: inherit; resize: vertical; min-height: 44px;
  background: var(--x-elevated); color: var(--x-fg);
}
.x-dm-shortcut { margin: 6px 0 0; font-size: .75rem; }
.x-dm-empty-thread { text-align: center; padding: 24px 8px; }
.x-creator-overview { padding: 0 0 8px; }
.x-creator-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
}
.x-creator-head .x-muted { margin: 2px 0 0; }
.x-creator-stats {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
.x-creator-stat {
  padding: 10px 8px; border: 1px solid var(--x-line); border-radius: 10px;
  text-align: center; background: var(--x-surface);
}
.x-creator-stat-n {
  display: block; font-size: 1.05rem; font-weight: 700; line-height: 1.2;
}
.x-creator-stat-l {
  display: block; margin-top: 4px; font-size: .72rem; color: var(--x-muted);
  letter-spacing: .02em;
}
.x-creator-tips-sum { margin: 12px 0 0; font-size: .875rem; line-height: 1.4; }
.x-creator-period {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px;
}
.x-creator-period-btn {
  border: 1px solid var(--x-line); background: transparent; color: inherit;
  border-radius: 999px; padding: 5px 12px; font-size: .8125rem; font-weight: 600; cursor: pointer;
}
.x-creator-period-btn.is-active {
  border-color: var(--x-accent); color: var(--x-accent);
}
.x-creator-period-label { margin: 0 0 8px; font-size: .8125rem; }
.x-creator-earn { margin-top: 4px; }
.x-creator-earn-note, .x-creator-alltime { margin: 8px 0 0; font-size: .8125rem; line-height: 1.4; }
.x-creator-series { margin: 8px 0 16px; }
.x-creator-bars {
  display: flex; align-items: flex-end; gap: 2px; height: 52px;
  margin: 8px 0 4px;
}
.x-creator-bar {
  flex: 1; min-width: 2px; max-width: 12px;
  background: var(--x-accent, #1d9bf0); opacity: .75; border-radius: 2px 2px 0 0;
}
.x-creator-series-meta { font-size: .75rem; }
.x-creator-subs { margin-top: 4px; }
.x-space-list { list-style: none; margin: 0; padding: 0; }
.x-space-card {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between;
  align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--x-border, #eee);
}
.x-space-main { flex: 1; min-width: 0; }
.x-space-main strong { display: block; }
.x-space-meta { font-size: .8125rem; }
.x-space-acts { display: flex; flex-wrap: wrap; gap: 6px; }
.x-spaces-page .x-hub-lead { margin-bottom: 12px; }
.x-space-detail { margin-bottom: 16px; }
@media (max-width: 520px) {
  .x-creator-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.x-search-form { display: flex; gap: 8px; margin: 12px 16px 16px; }
.x-search-hist { margin: 0 16px 12px; }
.x-search-hist-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px;
}
.x-search-hist-clear { padding: 2px 8px; font-size: .8rem; }
.x-search-hist-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.x-search-hist-item {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--x-line); border-radius: 999px; overflow: hidden;
  background: var(--x-surface);
}
.x-search-hist-item .x-chip {
  border: 0; border-radius: 0; background: transparent; margin: 0;
}
.x-search-hist-del {
  border: 0; background: transparent; color: var(--x-muted); cursor: pointer;
  padding: 4px 8px 4px 2px; font: inherit; line-height: 1;
}
.x-search-hist-del:hover { color: #f4212e; }
.x-search-form input {
  flex: 1; border: 1px solid var(--x-line); border-radius: 999px;
  padding: 10px 16px; background: var(--x-input-bg); color: var(--x-fg);
}
.x-profile-head { padding: 16px; border-bottom: 1px solid var(--x-line); }
.x-profile-head h1 { margin: 0 0 4px; font-size: 1.35rem; }
.x-profile-head .x-muted { color: var(--x-muted); margin: 0 0 12px; }
.x-profile-stats { margin: 0 0 12px; font-size: .95rem; }
.x-profile-stats a { color: inherit; text-decoration: none; }
.x-profile-stats a:hover { text-decoration: underline; }
.x-profile-tabs {
  display: flex; gap: 0; margin-top: 12px; border-bottom: 1px solid var(--x-line);
}
.x-profile-tabs button {
  flex: 1; border: 0; background: transparent; padding: 12px 8px;
  font: inherit; font-weight: 600; color: var(--x-muted); cursor: pointer;
}
.x-profile-tabs button.is-active {
  color: inherit; box-shadow: inset 0 -3px 0 var(--x-accent);
}
.x-feed-who { text-align: left; margin-top: 16px; max-width: 360px; margin-left: auto; margin-right: auto; }
.x-feed-who-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px;
}
.x-feed-who-head .x-muted { margin: 0; }
.x-feed-who .x-who-list { background: var(--x-elevated); border: 1px solid var(--x-line); border-radius: 12px; padding: 0 12px; }
.x-hashtag { color: var(--x-accent); text-decoration: none; }
.x-hashtag:hover { text-decoration: underline; }
.x-mention { color: var(--x-accent); text-decoration: none; }
.x-mention:hover { text-decoration: underline; }
.x-avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  flex-shrink: 0; background: var(--x-skeleton);
}
.x-avatar.sm { width: 32px; height: 32px; }
.x-avatar.lg { width: 72px; height: 72px; }
.x-post-row { display: flex; gap: 12px; align-items: flex-start; }
.x-post-main { min-width: 0; flex: 1; }
.x-profile-top { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.x-who-meta { min-width: 0; flex: 1; }
.x-notify-row { display: flex; gap: 10px; align-items: flex-start; }
.x-pin-flag { color: var(--x-muted); font-size: .85rem; margin-bottom: 6px; }
.x-vis-badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--x-muted);
  border: 1px solid var(--x-border, #cfd9de);
  border-radius: 4px;
  padding: 0 6px;
  line-height: 1.4;
  vertical-align: middle;
}
.x-vis-badge.is-private { color: var(--x-muted); }
.x-vis-badge.is-subscribers {
  color: #7856ff;
  border-color: rgba(120, 86, 255, 0.35);
}
.x-card-post.is-promoted {
  border-left: 3px solid #f91880;
  padding-left: 10px;
}
.x-promo-flag {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: #7856ff;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.x-creator-sub { margin-top: 8px; }
.x-sub-meta { font-size: .85rem; margin-inline-start: 8px; }
.x-sub-plan-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.x-sub-tier-ed { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 6px 0; }
.x-sub-tier-ed input[type="text"],
.x-sub-tier-ed input[type="number"] { max-width: 110px; }
.x-sub-tiers { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.x-sub-tier-card { padding: 8px 0; border-top: 1px solid var(--x-border, rgba(127,127,127,.25)); }
.x-sub-tier-acts { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.x-sub-preview { margin: 8px 0; padding: 10px 0; border-top: 1px dashed var(--x-border, rgba(127,127,127,.35)); }
.x-sub-preview .x-btn { margin-top: 6px; }
.x-card-post.is-preview-locked .media { opacity: .55; filter: grayscale(.15); }
.x-receipt { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 12px 0; }
.x-receipt dt { color: var(--x-muted, #888); }
.x-receipt dd { margin: 0; }
#profile-sub-slot { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
.x-trends-region {
  max-width: 96px;
  font: inherit;
  font-size: .8rem;
  padding: 2px 6px;
  border-radius: 8px;
  border: 1px solid var(--x-border, #cfd9de);
  background: var(--x-bg, #fff);
  color: inherit;
}
.x-live-tabs { display: flex; gap: 6px; margin: 0 0 8px; flex-wrap: wrap; }
.x-live-tab {
  border: 1px solid var(--x-border, #cfd9de);
  background: transparent;
  color: var(--x-muted);
  border-radius: 999px;
  padding: 2px 10px;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.x-live-tab.is-active {
  color: var(--x-accent, #1d9bf0);
  border-color: var(--x-accent, #1d9bf0);
}
.x-voice-list { list-style: none; margin: 0; padding: 0; }
.x-voice-list li { padding: 8px 0; border-bottom: 1px solid var(--x-line); }
.x-voice-row { color: inherit; text-decoration: none; font-weight: 600; }
.x-explore-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.x-compose-vis {
  display: grid;
  gap: 4px;
  margin: 8px 0 0;
}
.x-compose-vis-label { font-size: .85rem; font-weight: 600; }
.x-compose-vis select {
  max-width: 220px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--x-border, #cfd9de);
  background: var(--x-bg, #fff);
  font: inherit;
}
.x-compose-vis-hint { margin: 0; font-size: .8rem; }
.x-card-post .actions button.is-pinned { color: var(--x-accent); }
.x-tag-list { list-style: none; margin: 0; padding: 0; }
.x-tag-list li { padding: 8px 0; border-bottom: 1px solid var(--x-line); }
.x-tag-list a { font-weight: 600; color: inherit; text-decoration: none; }
.x-profile-edit { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.x-profile-edit label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.x-profile-edit input, .x-profile-edit textarea {
  border: 1px solid var(--x-line); border-radius: 10px; padding: 10px; font: inherit;
}
.x-who-list { list-style: none; margin: 0; padding: 0; }
.x-who-empty {
  padding: 12px 0; border-bottom: 0;
}
.x-who-empty .x-empty-cta { justify-content: flex-start; }
.x-rail-trends-empty {
  padding: 8px 0; border-bottom: 0;
}
.x-rail-trends-empty .x-empty-cta { justify-content: flex-start; }
.x-who-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--x-line);
}
.x-who-row:last-child { border-bottom: 0; }
.x-more { padding: 16px; text-align: center; }
a.x-notify-item { display: block; text-decoration: none; color: inherit; }
a.x-notify-item:hover { background: var(--x-hover); }
.x-profile-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.x-search-list { list-style: none; margin: 0; padding: 0 16px; }
.x-search-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--x-line);
}
.x-explore-block { padding: 8px 16px 16px; }
.x-explore-block h2 { font-size: 1.05rem; margin: 0 0 8px; }
.x-settings { padding: 16px; }
.x-card-post .actions button.x-muted { font-size: .85rem; }
.x-compose-media { margin: 8px 0 0; display: grid; gap: 8px; }
.x-compose-media-hint { margin: 0; font-size: .82rem; line-height: 1.4; }
.x-compose-url-hint { margin: 0; font-size: .82rem; line-height: 1.4; color: var(--x-accent); }
.x-compose-link-preview-hint {
  margin: 6px 0 0;
  font-size: .82rem;
  line-height: 1.4;
  color: var(--x-muted);
}
.x-compose-link-preview-hint[hidden] { display: none !important; }
.x-compose-link-preview {
  position: relative;
  margin: 8px 0 0;
  border: 1px solid var(--x-line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--x-elevated);
}
.x-compose-link-preview-loading,
.x-compose-link-preview-empty {
  margin: 0;
  padding: 12px 14px;
  font-size: .85rem;
}
.x-compose-link-preview .x-link-card {
  border: 0;
  border-radius: 0;
  pointer-events: none;
}
.x-compose-link-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
}
.x-compose-link-preview-remove:hover { background: rgba(0, 0, 0, 0.72); }
.x-compose-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.x-compose-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--x-line);
  border-radius: 999px;
  padding: 6px 12px;
  background: var(--x-surface, var(--x-elevated));
  color: var(--x-fg);
  font: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.x-compose-tool svg { width: 18px; height: 18px; flex-shrink: 0; }
.x-compose-tool.is-disabled,
.x-compose-tool:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.x-compose-tool.is-active { border-color: var(--x-accent); color: var(--x-accent); }
.x-compose-media-count {
  margin-inline-start: auto;
  font-size: .8rem;
  font-weight: 600;
  color: var(--x-accent);
}
.compose-media-url {
  width: 100%; border: 1px solid var(--x-line); border-radius: 8px;
  padding: 8px 10px; font-size: .9rem;
}
.x-compose-upload-row { display: flex; align-items: center; gap: 8px; position: relative; flex-wrap: wrap; }
.x-compose-upload-row[hidden] { display: none !important; }
.x-compose-upload-row.is-uploading #compose-pick { opacity: .55; cursor: wait; pointer-events: none; }
.x-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
}
.x-compose-upload-row.is-uploading #compose-upload-status { color: var(--x-accent); font-weight: 600; }
.x-compose-previews {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.x-compose-previews:not(:empty) + .x-url-media-list { margin-top: 4px; }
.x-compose-thumb { position: relative; width: 100%; max-width: 140px; }
.x-compose-thumb img { width: 100%; height: 72px; object-fit: cover; border-radius: 8px; display: block; }
.x-compose-thumb button {
  position: absolute; top: 2px; right: 2px; border: 0; border-radius: 50%;
  width: 22px; height: 22px; background: rgba(0,0,0,.55); color: #fff; line-height: 20px; cursor: pointer;
}
.x-compose-alt {
  width: 100%; margin-top: 4px; box-sizing: border-box;
  border: 1px solid var(--x-line); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: .8rem;
}
.x-compose-media-hint { margin: 0 0 4px; font-size: .85rem; }
.compose-media-url {
  width: 100%; border: 1px solid var(--x-line); border-radius: 8px;
  padding: 8px 10px; font-size: .9rem;
}
.x-notify-toolbar { padding: 0 0 8px; }
.x-notify-kinds {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 10px;
}
.x-chip {
  border: 1px solid var(--x-line); background: var(--x-elevated); color: var(--x-muted);
  border-radius: 999px; padding: 4px 10px; font: inherit; font-size: .85rem; cursor: pointer;
}
.x-chip.is-active { border-color: var(--x-accent); color: var(--x-accent); background: var(--x-chip-active-bg); }
.x-trend-link { color: inherit; text-decoration: none; }
.x-trend-link:hover { color: var(--x-accent); text-decoration: underline; }
.x-replies {
  margin-top: 8px; padding: 8px 0 0 12px;
  border-top: 1px solid var(--x-line);
}
.x-reply-item { padding: 8px 0; border-bottom: 1px solid var(--x-line); font-size: .95rem; }
.x-reply-item .body {
  margin-top: 4px;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  text-align: start;
}
.x-reply-compose { display: flex; gap: 8px; margin-top: 8px; align-items: flex-end; }
.x-reply-field { flex: 1; min-width: 0; display: grid; gap: 2px; }
.x-reply-field .x-reply-input { width: 100%; box-sizing: border-box; }
.x-reply-char { font-size: .75rem; justify-self: end; }
.x-reply-char.is-near-limit { color: var(--x-warn); font-weight: 600; }
.x-reply-char.is-at-limit { color: #f4212e; font-weight: 700; }
.x-reply-shortcut { margin: 4px 0 0; font-size: .8rem; }
.x-reply-shortcut.is-emphasize {
  color: var(--x-accent);
  font-weight: 600;
}
.x-reply-shortcut.is-near-limit {
  color: var(--x-warn);
  font-weight: 700;
}
.x-reply-input {
  flex: 1; border: 1px solid var(--x-line); border-radius: 999px;
  padding: 8px 12px; font-size: .9rem;
}

/* Right rail */
.x-rail {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow: auto; padding: 12px 0 24px;
  background: var(--x-bg);
  color: var(--x-fg);
}
.x-rail.is-collapsed { display: none; }
.x-rail-search input {
  width: 100%; border: 0; background: var(--x-input-bg); color: var(--x-fg); border-radius: 999px;
  padding: 12px 16px; margin-bottom: 12px;
}
.x-card {
  background: var(--x-surface); border-radius: 16px; padding: 12px 16px; margin-bottom: 12px;
}
.x-card h2 { font-size: 1.1rem; margin: 0 0 8px; }
.x-trends { list-style: none; margin: 0; padding: 0; }
.x-trends li { padding: 8px 0; border-bottom: 1px solid var(--x-line); font-weight: 600; }
.x-ad-label { font-size: .75rem; color: var(--x-muted); text-transform: uppercase; }
.x-ad.is-placeholder .x-ad-frame {
  margin-top: 8px;
  min-height: 160px;
  border: 1px dashed var(--x-line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  text-align: center;
  background: linear-gradient(180deg, var(--x-elevated) 0%, var(--x-surface) 100%);
}
.x-ad.is-placeholder .x-ad-body {
  margin: 0;
  color: var(--x-muted);
  font-size: .95rem;
  max-width: 14em;
}
.x-ad.is-placeholder .x-ad-cta { text-decoration: none; }
.x-ad-feed {
  margin: 8px 0;
  border: 1px solid var(--x-line, #e7e7e8);
  border-radius: 12px;
  padding: 12px 14px;
}
.x-media-video { display: block; width: 100%; position: relative; }
.x-media-status {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--x-muted, #71767b);
}
.x-media-status.is-fail { color: #f4212e; }
.x-act-tip { font-size: 13px; font-weight: 600; }
.x-media-vid {
  display: block;
  width: 100%;
  max-height: 480px;
  border-radius: 12px;
  background: #000;
}
.x-media-vid--feed {
  pointer-events: none;
  object-fit: cover;
}
.x-media-video[role="button"] {
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: inherit;
  font: inherit;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.x-media-video[role="button"]:focus-visible {
  outline: 2px solid var(--x-accent, #1d9bf0);
  outline-offset: 2px;
  border-radius: 12px;
}
.x-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  border-radius: 12px;
}
.x-video-play::after {
  content: '';
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15, 20, 25, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14);
}
.x-video-play::before {
  content: '';
  position: absolute;
  width: 0;
  height: 0;
  margin-left: 5px;
  border-style: solid;
  border-width: 11px 0 11px 18px;
  border-color: transparent transparent transparent #fff;
}
.x-video-hit {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  /* Leave native control bar (volume / menu / fullscreen) free */
  bottom: 64px;
  z-index: 2;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px 12px 0 0;
}
/* While playing: pass all taps through to native controls */
.x-video-hit.is-playing {
  pointer-events: none;
  cursor: default;
}
.x-video-hit:not(.is-playing)::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}
.x-video-hit:not(.is-playing)::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 0;
  height: 0;
  margin: -10px 0 0 -6px;
  border-style: solid;
  border-width: 10px 0 10px 16px;
  border-color: transparent transparent transparent #fff;
  pointer-events: none;
}
.x-video-hit.is-playing::before,
.x-video-hit.is-playing::after {
  display: none;
}
.x-compose-thumb.is-video video {
  width: 100%;
  max-height: 160px;
  border-radius: 8px;
  background: #000;
}
.x-video-badge {
  display: block;
  font-size: .75rem;
  margin-top: 4px;
}
.x-rail-collapse {
  border: 1px solid var(--x-line); background: var(--x-elevated); border-radius: 999px;
  width: 32px; height: 32px;
}

/* Bottom tabs — mobile only */
.x-bottom {
  display: none;
  position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
  background: var(--x-elevated); border-top: 1px solid var(--x-line);
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-between; align-items: center;
  gap: 0; box-sizing: border-box;
  width: 100%; max-width: 100vw;
  overflow: visible;
}
.x-bottom a, .x-bottom-post {
  flex: 1 1 0; min-width: 0; text-align: center; font-size: .8125rem; font-weight: 650;
  color: var(--x-muted); border: 0; background: transparent; padding: 8px 2px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  line-height: 1.2;
}
.x-bottom a.is-active {
  color: var(--x-accent);
  font-weight: 800;
  position: relative;
}
.x-bottom a.is-active::after {
  content: "";
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%);
  width: 18px; height: 3px; border-radius: 999px; background: var(--x-accent);
}
.x-bottom-post {
  flex: 0 0 auto;
  background: var(--x-accent); color: #fff !important; border-radius: 999px;
  max-width: 56px; min-width: 52px; padding: 9px 6px; font-size: .75rem; font-weight: 700;
}

/* Dialog */
.x-dlg {
  border: 1px solid var(--x-line); border-radius: 16px; padding: 16px;
  width: min(520px, 92vw);
  max-height: min(92dvh, 720px);
  overflow: auto;
  background: var(--x-elevated);
  color: var(--x-fg);
}
@media (max-width: 767px) {
  .x-dlg::backdrop { background: rgba(0, 0, 0, 0.55); }
  .x-dlg#compose-dlg,
  .x-dlg#edit-dlg {
    position: fixed;
    inset: auto 0 0 0;
    margin: 0;
    width: 100%;
    max-width: none;
    max-height: 94dvh;
    border-radius: 16px 16px 0 0;
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  }
  .x-dlg#compose-dlg .x-composer-wrap textarea,
  .x-dlg#compose-dlg .x-composer-wrap .x-composer-backdrop {
    min-height: 5.5rem;
  }
  .x-dlg#compose-dlg form,
  .x-dlg#edit-dlg form {
    display: flex;
    flex-direction: column;
    max-height: calc(94dvh - 24px);
    overflow: hidden;
  }
  .x-dlg#compose-dlg .x-compose-media {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
  .x-url-media-list:not([hidden]) {
    border: 1px solid var(--x-line);
    border-radius: 12px;
    padding: 10px;
    background: var(--x-elevated);
  }
}
.x-dlg-compose-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 10px;
}
.x-dlg-compose-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}
.x-dlg textarea {
  width: 100%; border: 1px solid var(--x-line); border-radius: 12px;
  padding: 12px; resize: vertical;
}
.x-composer-wrap {
  position: relative; width: 100%;
}
.x-composer-wrap .x-composer-backdrop,
.x-composer-wrap textarea {
  width: 100%; min-height: 7.5rem; margin: 0;
  border: 1px solid var(--x-line); border-radius: 12px;
  padding: 12px; font: inherit; line-height: 1.45;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word;
  box-sizing: border-box;
}
.x-composer-wrap .x-composer-backdrop {
  position: absolute; inset: 0; z-index: 0;
  color: var(--x-fg); background: var(--x-elevated); overflow: auto;
  pointer-events: none; resize: none;
}
.x-composer-wrap .x-composer-backdrop .x-hl-tag {
  color: var(--x-accent); font-weight: 600;
}
.x-composer-wrap textarea {
  position: relative; z-index: 1;
  background: transparent; color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--x-fg);
  resize: vertical;
}
.x-composer-wrap textarea::placeholder {
  color: var(--x-muted);
  -webkit-text-fill-color: var(--x-muted);
}
.x-composer-wrap textarea::selection {
  background: rgba(29, 155, 240, 0.28);
}
.x-dlg-title { margin: 0 0 10px; font-size: 1.1rem; }
.x-edit-media { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.x-edit-media-row { display: flex; gap: 8px; align-items: center; }
.x-edit-media-row img {
  width: 56px; height: 56px; object-fit: cover; border-radius: 8px; flex-shrink: 0;
}
.x-edit-alt {
  flex: 1; border: 1px solid var(--x-line); border-radius: 8px;
  padding: 6px 8px; font: inherit; font-size: .9rem;
}
.x-confirm-msg { margin: 0 0 8px; line-height: 1.45; }
.x-report-reasons { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 12px; }
.x-report-reasons.is-invalid { border: 1px solid #f4212e; border-radius: 12px; padding: 8px; }
.x-report-reasons.is-shake {
  animation: x-limit-shake .45s ease;
}
.x-report-reason-hint {
  margin: 0 0 8px;
  color: #f4212e;
  font-size: .85rem;
  font-weight: 600;
}
.x-report-reasons label {
  display: flex; gap: 8px; align-items: center;
  border: 1px solid var(--x-line); border-radius: 10px; padding: 8px 10px; cursor: pointer;
}
.x-report-reasons label:has(input:checked) { border-color: var(--x-accent); background: var(--x-chip-active-bg); }
.x-report-detail-label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; }
.x-report-detail-label textarea {
  border: 1px solid var(--x-line); border-radius: 10px; padding: 8px; font: inherit; resize: vertical;
}
.x-btn-danger, .x-dlg-actions button.x-btn-danger {
  background: #f4212e !important; color: #fff !important;
}
.x-draft-hint { font-size: .85rem; margin: 0 0 8px; color: var(--x-muted); }
.x-draft-hint[hidden] { display: none !important; }
.x-draft-hint button {
  border: 0; background: transparent; color: var(--x-accent); padding: 0; margin-inline-start: 8px;
  font: inherit; cursor: pointer; text-decoration: underline;
}
.x-dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
.x-dlg-actions button { border: 0; border-radius: 999px; padding: 8px 16px; background: var(--x-hover); color: var(--x-fg); }
.x-dlg-actions button.primary { background: var(--x-accent); color: #fff; }
.x-compose-meta { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 4px; }
.x-metric-share.is-copied {
  color: var(--x-accent);
  font-weight: 700;
}
.x-btn.is-copied {
  color: var(--x-accent) !important;
  font-weight: 700;
}
.x-explore-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}
.x-explore-head .x-who-refresh { flex-shrink: 0; }
.x-compose-shortcut.is-emphasize {
  color: var(--x-accent);
  font-weight: 600;
}
.x-compose-shortcut.is-near-limit {
  color: var(--x-warn);
  font-weight: 700;
}
.x-notify-updated {
  margin: 0 0 8px;
  font-size: .8rem;
}
.x-char-count.is-near-limit { color: var(--x-warn); font-weight: 600; }
.x-char-count.is-at-limit { color: #f4212e; font-weight: 700; }
.x-limit-hint {
  margin: 0 0 8px; color: #f4212e; font-size: .85rem; font-weight: 600;
}
.x-composer-wrap.is-at-limit .x-composer-backdrop,
.x-composer-wrap.is-at-limit textarea {
  border-color: #f4212e;
}
.x-engagers-head {
  display: flex; align-items: center; gap: 8px; margin: 0 0 8px;
}
.x-engagers-back { padding: 4px 8px; font-weight: 600; flex-shrink: 0; }
.x-engagers-title { margin: 0; }
.x-card-post .actions button.bookmarked { color: var(--x-accent); }
.x-media-img { cursor: zoom-in; }
.x-media-slot { display: block; }
.x-media-fail {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 120px; width: 100%; border: 1px dashed #cfd9de;
  border-radius: 12px; background: var(--x-surface); color: var(--x-muted); cursor: pointer;
  font: inherit; padding: 16px;
}
.x-media-fail:hover { border-color: var(--x-accent); color: var(--x-accent); }
.x-media-fail-msg { font-weight: 600; }
.x-media-fail-retry { font-size: .85rem; }
.x-lightbox {
  display: none; position: fixed; inset: 0; z-index: 2147483200;
  background: rgba(0,0,0,.88); align-items: center; justify-content: center; padding: 24px;
}
.x-lightbox.is-open { display: flex; }
.x-lightbox.is-error img { opacity: 0.15; }
.x-lightbox-fail {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  margin: 0; color: #fff; font-size: 1rem; text-align: center; z-index: 3;
  pointer-events: auto; display: grid; gap: 12px; justify-items: center;
  padding: 16px 20px; border-radius: 16px; background: rgba(15, 20, 25, 0.72);
  min-width: min(280px, 80vw);
}
.x-lightbox-fail[hidden] { display: none !important; }
.x-lightbox-fail-msg { margin: 0; font-weight: 700; }
.x-lightbox-retry {
  pointer-events: auto; min-width: 140px; font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255,255,255,.25);
}
.x-lightbox img { max-width: min(96vw, 1100px); max-height: 90vh; object-fit: contain; border-radius: 4px; }
.x-lightbox-close {
  position: absolute; top: 12px; right: 16px; border: 0; background: transparent;
  color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; z-index: 2;
}
.x-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  border: 0; background: rgba(15, 20, 25, 0.55); color: #fff;
  width: 44px; height: 44px; border-radius: 999px; font-size: 1.75rem; line-height: 1;
  cursor: pointer; z-index: 2;
}
.x-lightbox-nav.prev { left: 12px; }
.x-lightbox-nav.next { right: 12px; }
.x-lightbox-nav:hover { background: rgba(15, 20, 25, 0.8); }
.x-lightbox:not(.is-multi) .x-lightbox-nav { display: none; }
.x-lightbox-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: .9rem; background: rgba(15, 20, 25, 0.55);
  padding: 4px 10px; border-radius: 999px;
}
html.x-lb-open, html.x-lb-open body { overflow: hidden; }
html.x-mv-open body.x-mv-scroll-lock {
  position: fixed;
  width: 100%;
  overflow: hidden;
}

/* X-style fullscreen media viewer */
.x-media-viewer[hidden] { display: none !important; }
.x-media-viewer {
  position: fixed;
  inset: 0;
  z-index: 2147483200;
  display: flex;
  flex-direction: column;
  color: #fff;
  opacity: 0;
  transition: opacity 0.22s ease;
}
.x-media-viewer.is-open { opacity: 1; }
.x-media-viewer.is-closing { opacity: 0; }
.x-media-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: zoom-out;
}
.x-media-viewer.is-video .x-media-viewer__backdrop { cursor: pointer; }
.x-media-viewer__bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 8px;
  min-height: 52px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent);
}
.x-media-viewer__close {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.x-media-viewer__close:hover { background: rgba(255, 255, 255, 0.2); }
.x-media-viewer__counter {
  margin-left: auto;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(15, 20, 25, 0.45);
  padding: 4px 10px;
  border-radius: 999px;
}
.x-media-viewer__tools {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.x-media-viewer__tools--image { margin-left: auto; }
.x-media-viewer.is-video .x-media-viewer__tools--image { display: none; }
.x-media-viewer__tool {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  min-width: 36px;
  height: 36px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}
.x-media-viewer__tool:hover { background: rgba(255, 255, 255, 0.22); }
.x-media-viewer__stage {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  padding: 0 8px 16px;
}
.x-media-viewer__canvas {
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.08s linear;
}
.x-media-viewer.is-zoomed .x-media-viewer__canvas { transition: none; cursor: grab; }
.x-media-viewer.is-zoomed .x-media-viewer__canvas:active { cursor: grabbing; }
.x-media-viewer__img {
  display: block;
  max-width: min(96vw, 1200px);
  max-height: min(78vh, 900px);
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
  border-radius: 4px;
}
.x-media-viewer__video {
  display: none;
  width: min(96vw, 960px);
  max-height: min(78vh, 720px);
  border-radius: 12px;
  background: #000;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}
.x-media-viewer.is-video .x-media-viewer__canvas { display: none; }
.x-media-viewer.is-video .x-media-viewer__video { display: block; }
.x-media-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  border: 0;
  background: rgba(15, 20, 25, 0.55);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.x-media-viewer__nav.prev { left: 12px; }
.x-media-viewer__nav.next { right: 12px; }
.x-media-viewer__nav:hover { background: rgba(15, 20, 25, 0.82); }
.x-media-viewer:not(.is-multi) .x-media-viewer__nav { display: none; }
.x-media-viewer__fail {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  color: #fff;
  text-align: center;
  z-index: 4;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 16px 20px;
  border-radius: 16px;
  background: rgba(15, 20, 25, 0.78);
  min-width: min(280px, 80vw);
}
.x-media-viewer__fail[hidden] { display: none !important; }
.x-media-viewer.is-error .x-media-viewer__img { opacity: 0.15; }
.x-media-viewer__fail-msg { margin: 0; font-weight: 700; }
.x-media-viewer__retry {
  min-width: 140px;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.x-skel { padding: 4px 0 12px; }
.x-skel-post {
  padding: 14px 16px;
  border-bottom: 1px solid var(--x-line);
}
.x-skel-row { display: flex; gap: 12px; align-items: flex-start; }
.x-skel-avatar {
  width: 40px; height: 40px; border-radius: 999px; flex-shrink: 0;
  background: linear-gradient(90deg, #eff3f4 25%, #e7e9ea 50%, #eff3f4 75%);
  background-size: 200% 100%;
  animation: x-skel-shimmer 1.2s ease-in-out infinite;
}
.x-skel-lines { flex: 1; min-width: 0; display: grid; gap: 8px; padding-top: 4px; }
.x-skel-line {
  height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #eff3f4 25%, #e7e9ea 50%, #eff3f4 75%);
  background-size: 200% 100%;
  animation: x-skel-shimmer 1.2s ease-in-out infinite;
}
.x-skel-line.w36 { width: 36%; }
.x-skel-line.w72 { width: 72%; }
.x-skel-line.w92 { width: 92%; }
.x-skel-wrap { list-style: none; padding: 0; margin: 0; border: 0; }
@keyframes x-skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

/* Breakpoints */
@media (max-width: 1279px) {
  :root { --x-nav: 220px; --x-rail: 300px; }
}
@media (max-width: 991px) {
  .x-app { grid-template-columns: 56px minmax(0, 1fr); }
  .x-nav-list a { font-size: 0; padding: 12px; }
  .x-nav-list a::first-letter { font-size: 1rem; }
  .x-post-btn { font-size: 0; padding: 12px; border-radius: 50%; width: 44px; height: 44px; }
  .x-post-btn::after { content: "+"; font-size: 1.2rem; color: #fff; }
  .x-nav-account { font-size: .7rem; }
  .x-logo { padding: 6px 4px; justify-content: center; }
  .x-logo .x-brand-mark { width: 48px; height: 48px; border-radius: 12px; }
  .x-rail { display: none; }
  .x-rail-open { display: inline-flex !important; }
  .x-rail.is-open-drawer {
    display: block; position: fixed; inset: 0 0 0 auto; width: min(350px, 90vw);
    background: var(--x-elevated); z-index: 20; padding: 16px; box-shadow: -8px 0 24px rgba(0,0,0,.12); color: var(--x-fg);
  }
  .x-rail-backdrop:not([hidden]) {
    display: block;
  }
}
@media (max-width: 767px) {
  .x-app { grid-template-columns: 1fr; }
  .x-nav { display: none; }
  .x-main { border: 0; min-height: calc(100vh - 56px); }
  .x-bottom { display: flex; }
  .x-topbar {
    padding: 6px 10px;
    gap: 8px;
  }
  .x-topbar-actions {
    gap: 4px;
    flex-wrap: nowrap;
  }
  .x-topbar-actions .x-btn {
    padding: 6px 10px;
    font-size: .78rem;
    white-space: nowrap;
  }
  .x-topbar-actions .x-btn.primary {
    padding: 6px 12px;
  }
  .x-topbar-brand { min-height: 40px; }
  /* Mobile topbar: wordmark only, slightly larger but leave room for actions */
  .x-topbar-brand > .x-brand-mark { display: none !important; }
  .x-topbar-brand > .x-brand-word {
    height: 34px;
    max-width: min(168px, 48vw);
  }
  .x-topbar-user { max-width: 22vw; font-size: .85rem; }
  .x-detail-nav {
    top: calc(var(--x-topbar-h) + env(safe-area-inset-top, 0px));
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 12px;
    padding-right: 12px;
    border-bottom-color: var(--x-line);
    box-shadow: 0 1px 0 rgba(0,0,0,.04);
  }
  .x-panel { padding-top: 8px; }
  .x-main-tabs .x-feed-refresh {
    min-width: 52px; font-size: 1.25rem; color: var(--x-accent);
  }
  .x-feed-refresh-hint { display: none !important; }
  .x-feed { padding-bottom: 88px; }
}
@keyframes x-hint-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}

/* Live now rail */
.x-live-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.x-live-row {
  display: flex; align-items: center; gap: 8px;
  text-decoration: none; color: inherit; padding: 6px 4px; border-radius: 10px;
}
.x-live-row:hover { background: var(--x-hover); }
.x-live-av {
  width: 36px; height: 36px; border-radius: 999px; object-fit: cover; flex: 0 0 auto;
  background: var(--x-line, #eff3f4);
}
.x-live-av--empty { display: inline-block; }
.x-live-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.x-live-meta strong { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-live-badge {
  font-size: .7rem; font-weight: 700; color: #fff; background: #f4212e;
  padding: 2px 6px; border-radius: 4px; flex: 0 0 auto;
}
.x-live-badge.is-voice { background: #7856ff; }
.x-live-enter, .x-voice-enter { margin-right: 4px; }
#live-now.is-empty { padding-top: 8px; padding-bottom: 8px; }
#live-now.is-empty.is-collapsed { opacity: .92; }
.x-live-empty-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  border: 0; background: transparent; padding: 0; cursor: pointer; color: inherit;
  font: inherit; text-align: left;
}
.x-live-empty-title { font-weight: 700; font-size: .95rem; }
.x-live-empty-chev { color: var(--x-muted, #536471); font-size: .85rem; }
.x-live-empty-body { margin-top: 8px; }
.x-live-empty-body .x-muted { margin: 0 0 8px; font-size: .85rem; }
.x-live-empty-cta { display: inline-flex; }


html[data-x-theme="dark"] .x-topbar,
html[data-x-theme="dark"] .x-nav,
html[data-x-theme="dark"] .x-main,
html[data-x-theme="dark"] .x-rail,
html[data-x-theme="dark"] .x-dlg,
html[data-x-theme="dark"] .x-bottom,
html[data-x-theme="dark"] .x-panel,
html[data-x-theme="dark"] .x-more-pop {
  background: var(--x-bg);
  color: var(--x-fg);
}
html[data-x-theme="dark"] .x-dlg,
html[data-x-theme="dark"] .x-bottom,
html[data-x-theme="dark"] .x-more-pop,
html[data-x-theme="dark"] .x-card {
  background: var(--x-elevated);
  color: var(--x-fg);
}
html[data-x-theme="dark"] .x-card-post:not(.is-detail):hover {
  background: rgba(255, 255, 255, 0.03);
}
html[data-x-theme="dark"] input,
html[data-x-theme="dark"] textarea,
html[data-x-theme="dark"] select,
html[data-x-theme="dark"] .x-settings-lang .vlp-settings-trigger {
  background: var(--x-surface);
  color: var(--x-fg);
  border-color: var(--x-line);
}
/* Composer: text is painted on .x-composer-backdrop; textarea must stay transparent
   or dark-mode opaque bg + transparent fill makes typing invisible. */
html[data-x-theme="dark"] .x-composer-wrap textarea {
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: var(--x-fg);
}
html[data-x-theme="dark"] .x-composer-wrap textarea::placeholder {
  color: var(--x-muted);
  -webkit-text-fill-color: var(--x-muted);
}
/* Quote / wraps without highlight backdrop still need visible text */
.x-composer-wrap:not(:has(.x-composer-backdrop)) textarea {
  background: var(--x-elevated);
  color: var(--x-fg);
  -webkit-text-fill-color: var(--x-fg);
}
html[data-x-theme="dark"] .x-composer-wrap:not(:has(.x-composer-backdrop)) textarea {
  background: var(--x-surface);
  color: var(--x-fg);
  -webkit-text-fill-color: var(--x-fg);
}
html[data-x-theme="dark"] .x-card-post .actions,
html[data-x-theme="dark"] .x-replies,
html[data-x-theme="dark"] .x-main-tabs {
  background: var(--x-surface);
}
html[data-x-theme="dark"] .x-composer-wrap .x-composer-backdrop {
  background: var(--x-surface);
  color: var(--x-fg);
}
html[data-x-theme="dark"] .x-btn:not(.primary) {
  background: var(--x-bg);
  color: var(--x-fg);
  border-color: var(--x-line);
}
html[data-x-theme="dark"] a.x-notify-item:hover,
html[data-x-theme="dark"] .x-nav-list a:hover,
html[data-x-theme="dark"] .x-nav-list a.is-active {
  background: var(--x-hover);
}
html[data-x-theme="dark"] .x-offline {
  background: #3d2e14;
  color: #ffe8c2;
  border-bottom-color: #6b4e1e;
}

/* P1a · verified + link cards */
.x-verified-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  margin-left: 0.18em;
  border-radius: 50%;
  background: #1d9bf0;
  color: #fff;
  font-size: 0.72em;
  font-weight: 800;
  line-height: 1;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255,255,255,.35);
}
.x-verified-badge.is-personal { background: #1d9bf0; border-radius: 50%; }
.x-verified-badge.is-org {
  background: linear-gradient(145deg, #f59e0b, #d97706);
  border-radius: 4px;
  font-size: 0.62em;
}
.x-verified-badge.is-official {
  background: linear-gradient(145deg, #7c3aed, #4c1d95);
  border-radius: 50%;
  font-size: 0.68em;
  box-shadow: 0 0 0 1px rgba(255,255,255,.4), 0 0 0 2px rgba(124,58,237,.35);
}
.x-verify-docs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.x-verify-doc-thumb {
  width: 72px; height: 72px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--x-line, #e5e7eb); background: #f3f4f6;
}
.x-verify-doc-hint { font-size: 12px; color: var(--x-muted, #6b7280); margin: 4px 0 8px; }
.x-verify-kind-preview { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 12px; }
.x-verify-kind-preview span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--x-muted, #536471);
}
.x-link-preview { margin: 0.5rem 0 0; }
.x-link-card {
  display: flex;
  gap: 0.75rem;
  border: 1px solid var(--x-line, #e5e7eb);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  max-width: 100%;
}
.x-link-card:hover { background: var(--x-hover, rgba(0,0,0,.03)); }
.x-link-card-img {
  flex: 0 0 96px;
  min-height: 72px;
  background: #ddd center/cover no-repeat;
}
.x-link-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem;
  min-width: 0;
}
.x-link-card-site { font-size: 0.75rem; color: var(--x-muted, #6b7280); }
.x-link-card-title { font-weight: 650; font-size: 0.95rem; }
.x-link-card-desc {
  font-size: 0.85rem;
  color: var(--x-muted, #6b7280);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.x-ext-link { word-break: break-all; }

/* return deep-link bar from live 「我的」 */
.x-return-bar{position:sticky;top:0;z-index:80;display:flex;align-items:center;padding:8px 12px;background:linear-gradient(90deg,#3d1054,#7b2d5a);border-bottom:1px solid rgba(255,209,102,.35)}
.x-return-bar[hidden]{display:none!important}
.x-return-bar__btn{color:#ffd166;font-weight:700;font-size:14px;text-decoration:none}
html.has-x-return .x-topbar{top:var(--x-return-bar-h,40px)}

/* App shell + mobile: nav hidden but grid columns remain → main stuck in col 1 (left bias) */
html[data-ev-shell="1"] .x-app {
  display: block !important;
  max-width: none !important;
  margin: 0 !important;
  grid-template-columns: none !important;
}
html[data-ev-shell="1"] .x-nav,
html[data-ev-shell="1"] .x-rail {
  display: none !important;
}
html[data-ev-shell="1"] .x-main {
  width: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
  grid-column: 1 / -1;
  padding-inline: env(safe-area-inset-left) env(safe-area-inset-right);
}
html[data-ev-shell="1"] .x-topbar {
  padding-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
}

@media (max-width: 767px) {
  .x-app {
    grid-template-columns: minmax(0, 1fr) !important;
    max-width: 100%;
    margin: 0;
  }
  .x-main {
    grid-column: 1 / -1;
    width: 100%;
    max-width: 100%;
  }
  .x-topbar {
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
  }
}
