/* 集思广益 Next UI — design tokens mirror the supplied reference app. */
:root,
[data-theme="light"],
[data-theme="dark"] {
  color-scheme: light;
  --ink: #1e1c18;
  --muted: #777168;
  --paper: #fffdf8;
  --canvas: #f2eee5;
  --orange: #ff6734;
  --orange-deep: #e94b1b;
  --orange-soft: #ffe2d5;
  --green: #295846;
  --green-soft: #dfece4;
  --line: rgba(30, 28, 24, .11);
  --next-sidebar: 248px;
  --next-safe-top: max(env(safe-area-inset-top, 0px), var(--viewport-offset-top, 0px));
  --next-safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--viewport-obscured-bottom, 0px));
  --primary: #ff6734;
  --primary-solid: #ff6734;
  --accent: #ff6734;
  --bg: #f2eee5;
  --card: #fffdf8;
  --text: #1e1c18;
  --border: rgba(30, 28, 24, .11);
  --danger: #b74424;
  --danger-solid: #b74424;
  --success: #295846;
  --radius: 18px;
  --shadow: 0 16px 42px rgba(38, 31, 22, .075);
}

html { touch-action: pan-y; }
body.next-shell-ready {
  display: flex;
  min-width: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.next-shell-ready button,
body.next-shell-ready input,
body.next-shell-ready textarea,
body.next-shell-ready select { font-family: inherit; }
body.next-shell-ready :where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid rgba(255, 103, 52, .30);
  outline-offset: 2px;
}

