:root {
  color-scheme: light;
  --bg: #eef6ff;
  --bg-2: #f7fbff;
  --sidebar: rgba(255, 255, 255, 0.82);
  --surface: rgba(255, 255, 255, 0.9);
  --surface-solid: #ffffff;
  --text: #172033;
  --muted: #738097;
  --line: #dfebf7;
  --accent: #2f80ed;
  --accent-2: #6c5ce7;
  --accent-3: #24c6b8;
  --accent-soft: #eaf3ff;
  --pink-soft: #f7eefe;
  --green-soft: #e8f8f4;
  --warning: #f59f33;
  --danger: #ef6382;
  --shadow: 0 22px 55px rgba(75, 105, 145, 0.14);
  --small-shadow: 0 10px 26px rgba(75, 105, 145, 0.1);
  --content-max-width: 1620px;
  --content-gutter: clamp(18px, 3.6vw, 48px);
}

:root.dark {
  color-scheme: dark;
  --bg: #111827;
  --bg-2: #182132;
  --sidebar: rgba(20, 31, 49, 0.86);
  --surface: rgba(24, 34, 53, 0.92);
  --surface-solid: #1d2940;
  --text: #eef5ff;
  --muted: #a8b4c7;
  --line: #2f405c;
  --accent: #73a9ff;
  --accent-2: #a89bff;
  --accent-3: #6ce0d5;
  --accent-soft: #1d365a;
  --pink-soft: #34233f;
  --green-soft: #1d3b39;
  --warning: #f4b860;
  --danger: #f08aa0;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.28);
  --small-shadow: 0 10px 26px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 22% 8%, rgba(132, 217, 255, 0.45), transparent 28vw),
    radial-gradient(circle at 82% 0%, rgba(199, 175, 255, 0.38), transparent 26vw),
    linear-gradient(135deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

.hao-body {
  background: var(--bg);
}

.hao-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: center;
  min-height: 52px;
  padding: 0 max(18px, calc((100vw - 1460px) / 2));
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.hao-logo {
  display: grid;
  line-height: 1;
}

.hao-logo strong {
  font-size: 26px;
}

.hao-logo span {
  font-size: 12px;
  opacity: 0.9;
}

.hao-topnav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-width: 0;
  overflow-x: auto;
}

.hao-topnav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.92);
  white-space: nowrap;
}

.hao-topnav a.is-active,
.hao-topnav a:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hao-actions button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.hao-shell {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 28px;
  width: min(1460px, 100%);
  margin: 0 auto;
  padding: 24px 18px 48px;
}

.hao-shell.embedded {
  width: 100%;
  margin: 0;
  padding: 0;
}

.hao-rail {
  position: sticky;
  top: 96px;
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding: 4px 0;
}

.hao-category {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  text-align: left;
}

.hao-category.is-active,
.hao-category:hover {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px rgba(47, 128, 237, 0.28);
  font-weight: 900;
}

.hao-category-list {
  display: grid;
  gap: 7px;
}

.hao-main {
  display: grid;
  gap: 28px;
  min-width: 0;
}

.hao-searchbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.hao-searchbar input {
  min-height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-solid);
  box-shadow: 0 8px 22px rgba(82, 102, 130, 0.08);
}

.hao-searchbar a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
}

.hao-section {
  display: grid;
  gap: 14px;
  scroll-margin-top: 160px;
  position: relative;
}

.hao-section-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 13px;
}

.hao-section-head h1,
.hao-section-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.hao-section-head a,
.hao-section-head span {
  color: var(--muted);
  font-size: 13px;
}

.hao-chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.hao-site-groups {
  display: grid;
  gap: 28px;
}

.hao-group {
  position: relative;
  display: grid;
  gap: 14px;
  scroll-margin-top: 160px;
  border-radius: 16px;
}

.hao-section-head,
.hao-card-grid {
  position: relative;
  z-index: 1;
}

.hao-section.is-flashing,
.hao-group.is-flashing {
  animation: none;
}

.hao-section.is-flashing .hao-section-head h1,
.hao-group.is-flashing .hao-section-head h2 {
  animation: heading-flash 1.45s ease;
}

.hao-section.is-flashing .hao-card-grid,
.hao-group.is-flashing .hao-card-grid {
  animation: none;
}

.hao-section.is-flashing::before,
.hao-group.is-flashing::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 34px;
  bottom: -12px;
  left: 50%;
  width: 100vw;
  transform: translateX(-50%);
  pointer-events: none;
  animation: row-backdrop-flash 1.45s ease;
}

@keyframes heading-flash {
  0%,
  100% {
    color: var(--text);
    text-shadow: none;
  }

  28% {
    color: var(--accent);
    text-shadow: none;
  }
}

@keyframes row-backdrop-flash {
  0%,
  100% {
    background: transparent;
    box-shadow: none;
    opacity: 0;
  }

  18%,
  82% {
    background:
      linear-gradient(
        90deg,
        rgba(47, 128, 237, 0) 0%,
        rgba(47, 128, 237, 0.08) 13%,
        rgba(47, 128, 237, 0.16) 28%,
        rgba(47, 128, 237, 0.16) 72%,
        rgba(47, 128, 237, 0.08) 87%,
        rgba(47, 128, 237, 0) 100%
      );
    box-shadow: none;
    opacity: 1;
  }
}

.hao-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px 22px;
}

.hao-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  min-height: 132px;
  align-content: start;
  padding: 24px 26px;
  border: 1px solid rgba(218, 230, 242, 0.72);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: 0 10px 26px rgba(82, 102, 130, 0.055);
}

.hao-card:hover {
  transform: translateY(-2px);
}

.hao-card-title {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.hao-card-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.hao-card-title strong,
.hao-card strong,
.hao-card p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hao-card strong {
  color: #3e4656;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
}

.hao-card p {
  display: -webkit-box;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hao-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hao-card-tags em {
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.directory-insight-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.directory-insight-strip div {
  display: grid;
  gap: 4px;
  min-height: 88px;
  align-content: center;
  padding: 18px 22px;
  border: 1px solid rgba(211, 226, 242, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 26px rgba(68, 96, 132, 0.055);
  backdrop-filter: blur(16px);
}

.directory-insight-strip strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.directory-insight-strip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.hao-category {
  justify-content: space-between;
  gap: 12px;
}

.hao-category span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hao-category small {
  display: inline-grid;
  min-width: 24px;
  height: 22px;
  place-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.08);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.hao-category.is-active small,
.hao-category:hover small {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.hao-card-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hao-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.hao-card-count {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.directory-empty-state {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 260px;
  align-content: center;
  border: 1px dashed rgba(47, 128, 237, 0.26);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(235, 246, 255, 0.72));
  color: var(--muted);
  text-align: center;
}

.directory-empty-state[hidden] {
  display: none;
}

.directory-empty-state strong {
  color: var(--text);
  font-size: 22px;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

.app-frame {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  min-width: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  width: 100%;
  min-width: 0;
  min-height: 74px;
  align-items: center;
  gap: 18px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar);
  backdrop-filter: blur(22px);
  overflow-x: auto;
}

.brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 2px 4px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(47, 128, 237, 0.28);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.side-nav {
  display: flex;
  flex: 0 1 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
}

.side-nav.grouped {
  align-content: center;
}

.side-kicker {
  margin: 0 4px 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.side-nav a {
  display: inline-grid;
  grid-template-columns: 24px max-content;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 12px;
  color: #5c6b83;
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

:root.dark .side-nav a {
  color: var(--muted);
}

.side-nav a span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  background: rgba(47, 128, 237, 0.08);
  color: var(--accent);
}

.side-nav a.is-active,
.side-nav a:hover {
  background: linear-gradient(135deg, var(--accent), #39b8f2);
  color: #fff;
  box-shadow: 0 12px 26px rgba(47, 128, 237, 0.22);
}

.side-nav a.is-active span,
.side-nav a:hover span {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.sidebar-note {
  display: none;
  gap: 8px;
  margin-top: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(255, 255, 255, 0.5));
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.sidebar-note strong {
  color: var(--text);
}

.app-main {
  width: 100%;
  min-width: 0;
}

.app-topbar {
  position: sticky;
  top: 74px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px max(24px, calc((100vw - var(--content-max-width)) / 2));
  border-bottom: 1px solid rgba(223, 235, 247, 0.8);
  background: rgba(247, 251, 255, 0.76);
  backdrop-filter: blur(22px);
}

:root.dark .app-topbar {
  background: rgba(17, 24, 39, 0.72);
}

.top-search {
  display: grid;
  grid-template-columns: 26px minmax(0, 560px);
  align-items: center;
  width: min(660px, 100%);
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  box-shadow: var(--small-shadow);
  color: var(--muted);
}

.top-search input {
  border: 0;
  background: transparent;
}

.top-title {
  display: grid;
  gap: 3px;
}

.top-title span {
  color: var(--muted);
  font-size: 12px;
}

.top-title strong {
  font-size: 18px;
}

.top-actions,
.admin-actions,
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button,
.ghost-action,
.text-button,
.primary-action {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
}

.ghost-action,
.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  font-weight: 800;
}

.primary-action {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 14px 30px rgba(47, 128, 237, 0.24);
}

.danger-action {
  color: var(--danger);
}

.text-button {
  min-height: 32px;
  padding: 0 10px;
  color: var(--accent);
  font-weight: 800;
}

.publish-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  gap: 4px;
  width: min(340px, calc(100vw - 32px));
  padding: 15px 18px;
  border: 0;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.95), rgba(98, 84, 230, 0.95));
  color: #fff;
  box-shadow: none;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.publish-toast[hidden] {
  display: none;
}

.publish-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.publish-toast strong {
  font-size: 15px;
}

.publish-toast span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  line-height: 1.55;
}

.page-content {
  display: grid;
  gap: 18px;
  width: min(var(--content-max-width), calc(100% - (var(--content-gutter) * 2)));
  margin: 0 auto;
  padding: 22px 0 34px;
}

.eyebrow,
label span,
.metric-card span {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.workspace-hero,
.directory-hero,
.quick-panel,
.inspiration-board,
.filter-panel,
.content-board,
.hao-directory,
.directory-channel,
.hot-sites,
.panel-card,
.metric-card {
  border: 1px solid rgba(223, 235, 247, 0.92);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.workspace-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 20px;
  align-items: end;
  min-height: 238px;
  padding: 28px;
  overflow: hidden;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.96), rgba(235, 245, 255, 0.74)),
    linear-gradient(135deg, rgba(47, 128, 237, 0.12), rgba(108, 92, 231, 0.12));
}

.directory-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 20px;
  align-items: end;
  min-height: 220px;
  padding: 28px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.96), rgba(235, 245, 255, 0.74)),
    linear-gradient(135deg, rgba(47, 128, 237, 0.12), rgba(108, 92, 231, 0.12));
}

.directory-hero h1 {
  margin: 7px 0 12px;
  font-size: clamp(36px, 5vw, 66px);
  line-height: 1.02;
}

.directory-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
}

.directory-search-card {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
}

.directory-search-card strong {
  font-size: 42px;
}

.directory-search-card span {
  color: var(--muted);
}

:root.dark .workspace-hero {
  background:
    linear-gradient(110deg, rgba(29, 41, 64, 0.96), rgba(23, 37, 60, 0.78)),
    linear-gradient(135deg, rgba(47, 128, 237, 0.18), rgba(108, 92, 231, 0.18));
}

.workspace-hero h1,
.login-view h1 {
  max-width: 820px;
  margin: 7px 0 12px;
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.04;
}

.workspace-hero p:not(.eyebrow),
.login-view p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.75;
}

.hero-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.hero-kpis div,
.metric-card {
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

:root.dark .hero-kpis div,
:root.dark .metric-card {
  background: rgba(29, 41, 64, 0.78);
}

.hero-kpis strong {
  display: block;
  margin-bottom: 5px;
  font-size: 32px;
}

.hero-kpis span {
  color: var(--muted);
  font-size: 13px;
}

.quick-panel,
.inspiration-board,
.filter-panel,
.content-board,
.hao-directory,
.directory-channel,
.hot-sites,
.panel-card {
  padding: 18px;
}

.panel-heading,
.board-heading,
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-title {
  display: block;
}

.panel-heading h2,
.board-heading h2,
.section-title h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

select,
input,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
  outline: none;
}

input,
textarea,
select {
  padding: 11px 12px;
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus,
.top-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.14);
}

.quick-categories {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 12px;
}

.inspiration-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.inspiration-card {
  position: relative;
  display: grid;
  min-height: 142px;
  align-content: end;
  gap: 8px;
  overflow: hidden;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.86), transparent 18%),
    linear-gradient(135deg, rgba(47, 128, 237, 0.13), rgba(36, 198, 184, 0.1) 48%, rgba(108, 92, 231, 0.14)),
    var(--surface-solid);
  box-shadow: var(--small-shadow);
  color: var(--text);
}

.inspiration-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -40px;
  width: 130px;
  height: 130px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.inspiration-card span,
.inspiration-card strong,
.inspiration-card small {
  position: relative;
  z-index: 1;
}

.inspiration-card span {
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.inspiration-card strong {
  font-size: 20px;
  line-height: 1.2;
}

.inspiration-card small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.inspiration-card.is-featured {
  min-height: 170px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.68), transparent 17%),
    radial-gradient(circle at 86% 16%, rgba(36, 198, 184, 0.24), transparent 22%),
    linear-gradient(135deg, rgba(47, 128, 237, 0.94), rgba(108, 92, 231, 0.9));
  color: #fff;
}

.inspiration-card.is-featured span,
.inspiration-card.is-featured small {
  color: rgba(255, 255, 255, 0.86);
}

.segment-button {
  display: grid;
  gap: 8px;
  min-height: 90px;
  justify-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
  color: var(--text);
  box-shadow: var(--small-shadow);
}

.segment-button::before {
  content: "✦";
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent);
}

.segment-button span:first-child {
  font-weight: 850;
}

.segment-button span:last-child {
  color: var(--muted);
  font-size: 12px;
}

.segment-button.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #7b61ff, #36b8f4);
  color: #fff;
}

.segment-button.is-active::before {
  background: rgba(255, 255, 255, 0.23);
  color: #fff;
}

.segment-button.is-active span:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.hao-directory {
  display: grid;
  gap: 16px;
}

.directory-page .page-content {
  gap: 20px;
}

.directory-channel {
  padding: 14px;
}

.directory-workspace {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.directory-editor {
  position: sticky;
  top: 158px;
}

.directory-form {
  display: grid;
  gap: 12px;
}

.directory-form label,
.publish-login {
  display: grid;
  gap: 7px;
}

.publish-login {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-hint {
  color: var(--muted);
  line-height: 1.55;
}

.directory-content {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.hot-sites {
  display: grid;
  gap: 12px;
}

.hot-site-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.directory-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.directory-tab {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.directory-tab.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: var(--small-shadow);
}

.site-groups {
  display: grid;
  gap: 18px;
}

.site-group {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface-solid) 82%, transparent);
}

.site-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-group-head h3 {
  margin: 0;
  font-size: 19px;
}

.site-group-head span {
  color: var(--muted);
  font-size: 13px;
}

.site-link-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.site-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.site-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--small-shadow);
}

.site-open {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.hot-site-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 96px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface-solid);
  box-shadow: var(--small-shadow);
}

.site-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  background: transparent;
  color: var(--accent);
  font-weight: 900;
}

.site-icon[data-icon-bg="white"],
.hao-card-icon[data-icon-bg="white"],
.site-icon-preview[data-icon-bg="white"],
.icon-bg-option[data-icon-bg="white"] span {
  background: #fff;
  color: var(--accent);
}

.site-icon[data-icon-bg="soft"],
.hao-card-icon[data-icon-bg="soft"],
.site-icon-preview[data-icon-bg="soft"],
.icon-bg-option[data-icon-bg="soft"] span {
  background: var(--accent-soft);
  color: var(--accent);
}

.site-icon[data-icon-bg="dark"],
.hao-card-icon[data-icon-bg="dark"],
.site-icon-preview[data-icon-bg="dark"],
.icon-bg-option[data-icon-bg="dark"] span {
  background: #121a2b;
  color: #fff;
}

.site-icon[data-icon-bg="brand"],
.hao-card-icon[data-icon-bg="brand"],
.site-icon-preview[data-icon-bg="brand"],
.icon-bg-option[data-icon-bg="brand"] span {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.site-icon[data-icon-bg="transparent"],
.hao-card-icon[data-icon-bg="transparent"],
.site-icon-preview[data-icon-bg="transparent"],
.icon-bg-option[data-icon-bg="transparent"] span {
  background: transparent;
  color: var(--accent);
}

.site-icon img,
.hao-card-icon img,
.site-icon-preview img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

.site-icon-tools {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(234, 244, 255, 0.82), rgba(247, 239, 255, 0.74));
}

.site-icon-preview {
  display: grid;
  width: 92px;
  aspect-ratio: 1;
  place-items: center;
  border: 1px solid rgba(47, 128, 237, 0.16);
  border-radius: 18px;
  background: transparent;
  color: var(--accent);
  font-size: 26px;
  font-weight: 900;
  overflow: hidden;
}

.site-icon-fields {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.site-icon-fields input[type="file"] {
  min-height: 44px;
  padding: 9px 12px;
}

.icon-bg-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.icon-bg-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.icon-bg-option span {
  width: 14px;
  height: 14px;
  border: 1px solid rgba(115, 128, 151, 0.28);
  border-radius: 50%;
}

.icon-bg-option.is-active {
  border-color: rgba(47, 128, 237, 0.32);
  background: var(--accent-soft);
  color: var(--accent);
}

.site-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.site-copy strong,
.site-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-copy strong b {
  display: inline-grid;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--pink-soft);
  color: var(--accent-2);
  font-size: 11px;
  font-style: normal;
}

.site-copy small {
  color: var(--muted);
}

.site-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  max-width: 180px;
}

.site-tags em {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-style: normal;
}

.site-edit {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 800;
}

