*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid #0866ff;
  outline-offset: 2px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #f0f2f5;
  color: #050505;
  font-family: "Segoe UI", Helvetica, Arial, Inter, "Noto Sans", sans-serif;
  font-size: 15px;
  line-height: 1.3333;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { border: 0; }
a { color: #0866ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- top bar ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: 56px;
  background: #0866ff;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  padding: 0 16px;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.topnav :focus-visible { outline-color: #fff; }

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.nav-right { justify-content: flex-end; }

.nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.wordmark {
  color: #fff;
  font-weight: 700;
  font-size: 29px;
  letter-spacing: -0.045em;
  line-height: 1;
  text-decoration: none;
  padding: 4px 2px 6px;
  flex: none;
}

.wordmark:hover { text-decoration: none; }

.menu {
  position: absolute;
  z-index: 50;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 8px;
  color: #050505;
}

.menu button,
.menu a {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 6px;
  padding: 8px;
  color: #050505;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}

.menu button:hover,
.menu a:hover { background: #f2f2f2; text-decoration: none; }

.menu small {
  display: block;
  font-weight: 400;
  color: #65676b;
  font-size: 13px;
}

.nav-icon {
  position: relative;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
}

.nav-icon svg { width: 26px; height: 26px; }
.nav-icon:hover { background: rgba(255, 255, 255, 0.16); }

.nav-icon.is-active { background: rgba(0, 0, 0, 0.14); }

.nav-icon.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: -4px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #fff;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  display: grid;
  place-items: center;
  flex: none;
}

.icon-btn:hover { background: rgba(255, 255, 255, 0.34); }
.icon-btn svg { width: 20px; height: 20px; }

.badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 10px;
  background: #e41e3f;
  color: #fff;
  border: 2px solid #0866ff;
  font-size: 12px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
}

.x-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px 0 10px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  flex: none;
}

.x-nav:hover { background: rgba(255, 255, 255, 0.3); text-decoration: none; }
.x-nav svg { width: 15px; height: 15px; }

.nav-avatar {
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  flex: none;
}

.nav-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pop-wrap { position: relative; }

