@import url("../../assets/css/design.css");

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 12px 0 0;
}

.header-shell,
.header-links-shell {
  backdrop-filter: blur(18px);
}

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

.header-links-shell {
  margin-top: 10px;
  padding: 8px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ds-text-primary);
}

.brand:hover {
  color: var(--ds-text-primary);
}

.brand-dot {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ds-brand-500), var(--ds-accent-400));
  box-shadow: 0 0 0 7px rgba(47, 124, 255, 0.12);
}

.brand-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-name {
  font-size: 16px;
  font-weight: var(--ds-weight-black);
  line-height: 1.1;
  color: var(--ds-text-primary);
}

.brand-sub {
  font-size: 12px;
  color: var(--ds-text-tertiary);
  line-height: 1.2;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.site-time {
  display: none;
  font-size: 12px;
  color: var(--ds-text-tertiary);
}

.theme-toggle,
.nav-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-card-border);
  background: rgba(255, 255, 255, 0.56);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: var(--ds-weight-bold);
  cursor: pointer;
}

.theme-toggle {
  width: 40px;
  padding: 0;
}

.nav-auth-btn.primary {
  color: var(--ds-white);
  border-color: transparent;
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-accent-400));
}

.header-links-shell .ui-nav-links {
  width: 100%;
}

.header-links-shell .ui-nav-link {
  background: transparent;
}

.nav-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 40px;
  border-radius: var(--ds-radius-pill);
  background: rgba(47, 124, 255, 0.08);
  color: var(--ds-brand-700);
  font-size: 14px;
  font-weight: var(--ds-weight-bold);
}

.page-shell {
  padding: 22px 0 calc(96px + env(safe-area-inset-bottom));
}

.hero-panel {
  padding: 22px;
}

.hero-grid {
  display: grid;
  gap: 20px;
}

.hero-copy {
  display: grid;
  gap: 14px;
}

.hero-copy p {
  max-width: 62ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-stats {
  margin-top: 2px;
}

.hero-stat {
  min-height: 110px;
}

.site-banner {
  margin-top: 18px;
  padding: 18px 20px;
}

.home-banner-copy {
  display: grid;
  gap: 8px;
}

.home-banner-copy p {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

.marquee-track {
  display: flex;
  gap: 48px;
  width: max-content;
  padding: 12px 18px;
  animation: site-marquee 30s linear infinite;
}

.marquee-text {
  white-space: nowrap;
  font-size: 14px;
  color: var(--ds-text-secondary);
}

@keyframes site-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.quick-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  min-height: 132px;
  color: var(--ds-text-primary);
}

.quick-card:hover {
  color: var(--ds-text-primary);
  transform: translateY(-2px);
}

.quick-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 18px;
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.14), rgba(255, 152, 50, 0.12));
}

.quick-card-title {
  margin: 0;
  font-size: 16px;
  font-weight: var(--ds-weight-bold);
  line-height: 1.25;
}

.quick-card-desc {
  margin: 0;
  font-size: 13px;
  color: var(--ds-text-secondary);
}

.section-block {
  margin-top: 24px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.home-feed-intro {
  display: grid;
  gap: 16px;
  padding: 20px;
  margin-bottom: 14px;
}

.home-feed-copy {
  display: grid;
  gap: 8px;
}

.home-feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-head-copy {
  display: grid;
  gap: 6px;
}

.section-note {
  font-size: 13px;
  color: var(--ds-text-tertiary);
}

.news-main-tabs,
.news-sub-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.news-main-tabs::-webkit-scrollbar,
.news-sub-tabs::-webkit-scrollbar {
  display: none;
}

.news-main-tabs {
  margin-bottom: 10px;
}

.news-sub-tabs {
  display: none;
  margin-bottom: 14px;
}

.news-sub-tabs.active {
  display: flex;
}

.main-tab,
.sub-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(47, 124, 255, 0.10);
  border-radius: var(--ds-radius-pill);
  background: rgba(255, 255, 255, 0.82);
  color: var(--ds-text-secondary);
  font-size: 14px;
  font-weight: var(--ds-weight-semibold);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.main-tab.active,
.sub-tab.active {
  color: var(--ds-text-primary);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.18), rgba(255, 152, 50, 0.18));
  border-color: rgba(47, 124, 255, 0.20);
  box-shadow: none;
}

.news-panel {
  display: none;
}

.news-panel.active {
  display: block;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.home-news-card,
.list-news-card,
.business-card,
.detail-card,
.comment-panel {
  overflow: hidden;
}

.home-news-card,
.list-news-card {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.news-cover-wrap {
  display: block;
  overflow: hidden;
  border-radius: var(--ds-radius-md);
}

.news-cover {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.news-card-copy {
  display: grid;
  gap: 10px;
}

.news-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.32;
  letter-spacing: -0.01em;
}

.news-title a {
  color: var(--ds-text-primary);
}

.news-summary,
.news-desc {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 14px;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-meta,
.news-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--ds-text-tertiary);
}

.news-island,
.news-source,
.business-category {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--ds-radius-pill);
  background: rgba(47, 124, 255, 0.10);
  color: var(--ds-brand-700);
  font-size: 12px;
  font-weight: var(--ds-weight-bold);
}

.news-comments-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.news-comment-count {
  font-size: 13px;
  color: var(--ds-text-secondary);
}

.news-comment-quick,
.news-load-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--ds-card-border);
  border-radius: var(--ds-radius-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: var(--ds-weight-bold);
  cursor: pointer;
}

.news-panel-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.news-empty,
.empty-card {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 22px;
  border: 1px dashed var(--ds-card-border);
  border-radius: var(--ds-radius-lg);
  color: var(--ds-text-tertiary);
  background: rgba(255, 255, 255, 0.42);
  text-align: center;
}

.page-hero {
  padding: 22px;
  margin-bottom: 18px;
}

.category-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.category-pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-card-border);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ds-text-secondary);
  font-size: 14px;
  font-weight: var(--ds-weight-semibold);
}

.category-pill.active {
  color: var(--ds-text-primary);
  border-color: rgba(47, 124, 255, 0.20);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.18), rgba(255, 152, 50, 0.18));
}

.page-pagination {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 18px;
  padding: 16px;
}

.page-pager-row,
.page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.page-control,
.page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-card-border);
  background: rgba(255, 255, 255, 0.66);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: var(--ds-weight-semibold);
}

.page-number.active {
  color: var(--ds-text-primary);
  border-color: rgba(47, 124, 255, 0.20);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.18), rgba(255, 152, 50, 0.18));
}

.page-control.disabled {
  opacity: 0.42;
  pointer-events: none;
}

.detail-shell {
  display: grid;
  gap: 18px;
}

.detail-card {
  padding: 18px;
}

.detail-cover {
  width: 100%;
  border-radius: var(--ds-radius-lg);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.detail-prose {
  color: var(--ds-text-primary);
  font-size: 15px;
  line-height: 1.9;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.comment-panel {
  padding: 18px;
}

.comment-form {
  display: grid;
  gap: 10px;
}

.comment-list {
  display: grid;
  gap: 12px;
}

.comment-item {
  padding: 14px;
  border-radius: var(--ds-radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--ds-card-border);
}

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

.comment-item-head time {
  font-size: 12px;
  color: var(--ds-text-tertiary);
}

.business-grid {
  display: grid;
  gap: 14px;
}

.business-card {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.business-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.business-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.business-desc {
  margin: 0;
  color: var(--ds-text-secondary);
  line-height: 1.75;
}

.business-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--ds-text-secondary);
  font-size: 14px;
}

.comment-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 80;
}

.comment-modal.show {
  display: block;
}

.comment-modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--ds-overlay);
}

.comment-modal-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 620px);
  margin: 9vh auto 0;
  max-height: 78vh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 12px;
  padding: 18px;
  overflow: hidden;
}

.comment-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.comment-modal-head h3 {
  margin: 0;
  font-size: 20px;
}

.comment-modal-close,
.comment-modal-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-card-border);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ds-text-primary);
  font-weight: var(--ds-weight-bold);
  cursor: pointer;
}

.comment-modal-list {
  overflow: auto;
  display: grid;
  gap: 10px;
}

.comment-modal-item {
  padding: 12px 14px;
  border-radius: var(--ds-radius-md);
  background: rgba(255, 255, 255, 0.52);
  border: 1px solid var(--ds-card-border);
}

.comment-modal-item-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 8px;
}

.comment-modal-item p,
.comment-modal-empty,
.comment-modal-loading {
  margin: 0;
  color: var(--ds-text-secondary);
  line-height: 1.7;
}

.mobile-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
}

.mobile-nav .ui-mobile-tab {
  text-decoration: none;
}

.mobile-nav .tab-icon {
  font-size: 16px;
  line-height: 1;
}

body.modal-open {
  overflow: hidden;
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 14px;
}

.auth-card {
  width: min(100%, 560px);
  padding: 24px;
  border: 1px solid var(--ds-card-border);
  border-radius: var(--ds-radius-xl);
  background: var(--ds-card-bg);
  box-shadow: var(--ds-shadow-md);
  backdrop-filter: blur(18px);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 14px;
  font-weight: var(--ds-weight-bold);
}

.auth-logo-wrap {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 18px;
  text-align: center;
}

.auth-logo {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-accent-400));
  color: #fff;
  font-size: 28px;
  font-weight: var(--ds-weight-black);
  box-shadow: 0 12px 24px rgba(47, 124, 255, 0.24);
}

.auth-logo-wrap h1 {
  margin: 0;
  font-size: clamp(28px, 8vw, 40px);
  line-height: 1.08;
}

.auth-logo-wrap p {
  margin: 0;
  color: var(--ds-text-secondary);
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 6px;
  margin: 18px 0;
  border-radius: 16px;
  background: rgba(24, 43, 77, 0.06);
}

.switch-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  color: var(--ds-text-secondary);
  font-weight: var(--ds-weight-bold);
}

.switch-tab.active {
  background: rgba(255, 255, 255, 0.88);
  color: var(--ds-brand-700);
  box-shadow: var(--ds-shadow-sm);
}

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

.auth-form label {
  font-size: 14px;
  font-weight: var(--ds-weight-semibold);
  color: var(--ds-text-primary);
}

.auth-form input,
.auth-form .prefix-select,
.auth-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--ds-card-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-input-bg);
  color: var(--ds-text-primary);
}

.phone-row {
  display: flex;
  gap: 10px;
}

.prefix-select {
  flex: 0 0 100px;
}

.sms-btn,
.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--ds-radius-pill);
  color: #fff;
  background: linear-gradient(135deg, var(--ds-primary), var(--ds-accent-400));
  font-size: 16px;
  font-weight: var(--ds-weight-bold);
  cursor: pointer;
}

.auth-submit {
  margin-top: 4px;
}

.agree-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--ds-text-secondary);
}

.agree-line input {
  width: 18px;
  height: 18px;
  min-height: auto;
  margin-top: 2px;
  padding: 0;
}

.auth-error,
.auth-ok {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: var(--ds-radius-md);
  font-size: 14px;
}

.auth-error {
  color: var(--ds-danger-500);
  background: var(--ds-danger-50);
  border: 1px solid rgba(223, 63, 73, 0.16);
}

.auth-ok {
  color: var(--ds-success-500);
  background: var(--ds-success-50);
  border: 1px solid rgba(31, 169, 113, 0.16);
}

.auth-foot-link {
  margin: 16px 0 0;
  text-align: center;
  color: var(--ds-text-secondary);
}

@media (max-width: 767px) {
  .desktop-only {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .site-time {
    display: inline;
  }

  .quick-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .home-news-card,
  .list-news-card {
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
  }

  .mobile-nav {
    display: none;
  }
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    align-items: end;
  }

  .quick-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .business-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .detail-shell {
    grid-template-columns: minmax(0, 1fr) 320px;
    align-items: start;
  }
}

.news-origin {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--ds-radius-pill);
  font-size: 11px;
  font-weight: var(--ds-weight-semibold);
  letter-spacing: 0.01em;
}

.news-origin-reprint {
  background: rgba(31, 41, 55, 0.06);
  color: var(--ds-text-tertiary);
}

.news-origin-original {
  background: rgba(31, 169, 113, 0.10);
  color: #167a57;
}

.news-rights-hint,
.reprint-note {
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(31, 41, 55, 0.04);
  border: 1px solid rgba(31, 41, 55, 0.08);
  color: var(--ds-text-tertiary);
  font-size: 12px;
  line-height: 1.6;
}

.site-legal-footer {
  padding: 0 0 calc(86px + env(safe-area-inset-bottom));
}

.site-legal-card {
  padding: 18px;
}

.site-legal-grid {
  display: grid;
  gap: 16px;
}

.site-legal-copy {
  display: grid;
  gap: 8px;
}

.site-legal-meta,
.site-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.site-legal-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--ds-radius-pill);
  background: rgba(47, 124, 255, 0.08);
  color: var(--ds-brand-700);
  font-size: 13px;
  font-weight: var(--ds-weight-semibold);
}

.site-legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--ds-radius-pill);
  border: 1px solid var(--ds-card-border);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: var(--ds-weight-semibold);
}

.legal-page-shell {
  padding-top: 24px;
}

.legal-card {
  padding: 22px;
}

.legal-prose {
  display: grid;
  gap: 16px;
}

.legal-prose p,
.legal-prose li {
  color: var(--ds-text-secondary);
  line-height: 1.8;
}

.legal-list {
  margin: 0;
  padding-left: 18px;
}

.legal-kv {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: var(--ds-radius-md);
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid var(--ds-card-border);
}

@media (min-width: 768px) {
  .site-legal-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
}

.ui-nav-link,
.main-tab,
.sub-tab,
.category-pill,
.page-control,
.page-number,
.nav-auth-btn,
.theme-toggle,
.news-comment-quick,
.news-load-more,
.comment-modal-close,
.comment-modal-go,
.ui-mobile-tab {
  -webkit-tap-highlight-color: transparent;
}

.ui-nav-link:hover,
.main-tab:hover,
.sub-tab:hover,
.category-pill:hover,
.page-control:hover,
.page-number:hover,
.nav-auth-btn:hover,
.news-comment-quick:hover,
.news-load-more:hover,
.comment-modal-close:hover,
.comment-modal-go:hover {
  color: var(--ds-text-primary);
  border-color: rgba(47, 124, 255, 0.18);
  background: rgba(255, 255, 255, 0.92);
}

.ui-nav-link:focus-visible,
.main-tab:focus-visible,
.sub-tab:focus-visible,
.category-pill:focus-visible,
.page-control:focus-visible,
.page-number:focus-visible,
.nav-auth-btn:focus-visible,
.news-comment-quick:focus-visible,
.news-load-more:focus-visible,
.comment-modal-close:focus-visible,
.comment-modal-go:focus-visible {
  outline: 2px solid rgba(47, 124, 255, 0.28);
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .home-feed-intro {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }
}

/* Second-round home/feed optimization */
.site-header {
  padding: 8px 0 0;
}

.header-shell {
  min-height: 60px;
  padding: 10px 14px;
  border-radius: 20px;
}

.header-links-shell {
  margin-top: 8px;
  padding: 7px;
}

.brand {
  gap: 10px;
  min-width: 0;
}

.brand-dot {
  width: 10px;
  height: 10px;
  flex-basis: 10px;
  box-shadow: 0 0 0 6px rgba(47, 124, 255, 0.12);
}

.brand-name {
  font-size: 15px;
}

.brand-sub {
  display: none;
}

.header-right {
  gap: 8px;
}

.nav-auth-btn,
.theme-toggle {
  min-height: 36px;
  padding: 0 12px;
  box-shadow: none;
}

.nav-auth-btn {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.theme-toggle {
  width: 36px;
}

.page-shell {
  padding: 12px 0 calc(98px + env(safe-area-inset-bottom));
}

.home-shell {
  display: grid;
  gap: 18px;
}

.home-shell .section-block {
  margin-top: 0;
}

.home-stream-head {
  display: grid;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 10px;
}

.home-stream-copy {
  display: grid;
  gap: 6px;
}

.home-stream-title {
  margin: 0;
  font-size: clamp(24px, 5.4vw, 30px);
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.home-stream-note {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.home-intro-head {
  gap: 16px;
}

.home-intro-marquee {
  overflow: hidden;
  border-radius: var(--ds-radius-pill);
  border: 1px solid rgba(47, 124, 255, 0.12);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.07), rgba(255, 152, 50, 0.08));
}

.home-intro-marquee .marquee-track {
  gap: 32px;
  padding: 10px 16px;
  animation-duration: 34s;
}

.home-intro-marquee .marquee-text {
  font-size: 13px;
  font-weight: var(--ds-weight-semibold);
  color: var(--ds-brand-700);
}

.home-stream-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stream-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--ds-radius-pill);
  background: rgba(47, 124, 255, 0.08);
  color: var(--ds-brand-700);
  font-size: 12px;
  font-weight: var(--ds-weight-semibold);
}

.news-main-tabs {
  margin-bottom: 8px;
}

.news-sub-tabs {
  margin-bottom: 12px;
}

.main-tab,
.sub-tab {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.news-grid {
  gap: 12px;
}

.home-news-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  align-items: start;
}

.home-news-card .news-cover-wrap {
  width: 108px;
  height: 92px;
  border-radius: 12px;
}

.home-news-card .news-cover {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
}

.home-news-card .news-card-copy {
  min-width: 0;
  gap: 8px;
}

.news-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.home-news-card .news-title {
  font-size: 16px;
  line-height: 1.32;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.home-news-card .news-title a {
  color: var(--ds-text-primary);
}

.home-news-card .news-summary {
  font-size: 13px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
}

.news-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.news-source-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.news-source-label {
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: var(--ds-weight-semibold);
}

.news-time {
  color: var(--ds-text-tertiary);
  font-size: 12px;
}

.news-comment-quick {
  min-height: 30px;
  padding: 0 12px;
  font-size: 12px;
}

.news-panel-actions {
  margin-top: 12px;
}

.news-load-more {
  min-height: 38px;
}

.home-entry-head {
  margin-bottom: 10px;
}

.quick-grid {
  display: flex;
  gap: 10px;
  margin-top: 0;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
}

.quick-grid::-webkit-scrollbar {
  display: none;
}

.quick-card {
  flex: 0 0 min(78vw, 260px);
  min-height: auto;
  padding: 14px;
  gap: 12px;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  scroll-snap-align: start;
}

.quick-card-copy {
  display: grid;
  gap: 4px;
}

.quick-card-primary {
  border-color: rgba(47, 124, 255, 0.18);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.14), rgba(255, 152, 50, 0.1));
}

.quick-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: var(--ds-weight-black);
  letter-spacing: 0.04em;
}

.quick-card-title {
  font-size: 15px;
}

.quick-card-desc {
  font-size: 13px;
  line-height: 1.5;
}

.site-legal-footer {
  padding: 0 0 calc(90px + env(safe-area-inset-bottom));
}

.site-legal-compact {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 0 4px;
}

.site-legal-brand {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: var(--ds-weight-semibold);
}

.site-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
}

.site-legal-links a {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ds-text-tertiary);
  font-size: 13px;
  font-weight: var(--ds-weight-medium);
}

.site-legal-links a:hover {
  color: var(--ds-text-primary);
  background: transparent;
}

.mobile-nav {
  left: 12px;
  right: 12px;
  bottom: 12px;
  width: auto;
  border: 1px solid var(--ds-card-border);
  border-radius: 22px;
  box-shadow: var(--ds-shadow-lg);
}

.mobile-nav .ui-mobile-tab {
  padding: 7px 0;
  border-radius: 16px;
}

.mobile-nav .ui-mobile-tab.is-active {
  padding: 7px 0;
}

.mobile-nav .tab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  font-size: 10px;
  font-weight: var(--ds-weight-black);
  letter-spacing: 0.05em;
}

.mobile-nav .ui-mobile-tab:first-child {
  position: relative;
  gap: 0;
}

.mobile-nav .ui-mobile-tab:first-child .tab-icon {
  display: none;
}

.mobile-nav .ui-mobile-tab:first-child span:last-child {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-nav .ui-mobile-tab:first-child::before {
  content: "";
  display: block;
  width: clamp(38px, 8vw, 48px);
  height: 24px;
  background: url("../../logo/logo.png") center / contain no-repeat;
}

@media (min-width: 768px) {
  .brand-sub {
    display: block;
  }

  .page-shell {
    padding-bottom: 28px;
  }

  .home-stream-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

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

  .home-news-card {
    grid-template-columns: 132px minmax(0, 1fr);
    min-height: 100%;
  }

  .home-news-card .news-cover-wrap {
    width: 132px;
    height: 104px;
  }

  .quick-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: visible;
    padding: 0;
  }

  .quick-card {
    min-width: 0;
    grid-template-columns: 1fr;
    align-items: start;
    flex-basis: auto;
  }

  .site-legal-footer {
    padding-bottom: 20px;
  }

  .site-legal-compact {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

@media (max-width: 420px) {
  .brand-name {
    font-size: 14px;
  }

  .nav-auth-btn {
    max-width: 96px;
    padding: 0 10px;
  }

  .home-stream-meta .stream-pill:last-child {
    display: none;
  }

  .quick-card {
    flex-basis: min(84vw, 260px);
  }
}

/* Mobile-specific feed refinement */
@media (max-width: 767px) {
  .site-header {
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .site-header .ui-container,
  .page-shell,
  .site-legal-footer .ui-container {
    width: min(calc(100% - 16px), var(--ds-container-md));
  }

  .page-shell {
    padding-top: 10px;
    padding-bottom: calc(132px + env(safe-area-inset-bottom));
  }

  .home-shell {
    gap: 14px;
  }

  .home-stream-head {
    padding: 12px 14px;
    border-radius: 22px;
  }

  .home-stream-title {
    font-size: clamp(20px, 7vw, 28px);
  }

  .home-stream-note {
    font-size: 12px;
    line-height: 1.5;
  }

  .home-stream-meta {
    gap: 6px;
  }

  .stream-pill {
    min-height: 26px;
    padding: 0 9px;
    font-size: 11px;
  }

  .news-main-tabs,
  .news-sub-tabs {
    gap: 6px;
    padding-bottom: 2px;
  }

  .main-tab,
  .sub-tab {
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
    white-space: nowrap;
  }

  .news-grid {
    gap: 10px;
  }

  .home-news-card {
    grid-template-columns: clamp(96px, 28vw, 118px) minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border-radius: 20px;
  }

  .home-news-card .news-cover-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 1.08 / 1;
    border-radius: 14px;
  }

  .home-news-card .news-card-copy {
    gap: 7px;
    padding-top: 1px;
  }

  .news-kicker {
    gap: 5px;
  }

  .news-origin,
  .news-island {
    min-height: 24px;
    padding: 0 8px;
    font-size: 11px;
  }

  .home-news-card .news-title {
    font-size: clamp(15px, 4.5vw, 18px);
    line-height: 1.28;
  }

  .home-news-card .news-summary {
    font-size: 12px;
    line-height: 1.5;
    -webkit-line-clamp: 2;
  }

  .news-card-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
  }

  .news-source-line {
    gap: 6px;
    align-items: center;
  }

  .news-source-label,
  .news-time {
    font-size: 11px;
  }

  .news-comment-quick {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    justify-self: end;
  }

  .quick-grid {
    gap: 8px;
    padding-bottom: 4px;
  }

  .quick-card {
    flex-basis: min(82vw, 240px);
    padding: 12px;
    gap: 10px;
  }

  .mobile-nav {
    left: max(8px, env(safe-area-inset-left));
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-radius: 20px;
  }

  .mobile-nav .ui-mobile-tab {
    gap: 3px;
    padding: 6px 0;
    font-size: 10px;
  }

  .mobile-nav .ui-mobile-tab.is-active {
    border-radius: 14px;
  }

  .mobile-nav .tab-icon {
    min-height: 14px;
    font-size: 9px;
  }
}

@media (max-width: 389px) {
  .header-shell {
    padding: 9px 10px;
    gap: 8px;
  }

  .brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 13px;
  }

  .nav-auth-btn,
  .theme-toggle {
    min-height: 34px;
  }

  .nav-auth-btn {
    max-width: 78px;
    padding: 0 9px;
    font-size: 13px;
  }

  .theme-toggle {
    width: 34px;
  }

  .home-news-card {
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 9px;
    padding: 9px;
  }

  .home-news-card .news-title {
    font-size: 14px;
  }

  .home-news-card .news-summary {
    font-size: 11px;
  }

  .news-card-footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .news-comment-quick {
    justify-self: start;
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  .home-news-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .home-news-card .news-summary {
    -webkit-line-clamp: 3;
  }
}

@media (max-width: 767px) and (orientation: landscape) {
  .page-shell {
    padding-bottom: calc(108px + env(safe-area-inset-bottom));
  }

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

  .quick-card {
    flex-basis: min(48vw, 240px);
  }
}

/* Mobile overflow + bottom-nav hotfix */
@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  body {
    width: 100%;
  }

  .ui-container,
  .site-header .ui-container,
  main.ui-container.page-shell,
  .site-legal-footer .ui-container {
    width: calc(100% - 20px) !important;
    max-width: var(--ds-container-md);
  }

  .home-shell,
  .home-feed-stage,
  .news-panel,
  .news-grid,
  .home-news-card,
  .home-news-card .news-card-copy,
  .news-card-footer,
  .news-source-line {
    min-width: 0;
    max-width: 100%;
  }

  .news-grid {
    overflow-x: clip;
  }

  .home-news-card {
    width: 100%;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .home-news-card .news-cover-wrap {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
    aspect-ratio: 1 / 1;
  }

  .home-news-card .news-title,
  .home-news-card .news-summary,
  .home-news-card .news-title a {
    max-width: 100%;
    word-break: break-word;
    overflow-wrap: anywhere;
  }

  .home-news-card .news-summary {
    -webkit-line-clamp: 2;
  }

  .news-card-footer {
    grid-template-columns: 1fr;
    align-items: start;
    justify-items: start;
  }

  .news-comment-quick {
    justify-self: start;
  }

  .quick-grid,
  .news-main-tabs,
  .news-sub-tabs {
    padding-right: 2px;
  }

  .mobile-nav {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    border-top: 1px solid var(--ds-card-border);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 24px rgba(16, 32, 58, 0.08);
    background: rgba(255, 255, 255, 0.96);
  }

  body.theme-dark .mobile-nav,
  [data-theme="dark"] .mobile-nav {
    background: rgba(12, 22, 41, 0.96);
  }

  .page-shell {
    padding-bottom: calc(98px + env(safe-area-inset-bottom));
  }

  .site-legal-footer {
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  .home-news-card {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  .home-news-card .news-cover-wrap {
    width: 98px;
    min-width: 98px;
    max-width: 98px;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  .home-news-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .home-news-card .news-cover-wrap {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
  }
}

/* Dark mode readability + mobile card alignment fix */
@media (max-width: 767px) {
  .news-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .news-source-line {
    flex: 1 1 auto;
    min-width: 0;
  }

  .news-comment-quick {
    flex: 0 0 auto;
    justify-self: auto;
  }
}

body.theme-dark .home-stream-head,
[data-theme="dark"] .home-stream-head,
body.theme-dark .home-news-card,
[data-theme="dark"] .home-news-card,
body.theme-dark .header-shell,
[data-theme="dark"] .header-shell {
  background: linear-gradient(180deg, rgba(8, 24, 52, 0.96), rgba(11, 29, 58, 0.94));
  border-color: rgba(114, 162, 255, 0.18);
}

body.theme-dark .home-stream-note,
[data-theme="dark"] .home-stream-note,
body.theme-dark .news-summary,
[data-theme="dark"] .news-summary,
body.theme-dark .news-source-label,
[data-theme="dark"] .news-source-label,
body.theme-dark .news-time,
[data-theme="dark"] .news-time,
body.theme-dark .site-legal-brand,
[data-theme="dark"] .site-legal-brand,
body.theme-dark .site-legal-links a,
[data-theme="dark"] .site-legal-links a {
  color: #c8d8ef;
}

body.theme-dark .main-tab,
[data-theme="dark"] .main-tab,
body.theme-dark .sub-tab,
[data-theme="dark"] .sub-tab {
  color: #dce9ff;
  border-color: rgba(124, 180, 255, 0.18);
  background: rgba(18, 38, 70, 0.94);
}

body.theme-dark .main-tab.active,
[data-theme="dark"] .main-tab.active,
body.theme-dark .sub-tab.active,
[data-theme="dark"] .sub-tab.active {
  color: #ffffff;
  border-color: rgba(124, 180, 255, 0.3);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.34), rgba(255, 152, 50, 0.2));
}

body.theme-dark .home-intro-marquee,
[data-theme="dark"] .home-intro-marquee {
  border-color: rgba(124, 180, 255, 0.14);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.12), rgba(255, 152, 50, 0.08));
}

body.theme-dark .home-intro-marquee .marquee-text,
[data-theme="dark"] .home-intro-marquee .marquee-text {
  color: #dbe8ff;
}

body.theme-dark .stream-pill,
[data-theme="dark"] .stream-pill,
body.theme-dark .news-island,
[data-theme="dark"] .news-island {
  color: #dbe9ff;
  background: rgba(34, 83, 168, 0.42);
}