.directory-grid {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.filter-panel {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 18px;
}

.filter-section + .filter-section {
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tag-cloud,
.card-tags,
.option-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-button,
.tag,
.option-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-solid);
  color: var(--muted);
  font-size: 13px;
}

.tag-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 11px;
}

.tag-button strong {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
}

.option-chips {
  margin-top: -2px;
}

.option-chip {
  min-height: 32px;
  padding: 0 11px;
}

.option-chip:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.option-chip.option-action {
  border-style: dashed;
  color: var(--accent);
  font-weight: 850;
}

.option-chip.option-action.danger {
  color: var(--danger);
}

.tag-button.is-active,
.tag,
.option-chip.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}

.option-chips.multi .option-chip.is-active {
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.14), rgba(108, 92, 231, 0.14));
  color: var(--accent-2);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.8fr) minmax(0, 1fr);
  gap: 18px;
}

.insight-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid rgba(223, 235, 247, 0.92);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.insight-card h2 {
  margin: 3px 0 0;
  font-size: 20px;
}

.insight-card p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feature-list {
  display: grid;
  gap: 10px;
}

.feature-list.compact {
  gap: 8px;
}

.mini-link {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
}

.mini-link > span {
  display: grid;
  width: 34px;
  height: 34px;
  grid-row: span 2;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.mini-link strong,
.mini-link small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-link small {
  color: var(--muted);
}

.random-card {
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.1), rgba(108, 92, 231, 0.1)),
    var(--surface);
}

.random-result {
  min-height: 86px;
}

.random-link {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
}

.random-link strong {
  font-size: 18px;
}

.random-link span {
  color: var(--muted);
  line-height: 1.55;
}

.archive-list {
  display: grid;
  gap: 8px;
}

.archive-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-solid);
  color: var(--text);
}

.archive-button strong {
  color: var(--muted);
  font-size: 12px;
}

.archive-button.is-active {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 850;
}

.active-filter-line {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.bookmark-card {
  display: flex;
  min-width: 0;
  min-height: 392px;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
  box-shadow: var(--small-shadow);
}

.bookmark-card.is-featured {
  border-color: rgba(108, 92, 231, 0.32);
}

.card-image {
  display: block;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.18), rgba(108, 92, 231, 0.14)),
    var(--accent-soft);
  background-position: center;
  background-size: cover;
}

.card-image.generated-cover {
  position: relative;
  display: grid;
  align-content: end;
  gap: 6px;
  min-width: 0;
  padding: 20px;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.72) 0 12%, transparent 13%),
    radial-gradient(circle at 82% 72%, rgba(108, 92, 231, 0.2) 0 22%, transparent 23%),
    linear-gradient(135deg, rgba(47, 128, 237, 0.28), rgba(36, 198, 184, 0.12) 46%, rgba(108, 92, 231, 0.2));
  color: #173057;
  overflow: hidden;
}

.card-image.generated-cover::after {
  content: "";
  position: absolute;
  inset: auto -12% -34% 16%;
  height: 70%;
  border-radius: 999px 999px 0 0;
  background: rgba(255, 255, 255, 0.34);
  transform: rotate(-7deg);
}

.cover-mark,
.cover-meta,
.card-image.generated-cover strong,
.card-image.generated-cover small {
  position: relative;
  z-index: 1;
}

.cover-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent);
  font-size: 28px;
  font-weight: 950;
  box-shadow: 0 14px 32px rgba(47, 128, 237, 0.14);
}

.cover-meta {
  color: rgba(23, 48, 87, 0.72);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.card-image.generated-cover strong {
  max-width: 92%;
  overflow: hidden;
  font-size: 24px;
  font-weight: 920;
  line-height: 1.12;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-image.generated-cover small {
  color: rgba(23, 48, 87, 0.68);
  font-size: 13px;
  font-weight: 750;
}

.card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.category-chip {
  max-width: 58%;
  overflow: hidden;
  color: var(--accent-2);
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bookmark-card h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.28;
}

.bookmark-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.visit-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  color: var(--accent);
  font-weight: 850;
}

.note-reader-page {
  width: min(1120px, calc(100% - (var(--content-gutter) * 2)));
}

.note-reader {
  padding: 0;
  overflow: hidden;
}

.note-reader-cover {
  min-height: clamp(240px, 32vw, 430px);
  background-position: center;
  background-size: cover;
}

.note-reader-cover.generated-cover {
  display: grid;
  align-content: end;
  gap: 12px;
  padding: clamp(28px, 5vw, 58px);
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.72) 0 10%, transparent 11%),
    radial-gradient(circle at 82% 68%, rgba(108, 92, 231, 0.2) 0 22%, transparent 23%),
    linear-gradient(135deg, rgba(47, 128, 237, 0.28), rgba(36, 198, 184, 0.12) 46%, rgba(108, 92, 231, 0.2));
  color: #173057;
}

.note-reader-cover strong {
  max-width: 760px;
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 930;
  line-height: 1.04;
}

.note-reader-inner {
  display: grid;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px);
}

.note-reader-inner h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.1;
}

.note-summary {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.75;
}

.note-meta-line,
.note-tag-row,
.note-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.note-meta-line {
  color: var(--muted);
  font-size: 14px;
}

.note-content {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  color: var(--text);
  font-size: 17px;
  line-height: 1.9;
}

.note-content h2,
.note-content h3,
.note-content p,
.note-content blockquote,
.note-content ul,
.note-content ol {
  margin: 0;
}

.note-content h2 {
  margin-top: 18px;
  font-size: 28px;
  line-height: 1.28;
}

.note-content h3 {
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.35;
}

.note-content blockquote {
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--muted);
}

.note-content ul,
.note-content ol {
  padding-left: 1.4em;
}

.note-content a {
  color: var(--accent);
  font-weight: 800;
}

.note-content img {
  width: 100%;
  max-height: 620px;
  object-fit: contain;
  border-radius: 18px;
  background: var(--accent-soft);
}

.note-actions {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--text);
  font-size: 20px;
}

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 26px;
  align-items: center;
  min-height: 430px;
}

.login-form,
.editor,
.admin-items,
.form-row,
.import-control {
  display: grid;
  gap: 12px;
}

.login-form {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
}

.login-form label,
.editor label,
.import-control {
  display: grid;
  gap: 7px;
}

.admin-view {
  display: grid;
  gap: 18px;
}

.admin-mode-tabs {
  display: inline-flex;
  width: fit-content;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--small-shadow);
}

.admin-mode-tabs button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.admin-mode-tabs button.is-active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

.admin-mode-panel {
  display: grid;
  gap: 18px;
}

.admin-hero {
  min-height: 190px;
  align-items: center;
  padding: 30px;
}

.admin-hero h1 {
  max-width: 640px;
  margin: 8px 0 10px;
  font-size: clamp(36px, 4vw, 48px);
  font-weight: 880;
  line-height: 1.08;
  letter-spacing: 0;
}

.admin-hero p:not(.eyebrow) {
  max-width: 600px;
  font-size: 15px;
  line-height: 1.7;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  display: grid;
  gap: 8px;
  min-height: 112px;
}

.metric-card strong {
  overflow-wrap: anywhere;
  font-size: 30px;
}

.status-card strong {
  color: var(--accent);
  font-size: 18px;
}

.admin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.form-row.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-row {
  align-content: end;
  grid-template-columns: 18px 1fr;
  min-height: 66px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-solid);
}

.check-row input {
  width: 18px;
}

.image-preview {
  display: grid;
  min-height: 170px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, var(--accent-soft), var(--pink-soft)),
    var(--surface-solid);
  color: var(--muted);
}

.image-preview img {
  width: 100%;
  height: 100%;
  max-height: 280px;
  object-fit: cover;
}

.article-editor-label {
  gap: 9px;
}

.article-editor-shell {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-solid);
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: rgba(239, 247, 255, 0.74);
}

.editor-toolbar button {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-solid);
  color: var(--text);
  font-weight: 800;
}

.editor-toolbar button:hover {
  border-color: rgba(47, 128, 237, 0.34);
  color: var(--accent);
}

.article-editor {
  min-height: 360px;
  padding: 26px;
  outline: none;
  color: var(--text);
  font-size: 17px;
  line-height: 1.9;
}

.article-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--muted);
}

.article-editor h2,
.article-editor h3,
.article-editor p,
.article-editor blockquote,
.article-editor ul,
.article-editor ol {
  margin: 0 0 16px;
}

.article-editor h2 {
  margin-top: 20px;
  font-size: 28px;
  line-height: 1.28;
}

.article-editor h3 {
  font-size: 22px;
}

.article-editor blockquote {
  padding: 14px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--muted);
}

.article-editor img {
  display: block;
  max-width: 100%;
  max-height: 520px;
  margin: 12px auto;
  border-radius: 16px;
  object-fit: contain;
}

.admin-list {
  align-self: start;
}

.admin-items {
  max-height: 760px;
  overflow: auto;
  padding-right: 4px;
}

.admin-item {
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface-solid);
}

.admin-item strong {
  overflow-wrap: anywhere;
}

.admin-item small {
  color: var(--muted);
}

.admin-item-actions {
  display: flex;
  gap: 8px;
}

.admin-item-actions button,
.admin-item-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 750;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    padding: 12px 16px;
  }

  .side-kicker {
    display: none;
  }

  .app-topbar {
    top: 66px;
  }

  .quick-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .insights-grid {
    grid-template-columns: 1fr;
  }

  .directory-grid,
  .admin-grid,
  .directory-workspace,
  .login-view {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }

  .directory-editor {
    position: static;
  }

  .cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .site-link-list {
    grid-template-columns: 1fr;
  }

  .hot-site-grid {
    grid-template-columns: 1fr;
  }

  .hao-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: static;
    display: flex;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    padding: 12px;
  }

  .brand span:last-child {
    display: none;
  }

  .side-nav {
    display: flex;
    flex: 0 0 auto;
    justify-content: flex-start;
    min-width: max-content;
  }

  .side-nav a,
  .side-nav a:not(.is-active) {
    grid-template-columns: 24px auto;
    gap: 6px;
    min-width: max-content;
    padding: 0 10px;
    font-size: 13px;
  }

  .side-nav a span {
    font-size: 13px;
  }

  .app-topbar,
  .panel-heading,
  .board-heading,
  .workspace-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .app-topbar {
    position: static;
    padding: 12px var(--content-gutter);
  }

  .top-actions,
  .admin-actions,
  .form-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .top-search {
    width: 100%;
  }

  .ghost-action,
  .primary-action,
  .top-actions .icon-button {
    flex: 1;
  }

  .page-content {
    width: calc(100% - (var(--content-gutter) * 2));
    padding: 14px 0 24px;
  }

  .workspace-hero,
  .directory-hero,
  .login-view {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
  }

  .workspace-hero h1,
  .directory-hero h1,
  .login-view h1 {
    font-size: 34px;
  }

  .note-reader-page {
    width: calc(100% - (var(--content-gutter) * 2));
  }

  .note-reader-inner,
  .article-editor {
    padding: 20px;
  }

  .hero-kpis,
  .quick-categories,
  .cards-grid,
  .insights-grid,
  .site-link-list,
  .metrics-grid,
  .form-row.two {
    grid-template-columns: 1fr;
  }

  .site-link {
    grid-template-columns: 1fr;
  }

  .site-tags {
    justify-content: flex-start;
    max-width: none;
  }

  .publish-login,
  .hot-site-card {
    grid-template-columns: 1fr;
  }

  .bookmark-card {
    min-height: 0;
  }

  .hao-topbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 8px 12px;
  }

  .hao-topnav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 8px;
  }

  .hao-shell {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 14px 12px 28px;
  }

  .hao-section.is-flashing::before,
  .hao-group.is-flashing::before {
    left: 50%;
  }

  .publish-toast {
    right: 16px;
    bottom: 16px;
  }

  .hao-rail {
    position: static;
    display: flex;
    overflow-x: auto;
  }

  .hao-category-list {
    display: flex;
    gap: 7px;
  }

  .hao-category {
    min-width: max-content;
  }

  .hao-searchbar {
    grid-template-columns: 1fr;
  }

  .hao-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Bookdock identity layer: calmer, roomier, not a clone */
body.bd-page {
  --book-ink: #10181d;
  --book-panel: rgba(30, 40, 46, 0.86);
  --book-panel-2: rgba(24, 32, 38, 0.9);
  --book-line: rgba(196, 233, 225, 0.11);
  --book-text: #edf7f5;
  --book-muted: #94aaa8;
  --book-mint: #55d6be;
  --book-mint-2: #20a98f;
  --book-coral: #ff7b72;
  --book-gold: #f2c36b;
  background:
    radial-gradient(circle at 18% 4%, rgba(85, 214, 190, 0.18), transparent 310px),
    radial-gradient(circle at 82% 0%, rgba(255, 123, 114, 0.14), transparent 330px),
    linear-gradient(180deg, #12242b 0, #10181d 340px, #10181d 100%) !important;
  color: var(--book-text) !important;
}

body.bd-page::before {
  background:
    linear-gradient(rgba(196, 233, 225, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(196, 233, 225, 0.02) 1px, transparent 1px) !important;
  background-size: 56px 56px !important;
}

body.bd-page .app-sidebar {
  grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) minmax(180px, 260px) !important;
  min-height: 56px !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  background: rgba(14, 26, 32, 0.88) !important;
  border-bottom-color: rgba(196, 233, 225, 0.1) !important;
}

body.bd-page .brand-mark {
  background: linear-gradient(135deg, var(--book-mint), var(--book-coral)) !important;
  box-shadow: 0 10px 28px rgba(85, 214, 190, 0.18) !important;
}

body.bd-page .side-nav.grouped {
  padding: 5px !important;
  border-radius: 16px !important;
  background: rgba(18, 31, 38, 0.76) !important;
  border-color: rgba(196, 233, 225, 0.1) !important;
}

body.bd-page .side-nav a {
  min-height: 34px !important;
  padding-inline: 14px !important;
  border-radius: 12px !important;
  color: rgba(237, 247, 245, 0.7) !important;
}

body.bd-page .side-nav a.is-active,
body.bd-page .side-nav a:hover {
  background: linear-gradient(135deg, var(--book-mint-2), var(--book-mint)) !important;
  color: #071512 !important;
}

body.bd-page .app-topbar {
  top: 56px !important;
  width: min(1240px, calc(100% - 36px)) !important;
  min-height: 56px !important;
}

body.bd-page .page-content {
  width: min(1240px, calc(100% - 36px)) !important;
  gap: 22px !important;
  padding-top: 20px !important;
}

body.bd-page .workspace-hero,
body.bd-page .quick-panel,
body.bd-page .inspiration-board,
body.bd-page .content-board,
body.bd-page .insight-card,
body.bd-page .filter-panel,
body.bd-page .panel-card,
body.bd-page .directory-insight-strip div,
body.bd-page .recent-sites-section,
body.bd-page .hao-section,
body.bd-page .hao-group,
body.bd-page .side-widget,
body.bd-page .bookmark-card,
body.bd-page .hao-card {
  border-color: var(--book-line) !important;
  background: var(--book-panel) !important;
}

body.bd-page .workspace-hero {
  min-height: 210px !important;
  background:
    radial-gradient(circle at 76% 12%, rgba(85, 214, 190, 0.18), transparent 34%),
    radial-gradient(circle at 16% 20%, rgba(255, 123, 114, 0.11), transparent 28%),
    linear-gradient(135deg, rgba(24, 43, 50, 0.96), rgba(20, 30, 36, 0.94)) !important;
}

body.bd-directory .iowen-hero {
  min-height: 285px !important;
}

body.bd-directory .iowen-hero h1 {
  font-size: clamp(38px, 4.5vw, 62px) !important;
}

body.bd-directory .iowen-hero p:not(.eyebrow) {
  max-width: 620px !important;
  margin-inline: auto !important;
}

body.bd-page .eyebrow,
body.bd-directory .hao-section-head span,
body.bd-directory .hao-section-head a,
.side-widget-head span,
.right-tag-cloud span {
  color: var(--book-gold) !important;
}

body.bd-directory .directory-insight-strip {
  width: min(760px, 100%) !important;
  margin: 14px auto 0 !important;
  gap: 12px !important;
}

body.bd-directory .directory-insight-strip div {
  min-height: 72px !important;
  background: rgba(24, 34, 40, 0.82) !important;
}

body.bd-directory .directory-insight-strip strong,
body.bd-page .hero-kpis strong,
body.bd-page .metric-card strong {
  color: var(--book-mint) !important;
}

body.bd-directory .directory-status-filter {
  width: min(820px, 100%) !important;
  padding: 12px !important;
  background: rgba(24, 34, 40, 0.62) !important;
}

body.bd-directory .iowen-quick-board {
  display: none !important;
}

body.bd-directory .iowen-shell {
  grid-template-columns: 158px minmax(0, 1fr) 230px !important;
  gap: 18px !important;
}

body.bd-directory .hao-rail,
body.bd-directory .iowen-rightbar {
  top: 122px !important;
}

body.bd-directory .hao-rail,
body.bd-directory .hao-section,
body.bd-directory .hao-group,
body.bd-directory .side-widget {
  border-radius: 16px !important;
  background: rgba(25, 35, 41, 0.82) !important;
}

body.bd-directory .hao-section,
body.bd-directory .hao-group,
body.bd-directory .side-widget {
  padding: 16px !important;
}

body.bd-directory .hao-main,
body.bd-directory .hao-site-groups {
  gap: 18px !important;
}

body.bd-directory .hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  gap: 12px !important;
}

body.bd-directory .hao-card {
  min-height: 106px !important;
  padding: 15px !important;
  border-radius: 14px !important;
  background: rgba(18, 28, 34, 0.88) !important;
}

body.bd-directory .hao-card:hover {
  border-color: rgba(85, 214, 190, 0.26) !important;
  background: rgba(24, 38, 44, 0.96) !important;
}

