:root {
  --bg: #f7f9fa;
  --panel: #ffffff;
  --line: #edf0f3;
  --line-strong: #e5e8ee;
  --text: #2f3034;
  --muted: #8b8e9d;
  --soft: #c5c6cb;
  --link: #567895;
  --teal: #16b998;
  --teal-soft: rgba(22, 185, 152, 0.08);
  --orange: #f57f59;
  --orange-2: #fda956;
  --violet-soft: rgba(144, 142, 222, 0.1);
  --shadow: 0 18px 45px rgba(30, 40, 55, 0.12);
  --topbar-h: 50px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", Tahoma, Helvetica, Arial, "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.72;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

button,
a {
  color: inherit;
}

button {
  border: 0;
  background: transparent;
  cursor: pointer;
}

a {
  text-decoration: none;
}

.topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: 160px 70px 274px minmax(320px, 900px) minmax(290px, 1fr);
  align-items: center;
  column-gap: 0;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.search-wrap {
  grid-column: 4;
}

.header-actions {
  grid-column: 5;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding-left: 24px;
  color: #0c9f84;
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  width: 18px;
  height: 18px;
  border: 3px solid var(--teal);
  border-right-color: transparent;
  border-radius: 50%;
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  right: -5px;
  top: -1px;
  width: 5px;
  height: 5px;
  background: var(--teal);
  border-radius: 50%;
}

.note-pill {
  width: 64px;
  height: 24px;
  border: 1px solid rgba(253, 169, 86, 0.45);
  background: rgba(253, 169, 86, 0.12);
  color: #b96f3f;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1;
}

.search-wrap {
  position: relative;
  height: 32px;
  display: flex;
  align-items: center;
  background: #f5f6fa;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.search-wrap.focused {
  background: var(--panel);
  border-color: var(--line-strong);
}

.search-wrap input {
  width: 100%;
  height: 30px;
  padding: 0 42px 0 16px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
}

.search-wrap input::placeholder {
  color: var(--soft);
}

.search-icon {
  position: absolute;
  right: 10px;
  width: 18px;
  height: 18px;
}

.search-icon::before {
  content: "";
  position: absolute;
  inset: 2px 5px 5px 2px;
  border: 2px solid #d1d5df;
  border-radius: 50%;
}

.search-icon::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 3px;
  width: 7px;
  height: 2px;
  background: #d1d5df;
  transform: rotate(45deg);
  border-radius: 2px;
}

.search-segments {
  display: none;
  flex: 0 0 auto;
  height: 32px;
  align-items: center;
  padding-right: 4px;
  background: var(--panel);
}

.search-wrap.focused input {
  padding-right: 12px;
}

.search-wrap.focused .search-icon {
  display: none;
}

.search-wrap.focused .search-segments {
  display: inline-flex;
}