body.theme-dark .news-origin-reprint,
[data-theme="dark"] .news-origin-reprint {
  color: #d7e1f1;
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .news-origin-original,
[data-theme="dark"] .news-origin-original {
  color: #c9ffe8;
  background: rgba(31, 169, 113, 0.2);
}

body.theme-dark .news-comment-quick,
[data-theme="dark"] .news-comment-quick,
body.theme-dark .nav-auth-btn,
[data-theme="dark"] .nav-auth-btn,
body.theme-dark .theme-toggle,
[data-theme="dark"] .theme-toggle {
  color: #f7fbff;
  border-color: rgba(124, 180, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
}

body.theme-dark .mobile-nav,
[data-theme="dark"] .mobile-nav {
  border-top-color: rgba(124, 180, 255, 0.18);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28);
}

body.theme-dark .mobile-nav .ui-mobile-tab,
[data-theme="dark"] .mobile-nav .ui-mobile-tab {
  color: #b9ccea;
}

body.theme-dark .mobile-nav .ui-mobile-tab.is-active,
[data-theme="dark"] .mobile-nav .ui-mobile-tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.28), rgba(255, 152, 50, 0.18));
}

body.theme-dark .mobile-nav .ui-mobile-tab:first-child::before,
[data-theme="dark"] .mobile-nav .ui-mobile-tab:first-child::before {
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.18));
}