body.bd-directory .hao-category.is-active,
body.bd-directory .hao-category:hover,
body.bd-page .primary-action,
body.bd-page .status-filter-chip.is-active,
body.bd-page .admin-mode-tabs button.is-active,
.float-actions button:hover {
  background: linear-gradient(135deg, var(--book-mint), #9ee8d8) !important;
  color: #071512 !important;
}

body.bd-page .ghost-action:hover,
body.bd-page .text-button:hover,
body.bd-page .copy-link:hover,
.quick-command-grid button:hover,
.quick-command-grid a:hover {
  border-color: rgba(85, 214, 190, 0.26) !important;
  background: rgba(85, 214, 190, 0.11) !important;
  color: var(--book-text) !important;
}

body.bd-page .status-chip,
body.bd-page .hao-card-tags em,
body.bd-page .tag,
body.bd-page .category-chip {
  background: rgba(85, 214, 190, 0.12) !important;
  color: #9ee8d8 !important;
}

body.bd-page .status-chip[data-status="todo"] {
  background: rgba(242, 195, 107, 0.14) !important;
  color: var(--book-gold) !important;
}

body.bd-page .status-chip[data-status="favorite"] {
  background: rgba(255, 123, 114, 0.14) !important;
  color: #ffaea8 !important;
}

.profile-banner {
  min-height: 112px !important;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.2), transparent 28%),
    linear-gradient(135deg, rgba(32, 169, 143, 0.92), rgba(255, 123, 114, 0.78)) !important;
}

.right-stat-grid {
  gap: 8px !important;
}

.right-stat-grid div,
.rank-link,
.right-tag-cloud button,
.quick-command-grid button,
.quick-command-grid a,
.float-actions button {
  background: rgba(16, 24, 29, 0.72) !important;
  border-color: rgba(196, 233, 225, 0.1) !important;
}

.right-stat-grid strong {
  color: var(--book-mint) !important;
}

body.bd-home .directory-grid,
body.bd-admin .admin-grid {
  gap: 20px !important;
}

body.bd-page .cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 18px !important;
}

body.bd-page .bookmark-card {
  border-radius: 18px !important;
}

body.bd-page .card-body {
  padding: 16px !important;
}

@media (max-width: 1180px) {
  body.bd-directory .iowen-shell {
    grid-template-columns: 160px minmax(0, 1fr) !important;
  }

  body.bd-directory .iowen-rightbar {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    position: static !important;
  }
}

@media (max-width: 820px) {
  body.bd-page .app-topbar {
    top: 96px !important;
  }

  body.bd-directory .iowen-shell {
    grid-template-columns: 1fr !important;
  }

  body.bd-directory .hao-rail {
    top: 154px !important;
  }
}

/* Final priority layer: nav.iowen.cn inspired layout */
body.bd-page {
  background:
    radial-gradient(circle at 50% -6%, rgba(113, 0, 133, 0.92), transparent 330px),
    linear-gradient(180deg, #3a0048 0, #25002f 150px, #18191d 380px, #18191d 100%) !important;
  color: #f3f4f7;
}

body.bd-page .app-sidebar {
  position: sticky !important;
  top: 0 !important;
  z-index: 80 !important;
  width: 100% !important;
  min-height: 46px !important;
  display: grid !important;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr) minmax(160px, 240px) !important;
  align-items: center !important;
  padding: 5px max(14px, calc((100vw - 1400px) / 2)) !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
  background: rgba(64, 13, 76, .9) !important;
  backdrop-filter: blur(18px) !important;
}

body.bd-page .side-nav.grouped {
  grid-column: 2;
  justify-self: center !important;
  width: max-content !important;
  display: flex !important;
  gap: 8px !important;
  padding: 3px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 12px !important;
  background: rgba(15, 17, 22, .36) !important;
}

body.bd-page .side-nav a {
  min-height: 30px !important;
  display: inline-flex !important;
  gap: 6px !important;
  padding: 0 12px !important;
  border-radius: 9px !important;
  color: rgba(255,255,255,.72) !important;
  font-size: 12px !important;
}

body.bd-page .side-nav a.is-active,
body.bd-page .side-nav a:hover {
  background: linear-gradient(135deg, #ff4f72, #ff8a32) !important;
  color: #fff !important;
}

body.bd-page .app-topbar {
  top: 46px !important;
  width: min(1400px, calc(100% - 28px)) !important;
  min-height: 46px !important;
  margin: 0 auto !important;
  padding: 7px 0 !important;
  border: 0 !important;
  background: transparent !important;
}

body.bd-page .page-content {
  width: min(1360px, calc(100% - 28px)) !important;
  padding-top: 14px !important;
}

body.bd-page .workspace-hero,
body.bd-page .quick-panel,
body.bd-page .inspiration-board,
body.bd-page .content-board,
body.bd-page .insight-card,
body.bd-page .filter-panel,
body.bd-page .panel-card,
body.bd-page .reference-board,
body.bd-page .directory-insight-strip div,
body.bd-page .recent-sites-section,
body.bd-page .hao-section,
body.bd-page .hao-group,
body.bd-page .side-widget,
body.bd-page .bookmark-card,
body.bd-page .hao-card {
  border: 1px solid rgba(255,255,255,.075) !important;
  background: rgba(42,43,49,.88) !important;
  box-shadow: none !important;
}

body.bd-page .workspace-hero {
  border-radius: 14px !important;
  background:
    radial-gradient(circle at 72% 0%, rgba(255,79,114,.22), transparent 34%),
    linear-gradient(135deg, rgba(54,18,62,.95), rgba(38,39,46,.94)) !important;
}

body.bd-directory .iowen-hero {
  min-height: 250px !important;
  display: grid !important;
  place-items: center !important;
  text-align: center !important;
}

body.bd-directory .iowen-hero > div {
  width: min(680px, 100%) !important;
}

body.bd-directory .directory-insight-strip {
  width: min(640px, 100%) !important;
  margin: -42px auto 0 !important;
  grid-template-columns: repeat(4, 1fr) !important;
  position: relative !important;
  z-index: 2 !important;
}

body.bd-directory .directory-status-filter {
  width: min(740px, 100%) !important;
  margin: 0 auto !important;
  justify-content: center !important;
  background: rgba(42,43,49,.78) !important;
}

body.bd-directory .iowen-quick-board {
  grid-template-columns: minmax(170px, .22fr) minmax(0, 1fr) !important;
  padding: 12px !important;
}

body.bd-directory .iowen-shell {
  display: grid !important;
  grid-template-columns: 150px minmax(0, 1fr) 250px !important;
  align-items: start !important;
  gap: 12px !important;
}

body.bd-directory .hao-rail,
body.bd-directory .iowen-rightbar {
  position: sticky !important;
  top: 104px !important;
  max-height: calc(100vh - 116px) !important;
  overflow: auto !important;
}

body.bd-directory .hao-rail {
  padding: 10px !important;
  border: 1px solid rgba(255,255,255,.075) !important;
  border-radius: 10px !important;
  background: rgba(36,37,43,.92) !important;
}

body.bd-directory .hao-category {
  justify-content: space-between !important;
  min-height: 34px !important;
  padding: 0 10px !important;
  border-radius: 7px !important;
  color: #c2c5ce !important;
}

body.bd-directory .hao-category.is-active,
body.bd-directory .hao-category:hover {
  background: linear-gradient(135deg, #ff4f72, #ff8a32) !important;
  color: #fff !important;
}

body.bd-directory .hao-main,
body.bd-directory .hao-site-groups {
  gap: 10px !important;
}

body.bd-directory .hao-section,
body.bd-directory .hao-group,
body.bd-directory .side-widget {
  padding: 12px !important;
  border-radius: 10px !important;
}

body.bd-directory .hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(205px, 1fr)) !important;
  gap: 8px !important;
}

body.bd-directory .hao-card {
  min-height: 82px !important;
  padding: 11px !important;
  border-radius: 9px !important;
  background: rgba(31,32,37,.96) !important;
}

body.bd-directory .hao-card:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(255,138,50,.28) !important;
}

body.bd-directory .hao-card strong,
body.bd-directory .hao-section-head h1,
body.bd-directory .hao-section-head h2,
body.bd-directory .side-widget h2,
body.bd-page .workspace-hero h1,
body.bd-page .bookmark-card h3 a {
  color: #fff !important;
}

body.bd-directory .hao-card p,
body.bd-page .workspace-hero p:not(.eyebrow),
body.bd-page .bookmark-card p {
  color: #aeb2bd !important;
}

body.bd-directory .iowen-rightbar {
  display: grid !important;
  gap: 10px !important;
}

body.bd-page .reference-card,
body.bd-page .inspiration-card,
body.bd-page .segment-button,
body.bd-page .metric-card,
body.bd-page .mini-link,
body.bd-page .random-link,
body.bd-page .admin-item,
body.bd-page .archive-button,
body.bd-page .tag-button {
  border: 1px solid rgba(255,255,255,.065) !important;
  background: rgba(35,36,42,.84) !important;
  color: #f3f4f7 !important;
  box-shadow: none !important;
}

body.bd-page .status-chip,
body.bd-page .hao-card-tags em,
body.bd-page .tag,
body.bd-page .category-chip {
  background: rgba(255,79,114,.14) !important;
  color: #ff8a32 !important;
}

