:root {
  --bg: #f4efe6;
  --panel: #fffdf8;
  --ink: #1c1917;
  --muted: #6f6b63;
  --line: #d7d0c4;
  --accent: #a92d35;
  --accent-strong: #7f2028;
  --teal: #66766b;
  --amber: #8b642b;
  --blue: #415f72;
  --shadow: 0 20px 60px rgba(55, 44, 32, 0.08);
  --paper: #fcfaf5;
  --paper-deep: #eee7da;
  --serif:
    Georgia, "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", SimSun, "Yu Mincho",
    "Hiragino Mincho ProN", serif;
  --sans:
    Inter, "Segoe UI", "Microsoft YaHei", "Hiragino Sans GB", "Noto Sans CJK SC", Arial, sans-serif;
}

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  min-width: 0;
  text-rendering: optimizeLegibility;
}

button,
select,
input,
textarea {
  font-family: inherit;
}

button,
a,
select,
input,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: #ead1cf;
  color: var(--ink);
}

.app-shell {
  width: min(1500px, calc(100% - 44px));
  padding: 18px 0 52px;
}

.auth-screen {
  min-height: 100dvh;
  background: var(--bg);
}

.auth-card {
  position: relative;
  width: min(480px, 100%);
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 2px;
  background: var(--paper);
  padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--shadow);
}

.auth-feedback,
.empty-state {
  border-radius: 0;
  background: rgba(255, 253, 248, 0.72);
}

.auth-brand {
  justify-content: center;
  text-align: center;
}

.auth-brand .brand-mark {
  width: 54px;
  height: 54px;
}

.auth-brand h1 {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-brand p {
  max-width: 32ch;
  line-height: 1.55;
}

.settings-form,
.profile-form,
.verification-active-form,
.space-form {
  gap: 16px;
}

.form-field,
.select-field,
.range-field {
  gap: 7px;
}

.form-field > span:first-child,
.select-field > span:first-child,
.range-field > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.form-field input,
.form-field select,
.form-field textarea,
.select-field select,
.password-control,
.site-comment-form textarea,
.direct-message-form textarea,
.direct-search-row input {
  border-color: #cfc6b7;
  border-radius: 2px;
  background: #fffefb;
  color: var(--ink);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.select-field select:focus,
.site-comment-form textarea:focus,
.direct-message-form textarea:focus,
.direct-search-row input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(169, 45, 53, 0.1);
}

.password-toggle {
  border-left-color: var(--line);
  background: var(--paper-deep);
}

.icon-button,
.primary-action,
.ghost-action,
.tab,
.category-tab,
.user-menu-button,
.account-dialog-tab {
  border-radius: 2px;
}

.primary-action {
  border-color: var(--accent);
  background: var(--accent);
  font-weight: 800;
}

.primary-action:hover {
  background: var(--accent-strong);
}

.ghost-action,
.icon-button,
.user-menu-button {
  border-color: var(--line);
  background: var(--paper);
}

.ghost-action:hover,
.icon-button:hover,
.user-menu-button:hover {
  border-color: #a99f90;
  background: var(--paper-deep);
}

.mobile-header-action {
  display: none;
}

.mobile-messages-switcher {
  display: none;
}

.mobile-message-dot-stack {
  position: absolute;
  top: 7px;
  left: calc(50% + 5px);
  width: 8px;
  height: 8px;
  pointer-events: none;
}

.mobile-message-dot {
  position: absolute;
  inset: 0;
  display: block;
  width: 8px;
  height: 8px;
  overflow: hidden;
  border: 1px solid var(--paper);
  border-radius: 50%;
  background: var(--accent);
  font-size: 0;
  line-height: 0;
}

.topbar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto minmax(340px, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 112px;
  margin: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 3px double var(--ink);
  padding: 15px 2px;
}

.edition-kicker {
  justify-self: start;
  max-width: 24ch;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.18em;
  line-height: 1.5;
  text-transform: uppercase;
}

.topbar .brand {
  justify-self: center;
  gap: 12px;
  text-align: left;
}

.topbar .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 2px;
}