/* Reference sidebar */
#next-sidebar {
  width: var(--next-sidebar);
  height: 100vh;
  height: 100dvh;
  height: var(--app-height, 100dvh);
  padding: 24px 16px 16px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  color: #fff;
  background: var(--ink);
}
.next-brand { padding: 0 7px; display: flex; align-items: center; gap: 10px; }
.next-brand > span {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 12px;
  color: #fff;
  background: var(--orange);
  font-family: serif;
  font-size: 17px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(255, 103, 52, .22);
}
.next-brand b { font-size: 17px; letter-spacing: -.02em; }
.next-brand small { display: block; margin-top: 1px; color: rgba(255,255,255,.31); font-size: 7px; letter-spacing: .14em; }
#next-sidebar-close { display: none; }
.next-workspace { margin: 26px 5px 0; padding: 14px; border: 1px solid rgba(255,255,255,.08); border-radius: 15px; background: rgba(255,255,255,.045); }
.next-workspace > small { display: block; margin-bottom: 8px; color: rgba(255,255,255,.34); font-size: 8px; font-weight: 760; letter-spacing: .08em; }
.next-workspace .home-cohort-switcher { width: 100%; max-width: none; margin: 0; }
.next-workspace .home-cohort-switcher select {
  height: 38px;
  padding: 0 30px 0 10px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  background-color: rgba(255,255,255,.075);
  font-size: 10px;
}
.next-workspace .home-cohort-switcher svg { right: 8px; color: rgba(255,255,255,.48); }
.next-nav-label { margin: 24px 18px 7px; color: rgba(255,255,255,.27); font-size: 8px; font-weight: 800; letter-spacing: .11em; }
#next-main-nav { display: grid; gap: 7px; }
.next-nav-item {
  width: 100%;
  min-height: 48px;
  padding: 0 13px;
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  border: 0;
  border-radius: 13px;
  color: rgba(255,255,255,.48);
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: .2s;
}
.next-nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.next-nav-item.active { color: #fff; background: rgba(255,255,255,.10); }
.next-nav-item > span { width: 18px; height: 18px; color: #ff9270; }
.next-nav-item svg { width: 18px; height: 18px; }
.next-nav-item b { font-size: 11px; }
.next-nav-item small {
  min-width: 22px;
  padding: 4px 6px;
  border-radius: 999px;
  color: #ffc6b4;
  background: rgba(255,103,52,.17);
  font-size: 8px;
  text-align: center;
}
.next-account {
  margin-top: auto;
  width: 100%;
  padding: 11px;
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) 18px;
  gap: 9px;
  align-items: center;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.055);
  text-align: left;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.next-account-avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #26523f; background: #cfe6d8 center/cover; font-size: 13px; font-weight: 820; }
.next-account > span:nth-child(2) { min-width: 0; }
.next-account b,.next-account small { overflow: hidden; display: block; text-overflow: ellipsis; white-space: nowrap; }
.next-account b { font-size: 10px; }
.next-account small { margin-top: 3px; color: rgba(255,255,255,.30); font-size: 7px; }
.next-account i { color: rgba(255,255,255,.45); font-size: 15px; font-style: normal; transition: transform .18s; }
.next-account[aria-expanded="true"] i { transform: rotate(180deg); }
.next-account-menu {
  position: absolute;
  z-index: 4;
  left: 16px;
  right: 16px;
  bottom: 82px;
  padding: 9px;
  overflow: auto;
  max-height: min(570px,calc(100vh - 110px));
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 17px;
  color: #fff;
  background: #2a2824;
  box-shadow: 0 24px 60px rgba(0,0,0,.42);
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.next-account-menu[hidden],.next-account-admin[hidden] { display: none !important; }
.next-account-menu-title { padding: 8px 10px 5px; color: rgba(255,255,255,.32); font-size: 8px; font-weight: 820; letter-spacing: .10em; }
.next-account-action { width: 100%; min-height: 41px; padding: 0 10px; display: grid; grid-template-columns: 22px 1fr 12px; align-items: center; gap: 8px; border: 0; border-radius: 10px; color: rgba(255,255,255,.72); background: transparent; text-align: left; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.next-account-action:hover { color: #fff; background: rgba(255,255,255,.07); }
.next-account-action > span { width: 16px; height: 16px; color: #ff9a76; }
.next-account-action svg { width: 16px; height: 16px; }
.next-account-action b { font-size: 10px; }
.next-account-action i { color: rgba(255,255,255,.28); font-size: 15px; font-style: normal; }
.next-account-action.danger { color: #ffad94; }
.next-account-menu-divider { height: 1px; margin: 7px 4px; background: rgba(255,255,255,.08); }
#next-sidebar-overlay { display: none; }
#next-sidebar-edge { display: none; }

/* Desktop header and page frame */
body.next-shell-ready > .top-nav {
  min-height: 104px;
  margin-left: var(--next-sidebar);
  padding: 22px clamp(28px, 4vw, 58px);
  position: relative;
  flex: 0 0 auto;
  z-index: 26;
  justify-content: flex-start;
  gap: 14px;
  color: var(--ink);
  background: rgba(242, 238, 229, .92);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.next-header-copy { margin-right: auto; }
.next-header-copy small { display: block; color: var(--orange-deep); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.next-header-copy h1 { margin: 5px 0 0; color: var(--ink); font-size: clamp(23px, 2.3vw, 32px); line-height: 1.05; letter-spacing: -.045em; }
#next-menu-button { display: none; }
#next-mobile-cohort { display: none; }
.top-nav #nav-logo { display: none !important; }
.top-nav .nav-actions { display: none; }
.top-nav .back-btn { order: 5; min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.55); font-size: 11px; }
body.next-shell-ready > #pages-wrap { margin-left: var(--next-sidebar); background: var(--canvas); }
body.next-shell-ready .page { padding: 27px clamp(24px, 4vw, 58px) 72px; background: var(--canvas); }
body.next-shell-ready .container { width: 100%; max-width: 1120px; padding: 0; }
body.next-shell-ready .bottom-nav { display: none !important; }

/* Shared reference cards */
body.next-shell-ready .card,
body.next-shell-ready .auth-card,
body.next-shell-ready .write-form {
  border: 1px solid rgba(255,255,255,.84);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
body.next-shell-ready .card { padding: 20px; margin-bottom: 16px; }
body.next-shell-ready .btn { border-radius: 11px; }
body.next-shell-ready .btn-primary,
body.next-shell-ready .btn-accent { color: #fff; background: var(--orange); box-shadow: 0 10px 22px rgba(233,75,27,.18); }
body.next-shell-ready .btn-outline { border: 1px solid var(--line); color: var(--ink); background: #fff; }

/* Real feed */
#page-home { padding: 0; }
#page-home .home-scroll { padding: 27px clamp(24px,4vw,58px) 74px; }
#page-home .home-scroll > .container { max-width: 1120px; }
#next-feed-heading { margin: 7px 0 15px; display: flex; align-items: end; justify-content: space-between; gap: 18px; }
#next-feed-heading small { color: var(--orange-deep); font-size: 8px; font-weight: 850; letter-spacing: .12em; }
#next-feed-heading h2 { margin: 4px 0 0; font-size: 22px; letter-spacing: -.035em; }
#next-feed-heading p { color: var(--muted); font-size: 10px; }
#feed-list:not(:has(.landing)) { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
#feed-list > .loading,
#feed-list > .empty-state { grid-column: 1 / -1; }
#feed-list .post-card { min-width: 0; height: auto; margin: 0; padding: 20px; align-self: start; border-radius: 19px; transition: transform .18s, box-shadow .18s, border-color .18s; }
#feed-list.next-date-groups:not(:has(.landing)) { display: block; }
.next-day-group + .next-day-group { margin-top: 22px; }
.next-day-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
.next-day-divider {
  margin: 0 2px 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
}
.next-day-divider time { font-size: 13px; font-weight: 850; letter-spacing: -.02em; white-space: nowrap; }
.next-day-divider span { color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .05em; white-space: nowrap; }
.next-day-divider::after { height: 1px; flex: 1; content: ''; background: linear-gradient(90deg,rgba(255,103,52,.32),var(--line)); }
#feed-list .post-card:hover { border-color: rgba(255,103,52,.18); box-shadow: 0 19px 46px rgba(38,31,22,.11); transform: translateY(-2px); }
.post-card .post-author { font-size: 12px; }
.post-card .post-time { color: #9a938a; font-size: 9px; }
.post-card .post-title { margin: 15px 0 8px; font-size: 18px; line-height: 1.35; letter-spacing: -.025em; }
.post-card .post-excerpt { color: var(--muted); font-size: 12px; line-height: 1.7; }
.post-card .post-footer { margin-top: 15px; padding-top: 12px; border-color: var(--line); }
.post-stat { color: #8f897f; font-size: 10px; }
.post-stat svg { width: 14px; height: 14px; }
.post-like-stat.liked { color: var(--orange-deep); }
.post-cohort-badge { max-width: 44%; border-color: rgba(255,103,52,.16); color: #9b3c1c; background: #fff0e9; font-size: 8px; }
.post-thumb-strip { gap: 6px; margin-top: 13px; }
.post-thumb-strip img { width: 74px; height: 74px; border-radius: 10px; }
.post-card-likers { font-size: 9px; }
#announce-bar { max-width: 1120px; margin: 0 auto; padding: 0 0 13px; }
.announce-inner { min-height: 60px; padding: 12px 16px; border: 1px solid rgba(255,103,52,.13); border-left: 4px solid var(--orange); border-radius: 16px; background: #fff8f2; box-shadow: 0 10px 28px rgba(38,31,22,.05); }
.announce-label { color: var(--orange-deep); font-size: 9px; }
.announce-text { font-size: 11px; }
#filter-bar { max-width: 1120px; margin: 0 auto; padding: 0 0 14px; }
.filter-chip { min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: #7f776e; background: var(--paper); font-size: 10px; }
.filter-chip.active { color: #9b3c1c; border-color: rgba(255,103,52,.30); background: var(--orange-soft); }
.next-content-tabs { width: fit-content; margin: 0 0 18px; padding: 4px; display: flex; gap: 3px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,253,248,.72); }
.next-content-tabs[hidden] { display: none !important; }
.next-content-tabs button { min-height: 34px; padding: 0 15px; border: 0; border-radius: 9px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 750; }
.next-content-tabs button.active { color: #fff; background: var(--ink); box-shadow: 0 6px 16px rgba(30,28,24,.16); }
#page-following .next-content-tabs { margin-bottom: 20px; }

/* Landing/auth contains no invented social content */
.landing { max-width: 1040px; margin: 0 auto; padding: 8px 0 40px; }
.landing-hero { padding: 36px; border: 1px solid rgba(255,255,255,.84); border-radius: 24px; background: var(--paper); box-shadow: var(--shadow); }
.landing-logo > span,.landing-logo { color: var(--ink); }
.landing-logo strong { color: var(--orange); }
.landing-logo img { box-shadow: 0 8px 20px rgba(255,103,52,.20); }
.landing-features { margin-top: 16px; display: grid; grid-template-columns: repeat(3,1fr); }
.landing-feature { border: 1px solid rgba(255,255,255,.84); border-radius: 18px; box-shadow: var(--shadow); }
.landing-feature-icon { background: var(--orange-soft); }
.landing-guide { border: 1px solid rgba(255,255,255,.84); border-radius: 18px; box-shadow: var(--shadow); }
.landing-guide-num { background: var(--orange); }
.auth-wrap { max-width: 440px; margin: 30px auto; }
.auth-logo h1 { color: var(--ink); }
.auth-logo h1 span { color: var(--orange); }
.auth-card { padding: 29px; }
.auth-card h2 { letter-spacing: -.025em; }
.auth-footer a,.auth-forgot a { color: var(--orange-deep); }

/* Detail: original post, translation and comments are all real API data. */
#page-detail .container { max-width: 900px; }
#page-detail .card:first-child { padding: 28px; }
#page-detail .detail-title { margin: 22px 0 13px; font-size: clamp(25px,3vw,36px); letter-spacing: -.04em; }
#page-detail .detail-body { color: #3d3933; font-size: 15px; line-height: 1.9; }
#page-detail .detail-meta { margin: 0; }
.detail-author-name { font-size: 12px; }
.detail-translate-btn { border: 1px solid rgba(255,103,52,.22); color: var(--orange-deep); background: #fff2eb; }
#page-detail .detail-actions { margin: 22px -28px 0; padding: 14px 28px 0; border-color: var(--line); }
.action-btn.liked { color: var(--orange-deep); }
.ai-translation-note { margin: 14px 0 0; padding: 10px 12px; border-radius: 11px; color: #7f6c61; background: #fff2eb; text-align: left; }
.ai-translation-note button { color: var(--orange-deep); }
.comments-section { padding: 24px !important; }
.comments-section h3 { font-size: 18px; }
.comment-item { padding: 14px 0; border-color: var(--line); }
.comment-author { font-size: 12px; }
.comment-time { font-size: 9px; }
.comment-text { font-size: 13px; }
.comment-form,.reply-compose { border-radius: 13px; background: #f7f2e9; }

/* Writer */
#page-write .container { max-width: 980px; }
#page-write .write-form { padding: 27px; }
#write-page-title { font-size: 26px !important; letter-spacing: -.035em; }
.write-cohort-group { border: 1px solid rgba(255,103,52,.16); border-radius: 14px; background: #fff7f2; }
.form-group label { color: #6a635a; font-size: 9px; letter-spacing: .08em; }
.form-group input,.form-group textarea,.form-group select { border: 1px solid var(--line); border-radius: 12px; color: var(--ink); background: #fff; }
.form-group input:focus,.form-group textarea:focus,.form-group select:focus { border-color: rgba(255,103,52,.62); box-shadow: 0 0 0 4px rgba(255,103,52,.08); }
.markdown-toolbar { border-color: var(--line); border-radius: 12px 12px 0 0; background: #f7f2e9; }
.markdown-toolbar + textarea { border-radius: 0 0 12px 12px; }
.attach-btn { border-color: rgba(255,103,52,.35); color: var(--orange-deep); background: #fff7f2; }
.write-actions { position: sticky; bottom: 0; z-index: 5; margin: 20px -8px -8px; padding: 12px 8px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,253,248,.92); backdrop-filter: blur(12px); }

/* Profile, notifications and management pages */
#page-me .container,#page-following .container,#page-notifications .container,#page-messages .container,#page-user-profile > div { max-width: 980px; margin-inline: auto; }
.me-profile-card { padding: 22px !important; }
.me-stats-card { padding: 0 !important; }
.me-stat-num { color: var(--orange-deep); }
.me-settings-card { overflow: hidden; }
.me-settings-row:hover { background: #faf5ed; }
.cohort-chip.active { color: #9b3c1c; border-color: rgba(255,103,52,.30); background: var(--orange-soft); }
.role-badge-super,.role-badge-cohort { color: #fff; background: var(--green); }
.email-verification-card { border-color: rgba(255,103,52,.18) !important; background: #fff7f2 !important; }
.email-verification-icon { color: var(--orange-deep); background: var(--orange-soft); }
.notification-item,.conversation-item,.following-item,.admin-user-card,.admin-cohort-card { border: 1px solid rgba(255,255,255,.84); box-shadow: var(--shadow); }
.notification-item.unread { border-color: rgba(255,103,52,.18); background: #fff8f3; }
.message-partner-search { border-color: var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.message-privacy-toggle input { accent-color: var(--orange); }
.chat-shell { max-width: 980px; margin: auto; overflow: hidden; border: 1px solid rgba(255,255,255,.84); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow); }
.chat-message-row.mine .chat-bubble { background: var(--orange); }
.chat-compose { border-color: var(--line); background: var(--paper); }

/* Personal space: profile, owned content and settings are distinct tasks. */
.next-profile-tabs { margin: 0 0 20px; padding: 5px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 4px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,253,248,.72); }
.next-profile-tabs button { min-height: 39px; padding: 0 12px; border: 0; border-radius: 10px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 760; }
.next-profile-tabs button.active { color: #fff; background: var(--ink); box-shadow: 0 7px 18px rgba(30,28,24,.17); }
.next-profile-intro { margin: 2px 0 19px; }
.next-profile-intro small { color: var(--orange-deep); font-size: 8px; font-weight: 850; letter-spacing: .13em; }
.next-profile-intro h2 { margin: 5px 0 4px; font-size: 24px; letter-spacing: -.035em; }
.next-profile-intro p { margin: 0; color: var(--muted); font-size: 11px; }
body[data-next-profile-view="overview"] #page-me [data-next-profile-section]:not([data-next-profile-section~="overview"]),
body[data-next-profile-view="content"] #page-me [data-next-profile-section]:not([data-next-profile-section~="content"]),
body[data-next-profile-view="settings"] #page-me [data-next-profile-section]:not([data-next-profile-section~="settings"]) { display: none !important; }
body[data-next-profile-view="content"] #page-me #profile-drafts-section { scroll-margin-top: 110px; }
body[data-next-profile-view="content"] #page-me #profile-posts { scroll-margin-top: 110px; }

/* Modals and sheets */
.edit-sheet,.share-card-modal { border-color: rgba(255,255,255,.76); background: var(--paper); box-shadow: 0 24px 80px rgba(20,17,13,.28); }
.sheet-mask { background: rgba(10,9,8,.46); backdrop-filter: blur(3px); }
#toast { background: var(--ink); }
#back-to-top { right: 28px; bottom: 88px; color: #fff; background: var(--green); }

/* Floating write action, matching the reference launcher. */
#next-floating-write {
  position: fixed;
  z-index: 115;
  right: 24px;
  bottom: 24px;
  min-height: 52px;
  padding: 0 18px 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--orange);
  box-shadow: 0 12px 34px rgba(173,55,20,.28);
  transition: transform .2s, background .2s, box-shadow .2s;
}
#next-floating-write:hover { transform: translateY(-3px) scale(1.02); background: #f3532c; box-shadow: 0 16px 38px rgba(173,55,20,.34); }
#next-floating-write span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-size: 25px; font-weight: 300; }
#next-floating-write b { font-size: 11px; }
#next-floating-write[hidden] { display: none !important; }

/* Auth pages intentionally hide the application shell. */
body.next-auth-page #next-sidebar,
body.next-auth-page #next-sidebar-overlay,
body.next-auth-page #next-sidebar-edge,
body.next-auth-page > .top-nav { display: none !important; }
body.next-auth-page > #pages-wrap { margin-left: 0; }
body.next-auth-page .page { padding-top: 20px; }

@media (min-width: 1400px) {
  :root { --next-sidebar: clamp(260px,14vw,286px); }
  body.next-shell-ready .container,#page-home .home-scroll > .container,#announce-bar,#filter-bar { max-width: 1260px; }
  #feed-list:not(:has(.landing)) { grid-template-columns: repeat(3,minmax(0,1fr)); }
  #feed-list.next-date-groups:not(:has(.landing)) { display: block; }
}

@media (min-width: 901px) {
  /* Each day owns an independent masonry grid, so notes from adjacent dates
     never interleave even when their card heights are very different. */
  .next-day-group + .next-day-group { margin-top: 28px; }
  .next-day-divider { margin: 0 0 13px; gap: 10px; }
  .next-day-divider time { font-size: 14px; font-weight: 850; letter-spacing: -.02em; }
  .next-day-grid {
    --next-masonry-gap: 16px;
    grid-template-columns: repeat(2,minmax(0,1fr));
    grid-auto-flow: row dense;
    grid-auto-rows: 1px;
    column-gap: 16px;
    row-gap: 0;
  }
  .next-day-grid > .post-card { align-self: start; }
}

@media (min-width: 1400px) {
  .next-day-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 900px) {
  #feed-list:not(:has(.landing)) { grid-template-columns: 1fr; }
  .landing-features { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  :root {
    --next-sidebar: 272px;
    --next-fab-size: 54px;
    --next-fab-gap: 12px;
    --next-fab-bottom: calc(18px + var(--next-safe-bottom));
  }
  body.next-shell-ready { display: flex; }
  #next-sidebar { width: var(--next-sidebar); padding-top: calc(22px + var(--next-safe-top)); padding-bottom: calc(16px + var(--next-safe-bottom)); transform: translateX(-100%); transition: transform .22s ease; }
  body.next-sidebar-dragging #next-sidebar { transition: none; }
  body.next-sidebar-open #next-sidebar { transform: translateX(0); }
  #next-sidebar-close { width: 31px; height: 31px; margin-left: auto; display: grid; place-items: center; border: 0; border-radius: 9px; color: #fff; background: rgba(255,255,255,.07); font-size: 18px; }
  #next-sidebar-overlay { position: fixed; z-index: 129; inset: 0; width: 100%; height: 100dvh; height: var(--app-height, 100dvh); border: 0; background: rgba(10,9,8,.46); backdrop-filter: blur(3px); transition: opacity .18s; }
  body.next-sidebar-open #next-sidebar-overlay { display: block; }
  #next-sidebar-edge { position: fixed; z-index: 128; inset: calc(72px + var(--next-safe-top)) auto 0 0; width: 24px; display: block; touch-action: pan-y; }
  body.next-sidebar-open #next-sidebar-edge { display: none; }
  .next-workspace { margin-top: 22px; }
  .next-nav-label { margin-top: 20px; }
  .next-account-menu { max-height: min(530px,calc(var(--app-height, 100dvh) - 116px - var(--next-safe-top))); bottom: calc(82px + var(--next-safe-bottom)); }
  .next-account-action { min-height: 48px; }
  body.next-shell-ready > .top-nav {
    min-height: calc(72px + var(--next-safe-top));
    margin-left: 0;
    padding: calc(11px + var(--next-safe-top)) 15px 11px;
    position: relative;
    top: auto;
    flex: 0 0 auto;
    gap: 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(242,238,229,.93);
    box-shadow: 0 8px 22px rgba(38,31,22,.07);
  }
  #next-menu-button { width: 39px; height: 39px; padding: 10px; order: 0; display: grid; place-content: center; gap: 4px; flex: none; border: 1px solid var(--line); border-radius: 11px; color: var(--ink); background: #fff; }
  #next-menu-button span { width: 16px; height: 1.5px; display: block; background: currentColor; }
  .next-header-copy { min-width: 0; order: 2; }
  .next-header-copy small { font-size: 7px; }
  .next-header-copy h1 { max-width: 126px; overflow: hidden; font-size: 19px; text-overflow: ellipsis; white-space: nowrap; }
  #next-mobile-cohort { max-width: min(43vw,176px); min-height: 36px; margin-left: auto; padding: 0 10px 0 12px; order: 3; display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,103,52,.18); border-radius: 11px; color: #8f3b20; background: #fff8f3; }
  #next-mobile-cohort[hidden] { display: none !important; }
  body:not([data-next-page="home"]) #next-mobile-cohort { display: none; }
  #next-mobile-cohort span { min-width: 0; overflow: hidden; font-size: 9px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
  #next-mobile-cohort i { color: var(--orange-deep); font-size: 13px; font-style: normal; }
  .top-nav .back-btn { width: 37px; min-width: 37px; height: 37px; padding: 0; order: 1; justify-content: center; font-size: 0; }
  .top-nav .back-btn svg { width: 18px; }
  body.next-shell-ready > #pages-wrap { margin-left: 0; }
  body.next-shell-ready .page { padding: 18px 15px calc(110px + var(--next-safe-bottom)); }
  #page-home .home-scroll { padding: 18px 15px calc(136px + var(--next-safe-bottom)); }
  #next-feed-heading { margin-top: 3px; }
  #next-feed-heading h2 { font-size: 18px; }
  #next-feed-heading p { max-width: 42%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #feed-list .post-card { padding: 17px; border-radius: 17px; }
  .post-card .post-title { font-size: 17px; }
  .post-card .post-excerpt { font-size: 13px; }
  #announce-bar,#filter-bar { padding-left: 0; padding-right: 0; }
  #page-detail .card:first-child { padding: 20px; }
  #page-detail .detail-title { font-size: 25px; }
  #page-detail .detail-actions { margin-left: -20px; margin-right: -20px; padding-left: 20px; padding-right: 20px; }
  #page-write .write-form { padding: 19px; }
  .write-actions { position: sticky; bottom: 0; }
  .chat-shell { border-radius: 0; }
  #next-floating-write { width: var(--next-fab-size); height: var(--next-fab-size); min-height: var(--next-fab-size); right: 18px; bottom: var(--next-fab-bottom); padding: 0; justify-content: center; }
  #next-floating-write span { width: auto; height: auto; background: transparent; font-size: 30px; }
  #next-floating-write b { display: none; }
  #back-to-top { width: var(--next-fab-size); height: var(--next-fab-size); right: 18px; bottom: calc(var(--next-fab-bottom) + var(--next-fab-size) + var(--next-fab-gap)); }
  #back-to-top svg { width: 22px; height: 22px; }
  .landing-hero { padding: 26px 16px; }
  .auth-wrap { margin: 18px auto; padding: 0; }
  .auth-card { padding: 24px 20px; }
  .next-content-tabs { width: 100%; margin-bottom: 15px; }
  .next-content-tabs button { flex: 1; }
  .next-profile-tabs { position: sticky; z-index: 6; top: -7px; margin: -2px 0 17px; padding: 4px; background: rgba(242,238,229,.94); backdrop-filter: blur(12px); }
  .next-profile-tabs button { min-height: 37px; padding: 0 6px; font-size: 9px; }
  .next-profile-intro h2 { font-size: 21px; }
}

@media (max-width: 420px) {
  .next-header-copy h1 { max-width: 104px; }
  #next-mobile-cohort { max-width: 42vw; }
  #next-feed-heading p { display: none; }
  .post-card .post-footer { gap: 13px; }
  .detail-translate-btn { padding: 7px 9px; }
}