body.bd-page .primary-action,
body.bd-page .status-filter-chip.is-active,
body.bd-page .admin-mode-tabs button.is-active {
  background: linear-gradient(135deg, #ff4f72, #ff8a32) !important;
  color: #fff !important;
}

body.bd-page .top-search,
body.bd-page .hero-search-box,
body.bd-page input,
body.bd-page textarea,
body.bd-page select {
  border-color: rgba(255,255,255,.08) !important;
  background: rgba(24,25,30,.9) !important;
  color: #f3f4f7 !important;
}

body.bd-directory .directory-insight-strip strong,
body.bd-page .hero-kpis strong,
body.bd-page .metric-card strong {
  color: #ff6d8e !important;
}

body.bd-page .reference-card strong,
body.bd-page .reference-copy h2,
body.bd-page .inspiration-card strong,
body.bd-page .segment-button span:first-child,
body.bd-page .section-title h2,
body.bd-page .panel-heading h2,
body.bd-page .board-heading h2,
body.bd-page .filter-section h2,
body.bd-page label span {
  color: #f4f6fb !important;
}

body.bd-page .reference-card small,
body.bd-page .reference-copy p:not(.eyebrow),
body.bd-page .inspiration-card small,
body.bd-page .segment-button span:last-child {
  color: #aeb2bd !important;
}

@media (max-width: 1180px) {
  body.bd-directory .iowen-shell {
    grid-template-columns: 150px minmax(0, 1fr) !important;
  }

  body.bd-directory .iowen-rightbar {
    grid-column: 1 / -1 !important;
    position: static !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 820px) {
  body.bd-page .app-sidebar {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
  }

  body.bd-page .app-topbar {
    top: 86px !important;
  }

  body.bd-directory .iowen-shell,
  body.bd-directory .directory-insight-strip,
  body.bd-directory .iowen-quick-board,
  body.bd-directory .iowen-rightbar {
    grid-template-columns: 1fr !important;
  }

  body.bd-directory .hao-rail {
    position: sticky !important;
    top: 142px !important;
    z-index: 20 !important;
    display: flex !important;
    max-height: none !important;
    overflow-x: auto !important;
  }

  body.bd-directory .hao-category-list {
    display: flex !important;
  }
}

/* Iowen-inspired midnight navigation redesign */
.bd-page {
  color-scheme: dark;
  --bg: #17191d;
  --bg-2: #23252b;
  --sidebar: rgba(41, 42, 48, 0.92);
  --surface: rgba(45, 46, 52, 0.92);
  --surface-solid: #2d2e34;
  --text: #f1f3f6;
  --muted: #9a9da7;
  --line: rgba(255, 255, 255, 0.075);
  --accent: #ff4f72;
  --accent-2: #ff8a32;
  --accent-3: #7c3cff;
  --accent-soft: rgba(255, 79, 114, 0.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
  --small-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  --content-max-width: 1360px;
  --content-gutter: clamp(14px, 3vw, 30px);
  background:
    radial-gradient(circle at 50% -8%, rgba(109, 0, 132, 0.86), transparent 360px),
    linear-gradient(180deg, #390048 0, #260031 170px, #17191d 360px, #17191d 100%);
  font-family: "Microsoft YaHei UI", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.bd-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.bd-page .app-frame {
  display: block;
}

.bd-page .app-sidebar {
  position: sticky;
  top: 0;
  z-index: 70;
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(160px, 240px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 5px max(14px, calc((100vw - 1400px) / 2));
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(65, 17, 76, 0.88);
  backdrop-filter: blur(18px);
}

.bd-page .brand {
  width: max-content;
  grid-template-columns: 34px max-content;
  gap: 9px;
  color: #fff;
}

.bd-page .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #ff7a2f, #ff3e6c);
  box-shadow: 0 8px 24px rgba(255, 73, 96, 0.28);
}

.bd-page .brand small {
  color: rgba(255, 255, 255, 0.62);
}

.bd-page .side-nav.grouped {
  width: max-content;
  justify-self: center;
  display: flex;
  gap: 8px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(17, 19, 24, 0.34);
}

.bd-page .side-nav a {
  min-height: 30px;
  display: inline-flex;
  grid-template-columns: none;
  gap: 6px;
  padding: 0 11px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  white-space: nowrap;
}

.bd-page .side-nav a span {
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.08);
}

.bd-page .side-nav a.is-active,
.bd-page .side-nav a:hover {
  background: linear-gradient(135deg, #ff4f72, #ff8a32);
  color: #fff;
}

.bd-page .app-main {
  min-width: 0;
}

.bd-page .app-topbar {
  position: sticky;
  top: 46px;
  z-index: 60;
  width: min(1400px, calc(100% - 28px));
  min-height: 46px;
  margin: 0 auto;
  padding: 7px 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.bd-page .top-search {
  max-width: 560px;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(34, 36, 42, 0.82);
  box-shadow: none;
}

.bd-page .top-search input,
.bd-page input,
.bd-page textarea,
.bd-page select {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(34, 36, 42, 0.92);
}

.bd-page .top-title span,
.bd-page .top-title strong {
  color: var(--text);
}

.bd-page .page-content {
  width: min(1360px, calc(100% - 28px));
  padding: 14px 0 56px;
  gap: 14px;
}

.bd-page .workspace-hero,
.bd-page .quick-panel,
.bd-page .inspiration-board,
.bd-page .content-board,
.bd-page .insight-card,
.bd-page .filter-panel,
.bd-page .panel-card,
.bd-page .reference-board,
.bd-page .directory-insight-strip div,
.bd-page .recent-sites-section,
.bd-page .hao-section,
.bd-page .hao-group,
.bd-page .side-widget {
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(42, 43, 49, 0.86);
  box-shadow: none;
}

.bd-page .workspace-hero {
  min-height: 150px;
  border-radius: 14px;
  background:
    radial-gradient(circle at 70% 0%, rgba(255, 79, 114, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(53, 18, 62, 0.94), rgba(38, 39, 46, 0.92));
}

.bd-page .workspace-hero h1,
.bd-page .directory-hero h1,
.bd-page .admin-hero h1,
.bd-page .login-view h1 {
  color: #fff;
  letter-spacing: 0;
}

.bd-page .workspace-hero p:not(.eyebrow),
.bd-page .directory-hero p:not(.eyebrow),
.bd-page .admin-hero p:not(.eyebrow),
.bd-page .bookmark-card p,
.bd-page .hao-card p {
  color: #aeb2bd;
}

.bd-page .eyebrow {
  color: #ff8a32;
}

.bd-page .primary-action,
.bd-page .ghost-action,
.bd-page .text-button,
.bd-page .icon-button,
.bd-page .copy-link {
  border: 1px solid rgba(255, 255, 255, 0.09);
  color: #fff;
  background: rgba(45, 46, 52, 0.92);
  box-shadow: none;
}

.bd-page .primary-action,
.bd-page .status-filter-chip.is-active,
.bd-page .admin-mode-tabs button.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #ff4f72, #ff8a32);
  box-shadow: 0 12px 24px rgba(255, 79, 114, 0.18);
}

.bd-page .ghost-action:hover,
.bd-page .text-button:hover,
.bd-page .copy-link:hover {
  border-color: rgba(255, 138, 50, 0.32);
  background: rgba(255, 138, 50, 0.12);
}

.bd-directory .iowen-hero {
  min-height: 246px;
  place-items: center;
  text-align: center;
}

.bd-directory .iowen-hero > div {
  width: min(680px, 100%);
}

.hero-search-panel {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.hero-search-tabs,
.hero-hotwords {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.hero-search-tabs button,
.hero-hotwords button {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.hero-search-tabs button.is-active,
.hero-search-tabs button:hover,
.hero-hotwords button:hover {
  color: #fff;
}

.hero-search-box {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 42px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: rgba(26, 28, 34, 0.94);
}

.hero-search-box span {
  color: #ff8a32;
}

.hero-search-box input {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  outline: none;
}

.bd-directory .directory-insight-strip {
  grid-template-columns: repeat(4, 1fr);
  width: min(640px, 100%);
  margin: -42px auto 0;
  position: relative;
  z-index: 2;
}

.bd-directory .directory-insight-strip div {
  min-height: 58px;
  background: rgba(42, 43, 49, 0.92);
}

.bd-directory .directory-status-filter {
  width: min(740px, 100%);
  margin: 0 auto;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(42, 43, 49, 0.72);
}

.bd-directory .iowen-quick-board {
  grid-template-columns: minmax(170px, 0.22fr) minmax(0, 1fr);
  padding: 12px;
}

.bd-directory .reference-card,
.bd-page .inspiration-card,
.bd-page .segment-button,
.bd-page .metric-card,
.bd-page .mini-link,
.bd-page .random-link,
.bd-page .admin-item,
.bd-page .archive-button,
.bd-page .tag-button {
  border: 1px solid rgba(255, 255, 255, 0.065);
  background: rgba(35, 36, 42, 0.82);
  color: var(--text);
  box-shadow: none;
}

.bd-directory .iowen-shell {
  grid-template-columns: 150px minmax(0, 1fr) 250px;
  align-items: start;
  gap: 12px;
}

.bd-directory .hao-rail,
.bd-directory .iowen-rightbar {
  position: sticky;
  top: 104px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.bd-directory .hao-rail {
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 10px;
  background: rgba(36, 37, 43, 0.9);
}

.bd-directory .hao-category {
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  color: #b8bbc4;
}

.bd-directory .hao-category.is-active,
.bd-directory .hao-category:hover {
  background: linear-gradient(135deg, rgba(255, 79, 114, 0.95), rgba(255, 138, 50, 0.95));
  box-shadow: none;
}

.bd-directory .hao-main,
.bd-directory .hao-site-groups {
  gap: 10px;
}

.bd-directory .hao-section,
.bd-directory .hao-group,
.bd-directory .side-widget {
  padding: 12px;
  border-radius: 10px;
}

.bd-directory .hao-section-head h1,
.bd-directory .hao-section-head h2,
.bd-directory .side-widget h2 {
  color: #fff;
  font-size: 15px;
}

.bd-directory .hao-section-head span,
.bd-directory .hao-section-head a,
.side-widget-head span {
  color: #ff8a32;
}

.bd-directory .hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.bd-directory .hao-card {
  min-height: 86px;
  padding: 11px;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 9px;
  background: rgba(34, 35, 40, 0.94);
  box-shadow: none;
}

.bd-directory .hao-card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 138, 50, 0.24);
  background: rgba(43, 44, 50, 0.98);
}

.bd-directory .hao-card-title {
  grid-template-columns: 32px minmax(0, 1fr);
}

.bd-directory .hao-card-icon,
.rank-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
}

.bd-directory .hao-card strong {
  color: #f5f6f8;
  font-size: 14px;
}

.bd-directory .hao-card p {
  font-size: 12px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
}

.bd-page .status-chip,
.bd-page .hao-card-tags em,
.bd-page .tag,
.bd-page .category-chip {
  background: rgba(255, 79, 114, 0.12);
  color: #ff8a32;
}

.bd-directory .iowen-rightbar {
  display: grid;
  gap: 10px;
}

.profile-banner {
  min-height: 86px;
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 14px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 79, 114, 0.88), rgba(124, 60, 255, 0.74)),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.32), transparent 28%);
}

.profile-banner .brand-mark {
  width: 34px;
  height: 34px;
}

.profile-banner strong {
  color: #fff;
}

.profile-banner small {
  color: rgba(255, 255, 255, 0.78);
}

.right-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.right-stat-grid div {
  min-height: 48px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(24, 25, 30, 0.76);
}

.right-stat-grid strong {
  color: #ff6d8e;
  font-size: 18px;
}

.right-stat-grid span,
.rank-link small,
.empty-hint {
  color: #969aa5;
  font-size: 11px;
}

.side-widget-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.rank-list {
  display: grid;
  gap: 6px;
}

.rank-link {
  display: grid;
  grid-template-columns: 22px 30px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(34, 35, 40, 0.84);
  color: #fff;
}

.rank-link:hover {
  background: rgba(255, 79, 114, 0.12);
}

.rank-num {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: rgba(255, 138, 50, 0.16);
  color: #ff8a32;
  font-size: 11px;
  font-weight: 900;
}

.rank-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.rank-link strong {
  display: block;
  overflow: hidden;
  color: #fff;
  font-size: 12px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.right-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.right-tag-cloud button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  background: rgba(34, 35, 40, 0.84);
  color: #d7dae1;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.right-tag-cloud span {
  color: #ff8a32;
}

.quick-command-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.quick-command-grid button,
.quick-command-grid a {
  min-height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(34, 35, 40, 0.84);
  color: #f4f6fb;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.quick-command-grid button:hover,
.quick-command-grid a:hover {
  border-color: rgba(255, 138, 50, 0.28);
  background: rgba(255, 79, 114, 0.14);
}

.float-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 8px;
}

.float-actions button {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 11px;
  background: rgba(42, 43, 49, 0.92);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(14px);
}

.float-actions button:hover {
  background: linear-gradient(135deg, #ff4f72, #ff8a32);
}

.bd-home .directory-grid {
  grid-template-columns: 230px minmax(0, 1fr);
}

.bd-page .bookmark-card {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(42, 43, 49, 0.9);
  box-shadow: none;
}

.bd-page .card-image.generated-cover {
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 138, 50, 0.22), transparent 28%),
    linear-gradient(135deg, rgba(255, 79, 114, 0.16), rgba(124, 60, 255, 0.18));
}

.bd-admin .admin-grid {
  grid-template-columns: minmax(0, 1fr) 360px;
}

.bd-admin .article-editor-shell,
.bd-admin .admin-list-tools,
.bd-admin .login-form,
.bd-admin .site-icon-tools {
  border-color: rgba(255, 255, 255, 0.075);
  background: rgba(34, 35, 40, 0.8);
}

.bd-admin .article-editor {
  background: rgba(24, 25, 30, 0.78);
}

@keyframes iowen-soft-pulse {
  0% { background: rgba(255, 138, 50, 0.18); }
  100% { background: transparent; }
}

.bd-directory .hao-section.is-flashing::before,
.bd-directory .hao-group.is-flashing::before {
  opacity: 1;
  animation: iowen-soft-pulse 1.4s ease both;
}

@media (max-width: 1180px) {
  .bd-directory .iowen-shell {
    grid-template-columns: 150px minmax(0, 1fr);
  }

  .bd-directory .iowen-rightbar {
    grid-column: 1 / -1;
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bd-admin .admin-grid,
  .bd-home .directory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .bd-page .app-sidebar {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 6px;
  }

  .bd-page .app-topbar {
    top: 86px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bd-page .top-actions {
    justify-content: center;
  }

  .bd-directory .directory-insight-strip,
  .bd-directory .iowen-rightbar,
  .bd-directory .iowen-quick-board {
    grid-template-columns: 1fr 1fr;
  }

  .bd-directory .iowen-shell {
    grid-template-columns: 1fr;
  }

  .bd-directory .hao-rail {
    position: sticky;
    top: 142px;
    z-index: 20;
    display: flex;
    overflow-x: auto;
    max-height: none;
  }

  .bd-directory .hao-category-list {
    display: flex;
  }
}

@media (max-width: 560px) {
  .bd-page .page-content {
    width: calc(100% - 18px);
  }

  .bd-page .side-nav.grouped {
    max-width: 100%;
    overflow-x: auto;
  }

  .bd-directory .directory-insight-strip,
  .bd-directory .iowen-rightbar,
  .bd-directory .iowen-quick-board,
  .right-stat-grid {
    grid-template-columns: 1fr;
  }

  .bd-directory .hao-card-grid,
  .bd-page .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* UI polish layer */
:root {
  --radius-lg: 18px;
  --radius-md: 14px;
  --shadow: 0 18px 42px rgba(64, 92, 130, 0.1);
  --small-shadow: 0 8px 22px rgba(64, 92, 130, 0.075);
  --hairline: rgba(207, 224, 241, 0.86);
}

body {
  background:
    radial-gradient(circle at 18% 8%, rgba(132, 217, 255, 0.34), transparent 26vw),
    radial-gradient(circle at 82% 0%, rgba(199, 175, 255, 0.28), transparent 24vw),
    linear-gradient(135deg, #f0f7ff, #f9fcff 54%, #eef6ff);
}

.app-sidebar {
  min-height: 68px;
  padding: 10px max(22px, calc((100vw - var(--content-max-width)) / 2));
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 10px 30px rgba(70, 98, 132, 0.055);
}

.app-topbar {
  top: 68px;
  min-height: 66px;
  background: rgba(247, 251, 255, 0.82);
  box-shadow: 0 14px 36px rgba(70, 98, 132, 0.055);
}

.brand-mark {
  box-shadow: 0 14px 28px rgba(47, 128, 237, 0.22);
}

.side-nav a,
.ghost-action,
.primary-action,
.text-button,
.icon-button,
.segment-button,
.hao-category,
.hao-card,
.bookmark-card,
.admin-item {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.side-nav a.is-active,
.primary-action {
  box-shadow: 0 12px 26px rgba(47, 128, 237, 0.22);
}

.ghost-action:hover,
.text-button:hover,
.icon-button:hover,
.segment-button:hover,
.hao-card:hover,
.bookmark-card:hover,
.admin-item:hover {
  transform: translateY(-1px);
}

.workspace-hero,
.directory-hero,
.quick-panel,
.inspiration-board,
.filter-panel,
.content-board,
.panel-card,
.metric-card {
  border-color: var(--hairline);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.86);
}

.workspace-hero,
.directory-hero {
  min-height: 220px;
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.96), rgba(236, 247, 255, 0.82)),
    radial-gradient(circle at 84% 22%, rgba(108, 92, 231, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(47, 128, 237, 0.1), rgba(36, 198, 184, 0.08));
}

.workspace-hero h1,
.directory-hero h1,
.login-view h1,
.admin-hero h1 {
  letter-spacing: 0;
  text-wrap: balance;
}

.hero-kpis div,
.metric-card {
  border: 1px solid rgba(223, 235, 247, 0.7);
}

input,
textarea,
select,
.top-search {
  border-color: rgba(211, 226, 242, 0.95);
  box-shadow: none;
}

input:focus,
textarea:focus,
select:focus,
.top-search:focus-within,
.article-editor-shell:focus-within {
  border-color: rgba(47, 128, 237, 0.62);
  box-shadow: 0 0 0 4px rgba(47, 128, 237, 0.11);
}

.cards-grid {
  gap: 18px;
}

.bookmark-card {
  border-color: rgba(216, 231, 246, 0.95);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(68, 96, 132, 0.08);
}

.bookmark-card:hover {
  border-color: rgba(47, 128, 237, 0.28);
  box-shadow: 0 18px 38px rgba(68, 96, 132, 0.12);
}

.card-body {
  padding: 17px;
}

.bookmark-card p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.card-tags {
  min-height: 28px;
}

.hao-shell.embedded {
  gap: 30px;
}

.hao-rail {
  padding: 8px;
  border: 1px solid rgba(216, 231, 246, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(18px);
}

.hao-category.is-active,
.hao-category:hover {
  box-shadow: 0 10px 22px rgba(47, 128, 237, 0.18);
}

.hao-card {
  border-color: rgba(216, 231, 246, 0.78);
  border-radius: 12px;
  box-shadow: 0 10px 26px rgba(68, 96, 132, 0.055);
}

.hao-card:hover {
  border-color: rgba(47, 128, 237, 0.18);
  box-shadow: 0 16px 34px rgba(68, 96, 132, 0.095);
}

.note-reader-page {
  width: min(1040px, calc(100% - (var(--content-gutter) * 2)));
}

.note-reader {
  border-radius: 24px;
  box-shadow: 0 22px 48px rgba(64, 92, 130, 0.11);
}

.note-reader-cover {
  min-height: clamp(260px, 34vw, 460px);
}

.note-reader-inner {
  max-width: 760px;
  padding: clamp(34px, 5.2vw, 64px) clamp(24px, 5vw, 56px);
}

.note-summary {
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.note-content {
  font-size: 18px;
  line-height: 1.92;
}

.admin-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 20px;
}

.article-editor-shell {
  border-color: rgba(211, 226, 242, 0.95);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.editor-toolbar {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px;
  background: linear-gradient(180deg, rgba(244, 249, 255, 0.96), rgba(239, 247, 255, 0.88));
}

.editor-toolbar button {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
}

.article-editor {
  min-height: 430px;
  background:
    linear-gradient(90deg, rgba(47, 128, 237, 0.035) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.98));
}

.admin-list {
  position: sticky;
  top: 154px;
}

.admin-item {
  border-color: rgba(216, 231, 246, 0.92);
}

:root.dark body {
  background:
    radial-gradient(circle at 18% 8%, rgba(73, 132, 198, 0.22), transparent 26vw),
    radial-gradient(circle at 82% 0%, rgba(108, 92, 231, 0.2), transparent 24vw),
    linear-gradient(135deg, var(--bg), var(--bg-2));
}

:root.dark .app-sidebar,
:root.dark .app-topbar,
:root.dark .hao-rail,
:root.dark .workspace-hero,
:root.dark .directory-hero,
:root.dark .quick-panel,
:root.dark .filter-panel,
:root.dark .content-board,
:root.dark .panel-card,
:root.dark .metric-card {
  border-color: rgba(61, 80, 112, 0.82);
}

:root.dark .article-editor {
  background: linear-gradient(180deg, rgba(29, 41, 64, 0.86), rgba(29, 41, 64, 0.98));
}

/* UI polish mobile guard */
@media (max-width: 1180px) {
  .admin-list {
    position: static;
  }

  .inspiration-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-sidebar {
    min-height: auto;
    padding: 12px 14px;
  }

  .app-topbar {
    top: 0;
    min-height: auto;
    padding: 12px var(--content-gutter);
  }

  .workspace-hero,
  .directory-hero,
  .login-view,
  .admin-hero {
    min-height: 0;
  }

  .inspiration-grid {
    grid-template-columns: 1fr;
  }

  .hao-rail {
    position: static;
    display: flex;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
  }

  .note-reader-page {
    width: calc(100% - (var(--content-gutter) * 2));
  }

  .note-reader {
    border-radius: 18px;
  }

  .note-reader-inner,
  .article-editor {
    padding: 20px;
  }

  .article-editor {
    min-height: 320px;
  }
}

/* Bookdock full redesign v1 */
:root {
  --redesign-sidebar: 244px;
  --redesign-bg: #eef5fb;
  --redesign-panel: rgba(255, 255, 255, 0.82);
  --redesign-panel-solid: #ffffff;
  --redesign-line: rgba(202, 218, 235, 0.78);
  --redesign-ink: #1d2738;
  --redesign-soft: #66748a;
}

body {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(238, 245, 251, 0.92) 46%, rgba(232, 241, 250, 0.98)),
    var(--redesign-bg);
}

.app-frame {
  display: grid;
  grid-template-columns: var(--redesign-sidebar) minmax(0, 1fr);
  grid-template-rows: 1fr;
  min-height: 100vh;
  overflow-x: hidden;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-content: start;
  gap: 28px;
  width: var(--redesign-sidebar);
  height: 100vh;
  min-height: 0;
  padding: 28px 22px;
  border-right: 1px solid var(--redesign-line);
  border-bottom: 0;
  background: rgba(250, 253, 255, 0.78);
  box-shadow: 18px 0 40px rgba(74, 100, 132, 0.065);
  backdrop-filter: blur(24px);
  overflow: hidden;
}

.brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background:
    linear-gradient(135deg, #2f80ed, #24c6b8);
  box-shadow: 0 18px 34px rgba(47, 128, 237, 0.22);
}

.brand strong {
  color: var(--redesign-ink);
  font-size: 20px;
  letter-spacing: 0;
}

.brand small {
  color: var(--redesign-soft);
}

.side-nav.grouped {
  display: grid;
  align-content: start;
  justify-content: stretch;
  gap: 10px;
  width: 100%;
}

.side-nav a {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-height: 46px;
  padding: 0 12px;
  border-radius: 14px;
  color: #627087;
  font-size: 15px;
  font-weight: 850;
}

.side-nav a span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 10px;
  background: rgba(47, 128, 237, 0.08);
  color: #2f80ed;
}

.side-nav a.is-active {
  background: linear-gradient(135deg, #2f80ed, #24a7f2);
  color: #fff;
  box-shadow: 0 16px 28px rgba(47, 128, 237, 0.22);
}

.side-nav a.is-active span {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.app-main {
  min-width: 0;
}

.app-topbar {
  top: 0;
  min-height: 76px;
  padding: 16px clamp(24px, 3.4vw, 54px);
  border-bottom: 1px solid rgba(214, 228, 242, 0.72);
  background: rgba(246, 251, 255, 0.78);
  box-shadow: none;
}

.page-content {
  width: min(1480px, calc(100% - 64px));
  gap: 22px;
  padding: 26px 0 46px;
}

.top-search {
  width: min(720px, 100%);
  min-height: 48px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
}

.workspace-hero,
.directory-hero,
.quick-panel,
.inspiration-board,
.filter-panel,
.content-board,
.insight-card,
.panel-card,
.metric-card {
  border: 1px solid rgba(211, 226, 242, 0.82);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 44px rgba(68, 96, 132, 0.08);
  backdrop-filter: blur(18px);
}

.workspace-hero,
.directory-hero {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.78fr);
  min-height: 276px;
  padding: clamp(28px, 3.8vw, 52px);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.96), rgba(237, 247, 255, 0.86) 58%, rgba(229, 243, 250, 0.82)),
    radial-gradient(circle at 86% 20%, rgba(36, 198, 184, 0.24), transparent 22%),
    radial-gradient(circle at 70% 72%, rgba(47, 128, 237, 0.14), transparent 30%);
}

.workspace-hero h1,
.directory-hero h1,
.admin-hero h1,
.login-view h1 {
  max-width: 780px;
  color: var(--redesign-ink);
  font-size: clamp(42px, 5.6vw, 74px);
  font-weight: 940;
  line-height: 0.98;
}

.workspace-hero p:not(.eyebrow),
.directory-hero p:not(.eyebrow),
.admin-hero p:not(.eyebrow) {
  max-width: 660px;
  color: #627087;
  font-size: 17px;
}

.hero-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.hero-kpis div,
.metric-card {
  min-height: 110px;
  border: 1px solid rgba(211, 226, 242, 0.7);
  background: rgba(255, 255, 255, 0.74);
}

.hero-kpis strong,
.metric-card strong {
  color: #21304a;
  font-size: 34px;
}

.quick-panel {
  padding: 22px;
}

.quick-categories {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.segment-button {
  min-height: 104px;
  border-radius: 18px;
  box-shadow: none;
}

.segment-button.is-active {
  background: linear-gradient(135deg, #2f80ed, #24c6b8);
}

.inspiration-grid {
  grid-template-columns: 1.15fr repeat(3, minmax(0, 1fr));
}

.inspiration-card {
  min-height: 160px;
  border-radius: 20px;
  box-shadow: none;
}

.insights-grid {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
}

.insight-card {
  min-height: 260px;
  padding: 22px;
}

.directory-grid {
  grid-template-columns: minmax(230px, 0.28fr) minmax(0, 1fr);
  gap: 22px;
}

.filter-panel {
  position: sticky;
  top: 98px;
  align-self: start;
}

.content-board {
  padding: 22px;
}

.cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px;
}

.bookmark-card {
  min-height: 430px;
  border-radius: 22px;
  box-shadow: none;
}

.bookmark-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(68, 96, 132, 0.11);
}

.card-image {
  aspect-ratio: 1.62;
}

.card-body {
  gap: 14px;
  padding: 20px;
}

.bookmark-card h3 {
  font-size: 22px;
}

.hao-shell.embedded {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 30px;
}

.hao-rail {
  top: 98px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
}

.hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px 24px;
}

.hao-card {
  min-height: 144px;
  padding: 26px;
  border-radius: 18px;
  box-shadow: none;
}

.hao-card:hover {
  transform: translateY(-3px);
}

.admin-grid {
  gap: 24px;
}

.article-editor-shell,
.image-preview,
.site-icon-tools {
  border-radius: 22px;
}

:root.dark .app-sidebar,
:root.dark .app-topbar,
:root.dark .workspace-hero,
:root.dark .directory-hero,
:root.dark .quick-panel,
:root.dark .inspiration-board,
:root.dark .filter-panel,
:root.dark .content-board,
:root.dark .insight-card,
:root.dark .panel-card,
:root.dark .metric-card {
  background: rgba(29, 41, 64, 0.82);
}

@media (max-width: 1180px) {
  .app-frame {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: sticky;
    width: 100%;
    height: auto;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto;
    align-items: center;
    padding: 12px 18px;
    border-right: 0;
    border-bottom: 1px solid var(--redesign-line);
    overflow-x: auto;
  }

  .side-nav.grouped {
    display: flex;
    width: auto;
    min-width: max-content;
  }

  .side-nav a {
    grid-template-columns: 28px max-content;
    min-height: 42px;
  }

  .app-topbar {
    top: 73px;
  }

  .workspace-hero,
  .directory-hero {
    grid-template-columns: 1fr;
  }

  .inspiration-grid,
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-grid {
    grid-template-columns: 1fr;
  }

  .filter-panel {
    position: static;
  }
}

@media (max-width: 760px) {
  .app-sidebar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .app-topbar {
    top: 0;
  }

  .page-content {
    width: calc(100% - 28px);
    padding-top: 16px;
  }

  .workspace-hero h1,
  .directory-hero h1,
  .admin-hero h1,
  .login-view h1 {
    font-size: 38px;
  }

  .hero-kpis,
  .inspiration-grid,
  .insights-grid,
  .hao-shell.embedded {
    grid-template-columns: 1fr;
  }

  .bookmark-card {
    min-height: 0;
  }
}

/* Top navigation refinement */
.app-frame {
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
}

.app-sidebar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
  grid-template-rows: auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  height: auto;
  min-height: 76px;
  padding: 12px clamp(24px, 3.4vw, 54px);
  border-right: 0;
  border-bottom: 1px solid rgba(214, 228, 242, 0.78);
  background: rgba(250, 253, 255, 0.82);
  box-shadow: 0 12px 34px rgba(74, 100, 132, 0.065);
  overflow-x: auto;
}

.brand {
  justify-self: start;
}

.side-nav.grouped {
  display: flex;
  justify-self: center;
  justify-content: center;
  width: auto;
  min-width: max-content;
  gap: 10px;
}

.side-nav a {
  display: inline-grid;
  grid-template-columns: 30px max-content;
  min-height: 44px;
  padding: 0 14px 0 10px;
  white-space: nowrap;
}

.side-nav a span {
  width: 28px;
  height: 28px;
}

.app-topbar {
  top: 76px;
}

.page-content {
  width: min(1480px, calc(100% - 64px));
}

@media (max-width: 1180px) {
  .app-sidebar {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 12px;
    min-height: 0;
  }

  .side-nav.grouped {
    justify-self: start;
    justify-content: flex-start;
    max-width: 100%;
    overflow-x: auto;
  }

  .app-topbar {
    top: 124px;
  }
}

@media (max-width: 760px) {
  .app-sidebar {
    padding: 12px 14px;
  }

  .app-topbar {
    position: sticky;
    top: 0;
  }
}

/* Navigation page productivity polish */
.directory-insight-strip {
  width: 100%;
}

.directory-insight-strip div {
  border-color: rgba(211, 226, 242, 0.82);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: none;
}

.directory-insight-strip div:first-child {
  background:
    linear-gradient(135deg, rgba(47, 128, 237, 0.12), rgba(36, 198, 184, 0.08)),
    rgba(255, 255, 255, 0.86);
}

.hao-category {
  min-height: 42px;
}

.hao-category small {
  flex: 0 0 auto;
}

.recent-sites-section {
  padding: 18px;
  border: 1px solid rgba(211, 226, 242, 0.72);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(239, 248, 255, 0.72));
}