.scope {
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.scope.active {
  color: var(--teal);
  background: var(--teal-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  height: 50px;
  padding: 0 24px 0 16px;
  color: #36516e;
}

.header-actions a {
  white-space: nowrap;
}

.rank-btn {
  height: 26px;
  padding: 0 11px 0 26px;
  background: var(--orange-2);
  color: var(--panel);
  border-radius: 4px;
  position: relative;
}

.rank-btn::before {
  content: "";
  position: absolute;
  left: 9px;
  top: 7px;
  width: 11px;
  height: 11px;
  background: currentColor;
  clip-path: polygon(50% 0, 64% 35%, 100% 35%, 70% 56%, 82% 100%, 50% 76%, 18% 100%, 30% 56%, 0 35%, 36% 35%);
}

.round-icon,
.icon-btn {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
}

.round-icon::before,
.round-icon::after {
  content: "";
  position: absolute;
}

.round-icon.chat::before {
  inset: 5px;
  border: 2px solid #23252b;
  border-radius: 50%;
}

.round-icon.chat::after {
  left: 12px;
  top: 12px;
  width: 4px;
  height: 4px;
  background: #23252b;
  border-radius: 50%;
  box-shadow: 7px 0 0 #23252b;
}

.round-icon.bell::before {
  left: 8px;
  top: 5px;
  width: 12px;
  height: 14px;
  border: 2px solid #23252b;
  border-radius: 9px 9px 5px 5px;
}

.round-icon.bell::after {
  left: 12px;
  bottom: 4px;
  width: 6px;
  height: 2px;
  background: #23252b;
  border-radius: 2px;
}

.round-icon.bell span {
  position: absolute;
  right: 2px;
  top: 2px;
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: var(--panel);
  font-size: 12px;
  font-weight: 700;
  background: #55759c;
  overflow: hidden;
}

.avatar.small {
  width: 30px;
  height: 30px;
  background: #506580;
}

.user-avatar {
  background: #2f506f;
  border: 2px solid #e9edf2;
}

.mobile-menu {
  display: none;
  margin-left: 8px;
}

.icon-lines,
.icon-lines::before,
.icon-lines::after {
  position: absolute;
  left: 6px;
  width: 18px;
  height: 2px;
  background: #4a5668;
  border-radius: 2px;
}

.icon-lines {
  top: 14px;
}

.icon-lines::before,
.icon-lines::after {
  content: "";
  left: 0;
}

.icon-lines::before {
  top: -6px;
}

.icon-lines::after {
  top: 6px;
}

.page-shell {
  max-width: 1622px;
  margin: 0 auto;
  padding: var(--topbar-h) 48px 0;
  display: grid;
  grid-template-columns: 303px 900px 303px;
  gap: 10px;
}

.left-rail,
.right-rail {
  position: sticky;
  top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow: hidden;
}

.rail-scroll {
  height: 100%;
  overflow-y: auto;
  padding: 10px 0 24px;
  scrollbar-width: thin;
}

.current-feed,
.group-section a,
.rank-mini button,
.more-content a {
  width: 100%;
  min-height: 30px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-radius: 3px;
  color: var(--muted);
  text-align: left;
}

.current-feed {
  margin: 14px 0 14px;
  color: #7d8795;
}

.section-title,
.rank-mini h3,
.more-content h3 {
  width: 100%;
  height: 28px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: #b0b4bf;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}

.section-title span {
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #b8bdc8;
}

.group-section {
  padding-bottom: 12px;
}

.group-section a {
  position: relative;
  color: #6d7481;
}

.group-section a.active {
  color: var(--teal);
  font-weight: 500;
}

.group-section em {
  margin-left: auto;
  min-width: 18px;
  height: 16px;
  padding: 0 4px;
  background: #d77850;
  color: var(--panel);
  border-radius: 4px;
  font-style: normal;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

.group-section strong {
  margin-left: auto;
  color: var(--orange);
  font-size: 12px;
  font-weight: 400;
}

.rank-mini,
.more-content {
  border-top: 1px solid #e7ebef;
  padding: 10px 0 0;
}

.rank-mini h3,
.more-content h3 {
  margin: 0;
}

.rank-mini button {
  justify-content: space-between;
}

.mini-faces {
  display: inline-flex;
  width: 48px;
  height: 18px;
  background:
    radial-gradient(circle at 9px 9px, #90d474 0 7px, transparent 8px),
    radial-gradient(circle at 24px 9px, #d3e9ff 0 7px, transparent 8px),
    radial-gradient(circle at 39px 9px, #766b90 0 7px, transparent 8px);
}

.mini-faces.alt {
  filter: hue-rotate(42deg);
}

.mini-faces.third {
  filter: hue-rotate(110deg);
}

.feed {
  min-width: 0;
  padding-top: 10px;
}

.composer-card,
.menu-card,
.sticky-card,
.task-strip,
.post-card {
  background: var(--panel);
  border-radius: 2px;
}

.composer-card {
  min-height: 150px;
  padding: 20px;
}

.composer-head {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  background: #fafbfc;
  color: var(--soft);
}

.composer-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 60px;
  padding-top: 10px;
  color: #8990a2;
}

.tool {
  position: relative;
  width: 22px;
  height: 22px;
  color: #8f95a6;
  font-size: 18px;
  font-weight: 600;
  line-height: 22px;
}

.tool.smile::before {
  content: "";
  position: absolute;
  inset: 2px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.tool.smile::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 9px;
  width: 8px;
  height: 4px;
  border-bottom: 2px solid currentColor;
  border-radius: 0 0 8px 8px;
}

.tool.image::before,
.tool.file::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.tool.image::after {
  content: "";
  position: absolute;
  left: 6px;
  bottom: 6px;
  width: 10px;
  height: 8px;
  background: currentColor;
  clip-path: polygon(0 100%, 35% 45%, 55% 70%, 75% 35%, 100% 100%);
}

.tool.file::before {
  border-radius: 1px;
}

.tool.file::after {
  content: "";
  position: absolute;
  right: 5px;
  top: 5px;
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.tool.hash {
  font-weight: 700;
}

.divider {
  width: 1px;
  height: 16px;
  background: var(--line-strong);
  margin-left: -8px;
}

.article-btn {
  height: 30px;
  padding-left: 21px;
  color: #5b6980;
  position: relative;
}

.article-btn::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 13px;
  height: 12px;
  border: 1px solid currentColor;
  transform: skew(-12deg);
}

.menu-card {
  margin-top: 5px;
  padding: 12px 20px 10px;
}

.tab-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tab {
  min-height: 26px;
  padding: 0 10px;
  color: #5d6472;
  background: #f5f6f7;
  border-radius: 2px;
  white-space: nowrap;
}

.tab.active {
  background: #3f4b62;
  color: var(--panel);
  font-weight: 600;
}

.tab.active::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  vertical-align: -1px;
  background: var(--orange-2);
  clip-path: polygon(50% 0, 63% 34%, 100% 34%, 70% 56%, 82% 100%, 50% 76%, 18% 100%, 30% 56%, 0 34%, 37% 34%);
}

.sticky-card {
  min-height: 54px;
  margin-top: 5px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  overflow: hidden;
}

.sticky-label {
  color: var(--teal);
  border: 1px solid var(--teal);
  padding: 1px 6px;
  border-radius: 2px;
  justify-self: start;
}

.media-label {
  font-weight: 700;
  justify-self: start;
}

.sticky-card p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-strip {
  position: relative;
  margin-top: 5px;
  padding: 10px 70px 10px 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.task-card {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px;
  background: #f7f6ff;
  border-radius: 3px;
  color: #4a4f63;
  overflow: hidden;
}

.task-card span {
  width: 14px;
  height: 14px;
  border: 2px solid #908ede;
  border-radius: 2px;
}

.task-card p {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.task-card button {
  height: 24px;
  padding: 0 8px;
  color: #536fc5;
  background: #fff;
  border-radius: 2px;
}

.expand-tasks {
  position: absolute;
  right: 18px;
  top: 14px;
  color: var(--link);
}

.result-note {
  margin-top: 5px;
  padding: 8px 16px;
  background: var(--panel);
  color: var(--muted);
  border-radius: 2px;
}

.post-list {
  margin-top: 5px;
}

.post-card {
  position: relative;
  margin-bottom: 5px;
  padding: 10px;
  overflow: hidden;
}

.post-card.expanded {
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.48);
  z-index: 20;
}

.post-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 56px;
}

.post-meta strong {
  display: block;
  color: #567895;
  font-weight: 600;
  line-height: 20px;
}

.post-meta time {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 16px;
}

.post-more {
  margin-left: auto;
  width: 30px;
  height: 30px;
  color: var(--soft);
  position: relative;
}

.post-more::before {
  content: "...";
  position: absolute;
  inset: 0;
  font-size: 22px;
  letter-spacing: 1px;
  line-height: 14px;
}

.seal {
  position: absolute;
  right: 35px;
  top: 14px;
  width: 54px;
  height: 54px;
  border: 2px solid rgba(245, 127, 89, 0.25);
  color: rgba(245, 127, 89, 0.27);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform: rotate(18deg);
  font-weight: 700;
  font-size: 12px;
}

.post-body {
  padding-left: 56px;
  padding-right: 20px;
}

.post-title {
  margin: 0 0 6px;
  color: #0f1722;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.post-body p {
  margin: 0 0 14px;
  color: #151a23;
  line-height: 1.78;
  overflow-wrap: anywhere;
}

.post-card:not(.expanded) .extra-copy {
  display: none;
}

.show-all {
  display: inline-flex;
  color: var(--link);
  padding: 2px 0 12px;
}

.post-card.expanded .show-all {
  display: none;
}

.tag-list {
  display: flex;
  gap: 6px;
  padding-left: 56px;
  margin: 4px 0 10px;
}

.tag-badge {
  min-height: 21px;
  padding: 0 7px;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(22, 185, 152, 0.4);
  border-radius: 2px;
  font-size: 12px;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 26px;
  padding-left: 56px;
  height: 32px;
  color: #b5bac4;
}

.action {
  position: relative;
  width: 22px;
  height: 22px;
}

.action.like::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 10px;
  height: 14px;
  border: 2px solid currentColor;
  border-top: 0;
  transform: skew(-10deg);
}

.action.comment::before {
  content: "";
  position: absolute;
  inset: 4px 3px 6px;
  border: 2px solid currentColor;
  border-radius: 4px;
}

.action.star::before {
  content: "";
  position: absolute;
  inset: 3px;
  background: currentColor;
  clip-path: polygon(50% 0, 62% 34%, 100% 36%, 70% 56%, 80% 100%, 50% 76%, 20% 100%, 30% 56%, 0 36%, 38% 34%);
}

.action.report::before {
  content: "!";
  position: absolute;
  inset: 3px;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 12px;
  line-height: 14px;
  text-align: center;
  font-weight: 700;
}

.action.share::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 9px;
  width: 14px;
  height: 9px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(35deg);
}

.action.share::after {
  content: "";
  position: absolute;
  right: 3px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.action.active,
.post-actions .active {
  color: var(--orange);
}

.likes-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 20px 10px 56px;
  color: #b4b7c2;
  font-size: 12px;
}

.like-faces {
  display: flex;
}

.like-faces span {
  width: 30px;
  height: 30px;
  border: 2px solid var(--panel);
  margin-left: -6px;
}

.like-faces span:first-child {
  margin-left: 0;
}

.comments {
  margin: 0 20px 0 56px;
  padding: 8px 12px;
  background: #fbfbfc;
  border-radius: 3px;
}

.comment-item {
  padding: 8px 0;
  color: #30333b;
  border-bottom: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.comment-item:last-child {
  border-bottom: 0;
}

.comment-item strong {
  color: #567895;
  font-weight: 600;
}

.comment-item time {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.comment-box-input {
  margin: 12px 20px 0 56px;
  display: none;
  gap: 8px;
}

.post-card.commenting .comment-box-input {
  display: flex;
}

.comment-box-input input {
  flex: 1;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  padding: 0 10px;
  outline: none;
}

.comment-box-input button {
  min-width: 58px;
  height: 32px;
  color: var(--panel);
  background: var(--teal);
  border-radius: 3px;
}

.right-rail {
  display: block;
  padding-top: 10px;
}

.right-rail .preview-card {
  align-self: auto;
}

.right-rail .timeline {
  position: absolute;
  top: 10px;
  right: 0;
}

.preview-card {
  width: 250px;
  background: var(--panel);
  border-radius: 3px;
  margin-bottom: 10px;
  overflow: hidden;
}

.group-info-card {
  position: relative;
}

.cover-art {
  position: relative;
  height: 200px;
  display: grid;
  place-items: center;
  color: #e8d2af;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.18), transparent 36%, rgba(0, 0, 0, 0.2)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.07) 0 1px, transparent 1px 58px),
    #057763;
  overflow: hidden;
}

.cover-art::before {
  content: "真实 复盘 增长 变现 AI";
  position: absolute;
  inset: 0;
  color: rgba(0, 0, 0, 0.14);
  font-size: 28px;
  font-weight: 800;
  line-height: 2.1;
  word-spacing: 22px;
  padding: 8px;
}

.cover-symbol {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 6px solid #e8d2af;
  border-radius: 50%;
  font-size: 34px;
  font-weight: 900;
}

.cover-art strong,
.cover-art small {
  position: absolute;
  z-index: 1;
  left: 20px;
}

.cover-art strong {
  bottom: 45px;
  font-size: 28px;
  color: #f0ddbd;
}

.cover-art small {
  bottom: 22px;
  color: rgba(240, 221, 189, 0.75);
}

.owner-badge {
  position: absolute;
  right: 20px;
  top: 172px;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  background: #d9433a;
  color: #f1c57d;
  border: 4px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.created {
  margin: 0;
  padding: 8px 20px 0;
  color: var(--muted);
  font-size: 12px;
}

.group-info-card h2 {
  margin: 3px 20px 6px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-size: 20px;
  font-weight: 500;
}

.rank-label {
  margin-left: 20px;
  min-height: 28px;
  padding: 0 10px;
  background: var(--orange);
  color: var(--panel);
  border-radius: 3px;
  font-size: 13px;
  line-height: 1.4;
  white-space: normal;
  text-align: left;
}

.desc {
  margin: 8px 20px 0;
  color: #5a5c66;
  font-size: 13px;
  line-height: 1.65;
}

.link-btn {
  color: var(--link);
  font-size: 13px;
}

.group-info-card .link-btn {
  margin: 4px 20px 16px;
}

.ask-card,
.content-card {
  padding: 12px 20px;
}

.ask-card h3,
.content-card h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 500;
}

.ask-card > p {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
  color: #b0b5bf;
  font-size: 12px;
}

.mentor {
  display: grid;
  grid-template-columns: 40px 1fr 28px;
  gap: 10px;
  align-items: center;
  min-height: 56px;
}

.mentor div {
  min-width: 0;
}

.mentor strong,
.mentor small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mentor small {
  color: var(--muted);
  font-size: 12px;
}

.mentor button {
  width: 26px;
  height: 26px;
  color: var(--teal);
  border: 1px solid rgba(22, 185, 152, 0.35);
  border-radius: 7px;
}

.avatar.red {
  background: #db534c;
}

.avatar.blue {
  background: #5b8fc9;
}

.avatar.pink {
  background: #c98498;
}

.content-card h3 span {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 4px;
  color: var(--panel);
  background: var(--orange);
  border-radius: 3px;
  font-size: 10px;
}

.content-link {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.content-link strong,
.content-link small {
  display: block;
}

.content-link small {
  color: var(--muted);
}

.timeline {
  padding-top: 0;
}

.timeline button {
  position: relative;
  display: block;
  width: 43px;
  height: 36px;
  color: #b5bac5;
  text-align: left;
  padding-left: 10px;
}

.timeline button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 3px;
  height: 24px;
  background: #d7dae2;
}

.timeline button.active {
  height: 28px;
  padding-left: 8px;
  color: var(--panel);
  background: #505564;
  border-radius: 0 4px 4px 0;
}

.timeline button.active::before {
  display: none;
}

.float-actions {
  position: fixed;
  right: 18px;
  top: 134px;
  display: grid;
  gap: 10px;
  z-index: 30;
}

.float-btn {
  position: relative;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  box-shadow: 0 8px 16px rgba(20, 30, 45, 0.06);
}

.float-btn.service,
.float-btn.notes {
  border-radius: 8px;
}

.float-btn.grid::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 14px;
  width: 6px;
  height: 6px;
  border: 2px solid #ff92ad;
  box-shadow: 12px 0 0 -2px #ff92ad, 0 12px 0 -2px #ff92ad, 12px 12px 0 -2px #ff92ad;
}

.float-btn.magic {
  background: #f48aa5;
}

.float-btn.magic::before {
  content: "AI";
  position: absolute;
  inset: 0;
  color: var(--panel);
  font-weight: 800;
  line-height: 44px;
  text-align: center;
}

.float-btn.service::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 3px solid #7e8795;
  border-radius: 50%;
  border-right-color: transparent;
}

.float-btn.notes::before {
  content: "";
  position: absolute;
  inset: 11px 12px;
  border: 3px solid #7e8795;
  border-radius: 2px;
}

.float-btn.notes::after {
  content: "";
  position: absolute;
  left: 17px;
  top: 19px;
  width: 10px;
  height: 2px;
  background: #7e8795;
  box-shadow: 0 5px 0 #7e8795;
}

.composer-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.composer-modal.open {
  display: block;
}

.modal-scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.modal-panel {
  position: relative;
  width: min(900px, calc(100vw - 40px));
  min-height: 256px;
  margin: 60px auto 0;
  background: var(--panel);
  border-radius: 3px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header {
  height: 50px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.close-btn {
  position: relative;
  width: 28px;
  height: 28px;
  margin-left: auto;
}

.close-btn::before,
.close-btn::after {
  content: "";
  position: absolute;
  left: 14px;
  top: 7px;
  width: 2px;
  height: 16px;
  background: #c6cad3;
  border-radius: 2px;
}

.close-btn::before {
  transform: rotate(45deg);
}

.close-btn::after {
  transform: rotate(-45deg);
}

.editor-area {
  min-height: 142px;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0;
  padding: 20px;
}

.editor {
  min-height: 110px;
  padding: 4px 0 0 0;
  outline: none;
  color: #222832;
}

.editor:empty::before {
  content: attr(data-placeholder);
  color: var(--soft);
}

.modal-footer {
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  border-top: 1px solid var(--line);
}

.editor-tools {
  display: flex;
  align-items: center;
  gap: 24px;
}

.poster-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--link);
  font-size: 13px;
}

.poster-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.counter {
  color: #a9aeba;
  font-size: 12px;
}

.publish-btn {
  min-width: 52px;
  height: 28px;
  color: var(--panel);
  background: var(--teal);
  border-radius: 2px;
}

.mobile-backdrop {
  display: none;
}

@media (max-width: 1500px) {
  .topbar {
    grid-template-columns: 160px 70px 20px minmax(360px, 1fr) auto;
  }

  .page-shell {
    max-width: none;
    grid-template-columns: 260px minmax(620px, 1fr) 293px;
    padding-left: 20px;
    padding-right: 20px;
  }

  .right-rail .timeline {
    display: none;
  }
}

@media (max-width: 1280px) {
  .topbar {
    grid-template-columns: 160px 70px 20px minmax(260px, 1fr) minmax(250px, auto);
  }

  .page-shell {
    grid-template-columns: 260px minmax(620px, 900px);
    justify-content: center;
    padding-left: 20px;
    padding-right: 20px;
  }

  .right-rail {
    display: none;
  }
}

@media (max-width: 920px) {
  .topbar {
    grid-template-columns: 44px 1fr minmax(160px, 46vw) auto;
  }

  .search-wrap,
  .header-actions {
    grid-column: auto;
  }

  .mobile-menu {
    display: block;
  }

  .brand {
    padding-left: 0;
  }

  .brand-text {
    font-size: 18px;
  }

  .note-pill,
  .header-actions a,
  .rank-btn {
    display: none;
  }

  .header-actions {
    gap: 4px;
    padding-right: 8px;
  }

  .page-shell {
    display: block;
    padding-inline: 8px;
  }

  .left-rail {
    position: fixed;
    z-index: 90;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(320px, 86vw);
    height: 100vh;
    background: var(--panel);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

  .left-rail.open {
    transform: translateX(0);
  }

  .mobile-backdrop.open {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(0, 0, 0, 0.36);
  }

  .rail-scroll {
    padding-top: 58px;
  }

  .feed {
    width: calc(100vw - 16px);
    max-width: 900px;
    margin: 0 auto;
  }

  .post-body,
  .tag-list,
  .post-actions,
  .likes-row,
  .comments,
  .comment-box-input {
    padding-left: 0;
    margin-left: 0;
  }

  .post-body {
    padding-right: 0;
  }

  .task-strip {
    grid-template-columns: 1fr;
    padding-right: 20px;
  }

  .expand-tasks {
    display: none;
  }
}

@media (max-width: 640px) {
  :root {
    --topbar-h: 54px;
  }

  body {
    font-size: 13px;
  }

  .topbar {
    height: 54px;
    grid-template-columns: 40px 118px 1fr 84px;
  }

  .brand-text {
    font-size: 16px;
  }

  .brand-mark {
    width: 16px;
    height: 16px;
  }

  .search-wrap {
    height: 34px;
  }

  .search-wrap input {
    padding-left: 10px;
  }

  .search-segments {
    position: absolute;
    top: 38px;
    right: 0;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 10px 22px rgba(40, 50, 65, 0.12);
  }

  .header-actions .round-icon.chat,
  .header-actions .round-icon.bell {
    display: none;
  }

  .composer-card {
    min-height: 126px;
    padding: 12px;
  }

  .composer-card,
  .menu-card,
  .sticky-card,
  .task-strip,
  .post-card {
    max-width: 100%;
    overflow: hidden;
  }

  .composer-head {
    height: 58px;
    padding: 0 12px;
  }

  .composer-actions {
    height: 44px;
    gap: 14px;
  }

  .menu-card {
    padding: 10px 12px;
  }

  .tab {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .sticky-card {
    grid-template-columns: auto auto;
    align-items: start;
    padding: 10px 12px;
  }

  .sticky-card p {
    grid-column: 1 / -1;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .post-card {
    padding: 12px;
  }

  .post-header {
    gap: 9px;
  }

  .seal {
    display: none;
  }

  .post-actions {
    gap: 18px;
    flex-wrap: wrap;
    height: auto;
    min-height: 32px;
  }

  .float-actions {
    right: 10px;
    top: auto;
    bottom: 14px;
    grid-auto-flow: column;
  }

  .float-btn {
    width: 40px;
    height: 40px;
  }

  .float-btn.magic::before {
    line-height: 40px;
  }

  .modal-panel {
    width: calc(100vw - 18px);
    margin-top: 70px;
  }

  .editor-area {
    grid-template-columns: 34px 1fr;
    padding: 16px 14px;
  }

  .modal-footer {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 14px 14px;
  }

  .editor-tools {
    flex-wrap: wrap;
    gap: 16px;
  }

  .counter,
  .publish-btn {
    justify-self: end;
  }
}

.api-status {
  margin-left: auto;
  min-height: 24px;
  padding: 2px 8px;
  color: #0c7f69;
  background: rgba(22, 185, 152, 0.1);
  border: 1px solid rgba(22, 185, 152, 0.24);
  border-radius: 3px;
  font-size: 12px;
  white-space: nowrap;
}

.api-status.offline {
  color: #9a5a23;
  background: rgba(253, 169, 86, 0.14);
  border-color: rgba(253, 169, 86, 0.32);
}

.empty-state {
  padding: 28px;
}

.empty-state h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.admin-body {
  background: #f5f7fa;
  color: #202630;
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.admin-topbar .brand {
  height: auto;
  padding-left: 0;
}

.admin-nav {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-nav a,
.admin-nav button {
  min-height: 32px;
  padding: 0 12px;
  color: #42526a;
  background: #f3f5f8;
  border-radius: 4px;
}

.admin-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 22px auto 48px;
}

.admin-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-hero h1 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

.admin-hero p {
  margin: 0;
  color: var(--muted);
}

#adminStatus {
  flex: 0 0 auto;
  padding: 4px 10px;
  color: #0c7f69;
  background: rgba(22, 185, 152, 0.1);
  border-radius: 999px;
  font-size: 12px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.metric-card {
  min-height: 94px;
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.metric-card span,
.metric-card strong {
  display: block;
}

.metric-card span {
  color: var(--muted);
  font-size: 12px;
}

.metric-card strong {
  margin-top: 8px;
  color: #111827;
  font-size: 24px;
  line-height: 1.2;
}

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

.admin-panel {
  min-height: 260px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-panel h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.admin-list {
  display: grid;
  gap: 8px;
}

.admin-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.admin-row:last-child {
  border-bottom: 0;
}

.admin-row strong,
.admin-row small {
  display: block;
}

.admin-row strong {
  color: #263041;
  line-height: 1.45;
}

.admin-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 920px) {
  .admin-topbar {
    padding: 0 14px;
  }

  .admin-hero {
    display: block;
  }

  #adminStatus {
    display: inline-block;
    margin-top: 12px;
  }

  .admin-metrics,
  .admin-grid {
    grid-template-columns: 1fr;
  }
}

/* Auth & Payment Overlays */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  padding: 20px;
}

.auth-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  padding: 32px 24px;
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-logo {
  display: inline-block;
  width: 48px;
  height: 48px;
  background: var(--teal);
  border-radius: 12px;
  margin-bottom: 12px;
}

.auth-logo::before {
  content: "TP";
  color: white;
  font-size: 20px;
  font-weight: 800;
  line-height: 48px;
}

.auth-header h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #1e293b;
}

.auth-header p {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.form-group input {
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0 12px;
  outline: none;
  font-size: 14px;
  background: #f8fafc;
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: var(--teal);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(22, 185, 152, 0.15);
}

.auth-submit-btn {
  height: 40px;
  color: white;
  background: var(--teal);
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  transition: opacity 0.2s;
}

.auth-submit-btn:hover {
  opacity: 0.9;
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  margin: 14px 0 0;
  color: var(--muted);
}

.auth-switch a {
  color: var(--teal);
  font-weight: 600;
  text-decoration: none;
}

/* Payment card specific */
.payment-card {
  width: min(520px, 100%);
}

.payment-icon {
  display: inline-block;
  width: 48px;
  height: 48px;
  background: var(--orange);
  border-radius: 50%;
  margin-bottom: 12px;
}

.payment-icon::before {
  content: "💳";
  font-size: 24px;
  line-height: 48px;
}

.plan-selector {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
}

.plan-card {
  border: 2px solid var(--line-strong);
  border-radius: 8px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s;
  background: #f8fafc;
}

.plan-card:hover {
  border-color: var(--teal);
}

.plan-card.active {
  border-color: var(--teal);
  background: rgba(22, 185, 152, 0.05);
}

.plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.plan-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e293b;
}

.plan-header .price {
  font-size: 18px;
  font-weight: 800;
  color: var(--teal);
}

.plan-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.payment-btn {
  margin-bottom: 8px;
}

.logout-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--line-strong);
}

.logout-btn:hover {
  background: #e2e8f0;
}

/* Google Auth & Divider Styles */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line-strong);
}

.auth-divider:not(:empty)::before {
  margin-right: .75em;
}

.auth-divider:not(:empty)::after {
  margin-left: .75em;
}

.google-auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 40px;
  background: #ffffff;
  color: #1e293b;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
  box-sizing: border-box;
}

.google-auth-btn:hover {
  background: #f8fafc;
}

.google-icon {
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z" fill="%234285F4"/><path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.56-2.77c-.98.66-2.23 1.06-3.72 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z" fill="%2334A853"/><path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.06H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.94l2.85-2.22.81-.63z" fill="%23FBBC05"/><path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.06l3.66 2.84c.87-2.6 3.3-4.52 6.16-4.52z" fill="%23EA4335"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  display: inline-block;
}

.post-actions .action.download-btn-style {
  color: var(--teal);
  background: rgba(22, 185, 152, 0.08);
  border: 1px solid rgba(22, 185, 152, 0.2);
  border-radius: 4px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: all 0.2s;
  height: 26px;
  width: auto;
}

.post-actions .action.download-btn-style:hover {
  background: var(--teal);
  color: white;
}

.post-actions .action.download-btn-style::before {
  content: "📥";
  font-size: 11px;
}