@media (max-width: 767px) {
  body.theme-dark .home-news-card,
  [data-theme="dark"] .home-news-card {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  body.theme-dark .home-news-card .news-cover-wrap,
  [data-theme="dark"] .home-news-card .news-cover-wrap {
    width: 92px;
    min-width: 92px;
    max-width: 92px;
  }
}

@media (min-width: 390px) and (max-width: 767px) {
  body.theme-dark .home-news-card,
  [data-theme="dark"] .home-news-card {
    grid-template-columns: 98px minmax(0, 1fr);
  }

  body.theme-dark .home-news-card .news-cover-wrap,
  [data-theme="dark"] .home-news-card .news-cover-wrap {
    width: 98px;
    min-width: 98px;
    max-width: 98px;
  }
}

@media (min-width: 430px) and (max-width: 767px) {
  body.theme-dark .home-news-card,
  [data-theme="dark"] .home-news-card {
    grid-template-columns: 108px minmax(0, 1fr);
  }

  body.theme-dark .home-news-card .news-cover-wrap,
  [data-theme="dark"] .home-news-card .news-cover-wrap {
    width: 108px;
    min-width: 108px;
    max-width: 108px;
  }
}

/* Mobile two-column news grid */
@media (max-width: 767px) {
  .news-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
  }

  .home-news-card {
    display: grid;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr;
    gap: 10px;
    padding: 10px;
    border-radius: 18px;
    align-content: start;
    min-height: 100%;
  }

  .home-news-card .news-cover-wrap {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    aspect-ratio: 4 / 3;
    border-radius: 14px;
  }

  .home-news-card .news-card-copy {
    display: grid;
    gap: 7px;
    align-content: start;
    min-width: 0;
  }

  .news-kicker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

  .news-origin,
  .news-island {
    min-height: 22px;
    padding: 0 8px;
    font-size: 10px;
  }

  .home-news-card .news-title {
    font-size: 14px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  .home-news-card .news-summary {
    font-size: 11px;
    line-height: 1.45;
    -webkit-line-clamp: 2;
  }

  .news-card-footer {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 6px;
    align-items: start;
  }

  .news-source-line {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    min-width: 0;
  }

  .news-source-label,
  .news-time {
    font-size: 10px;
    line-height: 1.3;
  }

  .news-comment-quick {
    min-height: 26px;
    padding: 0 10px;
    font-size: 10px;
    justify-self: start;
  }
}

@media (max-width: 389px) {
  .news-grid {
    gap: 8px;
  }

  .home-news-card {
    padding: 8px;
    gap: 8px;
    border-radius: 16px;
  }

  .home-news-card .news-cover-wrap {
    border-radius: 12px;
  }

  .home-news-card .news-title {
    font-size: 13px;
  }

  .home-news-card .news-summary {
    font-size: 10px;
    -webkit-line-clamp: 2;
  }

  .news-origin,
  .news-island,
  .news-source-label,
  .news-time,
  .news-comment-quick {
    font-size: 10px;
  }
}

@media (min-width: 768px) {
  .home-news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Home launcher + compact member level styles */
.nav-auth-profile {
  gap: 8px;
  max-width: none;
  padding-inline: 12px;
}

.nav-auth-name {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-auth-level {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: var(--ds-weight-bold);
  background: rgba(47, 124, 255, 0.12);
  color: var(--ds-brand-700);
}

.nav-auth-level-lv1 { background: rgba(205, 127, 50, 0.16); color: #995c21; }
.nav-auth-level-lv2 { background: rgba(128, 145, 170, 0.18); color: #5d6f8e; }
.nav-auth-level-lv3 { background: rgba(255, 193, 7, 0.18); color: #9a7000; }
.nav-auth-level-lv4 { background: rgba(111, 78, 255, 0.16); color: #5e48cc; }

.home-stream-head-compact {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
}

.home-stream-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.home-launcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(47, 124, 255, 0.14);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.16), rgba(255, 152, 50, 0.12));
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: var(--ds-weight-bold);
  cursor: pointer;
}

.home-launcher-panel {
  margin-bottom: 12px;
}

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

.launcher-tile {
  display: grid;
  gap: 6px;
  min-height: 112px;
  padding: 16px;
  border-radius: 22px;
  color: #ffffff;
  text-decoration: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 16px 32px rgba(17, 39, 80, 0.16);
}

.launcher-tile strong {
  font-size: 22px;
  line-height: 1.1;
}

.launcher-tile span {
  font-size: 13px;
  line-height: 1.45;
  opacity: 0.92;
}

.launcher-tile:hover {
  transform: translateY(-2px);
  text-decoration: none;
  color: #ffffff;
}

.tile-news { background: linear-gradient(135deg, #ff9800, #ff6b00); }
.tile-island { background: linear-gradient(135deg, #4d6bff, #7e57ff); }
.tile-world { background: linear-gradient(135deg, #09b0d7, #0077b6); }
.tile-island-alt { background: linear-gradient(135deg, #00a778, #34c759); }
.tile-business { background: linear-gradient(135deg, #5a67d8, #7f5af0); }
.tile-jobs { background: linear-gradient(135deg, #00b761, #11c26d); }
.tile-community { background: linear-gradient(135deg, #ff4fa3, #ff2f68); }
.tile-me { background: linear-gradient(135deg, #7d8ca8, #5d6f8e); }
.tile-settings { background: linear-gradient(135deg, #8b95ff, #4468ff); }

body.theme-dark .nav-auth-level,
[data-theme="dark"] .nav-auth-level {
  color: #f7fbff;
  background: rgba(124, 180, 255, 0.18);
}

body.theme-dark .home-launcher-btn,
[data-theme="dark"] .home-launcher-btn {
  color: #ffffff;
  border-color: rgba(124, 180, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .launcher-tile,
[data-theme="dark"] .launcher-tile {
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

@media (max-width: 1023px) {
  .home-stream-head-compact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .home-stream-actions {
    justify-items: start;
  }

  .launcher-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .nav-auth-profile {
    padding-inline: 10px;
  }

  .nav-auth-name {
    max-width: 68px;
  }

  .nav-auth-level {
    min-height: 20px;
    padding: 0 7px;
    font-size: 10px;
  }

  .home-stream-head-compact {
    gap: 12px;
  }

  .home-launcher-btn {
    min-height: 38px;
    width: 100%;
  }

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

  .launcher-tile {
    min-height: 92px;
    padding: 12px;
    border-radius: 18px;
  }

  .launcher-tile strong {
    font-size: 16px;
  }

  .launcher-tile span {
    font-size: 11px;
    line-height: 1.35;
  }
}

@media (max-width: 460px) {
  .launcher-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Refined home hub palette + preference modal */
.nav-auth-profile {
  display: grid;
  align-items: center;
  gap: 4px;
}

.nav-auth-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-auth-island {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(18, 95, 140, 0.08);
  color: #245a84;
  font-size: 11px;
  font-weight: var(--ds-weight-semibold);
}

.home-stream-head-compact {
  padding: 16px 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(34, 99, 163, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.96), rgba(250,252,255,0.92));
}

.home-stream-actions {
  gap: 12px;
}

.home-launcher-btn {
  min-height: 42px;
  padding: 0 18px;
  border-color: rgba(28, 80, 130, 0.12);
  background: linear-gradient(135deg, rgba(36, 90, 132, 0.08), rgba(201, 168, 114, 0.1));
  color: #17375a;
}

.launcher-grid.launcher-grid-12 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.launcher-tile {
  position: relative;
  min-height: 96px;
  padding: 12px 12px 12px 14px;
  border-radius: 20px;
  color: #fff;
  overflow: hidden;
}

.launcher-tile::after {
  content: '';
  position: absolute;
  inset: auto -12px -18px auto;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
}

.launcher-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255,255,255,0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.launcher-tile strong,
.launcher-tile span,
.launcher-icon {
  position: relative;
  z-index: 1;
}

.launcher-tile strong {
  font-size: 17px;
}

.launcher-tile span {
  font-size: 11px;
  line-height: 1.35;
}

.tile-civic { background: linear-gradient(135deg, #4b78a8, #2f5f92); }
.tile-buddy { background: linear-gradient(135deg, #9a6f8d, #7e5a75); }
.tile-secondhand { background: linear-gradient(135deg, #8f6d58, #6d5444); }
.tile-transfer { background: linear-gradient(135deg, #517d6d, #376353); }
.tile-business { background: linear-gradient(135deg, #5f73a6, #44598f); }
.tile-jobs { background: linear-gradient(135deg, #5d8f73, #3f6f56); }
.tile-renovation { background: linear-gradient(135deg, #b68c4a, #956f33); }
.tile-events { background: linear-gradient(135deg, #8a6aa8, #6e4f8d); }
.tile-lost { background: linear-gradient(135deg, #6d869d, #4d6881); }
.tile-car { background: linear-gradient(135deg, #64798f, #495d73); }
.tile-software { background: linear-gradient(135deg, #56748a, #35566d); }
.tile-other { background: linear-gradient(135deg, #7c7f8a, #5f6471); }

.preference-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 90;
}

.preference-modal.show {
  display: block;
}

.preference-modal-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  margin: 10vh auto 0;
  padding: 22px;
  border-radius: 26px;
  display: grid;
  gap: 14px;
}

.preference-modal-panel h3 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
}

.preference-modal-panel p {
  margin: 0;
  color: var(--ds-text-secondary);
}

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

.preference-choice {
  min-height: 44px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(36, 90, 132, 0.12);
  background: rgba(255,255,255,0.9);
  color: var(--ds-text-primary);
  font-weight: var(--ds-weight-semibold);
  cursor: pointer;
}

.preference-choice.active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, #2f6a9f, #547ca7);
}

body.theme-dark .nav-auth-island,
[data-theme="dark"] .nav-auth-island {
  color: #dceaff;
  background: rgba(124, 180, 255, 0.16);
}

body.theme-dark .home-stream-head-compact,
[data-theme="dark"] .home-stream-head-compact {
  background:
    radial-gradient(circle at top right, rgba(97, 148, 221, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(12, 26, 48, 0.96), rgba(12, 30, 54, 0.92));
}

body.theme-dark .home-launcher-btn,
[data-theme="dark"] .home-launcher-btn {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

body.theme-dark .preference-modal-panel,
[data-theme="dark"] .preference-modal-panel {
  background: linear-gradient(180deg, rgba(10, 24, 47, 0.98), rgba(10, 28, 54, 0.96));
}

body.theme-dark .preference-modal-panel p,
[data-theme="dark"] .preference-modal-panel p {
  color: #c8d8ef;
}

body.theme-dark .preference-choice,
[data-theme="dark"] .preference-choice {
  color: #eef4ff;
  border-color: rgba(124,180,255,0.14);
  background: rgba(255,255,255,0.06);
}

@media (max-width: 1023px) {
  .launcher-grid.launcher-grid-12 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .nav-auth-meta {
    flex-wrap: wrap;
    gap: 4px;
  }

  .nav-auth-island,
  .nav-auth-level {
    font-size: 10px;
  }

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

  .launcher-tile {
    min-height: 84px;
    padding: 10px;
    border-radius: 16px;
  }

  .launcher-icon {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    font-size: 10px;
  }

  .launcher-tile strong {
    font-size: 14px;
  }

  .launcher-tile span {
    font-size: 10px;
  }

  .preference-modal-panel {
    width: calc(100% - 20px);
    margin-top: 12vh;
    padding: 18px;
  }

  .preference-modal-panel h3 {
    font-size: 22px;
  }

  .preference-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Simplified home header + instant tab feedback */
.home-stream-head-compact {
  padding: 14px 16px;
}

.home-stream-copy {
  gap: 4px;
}

.home-stream-note {
  font-size: 14px;
  line-height: 1.5;
}

.home-stream-actions {
  justify-items: start;
}

.home-launcher-btn {
  min-width: 168px;
}

.main-tab,
.sub-tab {
  touch-action: manipulation;
  transition: background-color .08s ease, border-color .08s ease, color .08s ease, transform .08s ease;
}

.main-tab.active,
.sub-tab.active {
  color: #14345a;
  border-color: rgba(47, 124, 255, 0.26);
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.2), rgba(201, 168, 114, 0.14));
}

.main-tab.is-pressed,
.sub-tab.is-pressed {
  transform: scale(0.98);
  border-color: rgba(47, 124, 255, 0.22);
  background: rgba(47, 124, 255, 0.12);
}

@media (max-width: 767px) {
  .home-stream-head-compact {
    gap: 10px;
    padding: 12px 14px;
  }

  .home-stream-title {
    font-size: clamp(18px, 6.6vw, 24px);
  }

  .home-stream-note {
    font-size: 13px;
  }

  .home-intro-marquee .marquee-track {
    padding: 9px 14px;
    gap: 24px;
    animation-duration: 28s;
  }

  .home-intro-marquee .marquee-text {
    font-size: 12px;
  }

  .home-launcher-btn {
    width: 100%;
    min-width: 0;
  }

  .main-tab,
  .sub-tab {
    min-height: 38px;
    font-weight: 700;
  }

  .main-tab.active,
  .sub-tab.active {
    color: #0f2f58;
    background: linear-gradient(135deg, rgba(47, 124, 255, 0.22), rgba(201, 168, 114, 0.18));
    box-shadow: inset 0 0 0 1px rgba(47, 124, 255, 0.12);
  }
}

body.theme-dark .main-tab.active,
[data-theme="dark"] .main-tab.active,
body.theme-dark .sub-tab.active,
[data-theme="dark"] .sub-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(73, 138, 255, 0.42), rgba(140, 112, 77, 0.34));
}

body.theme-dark .main-tab.is-pressed,
[data-theme="dark"] .main-tab.is-pressed,
body.theme-dark .sub-tab.is-pressed,
[data-theme="dark"] .sub-tab.is-pressed {
  background: rgba(124, 180, 255, 0.18);
}

/* CINFO24 brand system */
.brand-logo {
  width: clamp(52px, 5vw, 72px);
  height: auto;
  flex: 0 0 auto;
  display: block;
}

.brand-copy {
  align-content: center;
}

.brand-name {
  letter-spacing: -0.02em;
}

.auth-logo-image {
  width: min(280px, 72vw);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 10px 22px rgba(14, 63, 147, 0.18));
}

.auth-logo-wrap.auth-logo-wrap-brand {
  gap: 12px;
}

.auth-logo-wrap.auth-logo-wrap-brand h1 {
  font-size: clamp(26px, 7.5vw, 38px);
  letter-spacing: -0.04em;
}

.site-legal-brand-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-legal-logo {
  width: 34px;
  height: auto;
  flex: 0 0 auto;
}

.site-legal-brand {
  margin: 0;
}

.member-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.member-brand-logo {
  width: 44px;
  height: auto;
  display: block;
}

.member-brand-name {
  font-weight: 800;
  font-size: 15px;
  color: #173667;
}

body.theme-dark .member-brand-name,
[data-theme="dark"] .member-brand-name {
  color: #dce8ff;
}

@media (max-width: 767px) {
  .brand {
    gap: 10px;
  }

  .brand-logo {
    width: 46px;
  }

  .brand-name {
    font-size: 15px;
  }

  .brand-sub {
    font-size: 11px;
  }

  .auth-logo-image {
    width: min(236px, 78vw);
  }

  .site-legal-brand-wrap {
    justify-content: center;
  }

  .site-legal-logo {
    width: 28px;
  }
}

/* Homepage real logo */
.brand-home-logo {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo-home {
  width: clamp(148px, 20vw, 230px);
  height: auto;
  display: block;
}

@media (max-width: 767px) {
  .brand-logo-home {
    width: clamp(132px, 38vw, 180px);
  }

  .header-shell {
    gap: 8px;
    padding: 10px 12px;
  }
}

/* CINFO24 member avatar experience */
.header-shell-home {
  align-items: flex-start;
}

.header-right-home {
  align-items: flex-start;
}

.home-member-card {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 6px 8px;
}

.home-member-avatar-link {
  display: inline-flex;
  border-radius: 50%;
  box-shadow: 0 10px 24px rgba(18, 55, 119, 0.14);
}

.home-member-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(68, 113, 214, 0.18);
  background: #f4f8ff;
}

.home-member-name {
  max-width: 96px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ds-text-primary);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-member-name:hover {
  color: var(--ds-text-primary);
}

.home-member-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 190px;
}

.home-member-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(26, 61, 122, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: #24467f;
  font-size: 11px;
  font-weight: 700;
}

.home-member-logout:hover {
  color: #24467f;
}

.auth-card-wide {
  max-width: 820px;
}

.auth-logo-image-brand {
  width: min(360px, 82vw);
  height: auto;
}

.avatar-picker-block {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(245, 249, 255, 0.9);
  border: 1px solid rgba(146, 173, 220, 0.24);
}

.avatar-picker-head {
  display: grid;
  gap: 4px;
}

.avatar-picker-head label,
.avatar-picker-group-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: var(--ds-text-primary);
}

.avatar-picker-head span {
  font-size: 12px;
  color: var(--ds-text-secondary);
}

.avatar-picker-group {
  display: grid;
  gap: 10px;
}

.avatar-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.avatar-option {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 10px 8px;
  border-radius: 18px;
  border: 1px solid rgba(150, 172, 211, 0.28);
  background: #ffffff;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.avatar-option img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-option span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ds-text-secondary);
}

.avatar-option.is-selected {
  border-color: rgba(47, 124, 255, 0.44);
  box-shadow: 0 12px 26px rgba(47, 124, 255, 0.16);
  transform: translateY(-1px);
}

.avatar-option.is-selected span {
  color: var(--ds-brand-700);
}

body.theme-dark .home-member-avatar,
[data-theme="dark"] .home-member-avatar {
  border-color: rgba(131, 165, 239, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

body.theme-dark .home-member-name,
body.theme-dark .home-member-logout,
[data-theme="dark"] .home-member-name,
[data-theme="dark"] .home-member-logout {
  color: #e7f0ff;
}

body.theme-dark .home-member-logout,
[data-theme="dark"] .home-member-logout {
  border-color: rgba(131, 165, 239, 0.2);
  background: rgba(18, 28, 47, 0.9);
}

body.theme-dark .avatar-picker-block,
[data-theme="dark"] .avatar-picker-block {
  background: rgba(18, 28, 47, 0.88);
  border-color: rgba(115, 141, 206, 0.3);
}

body.theme-dark .avatar-picker-head label,
body.theme-dark .avatar-picker-group-title,
body.theme-dark .avatar-option span,
[data-theme="dark"] .avatar-picker-head label,
[data-theme="dark"] .avatar-picker-group-title,
[data-theme="dark"] .avatar-option span {
  color: #dbe8ff;
}

body.theme-dark .avatar-picker-head span,
[data-theme="dark"] .avatar-picker-head span {
  color: #abc1ea;
}

body.theme-dark .avatar-option,
[data-theme="dark"] .avatar-option {
  background: rgba(20, 31, 52, 0.96);
  border-color: rgba(115, 141, 206, 0.3);
}

@media (max-width: 767px) {
  .header-shell-home {
    align-items: center;
  }

  .home-member-avatar {
    width: 52px;
    height: 52px;
  }

  .home-member-name {
    max-width: 72px;
    font-size: 12px;
  }

  .home-member-actions {
    max-width: 140px;
    gap: 4px;
  }

  .home-member-logout,
  .nav-auth-island,
  .nav-auth-level {
    min-height: 22px;
    font-size: 10px;
    padding-inline: 8px;
  }

  .avatar-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .avatar-option img {
    width: 50px;
    height: 50px;
  }
}

/* Mobile header compact row */
@media (max-width: 767px) {
  .header-shell-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }

  .brand-home-logo {
    display: none;
  }

  .header-home-center {
    grid-column: 1 / -1;
    display: flex;
    min-width: 0;
  }

  .header-time-card {
    width: 100%;
    min-width: 0;
    padding: 12px 14px;
    border-radius: 20px;
  }

  .header-time-value {
    font-size: clamp(18px, 8vw, 28px);
  }

  .header-time-date {
    font-size: 12px;
  }

  .header-right-home {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
  }

  .home-member-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    min-width: 0;
    flex: 1 1 auto;
  }

  .home-member-avatar-link {
    flex: 0 0 auto;
  }

  .home-member-avatar {
    width: 44px;
    height: 44px;
  }

  .home-member-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
  }

  .home-member-name {
    max-width: none;
    font-size: 13px;
    text-align: left;
  }

  .home-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    max-width: none;
    overflow: visible;
  }

  .home-member-logout,
  .nav-auth-island,
  .nav-auth-level {
    min-height: 24px;
    padding-inline: 8px;
    font-size: 10px;
    white-space: nowrap;
  }

  .theme-toggle,
  .nav-auth-btn {
    min-height: 36px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .theme-toggle {
    width: 36px;
    padding-inline: 0;
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .header-shell-home {
    gap: 8px;
    padding: 10px;
  }

  .header-time-card {
    padding: 10px 12px;
  }

  .header-time-value {
    font-size: clamp(18px, 7.5vw, 24px);
  }

  .home-member-avatar {
    width: 40px;
    height: 40px;
  }

  .home-member-name {
    font-size: 12px;
  }

  .home-member-actions {
    gap: 4px;
  }

  .home-member-logout,
  .nav-auth-island,
  .nav-auth-level {
    padding-inline: 7px;
    font-size: 9px;
  }
}

/* Desktop home header rebalance */
.home-member-meta {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.header-home-center {
  min-width: 0;
}

.header-time-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 182px;
  padding: 10px 18px;
  border-radius: 22px;
  border: 1px solid rgba(151, 176, 219, 0.26);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 249, 255, 0.92));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.header-time-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--ds-text-tertiary);
}

.header-time-value {
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1;
  color: var(--ds-text-primary);
}

.header-time-date {
  font-size: 12px;
  color: var(--ds-text-secondary);
}

@media (min-width: 768px) {
  .header-shell-home {
    align-items: center;
    justify-content: flex-start;
    gap: clamp(18px, 2.6vw, 34px);
  }

  .brand-logo-home {
    width: clamp(134px, 14vw, 198px);
  }

  .header-home-center {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
  }

  .header-right-home {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
  }

  .home-member-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0;
  }

  .home-member-avatar {
    width: 58px;
    height: 58px;
  }

  .home-member-name {
    max-width: 112px;
    text-align: left;
    font-size: 14px;
  }

  .home-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 196px;
  }

  .home-member-logout,
  .nav-auth-island,
  .nav-auth-level {
    min-height: 28px;
    padding-inline: 10px;
    font-size: 12px;
  }
}

@media (max-width: 767px) {
  .home-member-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
  }
}

body.theme-dark .header-time-card,
[data-theme="dark"] .header-time-card {
  border-color: rgba(111, 143, 210, 0.28);
  background: linear-gradient(180deg, rgba(17, 28, 48, 0.94), rgba(11, 20, 35, 0.96));
}

body.theme-dark .header-time-label,
[data-theme="dark"] .header-time-label {
  color: #9eb7e8;
}

body.theme-dark .header-time-value,
[data-theme="dark"] .header-time-value {
  color: #f5f8ff;
}

body.theme-dark .header-time-date,
[data-theme="dark"] .header-time-date {
  color: #c5d6f5;
}


/* Homepage header refresh v2 */
.header-shell-home {
  align-items: center;
  gap: 16px;
}

.home-header-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-header-utility {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.home-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.home-member-card,
.home-member-card-inline {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0;
  min-width: 0;
}

.home-member-avatar {
  width: 44px;
  height: 44px;
}

.home-member-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.home-member-name {
  max-width: 132px;
  text-align: left;
  font-size: 14px;
}

.home-member-actions {
  max-width: none;
  justify-content: flex-start;
  gap: 5px;
}

.header-time-card,
.header-time-card-inline {
  min-width: 146px;
  padding: 8px 14px;
  border-radius: 18px;
}

.header-time-label {
  font-size: 11px;
}

.header-time-value {
  font-size: clamp(20px, 2vw, 32px);
  line-height: 1;
}

.header-time-date {
  font-size: 12px;
}

.home-publish-btn,
.home-launcher-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(151, 176, 219, 0.24);
  color: #1b3f74;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 8px 18px rgba(19, 44, 87, 0.08);
}

.home-publish-btn:hover,
.home-launcher-btn:hover {
  color: #1b3f74;
  transform: translateY(-1px);
}

.home-publish-btn-primary {
  border-color: transparent;
  color: #ffffff;
  background: linear-gradient(135deg, #2f7cff, #6856ff);
}

.home-publish-btn-primary:hover {
  color: #ffffff;
}

.home-publish-btn-secondary {
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.08), rgba(255, 152, 50, 0.10));
}

.home-login-pill {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 12px;
}

.home-feed-stage {
  display: grid;
  gap: 14px;
}

.home-stream-head.home-intro-head {
  gap: 0;
  padding: 10px 12px;
  margin-bottom: 0;
}

.home-intro-marquee {
  width: 100%;
}

.home-intro-marquee .marquee-track {
  gap: 24px;
  padding: 8px 14px;
  animation-duration: 28s;
}

.home-intro-marquee .marquee-text {
  font-size: 13px;
}

.publish-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.publish-card,
.plaza-card {
  padding: 18px;
}

.publish-card.is-active {
  border-color: rgba(47, 124, 255, 0.26);
  box-shadow: 0 14px 26px rgba(47, 124, 255, 0.10);
}

.publish-form {
  gap: 14px;
}

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

.publish-field,
.publish-field--full {
  display: grid;
  gap: 8px;
}

.publish-field--full {
  grid-column: 1 / -1;
}

.publish-form select,
.publish-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--ds-card-border);
  border-radius: var(--ds-radius-md);
  background: var(--ds-input-bg);
  color: var(--ds-text-primary);
}

.publish-form textarea {
  resize: vertical;
  min-height: 132px;
}

.publish-section-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.publish-hint {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.plaza-grid {
  display: grid;
  gap: 14px;
}

.plaza-card {
  display: grid;
  gap: 10px;
}

.plaza-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plaza-card-head time {
  color: var(--ds-text-tertiary);
  font-size: 12px;
}

.plaza-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(47, 124, 255, 0.10);
  color: var(--ds-brand-700);
  font-size: 12px;
  font-weight: 700;
}

.plaza-card--business .plaza-badge {
  background: rgba(255, 152, 50, 0.14);
  color: #98580f;
}

.plaza-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.28;
}

.plaza-title a,
.plaza-link {
  color: var(--ds-text-primary);
}

.plaza-meta,
.plaza-summary {
  margin: 0;
  color: var(--ds-text-secondary);
  line-height: 1.7;
}

.plaza-link {
  font-weight: 700;
}

@media (max-width: 767px) {
  .header-shell-home {
    padding: 12px;
  }

  .brand-home-logo {
    display: none;
  }

  .home-header-main {
    display: grid;
    gap: 8px;
    width: 100%;
  }

  .home-header-utility {
    width: 100%;
    gap: 8px;
  }

  .header-time-card,
  .header-time-card-inline {
    min-width: 104px;
    padding: 8px 10px;
  }

  .header-time-value {
    font-size: clamp(18px, 6.2vw, 24px);
  }

  .header-time-date,
  .header-time-label {
    font-size: 10px;
  }

  .home-member-card,
  .home-member-card-inline {
    flex: 1 1 auto;
    gap: 8px;
  }

  .home-member-avatar {
    width: 40px;
    height: 40px;
  }

  .home-member-name {
    max-width: 88px;
    font-size: 12px;
  }

  .home-member-actions {
    gap: 4px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .home-member-logout,
  .nav-auth-island,
  .nav-auth-level,
  .home-login-pill {
    min-height: 22px;
    padding-inline: 8px;
    font-size: 10px;
  }

  .theme-toggle {
    width: 36px;
    min-width: 36px;
    min-height: 36px;
  }

  .home-header-actions {
    justify-content: flex-end;
  }

  .home-header-actions .home-publish-btn {
    display: none;
  }

  .home-launcher-btn {
    min-height: 34px;
    padding-inline: 12px;
    font-size: 12px;
  }

  .home-stream-head.home-intro-head {
    padding: 9px 10px;
  }

  .home-intro-marquee .marquee-track {
    gap: 18px;
    padding: 8px 12px;
  }

  .home-intro-marquee .marquee-text {
    font-size: 12px;
  }

  .publish-grid,
  .publish-form-grid {
    grid-template-columns: 1fr;
  }

  .publish-card,
  .plaza-card {
    padding: 16px;
  }
}
.home-login-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.home-login-pill-secondary {
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 767px) {
  .header-shell-home {
    padding: 10px 12px;
    gap: 10px;
  }

  .home-header-main {
    gap: 10px;
  }

  .home-header-utility {
    display: grid;
    grid-template-columns: minmax(108px, 124px) minmax(0, 1fr) 38px;
    align-items: start;
    gap: 8px;
  }

  .header-time-card,
  .header-time-card-inline {
    min-width: 0;
    width: 100%;
    padding: 8px 10px;
    border-radius: 16px;
  }

  .header-time-value {
    font-size: clamp(16px, 5.5vw, 22px);
  }

  .header-time-date,
  .header-time-label {
    font-size: 10px;
    line-height: 1.15;
  }

  .theme-toggle {
    grid-column: 3;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: end;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .home-login-group,
  .home-member-card,
  .home-member-card-inline {
    min-width: 0;
    align-items: flex-start;
    gap: 8px;
  }

  .home-login-group {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    padding-top: 2px;
  }

  .home-login-pill {
    min-height: 30px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .home-member-avatar {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    flex-shrink: 0;
  }

  .home-member-meta {
    gap: 4px;
  }

  .home-member-name {
    max-width: none;
    font-size: 13px;
    line-height: 1.15;
  }

  .home-member-actions {
    gap: 6px;
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
    max-width: 100%;
  }

  .home-member-logout,
  .nav-auth-island,
  .nav-auth-level {
    min-height: 24px;
    padding: 0 9px;
    font-size: 10px;
    white-space: nowrap;
  }

  .home-header-actions {
    justify-content: flex-start;
  }

  .home-launcher-btn {
    width: 100%;
    min-height: 32px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .home-header-utility {
    grid-template-columns: 104px minmax(0, 1fr) 36px;
    gap: 7px;
  }

  .header-time-card,
  .header-time-card-inline {
    padding: 7px 9px;
  }

  .header-time-value {
    font-size: clamp(15px, 5.1vw, 20px);
  }

  .home-login-pill {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .home-member-avatar {
    width: 32px;
    height: 32px;
  }

  .home-member-name {
    font-size: 12px;
  }

  .home-member-actions {
    gap: 4px;
  }

  .home-member-logout,
  .nav-auth-island,
  .nav-auth-level {
    padding: 0 8px;
    font-size: 10px;
  }
}
/* Final mobile account header fix */
.home-login-group {
  display: flex !important;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-login-group .nav-auth-btn,
.home-login-group .home-login-pill {
  max-width: none;
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .home-login-group {
    min-width: 0;
  }

  .home-header-utility {
    flex-wrap: nowrap;
  }
}

@media (max-width: 767px) {
  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: start;
    justify-items: start;
    gap: 4px;
    width: 100%;
  }

  .home-member-avatar-link {
    display: inline-flex;
    justify-self: start;
  }

  .home-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 12px;
  }

  .home-member-meta {
    display: grid;
    gap: 4px;
    width: 100%;
  }

  .home-member-name {
    max-width: none;
    width: 100%;
    font-size: 12px;
    text-align: left;
  }

  .home-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 5px;
    width: 100%;
    max-width: none;
    overflow: visible;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    flex: 0 0 auto;
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
    white-space: nowrap;
  }

  .home-login-group {
    width: 100%;
    align-self: center;
    justify-content: flex-start;
  }

  .home-login-group .nav-auth-btn,
  .home-login-group .home-login-pill {
    min-height: 30px;
    padding: 0 12px;
    font-size: 12px;
  }
}

@media (max-width: 420px) {
  .home-member-actions {
    gap: 4px;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    padding: 0 7px;
    font-size: 10px;
  }

  .home-login-group .nav-auth-btn,
  .home-login-group .home-login-pill {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }
}
/* Mobile member row fine-tune: avatar left, name right */
@media (max-width: 767px) {
  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    align-items: center;
    width: 100%;
  }

  .home-member-avatar-link {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .home-member-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .home-member-meta {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 100%;
    display: grid;
    gap: 5px;
    align-content: start;
  }

  .home-member-name {
    width: 100%;
    max-width: none;
    font-size: 11px;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }
}
/* Final mobile member block layout */
.nav-auth-island[hidden],
.nav-auth-island.is-hidden {
  display: none !important;
}

@media (max-width: 767px) {
  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 0;
    align-items: start;
    width: 100%;
  }

  .home-member-avatar-link {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .home-member-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
  }

  .home-member-meta {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-rows: auto auto;
    align-content: start;
    gap: 6px;
    width: 100%;
    min-width: 0;
  }

  .home-member-name {
    display: block;
    width: 100%;
    margin: 0;
    font-size: 11px;
    line-height: 1.15;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  .home-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    max-width: none;
    margin: 0;
    overflow: visible;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
    white-space: nowrap;
  }
}
/* Mobile member block final polish */
@media (max-width: 767px) {
  .home-header-utility {
    grid-template-columns: 108px minmax(0, 1fr) 36px;
    column-gap: 8px;
  }

  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 46px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 2px;
    align-items: start;
  }

  .home-member-avatar-link {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
  }

  .home-member-avatar {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .home-member-meta {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    grid-template-rows: auto auto;
    gap: 4px;
    min-width: 0;
    width: 100%;
  }

  .home-member-name {
    display: block;
    width: 100%;
    margin: 1px 0 0;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  .home-member-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 4px;
    width: 100%;
    max-width: none;
    min-width: 0;
    overflow: hidden;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    flex: 0 1 auto;
    min-width: 0;
    min-height: 22px;
    padding: 0 6px;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    border-radius: 999px;
  }
}

@media (max-width: 420px) {
  .home-header-utility {
    grid-template-columns: 102px minmax(0, 1fr) 34px;
    column-gap: 7px;
  }

  .home-member-card-inline {
    grid-template-columns: 44px minmax(0, 1fr);
    column-gap: 7px;
  }

  .home-member-avatar {
    width: 42px;
    height: 42px;
  }

  .home-member-name {
    font-size: 9px;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    min-height: 21px;
    padding: 0 5px;
    font-size: 8.5px;
  }
}
/* Mobile member name moved to welcome line */
.home-member-welcome {
  display: none;
}

@media (max-width: 767px) {
  .home-member-name {
    display: none !important;
  }

  .home-member-welcome {
    display: block;
    width: 100%;
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #203a68;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }
}
/* Mobile header gap fix: distribute member content vertically */
@media (max-width: 767px) {
  .home-member-card-inline {
    align-items: stretch;
  }

  .home-member-meta {
    display: flex !important;
    flex-direction: column;
    justify-content: space-between;
    align-self: stretch;
    height: 100%;
    min-height: 44px;
    padding-block: 2px;
  }

  .home-member-actions {
    margin: 0;
  }

  .home-member-welcome {
    margin-top: auto;
    padding-top: 4px;
  }
}
/* Mobile member block clean alignment */
@media (max-width: 767px) {
  .home-member-card-inline {
    align-self: center;
  }

  .home-member-meta {
    justify-content: center !important;
    align-self: center !important;
    height: auto !important;
    min-height: 0 !important;
    padding-block: 0 !important;
    gap: 5px !important;
  }

  .home-member-actions {
    justify-content: flex-start;
    margin: 0;
  }

  .home-member-welcome {
    margin: 0;
    padding-top: 0 !important;
    font-size: 10px;
    line-height: 1.15;
    opacity: 0.92;
  }
}
/* Desktop header cleanup */
@media (min-width: 768px) {
  .header-shell-home {
    align-items: center;
    gap: 22px;
    padding: 14px 18px;
  }

  .brand-logo-home {
    width: clamp(150px, 13vw, 210px);
  }

  .home-header-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
  }

  .home-header-utility {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
  }

  .header-time-card,
  .header-time-card-inline {
    min-width: 168px;
    padding: 10px 16px;
    border-radius: 22px;
  }

  .home-member-card-inline {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    align-items: center;
    column-gap: 12px;
    min-width: 0;
  }

  .home-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .home-member-meta {
    display: grid;
    gap: 6px;
    min-width: 0;
  }

  .home-member-name {
    max-width: none;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-member-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
    max-width: none;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    min-height: 30px;
    padding: 0 12px;
    font-size: 12px;
    white-space: nowrap;
  }

  .theme-toggle {
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    margin-left: 4px;
  }

  .home-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .home-header-actions .home-publish-btn,
  .home-header-actions .home-launcher-btn {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  .home-header-actions .home-launcher-btn {
    width: auto;
    background: rgba(255, 255, 255, 0.82);
  }
}
/* Desktop header anti-overlap fix */
@media (min-width: 768px) {
  .home-header-main {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
  }

  .home-header-utility {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1 1 620px;
    min-width: 0;
    flex-wrap: nowrap;
  }

  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 48px minmax(170px, auto);
    align-items: center;
    column-gap: 12px;
    flex: 0 0 auto;
    min-width: 230px;
  }

  .home-member-avatar-link {
    flex: 0 0 auto;
  }

  .home-member-meta {
    min-width: 0;
    align-content: center;
  }

  .home-member-name {
    display: block;
    max-width: 100%;
    margin: 0;
  }

  .home-member-actions {
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .home-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    flex-wrap: wrap;
    margin-left: auto;
  }
}

@media (min-width: 768px) and (max-width: 1240px) {
  .home-header-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 4px;
  }
}
/* Desktop header final reset */
@media (min-width: 768px) {
  .header-shell-home {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 28px;
    padding: 18px 24px;
  }

  .brand-home-logo {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    flex: 0 0 auto;
  }

  .brand-logo-home {
    width: clamp(170px, 14vw, 230px);
    height: auto;
  }

  .home-header-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    min-width: 0;
  }

  .home-header-utility {
    display: grid !important;
    grid-template-columns: 190px minmax(280px, 1fr) 42px;
    align-items: center;
    gap: 18px;
    min-width: 0;
  }

  .header-time-card,
  .header-time-card-inline {
    width: 190px;
    min-width: 190px;
    padding: 12px 18px;
    border-radius: 24px;
  }

  .header-time-value {
    font-size: clamp(28px, 2.2vw, 44px);
  }

  .header-time-date {
    font-size: 13px;
  }

  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    min-width: 0;
    max-width: 420px;
  }

  .home-member-avatar-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .home-member-avatar {
    width: 54px;
    height: 54px;
    border-radius: 18px;
  }

  .home-member-meta {
    display: grid !important;
    gap: 8px;
    min-width: 0;
    align-content: center;
  }

  .home-member-name {
    display: block !important;
    margin: 0;
    max-width: 100%;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.05;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left;
  }

  .home-member-welcome {
    display: none !important;
  }

  .home-member-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 8px;
    max-width: 100%;
    overflow: hidden;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    white-space: nowrap;
  }

  .theme-toggle {
    width: 42px;
    min-width: 42px;
    min-height: 42px;
    margin: 0;
    justify-self: start;
  }

  .home-header-actions {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 12px;
    margin-left: auto;
  }

  .home-header-actions .home-publish-btn,
  .home-header-actions .home-launcher-btn {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 18px;
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
  }

  .home-header-actions .home-launcher-btn {
    width: auto;
    min-width: 128px;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .home-header-utility {
    grid-template-columns: 176px minmax(240px, 1fr) 40px;
    gap: 14px;
  }

  .home-member-card-inline {
    max-width: 340px;
    column-gap: 12px;
  }

  .home-member-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }

  .home-member-name {
    font-size: 15px;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    padding: 0 10px;
    font-size: 11px;
  }

  .home-header-actions {
    gap: 10px;
  }

  .home-header-actions .home-publish-btn,
  .home-header-actions .home-launcher-btn {
    min-height: 40px;
    padding: 0 15px;
    font-size: 14px;
  }

  .home-header-actions .home-launcher-btn {
    min-width: 112px;
  }
}
/* Desktop header show logout button cleanly */
@media (min-width: 768px) {
  .home-member-card-inline {
    max-width: 500px;
  }

  .home-member-actions {
    flex-wrap: wrap !important;
    row-gap: 6px;
    overflow: visible !important;
    max-width: 100%;
  }
}

@media (min-width: 768px) and (max-width: 1180px) {
  .home-member-card-inline {
    max-width: 380px;
  }
}
/* Header corner icons: desktop and mobile */
.header-shell-home {
  position: relative;
}

.home-header-corner {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 6;
}

.header-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(181, 193, 214, 0.72);
  background: rgba(255, 255, 255, 0.94);
  color: #17305e;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  text-decoration: none;
}

.header-icon-glyph {
  font-size: 18px;
  line-height: 1;
}

.header-icon-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.24);
}

@media (max-width: 767px) {
  .header-shell-home {
    padding-right: 18px !important;
  }

  .home-header-main {
    padding-right: 72px !important;
  }

  .home-header-corner {
    top: 18px;
    right: 18px;
    gap: 8px;
  }

  .header-icon-btn,
  .theme-toggle {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
  }

  .home-member-actions {
    padding-right: 0 !important;
  }
}

@media (min-width: 768px) {
  .header-shell-home {
    padding-top: 18px !important;
    padding-right: 128px !important;
  }

  .home-header-main {
    padding-right: 0 !important;
  }

  .home-header-utility {
    grid-template-columns: 190px minmax(280px, 1fr) !important;
  }

  .home-header-corner {
    top: 16px;
    right: 18px;
  }

  .home-header-actions {
    padding-right: 0 !important;
  }
}

body.theme-dark .header-icon-btn,
[data-theme="dark"] .header-icon-btn {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.3);
  color: #f8fafc;
}

/* Desktop header stability fix */
@media (min-width: 1024px) {
  .header-shell-home {
    padding-right: 132px !important;
  }

  .home-header-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
    min-width: 0;
  }

  .home-header-utility {
    display: flex !important;
    align-items: center;
    gap: 18px;
    min-width: 0;
    overflow: hidden;
  }

  .header-time-card,
  .header-time-card-inline {
    flex: 0 0 236px;
    width: 236px;
    min-width: 236px;
  }

  .home-member-card-inline {
    display: flex !important;
    align-items: center;
    gap: 14px;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 360px;
  }

  .home-member-avatar-link {
    flex: 0 0 auto;
  }

  .home-member-meta {
    flex: 1 1 auto;
    min-width: 0;
  }

  .home-member-name {
    display: block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-member-actions {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    overflow: visible !important;
    max-width: 100%;
  }

  .home-login-group {
    display: inline-flex !important;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .home-header-actions {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 0 0 auto;
    margin-left: 0;
  }

  .home-header-actions .home-publish-btn,
  .home-header-actions .home-launcher-btn {
    flex: 0 0 auto;
  }
}

/* Header member block cleanup */
@media (min-width: 1024px) {
  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 56px minmax(160px, 1fr);
    align-items: center;
    gap: 14px;
    flex: 0 1 340px;
    max-width: 340px;
  }

  .home-member-meta {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 6px;
    min-width: 0;
  }

  .home-member-name {
    display: block !important;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    color: #0f2247;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .home-member-actions {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
}

@media (max-width: 767px) {
  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
  }

  .home-member-meta {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center !important;
    gap: 6px !important;
    min-width: 0;
  }

  .home-member-actions {
    order: 1;
    display: flex !important;
    align-items: center;
    gap: 0;
    margin: 0;
  }

  .home-member-actions .nav-auth-level,
  .home-member-actions .nav-auth-island {
    display: none !important;
  }

  .home-member-logout {
    min-height: 30px;
    padding: 0 12px;
    font-size: 12px;
  }

  .home-member-name {
    order: 2;
    display: block !important;
    width: 100%;
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.15;
    color: #0f2247;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Desktop member name visibility fix */
@media (min-width: 1024px) {
  .home-header-utility {
    overflow: visible !important;
  }

  .home-member-card-inline {
    flex: 0 0 250px !important;
    width: 250px !important;
    min-width: 250px !important;
    max-width: 250px !important;
  }

  .home-member-meta {
    overflow: hidden !important;
  }

  .home-member-name {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
}

/* Desktop header final layout */
@media (min-width: 1024px) {
  .header-shell-home {
    grid-template-columns: 270px minmax(0, 1fr) !important;
    padding-right: 146px !important;
  }

  .home-header-main {
    display: grid !important;
    grid-template-columns: minmax(560px, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-width: 0;
  }

  .home-header-utility {
    display: grid !important;
    grid-template-columns: 236px 300px;
    align-items: center;
    gap: 20px;
    width: max-content;
    max-width: 100%;
    overflow: visible !important;
  }

  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 300px !important;
    min-width: 300px !important;
    max-width: 300px !important;
    flex: none !important;
  }

  .home-member-meta {
    display: grid !important;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
  }

  .home-member-name {
    font-size: 16px !important;
  }

  .home-member-actions {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .home-login-group {
    justify-self: start;
  }

  .home-header-actions {
    display: inline-flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
    width: max-content;
  }
}

@media (min-width: 1024px) and (max-width: 1320px) {
  .home-header-main {
    grid-template-columns: minmax(500px, 1fr) auto;
  }

  .home-header-utility {
    grid-template-columns: 220px 260px;
    gap: 16px;
  }

  .home-member-card-inline {
    width: 260px !important;
    min-width: 260px !important;
    max-width: 260px !important;
  }

  .home-header-actions .home-publish-btn,
  .home-header-actions .home-launcher-btn {
    padding-inline: 14px;
  }
}

/* Desktop header overflow emergency fix */
@media (min-width: 1024px) {
  .header-shell-home {
    overflow: hidden;
    padding-right: 154px !important;
  }

  .home-header-main {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    width: 100%;
  }

  .home-header-utility {
    display: flex !important;
    align-items: center;
    gap: 16px;
    min-width: 0;
    flex: 1 1 auto;
    width: auto !important;
    max-width: calc(100% - 360px);
    overflow: hidden;
  }

  .header-time-card,
  .header-time-card-inline {
    flex: 0 0 220px;
    width: 220px;
    min-width: 220px;
  }

  .home-member-card-inline {
    display: grid !important;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    flex: 1 1 240px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: 260px !important;
  }

  .home-member-avatar {
    width: 50px;
    height: 50px;
  }

  .home-member-meta {
    min-width: 0;
    overflow: hidden;
  }

  .home-member-name {
    font-size: 15px !important;
    max-width: 100% !important;
  }

  .home-member-actions {
    gap: 6px;
    flex-wrap: wrap;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .home-header-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 1 330px;
    max-width: 330px;
    flex-wrap: wrap;
    margin-left: auto;
  }

  .home-header-actions .home-publish-btn,
  .home-header-actions .home-launcher-btn {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
    flex: 0 0 auto;
  }

  .home-header-actions .home-launcher-btn {
    min-width: 120px;
  }
}

/* Desktop header compact spacing */
@media (min-width: 1024px) {
  .header-shell-home {
    grid-template-columns: 230px minmax(0, 1fr) !important;
    gap: 14px !important;
    padding: 16px 18px !important;
    padding-right: 150px !important;
  }

  .brand-logo-home {
    width: 210px !important;
  }

  .home-header-main {
    gap: 14px !important;
  }

  .home-header-utility {
    gap: 12px !important;
    max-width: calc(100% - 320px) !important;
  }

  .header-time-card,
  .header-time-card-inline {
    flex: 0 0 186px !important;
    width: 186px !important;
    min-width: 186px !important;
    padding: 10px 12px !important;
    border-radius: 22px !important;
  }

  .header-time-label {
    font-size: 12px !important;
  }

  .header-time-value {
    font-size: 28px !important;
    line-height: 1.05 !important;
  }

  .header-time-date {
    font-size: 12px !important;
  }

  .home-member-card-inline {
    max-width: 220px !important;
  }

  .home-member-name {
    font-size: 14px !important;
  }

  .nav-auth-level,
  .nav-auth-island,
  .home-member-logout {
    padding: 0 9px !important;
    font-size: 11px !important;
  }

  .home-header-actions {
    gap: 8px !important;
    max-width: 320px !important;
    flex: 0 0 auto !important;
  }

  .home-header-actions .home-publish-btn,
  .home-header-actions .home-launcher-btn {
    min-height: 36px !important;
    padding: 0 12px !important;
    font-size: 13px !important;
    border-radius: 16px !important;
  }

  .home-header-actions .home-launcher-btn {
    min-width: 110px !important;
  }
}

/* News view switch */
.news-main-toolbar {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.news-main-toolbar .news-main-tabs {
  margin-bottom: 0;
}

.news-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 18px;
}

.news-view-divider {
  width: 22px;
  height: 1px;
  border-radius: 999px;
  background: rgba(150, 172, 211, 0.6);
}

.news-view-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(150, 172, 211, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ds-text-secondary);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}

.news-view-btn.is-active {
  border-color: rgba(47, 124, 255, 0.34);
  background: rgba(47, 124, 255, 0.12);
  color: var(--ds-brand-700);
  box-shadow: 0 10px 22px rgba(47, 124, 255, 0.12);
}

.news-view-btn:hover,
.news-view-btn:focus-visible {
  transform: translateY(-1px);
}

body.news-cols-1 .news-grid {
  grid-template-columns: 1fr !important;
}

body.news-cols-2 .news-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.news-cols-3 .news-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

@media (min-width: 768px) {
  body.news-cols-1 .home-news-card {
    grid-template-columns: 180px minmax(0, 1fr) !important;
    gap: 14px;
  }

  body.news-cols-1 .home-news-card .news-cover-wrap {
    width: 180px !important;
    height: 126px !important;
    aspect-ratio: auto;
  }

  body.news-cols-2 .home-news-card {
    grid-template-columns: 132px minmax(0, 1fr) !important;
  }

  body.news-cols-2 .home-news-card .news-cover-wrap {
    width: 132px !important;
    height: 104px !important;
    aspect-ratio: auto;
  }

  body.news-cols-3 .home-news-card {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto 1fr;
    gap: 12px;
    align-content: start;
  }

  body.news-cols-3 .home-news-card .news-cover-wrap {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 4 / 3;
  }

  body.news-cols-3 .home-news-card .news-card-copy {
    display: grid;
    gap: 8px;
    align-content: start;
  }

  body.news-cols-3 .home-news-card .news-title {
    font-size: 16px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  body.news-cols-3 .home-news-card .news-summary {
    font-size: 12px;
    line-height: 1.55;
    -webkit-line-clamp: 2;
  }

  body.news-cols-3 .home-news-card .news-card-footer {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

@media (max-width: 767px) {
  .news-main-toolbar {
    gap: 12px;
    margin-bottom: 10px;
  }

  .news-view-switch {
    margin-left: 0;
    gap: 6px;
  }

  .news-view-divider {
    width: 14px;
  }

  .news-view-btn {
    min-height: 30px;
    padding: 0 10px;
    font-size: 11px;
  }

  body.news-cols-1 .news-grid {
    grid-template-columns: 1fr !important;
  }

  body.news-cols-1 .home-news-card {
    grid-template-columns: 96px minmax(0, 1fr) !important;
    gap: 10px;
  }

  body.news-cols-1 .home-news-card .news-cover-wrap {
    width: 96px !important;
    min-width: 96px !important;
    max-width: 96px !important;
    aspect-ratio: 1 / 1;
  }

  body.news-cols-2 .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.news-cols-3 .news-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  body.news-cols-3 .home-news-card {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px;
    padding: 8px;
    border-radius: 16px;
  }

  body.news-cols-3 .home-news-card .news-cover-wrap {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
  }

  body.news-cols-3 .home-news-card .news-card-copy {
    gap: 6px;
  }

  body.news-cols-3 .home-news-card .news-title {
    font-size: 12px;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }

  body.news-cols-3 .home-news-card .news-summary {
    display: none;
  }

  body.news-cols-3 .news-origin,
  body.news-cols-3 .news-island {
    min-height: 20px;
    padding: 0 6px;
    font-size: 9px;
  }

  body.news-cols-3 .news-source-label,
  body.news-cols-3 .news-time,
  body.news-cols-3 .news-comment-quick {
    font-size: 9px;
  }
}

body.theme-dark .news-view-btn,
[data-theme="dark"] .news-view-btn {
  background: rgba(18, 28, 47, 0.88);
  border-color: rgba(115, 141, 206, 0.28);
  color: #dbe8ff;
}

body.theme-dark .news-view-btn.is-active,
[data-theme="dark"] .news-view-btn.is-active {
  background: rgba(47, 124, 255, 0.2);
  border-color: rgba(131, 165, 239, 0.4);
  color: #f5f9ff;
}

/* News view icon buttons */
.news-view-btn {
  width: 44px;
  min-width: 44px;
  padding: 0;
}

.news-view-icon {
  display: inline-grid;
  align-items: stretch;
  justify-items: stretch;
  gap: 3px;
  width: 18px;
  height: 14px;
}

.news-view-icon span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: rgba(23, 48, 94, 0.32);
  transition: background 160ms ease, transform 160ms ease;
}

.news-view-icon-1 {
  grid-template-columns: 1fr;
}

.news-view-icon-2 {
  grid-template-columns: repeat(2, 1fr);
}

.news-view-icon-3 {
  grid-template-columns: repeat(3, 1fr);
}

.news-view-btn.is-active .news-view-icon span {
  background: linear-gradient(180deg, #5087ff 0%, #2f7cff 100%);
  box-shadow: 0 5px 10px rgba(47, 124, 255, 0.18);
}

.news-view-btn:hover .news-view-icon span,
.news-view-btn:focus-visible .news-view-icon span {
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .news-view-btn {
    width: 38px;
    min-width: 38px;
  }

  .news-view-icon {
    width: 16px;
    height: 12px;
    gap: 2px;
  }
}

body.theme-dark .news-view-icon span,
[data-theme="dark"] .news-view-icon span {
  background: rgba(219, 232, 255, 0.38);
}

body.theme-dark .news-view-btn.is-active .news-view-icon span,
[data-theme="dark"] .news-view-btn.is-active .news-view-icon span {
  background: linear-gradient(180deg, #7ca4ff 0%, #4d7cff 100%);
}

/* Mobile grid switch reflow fix */
@media (max-width: 767px) {
  body.news-cols-1 .news-grid,
  body.news-cols-3 .news-grid {
    align-items: start !important;
  }

  body.news-cols-1 .home-news-card,
  body.news-cols-3 .home-news-card {
    min-height: auto !important;
    height: auto !important;
    align-self: start !important;
  }

  body.news-cols-1 .home-news-card {
    grid-template-rows: auto !important;
  }

  body.news-cols-1 .home-news-card .news-card-copy,
  body.news-cols-3 .home-news-card .news-card-copy {
    align-content: start !important;
    height: auto !important;
  }

  body.news-cols-1 .news-card-footer,
  body.news-cols-3 .news-card-footer {
    align-self: start !important;
  }
}

/* News card actions + favorites/share */
.news-card-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.news-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--ds-card-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: var(--ds-weight-bold);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, color .18s ease, background-color .18s ease;
}

.news-action-icon:hover,
.news-action-icon:focus-visible,
.detail-favorite-toggle:hover,
.detail-share-trigger:hover {
  transform: translateY(-1px);
}

.news-favorite-toggle {
  padding-inline: 0;
  font-size: 18px;
  line-height: 1;
}

.news-favorite-toggle.is-active,
.detail-favorite-toggle.is-active {
  color: #e25575;
  border-color: rgba(226, 85, 117, 0.22);
  background: rgba(226, 85, 117, 0.10);
}

.news-share-trigger {
  min-width: 50px;
}

@media (max-width: 767px) {
  .news-card-actions {
    justify-content: flex-start;
  }

  .news-action-icon {
    min-width: 28px;
    min-height: 28px;
    padding: 0 9px;
    font-size: 11px;
  }

  .news-favorite-toggle {
    font-size: 16px;
  }
}

body.theme-dark .news-action-icon,
[data-theme="dark"] .news-action-icon {
  color: #eef5ff;
  border-color: rgba(124, 180, 255, 0.18);
  background: rgba(255, 255, 255, 0.10);
}

body.theme-dark .news-favorite-toggle.is-active,
[data-theme="dark"] .news-favorite-toggle.is-active,
body.theme-dark .detail-favorite-toggle.is-active,
[data-theme="dark"] .detail-favorite-toggle.is-active {
  color: #ffb2c3;
  background: rgba(226, 85, 117, 0.16);
  border-color: rgba(255, 178, 195, 0.28);
}

.publish-search-shell {
  margin: 14px 0 18px;
}

.publish-search-card {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
}

.publish-search-card--home {
  padding: 14px 16px;
}

.publish-search-copy {
  display: grid;
  gap: 4px;
}

.publish-search-copy--compact {
  gap: 2px;
}

.publish-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 0.95fr) minmax(0, 0.95fr) auto;
  gap: 10px;
  align-items: center;
}

.publish-search-form--home {
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.9fr) minmax(0, 0.9fr) auto;
}

.publish-search-input-wrap,
.publish-search-select-wrap {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  border: 1px solid rgba(47, 124, 255, 0.14);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.publish-search-input-wrap:focus-within,
.publish-search-select-wrap:focus-within {
  border-color: rgba(47, 124, 255, 0.28);
  box-shadow: 0 0 0 4px rgba(47, 124, 255, 0.08);
}

.publish-search-icon {
  flex: 0 0 auto;
  font-size: 20px;
  color: var(--ds-text-tertiary);
}

.publish-search-input,
.publish-search-select {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ds-text-primary);
  font-size: 15px;
  font-weight: var(--ds-weight-semibold);
}

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

.publish-search-select {
  appearance: none;
  padding-right: 24px;
  cursor: pointer;
}

.publish-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 22px;
  border: 0;
  border-radius: 28px;
  background: linear-gradient(135deg, #16885f, #1ca16f);
  color: #fff;
  font-size: 15px;
  font-weight: var(--ds-weight-bold);
  cursor: pointer;
  box-shadow: 0 18px 30px rgba(22, 136, 95, 0.18);
}

.publish-search-submit:hover,
.publish-search-submit:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 22px 34px rgba(22, 136, 95, 0.22);
}

.plaza-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.plaza-card {
  min-height: 100%;
}

.plaza-title a,
.plaza-link {
  color: var(--ds-text-primary);
}

@media (max-width: 900px) {
  .publish-search-form,
  .publish-search-form--home {
    grid-template-columns: 1fr 1fr;
  }

  .publish-search-input-wrap {
    grid-column: 1 / -1;
  }

  .publish-search-submit {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  .publish-search-card,
  .publish-search-card--home {
    padding: 14px;
  }

  .publish-search-form,
  .publish-search-form--home {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .publish-search-input-wrap,
  .publish-search-select-wrap,
  .publish-search-submit {
    min-height: 50px;
    border-radius: 24px;
  }

  .publish-search-submit {
    width: 100%;
  }
}

body.theme-dark .publish-search-input-wrap,
body.theme-dark .publish-search-select-wrap,
[data-theme="dark"] .publish-search-input-wrap,
[data-theme="dark"] .publish-search-select-wrap {
  background: rgba(15, 22, 42, 0.7);
  border-color: rgba(115, 144, 255, 0.18);
}

body.theme-dark .publish-search-input,
body.theme-dark .publish-search-select,
[data-theme="dark"] .publish-search-input,
[data-theme="dark"] .publish-search-select {
  color: var(--ds-text-primary);
}

body.theme-dark .publish-search-icon,
[data-theme="dark"] .publish-search-icon {
  color: var(--ds-text-secondary);
}


.home-search-trigger,
.publish-search-mobile-trigger {
  display: none;
}

.publish-search-mobile-row {
  display: none;
}

.publish-search-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 110;
}

.publish-search-modal[aria-hidden="false"] {
  display: block;
}

.publish-search-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(224, 232, 247, 0.26);
  backdrop-filter: blur(18px) saturate(130%);
}

.publish-search-glass {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  margin: 10vh auto 0;
  padding: 18px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(245, 248, 255, 0.56));
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(28px) saturate(140%);
}

.publish-search-glass-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.publish-search-glass-title {
  font-size: 18px;
  font-weight: var(--ds-weight-black);
  color: var(--ds-text-primary);
}

.publish-search-glass-close {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(181, 193, 214, 0.72);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ds-text-primary);
  font-size: 13px;
  font-weight: var(--ds-weight-bold);
}

.publish-search-glass-form {
  display: grid;
  gap: 10px;
}

.publish-search-glass-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.publish-search-input-wrap--glass,
.publish-search-glass .publish-search-select-wrap {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(190, 203, 225, 0.72);
}

.publish-search-submit--glass {
  width: 100%;
}

@media (max-width: 767px) {
  .publish-search-shell--home {
    display: none !important;
  }

  .publish-search-shell--plaza .publish-search-card {
    display: none;
  }

  .publish-search-mobile-row {
    display: block;
    margin: 6px 0 14px;
  }

  .home-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
    width: 100%;
    margin-top: 8px;
  }

  .home-header-actions .home-publish-btn {
    display: none !important;
  }

  .home-search-trigger,
  .publish-search-mobile-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(181, 193, 214, 0.72);
    background: rgba(255, 255, 255, 0.86);
    color: var(--ds-text-primary);
    font-size: 15px;
    font-weight: var(--ds-weight-bold);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
  }

  .publish-search-mobile-trigger {
    backdrop-filter: blur(12px) saturate(120%);
  }

  .home-header-actions .home-launcher-btn,
  .home-header-actions .home-search-trigger {
    min-width: 0 !important;
    min-height: 48px !important;
    width: 100%;
    border-radius: 999px;
  }

  .publish-search-glass {
    width: calc(100vw - 24px);
    margin-top: 12vh;
    padding: 16px;
    border-radius: 24px;
  }

  .publish-search-glass-grid {
    grid-template-columns: 1fr;
  }
}

body.theme-dark .publish-search-glass,
[data-theme="dark"] .publish-search-glass {
  background: linear-gradient(180deg, rgba(16, 24, 40, 0.78), rgba(23, 33, 55, 0.7));
  border-color: rgba(148, 163, 184, 0.24);
}

body.theme-dark .publish-search-modal-backdrop,
[data-theme="dark"] .publish-search-modal-backdrop {
  background: rgba(3, 7, 18, 0.36);
}

body.theme-dark .publish-search-glass-close,
[data-theme="dark"] .publish-search-glass-close,
body.theme-dark .home-search-trigger,
body.theme-dark .publish-search-mobile-trigger,
[data-theme="dark"] .home-search-trigger,
[data-theme="dark"] .publish-search-mobile-trigger {
  background: rgba(15, 23, 42, 0.7);
  border-color: rgba(148, 163, 184, 0.24);
  color: #f8fafc;
}


.publish-search-shell--home {
  display: none !important;
}

.publish-search-input-wrap--glass {
  min-height: 54px;
  border-radius: 22px;
  border-color: rgba(197, 209, 228, 0.88) !important;
  background: rgba(255, 255, 255, 0.52) !important;
}

.publish-search-glass {
  width: min(92vw, 460px) !important;
  padding: 16px !important;
  border-radius: 26px !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(242, 247, 255, 0.48)) !important;
  border-color: rgba(255, 255, 255, 0.58) !important;
}

.publish-search-glass-head {
  margin-bottom: 12px !important;
}

.publish-search-glass-title {
  font-size: 17px !important;
}

.publish-search-glass-close {
  min-height: 34px !important;
  padding: 0 16px !important;
  background: rgba(255, 255, 255, 0.58) !important;
}

.publish-search-glass-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px !important;
}

.publish-search-field-card {
  display: grid;
  gap: 6px;
  padding: 10px 12px;
  min-height: 76px;
  border-radius: 20px;
  border: 1px solid rgba(197, 209, 228, 0.86);
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54);
}

.publish-search-field-label {
  font-size: 12px;
  font-weight: 700;
  color: #6f7d95;
  letter-spacing: 0.02em;
}

.publish-search-select--glass {
  min-height: 28px;
  padding-right: 28px;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #17305e !important;
  -webkit-text-fill-color: #17305e !important;
  background-image: linear-gradient(45deg, transparent 50%, #7b8aa8 50%), linear-gradient(135deg, #7b8aa8 50%, transparent 50%);
  background-position: calc(100% - 14px) calc(50% - 2px), calc(100% - 8px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.publish-search-submit--glass {
  min-height: 48px !important;
  border-radius: 22px !important;
  background: linear-gradient(135deg, #2f7cff, #4f8dff) !important;
  box-shadow: 0 14px 30px rgba(47, 124, 255, 0.22) !important;
}

.home-header-actions {
  align-items: stretch !important;
}

.home-publish-group,
.home-utility-group {
  display: flex;
  gap: 10px;
}

.home-utility-group {
  flex-direction: column;
}

.home-search-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .home-header-actions {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    gap: 12px !important;
  }

  .home-publish-group {
    display: inline-flex;
    align-items: center;
    gap: 10px;
  }

  .home-utility-group {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    min-width: 120px;
  }

  .home-header-actions .home-launcher-btn,
  .home-header-actions .home-search-trigger {
    min-height: 34px !important;
    padding: 0 14px !important;
    font-size: 13px !important;
    border-radius: 17px !important;
  }

  .home-search-trigger {
    border: 1px solid rgba(181, 193, 214, 0.72);
    background: rgba(255, 255, 255, 0.88);
    color: var(--ds-text-primary);
  }
}

@media (max-width: 767px) {
  .home-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px !important;
    width: 100%;
    margin-top: 6px !important;
  }

  .home-publish-group {
    display: none !important;
  }

  .home-utility-group {
    display: contents !important;
  }

  .home-header-actions .home-launcher-btn,
  .home-header-actions .home-search-trigger {
    min-height: 42px !important;
    padding: 0 12px !important;
    font-size: 14px !important;
    border-radius: 21px !important;
    box-shadow: none !important;
  }

  .publish-search-glass {
    width: calc(100vw - 28px) !important;
    margin-top: 11vh !important;
    padding: 14px !important;
    border-radius: 24px !important;
  }

  .publish-search-glass-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .publish-search-field-card {
    min-height: 68px;
    padding: 9px 12px;
    border-radius: 18px;
  }

  .publish-search-submit--glass {
    min-height: 44px !important;
    border-radius: 20px !important;
  }
}

body.theme-dark .publish-search-field-card,
[data-theme="dark"] .publish-search-field-card {
  background: rgba(16, 24, 40, 0.54);
  border-color: rgba(148, 163, 184, 0.22);
}

body.theme-dark .publish-search-select--glass,
[data-theme="dark"] .publish-search-select--glass {
  color: #f8fafc !important;
  -webkit-text-fill-color: #f8fafc !important;
  background-image: linear-gradient(45deg, transparent 50%, #cbd5e1 50%), linear-gradient(135deg, #cbd5e1 50%, transparent 50%) !important;
}


@media (min-width: 768px) {
  .home-header-actions {
    display: grid !important;
    grid-template-columns: auto auto !important;
    grid-template-areas:
      "publish plaza"
      "nav search" !important;
    gap: 8px 10px !important;
    justify-content: end !important;
    align-items: center !important;
    justify-items: end !important;
  }

  .home-header-actions > .home-publish-btn-primary {
    grid-area: publish;
  }

  .home-header-actions > .home-publish-btn-secondary {
    grid-area: plaza;
  }

  .home-header-actions > .home-launcher-btn {
    grid-area: nav;
    width: 118px;
  }

  .home-header-actions > .home-search-trigger {
    grid-area: search;
    width: 118px;
  }
}

@media (max-width: 767px) {
  .home-header-actions > .home-publish-btn-primary,
  .home-header-actions > .home-publish-btn-secondary {
    display: none !important;
  }

  .home-header-actions > .home-launcher-btn,
  .home-header-actions > .home-search-trigger {
    width: 100% !important;
  }
}


@media (max-width: 767px) {
  .home-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(132px, 148px)) !important;
    justify-content: center !important;
    justify-items: stretch !important;
    gap: 8px !important;
    width: auto !important;
    margin: 6px auto 0 !important;
  }

  .home-header-actions > .home-launcher-btn,
  .home-header-actions > .home-search-trigger {
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 10px !important;
    font-size: 13px !important;
    border-radius: 19px !important;
    line-height: 1 !important;
  }
}

@media (min-width: 768px) {
  .home-header-actions > .home-launcher-btn,
  .home-header-actions > .home-search-trigger {
    width: 110px !important;
    min-width: 110px !important;
  }
}

/* Final search + header alignment overrides */
.publish-search-shell--home {
  display: none !important;
}

.publish-search-glass {
  width: min(calc(100vw - 28px), 430px) !important;
  padding: 16px !important;
  border-radius: 24px !important;
  background: linear-gradient(180deg, rgba(255,255,255,0.78), rgba(243,247,255,0.62)) !important;
  border: 1px solid rgba(215, 225, 242, 0.9) !important;
  box-shadow: 0 22px 52px rgba(15, 23, 42, 0.18), inset 0 1px 0 rgba(255,255,255,0.82) !important;
  backdrop-filter: blur(24px) saturate(145%) !important;
}

.publish-search-glass-head {
  margin-bottom: 10px !important;
}

.publish-search-glass-title {
  font-size: 17px !important;
}

.publish-search-glass-close {
  min-height: 34px !important;
  padding: 0 14px !important;
  border-radius: 17px !important;
}

.publish-search-glass-form {
  gap: 10px !important;
}

.publish-search-input-wrap--glass {
  min-height: 50px !important;
  border-radius: 18px !important;
  padding: 0 14px !important;
  background: rgba(255,255,255,0.72) !important;
  border: 1px solid rgba(196, 209, 232, 0.92) !important;
}

.publish-search-glass-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

.publish-search-field-card {
  display: grid !important;
  align-content: center !important;
  gap: 4px !important;
  min-height: 68px !important;
  padding: 10px 12px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(196, 209, 232, 0.92) !important;
  background: rgba(255,255,255,0.66) !important;
}

.publish-search-field-label {
  font-size: 11px !important;
  font-weight: 800 !important;
  color: #71809a !important;
  letter-spacing: 0.04em !important;
}

.publish-search-select--glass {
  display: block !important;
  width: 100% !important;
  min-height: 26px !important;
  padding: 0 28px 0 0 !important;
  border: 0 !important;
  outline: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-color: transparent !important;
  background-image: linear-gradient(45deg, transparent 50%, #7b8aa8 50%), linear-gradient(135deg, #7b8aa8 50%, transparent 50%) !important;
  background-position: calc(100% - 14px) calc(50% - 1px), calc(100% - 8px) calc(50% - 1px) !important;
  background-size: 6px 6px, 6px 6px !important;
  background-repeat: no-repeat !important;
  color: #17305e !important;
  -webkit-text-fill-color: #17305e !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.publish-search-select--glass option {
  color: #17305e;
  background: #ffffff;
}

.publish-search-submit--glass {
  min-height: 44px !important;
  border-radius: 18px !important;
  background: linear-gradient(135deg, #2f7cff, #4f8dff) !important;
  box-shadow: 0 12px 28px rgba(47,124,255,0.22) !important;
}

@media (max-width: 767px) {
  .home-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(136px, 146px)) !important;
    justify-content: center !important;
    justify-items: stretch !important;
    align-items: center !important;
    gap: 8px !important;
    width: auto !important;
    margin: 6px auto 0 !important;
  }

  .home-header-actions > .home-publish-btn-primary,
  .home-header-actions > .home-publish-btn-secondary {
    display: none !important;
  }

  .home-header-actions > .home-launcher-btn,
  .home-header-actions > .home-search-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 17px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  .home-header-actions > .home-search-trigger {
    background: rgba(255,255,255,0.9) !important;
    border-color: rgba(191, 204, 225, 0.9) !important;
    color: #17305e !important;
  }

  .publish-search-mobile-row {
    display: block !important;
    margin: 4px 0 12px !important;
  }

  .publish-search-mobile-trigger {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 14px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(191, 204, 225, 0.88) !important;
    background: rgba(255,255,255,0.88) !important;
    color: #17305e !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    box-shadow: none !important;
  }

  .publish-search-glass {
    width: calc(100vw - 24px) !important;
    margin-top: 10vh !important;
    padding: 14px !important;
    border-radius: 22px !important;
  }

  .publish-search-glass-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .publish-search-field-card {
    min-height: 62px !important;
    padding: 9px 10px !important;
    border-radius: 16px !important;
  }

  .publish-search-select--glass {
    font-size: 13px !important;
  }
}

@media (min-width: 768px) {
  .home-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, max-content) !important;
    grid-template-areas: "publish plaza" "nav search" !important;
    gap: 8px 12px !important;
    justify-content: end !important;
    justify-items: stretch !important;
    align-items: center !important;
    width: auto !important;
  }

  .home-header-actions > .home-publish-btn-primary {
    grid-area: publish;
    width: 126px !important;
  }

  .home-header-actions > .home-publish-btn-secondary {
    grid-area: plaza;
    width: 126px !important;
  }

  .home-header-actions > .home-launcher-btn {
    grid-area: nav;
    width: 112px !important;
    min-width: 112px !important;
    min-height: 38px !important;
  }

  .home-header-actions > .home-search-trigger {
    grid-area: search;
    width: 112px !important;
    min-width: 112px !important;
    min-height: 38px !important;
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(191, 204, 225, 0.88) !important;
    color: #17305e !important;
    box-shadow: none !important;
  }
}

/* Search interaction polish */
.home-launcher-btn,
.home-search-trigger,
.publish-search-mobile-trigger,
.publish-search-glass-close {
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.home-launcher-btn:hover,
.home-search-trigger:hover,
.publish-search-mobile-trigger:hover,
.publish-search-glass-close:hover {
  background: rgba(243, 247, 255, 0.96) !important;
  border-color: rgba(120, 146, 196, 0.92) !important;
  color: #17305e !important;
}

.home-launcher-btn:active,
.home-search-trigger:active,
.publish-search-mobile-trigger:active,
.publish-search-glass-close:active {
  transform: scale(0.985);
}

@media (max-width: 767px) {
  .header-shell-home .home-header-main {
    width: 100% !important;
  }

  .header-shell-home .home-header-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin: 6px 0 0 !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 12px !important;
    border-radius: 17px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    box-shadow: none !important;
  }

  .header-shell-home .home-header-actions > .home-search-trigger,
  .publish-search-mobile-trigger {
    background: rgba(255,255,255,0.9) !important;
    border: 1px solid rgba(191, 204, 225, 0.9) !important;
    color: #17305e !important;
  }

  .publish-search-modal {
    padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom) 0;
  }

  .publish-search-glass {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: calc(env(safe-area-inset-top) + 74px) !important;
    width: auto !important;
    margin: 0 !important;
    transform: translateZ(0);
    will-change: transform;
    max-height: calc(100vh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 96px);
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .publish-search-input-wrap--glass {
    min-height: 48px !important;
  }

  .publish-search-input-wrap--glass .publish-search-input,
  .publish-search-select--glass {
    font-size: 16px !important;
  }
}

/* Mobile header action row full-width alignment */
@media (max-width: 767px) {
  .header-shell-home .home-header-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "utility corner"
      "actions actions" !important;
    align-items: start !important;
    gap: 8px 10px !important;
    width: 100% !important;
  }

  .header-shell-home .home-header-utility {
    grid-area: utility !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .header-shell-home .home-header-corner {
    grid-area: corner !important;
    align-self: start !important;
  }

  .header-shell-home .home-header-actions {
    grid-area: actions !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: none !important;
    justify-content: stretch !important;
    justify-items: stretch !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin: 4px 0 0 !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
  }
}

/* Mobile home header final layout */
@media (max-width: 767px) {
  .header-shell-home {
    padding-right: 18px !important;
  }

  .header-shell-home .home-header-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "utility utility"
      "actions corner" !important;
    align-items: start !important;
    gap: 10px 12px !important;
    width: 100% !important;
    padding-right: 0 !important;
  }

  .header-shell-home .home-header-utility {
    grid-area: utility !important;
    display: grid !important;
    grid-template-columns: 1fr minmax(0, 1.15fr) !important;
    align-items: start !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow: visible !important;
  }

  .header-shell-home .home-member-card-inline,
  .header-shell-home .home-login-group {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .header-shell-home .home-member-card-inline {
    grid-template-columns: 56px minmax(0, 1fr) !important;
    align-items: start !important;
  }

  .header-shell-home .home-member-meta {
    min-width: 0 !important;
  }

  .header-shell-home .home-member-name {
    max-width: 100% !important;
  }

  .header-shell-home .home-header-actions {
    grid-area: actions !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
    gap: 10px !important;
    margin: 0 !important;
    align-items: stretch !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .header-shell-home .home-header-corner {
    grid-area: corner !important;
    position: static !important;
    top: auto !important;
    right: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 0 !important;
    align-self: center !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    margin: 0 !important;
  }
}
/* 2026 site-wide public refresh */
.site-header {
  padding-top: 14px;
}

.header-shell,
.header-links-shell,
.home-stream-head,
.home-news-card,
.business-card,
.detail-card,
.comment-panel,
.publish-card,
.plaza-card,
.publish-search-card,
.legal-card,
.auth-card,
.empty-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(16, 32, 59, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.94)),
    var(--ds-card-bg);
  box-shadow: 0 18px 48px rgba(16, 33, 62, 0.08);
}

.header-shell::before,
.home-stream-head::before,
.page-hero::before,
.publish-card::before,
.detail-card::before,
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.header-shell {
  padding: 16px 18px;
  border-radius: 30px;
}

.header-links-shell {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 24px;
}

.header-links-shell .ui-nav-link {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-logo-home {
  width: 52px;
  height: 52px;
}

.nav-auth-btn,
.theme-toggle,
.header-icon-btn,
.home-publish-btn,
.home-launcher-btn,
.home-search-trigger {
  min-height: 44px;
  border-radius: 999px;
  border-color: rgba(16, 32, 59, 0.08);
  box-shadow: 0 10px 24px rgba(16, 33, 62, 0.06);
}

.nav-auth-btn,
.home-publish-btn-secondary,
.home-launcher-btn,
.home-search-trigger,
.header-icon-btn,
.theme-toggle {
  background: rgba(255, 255, 255, 0.74);
}

.nav-auth-btn.primary,
.home-publish-btn-primary {
  background: linear-gradient(135deg, var(--ds-primary), #4e7de9 56%, var(--ds-accent-400));
  box-shadow: 0 16px 28px rgba(49, 95, 206, 0.18);
}

.home-header-actions {
  gap: 12px;
}

.home-login-group,
.home-member-card,
.home-member-card-inline {
  border: 1px solid rgba(16, 32, 59, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.9)),
    var(--ds-card-bg);
  box-shadow: 0 16px 30px rgba(16, 33, 62, 0.06);
}

.home-member-name {
  color: var(--ds-text-primary);
}

.home-stream-head.home-intro-head {
  padding: 20px 24px;
  border-radius: 28px;
}

.marquee-track {
  gap: 56px;
  padding: 14px 18px;
}

.news-main-toolbar {
  gap: 14px;
  margin: 20px 0 18px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px);
}

.main-tab,
.sub-tab {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ds-text-secondary);
  font-weight: var(--ds-weight-bold);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.main-tab.active,
.sub-tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--ds-primary), #4e7de9 58%, var(--ds-accent-400));
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(49, 95, 206, 0.18);
}

.home-news-card {
  border-radius: 28px;
}

.home-news-card .news-cover-wrap,
.detail-cover,
.business-card .news-cover-wrap {
  border-radius: 20px;
}

.home-news-card .news-card-copy {
  gap: 14px;
}

.home-news-card .news-title {
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.home-news-card .news-summary,
.section-note,
.business-desc,
.detail-prose,
.detail-card .ui-text {
  color: var(--ds-text-secondary);
}

.news-load-more {
  min-height: 46px;
  padding: 0 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(16, 32, 59, 0.1);
  box-shadow: 0 12px 24px rgba(16, 33, 62, 0.06);
}

.page-hero {
  padding: 30px;
  border-radius: 32px;
}

.page-hero .ui-title-lg {
  max-width: 18ch;
}

.hero-actions {
  gap: 12px;
}

.launcher-tile {
  min-height: 182px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 247, 252, 0.94));
  box-shadow: 0 16px 34px rgba(16, 33, 62, 0.07);
}

.launcher-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 42px rgba(16, 33, 62, 0.1);
}

.launcher-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(49, 95, 206, 0.12), rgba(219, 155, 59, 0.14));
  color: var(--ds-text-primary);
  font-size: 22px;
  font-weight: var(--ds-weight-black);
}

.business-card,
.publish-card,
.plaza-card,
.detail-card,
.comment-panel,
.publish-search-card,
.legal-card {
  border-radius: 28px;
}

.business-card,
.publish-card,
.plaza-card,
.detail-card,
.comment-panel,
.legal-card {
  padding: 22px;
}

.publish-card.is-active {
  border-color: rgba(49, 95, 206, 0.16);
  box-shadow: 0 20px 42px rgba(49, 95, 206, 0.1);
}

.publish-form-grid {
  gap: 16px;
}

.publish-field {
  gap: 8px;
}

.comment-form,
.auth-form {
  gap: 12px;
}

.auth-shell {
  padding: 34px 14px calc(102px + env(safe-area-inset-bottom));
}

.auth-card {
  width: min(100%, 540px);
  border-radius: 30px;
  padding: 28px;
}

.auth-form input,
.auth-form .prefix-select,
.auth-form textarea {
  min-height: 48px;
  border-radius: 16px;
  border-color: rgba(16, 32, 59, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.auth-submit {
  min-height: 48px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--ds-primary), #4e7de9 58%, var(--ds-accent-400));
  box-shadow: 0 16px 28px rgba(49, 95, 206, 0.18);
}

.auth-submit:hover {
  transform: translateY(-1px);
}

.auth-error,
.auth-ok {
  border-radius: 16px;
}

.site-legal-footer {
  padding-top: 26px;
}

.site-legal-compact {
  gap: 18px;
  padding: 18px 22px;
  border-radius: 24px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(247, 250, 253, 0.92)),
    var(--ds-card-bg);
  box-shadow: 0 16px 32px rgba(16, 33, 62, 0.06);
}

.site-legal-brand {
  color: var(--ds-text-secondary);
}

.site-legal-links a {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ds-text-secondary);
  border: 1px solid transparent;
}

.site-legal-links a:hover {
  background: rgba(49, 95, 206, 0.07);
  border-color: rgba(49, 95, 206, 0.08);
}

body.theme-dark .header-shell,
[data-theme="dark"] .header-shell,
body.theme-dark .header-links-shell,
[data-theme="dark"] .header-links-shell,
body.theme-dark .home-stream-head,
[data-theme="dark"] .home-stream-head,
body.theme-dark .home-news-card,
[data-theme="dark"] .home-news-card,
body.theme-dark .business-card,
[data-theme="dark"] .business-card,
body.theme-dark .detail-card,
[data-theme="dark"] .detail-card,
body.theme-dark .comment-panel,
[data-theme="dark"] .comment-panel,
body.theme-dark .publish-card,
[data-theme="dark"] .publish-card,
body.theme-dark .plaza-card,
[data-theme="dark"] .plaza-card,
body.theme-dark .publish-search-card,
[data-theme="dark"] .publish-search-card,
body.theme-dark .legal-card,
[data-theme="dark"] .legal-card,
body.theme-dark .auth-card,
[data-theme="dark"] .auth-card,
body.theme-dark .empty-card,
[data-theme="dark"] .empty-card,
body.theme-dark .home-member-card,
[data-theme="dark"] .home-member-card,
body.theme-dark .home-member-card-inline,
[data-theme="dark"] .home-member-card-inline,
body.theme-dark .home-login-group,
[data-theme="dark"] .home-login-group,
body.theme-dark .news-main-toolbar,
[data-theme="dark"] .news-main-toolbar,
body.theme-dark .site-legal-compact,
[data-theme="dark"] .site-legal-compact,
body.theme-dark .launcher-tile,
[data-theme="dark"] .launcher-tile {
  background:
    linear-gradient(180deg, rgba(16, 30, 51, 0.88), rgba(11, 22, 39, 0.94)),
    var(--ds-card-bg);
  border-color: rgba(196, 209, 230, 0.12);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22);
}

body.theme-dark .main-tab,
[data-theme="dark"] .main-tab,
body.theme-dark .sub-tab,
[data-theme="dark"] .sub-tab,
body.theme-dark .header-icon-btn,
[data-theme="dark"] .header-icon-btn,
body.theme-dark .theme-toggle,
[data-theme="dark"] .theme-toggle,
body.theme-dark .home-launcher-btn,
[data-theme="dark"] .home-launcher-btn,
body.theme-dark .home-search-trigger,
[data-theme="dark"] .home-search-trigger,
body.theme-dark .home-publish-btn-secondary,
[data-theme="dark"] .home-publish-btn-secondary,
body.theme-dark .nav-auth-btn:not(.primary),
[data-theme="dark"] .nav-auth-btn:not(.primary),
body.theme-dark .auth-form input,
[data-theme="dark"] .auth-form input,
body.theme-dark .auth-form textarea,
[data-theme="dark"] .auth-form textarea,
body.theme-dark .auth-form .prefix-select,
[data-theme="dark"] .auth-form .prefix-select {
  background: rgba(18, 33, 58, 0.74);
  border-color: rgba(196, 209, 230, 0.12);
}

@media (max-width: 767px) {
  .header-shell {
    padding: 14px;
    border-radius: 24px;
  }

  .header-links-shell {
    padding: 8px;
    border-radius: 20px;
  }

  .page-hero,
  .business-card,
  .publish-card,
  .plaza-card,
  .detail-card,
  .comment-panel,
  .legal-card,
  .auth-card {
    border-radius: 24px;
  }

  .page-hero,
  .business-card,
  .publish-card,
  .plaza-card,
  .detail-card,
  .comment-panel,
  .legal-card {
    padding: 18px;
  }

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

  .launcher-tile {
    min-height: 150px;
    padding: 18px;
  }

  .site-legal-compact {
    padding: 16px 18px;
    border-radius: 20px;
  }
}

.page-hero {
  position: relative;
  overflow: hidden;
}

/* Fix launcher tile readability after the global refresh */
.launcher-tile {
  color: #ffffff;
  border: 0;
  background: none;
  box-shadow: 0 18px 36px rgba(17, 39, 80, 0.14);
}

.launcher-tile:hover {
  color: #ffffff;
}

.launcher-tile strong {
  color: #ffffff;
}

.launcher-tile span {
  color: rgba(255, 255, 255, 0.92);
  opacity: 1;
}

.launcher-icon {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.launcher-tile::after {
  background: rgba(255, 255, 255, 0.12);
}

.tile-civic { background: linear-gradient(135deg, #507aa9, #335f8f); }
.tile-buddy { background: linear-gradient(135deg, #9a6f8d, #7b5a75); }
.tile-secondhand { background: linear-gradient(135deg, #9a7258, #745743); }
.tile-transfer { background: linear-gradient(135deg, #5a8575, #3f6759); }
.tile-business { background: linear-gradient(135deg, #667cba, #5166a6); }
.tile-jobs { background: linear-gradient(135deg, #4e8b6d, #356b50); }
.tile-renovation { background: linear-gradient(135deg, #bb914f, #956f35); }
.tile-events { background: linear-gradient(135deg, #8d70ac, #71538f); }
.tile-lost { background: linear-gradient(135deg, #6c879f, #4b6882); }
.tile-car { background: linear-gradient(135deg, #647b95, #486078); }
.tile-software { background: linear-gradient(135deg, #567790, #355870); }
.tile-other { background: linear-gradient(135deg, #7a7f8f, #606777); }

body.theme-dark .launcher-tile,
[data-theme="dark"] .launcher-tile {
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.26);
}

/* Launcher panel rollback: restore compact colored tiles */
.home-launcher-panel {
  margin-bottom: 10px;
}

.launcher-grid.launcher-grid-12 {
  gap: 10px;
}

.launcher-tile {
  gap: 5px;
  min-height: 104px;
  padding: 14px 14px 13px;
  border: 0;
  border-radius: 20px;
  color: #ffffff;
  background: transparent;
  box-shadow: 0 14px 28px rgba(17, 39, 80, 0.14);
}

.launcher-tile:hover {
  transform: translateY(-2px);
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(17, 39, 80, 0.18);
}

.launcher-tile strong {
  color: #ffffff;
  font-size: 15px;
  line-height: 1.2;
}

.launcher-tile span {
  color: rgba(255, 255, 255, 0.88);
  font-size: 12px;
  line-height: 1.4;
  opacity: 1;
}

.launcher-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.18);
  border: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
}

.launcher-tile::after {
  width: 64px;
  height: 64px;
  inset: auto -10px -14px auto;
  background: rgba(255, 255, 255, 0.1);
}

.tile-civic { background: linear-gradient(135deg, #4b78a8, #2f5f92); }
.tile-buddy { background: linear-gradient(135deg, #9a6f8d, #7e5a75); }
.tile-secondhand { background: linear-gradient(135deg, #8f6d58, #6d5444); }
.tile-transfer { background: linear-gradient(135deg, #517d6d, #376353); }
.tile-business { background: linear-gradient(135deg, #5f73a6, #44598f); }
.tile-jobs { background: linear-gradient(135deg, #5d8f73, #3f6f56); }
.tile-renovation { background: linear-gradient(135deg, #b68c4a, #956f33); }
.tile-events { background: linear-gradient(135deg, #8a6aa8, #6e4f8d); }
.tile-lost { background: linear-gradient(135deg, #6d869d, #4d6881); }
.tile-car { background: linear-gradient(135deg, #64798f, #495d73); }
.tile-software { background: linear-gradient(135deg, #56748a, #35566d); }
.tile-other { background: linear-gradient(135deg, #7c7f8a, #5f6471); }

@media (max-width: 767px) {
  .launcher-grid.launcher-grid-12 {
    gap: 8px;
  }

  .launcher-tile {
    min-height: 92px;
    padding: 12px;
    border-radius: 18px;
  }

  .launcher-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 13px;
  }

  .launcher-tile strong {
    font-size: 14px;
  }

  .launcher-tile span {
    font-size: 11px;
  }
}

/* Header compact refinement */
.header-shell-home {
  gap: 12px;
  padding: 12px 14px;
  border-radius: 24px;
}

.brand-logo-home {
  width: 44px;
  height: 44px;
}

.home-header-main {
  gap: 10px;
}

.home-header-utility {
  gap: 8px;
}

.header-time-card,
.header-time-card-inline {
  min-width: 132px;
  padding: 6px 12px;
  border-radius: 16px;
}

.header-time-label {
  font-size: 10px;
}

.header-time-value {
  font-size: clamp(18px, 1.8vw, 28px);
}

.header-time-date {
  font-size: 11px;
}

.home-member-card,
.home-member-card-inline,
.home-login-group {
  gap: 8px;
}

.home-member-avatar {
  width: 40px;
  height: 40px;
}

.home-member-name {
  max-width: 120px;
  font-size: 13px;
}

.home-member-actions {
  gap: 4px;
}

.home-login-group .nav-auth-btn,
.home-login-group .home-login-pill,
.home-publish-btn,
.home-launcher-btn,
.home-search-trigger,
.nav-auth-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 12px;
}

.home-header-actions {
  gap: 6px;
}

.home-header-corner {
  gap: 6px;
}

.header-icon-btn,
.theme-toggle {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
}

@media (max-width: 767px) {
  .header-shell-home {
    padding: 10px 12px !important;
    gap: 10px !important;
    border-radius: 20px !important;
  }

  .brand-logo-home {
    width: 40px;
    height: 40px;
  }

  .header-shell-home .home-header-main {
    gap: 8px 10px !important;
  }

  .header-shell-home .home-header-utility {
    gap: 10px !important;
  }

  .header-shell-home .header-time-card,
  .header-shell-home .header-time-card-inline {
    min-width: 118px !important;
    padding: 6px 10px !important;
    border-radius: 14px !important;
  }

  .header-shell-home .home-member-card-inline,
  .header-shell-home .home-login-group {
    gap: 6px !important;
  }

  .header-shell-home .home-member-avatar {
    width: 36px !important;
    height: 36px !important;
  }

  .header-shell-home .home-member-name {
    max-width: 98px !important;
    font-size: 12px !important;
  }

  .header-shell-home .home-header-actions {
    gap: 8px !important;
    margin-top: 2px !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary,
  .header-shell-home .home-header-actions > .home-publish-btn-secondary,
  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    border-radius: 16px !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    min-height: 34px !important;
  }
}

/* Home module spacing compact */
.home-shell.page-shell,
main.ui-container.page-shell.home-shell {
  padding-top: 14px;
}

.home-feed-stage {
  gap: 10px;
}

.home-shell .section-block,
.home-feed-stage.section-block {
  margin-top: 14px;
}

.home-stream-head.home-intro-head {
  margin-bottom: 0;
  padding-top: 8px;
  padding-bottom: 8px;
}

.home-launcher-panel {
  margin-bottom: 6px;
}

.news-main-toolbar {
  margin: 6px 0 6px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.news-main-tabs,
.news-sub-tabs {
  margin: 0;
}

.news-sub-tabs {
  padding-top: 2px;
}

.news-sub-tabs.active {
  margin-top: 0;
}

.news-panel {
  margin-top: 0;
}

.news-panel-actions {
  margin-top: 10px;
}

@media (max-width: 767px) {
  .home-shell.page-shell,
  main.ui-container.page-shell.home-shell {
    padding-top: 10px;
  }

  .home-feed-stage {
    gap: 8px;
  }

  .home-shell .section-block,
  .home-feed-stage.section-block {
    margin-top: 10px;
  }

  .home-stream-head.home-intro-head {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .news-main-toolbar {
    margin: 4px 0 4px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  .news-panel-actions {
    margin-top: 8px;
  }
}

/* Home module spacing compact v2 */
.home-shell.page-shell,
main.ui-container.page-shell.home-shell {
  padding-top: 8px;
}

.home-feed-stage {
  gap: 6px;
}

.home-shell .section-block,
.home-feed-stage.section-block {
  margin-top: 8px;
}

.home-stream-head.home-intro-head {
  padding-top: 6px;
  padding-bottom: 6px;
}

.home-launcher-panel {
  margin-bottom: 2px;
}

.news-main-toolbar {
  margin: 2px 0 2px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.news-sub-tabs {
  padding-top: 0;
}

.news-panel-actions {
  margin-top: 6px;
}

@media (max-width: 767px) {
  .home-shell.page-shell,
  main.ui-container.page-shell.home-shell {
    padding-top: 6px;
  }

  .home-feed-stage {
    gap: 5px;
  }

  .home-shell .section-block,
  .home-feed-stage.section-block {
    margin-top: 6px;
  }

  .home-stream-head.home-intro-head {
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .news-main-toolbar {
    margin: 2px 0;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .news-panel-actions {
    margin-top: 5px;
  }
}

.tile-games {
  background: linear-gradient(135deg, #1f7a8c, #0f4c81);
}

.site-legal-meta {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.site-legal-counter {
  font-size: 12px;
  line-height: 1.4;
  color: rgba(76, 97, 129, 0.78);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

body.theme-dark .site-legal-counter,
[data-theme="dark"] .site-legal-counter {
  color: rgba(202, 214, 232, 0.7);
}

@media (max-width: 767px) {
  .site-legal-meta {
    justify-content: flex-start;
  }

  .site-legal-counter {
    white-space: normal;
  }
}

/* footer compact override + question-mark fallback layout */
.home-news-card {
  align-items: stretch;
}

.home-news-card .news-card-copy {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-content: start;
  min-height: 100%;
}

.home-news-card .news-summary {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
  word-break: break-word;
}

.news-card-footer {
  margin-top: 4px;
}

.news-card-actions {
  flex-wrap: nowrap;
}

.site-legal-footer {
  padding-top: 18px;
}

.site-legal-compact {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) auto auto;
  align-items: center;
  gap: 14px 18px;
  padding: 16px 18px;
}

.site-legal-brand-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.site-legal-brand {
  line-height: 1.5;
}

.site-legal-links {
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.site-legal-links a {
  min-height: 32px;
  padding: 0 10px;
}

.site-legal-meta {
  justify-content: flex-end;
  align-items: center;
}

.site-legal-counter {
  font-size: 11px;
}

@media (max-width: 1024px) {
  .site-legal-compact {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .site-legal-links,
  .site-legal-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 767px) {
  .home-news-card {
    grid-template-columns: 1fr;
  }

  .home-news-card .news-cover-wrap {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .home-news-card .news-summary {
    min-height: 0;
  }

  .news-card-actions {
    flex-wrap: wrap;
  }

  .site-legal-compact {
    padding: 14px 16px;
    gap: 12px;
  }

  .site-legal-brand-wrap {
    justify-content: flex-start;
  }
}
/* Home header action premium refinement */
@media (min-width: 768px) {
  .header-shell-home .home-header-actions {
    grid-template-columns: repeat(2, minmax(164px, 176px)) !important;
    grid-template-areas:
      "publish plaza"
      "nav search" !important;
    gap: 12px 16px !important;
    justify-content: end !important;
    justify-items: stretch !important;
    align-items: stretch !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary,
  .header-shell-home .home-header-actions > .home-publish-btn-secondary,
  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    position: relative !important;
    isolation: isolate !important;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 18px !important;
    border-radius: 24px !important;
    border: 1px solid rgba(198, 212, 236, 0.96) !important;
    box-shadow: 0 14px 30px rgba(24, 45, 84, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(16px) saturate(138%) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
    line-height: 1 !important;
    text-align: center !important;
    transition: transform .18s ease, box-shadow .22s ease, border-color .22s ease, background .22s ease, color .22s ease !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary::before,
  .header-shell-home .home-header-actions > .home-publish-btn-secondary::before,
  .header-shell-home .home-header-actions > .home-launcher-btn::before,
  .header-shell-home .home-header-actions > .home-search-trigger::before {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0));
    opacity: 0.9;
    pointer-events: none;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary {
    color: #fdfefe !important;
    border-color: rgba(78, 122, 231, 0.58) !important;
    background:
      linear-gradient(135deg, #3669dd 0%, #4d7eed 52%, #d7a554 100%) !important;
    box-shadow: 0 18px 34px rgba(53, 93, 188, 0.24), 0 10px 22px rgba(212, 161, 77, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.28) !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary::before {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.02));
  }

  .header-shell-home .home-header-actions > .home-publish-btn-secondary {
    color: #1b3663 !important;
    background:
      radial-gradient(circle at 16% 18%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0) 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 253, 0.90)) !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    color: #1a355f !important;
    background:
      radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0) 42%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(241, 245, 252, 0.88)) !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary:hover,
  .header-shell-home .home-header-actions > .home-publish-btn-secondary:hover,
  .header-shell-home .home-header-actions > .home-launcher-btn:hover,
  .header-shell-home .home-header-actions > .home-search-trigger:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(145, 169, 212, 0.96) !important;
    box-shadow: 0 20px 36px rgba(24, 45, 84, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.96) !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary:hover {
    box-shadow: 0 22px 40px rgba(53, 93, 188, 0.26), 0 12px 24px rgba(212, 161, 77, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.32) !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary:active,
  .header-shell-home .home-header-actions > .home-publish-btn-secondary:active,
  .header-shell-home .home-header-actions > .home-launcher-btn:active,
  .header-shell-home .home-header-actions > .home-search-trigger:active {
    transform: translateY(0) scale(0.985) !important;
  }
}
/* Mobile app shell refinement */
@media (max-width: 767px) {
  .site-header {
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .header-shell-home {
    position: relative;
    overflow: hidden;
    padding: 14px 14px 12px !important;
    border-radius: 30px !important;
    border: 1px solid rgba(204, 217, 240, 0.92) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 255, 0.84)),
      radial-gradient(circle at 12% 12%, rgba(90, 140, 255, 0.14), transparent 34%),
      radial-gradient(circle at 88% 16%, rgba(255, 185, 106, 0.14), transparent 28%) !important;
    box-shadow: 0 18px 42px rgba(24, 45, 84, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
    backdrop-filter: blur(22px) saturate(150%);
    -webkit-backdrop-filter: blur(22px) saturate(150%);
  }

  .header-shell-home::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(circle at 10% 6%, rgba(76, 127, 242, 0.1), transparent 26%),
      radial-gradient(circle at 92% 12%, rgba(255, 181, 94, 0.12), transparent 24%);
  }

  .header-shell-home .home-header-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "utility utility"
      "actions corner" !important;
    gap: 12px 10px !important;
    align-items: start !important;
  }

  .header-shell-home .home-header-utility {
    grid-area: utility !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(126px, 1fr) !important;
    gap: 10px !important;
    align-items: stretch !important;
  }

  .header-shell-home .header-time-card,
  .header-shell-home .header-time-card-inline {
    min-width: 0 !important;
    padding: 12px 10px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(188, 205, 233, 0.92) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(245, 248, 255, 0.84)) !important;
    box-shadow: 0 12px 24px rgba(25, 47, 88, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  }

  .header-shell-home .header-time-label {
    font-size: 12px !important;
    letter-spacing: 0.02em !important;
    color: #6a7d99 !important;
  }

  .header-shell-home .header-time-value {
    font-size: clamp(27px, 8vw, 34px) !important;
    letter-spacing: -0.04em !important;
    color: #18345b !important;
  }

  .header-shell-home .header-time-date {
    font-size: 11px !important;
    color: #7c8ea8 !important;
  }

  .header-shell-home .home-login-group {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 5px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(188, 205, 233, 0.92) !important;
    background: linear-gradient(180deg, rgba(251, 253, 255, 0.88), rgba(243, 247, 253, 0.82)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 10px 20px rgba(25, 47, 88, 0.06) !important;
  }

  .header-shell-home .home-login-group .nav-auth-btn {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(201, 214, 236, 0.92) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 255, 0.9)) !important;
    box-shadow: 0 6px 14px rgba(27, 49, 88, 0.08) !important;
    color: #193a67 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
  }

  .header-shell-home .home-login-group .home-login-pill-secondary {
    background: linear-gradient(135deg, rgba(64, 127, 245, 0.12), rgba(255, 176, 88, 0.16)) !important;
  }

  .header-shell-home .home-header-actions {
    grid-area: actions !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 16px 0 48px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(190, 207, 232, 0.94) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 247, 252, 0.9)) !important;
    color: #183860 !important;
    box-shadow: 0 12px 24px rgba(24, 45, 84, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn::before,
  .header-shell-home .home-header-actions > .home-search-trigger::before {
    content: '';
    position: absolute;
    left: 14px;
    top: 50%;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
  }

  .header-shell-home .home-header-actions > .home-launcher-btn::before {
    border-radius: 9px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.96) 1.5px, transparent 1.7px) 0 0 / 8px 8px, linear-gradient(135deg, #4f7ef0, #7cb2ff);
    box-shadow: 0 6px 12px rgba(68, 118, 228, 0.18);
  }

  .header-shell-home .home-header-actions > .home-search-trigger::before {
    border-radius: 12px;
    background: linear-gradient(135deg, #3d7ff5, #86b8ff);
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.92), 0 6px 12px rgba(68, 118, 228, 0.18);
  }

  .header-shell-home .home-header-actions > .home-search-trigger::after {
    content: '';
    position: absolute;
    left: 31px;
    top: 28px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: #ffffff;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .header-shell-home .home-header-corner {
    grid-area: corner !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    justify-self: end !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(190, 207, 232, 0.94) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 252, 0.9)) !important;
    box-shadow: 0 12px 24px rgba(24, 45, 84, 0.08) !important;
  }

  .header-shell-home .header-mail-btn {
    color: #3567d8 !important;
  }

  .header-shell-home .theme-toggle {
    color: #c78a1c !important;
  }

  .home-stream-head.home-intro-head {
    padding: 10px 12px !important;
    border-radius: 26px !important;
    border: 1px solid rgba(204, 217, 240, 0.88) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 255, 0.82)) !important;
    box-shadow: 0 12px 28px rgba(24, 45, 84, 0.08) !important;
  }

  .home-intro-marquee {
    border-radius: 20px !important;
    border: 1px solid rgba(203, 218, 241, 0.9) !important;
    background: linear-gradient(135deg, rgba(80, 130, 255, 0.07), rgba(255, 181, 94, 0.11)) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
  }

  .home-intro-marquee .marquee-track {
    padding: 10px 14px !important;
    gap: 28px !important;
  }

  .home-intro-marquee .marquee-text {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #214371 !important;
  }

  .news-main-toolbar {
    padding: 10px 10px 8px !important;
    border-radius: 26px !important;
    border: 1px solid rgba(204, 217, 240, 0.88) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(247, 250, 255, 0.82)) !important;
    box-shadow: 0 12px 28px rgba(24, 45, 84, 0.08) !important;
  }

  .main-tab,
  .sub-tab {
    min-height: 42px !important;
    padding: 0 18px !important;
    border-radius: 21px !important;
    border: 1px solid rgba(201, 214, 236, 0.92) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 255, 0.88)) !important;
    color: #2a4067 !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86) !important;
  }

  .main-tab.active,
  .sub-tab.active {
    border-color: rgba(88, 137, 226, 0.26) !important;
    background: linear-gradient(135deg, #4a7df0, #d6a353) !important;
    color: #ffffff !important;
    box-shadow: 0 14px 22px rgba(58, 97, 188, 0.18) !important;
  }

  .site-legal-footer {
    padding-top: 14px !important;
    padding-bottom: calc(126px + env(safe-area-inset-bottom)) !important;
  }

  .site-legal-compact {
    gap: 14px !important;
    padding: 16px 16px 18px !important;
    border-radius: 26px !important;
    border: 1px solid rgba(202, 216, 239, 0.92) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 249, 255, 0.84)) !important;
    box-shadow: 0 16px 32px rgba(24, 45, 84, 0.08) !important;
  }

  .site-legal-brand-wrap {
    display: grid !important;
    grid-template-columns: auto 1fr !important;
    gap: 10px !important;
    align-items: center !important;
  }

  .site-legal-logo {
    width: 42px !important;
    height: 42px !important;
  }

  .site-legal-brand {
    font-size: 12px !important;
    line-height: 1.6 !important;
    color: #6f819d !important;
  }

  .site-legal-links {
    gap: 8px !important;
  }

  .site-legal-links a {
    min-height: 34px !important;
    padding: 0 12px !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.72) !important;
    border: 1px solid rgba(205, 219, 241, 0.9) !important;
    color: #23406d !important;
    font-size: 12px !important;
  }

  .site-legal-meta {
    justify-content: flex-start !important;
    gap: 8px !important;
  }

  .site-legal-counter {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(80, 130, 255, 0.1), rgba(255, 181, 94, 0.12));
    color: #5f7392;
    font-size: 12px;
    font-weight: 700;
  }
}

body.theme-dark .header-shell-home,
[data-theme="dark"] .header-shell-home {
  border-color: rgba(108, 150, 231, 0.18) !important;
  background:
    linear-gradient(180deg, rgba(10, 20, 39, 0.94), rgba(11, 24, 44, 0.9)),
    radial-gradient(circle at 12% 12%, rgba(80, 130, 255, 0.16), transparent 36%),
    radial-gradient(circle at 88% 16%, rgba(255, 181, 94, 0.12), transparent 28%) !important;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05) !important;
}

body.theme-dark .header-shell-home .header-time-card,
[data-theme="dark"] .header-shell-home .header-time-card,
body.theme-dark .header-shell-home .home-login-group,
[data-theme="dark"] .header-shell-home .home-login-group,
body.theme-dark .header-shell-home .home-header-actions > .home-launcher-btn,
[data-theme="dark"] .header-shell-home .home-header-actions > .home-launcher-btn,
body.theme-dark .header-shell-home .home-header-actions > .home-search-trigger,
[data-theme="dark"] .header-shell-home .home-header-actions > .home-search-trigger,
body.theme-dark .header-shell-home .header-icon-btn,
[data-theme="dark"] .header-shell-home .header-icon-btn,
body.theme-dark .header-shell-home .theme-toggle,
[data-theme="dark"] .header-shell-home .theme-toggle,
body.theme-dark .news-main-toolbar,
[data-theme="dark"] .news-main-toolbar,
body.theme-dark .home-stream-head.home-intro-head,
[data-theme="dark"] .home-stream-head.home-intro-head,
body.theme-dark .site-legal-compact,
[data-theme="dark"] .site-legal-compact {
  border-color: rgba(108, 150, 231, 0.18) !important;
  background: linear-gradient(180deg, rgba(17, 30, 51, 0.92), rgba(11, 23, 41, 0.94)) !important;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .header-shell-home .home-login-group .nav-auth-btn,
[data-theme="dark"] .header-shell-home .home-login-group .nav-auth-btn,
body.theme-dark .main-tab,
[data-theme="dark"] .main-tab,
body.theme-dark .sub-tab,
[data-theme="dark"] .sub-tab,
body.theme-dark .site-legal-links a,
[data-theme="dark"] .site-legal-links a {
  border-color: rgba(124, 180, 255, 0.16) !important;
  background: linear-gradient(180deg, rgba(21, 36, 61, 0.94), rgba(16, 29, 49, 0.9)) !important;
  color: #dfeaff !important;
}

body.theme-dark .header-shell-home .home-header-actions > .home-launcher-btn,
[data-theme="dark"] .header-shell-home .home-header-actions > .home-launcher-btn,
body.theme-dark .header-shell-home .home-header-actions > .home-search-trigger,
[data-theme="dark"] .header-shell-home .home-header-actions > .home-search-trigger,
body.theme-dark .header-shell-home .header-time-label,
[data-theme="dark"] .header-shell-home .header-time-label,
body.theme-dark .header-shell-home .header-time-date,
[data-theme="dark"] .header-shell-home .header-time-date,
body.theme-dark .home-intro-marquee .marquee-text,
[data-theme="dark"] .home-intro-marquee .marquee-text,
body.theme-dark .site-legal-brand,
[data-theme="dark"] .site-legal-brand,
body.theme-dark .site-legal-counter,
[data-theme="dark"] .site-legal-counter {
  color: #c6d8f4 !important;
}

body.theme-dark .header-shell-home .header-time-value,
[data-theme="dark"] .header-shell-home .header-time-value {
  color: #f6f9ff !important;
}

body.theme-dark .home-intro-marquee,
[data-theme="dark"] .home-intro-marquee {
  border-color: rgba(108, 150, 231, 0.16) !important;
  background: linear-gradient(135deg, rgba(80, 130, 255, 0.12), rgba(255, 181, 94, 0.08)) !important;
}
/* Mobile header brand badge fix */
@media (max-width: 767px) {
  .header-shell-home {
    display: grid !important;
    grid-template-columns: 56px minmax(0, 1fr) !important;
    align-items: start !important;
    gap: 12px !important;
  }

  .brand-home-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 56px !important;
    height: 56px !important;
    padding: 10px !important;
    border-radius: 18px !important;
    border: 1px solid rgba(200, 214, 237, 0.92) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.88)) !important;
    box-shadow: 0 12px 24px rgba(24, 45, 84, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
  }

  .brand-logo-home {
    width: 100% !important;
    height: auto !important;
  }
}

body.theme-dark .brand-home-logo,
[data-theme="dark"] .brand-home-logo {
  border-color: rgba(108, 150, 231, 0.18) !important;
  background: linear-gradient(180deg, rgba(17, 30, 51, 0.94), rgba(11, 23, 41, 0.96)) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
/* Mobile home header cleanup v3 */
@media (max-width: 767px) {
  .header-shell-home {
    display: grid !important;
    grid-template-columns: 88px minmax(0, 1fr) !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
    border-radius: 28px !important;
  }

  .header-shell-home .brand-home-logo {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 88px !important;
    height: 88px !important;
    padding: 12px !important;
    border-radius: 24px !important;
    border: 1px solid rgba(197, 212, 238, 0.94) !important;
    background:
      radial-gradient(circle at 22% 20%, rgba(76, 127, 242, 0.14), transparent 38%),
      radial-gradient(circle at 78% 82%, rgba(255, 182, 94, 0.16), transparent 34%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.9)) !important;
    box-shadow: 0 18px 36px rgba(24, 45, 84, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  }

  .header-shell-home .brand-logo-home {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    transform: scale(1.06) !important;
  }

  .header-shell-home .home-header-main {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "utility corner"
      "actions actions" !important;
    gap: 10px !important;
    align-items: stretch !important;
    min-width: 0 !important;
  }

  .header-shell-home .home-header-utility {
    grid-area: utility !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 10px !important;
    align-items: stretch !important;
    min-width: 0 !important;
  }

  .header-shell-home .header-time-card,
  .header-shell-home .header-time-card-inline {
    display: none !important;
  }

  .header-shell-home .home-login-group,
  .header-shell-home .home-member-card-inline {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 56px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(192, 208, 233, 0.92) !important;
    background: linear-gradient(180deg, rgba(253, 254, 255, 0.94), rgba(244, 248, 255, 0.86)) !important;
    box-shadow: 0 12px 24px rgba(24, 45, 84, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  }

  .header-shell-home .home-login-group {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 6px !important;
  }

  .header-shell-home .home-login-group .nav-auth-btn,
  .header-shell-home .home-login-group .home-login-pill {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 12px !important;
    border-radius: 18px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
  }

  .header-shell-home .home-member-card-inline {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
  }

  .header-shell-home .home-member-avatar {
    width: 46px !important;
    height: 46px !important;
    flex: 0 0 46px !important;
    border: 2px solid rgba(255, 255, 255, 0.82) !important;
    box-shadow: 0 10px 18px rgba(41, 78, 148, 0.16) !important;
  }

  .header-shell-home .home-member-meta {
    display: grid !important;
    gap: 5px !important;
    min-width: 0 !important;
  }

  .header-shell-home .home-member-name {
    max-width: none !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
  }

  .header-shell-home .home-member-actions {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .header-shell-home .home-member-actions .nav-auth-level,
  .header-shell-home .home-member-actions .nav-auth-island,
  .header-shell-home .home-member-actions .home-member-logout {
    min-height: 24px !important;
    padding: 0 8px !important;
    border-radius: 999px !important;
    font-size: 11px !important;
    line-height: 24px !important;
  }

  .header-shell-home .home-member-actions .home-member-logout {
    border: 1px solid rgba(196, 210, 232, 0.92) !important;
    background: rgba(255, 255, 255, 0.74) !important;
    color: #23406d !important;
  }

  .header-shell-home .home-header-corner {
    grid-area: corner !important;
    display: grid !important;
    grid-template-columns: repeat(2, 44px) !important;
    gap: 8px !important;
    justify-self: end !important;
    align-self: start !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    border-radius: 17px !important;
  }

  .header-shell-home .home-header-actions {
    grid-area: actions !important;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    width: 100% !important;
    gap: 10px !important;
    margin: 0 !important;
    justify-items: stretch !important;
  }

  .header-shell-home .home-header-actions > .home-publish-btn-primary,
  .header-shell-home .home-header-actions > .home-publish-btn-secondary {
    display: none !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    min-height: 46px !important;
    height: 46px !important;
    padding: 0 14px 0 46px !important;
    border-radius: 20px !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.01em !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn::before,
  .header-shell-home .home-header-actions > .home-search-trigger::before {
    left: 13px !important;
    width: 22px !important;
    height: 22px !important;
  }

  .header-shell-home .home-header-actions > .home-search-trigger::after {
    left: 29px !important;
    top: 28px !important;
  }
}

body.theme-dark .header-shell-home .brand-home-logo,
[data-theme="dark"] .header-shell-home .brand-home-logo {
  border-color: rgba(108, 150, 231, 0.18) !important;
  background:
    radial-gradient(circle at 20% 18%, rgba(80, 130, 255, 0.2), transparent 38%),
    radial-gradient(circle at 78% 82%, rgba(255, 181, 94, 0.14), transparent 34%),
    linear-gradient(180deg, rgba(17, 30, 51, 0.96), rgba(11, 23, 41, 0.96)) !important;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}
/* Mobile header icons + fullscreen launcher refresh */
.home-launcher-backdrop {
  display: none;
}

.home-launcher-head {
  display: none;
}

.home-launcher-sheet {
  position: relative;
}

@media (max-width: 767px) {
  .header-shell-home .home-header-corner {
    grid-template-columns: repeat(2, 52px) !important;
    gap: 10px !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    border-radius: 20px !important;
    border: 1px solid rgba(192, 208, 233, 0.94) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 255, 0.9)) !important;
    box-shadow: 0 14px 28px rgba(24, 45, 84, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  }

  .header-shell-home .header-icon-glyph {
    font-size: 22px !important;
  }

  .header-shell-home .theme-toggle {
    font-size: 22px !important;
    line-height: 1 !important;
  }

  .header-shell-home .header-icon-badge {
    top: -3px !important;
    right: -3px !important;
    min-width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .home-launcher-panel {
    position: fixed !important;
    inset: 0 !important;
    z-index: 1400 !important;
    margin: 0 !important;
  }

  .home-launcher-panel[hidden] {
    display: none !important;
  }

  .home-launcher-panel:not([hidden]) {
    display: block !important;
  }

  .home-launcher-backdrop {
    display: block;
    position: absolute;
    inset: 0;
    background: rgba(233, 241, 252, 0.34);
    backdrop-filter: blur(18px) saturate(138%);
    -webkit-backdrop-filter: blur(18px) saturate(138%);
  }

  .home-launcher-sheet {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 14px;
    min-height: 100dvh;
    padding: calc(env(safe-area-inset-top) + 16px) 16px calc(112px + env(safe-area-inset-bottom));
    background:
      radial-gradient(circle at 16% 10%, rgba(77, 127, 242, 0.14), transparent 28%),
      radial-gradient(circle at 84% 12%, rgba(255, 182, 94, 0.16), transparent 24%),
      linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(243, 247, 253, 0.94));
  }

  .home-launcher-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .home-launcher-title {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.01em;
    color: #18345b;
  }

  .home-launcher-close {
    min-height: 40px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid rgba(192, 208, 233, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.88));
    color: #23406d;
    font-size: 14px;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(24, 45, 84, 0.08);
  }

  .home-launcher-panel .launcher-grid.launcher-grid-12 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-content: start;
    overflow: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .home-launcher-panel .launcher-tile {
    min-height: 116px;
    padding: 14px;
    border-radius: 24px;
    box-shadow: 0 18px 32px rgba(17, 39, 80, 0.18);
  }

  .home-launcher-panel .launcher-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 14px;
  }

  .home-launcher-panel .launcher-tile strong {
    font-size: 15px;
  }

  .home-launcher-panel .launcher-tile span {
    font-size: 11px;
    line-height: 1.45;
  }
}

body.theme-dark .home-launcher-close,
[data-theme="dark"] .home-launcher-close,
body.theme-dark .header-shell-home .header-icon-btn,
[data-theme="dark"] .header-shell-home .header-icon-btn,
body.theme-dark .header-shell-home .theme-toggle,
[data-theme="dark"] .header-shell-home .theme-toggle {
  border-color: rgba(108, 150, 231, 0.2) !important;
  background: linear-gradient(180deg, rgba(17, 30, 51, 0.96), rgba(11, 23, 41, 0.94)) !important;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

body.theme-dark .home-launcher-sheet,
[data-theme="dark"] .home-launcher-sheet {
  background:
    radial-gradient(circle at 16% 10%, rgba(77, 127, 242, 0.18), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(255, 182, 94, 0.1), transparent 24%),
    linear-gradient(180deg, rgba(9, 18, 35, 0.98), rgba(12, 24, 44, 0.96));
}

body.theme-dark .home-launcher-backdrop,
[data-theme="dark"] .home-launcher-backdrop {
  background: rgba(4, 10, 20, 0.42);
}

body.theme-dark .home-launcher-title,
[data-theme="dark"] .home-launcher-title {
  color: #f5f9ff;
}
/* Final mobile home header polish v2 */
@media (max-width: 767px) {
  .header-shell-home {
    grid-template-columns: 98px minmax(0, 1fr) !important;
    gap: 12px !important;
    padding: 13px !important;
    border-radius: 30px !important;
  }

  .header-shell-home .brand-home-logo {
    width: 98px !important;
    height: 98px !important;
    padding: 12px !important;
    border-radius: 26px !important;
  }

  .header-shell-home .brand-logo-home {
    transform: scale(1.12) !important;
  }

  .header-shell-home .home-header-main {
    grid-template-columns: minmax(0, 1fr) auto !important;
    grid-template-areas:
      "utility corner"
      "actions actions" !important;
    gap: 10px !important;
    align-content: start !important;
  }

  .header-shell-home .home-header-utility {
    min-width: 0 !important;
  }

  .header-shell-home .home-login-group,
  .header-shell-home .home-member-card-inline {
    min-height: 58px !important;
    border-radius: 24px !important;
    padding: 6px !important;
  }

  .header-shell-home .home-login-group .nav-auth-btn,
  .header-shell-home .home-login-group .home-login-pill {
    min-height: 46px !important;
    height: 46px !important;
    border-radius: 18px !important;
  }

  .header-shell-home .home-header-corner {
    display: grid !important;
    grid-template-columns: repeat(2, 52px) !important;
    gap: 8px !important;
    padding: 4px !important;
    border-radius: 24px !important;
    border: 1px solid rgba(205, 219, 241, 0.78) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(245, 248, 255, 0.56)) !important;
    box-shadow: 0 10px 22px rgba(24, 45, 84, 0.06) !important;
    justify-self: end !important;
    align-self: center !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 52px !important;
    min-width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    border-radius: 20px !important;
    border: none !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 255, 0.9)) !important;
    box-shadow: 0 10px 18px rgba(24, 45, 84, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  }

  .header-shell-home .header-icon-glyph,
  .header-shell-home .theme-toggle {
    font-size: 22px !important;
  }

  .header-shell-home .home-header-actions {
    gap: 10px !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    min-height: 50px !important;
    height: 50px !important;
    padding: 0 16px 0 50px !important;
    border-radius: 22px !important;
    border: 1px solid rgba(193, 209, 233, 0.92) !important;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(245, 248, 254, 0.88)) !important;
    box-shadow: 0 12px 24px rgba(24, 45, 84, 0.07), inset 0 1px 0 rgba(255, 255, 255, 0.92) !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn::before,
  .header-shell-home .home-header-actions > .home-search-trigger::before {
    left: 15px !important;
    width: 23px !important;
    height: 23px !important;
  }

  .header-shell-home .home-header-actions > .home-search-trigger::after {
    left: 31px !important;
    top: 30px !important;
  }
}

body.theme-dark .header-shell-home .home-header-corner,
[data-theme="dark"] .header-shell-home .home-header-corner {
  border-color: rgba(108, 150, 231, 0.18) !important;
  background: linear-gradient(180deg, rgba(13, 25, 44, 0.78), rgba(10, 20, 38, 0.58)) !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22) !important;
}
/* Mobile header logo + action balance polish */
@media (max-width: 767px) {
  .header-shell-home {
    grid-template-columns: 92px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px !important;
  }

  .header-shell-home .brand-home-logo {
    width: 92px !important;
    height: 78px !important;
    padding: 10px 8px !important;
    border-radius: 22px !important;
    align-self: start !important;
  }

  .header-shell-home .brand-logo-home {
    width: 100% !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 42px !important;
    object-fit: contain !important;
    transform: none !important;
  }

  .header-shell-home .home-header-main {
    gap: 12px !important;
  }

  .header-shell-home .home-header-utility {
    gap: 8px !important;
  }

  .header-shell-home .home-login-group,
  .header-shell-home .home-member-card-inline {
    min-height: 56px !important;
    border-radius: 22px !important;
    padding: 6px !important;
  }

  .header-shell-home .home-login-group {
    gap: 6px !important;
  }

  .header-shell-home .home-login-group .nav-auth-btn,
  .header-shell-home .home-login-group .home-login-pill {
    min-height: 44px !important;
    height: 44px !important;
    padding: 0 10px !important;
    border-radius: 17px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    letter-spacing: 0.03em !important;
    box-shadow: 0 8px 16px rgba(29, 54, 100, 0.08) !important;
  }

  .header-shell-home .home-login-group .home-login-pill {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 255, 0.92)) !important;
    color: #17365b !important;
  }

  .header-shell-home .home-login-group .home-login-pill-secondary {
    background: linear-gradient(135deg, rgba(84, 132, 236, 0.14), rgba(255, 184, 93, 0.18)) !important;
    color: #17365b !important;
  }

  .header-shell-home .home-header-corner {
    grid-template-columns: repeat(2, 48px) !important;
    gap: 7px !important;
    padding: 4px !important;
    border-radius: 22px !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 48px !important;
    min-width: 48px !important;
    height: 48px !important;
    min-height: 48px !important;
    border-radius: 18px !important;
  }

  .header-shell-home .header-icon-glyph,
  .header-shell-home .theme-toggle {
    font-size: 21px !important;
  }

  .header-shell-home .home-header-actions {
    gap: 9px !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 16px 0 50px !important;
    border-radius: 21px !important;
    border-color: rgba(190, 207, 232, 0.96) !important;
    box-shadow: 0 12px 22px rgba(24, 45, 84, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.94) !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    letter-spacing: 0.02em !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn::before,
  .header-shell-home .home-header-actions > .home-search-trigger::before {
    left: 14px !important;
    width: 24px !important;
    height: 24px !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn::before {
    border-radius: 11px !important;
    background:
      radial-gradient(circle, rgba(255, 255, 255, 0.96) 1.4px, transparent 1.6px) 0 0 / 8px 8px,
      linear-gradient(135deg, #4b7fec, #7aaefb) !important;
    box-shadow: 0 8px 16px rgba(63, 110, 220, 0.18) !important;
  }

  .header-shell-home .home-header-actions > .home-search-trigger::before {
    border-radius: 999px !important;
    background: linear-gradient(135deg, #4e86f0, #88bcff) !important;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.94), 0 8px 16px rgba(63, 110, 220, 0.18) !important;
  }

  .header-shell-home .home-header-actions > .home-search-trigger::after {
    left: 31px !important;
    top: 29px !important;
    width: 8px !important;
  }
}

@media (max-width: 389px) {
  .header-shell-home {
    grid-template-columns: 86px minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .header-shell-home .brand-home-logo {
    width: 86px !important;
    height: 72px !important;
    padding: 9px 7px !important;
  }

  .header-shell-home .brand-logo-home {
    max-height: 38px !important;
  }

  .header-shell-home .home-login-group .nav-auth-btn,
  .header-shell-home .home-login-group .home-login-pill,
  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    min-height: 42px !important;
    height: 42px !important;
    font-size: 13px !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn,
  .header-shell-home .home-header-actions > .home-search-trigger {
    padding-left: 46px !important;
  }

  .header-shell-home .home-header-actions > .home-launcher-btn::before,
  .header-shell-home .home-header-actions > .home-search-trigger::before {
    left: 12px !important;
    width: 21px !important;
    height: 21px !important;
  }

  .header-shell-home .home-header-corner {
    grid-template-columns: repeat(2, 44px) !important;
  }

  .header-shell-home .header-icon-btn,
  .header-shell-home .theme-toggle {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
  }
}

/* Marketplace refresh */
.publish-grid--triple {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.market-search-card {
  gap: 16px;
}

.market-feed-head {
  margin-bottom: 16px;
}

.market-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.market-card {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.market-card-media {
  display: block;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, rgba(236, 241, 248, 0.9), rgba(223, 231, 243, 0.92));
}

.market-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.market-card-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.market-card-topline,
.market-detail-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.market-card-topline time,
.market-detail-topline time {
  color: var(--ds-text-tertiary);
  font-size: 12px;
}

.market-card-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(49, 95, 206, 0.14), rgba(219, 155, 59, 0.14));
  color: var(--ds-text-primary);
  font-size: 12px;
  font-weight: 700;
}

.market-card-price,
.market-detail-price {
  margin: 0;
  color: #10203b;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.market-card-price {
  font-size: 28px;
}

.market-detail-price {
  font-size: clamp(30px, 4vw, 38px);
}

.market-card-title,
.market-detail-title {
  margin: 0;
  line-height: 1.28;
}

.market-card-title {
  font-size: 20px;
}

.market-card-title a {
  color: var(--ds-text-primary);
}

.market-card-meta,
.market-card-summary,
.market-detail-meta {
  margin: 0;
  color: var(--ds-text-secondary);
}

.market-card-meta,
.market-detail-meta {
  font-size: 14px;
}

.market-card-summary {
  font-size: 13px;
  line-height: 1.65;
}

.market-card-actions {
  display: flex;
  gap: 10px;
  margin-top: 2px;
}

.market-card-link,
.market-favorite-toggle {
  flex: 1 1 0;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 15px;
  border: 1px solid rgba(16, 32, 59, 0.10);
  background: rgba(244, 247, 252, 0.92);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.market-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.market-card-link:hover,
.market-favorite-toggle:hover,
.market-card-link:focus-visible,
.market-favorite-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(49, 95, 206, 0.20);
  box-shadow: 0 10px 20px rgba(19, 35, 63, 0.07);
}

.market-favorite-toggle.is-active,
.detail-favorite-toggle.is-active {
  background: rgba(255, 228, 236, 0.95);
  border-color: rgba(220, 92, 122, 0.18);
  color: #b33154;
}

.market-detail-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.market-detail-main {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
  align-items: start;
}

.market-detail-gallery {
  display: grid;
  gap: 12px;
}

.market-detail-photo-wrap {
  overflow: hidden;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(236, 241, 248, 0.9), rgba(223, 231, 243, 0.92));
}

.market-detail-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.market-detail-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
  gap: 10px;
}

.market-thumb {
  padding: 0;
  border: 1px solid rgba(16, 32, 59, 0.08);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.86);
}

.market-thumb img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.market-thumb.is-active {
  border-color: rgba(49, 95, 206, 0.22);
  box-shadow: 0 10px 18px rgba(49, 95, 206, 0.10);
}

.market-detail-content {
  display: grid;
  gap: 14px;
  align-content: start;
}

.market-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.market-detail-section {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(16, 32, 59, 0.08);
}

.market-detail-prose {
  margin: 0;
}

.market-detail-side {
  position: sticky;
  top: 84px;
}

.market-seller-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background: linear-gradient(180deg, rgba(246, 249, 253, 0.92), rgba(240, 245, 251, 0.95));
}

.market-seller-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--ds-text-primary);
}

.market-seller-sub {
  color: var(--ds-text-secondary);
  font-size: 13px;
}

.ui-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(16, 32, 59, 0.10);
  background: rgba(244, 247, 252, 0.92);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background-color .16s ease;
}

.ui-btn:hover,
.ui-btn:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(19, 35, 63, 0.08);
}

.ui-btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #2f5fce, #5881e7 55%, #dca34a);
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(49, 95, 206, 0.18);
}

.ui-btn-secondary {
  background: rgba(235, 241, 251, 0.96);
  border-color: rgba(49, 95, 206, 0.10);
}

.ui-btn-ghost {
  background: rgba(248, 250, 253, 0.92);
}

body.theme-dark .market-card-link,
[data-theme="dark"] .market-card-link,
body.theme-dark .market-favorite-toggle,
[data-theme="dark"] .market-favorite-toggle,
body.theme-dark .ui-btn,
[data-theme="dark"] .ui-btn,
body.theme-dark .market-seller-card,
[data-theme="dark"] .market-seller-card,
body.theme-dark .market-thumb,
[data-theme="dark"] .market-thumb,
body.theme-dark .market-detail-photo-wrap,
[data-theme="dark"] .market-detail-photo-wrap {
  background: rgba(18, 33, 58, 0.78);
  border-color: rgba(196, 209, 230, 0.12);
  color: #e9eef8;
}

body.theme-dark .market-card-price,
[data-theme="dark"] .market-card-price,
body.theme-dark .market-detail-price,
[data-theme="dark"] .market-detail-price,
body.theme-dark .market-seller-name,
[data-theme="dark"] .market-seller-name {
  color: #f4f7fb;
}

body.theme-dark .market-card-chip,
[data-theme="dark"] .market-card-chip {
  background: linear-gradient(135deg, rgba(88, 129, 231, 0.22), rgba(220, 163, 74, 0.18));
}

@media (max-width: 1180px) {
  .publish-grid--triple {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .market-detail-shell {
    grid-template-columns: 1fr;
  }

  .market-detail-side {
    position: static;
  }
}

@media (max-width: 767px) {
  .publish-grid--triple,
  .market-detail-main {
    grid-template-columns: 1fr;
  }

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

  .market-card-body {
    padding: 14px;
  }

  .market-card-price {
    font-size: 24px;
  }

  .market-card-title {
    font-size: 18px;
  }

  .market-card-actions,
  .market-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .market-detail-photo {
    aspect-ratio: 1 / 1;
  }

  .market-detail-thumbs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .market-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-card-price {
    font-size: 22px;
  }

  .market-card-title {
    font-size: 17px;
  }
}

/* Clean news cards */
.home-news-card,
.list-news-card {
  border-radius: 26px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 253, 0.96));
  box-shadow: 0 18px 34px rgba(16, 33, 62, 0.06);
}

.news-cover-wrap {
  border-radius: 22px;
}

.news-card-copy {
  gap: 12px;
}

.news-title {
  font-size: 20px;
}

.news-meta,
.news-meta-row {
  gap: 10px;
}

body.theme-dark .home-news-card,
[data-theme="dark"] .home-news-card,
body.theme-dark .list-news-card,
[data-theme="dark"] .list-news-card {
  background: linear-gradient(180deg, rgba(16, 30, 51, 0.90), rgba(11, 22, 39, 0.96));
  border-color: rgba(196, 209, 230, 0.12);
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.22);
}

@media (max-width: 767px) {
  .home-news-card,
  .list-news-card {
    border-radius: 22px;
    padding: 14px;
  }

  .news-cover-wrap {
    border-radius: 18px;
  }

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

/* Publish studio refresh */
.publish-studio-page {
  display: grid;
  gap: 18px;
}

.publish-studio-shell,
.publish-studio-card {
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  border: 1px solid rgba(194, 208, 232, 0.72);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(246, 249, 253, 0.94)),
    linear-gradient(135deg, rgba(112, 154, 255, 0.08), rgba(255, 215, 154, 0.08));
  backdrop-filter: blur(18px) saturate(138%);
  -webkit-backdrop-filter: blur(18px) saturate(138%);
  box-shadow: 0 22px 44px rgba(19, 35, 63, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.publish-studio-shell::before,
.publish-studio-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.publish-studio-shell {
  padding: 20px;
}

.publish-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.publish-studio-copy {
  display: grid;
  gap: 4px;
}

.publish-toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background: rgba(255, 255, 255, 0.68);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: 700;
}

.publish-type-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(236, 242, 250, 0.76);
  border: 1px solid rgba(196, 209, 230, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.publish-type-tab {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border-radius: 16px;
  color: #4a5d7f;
  font-size: 15px;
  font-weight: 800;
  transition: transform .16s ease, color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.publish-type-tab.is-active {
  color: #16345e;
  background: linear-gradient(135deg, rgba(76, 125, 240, 0.22), rgba(255, 186, 101, 0.20));
  box-shadow: 0 12px 24px rgba(41, 79, 158, 0.10), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.publish-studio-card {
  padding: 20px;
}

.publish-panel-head,
.publish-panel-head--compact {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.publish-panel-head--compact {
  margin-bottom: 14px;
}

.publish-panel-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  color: var(--ds-text-primary);
}

.publish-form--studio {
  gap: 16px;
}

.publish-crystal-panel {
  position: relative;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(194, 208, 232, 0.66);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(247, 250, 253, 0.84));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.publish-crystal-panel--media {
  gap: 16px;
}

.publish-media-uploader {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.05fr);
  gap: 14px;
  align-items: stretch;
}

.publish-media-dropzone {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px dashed rgba(104, 138, 212, 0.34);
  background: linear-gradient(180deg, rgba(244, 248, 254, 0.94), rgba(252, 248, 241, 0.88));
}

.publish-media-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(76, 125, 240, 0.18), rgba(255, 186, 101, 0.22));
  color: #1d4fb4;
  font-size: 22px;
  font-weight: 800;
}

.publish-media-dropzone strong {
  font-size: 18px;
  color: var(--ds-text-primary);
}

.publish-media-dropzone p {
  margin: 0;
  color: var(--ds-text-secondary);
  line-height: 1.65;
}

.publish-media-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.publish-file-trigger {
  position: relative;
  overflow: hidden;
}

.publish-file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.publish-upload-note {
  font-size: 13px;
  color: var(--ds-text-tertiary);
}

.publish-media-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 180px;
}

.publish-media-preview-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(194, 208, 232, 0.54);
  background: rgba(251, 252, 254, 0.72);
  color: var(--ds-text-tertiary);
  text-align: center;
}

.publish-media-preview-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  background: rgba(230, 237, 248, 0.72);
  border: 1px solid rgba(194, 208, 232, 0.6);
  box-shadow: 0 10px 24px rgba(25, 47, 86, 0.06);
}

.publish-media-preview-item img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.publish-media-preview-item.is-cover {
  box-shadow: 0 14px 28px rgba(52, 92, 184, 0.14);
}

.publish-media-preview-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  min-height: 26px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(12, 24, 46, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.publish-form-grid--studio {
  gap: 14px;
}

.publish-form-grid--studio .publish-field label {
  font-size: 14px;
  font-weight: 800;
  color: var(--ds-text-primary);
}

.publish-form--studio input,
.publish-form--studio select,
.publish-form--studio textarea {
  min-height: 50px;
  border-radius: 18px;
  border: 1px solid rgba(196, 209, 230, 0.76);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 253, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.publish-form--studio textarea {
  min-height: 120px;
}

.publish-studio-submit {
  display: flex;
  justify-content: flex-start;
  padding-top: 4px;
}

.publish-studio-submit .auth-submit {
  min-width: 180px;
}

body.theme-dark .publish-studio-shell,
[data-theme="dark"] .publish-studio-shell,
body.theme-dark .publish-studio-card,
[data-theme="dark"] .publish-studio-card,
body.theme-dark .publish-crystal-panel,
[data-theme="dark"] .publish-crystal-panel,
body.theme-dark .publish-type-tabs,
[data-theme="dark"] .publish-type-tabs,
body.theme-dark .publish-toolbar-link,
[data-theme="dark"] .publish-toolbar-link,
body.theme-dark .publish-media-preview-empty,
[data-theme="dark"] .publish-media-preview-empty,
body.theme-dark .publish-media-preview-item,
[data-theme="dark"] .publish-media-preview-item,
body.theme-dark .publish-media-dropzone,
[data-theme="dark"] .publish-media-dropzone {
  background: linear-gradient(180deg, rgba(17, 31, 52, 0.86), rgba(11, 22, 39, 0.92));
  border-color: rgba(196, 209, 230, 0.14);
  color: #e9eef8;
}

body.theme-dark .publish-type-tab,
[data-theme="dark"] .publish-type-tab,
body.theme-dark .publish-media-dropzone p,
[data-theme="dark"] .publish-media-dropzone p,
body.theme-dark .publish-upload-note,
[data-theme="dark"] .publish-upload-note {
  color: #b8c7dd;
}

body.theme-dark .publish-type-tab.is-active,
[data-theme="dark"] .publish-type-tab.is-active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(83, 125, 218, 0.34), rgba(216, 162, 87, 0.22));
}

body.theme-dark .publish-form--studio input,
[data-theme="dark"] .publish-form--studio input,
body.theme-dark .publish-form--studio select,
[data-theme="dark"] .publish-form--studio select,
body.theme-dark .publish-form--studio textarea,
[data-theme="dark"] .publish-form--studio textarea {
  background: rgba(18, 33, 58, 0.78);
  border-color: rgba(196, 209, 230, 0.14);
  color: #edf3ff;
}

@media (max-width: 767px) {
  .publish-studio-shell,
  .publish-studio-card {
    border-radius: 24px;
    padding: 16px;
  }

  .publish-studio-head {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 14px;
  }

  .publish-toolbar-link {
    min-height: 40px;
    padding: 0 14px;
  }

  .publish-type-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 5px;
    border-radius: 20px;
  }

  .publish-type-tab {
    min-height: 46px;
    font-size: 14px;
  }

  .publish-crystal-panel {
    padding: 14px;
    border-radius: 20px;
  }

  .publish-media-uploader {
    grid-template-columns: 1fr;
  }

  .publish-media-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .publish-media-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .publish-media-preview-empty {
    min-height: 120px;
    border-radius: 18px;
  }

  .publish-studio-submit {
    display: block;
  }

  .publish-studio-submit .auth-submit {
    width: 100%;
    min-width: 0;
  }
}

/* Marketplace v2 */
.publish-mini-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(49, 95, 206, 0.12);
  background: linear-gradient(135deg, rgba(241, 246, 255, 0.96), rgba(255, 247, 231, 0.92));
  color: #1a3562;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.publish-media-dropzone--glass {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.9), transparent 44%),
    linear-gradient(180deg, rgba(247, 250, 255, 0.95), rgba(236, 242, 251, 0.92));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 18px 34px rgba(16, 32, 59, 0.08);
}

.publish-media-preview--removable {
  align-items: stretch;
}

.publish-media-preview-item {
  position: relative;
}

.publish-media-remove {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(17, 28, 47, 0.72);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.14);
}

.publish-submit-note {
  margin: 0;
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.7;
  text-align: center;
}

.publish-studio-submit--stacked {
  display: grid;
  gap: 12px;
}

.market-feed-shell {
  --market-grid-columns: 2;
}

.market-feed-shell[data-columns="1"] {
  --market-grid-columns: 1;
}

.market-feed-shell[data-columns="2"] {
  --market-grid-columns: 2;
}

.market-feed-shell[data-columns="3"] {
  --market-grid-columns: 3;
}

.market-search-card--clean {
  gap: 18px;
}

.market-search-copy {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.market-search-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.market-inline-note {
  color: var(--ds-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.market-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ds-text-primary);
  font-size: 14px;
  font-weight: 700;
}

.market-feed-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.market-feed-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.market-layout-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid rgba(16, 32, 59, 0.08);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.market-layout-toggle {
  min-width: 56px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--ds-text-secondary);
  font-size: 13px;
  font-weight: 800;
}

.market-layout-toggle.is-active {
  background: linear-gradient(135deg, rgba(49, 95, 206, 0.94), rgba(220, 163, 74, 0.88));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(49, 95, 206, 0.18);
}

.market-feed-shell .market-grid {
  display: grid;
  grid-template-columns: repeat(var(--market-grid-columns), minmax(0, 1fr));
  gap: 16px;
}

.market-card--clean {
  border-radius: 28px;
  border: 1px solid rgba(17, 34, 63, 0.08);
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.92), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 249, 253, 0.97));
  box-shadow: 0 22px 40px rgba(16, 32, 59, 0.08);
}

.market-card--clean .market-card-media {
  aspect-ratio: 1 / 1;
}

.market-card--clean .market-card-body {
  gap: 12px;
  padding: 18px;
}

.market-card--clean .market-card-price {
  font-size: clamp(24px, 2.8vw, 34px);
}

.market-card--clean .market-card-title {
  font-size: clamp(19px, 2vw, 24px);
}

.market-card--clean .market-card-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.market-card--clean .market-card-actions {
  margin-top: 4px;
}

.market-card--clean .market-card-link,
.market-card--clean .market-favorite-toggle {
  min-height: 46px;
  border-radius: 16px;
}

.market-detail-main--clean {
  border-radius: 30px;
}

.market-reference-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.market-reference-code {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(236, 241, 251, 0.92);
  color: #1f3762;
  font-size: 13px;
  font-weight: 800;
}

.plaza-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 800;
}

.plaza-status-badge.is-pending {
  background: rgba(255, 242, 214, 0.98);
  border-color: rgba(214, 165, 73, 0.18);
  color: #9a6512;
}

.plaza-status-badge.is-active {
  background: rgba(226, 244, 234, 0.98);
  border-color: rgba(69, 156, 102, 0.16);
  color: #1d7340;
}

.plaza-status-badge.is-sold {
  background: rgba(234, 240, 249, 0.98);
  border-color: rgba(78, 110, 153, 0.16);
  color: #3f587d;
}

.plaza-status-badge.is-cancelled {
  background: rgba(241, 244, 248, 0.98);
  border-color: rgba(109, 124, 145, 0.16);
  color: #5d6c81;
}

.plaza-status-badge.is-rejected {
  background: rgba(255, 232, 236, 0.98);
  border-color: rgba(201, 78, 109, 0.16);
  color: #b23959;
}

.market-owner-note {
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(243, 247, 255, 0.96), rgba(235, 241, 251, 0.94));
  color: #204171;
  font-size: 14px;
  line-height: 1.7;
}

.market-owner-note--danger {
  background: linear-gradient(180deg, rgba(255, 238, 242, 0.96), rgba(255, 230, 236, 0.94));
  color: #983654;
}

.market-inline-form {
  margin: 0;
}

body.theme-dark .publish-mini-badge,
[data-theme="dark"] .publish-mini-badge,
body.theme-dark .market-inline-link,
[data-theme="dark"] .market-inline-link,
body.theme-dark .market-layout-switch,
[data-theme="dark"] .market-layout-switch,
body.theme-dark .market-owner-note,
[data-theme="dark"] .market-owner-note,
body.theme-dark .market-reference-code,
[data-theme="dark"] .market-reference-code,
body.theme-dark .plaza-status-badge,
[data-theme="dark"] .plaza-status-badge {
  border-color: rgba(196, 209, 230, 0.12);
}

body.theme-dark .publish-media-dropzone--glass,
[data-theme="dark"] .publish-media-dropzone--glass,
body.theme-dark .market-card--clean,
[data-theme="dark"] .market-card--clean,
body.theme-dark .market-inline-link,
[data-theme="dark"] .market-inline-link,
body.theme-dark .market-layout-switch,
[data-theme="dark"] .market-layout-switch,
body.theme-dark .market-reference-code,
[data-theme="dark"] .market-reference-code,
body.theme-dark .market-owner-note,
[data-theme="dark"] .market-owner-note {
  background: rgba(15, 28, 48, 0.84);
  color: #eef3fb;
  box-shadow: 0 22px 36px rgba(0, 0, 0, 0.24);
}

body.theme-dark .market-inline-note,
[data-theme="dark"] .market-inline-note {
  color: rgba(233, 238, 248, 0.72);
}

body.theme-dark .market-owner-note--danger,
[data-theme="dark"] .market-owner-note--danger {
  background: rgba(83, 26, 40, 0.64);
  color: #ffd6e2;
}

body.theme-dark .publish-media-remove,
[data-theme="dark"] .publish-media-remove {
  background: rgba(7, 15, 28, 0.78);
}

@media (max-width: 767px) {
  .market-search-copy,
  .market-feed-head {
    align-items: stretch;
  }

  .market-search-side,
  .market-feed-toolbar {
    width: 100%;
    justify-content: space-between;
  }

  .market-layout-switch {
    width: 100%;
    justify-content: space-between;
  }

  .market-layout-toggle {
    flex: 1 1 0;
    min-width: 0;
  }

  .market-feed-shell .market-grid {
    gap: 12px;
  }

  .market-card--clean .market-card-body {
    padding: 14px;
    gap: 10px;
  }

  .market-card--clean .market-card-actions {
    grid-template-columns: 1fr;
  }

  .market-reference-row {
    gap: 8px;
  }

  .publish-media-remove {
    right: 8px;
    bottom: 8px;
  }
}
/* Publish one-screen mobile compact */
@media (max-width: 767px) {
  .publish-composer-body .site-header .ui-container {
    padding-bottom: 0;
  }

  .publish-composer-body .header-shell {
    padding: 10px 12px;
    border-radius: 22px;
    min-height: 0;
  }

  .publish-composer-body .brand-logo {
    max-height: 28px;
    width: auto;
  }

  .publish-composer-body .brand-sub {
    display: none;
  }

  .publish-composer-body .brand-name {
    font-size: 16px;
  }

  .publish-composer-body .nav-auth-btn,
  .publish-composer-body .theme-toggle {
    min-height: 38px;
  }

  .publish-composer-body .nav-auth-btn {
    padding: 0 12px;
    font-size: 13px;
  }

  .publish-studio-page {
    gap: 10px;
  }

  .publish-studio-shell {
    padding: 8px;
  }

  .publish-studio-head {
    display: none;
  }

  .publish-type-tabs {
    gap: 6px;
    padding: 4px;
    border-radius: 18px;
  }

  .publish-type-tab {
    min-height: 40px;
    padding: 0 8px;
    border-radius: 14px;
    font-size: 13px;
  }

  .publish-studio-card {
    padding: 12px;
    border-radius: 22px;
  }

  .publish-form--studio {
    gap: 8px;
  }

  .publish-panel-head--compact {
    margin-bottom: 8px;
  }

  .publish-panel-head,
  .publish-panel-head--compact {
    align-items: center;
    gap: 8px;
  }

  .publish-panel-head .section-note,
  .publish-panel-head--compact .section-note,
  .publish-upload-note,
  .publish-submit-note {
    display: none;
  }

  .publish-panel-head--compact .ui-title-md {
    font-size: 18px;
  }

  .publish-panel-title {
    font-size: 15px;
  }

  .publish-crystal-panel {
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .publish-crystal-panel--media {
    gap: 8px;
  }

  .publish-mini-badge {
    min-height: 28px;
    padding: 0 10px;
    font-size: 11px;
  }

  .publish-media-uploader {
    gap: 8px;
  }

  .publish-media-dropzone {
    gap: 8px;
    padding: 10px 12px;
    border-radius: 18px;
  }

  .publish-media-icon {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    font-size: 16px;
  }

  .publish-media-dropzone strong {
    font-size: 14px;
  }

  .publish-media-dropzone p {
    display: none;
  }

  .publish-media-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .publish-media-actions .ui-btn {
    flex: 1 1 0;
    min-width: 0;
    min-height: 38px;
    padding: 0 10px;
    font-size: 13px;
    white-space: nowrap;
  }

  .publish-media-preview {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 72px;
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    min-height: 0;
    scrollbar-width: none;
  }

  .publish-media-preview::-webkit-scrollbar {
    display: none;
  }

  .publish-media-preview-empty {
    min-height: 72px;
    border-radius: 16px;
    font-size: 12px;
  }

  .publish-media-preview-item {
    border-radius: 16px;
  }

  .publish-media-preview-item img {
    aspect-ratio: 1 / 1;
  }

  .publish-media-preview-badge {
    left: 6px;
    bottom: 6px;
    min-height: 20px;
    padding: 0 8px;
    font-size: 10px;
  }

  .publish-media-remove {
    right: 6px;
    bottom: 6px;
    min-height: 22px;
    padding: 0 8px;
    font-size: 10px;
  }

  .publish-form-grid--studio {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .publish-form-grid--studio .publish-field {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
  }

  .publish-form-grid--studio .publish-field--full {
    grid-column: 1 / -1;
  }

  .publish-form-grid--studio .publish-field label {
    margin: 0;
    font-size: 12px;
    line-height: 1.15;
    letter-spacing: 0;
  }

  .publish-form--studio input,
  .publish-form--studio select,
  .publish-form--studio textarea {
    min-height: 40px;
    padding: 0 12px;
    border-radius: 14px;
    font-size: 14px;
  }

  .publish-form--studio textarea {
    min-height: 66px;
    padding: 10px 12px;
  }

  .publish-studio-submit {
    position: sticky;
    bottom: calc(72px + env(safe-area-inset-bottom));
    z-index: 8;
    padding-top: 0;
    margin-top: 2px;
  }

  .publish-studio-submit--stacked {
    gap: 0;
  }

  .publish-studio-submit .auth-submit {
    min-height: 46px;
    border-radius: 16px;
    box-shadow: 0 14px 24px rgba(49, 95, 206, 0.18);
  }
}
/* Marketplace chat */
.chat-page-body .site-header .ui-container {
  max-width: 1240px;
}

.chat-page-shell {
  max-width: 1240px;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  gap: 20px;
  padding: 18px;
  min-height: 72vh;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 251, 255, 0.88));
  border: 1px solid rgba(201, 216, 238, 0.78);
  box-shadow: 0 20px 48px rgba(22, 45, 90, 0.08);
}

.chat-sidebar,
.chat-stage {
  min-width: 0;
}

.chat-sidebar {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 16px;
}

.chat-sidebar-head {
  padding: 18px;
  border-radius: 26px;
  border: 1px solid rgba(202, 215, 238, 0.76);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.86));
}

.chat-thread-list {
  display: grid;
  gap: 10px;
  align-content: start;
  max-height: 66vh;
  overflow: auto;
  padding-right: 4px;
}

.chat-thread-empty {
  padding: 20px;
  border-radius: 24px;
  color: var(--ui-muted);
  border: 1px dashed rgba(194, 209, 232, 0.88);
  background: rgba(247, 250, 255, 0.88);
}

.chat-thread-item {
  position: relative;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(208, 220, 240, 0.78);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.84));
  text-decoration: none;
  color: var(--ui-ink);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.chat-thread-item:hover,
.chat-thread-item.is-active {
  transform: translateY(-1px);
  border-color: rgba(116, 153, 236, 0.54);
  box-shadow: 0 18px 28px rgba(31, 61, 118, 0.08);
}

.chat-thread-avatar,
.chat-stage-avatar {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(232, 239, 252, 0.8);
}

.chat-thread-copy {
  min-width: 0;
}

.chat-thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.chat-thread-row strong,
.chat-thread-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-row time,
.chat-thread-copy p,
.chat-thread-ref {
  color: var(--ui-muted);
  font-size: 12px;
}

.chat-thread-copy p {
  margin: 6px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-thread-unread {
  position: absolute;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #4f7ef2, #74b3ff);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
}

.chat-stage {
  display: grid;
  min-height: 0;
}

.chat-stage-empty,
.chat-stage-active {
  min-height: 0;
}

.chat-stage-empty {
  display: grid;
  place-items: center;
  gap: 12px;
  text-align: center;
  padding: 44px 28px;
}

.chat-stage-empty-icon {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 26px;
  background: linear-gradient(135deg, rgba(79, 126, 242, 0.16), rgba(255, 183, 99, 0.14));
  color: #1a3d73;
  font-size: 30px;
  font-weight: 900;
}

.chat-stage-active {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 14px;
}

.chat-stage-head,
.chat-product-hero,
.chat-composer {
  border-radius: 26px;
  border: 1px solid rgba(202, 215, 238, 0.74);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(246, 250, 255, 0.86));
}

.chat-stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.chat-stage-user {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.chat-stage-user strong,
.chat-stage-user small {
  display: block;
}

.chat-stage-user small {
  margin-top: 4px;
  color: var(--ui-muted);
}

.chat-stage-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chat-stage-link {
  min-height: 40px;
}

.chat-product-hero {
  padding: 14px;
}

.chat-product-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.chat-product-image {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  object-fit: cover;
  background: rgba(235, 240, 251, 0.78);
}

.chat-product-copy strong,
.chat-product-copy p,
.chat-product-copy small {
  display: block;
}

.chat-product-copy p {
  margin: 6px 0 4px;
  font-size: 18px;
  font-weight: 800;
  color: #17407a;
}

.chat-product-copy small {
  color: var(--ui-muted);
}

.chat-messages {
  min-height: 340px;
  max-height: 54vh;
  overflow: auto;
  padding: 20px;
  border-radius: 28px;
  border: 1px solid rgba(205, 219, 241, 0.82);
  background:
    radial-gradient(circle at top right, rgba(255, 201, 140, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(241, 246, 255, 0.88));
}

.chat-message-empty {
  padding: 24px;
  text-align: center;
  color: var(--ui-muted);
}

.chat-message {
  display: grid;
  justify-items: start;
  gap: 6px;
  margin-bottom: 16px;
}

.chat-message.is-mine {
  justify-items: end;
}

.chat-message-bubble {
  max-width: min(420px, 88%);
  padding: 14px 16px;
  border-radius: 22px 22px 22px 10px;
  border: 1px solid rgba(206, 220, 242, 0.74);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 24px rgba(25, 49, 92, 0.06);
}

.chat-message.is-mine .chat-message-bubble {
  border-radius: 22px 22px 10px 22px;
  border-color: rgba(109, 146, 237, 0.42);
  background: linear-gradient(135deg, rgba(80, 127, 243, 0.14), rgba(255, 190, 112, 0.14));
}

.chat-message-text {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-message-meta {
  font-size: 12px;
  color: var(--ui-muted);
}

.chat-message-media {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: rgba(234, 240, 251, 0.92);
}

.chat-message-media img,
.chat-message-media video {
  display: block;
  width: 100%;
  max-width: 280px;
  border-radius: 18px;
  object-fit: cover;
}

.chat-message-product {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 12px;
  color: inherit;
  text-decoration: none;
  align-items: center;
}

.chat-message-product img {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  object-fit: cover;
  background: rgba(235, 241, 252, 0.84);
}

.chat-message-product strong,
.chat-message-product span,
.chat-message-product small {
  display: block;
}

.chat-message-product span {
  margin-top: 5px;
  font-size: 16px;
  font-weight: 800;
  color: #17407a;
}

.chat-message-product small {
  margin-top: 5px;
  color: var(--ui-muted);
}

.chat-composer {
  padding: 14px;
}

.chat-composer.is-sending {
  opacity: 0.74;
  pointer-events: none;
}

.chat-emoji-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-emoji-btn,
.chat-attach-btn {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(202, 216, 239, 0.76);
  background: rgba(255, 255, 255, 0.9);
  color: #18355f;
  font-size: 14px;
  font-weight: 700;
}

.chat-emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.chat-emoji-btn--product {
  background: linear-gradient(135deg, rgba(255, 244, 226, 0.98), rgba(255, 214, 159, 0.84));
  color: #9f6218;
}

.chat-attach-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chat-attachment-preview {
  min-height: 0;
  margin-top: 10px;
}

.chat-attachment-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(239, 245, 255, 0.88);
  border: 1px solid rgba(200, 215, 240, 0.82);
}

.chat-attachment-pill span {
  color: var(--ui-muted);
  font-size: 12px;
}

.chat-attachment-clear {
  border: 0;
  background: transparent;
  color: #4b79e6;
  font-weight: 800;
}

.chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-top: 12px;
}

.chat-input-row textarea {
  width: 100%;
  min-height: 52px;
  max-height: 140px;
  padding: 14px 16px;
  resize: none;
  border-radius: 20px;
  border: 1px solid rgba(201, 216, 239, 0.82);
  background: rgba(255, 255, 255, 0.96);
}

.chat-send-btn {
  min-width: 96px;
  min-height: 52px;
}

@media (max-width: 980px) {
  .chat-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 14px;
  }

  .chat-thread-list {
    max-height: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 76vw);
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }

  .chat-messages {
    max-height: 48vh;
  }
}

@media (max-width: 767px) {
  .chat-page-body .site-header .ui-container {
    padding: 0 10px;
  }

  .chat-shell {
    padding: 10px;
    border-radius: 28px;
  }

  .chat-sidebar-head {
    padding: 14px;
  }

  .chat-thread-list {
    grid-auto-columns: minmax(220px, 84vw);
    gap: 8px;
  }

  .chat-thread-item {
    padding: 12px;
    border-radius: 18px;
  }

  .chat-stage-head,
  .chat-product-hero,
  .chat-composer,
  .chat-messages {
    border-radius: 22px;
  }

  .chat-stage-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-stage-actions {
    width: 100%;
    justify-content: space-between;
  }

  .chat-product-card {
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 12px;
  }

  .chat-product-image {
    width: 70px;
    height: 70px;
    border-radius: 18px;
  }

  .chat-product-copy p {
    font-size: 16px;
  }

  .chat-messages {
    padding: 14px;
    min-height: 280px;
    max-height: 44vh;
  }

  .chat-message-bubble {
    max-width: min(100%, 90vw);
    padding: 12px 14px;
  }

  .chat-input-row {
    grid-template-columns: 1fr;
  }

  .chat-send-btn {
    width: 100%;
  }
}
/* Chat messenger compact mobile-first overrides */
.chat-shell--messenger {
  gap: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96));
}

.chat-shell--messenger .chat-sidebar {
  gap: 0;
  border-right: 1px solid rgba(214, 224, 241, 0.82);
  background: rgba(255, 255, 255, 0.84);
}

.chat-sidebar-head--minimal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 14px;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid rgba(214, 224, 241, 0.82);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 250, 255, 0.94));
}

.chat-shell--messenger .chat-thread-list {
  gap: 8px;
  align-content: start;
  max-height: none;
  overflow: auto;
  padding: 10px;
}

.chat-total-unread {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(255, 77, 79, 0.22);
}

.chat-shell--messenger .chat-thread-empty {
  padding: 20px 16px;
  border: 0;
  border-radius: 20px;
  background: rgba(243, 247, 255, 0.9);
  color: #667999;
  text-align: center;
}

.chat-shell--messenger .chat-thread-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
}

.chat-shell--messenger .chat-thread-item:hover,
.chat-shell--messenger .chat-thread-item.is-active {
  transform: none;
  border-color: transparent;
  background: linear-gradient(135deg, rgba(77, 125, 242, 0.1), rgba(255, 191, 111, 0.12));
  box-shadow: inset 0 0 0 1px rgba(129, 162, 232, 0.18);
}

.chat-shell--messenger .chat-thread-avatar,
.chat-shell--messenger .chat-stage-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

.chat-shell--messenger .chat-thread-row {
  gap: 12px;
}

.chat-shell--messenger .chat-thread-row--secondary {
  justify-content: flex-start;
}

.chat-shell--messenger .chat-thread-row strong {
  font-size: 17px;
  font-weight: 800;
}

.chat-shell--messenger .chat-thread-copy p {
  margin-top: 5px;
  font-size: 14px;
}

.chat-shell--messenger .chat-thread-unread {
  top: 16px;
  right: 16px;
  min-width: 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: #ff4d4f;
  box-shadow: 0 0 0 6px rgba(255, 77, 79, 0.12);
}

.chat-shell--messenger .chat-stage {
  position: relative;
  min-height: 72vh;
  background:
    radial-gradient(circle at top right, rgba(255, 200, 139, 0.11), transparent 24%),
    linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(245, 249, 255, 0.94));
}

.chat-stage-placeholder {
  display: grid;
  place-items: center;
  min-height: 100%;
  padding: 40px 24px;
  color: #6a7e9f;
}

.chat-stage-placeholder-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.chat-stage-placeholder-copy strong {
  font-size: 18px;
  color: #18355f;
}

.chat-shell--messenger .chat-stage-active {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 0;
  min-height: 100%;
}

.chat-shell--messenger .chat-stage-head,
.chat-shell--messenger .chat-product-hero,
.chat-shell--messenger .chat-composer,
.chat-shell--messenger .chat-messages {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.chat-shell--messenger .chat-stage-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(214, 224, 241, 0.82);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.chat-back-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(233, 240, 252, 0.92);
  color: #173963;
  font-size: 28px;
  line-height: 1;
}

.chat-shell--messenger .chat-stage-user {
  min-width: 0;
}

.chat-stage-user-copy {
  min-width: 0;
}

.chat-stage-user-copy strong,
.chat-stage-user-copy small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-stage-user-copy small {
  margin-top: 4px;
  color: var(--ui-muted);
}

.chat-shell--messenger .chat-stage-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.chat-shell--messenger .chat-stage-link {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
}

.chat-shell--messenger .chat-product-hero {
  padding: 12px 18px;
  border-bottom: 1px solid rgba(214, 224, 241, 0.82);
  background: rgba(255, 255, 255, 0.62);
}

.chat-shell--messenger .chat-product-card {
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 12px;
}

.chat-shell--messenger .chat-product-image {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.chat-shell--messenger .chat-product-copy p {
  margin: 4px 0 0;
  font-size: 16px;
}

.chat-shell--messenger .chat-product-copy small {
  margin-top: 4px;
}

.chat-shell--messenger .chat-messages {
  min-height: 0;
  max-height: none;
  padding: 18px;
}

.chat-shell--messenger .chat-message-bubble {
  max-width: min(440px, 82%);
}

.chat-shell--messenger .chat-composer {
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(214, 224, 241, 0.82);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.chat-shell--messenger .chat-emoji-row {
  gap: 8px;
}

.chat-shell--messenger .chat-emoji-btn,
.chat-shell--messenger .chat-attach-btn {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 12px;
}

.chat-shell--messenger .chat-attachment-preview {
  margin-top: 8px;
}

.chat-shell--messenger .chat-input-row {
  margin-top: 10px;
}

.chat-shell--messenger .chat-input-row textarea {
  min-height: 48px;
  border-radius: 18px;
}

.chat-shell--messenger .chat-send-btn {
  min-width: 86px;
  min-height: 48px;
}

@media (max-width: 767px) {
  .chat-thread-open {
    overflow: hidden;
  }

  .chat-shell--messenger {
    grid-template-columns: 1fr;
    min-height: calc(100vh - 188px);
    border-radius: 28px;
  }

  .chat-shell--messenger .chat-sidebar {
    border-right: 0;
  }

  .chat-shell--messenger .chat-thread-list {
    padding: 8px 8px 14px;
  }

  .chat-shell--messenger .chat-stage {
    position: absolute;
    inset: 0;
    z-index: 5;
    min-height: 100%;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.22s ease;
  }

  .chat-shell--messenger.is-thread-open .chat-stage {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
  }

  .chat-shell--messenger .chat-stage-placeholder {
    display: none;
  }

  .chat-back-btn {
    display: inline-flex;
  }

  .chat-shell--messenger .chat-stage-head {
    padding: 12px 12px 10px;
  }

  .chat-shell--messenger .chat-stage-actions {
    gap: 6px;
  }

  .chat-shell--messenger .chat-stage-link,
  .chat-shell--messenger .plaza-status-badge {
    font-size: 12px;
  }

  .chat-shell--messenger .chat-product-hero {
    padding: 10px 12px;
  }

  .chat-shell--messenger .chat-messages {
    padding: 14px 12px;
  }

  .chat-shell--messenger .chat-message-bubble {
    max-width: 86%;
  }

  .chat-shell--messenger .chat-composer {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .chat-shell--messenger .chat-emoji-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .chat-shell--messenger .chat-emoji-row::-webkit-scrollbar {
    display: none;
  }

  .chat-shell--messenger .chat-input-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .chat-shell--messenger .chat-send-btn {
    width: auto;
    min-width: 74px;
  }
}

/* Chat mobile stability tuning */
.chat-page-body .header-shell {
  padding-block: 12px;
}

.chat-shell--messenger .chat-stage-user-copy strong {
  font-size: 17px;
}

.chat-shell--messenger .chat-stage-user-copy small {
  font-size: 13px;
}

.chat-shell--messenger .chat-product-card {
  align-items: center;
}

.chat-shell--messenger .chat-product-copy strong {
  font-size: 18px;
}

.chat-shell--messenger .chat-product-copy p {
  margin: 4px 0 0;
}

.chat-shell--messenger .chat-messages {
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
}

.chat-shell--messenger .chat-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.chat-shell--messenger .chat-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 82px;
  gap: 10px;
  align-items: center;
  margin-top: 0;
}

.chat-shell--messenger .chat-input-row textarea {
  width: 100%;
  min-width: 0;
  padding: 13px 16px;
}

.chat-shell--messenger .chat-send-btn {
  width: 82px;
  min-width: 82px;
  min-height: 50px;
  padding-inline: 0;
}

.chat-tool-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.chat-media-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.chat-shell--messenger .chat-emoji-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
}

.chat-shell--messenger .chat-emoji-row::-webkit-scrollbar {
  display: none;
}

.chat-shell--messenger .chat-emoji-btn {
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
}

.chat-shell--messenger .chat-emoji-btn.chat-emoji-btn--product,
.chat-shell--messenger .chat-attach-btn {
  flex: 0 0 auto;
  width: auto;
  min-width: 74px;
  min-height: 40px;
  padding: 0 12px;
  white-space: nowrap;
}

.chat-shell--messenger .chat-attachment-preview {
  margin-top: 0;
}

@media (max-width: 767px) {
  .chat-page-body .site-header .ui-container {
    padding: 0 8px;
  }

  .chat-page-body .header-shell {
    min-height: 58px;
    padding: 10px 12px;
  }

  .chat-page-body .brand-logo {
    width: 42px;
    height: 42px;
  }

  .chat-page-body .brand-name {
    font-size: 18px;
  }

  .chat-page-body .nav-auth-btn,
  .chat-page-body .theme-toggle {
    min-height: 38px;
  }

  .chat-shell--messenger {
    min-height: calc(100dvh - 166px);
  }

  .chat-shell--messenger .chat-stage-head {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px 12px;
  }

  .chat-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    font-size: 26px;
  }

  .chat-shell--messenger .chat-stage-avatar {
    width: 40px;
    height: 40px;
    border-radius: 14px;
  }

  .chat-shell--messenger .chat-stage-user {
    gap: 10px;
  }

  .chat-shell--messenger .chat-stage-user-copy strong {
    font-size: 16px;
  }

  .chat-shell--messenger .chat-stage-user-copy small {
    display: none;
  }

  .chat-shell--messenger .chat-stage-actions {
    gap: 0;
  }

  .chat-shell--messenger .plaza-status-badge {
    display: none;
  }

  .chat-shell--messenger .chat-stage-link {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
  }

  .chat-shell--messenger .chat-product-hero {
    padding: 8px 12px;
  }

  .chat-shell--messenger .chat-product-card {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 10px;
  }

  .chat-shell--messenger .chat-product-image {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .chat-shell--messenger .chat-product-copy strong {
    font-size: 16px;
  }

  .chat-shell--messenger .chat-product-copy p {
    font-size: 14px;
    margin-top: 2px;
  }

  .chat-shell--messenger .chat-product-copy small {
    display: none;
  }

  .chat-shell--messenger .chat-messages {
    padding: 12px;
  }

  .chat-shell--messenger .chat-message {
    gap: 4px;
    margin-bottom: 12px;
  }

  .chat-shell--messenger .chat-message-bubble {
    max-width: 90%;
    padding: 12px 13px;
    border-radius: 18px;
  }

  .chat-shell--messenger .chat-message-product {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 10px;
  }

  .chat-shell--messenger .chat-message-product img {
    width: 56px;
    height: 56px;
    border-radius: 14px;
  }

  .chat-shell--messenger .chat-message-product span {
    margin-top: 4px;
    font-size: 15px;
  }

  .chat-shell--messenger .chat-message-product small {
    margin-top: 2px;
  }

  .chat-shell--messenger .chat-composer {
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom, 0px));
  }

  .chat-shell--messenger .chat-input-row {
    grid-template-columns: minmax(0, 1fr) 72px;
    gap: 8px;
  }

  .chat-shell--messenger .chat-input-row textarea {
    min-height: 46px;
    padding: 12px 14px;
    font-size: 16px;
  }

  .chat-shell--messenger .chat-send-btn {
    width: 72px;
    min-width: 72px;
    min-height: 46px;
    font-size: 15px;
  }

  .chat-tool-row {
    gap: 8px;
  }

  .chat-media-actions {
    gap: 6px;
  }

  .chat-shell--messenger .chat-emoji-row {
    gap: 6px;
  }

  .chat-shell--messenger .chat-emoji-btn {
    flex-basis: 36px;
    width: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 11px;
    font-size: 18px;
  }

  .chat-shell--messenger .chat-emoji-btn.chat-emoji-btn--product,
  .chat-shell--messenger .chat-attach-btn {
    min-width: 64px;
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }
}

/* Chat app lock mode */
.chat-page-body {
  --chat-app-height: 100dvh;
  --chat-viewport-offset: 0px;
  --chat-header-offset: 88px;
}

.chat-page-body .chat-page-shell {
  overflow: hidden;
}

.chat-shell--messenger .chat-thread-item {
  position: relative;
  padding: 16px 14px;
  border-radius: 0;
}

.chat-shell--messenger .chat-thread-item::after {
  content: '';
  position: absolute;
  left: 82px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(214, 224, 241, 0.92);
}

.chat-shell--messenger .chat-thread-item:last-child::after {
  display: none;
}

.chat-shell--messenger .chat-thread-avatar {
  box-shadow: 0 0 0 1px rgba(204, 217, 239, 0.92);
}

.chat-shell--messenger .chat-thread-copy {
  min-width: 0;
  padding-right: 30px;
}

.chat-shell--messenger .chat-thread-row time {
  flex: 0 0 auto;
  font-size: 13px;
}

@media (max-width: 767px) {
  body.chat-page-body {
    width: 100%;
    height: var(--chat-app-height, 100dvh);
    overflow: hidden;
    overscroll-behavior: none;
    background: linear-gradient(180deg, #f4f7fd 0%, #edf3ff 100%);
  }

  body.chat-page-body {
    position: fixed;
    inset: 0;
  }

  body.chat-page-body .site-header {
    position: fixed;
    top: var(--chat-viewport-offset, 0px);
    left: 0;
    right: 0;
    z-index: 20;
  }

  body.chat-page-body .page-shell.chat-page-shell {
    position: fixed;
    top: calc(var(--chat-header-offset, 88px) + var(--chat-viewport-offset, 0px));
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    max-width: none;
    margin: 0;
    padding: 8px 8px 0;
    overflow: hidden;
  }

  body.chat-page-body .auth-error {
    margin: 6px 4px 8px;
  }

  body.chat-page-body .chat-shell--messenger {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 28px 28px 0 0;
  }

  body.chat-page-body .chat-shell--messenger .chat-sidebar,
  body.chat-page-body .chat-shell--messenger .chat-stage,
  body.chat-page-body .chat-shell--messenger .chat-stage-active {
    min-height: 0;
    height: 100%;
  }

  body.chat-page-body .chat-shell--messenger .chat-thread-list,
  body.chat-page-body .chat-shell--messenger .chat-messages {
    min-height: 0;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.chat-page-body .chat-shell--messenger .chat-thread-list {
    padding: 0 14px 10px;
  }

  body.chat-page-body .chat-shell--messenger .chat-thread-item {
    padding: 16px 0;
  }

  body.chat-page-body .chat-shell--messenger .chat-thread-item::after {
    left: 66px;
  }

  body.chat-page-body .chat-shell--messenger .chat-thread-copy {
    padding-right: 34px;
  }

  body.chat-page-body .chat-shell--messenger .chat-stage {
    background: linear-gradient(180deg, rgba(251, 253, 255, 0.99), rgba(244, 248, 255, 0.98));
  }

  body.chat-page-body .chat-shell--messenger .chat-stage-active {
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body.chat-page-body .chat-shell--messenger .chat-stage-head {
    position: relative;
    z-index: 2;
    padding: 12px 12px 10px;
    background: rgba(255, 255, 255, 0.96);
  }

  body.chat-page-body .chat-shell--messenger .chat-stage-actions,
  body.chat-page-body .chat-shell--messenger .chat-product-hero {
    display: none;
  }

  body.chat-page-body .chat-shell--messenger .chat-stage-user-copy strong {
    font-size: 15px;
  }

  body.chat-page-body .chat-shell--messenger .chat-stage-user-copy small {
    display: block;
    font-size: 12px;
  }

  body.chat-page-body .chat-shell--messenger .chat-messages {
    padding: 10px 12px 12px;
    scroll-padding-bottom: 18px;
  }

  body.chat-page-body .chat-shell--messenger .chat-message-bubble {
    max-width: 84%;
  }

  body.chat-page-body .chat-shell--messenger .chat-composer {
    position: relative;
    z-index: 2;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.98);
  }

  body.chat-page-body .chat-shell--messenger .chat-input-row {
    grid-template-columns: minmax(0, 1fr) 78px;
    gap: 8px;
  }

  body.chat-page-body .chat-shell--messenger .chat-input-row textarea {
    height: 46px;
    min-height: 46px;
    max-height: 46px;
    overflow-y: auto;
    resize: none;
  }

  body.chat-page-body .chat-shell--messenger .chat-send-btn {
    width: 78px;
    min-width: 78px;
    min-height: 46px;
  }

  body.chat-page-body .chat-shell--messenger .chat-tool-row {
    gap: 8px;
    overflow: hidden;
  }

  body.chat-page-body .chat-shell--messenger .chat-media-actions {
    gap: 6px;
  }

  body.chat-page-body .chat-shell--messenger .chat-emoji-row {
    gap: 6px;
  }

  body.chat-page-body .chat-shell--messenger .chat-emoji-btn {
    flex-basis: 38px;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  body.chat-page-body .chat-shell--messenger .chat-emoji-btn.chat-emoji-btn--product,
  body.chat-page-body .chat-shell--messenger .chat-attach-btn {
    min-width: 68px;
    min-height: 38px;
    padding: 0 10px;
  }

  body.chat-thread-open .site-header {
    display: none;
  }

  body.chat-thread-open .page-shell.chat-page-shell {
    top: var(--chat-viewport-offset, 0px);
    padding: 0;
  }

  body.chat-thread-open .chat-shell--messenger {
    border-radius: 0;
  }
}
/* Chat nav restore + right-gap cleanup */
@media (max-width: 767px) {
  body.chat-page-body {
    margin: 0;
  }

  body.chat-page-body .ui-container,
  body.chat-page-body .site-header .ui-container,
  body.chat-page-body main.ui-container.page-shell.chat-page-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  body.chat-page-body .site-header .ui-container {
    padding: 0 10px;
  }

  body.chat-page-body .page-shell.chat-page-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0;
    right: 0;
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
    padding: 8px 0 0;
  }

  body.chat-page-body .chat-shell--messenger,
  body.chat-page-body .chat-shell--messenger .chat-sidebar,
  body.chat-page-body .chat-shell--messenger .chat-stage,
  body.chat-page-body .chat-shell--messenger .chat-stage-active {
    box-sizing: border-box;
    width: 100%;
  }

  body.chat-page-body .chat-shell--messenger {
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  body.chat-page-body .chat-shell--messenger .chat-sidebar,
  body.chat-page-body .chat-shell--messenger .chat-stage {
    border-right: 0;
  }

  body.chat-page-body .chat-shell--messenger .chat-thread-list,
  body.chat-page-body .chat-shell--messenger .chat-messages,
  body.chat-page-body .chat-shell--messenger .chat-composer,
  body.chat-page-body .chat-shell--messenger .chat-stage-head {
    width: 100%;
  }

  body.chat-page-body .global-mobile-shortcut {
    display: grid;
  }

  body.chat-thread-open .global-mobile-shortcut {
    display: none;
  }

  body.chat-thread-open .page-shell.chat-page-shell {
    width: 100vw !important;
    max-width: 100vw !important;
    bottom: 0;
    padding: 0;
  }

body.chat-thread-open .chat-shell--messenger,
body.chat-thread-open .chat-shell--messenger .chat-stage {
  width: 100vw;
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
}

/* Publish + plaza shared app header and compact marketplace cards */
.module-header-actions .nav-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(131, 151, 191, 0.18);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-900, #17223b);
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(112, 144, 176, 0.12);
}

.publish-composer-body .module-header-shell,
.market-page-body .module-header-shell {
  padding: 14px 16px;
}

.publish-composer-body .module-panel--rail,
.market-page-body .module-panel--rail {
  padding: 10px 12px;
}

.publish-composer-body .module-panel--rail .module-switcher,
.market-page-body .module-panel--rail .module-switcher {
  gap: 8px;
}

.publish-composer-body .module-switch,
.market-page-body .module-switch {
  min-height: 80px;
  padding: 12px;
  border-radius: 20px;
}

.publish-composer-body .module-switch-icon,
.market-page-body .module-switch-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 14px;
}

.publish-composer-body .module-switch strong,
.market-page-body .module-switch strong {
  font-size: 13px;
}

.market-feed-shell .market-grid {
  gap: 12px;
  align-items: start;
}

.market-card--clean {
  border-radius: 24px;
  box-shadow: 0 18px 30px rgba(16, 32, 59, 0.07);
}

.market-card--clean .market-card-media {
  aspect-ratio: 1.3 / 1;
}

.market-card--clean .market-card-body {
  gap: 8px;
  padding: 14px;
}

.market-card--clean .market-card-topline time {
  font-size: 11px;
}

.market-card--clean .market-card-chip {
  min-height: 24px;
  padding: 0 9px;
  font-size: 11px;
}

.market-card--clean .market-card-price {
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1;
}

.market-card--clean .market-card-title {
  font-size: clamp(16px, 1.6vw, 20px);
  line-height: 1.28;
}

.market-card--clean .market-card-title a {
  display: -webkit-box;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.market-card--clean .market-card-meta {
  font-size: 12px;
  line-height: 1.45;
}

.market-card--clean .market-card-summary {
  font-size: 12px;
  line-height: 1.55;
  -webkit-line-clamp: 2;
}

.market-card--clean .market-card-actions {
  gap: 8px;
  margin-top: 0;
}

.market-card--clean .market-card-link,
.market-card--clean .market-favorite-toggle {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 14px;
  font-size: 13px;
}

@media (max-width: 767px) {
  .publish-composer-body .module-header-shell,
  .market-page-body .module-header-shell {
    padding: 12px 14px;
  }

  .publish-composer-body .module-header-actions,
  .market-page-body .module-header-actions {
    gap: 6px;
  }

  .publish-composer-body .module-header-btn,
  .publish-composer-body .module-header-actions .nav-auth-btn,
  .market-page-body .module-header-btn,
  .market-page-body .module-header-actions .nav-auth-btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .publish-composer-body .module-panel--rail,
  .market-page-body .module-panel--rail {
    padding: 8px 10px;
  }

  .publish-composer-body .module-switch,
  .market-page-body .module-switch {
    min-height: 72px;
    padding: 10px;
    border-radius: 18px;
  }

  .publish-composer-body .module-switch strong,
  .market-page-body .module-switch strong {
    font-size: 12px;
  }

  .market-feed-shell .market-grid {
    gap: 10px;
  }

  .market-card--clean .market-card-media {
    aspect-ratio: 1.36 / 1;
  }

  .market-card--clean .market-card-body {
    padding: 12px;
    gap: 7px;
  }

  .market-card--clean .market-card-price {
    font-size: 18px;
  }

  .market-card--clean .market-card-title {
    font-size: 15px;
  }

  .market-card--clean .market-card-summary {
    display: none;
  }

  .market-card--clean .market-card-link {
    flex: 1 1 auto;
  }

  .market-card--clean .market-favorite-toggle {
    flex: 0 0 76px;
  }
}

.market-page-body .publish-search-shell--plaza,
.market-page-body .market-feed-head {
  display: none;
}

.market-toolbar-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px;
  border-radius: 24px;
  border: 1px solid rgba(140, 157, 188, 0.14);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 34px rgba(16, 32, 59, 0.08);
}

.market-toolbar-search {
  flex: 1 1 auto;
  min-width: 0;
}

.market-toolbar-searchbox {
  position: relative;
  min-height: 50px;
  padding-right: 54px;
  border-radius: 18px;
  background: rgba(246, 249, 253, 0.56);
  border-color: rgba(140, 157, 188, 0.14);
  box-shadow: none;
}

.market-toolbar-searchbox .publish-search-input {
  font-size: 14px;
}

.market-toolbar-submit {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(95, 139, 243, 0.96), rgba(240, 193, 107, 0.9));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  box-shadow: 0 12px 24px rgba(95, 139, 243, 0.18);
}

.market-layout-switch--square {
  flex: 0 0 auto;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.market-layout-switch--square .market-layout-toggle {
  flex: 0 0 auto;
  width: 46px;
  min-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 800;
  background: rgba(246, 249, 253, 0.82);
  box-shadow: inset 0 0 0 1px rgba(140, 157, 188, 0.16);
}

.market-layout-switch--square .market-layout-toggle.is-active {
  box-shadow: 0 14px 26px rgba(49, 95, 206, 0.2);
}

body.theme-dark .market-toolbar-bar,
[data-theme="dark"] .market-toolbar-bar {
  background: rgba(15, 28, 48, 0.78);
  border-color: rgba(196, 209, 230, 0.1);
}

body.theme-dark .market-toolbar-searchbox,
[data-theme="dark"] .market-toolbar-searchbox {
  background: rgba(22, 37, 61, 0.72);
  border-color: rgba(196, 209, 230, 0.1);
}

body.theme-dark .market-layout-switch--square .market-layout-toggle,
[data-theme="dark"] .market-layout-switch--square .market-layout-toggle {
  background: rgba(22, 37, 61, 0.82);
  box-shadow: inset 0 0 0 1px rgba(196, 209, 230, 0.08);
}

@media (max-width: 767px) {
  .market-toolbar-bar {
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 20px;
  }

  .market-toolbar-searchbox {
    min-height: 46px;
    padding-right: 50px;
    border-radius: 16px;
  }

  .market-toolbar-submit {
    right: 7px;
    width: 34px;
    height: 34px;
    border-radius: 11px;
  }

  .market-layout-switch--square {
    gap: 6px;
  }

  .market-layout-switch--square .market-layout-toggle {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    border-radius: 14px;
    font-size: 14px;
  }
}

/* plaza toolbar stability fixes */
.market-page-body .publish-search-shell--plaza,
.market-page-body .market-feed-head {
  display: none !important;
}

.market-toolbar-bar {
  justify-content: space-between;
  overflow: hidden;
}

.market-toolbar-search {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.market-toolbar-searchbox {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding-right: 16px;
}

.market-toolbar-searchbox .publish-search-icon {
  margin-right: 8px;
}

.market-toolbar-searchbox .publish-search-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  padding-left: 0;
}

.market-toolbar-submit {
  display: none !important;
}

.market-layout-switch--square {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
}

.market-layout-switch--square .market-layout-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ds-text-secondary);
}

.market-layout-switch--square .market-layout-toggle.is-active {
  background: linear-gradient(135deg, rgba(49, 95, 206, 0.94), rgba(220, 163, 74, 0.88));
  color: #ffffff;
  box-shadow: 0 14px 26px rgba(49, 95, 206, 0.2);
}

@media (max-width: 767px) {
  .market-toolbar-bar {
    align-items: center;
  }

  .market-toolbar-search {
    min-width: 0;
  }

  .market-toolbar-searchbox {
    min-height: 42px;
    padding-right: 14px;
  }

  .market-layout-switch--square {
    gap: 6px;
  }

  .market-layout-switch--square .market-layout-toggle {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
  }
}

/* plaza toolbar polish */
.market-page-body .market-feed-panel.section-block {
  margin-top: 10px;
}

.market-page-body .market-toolbar-bar {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 22px;
  gap: 10px;
}

.market-page-body .market-toolbar-searchbox {
  min-height: 44px;
  padding: 0 14px !important;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74) !important;
  border: 1px solid rgba(196, 209, 232, 0.82) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78) !important;
}

.market-page-body .market-toolbar-searchbox .publish-search-icon {
  flex: 0 0 auto;
  margin-right: 8px;
  font-size: 18px;
  color: #7b8aa8;
}

.market-page-body .market-toolbar-searchbox .publish-search-input {
  flex: 1 1 auto;
  width: 100% !important;
  min-width: 0;
  padding: 0 !important;
  color: #17305e !important;
  -webkit-text-fill-color: #17305e !important;
  caret-color: #17305e !important;
  opacity: 1 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

.market-page-body .market-toolbar-searchbox .publish-search-input::placeholder {
  color: rgba(23, 48, 94, 0.44) !important;
  -webkit-text-fill-color: rgba(23, 48, 94, 0.44) !important;
}

.market-page-body .market-toolbar-searchbox .market-toolbar-submit {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.market-page-body .market-layout-switch--square {
  gap: 8px;
}

.market-page-body .market-layout-switch--square .market-layout-toggle {
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1px solid rgba(150, 172, 211, 0.28);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: rgba(23, 48, 94, 0.38);
  font-size: 0 !important;
  box-shadow: none;
}

.market-page-body .market-layout-switch--square .market-layout-toggle::before {
  content: '';
  display: block;
  width: 16px;
  height: 12px;
  margin: 0 auto;
  background-repeat: no-repeat;
}

.market-page-body .market-layout-switch--square .market-layout-toggle[data-columns="1"]::before {
  background-image: linear-gradient(currentColor 0 0);
  background-size: 100% 100%;
  background-position: center;
}

.market-page-body .market-layout-switch--square .market-layout-toggle[data-columns="2"]::before {
  background-image:
    linear-gradient(currentColor 0 0),
    linear-gradient(currentColor 0 0);
  background-size: 6px 100%, 6px 100%;
  background-position: left center, right center;
}

.market-page-body .market-layout-switch--square .market-layout-toggle[data-columns="3"]::before {
  background-image:
    linear-gradient(currentColor 0 0),
    linear-gradient(currentColor 0 0),
    linear-gradient(currentColor 0 0);
  background-size: 4px 100%, 4px 100%, 4px 100%;
  background-position: left center, center center, right center;
}

.market-page-body .market-layout-switch--square .market-layout-toggle.is-active {
  border-color: rgba(47, 124, 255, 0.34);
  background: rgba(47, 124, 255, 0.12);
  color: #2f7cff;
  box-shadow: 0 10px 22px rgba(47, 124, 255, 0.12);
}

.market-page-body .market-layout-switch--square .market-layout-toggle:hover,
.market-page-body .market-layout-switch--square .market-layout-toggle:focus-visible {
  transform: translateY(-1px);
}

body.theme-dark .market-page-body .market-toolbar-searchbox,
[data-theme="dark"] .market-page-body .market-toolbar-searchbox {
  background: rgba(18, 31, 52, 0.84) !important;
  border-color: rgba(196, 209, 230, 0.12) !important;
}

body.theme-dark .market-page-body .market-toolbar-searchbox .publish-search-input,
[data-theme="dark"] .market-page-body .market-toolbar-searchbox .publish-search-input {
  color: #eef4ff !important;
  -webkit-text-fill-color: #eef4ff !important;
  caret-color: #eef4ff !important;
}

body.theme-dark .market-page-body .market-toolbar-searchbox .publish-search-input::placeholder,
[data-theme="dark"] .market-page-body .market-toolbar-searchbox .publish-search-input::placeholder {
  color: rgba(238, 244, 255, 0.46) !important;
  -webkit-text-fill-color: rgba(238, 244, 255, 0.46) !important;
}

body.theme-dark .market-page-body .market-layout-switch--square .market-layout-toggle,
[data-theme="dark"] .market-page-body .market-layout-switch--square .market-layout-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 209, 230, 0.14);
  color: rgba(219, 232, 255, 0.38);
}

body.theme-dark .market-page-body .market-layout-switch--square .market-layout-toggle.is-active,
[data-theme="dark"] .market-page-body .market-layout-switch--square .market-layout-toggle.is-active {
  background: rgba(47, 124, 255, 0.2);
  color: #7ca4ff;
}

@media (max-width: 767px) {
  .market-page-body .market-feed-panel.section-block {
    margin-top: 8px;
  }

  .market-page-body .market-toolbar-bar {
    margin-bottom: 10px;
    padding: 8px 10px;
    gap: 8px;
  }

  .market-page-body .market-toolbar-searchbox {
    min-height: 42px;
    border-radius: 16px;
  }

  .market-page-body .market-layout-switch--square {
    gap: 6px;
  }

  .market-page-body .market-layout-switch--square .market-layout-toggle {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
  }
}

/* final plaza toolbar layout */
.market-page-body .market-feed-panel.section-block {
  margin-top: 4px !important;
}

.market-page-body .market-toolbar-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px !important;
  padding: 8px 10px !important;
}

.market-page-body .market-toolbar-search {
  flex: 1 1 auto;
  min-width: 0;
}

.market-page-body .market-toolbar-searchfield {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(196, 209, 232, 0.84);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.86);
}

.market-page-body .market-toolbar-searchicon {
  flex: 0 0 auto;
  margin-right: 10px;
  font-size: 18px;
  color: #7b8aa8;
}

.market-page-body .market-toolbar-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17305e !important;
  -webkit-text-fill-color: #17305e !important;
  caret-color: #17305e !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2;
  opacity: 1 !important;
}

.market-page-body .market-toolbar-input::placeholder {
  color: rgba(23, 48, 94, 0.44) !important;
  -webkit-text-fill-color: rgba(23, 48, 94, 0.44) !important;
}

.market-page-body .market-layout-switch--news {
  margin-left: 0;
  gap: 6px;
  flex: 0 0 auto;
}

.market-page-body .market-layout-switch--news .news-view-btn {
  margin: 0;
}

.market-page-body .market-layout-switch--news .market-layout-toggle {
  min-height: 38px;
}

body.theme-dark .market-page-body .market-toolbar-searchfield,
[data-theme="dark"] .market-page-body .market-toolbar-searchfield {
  background: rgba(18, 31, 52, 0.86);
  border-color: rgba(196, 209, 230, 0.12);
}

body.theme-dark .market-page-body .market-toolbar-input,
[data-theme="dark"] .market-page-body .market-toolbar-input {
  color: #eef4ff !important;
  -webkit-text-fill-color: #eef4ff !important;
  caret-color: #eef4ff !important;
}

body.theme-dark .market-page-body .market-toolbar-input::placeholder,
[data-theme="dark"] .market-page-body .market-toolbar-input::placeholder {
  color: rgba(238, 244, 255, 0.46) !important;
  -webkit-text-fill-color: rgba(238, 244, 255, 0.46) !important;
}

@media (max-width: 767px) {
  .market-page-body .market-toolbar-bar {
    gap: 8px;
    margin-bottom: 8px !important;
    padding: 8px !important;
  }

  .market-page-body .market-toolbar-searchfield {
    min-height: 42px;
    border-radius: 16px;
    padding: 0 12px;
  }

  .market-page-body .market-toolbar-searchicon {
    margin-right: 8px;
    font-size: 17px;
  }

  .market-page-body .market-toolbar-input {
    font-size: 16px !important;
  }

  .market-page-body .market-layout-switch--news {
    gap: 4px;
  }

  .market-page-body .market-layout-switch--news .news-view-btn {
    width: 38px;
    min-width: 38px;
  }
}

/* plaza page hard reset toolbar */
.market-page-body .plaza-feed-app {
  padding-top: 8px;
}

.market-page-body .plaza-feed-panel.section-block {
  margin-top: 0 !important;
}

.market-page-body .plaza-market-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  padding: 9px 10px;
  border-radius: 26px;
  border: 1px solid rgba(200, 214, 238, 0.9);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 250, 255, 0.84));
  box-shadow: 0 16px 30px rgba(21, 40, 77, 0.08);
}

.market-page-body .plaza-market-search {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
}

.market-page-body .plaza-market-searchfield {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid rgba(195, 209, 235, 0.92);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.market-page-body .plaza-market-searchicon {
  flex: 0 0 auto;
  margin-right: 10px;
  font-size: 18px;
  line-height: 1;
  color: #7d8daa;
}

.market-page-body .plaza-market-input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #17305e !important;
  -webkit-text-fill-color: #17305e !important;
  caret-color: #17305e !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1.2;
  opacity: 1 !important;
}

.market-page-body .plaza-market-input::placeholder {
  color: rgba(23, 48, 94, 0.42) !important;
  -webkit-text-fill-color: rgba(23, 48, 94, 0.42) !important;
}

.market-page-body .plaza-market-input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.market-page-body .plaza-news-view-switch {
  flex: 0 0 auto;
  gap: 6px;
  margin: 0;
}

.market-page-body .plaza-news-view-switch .news-view-btn {
  margin: 0;
}

.market-page-body .plaza-news-view-switch .market-layout-toggle {
  width: 40px;
  min-width: 40px;
  min-height: 40px;
}

.market-page-body .plaza-feed-panel .market-grid {
  gap: 12px;
}

.market-page-body .plaza-feed-panel .market-card--clean {
  border-radius: 24px;
  overflow: hidden;
}

.market-page-body .plaza-feed-panel .market-card--clean .market-card-media {
  aspect-ratio: 1.06 / 1;
}

.market-page-body .plaza-feed-panel .market-card--clean .market-card-body {
  gap: 8px;
  padding: 14px;
}

.market-page-body .plaza-feed-panel .market-card--clean .market-card-price {
  font-size: clamp(18px, 2vw, 26px);
}

.market-page-body .plaza-feed-panel .market-card--clean .market-card-title {
  font-size: clamp(16px, 1.5vw, 20px);
}

.market-page-body .plaza-feed-panel .market-card--clean .market-card-summary {
  display: none;
}

.market-page-body .plaza-feed-panel .market-card--clean .market-card-actions {
  gap: 8px;
}

.market-page-body .plaza-feed-panel .market-card--clean .market-card-link,
.market-page-body .plaza-feed-panel .market-card--clean .market-favorite-toggle {
  min-height: 40px;
  padding: 0 12px;
}

body.theme-dark .market-page-body .plaza-market-toolbar,
[data-theme="dark"] .market-page-body .plaza-market-toolbar {
  border-color: rgba(110, 149, 226, 0.16);
  background: linear-gradient(180deg, rgba(14, 27, 47, 0.94), rgba(11, 23, 41, 0.92));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.26);
}

body.theme-dark .market-page-body .plaza-market-searchfield,
[data-theme="dark"] .market-page-body .plaza-market-searchfield {
  border-color: rgba(125, 166, 242, 0.14);
  background: rgba(18, 31, 52, 0.9);
}

body.theme-dark .market-page-body .plaza-market-input,
[data-theme="dark"] .market-page-body .plaza-market-input {
  color: #edf4ff !important;
  -webkit-text-fill-color: #edf4ff !important;
  caret-color: #edf4ff !important;
}

body.theme-dark .market-page-body .plaza-market-input::placeholder,
[data-theme="dark"] .market-page-body .plaza-market-input::placeholder {
  color: rgba(237, 244, 255, 0.44) !important;
  -webkit-text-fill-color: rgba(237, 244, 255, 0.44) !important;
}

@media (max-width: 767px) {
  .market-page-body .plaza-feed-app {
    padding-top: 4px;
  }

  .market-page-body .plaza-market-toolbar {
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px;
  }

  .market-page-body .plaza-market-searchfield {
    min-height: 44px;
    padding: 0 12px;
    border-radius: 16px;
  }

  .market-page-body .plaza-market-searchicon {
    margin-right: 8px;
    font-size: 17px;
  }

  .market-page-body .plaza-market-input {
    font-size: 16px !important;
  }

  .market-page-body .plaza-news-view-switch {
    gap: 4px;
  }

  .market-page-body .plaza-news-view-switch .market-layout-toggle {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-media {
    aspect-ratio: 1.34 / 1;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-body {
    gap: 6px;
    padding: 10px 10px 11px;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-topline time {
    font-size: 10px;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-chip {
    min-height: 22px;
    padding: 0 8px;
    font-size: 10px;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-price {
    font-size: 17px;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-title {
    font-size: 15px;
    line-height: 1.22;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-meta {
    font-size: 11px;
    line-height: 1.35;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-actions {
    gap: 6px;
  }

  .market-page-body .plaza-feed-panel .market-card--clean .market-card-link,
  .market-page-body .plaza-feed-panel .market-card--clean .market-favorite-toggle {
    min-height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    font-size: 12px;
  }
}

/* front utility pages */
.utility-page-body .module-header-shell {
  padding: 14px 16px;
}

.utility-page-body .module-panel--rail {
  padding: 10px 12px;
}

.utility-page-body .module-panel--rail .module-switcher {
  gap: 8px;
}

.utility-page-body .module-switch {
  min-height: 80px;
  padding: 12px;
  border-radius: 20px;
}

.utility-page-body .module-switch-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  font-size: 14px;
}

.utility-page-body .module-switch strong {
  font-size: 13px;
}

.utility-page-shell {
  gap: 18px;
}

.utility-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.utility-hero-copy {
  max-width: 720px;
}

.utility-stat-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.utility-stat-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  min-width: 112px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(195, 209, 235, 0.9);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.utility-stat-pill span {
  color: #7082a0;
  font-size: 12px;
  font-weight: 700;
}

.utility-stat-pill strong {
  color: #193765;
  font-size: 18px;
  font-weight: 800;
}

.utility-grid {
  display: grid;
  gap: 14px;
}

.utility-grid--business,
.utility-grid--jobs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.utility-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(18, 37, 68, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.9));
  box-shadow: 0 18px 30px rgba(17, 35, 67, 0.08);
}

.utility-card-head {
  display: grid;
  gap: 10px;
}

.utility-card-head h3 {
  margin: 0;
  color: #172949;
  font-size: 22px;
  line-height: 1.2;
}

.utility-card-chip,
.utility-text-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: fit-content;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(233, 240, 251, 0.95);
  color: #28446f;
  font-size: 12px;
  font-weight: 800;
}

.utility-card-subtitle {
  margin: 0;
  color: #4d6388;
  font-size: 15px;
  font-weight: 700;
}

.utility-card-copy {
  margin: 0;
  color: #5f718f;
  font-size: 14px;
  line-height: 1.7;
}

.utility-contact-list,
.utility-detail-grid {
  display: grid;
  gap: 10px;
}

.utility-contact-list div,
.utility-detail-block {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(244, 247, 252, 0.9);
  border: 1px solid rgba(198, 211, 234, 0.74);
}

.utility-contact-list span,
.utility-label {
  color: #7385a1;
  font-size: 12px;
  font-weight: 700;
}

.utility-contact-list strong,
.utility-value {
  color: #1a335a;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.utility-inline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: #72829f;
  font-size: 12px;
  font-weight: 700;
}

.utility-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.utility-empty-card {
  display: grid;
  gap: 8px;
  padding: 22px;
  border-radius: 24px;
  text-align: center;
}

.utility-empty-card h3,
.utility-empty-card h2,
.utility-prose h2 {
  margin: 0;
}

.utility-empty-card p,
.utility-prose p {
  margin: 0;
  color: #5f718f;
  line-height: 1.75;
}

.utility-detail-card {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 28px;
}

.utility-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.utility-prose {
  display: grid;
  gap: 10px;
}

.utility-news-grid {
  display: grid;
  gap: 16px;
}

.utility-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 24px;
}

.utility-page-numbers {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.utility-page-btn,
.utility-page-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 40px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(192, 207, 232, 0.88);
  background: rgba(255, 255, 255, 0.9);
  color: #1c355e;
  font-size: 13px;
  font-weight: 800;
}

.utility-page-number.is-active {
  border-color: rgba(88, 137, 226, 0.26);
  background: linear-gradient(135deg, #4a7df0, #d6a353);
  color: #fff;
  box-shadow: 0 14px 22px rgba(58, 97, 188, 0.18);
}

.utility-page-btn.is-disabled {
  opacity: 0.45;
}

body.theme-dark .utility-stat-pill,
[data-theme="dark"] .utility-stat-pill,
body.theme-dark .utility-card,
[data-theme="dark"] .utility-card,
body.theme-dark .utility-contact-list div,
[data-theme="dark"] .utility-contact-list div,
body.theme-dark .utility-detail-block,
[data-theme="dark"] .utility-detail-block,
body.theme-dark .utility-page-btn,
[data-theme="dark"] .utility-page-btn,
body.theme-dark .utility-page-number,
[data-theme="dark"] .utility-page-number,
body.theme-dark .utility-detail-card,
[data-theme="dark"] .utility-detail-card {
  border-color: rgba(108, 150, 231, 0.18);
  background: linear-gradient(180deg, rgba(17, 30, 51, 0.92), rgba(11, 23, 41, 0.94));
  color: #dfeaff;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

body.theme-dark .utility-card-head h3,
[data-theme="dark"] .utility-card-head h3,
body.theme-dark .utility-value,
[data-theme="dark"] .utility-value,
body.theme-dark .utility-stat-pill strong,
[data-theme="dark"] .utility-stat-pill strong {
  color: #f3f7ff;
}

body.theme-dark .utility-card-copy,
[data-theme="dark"] .utility-card-copy,
body.theme-dark .utility-empty-card p,
[data-theme="dark"] .utility-empty-card p,
body.theme-dark .utility-prose p,
[data-theme="dark"] .utility-prose p,
body.theme-dark .utility-inline-meta,
[data-theme="dark"] .utility-inline-meta,
body.theme-dark .utility-stat-pill span,
[data-theme="dark"] .utility-stat-pill span,
body.theme-dark .utility-label,
[data-theme="dark"] .utility-label {
  color: #b8c7e3;
}

body.theme-dark .utility-card-chip,
[data-theme="dark"] .utility-card-chip,
body.theme-dark .utility-text-chip,
[data-theme="dark"] .utility-text-chip {
  background: rgba(103, 136, 205, 0.18);
  color: #d7e7ff;
}

body.theme-dark .utility-page-number.is-active,
[data-theme="dark"] .utility-page-number.is-active {
  background: linear-gradient(135deg, rgba(74, 125, 240, 0.92), rgba(214, 163, 83, 0.88));
  color: #fff;
}

@media (max-width: 767px) {
  .utility-page-body .module-header-shell {
    padding: 12px 14px;
  }

  .utility-page-body .module-header-actions {
    gap: 6px;
  }

  .utility-page-body .module-header-btn,
  .utility-page-body .module-header-actions .nav-auth-btn {
    min-height: 40px;
    padding: 0 12px;
    font-size: 13px;
  }

  .utility-page-body .module-panel--rail {
    padding: 8px 10px;
  }

  .utility-page-body .module-switch {
    min-height: 74px;
    padding: 10px;
  }

  .utility-page-body .module-switch strong {
    font-size: 12px;
  }

  .utility-page-shell {
    gap: 14px;
  }

  .utility-hero {
    gap: 14px;
    padding: 16px;
  }

  .utility-stat-strip {
    width: 100%;
    gap: 8px;
  }

  .utility-stat-pill {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .utility-stat-pill strong {
    font-size: 16px;
  }

  .utility-grid--business,
  .utility-grid--jobs,
  .utility-detail-grid {
    grid-template-columns: 1fr;
  }

  .utility-card {
    gap: 10px;
    padding: 14px;
    border-radius: 20px;
  }

  .utility-card-head h3 {
    font-size: 18px;
  }

  .utility-card-copy {
    font-size: 13px;
  }

  .utility-card-actions {
    gap: 8px;
  }

  .utility-card-actions .ui-btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .utility-pagination {
    flex-direction: column;
    align-items: stretch;
  }

  .utility-page-btn {
    width: 100%;
  }
}