.recent-sites-section .hao-section-head {
  margin-bottom: 2px;
}

.hao-card-footer {
  margin-top: auto;
}

.hao-card-count {
  white-space: nowrap;
}

:root.dark .directory-insight-strip div,
:root.dark .recent-sites-section,
:root.dark .directory-empty-state {
  border-color: rgba(61, 80, 112, 0.82);
  background: rgba(29, 41, 64, 0.78);
}

@media (max-width: 980px) {
  .directory-insight-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .directory-insight-strip {
    grid-template-columns: 1fr;
  }
}


/* Admin site management tools */
.admin-list-tools {
  display: grid;
  gap: 12px;
  margin: 14px 0 16px;
  padding: 14px;
  border: 1px solid rgba(211, 226, 242, 0.82);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(239, 248, 255, 0.72));
}

.list-search-control {
  display: grid;
  gap: 7px;
}

.list-search-control span,
.site-list-summary {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.list-search-control input {
  min-height: 42px;
  border-radius: 14px;
}

.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-button {
  cursor: pointer;
}

.site-list-summary {
  margin: 0;
}

.admin-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 18px;
  border: 1px dashed rgba(47, 128, 237, 0.24);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.admin-empty-state strong {
  color: var(--text);
  font-size: 18px;
}

.admin-empty-state span {
  font-size: 13px;
}

:root.dark .admin-list-tools,
:root.dark .admin-empty-state {
  border-color: rgba(61, 80, 112, 0.82);
  background: rgba(29, 41, 64, 0.78);
}

/* Bookdock clean UI v4 - final visual reset */
:root {
  --bg: #eef3f8;
  --bg-2: #f7fafc;
  --sidebar: rgba(255, 255, 255, 0.94);
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --text: #172033;
  --muted: #69778c;
  --line: #dbe6f1;
  --accent: #2f6df6;
  --accent-2: #1ea7fd;
  --accent-3: #ff6a2a;
  --accent-soft: #edf4ff;
  --shadow: 0 12px 28px rgba(52, 80, 116, 0.08);
  --small-shadow: 0 8px 18px rgba(52, 80, 116, 0.06);
  --content-max-width: 1360px;
  --content-gutter: clamp(16px, 3vw, 36px);
}

body {
  background: linear-gradient(180deg, #f7fbff 0%, #eef3f8 260px, #eef3f8 100%);
  color: var(--text);
  font-family: "Microsoft YaHei UI", "PingFang SC", "HarmonyOS Sans SC", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.app-sidebar {
  min-height: 64px;
  padding: 10px max(18px, calc((100vw - var(--content-max-width)) / 2));
  border-bottom: 1px solid rgba(218, 229, 241, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 20px rgba(42, 68, 99, 0.045);
  backdrop-filter: blur(18px);
}

.brand {
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #2f6df6;
  box-shadow: none;
  font-size: 18px;
}

.brand strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.side-nav.grouped {
  gap: 6px;
  padding: 3px;
  border: 1px solid rgba(219, 230, 241, 0.82);
  border-radius: 999px;
  background: #f3f7fb;
}

.side-nav a {
  grid-template-columns: 24px max-content;
  min-height: 38px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  color: #526075;
  font-size: 14px;
  font-weight: 850;
}

.side-nav a span {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: transparent;
  color: #7a8799;
  font-size: 13px;
}

.side-nav a.is-active {
  background: #2f6df6;
  color: #fff;
  box-shadow: none;
}

.side-nav a.is-active span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.app-topbar {
  top: 64px;
  min-height: 60px;
  padding: 10px max(18px, calc((100vw - var(--content-max-width)) / 2));
  border-bottom: 1px solid rgba(218, 229, 241, 0.78);
  background: rgba(246, 250, 254, 0.88);
  box-shadow: none;
}

.top-search {
  width: min(620px, 100%);
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
}

.top-search input {
  font-size: 14px;
}

.top-actions {
  gap: 8px;
}

.primary-action,
.ghost-action,
.text-button,
.icon-button,
.editor-toolbar button,
.admin-item-actions button {
  border-radius: 999px;
  font-weight: 850;
  box-shadow: none;
}

.primary-action {
  background: #2f6df6;
  color: #fff;
}

.primary-action:hover,
.side-nav a.is-active:hover {
  background: #235ee4;
}

.ghost-action,
.icon-button,
.text-button,
.admin-item-actions button {
  border: 1px solid var(--line);
  background: #fff;
  color: #243149;
}

.text-button {
  color: #2f6df6;
}

.page-content {
  width: min(var(--content-max-width), calc(100% - (var(--content-gutter) * 2)));
  gap: 20px;
  padding: 22px 0 46px;
}

.workspace-hero,
.directory-hero,
.quick-panel,
.inspiration-board,
.filter-panel,
.content-board,
.insight-card,
.panel-card,
.metric-card,
.directory-insight-strip div,
.recent-sites-section,
.admin-list-tools {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.workspace-hero,
.directory-hero {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  min-height: 168px;
  padding: 30px 32px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(239, 246, 255, 0.96)),
    linear-gradient(135deg, rgba(47, 109, 246, 0.1), rgba(30, 167, 253, 0.08));
}

.directory-hero {
  grid-template-columns: 1fr;
}

.eyebrow {
  margin-bottom: 8px;
  color: #58708f;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.08em;
}

.workspace-hero h1,
.directory-hero h1,
.admin-hero h1,
.login-view h1 {
  max-width: 780px;
  margin: 0;
  color: #142039;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 950;
  line-height: 1.08;
}

.workspace-hero p:not(.eyebrow),
.directory-hero p:not(.eyebrow),
.admin-hero p:not(.eyebrow) {
  max-width: 700px;
  margin-top: 12px;
  color: #66758b;
  font-size: 15px;
  line-height: 1.8;
}

.hero-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-kpis div,
.metric-card {
  min-height: 78px;
  padding: 16px;
  border-radius: 14px;
  background: #f7faff;
}

.hero-kpis strong,
.metric-card strong,
.directory-insight-strip strong {
  color: #172033;
  font-size: 28px;
  line-height: 1;
}

.hero-kpis span,
.metric-card span,
.directory-insight-strip span {
  color: #708095;
  font-size: 12px;
  font-weight: 800;
}

.quick-panel,
.inspiration-board,
.content-board,
.insight-card,
.filter-panel,
.panel-card {
  padding: 20px;
}

.panel-heading,
.board-heading,
.hao-section-head {
  align-items: center;
  margin-bottom: 14px;
}

.panel-heading h2,
.board-heading h2,
.hao-section-head h1,
.hao-section-head h2,
.section-title h2,
.filter-section h2 {
  color: #172033;
  font-size: 22px;
  font-weight: 950;
  line-height: 1.2;
}

.quick-categories {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}

.segment-button {
  min-height: 78px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #172033;
}

.segment-button.is-active {
  border-color: #2f6df6;
  background: #2f6df6;
  color: #fff;
}

.inspiration-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.inspiration-card {
  min-height: 118px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f9fbfe;
  box-shadow: none;
}

.inspiration-card.is-featured {
  background: #edf4ff;
}

.inspiration-card span {
  color: #2f6df6;
}

.insights-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.insight-card {
  min-height: 220px;
}

.mini-link,
.random-link,
.archive-button,
.tag-button {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.directory-grid {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 18px;
}

.filter-panel {
  top: 84px;
}

.cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.bookmark-card {
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.bookmark-card:hover,
.hao-card:hover,
.admin-item:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 109, 246, 0.34);
  box-shadow: 0 12px 26px rgba(52, 80, 116, 0.08);
}

.card-image {
  aspect-ratio: 1.78;
  border-radius: 16px 16px 0 0;
}

.generated-cover {
  background:
    linear-gradient(135deg, rgba(47, 109, 246, 0.16), rgba(30, 167, 253, 0.08)),
    #edf4ff !important;
}

.cover-mark {
  background: #2f6df6;
}

.card-body {
  gap: 12px;
  padding: 16px;
}

.bookmark-card h3 {
  font-size: 19px;
  line-height: 1.28;
}

.bookmark-card p {
  color: #65758c;
  font-size: 14px;
  line-height: 1.72;
  -webkit-line-clamp: 3;
}

.tag,
.category-chip,
.hao-card-tags em {
  border-radius: 8px;
  background: #edf4ff;
  color: #526987;
}

.directory-insight-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.directory-insight-strip div {
  min-height: 76px;
  padding: 16px 18px;
}

.hao-shell.embedded {
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 22px;
}

.hao-rail {
  top: 84px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.hao-category {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  color: #5e6e84;
}

.hao-category.is-active,
.hao-category:hover {
  background: #2f6df6;
  color: #fff;
  box-shadow: none;
}

.hao-main,
.hao-site-groups {
  gap: 24px;
}

.hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.hao-card {
  min-height: 126px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: none;
}

.hao-card-title {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
}

.hao-card-icon {
  width: 34px;
  height: 34px;
}

.hao-card strong {
  color: #263044;
  font-size: 17px;
}

.hao-card p {
  color: #6d7b91;
  font-size: 14px;
  line-height: 1.65;
}

.recent-sites-section {
  padding: 18px;
  background: #f8fbff;
}

.admin-grid {
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.72fr);
  gap: 18px;
}

.form-row.two {
  gap: 12px;
}

input,
textarea,
select,
.article-editor-shell,
.site-icon-tools,
.image-preview {
  border-color: var(--line);
  border-radius: 14px;
  background-color: #fff;
}

input,
select {
  min-height: 42px;
}

textarea {
  line-height: 1.72;
}

.article-editor {
  min-height: 360px;
  background: #fff;
}

.editor-toolbar {
  background: #f5f8fc;
}

.admin-list {
  top: 140px;
}

.admin-item {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.admin-list-tools,
.directory-empty-state,
.admin-empty-state {
  background: #f8fbff;
}

.note-reader-page {
  width: min(960px, calc(100% - (var(--content-gutter) * 2)));
}

.note-reader {
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: none;
}

.note-reader-cover {
  min-height: clamp(220px, 28vw, 360px);
}

.note-content {
  font-size: 17px;
}

:root.dark body {
  background: #101827;
}

:root.dark .app-sidebar,
:root.dark .app-topbar,
:root.dark .workspace-hero,
:root.dark .directory-hero,
:root.dark .quick-panel,
:root.dark .inspiration-board,
:root.dark .filter-panel,
:root.dark .content-board,
:root.dark .insight-card,
:root.dark .panel-card,
:root.dark .metric-card,
:root.dark .directory-insight-strip div,
:root.dark .hao-rail,
:root.dark .hao-card,
:root.dark .bookmark-card,
:root.dark .admin-item,
:root.dark .admin-list-tools,
:root.dark .recent-sites-section {
  border-color: #2a3a55;
  background: #172238;
}

:root.dark .side-nav.grouped,
:root.dark .hero-kpis div,
:root.dark .inspiration-card,
:root.dark .mini-link,
:root.dark .random-link,
:root.dark .archive-button,
:root.dark .tag-button,
:root.dark .directory-empty-state,
:root.dark .admin-empty-state {
  border-color: #2a3a55;
  background: #111b2d;
}

:root.dark input,
:root.dark textarea,
:root.dark select,
:root.dark .top-search,
:root.dark .article-editor,
:root.dark .article-editor-shell,
:root.dark .site-icon-tools {
  border-color: #2a3a55;
  background: #111b2d;
}

@media (max-width: 1180px) {
  .app-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 10px 16px;
  }

  .app-topbar {
    top: 116px;
  }

  .workspace-hero,
  .directory-hero,
  .admin-hero,
  .login-view {
    grid-template-columns: 1fr;
  }

  .inspiration-grid,
  .insights-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .directory-grid,
  .admin-grid,
  .hao-shell.embedded {
    grid-template-columns: 1fr;
  }

  .filter-panel,
  .hao-rail,
  .admin-list {
    position: static;
  }

  .hao-rail {
    display: flex;
    overflow-x: auto;
  }
}

@media (max-width: 760px) {
  .app-sidebar {
    grid-template-columns: 1fr;
  }

  .side-nav.grouped {
    max-width: 100%;
    overflow-x: auto;
    border-radius: 14px;
  }

  .app-topbar {
    top: 0;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .top-actions {
    width: 100%;
    overflow-x: auto;
  }

  .page-content {
    width: calc(100% - 24px);
    padding-top: 14px;
  }

  .workspace-hero,
  .directory-hero,
  .quick-panel,
  .inspiration-board,
  .content-board,
  .filter-panel,
  .insight-card,
  .panel-card {
    padding: 16px;
    border-radius: 14px;
  }

  .workspace-hero h1,
  .directory-hero h1,
  .admin-hero h1,
  .login-view h1 {
    font-size: 32px;
  }

  .hero-kpis,
  .directory-insight-strip,
  .inspiration-grid,
  .insights-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid,
  .hao-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Clean UI v4 admin tightening */
.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  align-items: center;
  min-height: 260px;
  padding: 30px 32px;
}

.login-view p:not(.eyebrow) {
  max-width: 620px;
  color: #66758b;
  font-size: 15px;
  line-height: 1.8;
}

.login-form {
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
  box-shadow: none;
}

.login-form label span {
  color: #5e6e84;
  font-size: 13px;
  font-weight: 850;
}

.admin-hero {
  min-height: 178px;
  padding: 30px 32px;
}

.admin-actions {
  gap: 10px;
}

.admin-mode-tabs {
  width: max-content;
  max-width: 100%;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f3f7fb;
}

.admin-mode-tabs button {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: transparent;
  color: #526075;
  box-shadow: none;
}

.admin-mode-tabs button.is-active {
  background: #2f6df6;
  color: #fff;
  box-shadow: none;
}

.top-title span {
  color: #6c7b90;
}

.top-title strong {
  color: #172033;
}

@media (max-width: 760px) {
  .login-view {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 18px;
  }

  .admin-mode-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .admin-mode-tabs button {
    flex: 1 0 auto;
  }
}

/* Online reference inspired refinements */
.reference-board {
  display: grid;
  grid-template-columns: minmax(240px, 0.36fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.reference-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  padding: 4px 6px;
}

.reference-copy h2 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  font-weight: 950;
}

.reference-copy p:not(.eyebrow) {
  margin: 0;
  color: #69778c;
  font-size: 14px;
  line-height: 1.75;
}

.reference-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.reference-card {
  display: grid;
  gap: 8px;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbff;
}

.reference-card:hover {
  transform: translateY(-2px);
  border-color: rgba(47, 109, 246, 0.34);
  box-shadow: 0 12px 26px rgba(52, 80, 116, 0.08);
}

.reference-card span {
  width: max-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf4ff;
  color: #2f6df6;
  font-size: 12px;
  font-weight: 900;
}

.reference-card strong {
  color: #1d2738;
  font-size: 18px;
  font-weight: 950;
}

.reference-card small {
  color: #69778c;
  font-size: 13px;
  line-height: 1.55;
}

.compact-density .hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.compact-density .hao-main,
.compact-density .hao-site-groups {
  gap: 18px;
}

.compact-density .hao-card {
  min-height: 104px;
  padding: 16px;
  gap: 10px;
}

.compact-density .hao-card p {
  -webkit-line-clamp: 1;
  font-size: 13px;
}

.compact-density .hao-card-title {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
}

.compact-density .hao-card-icon {
  width: 28px;
  height: 28px;
}

.compact-density .hao-card strong {
  font-size: 16px;
}

.compact-density .directory-insight-strip div {
  min-height: 62px;
  padding: 12px 14px;
}

.compact-density .reference-board,
.compact-density .recent-sites-section {
  padding: 14px;
}

:root.dark .reference-board,
:root.dark .reference-card {
  border-color: #2a3a55;
  background: #172238;
}

:root.dark .reference-card span {
  background: #1d365a;
  color: #73a9ff;
}

@media (max-width: 1180px) {
  .reference-board {
    grid-template-columns: 1fr;
  }

  .reference-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .reference-links {
    grid-template-columns: 1fr;
  }
}

/* Bookdock compact elegant pass */
:root {
  --content-max-width: 1280px;
  --content-gutter: clamp(14px, 2.6vw, 30px);
  --line: #dfe8f1;
  --accent-soft: #f0f6ff;
}

body {
  background: linear-gradient(180deg, #f8fbff 0%, #eef3f8 180px, #eef3f8 100%);
}

.app-sidebar {
  min-height: 58px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.brand {
  grid-template-columns: 34px minmax(0, 1fr);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 16px;
}

.brand strong {
  font-size: 17px;
}

.side-nav.grouped {
  gap: 4px;
  padding: 3px;
}

.side-nav a {
  grid-template-columns: 20px max-content;
  min-height: 34px;
  padding: 0 12px 0 9px;
  font-size: 13px;
}

.side-nav a span {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

.app-topbar {
  top: 58px;
  min-height: 52px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.top-search {
  min-height: 38px;
}

.primary-action,
.ghost-action,
.text-button,
.icon-button {
  min-height: 36px;
  padding-left: 14px;
  padding-right: 14px;
  font-size: 13px;
}

.icon-button {
  width: 36px;
  padding: 0;
}

.page-content {
  gap: 14px;
  padding-top: 16px;
  padding-bottom: 36px;
}

.workspace-hero,
.directory-hero,
.admin-hero {
  min-height: 118px;
  padding: 22px 24px;
  border-radius: 14px;
  background: linear-gradient(90deg, #fff, #f3f8ff);
}

.workspace-hero h1,
.directory-hero h1,
.admin-hero h1,
.login-view h1 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.12;
}

.workspace-hero p:not(.eyebrow),
.directory-hero p:not(.eyebrow),
.admin-hero p:not(.eyebrow) {
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.65;
}

.eyebrow {
  margin-bottom: 5px;
  font-size: 10px;
}

.hero-kpis {
  gap: 8px;
}

.hero-kpis div,
.metric-card,
.directory-insight-strip div {
  min-height: 58px;
  padding: 12px 14px;
  border-radius: 12px;
}

.hero-kpis strong,
.metric-card strong,
.directory-insight-strip strong {
  font-size: 24px;
}

.quick-panel,
.inspiration-board,
.content-board,
.insight-card,
.filter-panel,
.panel-card,
.reference-board,
.recent-sites-section {
  padding: 14px;
  border-radius: 14px;
}

.panel-heading,
.board-heading,
.hao-section-head {
  margin-bottom: 10px;
}

.panel-heading h2,
.board-heading h2,
.hao-section-head h1,
.hao-section-head h2,
.section-title h2,
.filter-section h2,
.reference-copy h2 {
  font-size: 19px;
}

.quick-categories {
  grid-template-columns: repeat(auto-fit, minmax(124px, 1fr));
  gap: 8px;
}

.segment-button {
  min-height: 58px;
  padding: 11px 12px;
  border-radius: 12px;
}

.segment-button span:first-child {
  font-size: 14px;
}

.segment-button span:last-child {
  font-size: 12px;
}

.inspiration-grid,
.reference-links {
  gap: 8px;
}

.inspiration-card,
.reference-card {
  min-height: 86px;
  padding: 13px 14px;
  border-radius: 12px;
}

.inspiration-card strong,
.reference-card strong {
  font-size: 16px;
}

.inspiration-card small,
.reference-card small,
.reference-copy p:not(.eyebrow) {
  font-size: 12px;
  line-height: 1.5;
}

.reference-board {
  grid-template-columns: minmax(200px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
}

.reference-card span {
  padding: 3px 7px;
  font-size: 11px;
}

.directory-insight-strip {
  gap: 8px;
}

.hao-shell.embedded {
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
}

.hao-rail {
  top: 74px;
  padding: 8px;
  border-radius: 14px;
}

.hao-category {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 13px;
}

.hao-category small {
  min-width: 20px;
  height: 19px;
  padding: 0 6px;
  font-size: 11px;
}

.hao-main,
.hao-site-groups {
  gap: 16px;
}

.hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  gap: 10px;
}

.hao-card {
  min-height: 104px;
  gap: 9px;
  padding: 15px;
  border-radius: 12px;
}

.hao-card-title {
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
}

.hao-card-icon {
  width: 28px;
  height: 28px;
  font-size: 13px;
}

.hao-card strong {
  font-size: 16px;
}

.hao-card p {
  font-size: 13px;
  line-height: 1.48;
  -webkit-line-clamp: 2;
}

.hao-card-tags em,
.tag,
.category-chip {
  padding: 3px 7px;
  font-size: 11px;
}

.compact-density .hao-card-grid {
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.compact-density .hao-card {
  min-height: 86px;
  padding: 12px;
  gap: 7px;
}

.compact-density .hao-card p {
  -webkit-line-clamp: 1;
}

.compact-density .hao-card-footer {
  min-height: 20px;
}

.insights-grid,
.directory-grid {
  gap: 12px;
}

.insight-card {
  min-height: 172px;
}

.mini-link,
.random-link,
.archive-button,
.tag-button {
  border-radius: 10px;
}

.filter-panel {
  top: 74px;
}

.cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.bookmark-card {
  border-radius: 14px;
}

.card-image {
  aspect-ratio: 1.95;
}

.card-body {
  gap: 9px;
  padding: 13px;
}

.bookmark-card h3 {
  font-size: 17px;
}

.bookmark-card p {
  font-size: 13px;
  line-height: 1.58;
  -webkit-line-clamp: 2;
}

.card-tags {
  min-height: 22px;
}

.visit-link {
  font-size: 13px;
}

.admin-grid {
  gap: 14px;
}

.login-view {
  min-height: 220px;
  padding: 22px 24px;
}

.login-form,
.admin-list-tools {
  padding: 13px;
  border-radius: 14px;
}

input,
select {
  min-height: 38px;
}

textarea {
  min-height: 92px;
}

.article-editor {
  min-height: 300px;
}

@media (max-width: 1180px) {
  .app-topbar {
    top: 108px;
  }

  .hao-shell.embedded,
  .reference-board {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-content {
    width: calc(100% - 20px);
    gap: 12px;
  }

  .workspace-hero,
  .directory-hero,
  .admin-hero,
  .quick-panel,
  .inspiration-board,
  .content-board,
  .filter-panel,
  .insight-card,
  .panel-card,
  .reference-board {
    padding: 13px;
  }

  .workspace-hero h1,
  .directory-hero h1,
  .admin-hero h1,
  .login-view h1 {
    font-size: 27px;
  }
}

/* Status, inbox and copy actions */
.status-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.directory-status-filter {
  margin-top: -4px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.status-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: #64748b;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.status-filter-chip strong {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #edf6ff;
  color: #2f7cf6;
  font-size: 11px;
}

.status-filter-chip.is-active {
  border-color: transparent;
  background: linear-gradient(135deg, #2f7cf6, #6b5cf6);
  color: #fff;
  box-shadow: 0 12px 24px rgba(47, 124, 246, 0.18);
}

.status-filter-chip.is-active strong {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef6ff;
  color: #2f7cf6;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.status-chip[data-status="todo"] {
  background: #fff7ed;
  color: #f97316;
}

.status-chip[data-status="done"] {
  background: #ecfdf5;
  color: #0f9f6e;
}

.status-chip[data-status="favorite"] {
  background: #f1efff;
  color: #6b5cf6;
}

.status-chip[data-status="archived"] {
  background: #f1f5f9;
  color: #64748b;
}

.card-actions,
.hao-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copy-link {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(47, 124, 246, 0.18);
  border-radius: 999px;
  background: #f8fbff;
  color: #2f7cf6;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.copy-link:hover {
  border-color: rgba(47, 124, 246, 0.35);
  background: #eef6ff;
}

.hao-card-main {
  display: grid;
  gap: 9px;
  color: inherit;
  text-decoration: none;
}

.hao-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hao-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.hao-copy {
  min-height: 24px;
  padding-inline: 9px;
  font-size: 11px;
}

.mini-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  transform: translateY(10px);
  opacity: 0;
  pointer-events: none;
  padding: 10px 14px;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.mini-toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

:root.dark .directory-status-filter,
:root.dark .status-filter-chip,
:root.dark .copy-link {
  background: rgba(15, 23, 42, 0.72);
}

@media (max-width: 760px) {
  .status-filter-row {
    gap: 6px;
  }

  .status-filter-chip {
    min-height: 30px;
    padding-inline: 10px;
    font-size: 12px;
  }

  .card-actions,
  .hao-card-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Bookdock Atelier UI refresh, 2026-07-31.
   Direction: editorial personal library, calmer than dashboard templates. */
:root {
  --atelier-bg: #f3efe5;
  --atelier-paper: #fffdf7;
  --atelier-paper-2: #f9f5ec;
  --atelier-ink: #17201d;
  --atelier-muted: #6f7a73;
  --atelier-line: rgba(23, 32, 29, 0.12);
  --atelier-soft-line: rgba(23, 32, 29, 0.08);
  --atelier-accent: #139f84;
  --atelier-accent-2: #e58a2a;
  --atelier-accent-3: #3b6f92;
  --atelier-shadow: 0 24px 70px rgba(36, 48, 42, 0.11);
  --atelier-small-shadow: 0 10px 28px rgba(36, 48, 42, 0.08);
  --atelier-radius: 18px;
}

:root.dark {
  --atelier-bg: #101615;
  --atelier-paper: #17201d;
  --atelier-paper-2: #1d2925;
  --atelier-ink: #f4f0e7;
  --atelier-muted: #9eb0a7;
  --atelier-line: rgba(236, 244, 239, 0.13);
  --atelier-soft-line: rgba(236, 244, 239, 0.08);
  --atelier-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  --atelier-small-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
}

body.bd-page {
  min-height: 100vh;
  color: var(--atelier-ink);
  background:
    linear-gradient(90deg, rgba(19, 159, 132, 0.045) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(180deg, rgba(229, 138, 42, 0.035) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(180deg, var(--atelier-bg), color-mix(in srgb, var(--atelier-bg) 88%, #ffffff));
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body.bd-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    repeating-linear-gradient(0deg, rgba(23, 32, 29, 0.035), rgba(23, 32, 29, 0.035) 1px, transparent 1px, transparent 4px);
  mix-blend-mode: multiply;
}

:root.dark body.bd-page::before {
  opacity: 0.12;
  mix-blend-mode: screen;
}

body.bd-page .app-frame {
  display: block;
  min-height: 100vh;
  background: transparent;
}

body.bd-page .app-sidebar {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  min-height: 70px;
  padding: 12px clamp(18px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto minmax(170px, 1fr);
  align-items: center;
  gap: 18px;
  border: 0;
  border-bottom: 1px solid var(--atelier-line);
  background: color-mix(in srgb, var(--atelier-paper) 88%, transparent);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.35) inset;
}

body.bd-page .brand {
  width: fit-content;
  color: var(--atelier-ink);
}

body.bd-page .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  color: #fffdf7;
  background:
    linear-gradient(135deg, #17201d, #31544b 55%, var(--atelier-accent));
  box-shadow: none;
}

body.bd-page .brand strong {
  font-size: 18px;
  letter-spacing: 0;
}

body.bd-page .brand small {
  color: var(--atelier-muted);
}

body.bd-page .side-nav.grouped {
  grid-column: 2;
  justify-self: center;
  width: auto;
  margin: 0;
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--atelier-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--atelier-paper-2) 88%, transparent);
}

body.bd-page .side-nav.grouped a {
  min-height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  color: var(--atelier-muted);
  font-weight: 800;
}

body.bd-page .side-nav.grouped a span {
  width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 7px;
  background: color-mix(in srgb, var(--atelier-accent) 12%, transparent);
  color: var(--atelier-accent);
}

body.bd-page .side-nav.grouped a.is-active,
body.bd-page .side-nav.grouped a:hover {
  color: #fffdf7;
  background: var(--atelier-ink);
}

body.bd-page .side-nav.grouped a.is-active span,
body.bd-page .side-nav.grouped a:hover span {
  background: rgba(255, 255, 255, 0.16);
  color: #fffdf7;
}

body.bd-page .app-main {
  min-width: 0;
}

body.bd-page .app-topbar {
  max-width: 1320px;
  min-height: 58px;
  margin: 20px auto 0;
  padding: 8px;
  border: 1px solid var(--atelier-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--atelier-paper) 92%, transparent);
  box-shadow: var(--atelier-small-shadow);
}

body.bd-page .top-search {
  max-width: 620px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--atelier-paper-2);
  box-shadow: inset 0 0 0 1px var(--atelier-soft-line);
}

body.bd-page .top-search input {
  color: var(--atelier-ink);
}

body.bd-page .top-actions {
  gap: 8px;
}

body.bd-page .primary-action,
body.bd-page .ghost-action,
body.bd-page .text-button,
body.bd-page .icon-button,
body.bd-page button {
  letter-spacing: 0;
}

body.bd-page .primary-action {
  border: 1px solid color-mix(in srgb, var(--atelier-accent) 72%, #000);
  color: #fffdf7;
  background: var(--atelier-accent);
  box-shadow: 0 10px 24px rgba(19, 159, 132, 0.18);
}

body.bd-page .ghost-action,
body.bd-page .icon-button,
body.bd-page .text-button {
  border: 1px solid var(--atelier-line);
  color: var(--atelier-ink);
  background: var(--atelier-paper);
  box-shadow: none;
}

body.bd-page .page-content {
  width: min(100% - 48px, 1320px);
  margin: 0 auto;
  padding: 28px 0 72px;
}

body.bd-page .workspace-hero,
body.bd-page .directory-hero,
body.bd-page .admin-hero {
  position: relative;
  overflow: hidden;
  min-height: 0;
  padding: clamp(34px, 5vw, 58px);
  border: 1px solid var(--atelier-line);
  border-radius: 26px;
  color: var(--atelier-ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--atelier-paper) 95%, #ffffff), color-mix(in srgb, var(--atelier-paper-2) 90%, var(--atelier-accent) 10%)),
    var(--atelier-paper);
  box-shadow: var(--atelier-shadow);
}

body.bd-page .workspace-hero::after,
body.bd-page .directory-hero::after,
body.bd-page .admin-hero::after {
  content: "";
  position: absolute;
  right: 28px;
  top: 28px;
  width: min(40vw, 360px);
  height: 100%;
  opacity: 0.32;
  background:
    linear-gradient(120deg, transparent 0 42%, color-mix(in srgb, var(--atelier-accent) 42%, transparent) 42% 44%, transparent 44% 100%),
    repeating-linear-gradient(135deg, color-mix(in srgb, var(--atelier-ink) 10%, transparent) 0 1px, transparent 1px 14px);
  mask-image: linear-gradient(90deg, transparent, #000 35%, transparent);
}

body.bd-page .workspace-hero h1,
body.bd-page .directory-hero h1,
body.bd-page .admin-hero h1 {
  max-width: 780px;
  margin: 8px 0 14px;
  color: var(--atelier-ink);
  font-size: clamp(42px, 6vw, 82px);
  line-height: 0.96;
  letter-spacing: 0;
}

body.bd-page .workspace-hero p:not(.eyebrow),
body.bd-page .directory-hero p:not(.eyebrow),
body.bd-page .admin-hero p:not(.eyebrow) {
  max-width: 760px;
  color: var(--atelier-muted);
  font-size: clamp(16px, 1.8vw, 19px);
  line-height: 1.8;
}

body.bd-page .eyebrow {
  color: var(--atelier-accent-2);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

body.bd-page .hero-kpis,
body.bd-page .directory-insight-strip,
body.bd-page .metrics-grid {
  gap: 12px;
}

body.bd-page .hero-kpis div,
body.bd-page .directory-insight-strip div,
body.bd-page .metric-card {
  border: 1px solid var(--atelier-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--atelier-paper) 82%, transparent);
  box-shadow: none;
}

body.bd-page .hero-kpis strong,
body.bd-page .directory-insight-strip strong,
body.bd-page .metric-card strong {
  color: var(--atelier-accent);
}

body.bd-home .quick-panel,
body.bd-home .insight-card,
body.bd-home .filter-panel,
body.bd-home .content-board,
body.bd-directory .hao-section,
body.bd-directory .hao-group,
body.bd-directory .side-widget,
body.bd-admin .panel-card,
body.bd-admin .admin-list-tools,
body.bd-admin .site-icon-tools {
  border: 1px solid var(--atelier-line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--atelier-paper) 94%, transparent);
  box-shadow: var(--atelier-small-shadow);
}

body.bd-home .inspiration-board,
body.bd-directory .reference-board {
  display: none;
}

body.bd-home .directory-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.28fr) minmax(0, 1fr);
  gap: 20px;
}

body.bd-home .filter-panel {
  position: sticky;
  top: 98px;
  align-self: start;
  padding: 18px;
}

body.bd-home .content-board {
  padding: 22px;
}

body.bd-home .cards-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

body.bd-home .bookmark-card {
  overflow: hidden;
  border: 1px solid var(--atelier-line);
  border-radius: 18px;
  background: var(--atelier-paper);
  box-shadow: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

body.bd-home .bookmark-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--atelier-accent) 42%, var(--atelier-line));
  box-shadow: var(--atelier-small-shadow);
}

body.bd-home .card-image {
  min-height: 178px;
  border-radius: 0;
  background-color: color-mix(in srgb, var(--atelier-paper-2) 86%, var(--atelier-accent) 14%);
}

body.bd-home .card-image.generated-cover {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 10px;
  padding: 18px;
  color: var(--atelier-ink);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--atelier-paper-2) 90%, var(--atelier-accent) 10%), color-mix(in srgb, var(--atelier-paper) 80%, var(--atelier-accent-2) 20%));
}

body.bd-home .cover-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--atelier-line);
  border-radius: 50%;
  color: var(--atelier-paper);
  background: var(--atelier-ink);
  font-size: 24px;
  font-weight: 950;
}

body.bd-home .cover-meta {
  align-self: end;
  width: fit-content;
  padding: 5px 9px;
  border: 1px solid var(--atelier-line);
  border-radius: 999px;
  color: var(--atelier-muted);
  background: rgba(255, 255, 255, 0.38);
  font-size: 12px;
  font-weight: 850;
}

body.bd-home .card-image.generated-cover strong {
  color: var(--atelier-ink);
  font-size: 24px;
  line-height: 1.15;
}

body.bd-home .card-image.generated-cover small {
  color: var(--atelier-muted);
}

body.bd-home .card-body {
  padding: 18px;
}

body.bd-home .bookmark-card h3 {
  font-size: 22px;
  line-height: 1.2;
}

body.bd-home .bookmark-card p {
  color: var(--atelier-muted);
  line-height: 1.72;
}

body.bd-page .segment-button,
body.bd-page .status-filter-chip,
body.bd-page .tag-button,
body.bd-page .archive-button,
body.bd-directory .hao-category,
body.bd-directory .hero-search-tabs button,
body.bd-directory .hero-hotwords button,
body.bd-admin .option-chip,
body.bd-admin .admin-mode-tabs button {
  border: 1px solid var(--atelier-line);
  border-radius: 999px;
  color: var(--atelier-muted);
  background: var(--atelier-paper);
  box-shadow: none;
}

body.bd-page .segment-button.is-active,
body.bd-page .status-filter-chip.is-active,
body.bd-page .tag-button.is-active,
body.bd-page .archive-button.is-active,
body.bd-directory .hao-category.is-active,
body.bd-directory .hero-search-tabs button.is-active,
body.bd-directory .hero-hotwords button:hover,
body.bd-admin .option-chip.is-active,
body.bd-admin .admin-mode-tabs button.is-active {
  border-color: var(--atelier-ink);
  color: #fffdf7;
  background: var(--atelier-ink);
}

body.bd-directory .page-content {
  width: min(100% - 44px, 1460px);
}

body.bd-directory .iowen-hero {
  min-height: 360px;
  display: grid;
  align-items: end;
}

body.bd-directory .hero-search-panel {
  max-width: 760px;
  margin-top: 28px;
  padding: 10px;
  border: 1px solid var(--atelier-line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--atelier-paper) 84%, transparent);
  box-shadow: var(--atelier-small-shadow);
}

body.bd-directory .hero-search-box {
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: var(--atelier-paper-2);
  box-shadow: inset 0 0 0 1px var(--atelier-soft-line);
}

body.bd-directory .directory-insight-strip {
  margin-top: -30px;
  padding-inline: 24px;
  position: relative;
  z-index: 2;
}

body.bd-directory .directory-status-filter {
  width: fit-content;
  margin: 18px auto;
  padding: 6px;
  border: 1px solid var(--atelier-line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--atelier-paper) 90%, transparent);
}

body.bd-directory .iowen-shell {
  display: grid;
  grid-template-columns: 194px minmax(0, 1fr) 276px;
  gap: 18px;
  align-items: start;
}

body.bd-directory .hao-rail {
  position: sticky;
  top: 98px;
  padding: 12px;
  max-height: calc(100vh - 116px);
  overflow: auto;
  border-radius: 20px;
}

body.bd-directory .hao-category {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  display: flex;
  justify-content: space-between;
}

body.bd-directory .hao-main,
body.bd-directory .hao-site-groups {
  display: grid;
  gap: 18px;
}

body.bd-directory .hao-section,
body.bd-directory .hao-group {
  padding: 20px;
}

body.bd-directory .hao-section-head {
  min-height: 36px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.bd-directory .hao-section-head h1,
body.bd-directory .hao-section-head h2,
body.bd-directory .side-widget h2 {
  color: var(--atelier-ink);
  font-size: 22px;
  line-height: 1.2;
}

body.bd-directory .hao-section-head h1::before,
body.bd-directory .hao-section-head h2::before,
body.bd-directory .side-widget h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 18px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--atelier-accent);
  vertical-align: -2px;
}

body.bd-directory .hao-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.bd-directory .hao-card {
  min-height: 136px;
  padding: 16px;
  border: 1px solid var(--atelier-line);
  border-radius: 16px;
  background: var(--atelier-paper);
  box-shadow: none;
}

body.bd-directory .hao-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--atelier-accent) 42%, var(--atelier-line));
  box-shadow: var(--atelier-small-shadow);
}