.topbar .brand h1 {
  font-family: var(--serif);
  font-size: clamp(32px, 3vw, 43px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.topbar .brand p {
  max-width: 34ch;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.top-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.top-actions button {
  white-space: nowrap;
}

body[data-auth="public"] .top-actions {
  display: flex;
}

body[data-auth="public"] .top-actions .auth-only {
  display: none !important;
}

.language-field select {
  min-height: 40px;
  border-color: var(--line);
  border-radius: 2px;
  background-color: var(--paper);
}

.user-menu-button.is-active,
.user-menu-button[aria-current="page"] {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.user-badge {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-avatar {
  background: var(--ink);
}

.tabs {
  align-items: stretch;
  justify-content: center;
  gap: clamp(12px, 2.3vw, 34px);
  margin: 0 0 26px;
  border-bottom: 1px solid var(--line);
}

.tab {
  position: relative;
  min-height: 48px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 4px;
  font-size: 13px;
  font-weight: 800;
}

.tab::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
  content: "";
}

.tab:hover,
.tab.is-active {
  transform: none;
  background: transparent;
  color: var(--ink);
}

.tab.is-active::after,
.tab[aria-current="page"]::after {
  background: var(--accent);
}

.nav-unread-badge,
.direct-total-unread,
.direct-conversation-unread {
  background: var(--accent);
}

.feed-switcher {
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  align-items: center;
  gap: 22px;
  margin: 0 0 28px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0 0 16px;
  box-shadow: none;
}

.category-field {
  display: none;
}

.country-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.country-field > span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.country-field select {
  min-height: 42px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background-color: transparent;
  padding-left: 2px;
}

.category-tabs {
  gap: 20px;
  padding: 0 1px;
}

.category-tab {
  position: relative;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 1px;
}

.category-tab::after {
  position: absolute;
  right: 0;
  bottom: 1px;
  left: 0;
  height: 2px;
  background: transparent;
  content: "";
}

.category-tab:hover,
.category-tab.is-active {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.category-tab.is-active::after {
  background: var(--accent);
}

.section-heading {
  align-items: flex-end;
  margin: 0 0 6px;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 11px;
}

.section-heading h2,
.listen-stage h2,
.settings-block h2,
.space-page-heading h1 {
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.section-heading h2 {
  font-size: clamp(25px, 2.2vw, 32px);
}

.feed-heading-actions {
  gap: 10px;
  color: var(--muted);
  font-size: 11px;
}

.feed-heading-actions .compact {
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 0 2px;
  font-weight: 800;
}

.source-selector {
  margin-bottom: 22px;
}

.source-card {
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-radius: 0;
  background: var(--paper-deep);
  padding: 20px;
  box-shadow: none;
}

.source-card span {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.source-card strong {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 29px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.source-card small {
  max-width: 46ch;
  line-height: 1.65;
}

.article-list,
.compact-list {
  gap: 0;
}

.article-card,
.compact-list .article-card {
  position: relative;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 21px 10px 21px 7px;
  box-shadow: none;
}

.article-card:hover {
  background: rgba(238, 231, 218, 0.48);
}

.article-card.is-active,
.article-card[aria-current="true"] {
  border-left-color: var(--accent);
  background: var(--paper-deep);
}

.rank,
.editorial-sequence {
  width: auto;
  height: auto;
  min-height: 38px;
  place-items: start center;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
}

.editorial-sequence {
  min-height: 22px;
  padding-top: 2px;
  color: var(--accent);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.article-main {
  display: block;
  min-width: 0;
}

.article-title {
  display: block;
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(18px, 1.55vw, 22px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.42;
}

.recommendation-card:first-child .article-title {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1.32;
}

.article-original-title {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: #817b72;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.summary-line {
  margin-top: 10px;
  color: #4e4a45;
  font-size: 13px;
  line-height: 1.62;
}

.recommendation-tags {
  gap: 9px;
  margin: 0 0 9px;
}

.recommendation-tags span {
  min-height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--teal);
  padding: 0;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.recommendation-tags span + span::before {
  margin-right: 9px;
  color: var(--line);
  content: "/";
}

.article-card .meta {
  margin-top: 11px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.rank-change {
  right: 9px;
  bottom: 9px;
  min-width: auto;
  min-height: auto;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 10px;
}

.rank-change.up,
.rank-change.down {
  background: transparent;
}

.detail-column {
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 10px 0 64px clamp(28px, 4vw, 60px);
  box-shadow: none;
}

.detail-header {
  gap: 13px;
  margin-bottom: 28px;
}

.detail-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pill {
  min-height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 10px;
  letter-spacing: 0.08em;
}

.pill.status-error,
.pill.status-warn,
.pill.status-neutral {
  background: transparent;
}

.detail-header h2 {
  max-width: 22em;
  font-family: var(--serif);
  font-size: clamp(34px, 3.35vw, 52px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.14;
  text-wrap: balance;
}

.detail-original-title {
  max-width: 72ch;
  border-left: 2px solid var(--line);
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.detail-header > .meta {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.notice {
  border-color: #d8aaa5;
  border-radius: 2px;
  background: #fbefeb;
}

.article-image {
  max-height: 480px;
  border-radius: 0;
  background: var(--paper-deep);
}

.body-text {
  max-width: 72ch;
  gap: 18px;
  color: #302d29;
  font-size: 17.5px;
  line-height: 1.92;
}

.body-text p + p {
  margin-top: 2px;
}

.source-short-note {
  max-width: 72ch;
  border-left-color: var(--teal);
  background: var(--paper-deep);
}

.comments-block,
.site-discussion,
.space-comments-section,
.related-opinions,
.original-block {
  max-width: 78ch;
  margin-top: 34px;
  border-top: 3px double var(--line);
  padding-top: 20px;
}

.comments-block h3,
.site-discussion h3,
.site-comment-list h4,
.related-opinions h3 {
  font-family: var(--serif);
  font-size: 21px;
}

.comment-item,
.key-point,
.viewpoint,
.script-item {
  padding-top: 14px;
}

.comment-rank {
  border-radius: 0;
  background: var(--paper-deep);
  font-family: var(--serif);
}

.comment-metrics span,
.comment-source-label,
.reaction-button {
  border-radius: 2px;
}

.comment-source-label.external {
  background: #f8e9e4;
}

.comment-source-label.internal {
  background: #e9f0ea;
}

.reaction-button.is-active {
  border-color: var(--accent);
  background: #f5e7e4;
}

.site-comment,
.space-comment,
.related-opinion-card {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 12px 0;
}

.site-comment.is-mine,
.space-comment.is-reply {
  background: rgba(238, 231, 218, 0.44);
}

.original-block summary {
  color: var(--accent);
}

.mobile-back-button {
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 0 1px;
  font-weight: 800;
}

.space-column,
.notifications-column,
.messages-column,
.listen-column {
  min-width: 0;
}

.space-toolbar {
  align-items: end;
  margin-bottom: 22px;
  border-bottom: 1px solid #b9aa97;
  padding-bottom: 16px;
}

.space-page-heading h1 {
  margin: 3px 0;
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
}

.space-page-title-mobile {
  display: none;
}

.space-page-heading p {
  max-width: 58ch;
  margin: 0;
  color: var(--muted);
}

.space-page-kicker,
.social-module-kicker {
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.space-toolbar-actions {
  align-self: center;
}

.space-toolbar-actions .primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 118px;
  min-height: 46px;
}

.space-view-nav {
  gap: clamp(20px, 3vw, 38px);
  margin-bottom: 18px;
  padding: 0;
}

.space-view-nav .ghost-action {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 1px;
  box-shadow: none;
}

.space-view-nav .ghost-action::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: transparent;
  content: "";
}

.space-view-nav .ghost-action:hover,
.space-view-nav .ghost-action[aria-current="page"] {
  color: var(--ink);
}

.space-view-nav .ghost-action[aria-current="page"]::after {
  background: var(--accent);
}

.space-profile-card {
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-deep);
  padding: 20px;
  box-shadow: none;
}

.space-editorial-list {
  border: 0;
  background: transparent;
  padding: 0;
}

.space-editorial-list > .section-heading {
  align-items: end;
  margin-bottom: 0;
  border-bottom: 1px solid var(--ink);
  padding: 0 4px 12px;
}

.space-editorial-list > .section-heading h2,
.notification-page-heading h2 {
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
}

.space-editorial-list.is-editorial-discover > .section-heading {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.space-editorial-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 190px;
  gap: 24px;
}

.space-column:not([data-space-mode="discover"]) .space-editorial-grid {
  display: block;
  max-width: 980px;
  margin: 0 auto;
}

.space-editorial-sidebar,
.space-contributors {
  align-self: start;
  min-width: 0;
}

.space-desk-stats {
  display: grid;
  margin: 0;
}

.space-desk-stats > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  border-bottom: 1px solid #d5cabc;
  padding: 0 8px;
}

.space-desk-stats > div.is-primary {
  border-left: 3px solid var(--accent);
  color: var(--accent-strong);
}

.space-desk-stats dt,
.space-desk-stats dd {
  margin: 0;
  font-weight: 500;
}

.space-desk-stats dd {
  font-family: var(--serif);
  font-size: 16px;
}

.space-desk-topic {
  display: grid;
  gap: 7px;
  margin-top: 18px;
  border-top: 3px solid var(--ink);
  background: var(--paper-deep);
  padding: 14px 10px;
}

.space-desk-topic > span,
.space-desk-topic > small {
  color: var(--muted);
}

.space-desk-topic > strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.space-editorial-main {
  min-width: 0;
}

.space-feed {
  gap: 0;
}

.space-profile-avatar {
  border-radius: 2px;
  background: var(--ink);
  font-family: var(--serif);
}

.space-post,
.message-item {
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 24px 4px;
}

.space-post.is-editorial-lead {
  border-top: 4px solid var(--accent);
  border-bottom-color: #b9aa97;
  padding: 20px 0 22px;
}

.space-editorial-label {
  display: inline-block;
  width: fit-content;
  margin-bottom: 10px;
  background: var(--ink);
  color: #fffaf0;
  padding: 4px 8px;
  font-size: 12px;
}

.space-editorial-kicker {
  grid-column: 1;
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.03em;
}

.space-post.is-editorial-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 124px;
  column-gap: 18px;
  padding: 17px 0;
}

.space-post.is-editorial-row > :not(.space-post-header) {
  grid-column: 1;
}

.space-post.is-editorial-row .space-post-header {
  grid-column: 2;
  grid-row: 1 / span 8;
}

.space-post.is-editorial-row .space-post-title {
  margin-top: 4px;
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 500;
}

.space-post.is-editorial-lead .space-post-title {
  font-size: clamp(26px, 2.7vw, 34px);
  font-weight: 500;
}

.space-post.is-editorial-lead .space-post-body,
.space-post.is-editorial-lead .space-post-summary,
.space-post.is-editorial-row .space-post-body,
.space-post.is-editorial-row .space-post-summary {
  margin: 10px 0 0;
  border-left: 0;
  padding-left: 0;
  color: #665e55;
  line-height: 1.65;
}

.space-post.is-editorial-lead .space-post-header {
  justify-content: flex-start;
  margin-top: 14px;
}

.space-post.is-editorial-lead .space-post-header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.space-editorial-author {
  display: grid;
  align-self: start;
  align-content: start;
  justify-items: start;
  gap: 4px;
  margin: 0;
}

.space-editorial-author > div {
  min-width: 0;
}

.space-editorial-author time {
  color: var(--muted);
  font-size: 11px;
}

.space-editorial-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #c9bdac;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-family: var(--serif);
}

.space-post.is-editorial-row .space-post-actions {
  margin-top: 10px;
  border-top: 0;
  padding-top: 0;
}

.space-post.is-editorial-row .space-tags {
  margin: 6px 0 0;
}

.space-post.is-editorial-lead .space-article-link,
.space-post.is-editorial-row .space-article-link {
  margin-top: 12px;
  background: rgba(238, 231, 218, 0.68);
}

.space-contributors {
  border-top: 4px solid var(--ink);
}

.space-contributors-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid #b9aa97;
  padding: 11px 0;
}

.space-contributors-heading small,
.space-contributors li small,
.space-contributors > p {
  color: var(--muted);
  font-size: 11px;
}

.space-contributors ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.space-contributors li {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid #d5cabc;
  padding: 11px 0;
}

.space-contributors li > span:first-child {
  color: var(--accent-strong);
  font-family: var(--serif);
  font-size: 12px;
}

.space-contributors li > button,
.space-contributors li > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  text-align: left;
}

.space-contributors li > button > span:last-child,
.space-contributors li > div > span:last-child {
  display: grid;
  min-width: 0;
}

.space-contributors li strong,
.space-contributors li small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.space-contributors > p {
  margin: 12px 0 0;
  border-bottom: 1px solid var(--ink);
  padding: 0 0 8px;
}

.space-post-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.5vw, 30px);
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.space-post-title-link {
  transition: color 160ms ease;
}

.space-post-title-link:hover,
.space-post-title-link:focus-visible {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.space-post-header {
  margin-top: 9px;
}

.space-post-body,
.space-post-summary {
  color: #3b3732;
  font-size: 15px;
  line-height: 1.75;
}

.space-post-summary {
  margin-top: 14px;
  border-left: 2px solid #cfa7a2;
  color: #5d554d;
}

.space-post-actions {
  margin-top: 16px;
  border-top: 1px solid rgba(210, 199, 183, 0.72);
  padding-top: 8px;
}

.space-post-actions .ghost-action {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0 5px;
  box-shadow: none;
}

.space-post-actions .ghost-action:hover,
.space-post-actions .ghost-action.is-active {
  background: transparent;
  color: var(--accent);
}

.space-post-actions .ghost-action.is-active {
  box-shadow: inset 0 -2px 0 var(--accent);
}

.content-status,
.space-tag,
.certification-badge,
.verified-badge,
.certification-icon,
.verification-status {
  border-radius: 2px;
}

.space-article-link {
  margin-top: 16px;
  border: 0;
  border-left: 3px solid var(--accent);
  border-radius: 0;
  background: var(--paper-deep);
  padding: 12px 14px;
}

.space-article-link:hover,
.space-article-link:focus-visible {
  background: #e9dfcf;
}

.space-article-kicker {
  color: var(--accent);
  letter-spacing: 0.12em;
}

.space-article-link strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
}

.space-detail-panel {
  width: 100%;
  max-width: 78ch;
  margin: 0 auto;
  border-top: 0;
  padding-top: 0;
}

.space-detail-panel > .ghost-action {
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 0 1px;
}

.space-post.is-detail {
  border-top: 3px double var(--ink);
  padding-top: 26px;
}

.space-detail-title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.2;
}

.settings-block {
  border-top-color: var(--line);
}

.notification-list {
  gap: 0;
}

.social-module-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid #b9aa97;
  padding-bottom: 16px;
}

.social-module-heading > div {
  display: grid;
  gap: 3px;
}

.social-module-heading h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 40px);
  font-weight: 500;
}

.social-module-heading p {
  margin: 0;
  color: var(--muted);
}

.notification-desk {
  width: 100%;
  max-width: 1180px;
  min-width: 0;
  margin: 0 auto;
}

.notification-page-heading {
  margin-bottom: 22px;
}

.notification-read-all {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--accent-strong);
  padding: 0 2px;
}

.notification-read-all:hover,
.notification-read-all:focus-visible {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.notification-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 28px;
}

.notification-feed-column {
  min-width: 0;
}

.notification-summary {
  min-height: 20px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.notification-filters {
  gap: 8px;
  margin-bottom: 0;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 0;
  scrollbar-width: none;
}

.notification-filters::-webkit-scrollbar {
  display: none;
}

.notification-filter {
  min-height: 44px;
  padding: 0 10px;
  font-size: 13px;
}

.notification-group > h3 {
  margin: 20px 0 8px;
  padding: 0;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.notification-item {
  position: relative;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 14px 9px;
}

.notification-item:hover {
  border-color: var(--line);
  border-left-color: transparent;
  background: rgba(238, 231, 218, 0.62);
}

.notification-item.is-unread {
  border-left-color: var(--accent);
  background: #f2e4df;
}

.notification-item.is-unread:hover {
  border-left-color: var(--accent);
}

.notification-item.is-unread::after {
  content: none;
}

.notification-kind {
  width: 36px;
  height: 36px;
  border: 1px solid #c9bdac;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 15px;
}

.direct-avatar {
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  border: 1px solid #c9bdac;
  font-family: var(--serif);
}

.notification-copy strong {
  padding-right: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.notification-context {
  color: #625a51;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.notification-meta {
  justify-content: flex-start;
  color: var(--muted);
  font-size: 12px;
}

.notification-route-icon {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1;
}

.notification-read-action {
  min-height: 44px;
}

.notification-guidance {
  align-self: start;
  border-top: 4px solid var(--ink);
  background: var(--paper-deep);
  padding: 18px;
}

.notification-guidance > span {
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.notification-guidance h3 {
  margin: 7px 0 10px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.3;
}

.notification-guidance p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.notification-guidance button {
  margin-top: 14px;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 8px 0;
  color: var(--ink);
}

.space-composer-panel {
  border-radius: 2px;
  border-top: 4px solid var(--accent);
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(43, 34, 25, 0.28);
}

.modal-backdrop {
  background: rgba(28, 25, 23, 0.5);
}

.profile-panel {
  border-radius: 2px;
  border-top: 4px solid var(--accent);
  background: var(--paper);
  box-shadow: 0 28px 90px rgba(43, 34, 25, 0.28);
}

.space-composer-header h2,
.profile-panel-header h2 {
  font-family: var(--serif);
}

.account-dialog-tabs {
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.account-dialog-tab {
  position: relative;
  border: 0;
  background: transparent;
}

.account-dialog-tab.is-active {
  border: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 -3px 0 var(--accent);
}

.profile-section {
  border-radius: 0;
}

.verification-history-card {
  border-radius: 0;
  background: var(--paper);
}

.messages-column {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
}

.direct-page-heading {
  margin-bottom: 22px;
}

.direct-new-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 108px;
  min-height: 44px;
}

.direct-new-message-mobile-icon,
.direct-new-message-mobile-label {
  display: none;
}

.direct-chat-layout {
  grid-template-columns: minmax(250px, 32%) minmax(0, 1fr);
  min-height: 560px;
  border: 1px solid #c9bdac;
  border-radius: 0;
  background: var(--paper);
  box-shadow: none;
}

.direct-chat-sidebar {
  grid-template-rows: auto auto minmax(0, 1fr);
  border-right: 1px solid #c9bdac;
  padding: 0;
  background: var(--paper-deep);
}

.direct-inbox-tools {
  display: grid;
  gap: 8px;
  border-bottom: 1px solid #c9bdac;
  padding: 12px;
}

.direct-user-search {
  margin: 0;
}

.direct-search-row {
  min-height: 42px;
  border: 1px solid #c9bdac;
  background: var(--paper);
  padding: 0 4px 0 10px;
}

.direct-search-row::before {
  color: var(--muted);
  content: "⌕";
  font-size: 18px;
}

.direct-search-row input {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.direct-search-row .ghost-action {
  min-height: 34px;
  border: 0;
  border-left: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
}

.direct-conversation-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

.direct-conversation-filters > button {
  min-height: 34px;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  padding: 0 8px;
}

.direct-conversation-filters > button.is-active {
  border-bottom-color: var(--accent);
  color: var(--accent-strong);
}

.direct-total-unread {
  position: static;
  display: inline-grid;
  width: auto;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  place-items: center;
}

.direct-user-results {
  border-bottom: 1px solid #c9bdac;
  padding: 0 12px;
}

.direct-conversation-list {
  gap: 0;
}

.direct-user-row,
.direct-conversation-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  position: relative;
  gap: 9px;
  width: 100%;
  min-height: 68px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  padding: 12px;
}

.direct-user-row:hover,
.direct-conversation-row:hover,
.direct-conversation-row.is-active {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.78);
}

.direct-conversation-row.is-active {
  box-shadow: inset 3px 0 0 var(--accent);
}

.direct-user-row .direct-avatar,
.direct-conversation-row .direct-avatar {
  width: 34px;
  height: 34px;
}

.direct-conversation-row .direct-conversation-main {
  min-width: 0;
}

.direct-conversation-row strong {
  color: var(--ink);
}

.direct-chat-header {
  border-bottom: 1px solid #c9bdac;
  background: rgba(252, 250, 245, 0.94);
}

.direct-view-profile {
  margin-left: auto;
}

.direct-thread-region {
  background: #f7f2e9;
}

.direct-message-thread {
  background: #f7f2e9;
  padding: 24px clamp(16px, 3vw, 34px);
}

.direct-thread-empty {
  display: grid;
  place-items: center;
  align-self: center;
  justify-items: center;
  gap: 7px;
  margin: auto;
  color: var(--muted);
  text-align: center;
}

.direct-thread-empty strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 650;
}

.direct-thread-empty span {
  max-width: 30ch;
  font-size: 13px;
  line-height: 1.6;
}

.direct-thread-date {
  align-self: stretch;
  margin: 2px 0 8px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.direct-message-bubble {
  gap: 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
}

.direct-message-bubble p {
  margin: 0;
  border: 1px solid #c9bdac;
  border-radius: 1px;
  background: #f5efe5;
  padding: 11px 13px;
  white-space: pre-wrap;
}

.direct-message-bubble.is-mine {
  border: 0;
  background: transparent;
}

.direct-message-bubble.is-mine p {
  border-color: #d8a8ad;
  background: #f2dedc;
}

.direct-message-bubble.is-mine time {
  text-align: right;
}

.direct-message-form {
  display: grid;
  gap: 8px;
  margin: 14px 16px 16px;
  border: 1px solid #c9bdac;
  background: var(--paper);
  padding: 10px;
}

.direct-message-form textarea {
  width: 100%;
  min-height: 64px;
  max-height: 7.5em;
  border: 0;
  background: transparent;
  resize: vertical;
}

.direct-composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.direct-composer-footer > span {
  color: var(--muted);
  font-size: 11px;
}

.listen-column {
  border: 1px solid var(--line);
  border-top: 4px solid var(--accent);
  border-radius: 0;
  background: var(--paper);
  padding: clamp(22px, 4vw, 42px);
  box-shadow: none;
}

.listen-column > *,
.broadcast-source-panel,
.voice-row,
.playback-console,
.broadcast-script-panel {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.broadcast-source-panel .select-field,
.voice-row .select-field,
.voice-row .range-field,
.broadcast-source-panel select,
.voice-row select {
  min-width: 0;
  max-width: 100%;
}

.listen-stage {
  border-bottom: 3px double var(--line);
  padding-bottom: 18px;
}

.anchor {
  border-radius: 2px;
  border-color: #d9aaa6;
  background: var(--ink);
}

.broadcast-source-panel,
.voice-row,
.playback-console,
.broadcast-script-panel {
  border-radius: 2px;
  background: var(--paper-deep);
}

.script-item {
  background: transparent;
}

.script-item.is-active {
  border-color: var(--accent);
  background: #f4e5e1;
}

.toast {
  z-index: 110;
  border: 1px solid #403a34;
  border-radius: 2px;
  background: var(--ink);
  box-shadow: 0 16px 40px rgba(28, 25, 23, 0.24);
}

@media (min-width: 981px) {
  .app-shell[data-view="feed"] .workspace,
  .app-shell[data-view="recommend"] .workspace {
    grid-template-columns: minmax(330px, 0.72fr) minmax(0, 1.28fr);
    gap: clamp(28px, 3vw, 48px);
  }

  .app-shell[data-view="listen"] .workspace,
  .app-shell[data-view="profile"] .workspace {
    grid-template-columns: minmax(0, 980px);
  }

  .app-shell[data-view="space"] .workspace,
  .app-shell[data-view="notifications"] .workspace,
  .app-shell[data-view="messages"] .workspace {
    grid-template-columns: minmax(0, 1180px);
  }
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(130px, 0.7fr) auto minmax(300px, 1fr);
    gap: 16px;
  }

  .edition-kicker {
    font-size: 9px;
  }

  .user-badge {
    max-width: 110px;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(90px, 0.4fr) auto minmax(380px, 1fr);
  }

  .top-actions .language-field select {
    width: 132px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    width: min(860px, calc(100% - 28px));
  }

  .topbar {
    grid-template-columns: minmax(120px, 0.7fr) auto minmax(270px, 1fr);
  }

  .edition-kicker {
    max-width: 16ch;
  }

  .app-shell[data-news-focus="on"] {
    padding-top: 18px;
  }

  .app-shell[data-news-focus="on"] .topbar {
    display: grid;
  }

  .detail-column {
    border-left: 0;
    padding: 8px 0 52px;
  }

  .mobile-back-button {
    display: inline-flex;
    position: static;
    width: fit-content;
    min-height: 40px;
    margin: 0 0 22px;
    box-shadow: none;
    backdrop-filter: none;
  }

  .direct-chat-layout,
  .direct-chat-panel {
    min-height: 520px;
  }
}

@media (max-width: 980px) {
  html {
    scroll-behavior: auto;
  }

  .app-shell {
    width: auto;
    max-width: 100%;
    padding: 0 16px calc(84px + env(safe-area-inset-bottom));
  }

  .app-shell[data-view="messages"] {
    --mobile-bottom-nav-reserve: calc(65px + env(safe-area-inset-bottom));
  }

  .topbar,
  .app-shell[data-news-focus="on"] .topbar {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    min-height: 72px;
    border-top: 0;
    border-bottom: 1px solid var(--ink);
    padding: 10px 0;
  }

  .edition-kicker {
    display: none;
  }

  .topbar .brand {
    justify-self: start;
    gap: 8px;
  }

  .topbar .brand-mark {
    width: 34px;
    height: 34px;
  }

  .topbar .brand h1 {
    font-size: 28px;
  }

  .topbar .brand p {
    max-width: 25vw;
    font-size: 8px;
  }

  .top-actions {
    display: flex;
    gap: 6px;
  }

  .top-actions #userMenuBtn,
  .top-actions #logoutBtn {
    display: none;
  }

  body[data-auth="public"] .public-login-action {
    min-height: 44px;
  }

  .mobile-header-action {
    position: relative;
    display: inline-grid;
    flex: 0 0 44px;
    width: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0;
    box-shadow: none;
  }

  .mobile-header-action.is-active,
  .mobile-header-action[aria-current="page"] {
    border-color: var(--accent);
    box-shadow: inset 0 -2px 0 var(--accent);
  }

  .language-field select {
    flex: 0 0 132px;
    width: 132px;
    min-height: 44px;
    padding: 0 22px 0 8px;
    overflow: visible;
    font-size: 16px;
    text-overflow: clip;
  }

  .tabs {
    display: none;
  }

  .app-shell[data-view="messages"] .mobile-messages-switcher,
  .app-shell[data-view="notifications"] .mobile-messages-switcher {
    display: flex;
  }

  .mobile-messages-switcher {
    align-items: stretch;
    width: 100%;
    min-height: 48px;
    margin: 12px 0 20px;
    border-bottom: 1px solid var(--line);
  }

  .mobile-message-switch {
    position: relative;
    display: inline-flex;
    flex: 1 1 0;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 0;
    min-height: 48px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
  }

  .mobile-message-switch > [data-nav-label] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-message-switch:hover,
  .mobile-message-switch.is-active,
  .mobile-message-switch[aria-current="page"] {
    background: transparent;
    color: var(--ink);
  }

  .mobile-message-switch.is-active,
  .mobile-message-switch[aria-current="page"] {
    border-bottom-color: var(--accent);
  }

  .mobile-message-switch-badge {
    flex: 0 0 auto;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .mobile-bottom-nav {
    display: flex;
  }

  .app-shell[data-mobile-flow="on"][data-mobile-detail="open"] .feed-switcher {
    display: none;
  }

  .feed-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    margin: 12px 0 18px;
    padding: 0 0 14px;
  }

  .country-field,
  .category-field {
    display: grid;
    grid-template-columns: 1fr;
    gap: 5px;
    min-width: 0;
  }

  .country-field > span,
  .category-field > span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.2;
    text-transform: uppercase;
  }

  .country-field select,
  .category-field select {
    min-width: 0;
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background-color: var(--paper);
    padding: 0 18px 0 8px;
    font-size: 16px;
  }

  .category-tabs {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 45;
    display: flex;
    gap: 0;
    min-height: calc(64px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: rgba(252, 250, 245, 0.97);
    padding: 5px 4px calc(5px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(43, 34, 25, 0.08);
    backdrop-filter: blur(16px);
  }

  .mobile-nav-item {
    position: relative;
    display: grid;
    flex: 1 1 20%;
    min-width: 0;
    min-height: 54px;
    place-items: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--muted);
    gap: 3px;
    padding: 4px 2px;
  }

  .mobile-nav-item.is-active,
  .mobile-nav-item[aria-current="page"] {
    background: transparent;
    color: var(--ink);
  }

  .mobile-nav-icon {
    display: grid;
    width: 32px;
    height: 28px;
    place-items: center;
    border-radius: 999px;
    background: var(--paper-deep);
    color: currentColor;
    transition:
      background-color 160ms ease,
      color 160ms ease,
      transform 160ms ease;
  }

  .mobile-nav-icon svg {
    display: block;
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .mobile-nav-item.is-active .mobile-nav-icon,
  .mobile-nav-item[aria-current="page"] .mobile-nav-icon {
    background: var(--accent);
    color: #fffaf0;
    transform: translateY(-1px);
  }

  .mobile-bottom-nav .mobile-nav-item [data-nav-label] {
    display: -webkit-box;
    max-width: 100%;
    overflow: hidden;
    font-size: 10px;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .source-selector {
    margin-bottom: 18px;
  }

  .source-card {
    padding: 16px;
  }

  .section-heading {
    align-items: flex-start;
    gap: 8px;
  }

  .section-heading h2 {
    font-size: 26px;
  }

  .feed-heading-actions {
    max-width: 54%;
    justify-content: flex-end;
    text-align: right;
  }

  .article-card,
  .compact-list .article-card {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    padding: 18px 5px 18px 2px;
  }

  .rank,
  .editorial-sequence {
    min-height: 30px;
    font-size: 23px;
  }

  .editorial-sequence {
    font-size: 10px;
  }

  .article-title {
    font-size: 19px;
    line-height: 1.38;
  }

  .recommendation-card:first-child .article-title {
    font-size: 24px;
  }

  .summary-line {
    -webkit-line-clamp: 2;
  }

  .article-card .meta {
    gap: 7px;
  }

  .detail-column {
    padding: 8px 0 40px;
  }

  .mobile-back-button {
    min-height: 44px;
    margin-bottom: 18px;
  }

  .detail-header {
    gap: 11px;
  }

  .detail-header h2 {
    font-size: clamp(30px, 9.5vw, 40px);
    line-height: 1.17;
  }

  .detail-header > .meta {
    gap: 7px 12px;
  }

  .body-text {
    font-size: 18px;
    line-height: 1.92;
  }

  .comments-block,
  .site-discussion,
  .space-comments-section,
  .related-opinions,
  .original-block {
    margin-top: 30px;
  }

  .space-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
  }

  .space-toolbar-actions {
    width: 100%;
  }

  .space-toolbar-actions .primary-action {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
  }

  .space-page-title-desktop {
    display: none;
  }

  .space-page-title-mobile {
    display: inline;
  }

  .space-column[data-space-mode="profile"] .space-toolbar-actions,
  .space-column[data-space-mode="drafts"] .space-toolbar-actions {
    display: none;
  }

  .space-editorial-grid {
    display: block;
  }

  .space-column[data-space-mode="drafts"] .space-editorial-grid {
    display: block;
    width: 100%;
    max-width: none;
  }

  .space-detail-panel {
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
  }

  .space-editorial-sidebar,
  .space-contributors {
    display: none;
  }

  .space-view-nav {
    margin-right: -16px;
    margin-left: -16px;
    overflow-y: hidden;
    padding: 0 16px;
    scrollbar-width: none;
  }

  .space-view-nav::-webkit-scrollbar {
    display: none;
  }

  .space-editorial-list > .section-heading {
    align-items: flex-start;
  }

  .space-post {
    padding: 22px 2px;
  }

  .space-post.is-editorial-lead {
    padding-top: 15px;
  }

  .space-post.is-editorial-row {
    display: block;
  }

  .space-post.is-editorial-row .space-post-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
  }

  .space-post.is-editorial-row .space-post-header > div {
    min-width: 0;
  }

  .space-post-title-link {
    min-height: 44px;
  }

  .space-post-actions .ghost-action {
    min-height: 44px;
  }

  .notification-desk {
    border-top: 0;
    padding-top: 8px;
  }

  .social-module-heading {
    align-items: stretch;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
  }

  .social-module-heading > div {
    width: 100%;
  }

  .social-module-heading h2 {
    font-size: 30px;
  }

  .direct-page-heading {
    align-items: center;
    flex-wrap: nowrap;
    gap: 12px;
  }

  .direct-page-heading > div {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }

  .direct-page-heading .social-module-kicker {
    display: none;
  }

  .direct-new-message {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    min-height: 44px;
    border-color: var(--accent);
    background: transparent;
    color: var(--accent-strong);
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .direct-new-message:hover {
    background: var(--accent-soft);
    color: var(--accent-strong);
  }

  .direct-new-message-desktop-icon,
  .direct-new-message-desktop-label {
    display: none;
  }

  .direct-new-message-mobile-icon,
  .direct-new-message-mobile-label {
    display: inline;
  }

  .notification-layout {
    display: block;
  }

  .notification-guidance {
    display: none;
  }

  .notification-filters {
    margin-right: -12px;
    margin-left: -12px;
    padding: 0 12px;
  }

  .notification-item {
    padding-right: 8px;
    padding-left: 8px;
  }

  .space-profile-card {
    padding: 16px;
  }

  .space-composer-panel {
    max-height: 90dvh;
    border-radius: 2px 2px 0 0;
  }

  .profile-panel {
    max-height: calc(100dvh - 24px);
  }

  .direct-chat-layout {
    grid-template-columns: minmax(0, 1fr);
    height: min(620px, calc(100dvh - 280px));
    min-height: 420px;
  }

  .app-shell[data-view="messages"]:not([data-message-mode="thread"]) .direct-chat-layout {
    height: clamp(160px, calc(100dvh - 274px - var(--mobile-bottom-nav-reserve)), 620px);
    min-height: 0;
  }

  .direct-chat-sidebar,
  .direct-chat-panel {
    height: 100%;
    min-height: 0;
  }

  .direct-chat-sidebar {
    overflow-y: auto;
  }

  .direct-chat-panel {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .direct-thread-region {
    min-height: 0;
  }

  .direct-message-thread {
    min-height: 0;
    max-height: none;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-chat-header {
    z-index: 2;
  }

  .direct-chat-identity {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  .direct-chat-avatar,
  .direct-chat-back {
    flex: 0 0 auto;
  }

  .direct-chat-identity-copy {
    min-width: 0;
    overflow: hidden;
  }

  .direct-chat-identity-copy strong,
  .direct-chat-identity-copy span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .direct-chat-identity-action {
    position: absolute;
    inset: -6px;
    z-index: 1;
    display: block;
    border: 0;
    border-radius: 2px;
    background: transparent;
    padding: 0;
  }

  .direct-chat-identity-action:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  .direct-view-profile {
    display: none;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-message-form {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    margin: 0;
    border: 0;
    border-top: 1px solid #c9bdac;
    background: rgba(252, 250, 245, 0.98);
    padding: 10px 12px;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-message-form .form-field {
    grid-column: 1;
    min-width: 0;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-message-form textarea {
    min-height: 44px;
    max-height: 120px;
    border: 1px solid #c9bdac;
    background: var(--paper);
    padding: 10px 12px;
    overflow-y: hidden;
    resize: none;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-composer-footer {
    display: contents;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] #directComposerHint {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] #directMessageSendBtn {
    grid-column: 2;
    grid-row: 1;
    min-width: 64px;
    min-height: 44px;
    padding: 0 12px;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-page-heading {
    display: none;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] {
    --mobile-bottom-nav-reserve: calc(65px + env(safe-area-inset-bottom));
    position: fixed;
    inset: 0;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding-bottom: var(--mobile-bottom-nav-reserve);
    overflow: hidden;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .workspace,
  .app-shell[data-view="messages"][data-message-mode="thread"] .messages-column {
    display: grid;
    grid-template-rows: minmax(0, 1fr);
    align-items: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .messages-column {
    gap: 0;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-chat-layout {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-chat-panel {
    width: 100%;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    background: var(--paper);
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-thread-region {
    grid-template-rows: auto minmax(0, 1fr);
  }

  .app-shell[data-view="messages"][data-message-mode="thread"] .direct-message-thread {
    min-height: 0;
    max-height: none;
    overflow-y: auto;
  }

  .listen-column {
    padding: 18px 14px;
  }

  .broadcast-source-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toast {
    bottom: calc(78px + env(safe-area-inset-bottom));
    max-width: calc(100% - 28px);
  }
}

@media (min-width: 761px) and (max-width: 980px) {
  .app-shell[data-view="messages"][data-message-mode="thread"] {
    --mobile-bottom-nav-reserve: calc(88px + env(safe-area-inset-bottom));
  }

  .app-shell[data-view="messages"]:not([data-message-mode="thread"]) {
    --mobile-bottom-nav-reserve: calc(88px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    right: auto;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 50%;
    width: min(640px, calc(100% - 32px));
    min-height: 64px;
    border: 1px solid var(--line);
    padding-bottom: 5px;
    transform: translateX(-50%);
  }
}

@media (max-width: 460px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .topbar .brand-mark {
    width: 28px;
    height: 28px;
  }

  .topbar .brand h1 {
    font-size: clamp(20px, 5.9vw, 23px);
  }

  .topbar .brand p {
    display: none;
  }

  .language-field select {
    flex-basis: 132px;
    width: 132px;
  }

  .mobile-header-action {
    flex-basis: 44px;
    width: 44px;
    min-height: 44px;
  }

  .top-actions {
    gap: 4px;
  }

  .tabs {
    display: none;
  }

  .feed-switcher {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .broadcast-source-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .broadcast-recommend-refresh {
    width: 100%;
  }

  body[data-auth="public"] .topbar {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-auth="public"] .top-actions {
    grid-column: 1;
    justify-content: space-between;
    width: 100%;
  }

  body[data-auth="public"] .public-login-action {
    flex: 1 1 0;
    min-width: 0;
    max-width: calc(100% - 136px);
    padding: 0 8px;
    overflow-wrap: anywhere;
    font-size: 11px;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  .source-card strong {
    font-size: 23px;
  }

  .section-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .feed-heading-actions {
    max-width: 148px;
  }

  .feed-heading-actions > span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .article-card,
  .compact-list .article-card {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 8px;
  }

  .article-title {
    font-size: 18px;
  }

  .recommendation-card:first-child .article-title {
    font-size: 22px;
  }

  .summary-line {
    font-size: 12.5px;
  }

  .detail-header h2 {
    font-size: clamp(29px, 9.7vw, 36px);
  }

  .body-text {
    font-size: 17.5px;
  }

  .space-profile-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .space-toolbar-actions .primary-action {
    width: auto;
  }

  .space-view-nav {
    gap: 18px;
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .space-view-nav .ghost-action {
    min-height: 46px;
    white-space: normal;
  }

  .space-post-title {
    font-size: clamp(23px, 7.2vw, 28px);
  }

  .space-post-actions {
    gap: 6px;
  }

  .notification-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .notification-page-heading > button {
    align-self: flex-start;
  }

  .notification-item {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
  }

  .notification-kind {
    width: 36px;
    height: 36px;
  }

  .notification-read-action {
    grid-column: 2;
    justify-self: start;
    min-height: 44px;
  }

  .notification-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .direct-message-form {
    display: grid;
    align-items: stretch;
  }

  .direct-message-form button {
    width: auto;
  }

  .auth-screen {
    padding: 14px;
  }

  .auth-card {
    padding: 22px 18px;
  }
}

@media (max-width: 389px) {
  .feed-switcher {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 340px) {
  .topbar .brand {
    gap: 4px;
  }

  .topbar .brand-mark {
    width: 23px;
    height: 23px;
  }

  .topbar .brand h1 {
    font-size: 17px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