.menu { top: calc(100% + 8px); right: 0; min-width: 280px; }
.menu.narrow { min-width: 240px; }
.menu .who { display: flex; gap: 10px; align-items: center; padding: 8px; }
.menu .who img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.menu .hint { font-weight: 400; color: #65676b; font-size: 13px; }
.menu hr { border: 0; border-top: 1px solid #ced0d4; margin: 6px 8px; }


/* ---------- page ---------- */

.page {
  width: min(940px, calc(100% - 32px));
  margin: 16px auto 28px;
}

.profile-card {
  position: relative;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.cover {
  height: 350px;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
  background: #d8dadf;
}

.cover-hit {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}

.cover-hit img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  display: block;
}

.avatar {
  position: absolute;
  left: 16px;
  bottom: auto;
  top: 262px;
  width: 176px;
  height: 176px;
  padding: 4px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: zoom-in;
  z-index: 2;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  background: #f0f2f5;
}

.identity {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-height: 118px;
  padding: 14px 16px 16px 204px;
}

.identity-main { min-width: 0; }

.profile-name {
  margin: 0;
  font-size: 32px;
  line-height: 1.1875;
  font-weight: 700;
  letter-spacing: 0;
}

.handle {
  color: #65676b;
  font-weight: 600;
  font-size: 15px;
}

.handle:hover { text-decoration: underline; }

.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.friends-count {
  color: #65676b;
  font-weight: 600;
  font-size: 15px;
  background: none;
  border: 0;
  padding: 0;
}

.friends-count:hover { text-decoration: underline; }

.facepile { display: flex; align-items: center; }

.facepile .pal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #fff;
  margin-left: -8px;
  background: #e4e6eb;
  padding: 0;
}

.facepile .pal:first-child { margin-left: 0; }
.facepile .pal svg { width: 100%; height: 100%; display: block; }

.identity-actions {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: #0866ff; color: #fff; }
.btn-primary:hover { background: #0756d4; }
.btn-secondary { background: #e4e6eb; color: #050505; }
.btn-secondary:hover { background: #d8dadf; }

.tabs {
  display: flex;
  align-items: stretch;
  height: 60px;
  margin: 0 16px;
  border-top: 1px solid #ced0d4;
}

.tab,
.tab-slot { flex: 1; min-width: 0; }

.tab-slot { position: relative; display: flex; }

.tab {
  position: relative;
  height: 100%;
  border: 0;
  background: transparent;
  color: #65676b;
  font-size: 15px;
  font-weight: 600;
  border-radius: 8px 8px 0 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
}

.tab svg { width: 12px; height: 12px; }
.tab:hover { background: #f2f2f2; }
.tab[aria-selected="true"] { color: #0866ff; }

.tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #0866ff;
  border-radius: 3px 3px 0 0;
}

.tab-slot .menu { top: calc(100% + 4px); right: 0; left: auto; min-width: 220px; }

/* ---------- columns ---------- */

.profile-body {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-body.feed-only {
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
}

.profile-body.feed-only .left-col { display: none; }

.left-col, .feed { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.card-pad { padding: 16px 16px 12px; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.card-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
}

.card-title.center { text-align: center; }

.see-all {
  background: none;
  border: 0;
  color: #0866ff;
  font-weight: 600;
  font-size: 15px;
  padding: 4px;
  border-radius: 4px;
}

.see-all:hover { background: #f2f2f2; text-decoration: underline; }

.bio {
  margin: 0 12px 14px;
  text-align: center;
  font-size: 15px;
}

.fact {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 14px;
  font-size: 15px;
}

.fact svg {
  width: 20px;
  height: 20px;
  flex: none;
  color: #65676b;
  margin-top: 1px;
}

.fact a { font-weight: 600; }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin: 4px 0 8px;
  padding-top: 8px;
  border-top: 1px solid #ced0d4;
  color: #050505;
}

.followed {
  margin: 8px 0 4px;
  color: #65676b;
  font-size: 15px;
}

.text-btn {
  background: none;
  border: 0;
  padding: 0;
  font-weight: 600;
  color: #050505;
}

.text-btn:hover { text-decoration: underline; }

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}

.photo-grid button,
.photo-wall button {
  display: block;
  padding: 0;
  border: 0;
  background: #f0f2f5;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
}

.photo-grid img,
.photo-wall img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.photo-grid img:hover,
.photo-wall img:hover,
.post-photo:hover,
.cover-hit:hover img,
.avatar:hover img { filter: brightness(0.96); }

.friend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 8px;
}

.friend-grid-lg { grid-template-columns: repeat(6, 1fr); gap: 16px 12px; }

.friend {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
  cursor: zoom-in;
}

.friend-photo {
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  background: #e4e6eb;
}

.friend-photo svg { width: 100%; height: 100%; display: block; }

.friend-name {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2308;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.subcount {
  margin: -6px 0 12px;
  color: #65676b;
  font-size: 15px;
}

/* ---------- composer + posts ---------- */

.composer-top {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 8px;
}

.mind {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 20px;
  background: #f0f2f5;
  color: #65676b;
  text-align: left;
  padding: 0 12px;
  font-size: 17px;
}

.mind:hover { background: #e4e6eb; }

.composer-tools {
  display: flex;
  margin: 0 12px;
  padding: 6px 0 8px;
  border-top: 1px solid #ced0d4;
}

.tool {
  flex: 1;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #65676b;
  font-weight: 600;
}

.tool:hover { background: #f2f2f2; }
.tool svg { width: 24px; height: 24px; }

.post-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 12px 12px 0 16px;
}

.post-avatar, .avatar-40, .avatar-32 {
  border-radius: 50%;
  object-fit: cover;
  background: #e4e6eb;
  flex: none;
  display: block;
}

.post-avatar, .avatar-40 { width: 40px; height: 40px; }
.avatar-32 { width: 32px; height: 32px; }

.pal {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: #e4e6eb;
}

.pal svg { width: 100%; height: 100%; display: block; }

.post-meta { min-width: 0; flex: 1; padding-top: 2px; }
.post-name { color: #050505; font-weight: 600; }
.post-name:hover { text-decoration: underline; }

.post-time {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #65676b;
  font-size: 13px;
  margin-top: 1px;
}

.post-time svg { width: 12px; height: 12px; }

.more-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #65676b;
  display: grid;
  place-items: center;
}

.more-btn:hover { background: #f2f2f2; }
.more-btn svg { width: 20px; height: 20px; }
.post-menu { top: 44px; right: 12px; min-width: 240px; }
.post { position: relative; }

.post-text {
  margin: 0;
  padding: 6px 16px 12px;
  font-size: 15px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post-photo {
  display: block;
  width: 100%;
  height: auto;
  background: #f0f2f5;
  cursor: zoom-in;
}

.post-stats {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 16px;
  padding: 10px 0;
  border-bottom: 1px solid #ced0d4;
  color: #65676b;
  font-size: 15px;
}

.react-count, .stat-links button {
  background: none;
  border: 0;
  color: #65676b;
  padding: 0;
  font-size: 15px;
}

.react-count { display: inline-flex; align-items: center; gap: 6px; }
.react-count:hover, .stat-links button:hover { text-decoration: underline; }
.stat-links { display: flex; gap: 10px; }

.reacts { display: inline-flex; }
.reacts i {
  width: 18px;
  height: 18px;
  margin-left: -4px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #f0f2f5;
  display: grid;
  place-items: center;
  font-style: normal;
  font-size: 11px;
  line-height: 1;
}
.reacts i:first-child { margin-left: 0; }

.post-actions {
  display: flex;
  padding: 4px 6px 2px;
}

.action-wrap { position: relative; flex: 1; display: flex; }

.action {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #65676b;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.action:hover { background: #f2f2f2; }
.action svg { width: 18px; height: 18px; }
.action .thumb { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.action.on[data-kind="like"] { color: #0866ff; }
.action.on[data-kind="like"] .thumb { fill: currentColor; stroke: none; }
.action.on[data-kind="love"] { color: #f33e58; }
.action.on[data-kind="haha"],
.action.on[data-kind="wow"],
.action.on[data-kind="sad"] { color: #f7b125; }
.action.on[data-kind="angry"] { color: #e9710f; }

.react-tray {
  position: absolute;
  left: 0;
  bottom: 42px;
  display: flex;
  gap: 2px;
  padding: 4px 6px;
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.04);
  z-index: 5;
}

.react-tray button {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  font-size: 26px;
  line-height: 1;
}

.react-tray button:hover { transform: scale(1.28) translateY(-6px); }

.comments { padding: 4px 16px 12px; }

.comment { display: flex; gap: 6px; margin-top: 8px; }
.comment-main { min-width: 0; }

.bubble {
  display: inline-block;
  max-width: 100%;
  background: #f0f2f5;
  border-radius: 18px;
  padding: 8px 12px;
}

.comment-name { color: #050505; font-weight: 600; display: block; }
.comment-name:hover { text-decoration: underline; }
.comment-text { overflow-wrap: anywhere; }

.comment-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 2px 0 0 12px;
  color: #65676b;
  font-size: 12px;
  font-weight: 700;
}

.mini {
  background: none;
  border: 0;
  padding: 0;
  color: #65676b;
  font-size: 12px;
  font-weight: 700;
}

.mini:hover { text-decoration: underline; }
.mini.on { color: #0866ff; }

.composer-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.comment-input {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: #f0f2f5;
  padding: 0 12px;
  min-width: 0;
}

.comment-input::placeholder { color: #65676b; }

.undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
}

.post.is-hidden .post-body { display: none; }

/* ---------- other panels ---------- */

.solo { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; }

.about-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.about-nav { padding: 8px; }

.about-nav a {
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  padding: 10px 8px;
  font-weight: 600;
  color: #050505;
}

.about-nav a:hover { background: #f0f2f5; text-decoration: none; }

.post, .solo, .profile-card, .about-block { scroll-margin-top: 72px; }

.photo-wall {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 8px;
}

.empty {
  padding: 48px 24px;
  text-align: center;
}

.empty h2 { margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0; color: #65676b; }

.footer {
  margin-top: 16px;
  padding: 8px 4px 12px;
  color: #65676b;
  font-size: 13px;
}

.x-foot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.x-foot svg { width: 14px; height: 14px; }

.fine-links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 6px; }

.fine-links button {
  background: none;
  border: 0;
  padding: 0;
  color: #65676b;
  font-size: 13px;
}

.fine-links button:hover { text-decoration: underline; }
.footer .legal { margin: 0; }

/* ---------- overlays ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(0, 0, 0, 0.92);
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 64px;
  grid-template-rows: auto minmax(0, 1fr) auto;
  align-items: center;
}

.lb-close, .lb-nav {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.24); }
.lb-close { position: absolute; top: 16px; right: 16px; z-index: 2; }
#lb-prev { grid-column: 1; grid-row: 2; justify-self: center; }
#lb-next { grid-column: 3; grid-row: 2; justify-self: center; }
.lb-nav:disabled { opacity: 0.25; cursor: default; }

.lb-frame {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  place-items: center;
  min-height: 0;
}

.lb-frame img, .lb-frame svg {
  max-width: min(1080px, 92vw);
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}

.lb-frame svg { width: min(520px, 80vw); height: auto; background: #111; border-radius: 12px; }

.lb-cap {
  grid-column: 1 / -1;
  grid-row: 3;
  color: #fff;
  text-align: center;
  margin: 0;
  padding: 8px 24px 20px;
  font-size: 15px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(244, 244, 244, 0.85);
  display: grid;
  place-items: center;
  padding: 16px;
}

.modal-card {
  width: min(500px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(0, 0, 0, 0.1);
}

.modal-head {
  position: relative;
  display: grid;
  place-items: center;
  height: 60px;
  border-bottom: 1px solid #ced0d4;
  font-size: 20px;
  font-weight: 700;
}

.modal-x {
  position: absolute;
  right: 12px;
  top: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #e4e6eb;
  color: #050505;
  font-size: 22px;
  line-height: 1;
}

.modal-x:hover { background: #d8dadf; }

.modal-user {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 16px 16px 0;
}

.modal-user img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.privacy { color: #65676b; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.privacy svg { width: 12px; height: 12px; }

.modal-card textarea {
  width: 100%;
  border: 0;
  resize: vertical;
  min-height: 150px;
  padding: 12px 16px 8px;
  font-size: 22px;
  line-height: 1.3;
}

.modal-card textarea::placeholder { color: #65676b; }

.modal-foot {
  display: flex;
  justify-content: flex-end;
  padding: 8px 16px 16px;
}

.modal-foot .btn[disabled] { background: #e4e6eb; color: #bcc0c4; cursor: not-allowed; }

.dock {
  position: fixed;
  right: 16px;
  bottom: 0;
  width: 328px;
  height: 455px;
  background: #fff;
  border-radius: 8px 8px 0 0;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  z-index: 60;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.dock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.dock-head img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.dock-head strong { display: block; font-size: 15px; }
.dock-status { color: #31a24c; font-size: 13px; font-weight: 600; }
.dock-head .modal-x { position: static; margin-left: auto; }

.dock-body {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
}

.msg {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 18px;
  line-height: 1.3333;
}

.msg.in { background: #f0f2f5; align-self: flex-start; }
.msg.out { background: #0866ff; color: #fff; align-self: flex-end; }

.dock-form {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid #ced0d4;
}

.dock-form input {
  flex: 1;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: #f0f2f5;
  padding: 0 12px;
  min-width: 0;
}

.dock-send {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: #0866ff;
  color: #fff;
  display: grid;
  place-items: center;
}

.dock-send[disabled] { background: #e4e6eb; color: #bcc0c4; }
.dock-send svg { width: 16px; height: 16px; }

.toast {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 75;
  background: #fff;
  color: #050505;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  padding: 12px 14px;
  font-weight: 600;
  max-width: min(360px, calc(100% - 32px));
}

@media (max-width: 1080px) {
  .topnav { grid-template-columns: minmax(0, 1fr) auto; }
  .nav-center { display: none; }
}

@media (max-width: 860px) {
  .profile-body,
  .profile-body.feed-only,
  .about-grid { grid-template-columns: 1fr; }
  .friend-grid-lg { grid-template-columns: repeat(3, 1fr); }
  .photo-wall { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .x-nav span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .x-nav { width: 40px; padding: 0; justify-content: center; }
  .wordmark { font-size: 24px; }

  .page { width: 100%; margin: 0; padding: 0 0 28px; }
  .profile-card { border-radius: 0; box-shadow: none; }
  .cover { height: 210px; border-radius: 0; }
  .avatar {
    width: 132px;
    height: 132px;
    left: 50%;
    top: 144px;
    transform: translateX(-50%);
  }
  .identity {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 78px 12px 12px;
    min-height: 0;
  }
  .identity-actions { margin-left: 0; width: 100%; }
  .identity-actions .btn { flex: 1; padding: 0 8px; }
  .profile-name { font-size: 24px; }
  .meta-row, .facepile { justify-content: center; }
  .tabs {
    margin: 0;
    overflow-x: auto;
    height: 48px;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab, .tab-slot { flex: none; }
  .tab { padding: 0 16px; }
  .profile-body { margin-top: 8px; gap: 8px; }
  .left-col, .feed, .stack { gap: 8px; }
  .card { border-radius: 0; }
  .tool span { display: none; }
  .dock { left: 0; right: 0; width: auto; height: min(70vh, 520px); border-radius: 12px 12px 0 0; }
  .footer { padding: 12px 16px 20px; }
  .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  .react-tray button:hover { transform: none; }
}

/* Contract address */
.ca-bar{display:flex;align-items:center;gap:8px;max-width:100%;margin:8px 0 4px;padding:4px 4px 4px 12px;background:#f0f2f5;border:1px solid #dadde1;border-radius:999px;width:fit-content}
.ca-label{font-weight:700;font-size:13px;color:#fff;background:#e41e3f;border-radius:6px;padding:2px 7px;flex:none}
.ca-value{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;color:#050505;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.ca-copy{display:inline-flex;align-items:center;gap:6px;flex:none;border:0;border-radius:999px;background:#0866ff;color:#fff;font-weight:600;font-size:14px;padding:7px 14px;cursor:pointer}
.ca-copy:hover{background:#0759e0}
.ca-copy svg{width:16px;height:16px}
.ca-copy.copied{background:#31a24c}
@media (max-width:700px){.ca-bar{margin-left:auto;margin-right:auto}.ca-value{max-width:46vw}}