body.bd-directory .hao-card-main {
  gap: 12px;
}

body.bd-directory .hao-card-title {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

body.bd-directory .hao-card-icon,
body.bd-directory .rank-icon {
  border: 1px solid var(--atelier-line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--atelier-paper-2) 92%, var(--atelier-accent) 8%);
}

body.bd-directory .hao-card strong {
  color: var(--atelier-ink);
  font-size: 17px;
}

body.bd-directory .hao-card p {
  min-height: 44px;
  color: var(--atelier-muted);
  line-height: 1.62;
}

body.bd-directory .hao-card-tags em,
body.bd-page .tag,
body.bd-page .status-chip,
body.bd-page .category-chip {
  border: 1px solid var(--atelier-soft-line);
  border-radius: 999px;
  color: var(--atelier-muted);
  background: var(--atelier-paper-2);
}

body.bd-directory .iowen-rightbar {
  position: sticky;
  top: 98px;
  display: grid;
  gap: 14px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

body.bd-directory .side-widget {
  padding: 16px;
}

body.bd-directory .profile-banner {
  border-radius: 18px;
  color: #fffdf7;
  background:
    linear-gradient(135deg, #17201d, #28483f 55%, #139f84);
}

body.bd-directory .rank-link {
  border: 1px solid var(--atelier-soft-line);
  border-radius: 14px;
  background: var(--atelier-paper-2);
}

body.bd-directory .right-tag-cloud button,
body.bd-directory .quick-command-grid button,
body.bd-directory .quick-command-grid a {
  border: 1px solid var(--atelier-line);
  border-radius: 13px;
  color: var(--atelier-ink);
  background: var(--atelier-paper-2);
}

body.bd-admin .page-content {
  width: min(100% - 48px, 1320px);
}

body.bd-admin .admin-grid {
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
}

body.bd-admin .panel-card {
  padding: 24px;
}

body.bd-admin input,
body.bd-admin textarea,
body.bd-admin select,
body.bd-admin .quill-editor.ql-container {
  border-color: var(--atelier-line);
  color: var(--atelier-ink);
  background: var(--atelier-paper-2);
}

body.bd-admin .quill-toolbar.ql-toolbar {
  top: 86px;
  border-color: var(--atelier-line);
  background: color-mix(in srgb, var(--atelier-paper) 94%, transparent);
}

body.bd-admin .quill-toolbar.ql-toolbar button,
body.bd-admin .quill-toolbar.ql-toolbar button.ql-text-control,
body.bd-admin .quill-toolbar.ql-toolbar .ql-picker {
  color: var(--atelier-ink);
  background: var(--atelier-paper-2);
}

body.bd-admin .quill-toolbar.ql-toolbar button.ql-text-control.is-active {
  color: #fffdf7;
  background: var(--atelier-ink);
  border-color: var(--atelier-ink);
}

body.bd-admin .quill-editor .ql-editor,
body.bd-admin .quill-editor .ql-editor h2,
body.bd-admin .quill-editor .ql-editor h3 {
  color: var(--atelier-ink);
}

body.bd-admin .quill-editor .ql-editor.ql-blank::before {
  color: color-mix(in srgb, var(--atelier-muted) 70%, transparent);
}

body.bd-admin .quill-editor .ql-editor blockquote {
  color: var(--atelier-ink);
  background: color-mix(in srgb, var(--atelier-accent) 10%, transparent);
}

body.bd-admin .admin-item {
  border-color: var(--atelier-line);
  border-radius: 16px;
  background: var(--atelier-paper-2);
}

@media (max-width: 1180px) {
  body.bd-home .cards-grid,
  body.bd-directory .hao-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.bd-directory .iowen-shell {
    grid-template-columns: 170px minmax(0, 1fr);
  }

  body.bd-directory .iowen-rightbar {
    display: none;
  }

  body.bd-admin .admin-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  body.bd-page .app-sidebar {
    position: sticky;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.bd-page .brand,
  body.bd-page .side-nav.grouped {
    justify-self: center;
  }

  body.bd-page .app-topbar {
    width: min(100% - 24px, 1320px);
    border-radius: 24px;
    flex-wrap: wrap;
  }

  body.bd-page .page-content,
  body.bd-directory .page-content,
  body.bd-admin .page-content {
    width: min(100% - 24px, 1320px);
    padding-top: 18px;
  }

  body.bd-page .workspace-hero,
  body.bd-page .directory-hero,
  body.bd-page .admin-hero {
    padding: 28px;
  }

  body.bd-home .directory-grid,
  body.bd-directory .iowen-shell {
    grid-template-columns: 1fr;
  }

  body.bd-home .filter-panel,
  body.bd-directory .hao-rail {
    position: static;
  }

  body.bd-home .cards-grid,
  body.bd-directory .hao-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Atelier priority lock: overrides older !important theme experiments. */
body.bd-page {
  background:
    linear-gradient(90deg, rgba(19, 159, 132, 0.045) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(180deg, rgba(229, 138, 42, 0.035) 1px, transparent 1px) 0 0 / 38px 38px,
    linear-gradient(180deg, var(--atelier-bg), color-mix(in srgb, var(--atelier-bg) 88%, #ffffff)) !important;
  color: var(--atelier-ink) !important;
}

body.bd-page .app-sidebar,
body.bd-page .app-topbar,
body.bd-page .workspace-hero,
body.bd-page .directory-hero,
body.bd-page .admin-hero,
body.bd-home .quick-panel,
body.bd-home .insight-card,
body.bd-home .filter-panel,
body.bd-home .content-board,
body.bd-directory .hao-section,
body.bd-directory .hao-group,
body.bd-directory .side-widget,
body.bd-directory .hao-rail,
body.bd-admin .panel-card,
body.bd-admin .admin-list-tools,
body.bd-admin .site-icon-tools {
  border-color: var(--atelier-line) !important;
  color: var(--atelier-ink) !important;
  background: color-mix(in srgb, var(--atelier-paper) 94%, transparent) !important;
  box-shadow: var(--atelier-small-shadow) !important;
}

body.bd-page .workspace-hero,
body.bd-page .directory-hero,
body.bd-page .admin-hero {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--atelier-paper) 95%, #ffffff), color-mix(in srgb, var(--atelier-paper-2) 90%, var(--atelier-accent) 10%)),
    var(--atelier-paper) !important;
  box-shadow: var(--atelier-shadow) !important;
}

body.bd-page .app-sidebar {
  background: color-mix(in srgb, var(--atelier-paper) 88%, transparent) !important;
}

body.bd-page .app-topbar {
  background: color-mix(in srgb, var(--atelier-paper) 92%, transparent) !important;
}

body.bd-page .workspace-hero h1,
body.bd-page .directory-hero h1,
body.bd-page .admin-hero h1,
body.bd-page .panel-heading h2,
body.bd-page .board-heading h2,
body.bd-page .section-title h2,
body.bd-directory .hao-section-head h1,
body.bd-directory .hao-section-head h2,
body.bd-directory .side-widget h2,
body.bd-directory .hao-card strong,
body.bd-home .bookmark-card h3 a {
  color: var(--atelier-ink) !important;
}

body.bd-page .workspace-hero p:not(.eyebrow),
body.bd-page .directory-hero p:not(.eyebrow),
body.bd-page .admin-hero p:not(.eyebrow),
body.bd-directory .hao-card p,
body.bd-home .bookmark-card p,
body.bd-page .brand small {
  color: var(--atelier-muted) !important;
}

body.bd-page .top-search,
body.bd-page .hero-search-box,
body.bd-page input,
body.bd-page textarea,
body.bd-page select,
body.bd-admin .quill-editor.ql-container {
  border-color: var(--atelier-line) !important;
  color: var(--atelier-ink) !important;
  background: var(--atelier-paper-2) !important;
}

body.bd-home .bookmark-card,
body.bd-directory .hao-card,
body.bd-page .admin-item,
body.bd-page .mini-link,
body.bd-page .rank-link {
  border-color: var(--atelier-line) !important;
  color: var(--atelier-ink) !important;
  background: var(--atelier-paper) !important;
  box-shadow: none !important;
}

body.bd-page .side-nav.grouped {
  background: color-mix(in srgb, var(--atelier-paper-2) 88%, transparent) !important;
  border-color: var(--atelier-line) !important;
}

body.bd-page .side-nav.grouped a {
  color: var(--atelier-muted) !important;
  background: transparent !important;
}

body.bd-page .side-nav.grouped a.is-active,
body.bd-page .side-nav.grouped a:hover,
body.bd-page .primary-action,
body.bd-page .segment-button.is-active,
body.bd-page .status-filter-chip.is-active,
body.bd-page .tag-button.is-active,
body.bd-page .archive-button.is-active,
body.bd-directory .hao-category.is-active,
body.bd-admin .admin-mode-tabs button.is-active,
body.bd-admin .option-chip.is-active {
  border-color: var(--atelier-ink) !important;
  color: #fffdf7 !important;
  background: var(--atelier-ink) !important;
}

body.bd-page .ghost-action,
body.bd-page .icon-button,
body.bd-page .text-button,
body.bd-page .segment-button,
body.bd-page .status-filter-chip,
body.bd-page .tag-button,
body.bd-page .archive-button,
body.bd-directory .hao-category,
body.bd-admin .admin-mode-tabs button,
body.bd-admin .option-chip {
  border-color: var(--atelier-line) !important;
  color: var(--atelier-ink) !important;
  background: var(--atelier-paper) !important;
}

/* Atelier contrast refinement. */
body.bd-page .brand strong,
body.bd-page .top-title strong,
body.bd-page .top-title span,
body.bd-page label span {
  color: var(--atelier-ink) !important;
}

body.bd-page .brand small,
body.bd-page .top-title span {
  color: var(--atelier-muted) !important;
}

body.bd-page .hero-kpis div,
body.bd-page .directory-insight-strip div,
body.bd-page .metric-card,
body.bd-home .random-result,
body.bd-home .feature-list .mini-link,
body.bd-home .latest-list,
body.bd-page .random-link {
  border-color: var(--atelier-line) !important;
  color: var(--atelier-ink) !important;
  background: color-mix(in srgb, var(--atelier-paper) 88%, transparent) !important;
  box-shadow: none !important;
}

body.bd-page .hero-kpis strong,
body.bd-page .directory-insight-strip strong,
body.bd-page .metric-card strong {
  color: var(--atelier-accent) !important;
}

body.bd-page .hero-kpis span,
body.bd-page .directory-insight-strip span,
body.bd-page .metric-card span,
body.bd-home .random-result small,
body.bd-home .mini-link small,
body.bd-page .admin-item small {
  color: var(--atelier-muted) !important;
}

body.bd-admin .quill-toolbar.ql-toolbar {
  border-color: var(--atelier-line) !important;
  background: color-mix(in srgb, var(--atelier-paper) 94%, transparent) !important;
}

body.bd-admin .quill-editor.ql-container,
body.bd-admin .quill-editor .ql-editor {
  color: var(--atelier-ink) !important;
  background: var(--atelier-paper-2) !important;
}

body.bd-admin .quill-toolbar.ql-toolbar button,
body.bd-admin .quill-toolbar.ql-toolbar button.ql-text-control {
  color: var(--atelier-ink) !important;
  background: var(--atelier-paper) !important;
}

body.bd-admin .quill-toolbar.ql-toolbar button.ql-text-control.is-active {
  color: #fffdf7 !important;
  background: var(--atelier-ink) !important;
}

body.bd-page .segment-button span,
body.bd-page .status-filter-chip span,
body.bd-page .status-filter-chip strong,
body.bd-page .tag-button span,
body.bd-page .tag-button strong,
body.bd-page .archive-button span,
body.bd-page .archive-button strong,
body.bd-directory .hao-category span,
body.bd-directory .hao-category small {
  color: inherit !important;
  opacity: 1 !important;
}

body.bd-page .segment-button:not(.is-active),
body.bd-page .status-filter-chip:not(.is-active),
body.bd-page .tag-button:not(.is-active),
body.bd-page .archive-button:not(.is-active),
body.bd-directory .hao-category:not(.is-active) {
  color: var(--atelier-ink) !important;
  background: color-mix(in srgb, var(--atelier-paper) 84%, transparent) !important;
}

body.bd-home .quick-categories .segment-button {
  min-height: 104px !important;
  border-radius: 22px !important;
}

body.bd-directory .directory-status-filter {
  border-color: var(--atelier-line) !important;
  background: color-mix(in srgb, var(--atelier-paper) 88%, transparent) !important;
  box-shadow: var(--atelier-small-shadow) !important;
}

body.bd-page .primary-action:hover,
body.bd-page .side-nav.grouped a.is-active:hover,
body.bd-page .segment-button.is-active:hover,
body.bd-directory .hao-category.is-active:hover {
  background: color-mix(in srgb, var(--atelier-ink) 86%, var(--atelier-accent)) !important;
}

/* Adaptive workspace density refresh, 2026-07-31.
   Inspired by open-source bookmark dashboards, but tuned for Bookdock's calmer paper style. */
:root {
  --bd-shell-max: 1760px;
  --bd-shell-gutter: clamp(18px, 3vw, 56px);
  --bd-card-min: 248px;
  --bd-card-tight-min: 220px;
  --bd-rail-width: clamp(166px, 11vw, 218px);
  --bd-rightbar-width: clamp(260px, 17vw, 330px);
}

body.bd-page .page-content,
body.bd-page .app-topbar {
  width: min(calc(100% - var(--bd-shell-gutter) * 2), var(--bd-shell-max)) !important;
}

body.bd-page .app-topbar {
  min-height: 58px;
  padding: 10px 14px !important;
}

body.bd-page .workspace-hero,
body.bd-page .directory-hero,
body.bd-page .admin-hero {
  padding: clamp(28px, 4vw, 58px) !important;
}

body.bd-page .workspace-hero h1,
body.bd-page .directory-hero h1,
body.bd-page .admin-hero h1 {
  max-width: 840px;
  font-size: clamp(38px, 5.2vw, 86px) !important;
  line-height: 0.98 !important;
  letter-spacing: 0 !important;
}

body.bd-home .workspace-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 0.7fr);
  align-items: end;
  gap: clamp(28px, 5vw, 88px);
}

body.bd-page .hero-kpis,
body.bd-page .directory-insight-strip {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) !important;
  gap: 12px !important;
}

body.bd-home .quick-panel,
body.bd-home .inspiration-board,
body.bd-home .insights-grid,
body.bd-home .directory-grid,
body.bd-directory .directory-insight-strip,
body.bd-directory .status-filter-row,
body.bd-directory .reference-board,
body.bd-directory .hao-shell.embedded,
body.bd-admin .admin-mode-tabs,
body.bd-admin .metrics-grid,
body.bd-admin .admin-grid {
  margin-top: clamp(14px, 1.5vw, 24px) !important;
}

body.bd-home .quick-panel {
  padding: clamp(18px, 2vw, 28px) !important;
}

body.bd-home .quick-categories {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)) !important;
  gap: 10px !important;
}

body.bd-home .quick-categories .segment-button {
  min-height: 76px !important;
  padding: 14px !important;
  border-radius: 16px !important;
}

body.bd-home .quick-categories .segment-button span:first-child {
  font-size: 16px;
}

body.bd-home .quick-categories .segment-button,
body.bd-home .quick-categories .segment-button * {
  color: var(--atelier-ink) !important;
}

body.bd-home .quick-categories .segment-button.is-active,
body.bd-home .quick-categories .segment-button.is-active * {
  color: #fffdf7 !important;
}

body.bd-home .inspiration-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  gap: 12px !important;
}

body.bd-home .insights-grid {
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1fr) minmax(240px, 0.85fr) !important;
  gap: 16px !important;
}

body.bd-home .directory-grid {
  grid-template-columns: minmax(220px, 0.24fr) minmax(0, 1fr) !important;
  gap: 18px !important;
}

body.bd-home .filter-panel {
  position: sticky;
  top: 90px;
  align-self: start;
}

body.bd-home .cards-grid {
  grid-template-columns: repeat(auto-fill, minmax(var(--bd-card-min), 1fr)) !important;
  gap: 16px !important;
}

body.bd-home .bookmark-card {
  min-height: 100%;
}

body.bd-home .card-image {
  aspect-ratio: 16 / 8.6 !important;
}

body.bd-directory .page-content {
  width: min(calc(100% - var(--bd-shell-gutter) * 2), 1840px) !important;
}

body.bd-directory .iowen-hero {
  min-height: clamp(360px, 35vw, 520px);
  align-items: center;
}

body.bd-directory .hero-search-panel {
  max-width: 760px;
  margin-top: clamp(26px, 5vw, 70px);
}

body.bd-directory .directory-insight-strip {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 12px !important;
}

body.bd-directory .reference-board {
  display: none !important;
}

body.bd-directory .iowen-shell,
body.bd-directory .hao-shell.embedded {
  display: grid !important;
  grid-template-columns: var(--bd-rail-width) minmax(0, 1fr) var(--bd-rightbar-width) !important;
  align-items: start;
  gap: clamp(16px, 1.5vw, 24px) !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

body.bd-directory .hao-rail {
  top: 88px !important;
  max-height: calc(100vh - 104px);
  overflow: auto;
  padding: 12px !important;
  border-radius: 20px !important;
}

body.bd-directory .hao-category {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  padding: 0 13px !important;
  border-radius: 13px !important;
}

body.bd-directory .hao-main,
body.bd-directory .hao-site-groups {
  display: grid !important;
  gap: 20px !important;
}

body.bd-directory .hao-section,
body.bd-directory .hao-group {
  padding: clamp(18px, 1.8vw, 28px) !important;
  border-radius: 22px !important;
}

body.bd-directory .hao-section-head {
  margin-bottom: 14px !important;
}

body.bd-directory .hao-card-grid,
body.bd-directory .hao-card-grid.compact {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(var(--bd-card-min), 1fr)) !important;
  gap: 14px !important;
}

body.bd-directory .hao-card {
  min-height: 148px;
  padding: 18px !important;
  border-radius: 16px !important;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

body.bd-directory .hao-card:hover {
  transform: translateY(-2px);
}

body.bd-directory .hao-card-title {
  gap: 12px !important;
}

body.bd-directory .hao-card-icon,
body.bd-directory .rank-icon {
  inline-size: 34px !important;
  block-size: 34px !important;
  border-radius: 11px !important;
}

body.bd-directory .hao-card strong {
  font-size: 18px !important;
  line-height: 1.2;
}

body.bd-directory .hao-card p {
  min-height: 48px !important;
  margin: 12px 0 !important;
  line-height: 1.55 !important;
}

body.bd-directory .iowen-rightbar {
  top: 88px !important;
  gap: 12px !important;
}

body.bd-directory .side-widget {
  padding: 14px !important;
  border-radius: 20px !important;
}

body.bd-directory .rank-list {
  display: grid;
  gap: 8px;
}

body.bd-directory .rank-link {
  min-height: 54px;
  padding: 9px !important;
  border-radius: 13px !important;
}

body.bd-directory .right-tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

body.bd-directory .right-tag-cloud button {
  padding: 7px 9px !important;
}

body.bd-directory .hao-section.is-flashing,
body.bd-directory .hao-group.is-flashing {
  isolation: isolate;
}

body.bd-directory .hao-section.is-flashing::before,
body.bd-directory .hao-group.is-flashing::before {
  inset: 36px 50%;
  transform: translateX(-50%);
  width: 100vw;
  border: 0 !important;
  box-shadow: none !important;
  background:
    linear-gradient(90deg, transparent 0, color-mix(in srgb, var(--atelier-accent) 16%, transparent) 14%, color-mix(in srgb, var(--atelier-accent) 18%, transparent) 86%, transparent 100%) !important;
  pointer-events: none;
  z-index: -1;
}

body.bd-admin .page-content {
  width: min(calc(100% - var(--bd-shell-gutter) * 2), 1540px) !important;
}

body.bd-admin .admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px) !important;
}

body.bd-admin .panel-card {
  border-radius: 22px !important;
}

body.bd-admin .article-editor-label .article-editor-shell {
  min-height: clamp(520px, 46vh, 760px);
}

body.bd-admin .quill-editor.ql-container {
  min-height: clamp(420px, 40vh, 660px) !important;
}

@media (min-width: 1720px) {
  :root {
    --bd-card-min: 236px;
    --bd-card-tight-min: 210px;
  }

  body.bd-directory .hao-card-grid,
  body.bd-directory .hao-card-grid.compact {
    grid-template-columns: repeat(auto-fill, minmax(var(--bd-card-tight-min), 1fr)) !important;
  }

  body.bd-directory .hao-card {
    min-height: 136px;
  }

  body.bd-home .cards-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  }
}

@media (max-width: 1380px) {
  :root {
    --bd-shell-gutter: clamp(16px, 2vw, 32px);
    --bd-card-min: 230px;
  }

  body.bd-directory .iowen-shell,
  body.bd-directory .hao-shell.embedded {
    grid-template-columns: 180px minmax(0, 1fr) !important;
  }

  body.bd-directory .iowen-rightbar {
    display: none !important;
  }
}

@media (max-width: 1060px) {
  body.bd-home .workspace-hero,
  body.bd-home .directory-grid,
  body.bd-home .insights-grid,
  body.bd-admin .admin-grid {
    grid-template-columns: 1fr !important;
  }

  body.bd-home .filter-panel {
    position: static;
  }

  body.bd-directory .iowen-shell,
  body.bd-directory .hao-shell.embedded {
    grid-template-columns: 1fr !important;
  }

  body.bd-directory .hao-rail {
    position: sticky;
    top: 76px !important;
    z-index: 6;
    display: flex !important;
    gap: 8px;
    overflow-x: auto;
    max-height: none;
    white-space: nowrap;
  }

  body.bd-directory .hao-category {
    min-width: max-content;
  }
}

@media (max-width: 760px) {
  :root {
    --bd-shell-gutter: 12px;
    --bd-card-min: 100%;
  }

  body.bd-page .app-sidebar {
    padding-inline: 12px !important;
  }

  body.bd-page .app-topbar {
    position: static !important;
    border-radius: 20px !important;
  }

  body.bd-page .top-search {
    order: 2;
    flex-basis: 100%;
  }

  body.bd-page .top-actions {
    width: 100%;
    justify-content: center;
  }

  body.bd-page .workspace-hero,
  body.bd-page .directory-hero,
  body.bd-page .admin-hero {
    padding: 26px 20px !important;
  }

  body.bd-page .workspace-hero h1,
  body.bd-page .directory-hero h1,
  body.bd-page .admin-hero h1 {
    font-size: clamp(34px, 13vw, 54px) !important;
  }

  body.bd-page .hero-kpis,
  body.bd-admin .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.bd-directory .directory-insight-strip {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(118px, 1fr);
    grid-template-columns: none !important;
    gap: 8px !important;
    overflow-x: auto;
    margin-top: 10px !important;
    padding-bottom: 2px;
  }

  body.bd-directory .directory-insight-strip div {
    min-height: 60px !important;
    padding: 10px 12px !important;
  }

  body.bd-directory .directory-status-filter {
    display: flex !important;
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    overflow-x: auto;
    padding: 9px 10px !important;
    margin-top: 8px !important;
  }

  body.bd-directory .status-filter-chip {
    flex: 0 0 auto;
  }

  body.bd-directory .hao-shell.embedded,
  body.bd-directory .iowen-shell {
    margin-top: 10px !important;
  }

  body.bd-home .quick-categories,
  body.bd-home .cards-grid,
  body.bd-directory .hao-card-grid,
  body.bd-directory .hao-card-grid.compact {
    grid-template-columns: 1fr !important;
  }

  body.bd-directory .iowen-hero {
    min-height: auto;
  }

  body.bd-directory .hero-search-panel {
    margin-top: 24px;
  }
}

/* Density tuning after visual QA: reveal actual content sooner on desktop. */
@media (min-width: 1061px) {
  body.bd-page .workspace-hero,
  body.bd-page .directory-hero,
  body.bd-page .admin-hero {
    padding-block: clamp(26px, 3vw, 46px) !important;
  }

  body.bd-home .workspace-hero {
    min-height: 292px;
  }

  body.bd-directory .iowen-hero {
    min-height: clamp(232px, 16vw, 292px) !important;
  }

  body.bd-directory .hero-search-panel {
    margin-top: clamp(22px, 3vw, 42px) !important;
  }

  body.bd-page .workspace-hero h1,
  body.bd-page .directory-hero h1,
  body.bd-page .admin-hero h1 {
    font-size: clamp(42px, 4.4vw, 72px) !important;
  }

  body.bd-home .quick-panel {
    padding: 16px 22px !important;
  }

  body.bd-home .quick-panel .panel-heading {
    display: grid;
    grid-template-columns: max-content minmax(260px, 1fr);
    align-items: center;
    gap: 18px;
  }

  body.bd-home .quick-categories {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    margin-top: 12px !important;
  }

  body.bd-home .quick-categories .segment-button {
    display: flex !important;
    min-height: 58px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 11px 14px !important;
    border-radius: 15px !important;
  }

  body.bd-home .quick-categories .segment-button::before {
    inline-size: 28px !important;
    block-size: 28px !important;
    flex: 0 0 auto;
  }

  body.bd-home .quick-categories .segment-button span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.bd-home .status-filter-row,
  body.bd-directory .directory-status-filter {
    padding: 10px 14px !important;
  }

  body.bd-directory .directory-insight-strip {
    max-width: 720px;
    margin-inline: auto;
    margin-top: 12px !important;
  }

  body.bd-directory .directory-status-filter {
    max-width: 760px;
    margin: 10px auto 0 !important;
  }

  body.bd-directory .directory-insight-strip div {
    min-height: 54px !important;
    padding: 10px 14px !important;
  }

  body.bd-directory .directory-insight-strip strong {
    font-size: 24px !important;
    line-height: 1 !important;
  }

  body.bd-directory .status-filter-chip {
    min-height: 30px !important;
    padding: 0 12px !important;
  }

  body.bd-directory .hao-shell.embedded,
  body.bd-directory .iowen-shell {
    margin-top: 14px !important;
  }

  body.bd-directory .hao-section,
  body.bd-directory .hao-group {
    padding-top: 18px !important;
  }

  body.bd-directory .iowen-hero > div {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 0.78fr);
    align-items: center;
    column-gap: clamp(28px, 5vw, 92px);
    width: 100%;
  }

  body.bd-directory .iowen-hero .eyebrow,
  body.bd-directory .iowen-hero h1,
  body.bd-directory .iowen-hero > div > p:not(.eyebrow) {
    grid-column: 1;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
  }

  body.bd-directory .iowen-hero > div > p:not(.eyebrow) {
    max-width: 620px;
  }

  body.bd-directory .iowen-hero .hero-search-panel {
    grid-column: 2;
    grid-row: 1 / span 3;
    width: 100%;
    max-width: none;
    margin: 0 !important;
  }
}

/* Final workspace-density lock after skill install pass. */
@media (min-width: 1061px) {
  body.bd-directory .iowen-hero {
    min-height: clamp(212px, 14vw, 258px) !important;
  }

  body.bd-directory .iowen-hero > div {
    grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 0.7fr) !important;
  }

  body.bd-directory .iowen-hero > div > p:not(.eyebrow) {
    max-width: 560px !important;
  }

  body.bd-directory .directory-insight-strip {
    margin-top: 10px !important;
  }

  body.bd-directory .directory-insight-strip div {
    min-height: 48px !important;
    padding: 8px 13px !important;
  }

  body.bd-directory .directory-insight-strip strong {
    font-size: 22px !important;
  }

  body.bd-directory .directory-status-filter {
    margin-top: 8px !important;
    padding-block: 8px !important;
  }

  body.bd-directory .hao-shell.embedded,
  body.bd-directory .iowen-shell {
    margin-top: 12px !important;
  }
}

@media (min-width: 1061px) and (max-width: 1500px) {
  body.bd-directory .iowen-hero {
    min-height: 224px !important;
  }

  body.bd-directory .iowen-hero h1 {
    font-size: clamp(48px, 4.4vw, 60px) !important;
  }
}

@media (max-width: 760px) {
  body.bd-directory .directory-hero {
    padding-block: 24px !important;
  }

  body.bd-directory .directory-hero h1 {
    font-size: clamp(40px, 13vw, 58px) !important;
  }

  body.bd-directory .directory-hero p:not(.eyebrow) {
    margin-top: 10px !important;
    line-height: 1.58 !important;
  }

  body.bd-directory .hero-search-panel {
    display: none !important;
  }
}

