:root {
  color-scheme: light;
  --builder-bg: #f5f6f8;
  --builder-surface: rgba(255, 255, 255, 0.88);
  --builder-surface-strong: #ffffff;
  --builder-ink: #1f232b;
  --builder-muted: #6f7784;
  --builder-line: rgba(27, 31, 38, 0.08);
  --builder-accent: #ee8f96;
  --builder-accent-strong: #db6671;
  --builder-soft: #edf0f4;
  --builder-shadow: 0 22px 58px rgba(22, 26, 33, 0.08);
  --builder-radius-xl: 30px;
  --builder-radius-lg: 22px;
  --builder-max: 1500px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  position: relative;
  overflow-x: hidden;
  background:
    radial-gradient(circle at top, rgba(238, 143, 150, 0.2), transparent 22rem),
    linear-gradient(180deg, #fff, var(--builder-bg));
  color: var(--builder-ink);
  font-family:
    "Source Han Sans SC",
    "Source Han Sans CN",
    "Noto Sans CJK SC",
    "Noto Sans SC",
    "思源黑体 CN",
    "思源黑体",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6,
.builder-brand strong,
.builder-kicker,
.builder-button,
.layout-auth__label {
  font-family:
    "Source Han Sans SC",
    "Source Han Sans CN",
    "Noto Sans CJK SC",
    "Noto Sans SC",
    "思源黑体 CN",
    "思源黑体",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(24px);
  opacity: 0.48;
}

body::before {
  top: 2rem;
  right: -8rem;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(238, 143, 150, 0.26), transparent 68%);
}

body::after {
  bottom: -8rem;
  left: -8rem;
  width: 26rem;
  height: 26rem;
  background: radial-gradient(circle, rgba(125, 160, 255, 0.18), transparent 70%);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(238, 143, 150, 0.72), rgba(125, 160, 255, 0.72)) padding-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

a,
button,
input,
textarea,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

img,
video {
  display: block;
  width: 100%;
}

.builder-page {
  width: min(var(--builder-max), calc(100% - 28px));
  margin: 0 auto;
  padding: 20px 0 44px;
}

.builder-topbar,
.builder-panel,
.builder-preview,
.article-layout {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-xl);
  background: var(--builder-surface);
  box-shadow: var(--builder-shadow);
  backdrop-filter: blur(18px);
}

.builder-topbar::before,
.builder-panel::before,
.builder-preview::before,
.article-layout::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.06)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.28), transparent 30%);
  pointer-events: none;
}

.builder-topbar {
  position: sticky;
  top: 12px;
  z-index: 120;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding: 18px 22px;
  overflow: visible;
}

.builder-brand strong,
.builder-brand span {
  display: block;
}

.builder-brand span,
.builder-kicker,
.article-kicker {
  color: var(--builder-accent);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.builder-brand strong {
  margin-top: 4px;
  font-size: 1.25rem;
}

.builder-actions,
.builder-actions-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.layout-auth {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  z-index: 140;
}

.builder-actions {
  margin-left: auto;
  justify-content: flex-end;
}

.layout-auth__menu {
  position: relative;
  z-index: 150;
}

.layout-auth__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px 0 10px;
  border: 1px solid var(--builder-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--builder-ink);
  text-decoration: none;
}

.layout-auth__avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4a5aa, #a7c6ff);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 900;
}

.layout-auth__label {
  white-space: nowrap;
}

.layout-auth__caret {
  color: var(--builder-muted);
  font-size: 0.78rem;
}

.layout-auth__dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  padding: 12px;
  border: 1px solid var(--builder-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 24px 54px rgba(22, 26, 33, 0.16);
  backdrop-filter: blur(18px);
  z-index: 200;
}

.layout-auth__header {
  display: grid;
  gap: 4px;
  padding: 6px 8px 12px;
}

.layout-auth__header strong {
  font-size: 0.98rem;
}

.layout-auth__header span {
  color: var(--builder-muted);
  font-size: 0.88rem;
}

.layout-auth__item {
  width: 100%;
  justify-content: flex-start;
  min-height: 42px;
  border-radius: 14px;
}

.layout-auth__item--danger {
  color: #c54f5c;
}

.builder-button,
.builder-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease,
    background 0.28s ease,
    color 0.28s ease;
}

.builder-button--primary {
  background: var(--builder-accent);
  color: #fff;
}

.builder-button--danger {
  background: #db6671;
  color: #fff;
  border: 1px solid transparent;
}

.builder-button--secondary {
  background: var(--builder-soft);
  color: var(--builder-ink);
}

.builder-button--ghost,
.builder-chip {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--builder-line);
  color: var(--builder-muted);
}

.builder-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.builder-button--danger:hover {
  box-shadow: 0 16px 32px rgba(219, 102, 113, 0.24);
}

.builder-button:hover,
.builder-chip:hover,
.builder-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(22, 26, 33, 0.12);
}

.builder-shell {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 20px;
}

.builder-panel {
  padding: 20px;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.builder-panel--sticky {
  position: sticky;
  top: 108px;
  align-self: start;
}

.builder-section + .builder-section {
  margin-top: 24px;
}

.builder-section h2,
.builder-stage-head h2,
.builder-preview-head h2 {
  margin: 4px 0 0;
  font-size: 1.35rem;
}

.builder-note,
.builder-empty p,
.article-meta,
.article-gallery__caption,
.article-figure figcaption,
.article-split__content span {
  color: var(--builder-muted);
}

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

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

.builder-field {
  display: grid;
  gap: 8px;
}

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

.builder-field label {
  font-size: 0.92rem;
  font-weight: 800;
}

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

.taxonomy-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.taxonomy-check {
  position: relative;
  cursor: pointer;
}

.taxonomy-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.taxonomy-check span {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--builder-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--builder-muted);
  font-weight: 800;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.taxonomy-check:hover span {
  transform: translateY(-2px);
  border-color: rgba(124, 92, 255, 0.38);
  color: var(--builder-ink);
}

.taxonomy-check input:checked + span {
  border-color: transparent;
  background: linear-gradient(135deg, var(--builder-accent), var(--builder-accent-2));
  color: #fff;
  box-shadow: 0 14px 28px rgba(124, 92, 255, 0.18);
}

.builder-input,
.builder-textarea,
.builder-select,
.builder-json {
  width: 100%;
  border: 1px solid var(--builder-line);
  border-radius: 14px;
  background: var(--builder-surface-strong);
  color: var(--builder-ink);
  padding: 12px 14px;
}

.password-toggle {
  position: relative;
}

.password-toggle .builder-input {
  padding-right: 88px;
}

.password-toggle__button {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  min-width: 64px;
  height: 36px;
  border: 1px solid var(--builder-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--builder-muted);
  font-weight: 800;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    background 0.22s ease,
    color 0.22s ease,
    border-color 0.22s ease;
}

.password-toggle__button:hover {
  transform: translateY(calc(-50% - 1px));
  border-color: rgba(124, 92, 255, 0.32);
  color: var(--builder-ink);
  background: rgba(255, 255, 255, 0.96);
}

.builder-textarea,
.builder-json {
  min-height: 120px;
  resize: vertical;
}

.builder-json {
  min-height: 220px;
}

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

.builder-chip {
  min-height: 44px;
  padding: 0 12px;
}

.builder-main {
  display: grid;
  gap: 20px;
}

.builder-stage,
.builder-preview {
  padding: 22px;
}

.builder-stage-head,
.builder-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.builder-block-list {
  display: grid;
  gap: 16px;
}

.builder-empty {
  padding: 24px;
  border: 1px dashed var(--builder-line);
  border-radius: 18px;
  text-align: center;
}

.builder-block-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-lg);
  background: var(--builder-surface-strong);
  padding: 18px;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.builder-block-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(238, 143, 150, 0.12), transparent 30%);
  pointer-events: none;
}

.builder-block-card:hover,
.builder-panel:hover,
.builder-preview:hover {
  transform: translateY(-6px);
  border-color: rgba(238, 143, 150, 0.22);
  box-shadow: 0 28px 60px rgba(22, 26, 33, 0.12);
}

.builder-block-head,
.builder-block-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.builder-block-head {
  margin-bottom: 14px;
}

.builder-block-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.builder-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(238, 143, 150, 0.14);
  color: var(--builder-accent-strong);
  font-size: 0.84rem;
  font-weight: 800;
}

.builder-mini {
  min-height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--builder-soft);
  color: var(--builder-ink);
}

.builder-mini:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.builder-mini--danger {
  background: rgba(222, 77, 89, 0.1);
  color: #ba3e48;
}

.builder-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--builder-soft);
  color: var(--builder-muted);
  cursor: grab;
}

.builder-block-card.is-dragging {
  opacity: 0.48;
}

.builder-block-card.drop-before {
  box-shadow: inset 0 3px 0 var(--builder-accent);
}

.builder-block-card.drop-after {
  box-shadow: inset 0 -3px 0 var(--builder-accent);
}

.builder-file {
  max-width: 100%;
}

.builder-gallery-empty {
  display: grid;
  place-items: center;
  min-height: 96px;
  margin-top: 12px;
  border: 1px dashed rgba(238, 143, 150, 0.32);
  border-radius: 18px;
  background: rgba(238, 143, 150, 0.06);
  color: var(--builder-muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.builder-gallery-sorter {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.builder-gallery-sort-item {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--builder-line);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 248, 250, 0.72)),
    radial-gradient(circle at top right, rgba(238, 143, 150, 0.12), transparent 34%);
  cursor: grab;
  transition:
    transform 0.24s ease,
    box-shadow 0.24s ease,
    border-color 0.24s ease,
    opacity 0.24s ease;
}

.builder-gallery-sort-item:hover,
.builder-gallery-sort-item.is-drop-target {
  transform: translateY(-3px);
  border-color: rgba(238, 143, 150, 0.36);
  box-shadow: 0 18px 34px rgba(22, 26, 33, 0.11);
}

.builder-gallery-sort-item.is-dragging {
  opacity: 0.46;
  cursor: grabbing;
}

.builder-gallery-sort-item__thumb {
  position: relative;
  overflow: hidden;
  height: 82px;
  border-radius: 16px;
  background: var(--builder-soft);
}

.builder-gallery-sort-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.builder-gallery-sort-item__thumb span {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--builder-accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
  backdrop-filter: blur(12px);
}

.builder-gallery-sort-item__meta {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.builder-gallery-sort-item__meta strong,
.builder-gallery-sort-item__meta code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.builder-gallery-sort-item__meta code {
  color: var(--builder-muted);
  font-family: inherit;
  font-size: 0.82rem;
}

.builder-gallery-sort-item__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.builder-preview {
  background: rgba(255, 255, 255, 0.74);
}

.article-layout {
  position: relative;
  overflow: hidden;
}

.article-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(10px);
}

.article-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--builder-accent), #7da0ff);
  box-shadow: 0 0 24px rgba(238, 143, 150, 0.48);
  transition: width 0.18s ease-out;
}

.article-floating-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 32;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid var(--builder-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--builder-ink);
  box-shadow: 0 18px 40px rgba(22, 26, 33, 0.12);
  backdrop-filter: blur(18px);
}

.article-toc-panel {
  position: fixed;
  top: 98px;
  right: 20px;
  z-index: 31;
  width: min(320px, calc(100vw - 32px));
  max-height: calc(100vh - 130px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--builder-line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 24px 60px rgba(22, 26, 33, 0.14);
  backdrop-filter: blur(24px);
  transform: translateX(calc(100% + 24px));
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}

.article-toc-panel.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.article-toc-panel__head,
.article-toc-panel__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.article-toc-panel__head strong {
  display: block;
  margin-top: 4px;
}

.article-toc-panel__meta {
  flex-wrap: wrap;
  color: var(--builder-muted);
  font-size: 0.88rem;
}

.article-toc-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 4px;
}

.article-toc-link {
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  border: 1px solid var(--builder-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--builder-muted);
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    color 0.22s ease;
}

.article-toc-link:hover,
.article-toc-link.is-active {
  transform: translateX(4px);
  border-color: rgba(238, 143, 150, 0.22);
  background: rgba(238, 143, 150, 0.12);
  color: var(--builder-ink);
}

.article-toc-link--level-3 {
  padding-left: 24px;
}

.article-toc-link--level-4 {
  padding-left: 34px;
}

.article-toc-empty {
  padding: 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--builder-muted);
}

.article-toc-empty strong {
  display: block;
  color: var(--builder-ink);
}

.article-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  padding: clamp(24px, 4vw, 40px);
}

.article-hero__copy h1 {
  margin: 12px 0 16px;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.article-hero__copy p,
.article-paragraph,
.article-split__content p {
  font-size: 1rem;
  line-height: 1.9;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-paragraph,
.article-quote p,
.article-code pre,
.article-split__content,
.article-split__content strong,
.article-split__content p,
.article-split__content span {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.article-hero__visual,
.article-hero__visual img,
.article-placeholder,
.article-split__media img,
.article-gallery__item img,
.article-figure img,
.article-figure video {
  height: 100%;
  min-height: 240px;
  border-radius: 24px;
  object-fit: cover;
}

.article-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(238, 143, 150, 0.2), rgba(120, 153, 255, 0.2)),
    #f2f4f7;
  color: var(--builder-muted);
  font-weight: 800;
}

.article-meta,
.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 18px;
}

.article-tags span {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--builder-soft);
  font-size: 0.88rem;
  font-weight: 800;
}

.article-content {
  display: grid;
  gap: 28px;
  padding: 0 0 38px;
}

.article-block {
  width: min(100% - 28px, 1180px);
  margin: 0 auto;
}

.article-block--narrow {
  max-width: 760px;
}

.article-block--wide {
  max-width: 980px;
}

.article-block--full {
  max-width: 1180px;
}

.article-heading {
  scroll-margin-top: 110px;
  margin: 0;
  font-size: clamp(1.4rem, 2vw, 2.1rem);
  line-height: 1.2;
}

.article-align-center {
  text-align: center;
}

.article-align-right {
  text-align: right;
}

.article-quote {
  margin: 0;
  padding: 18px 22px;
  border-left: 4px solid var(--builder-accent);
  border-radius: 0 18px 18px 0;
  background: rgba(238, 143, 150, 0.08);
}

.article-quote p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.85;
}

.article-quote cite {
  display: block;
  margin-top: 14px;
  color: var(--builder-muted);
  font-style: normal;
}

.article-code {
  overflow: hidden;
  border-radius: 22px;
  background: #171a20;
  color: #f3f5f8;
}

.article-code__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.74);
}

.article-code pre {
  margin: 0;
  padding: 18px;
  overflow: auto;
}

.article-figure {
  margin: 0;
}

.article-figure figcaption,
.article-gallery__caption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
}

.article-gallery {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 6px 12px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(238, 143, 150, 0.72) transparent;
}

.article-gallery__item {
  margin: 0;
  flex: 0 0 min(420px, 76vw);
  scroll-snap-align: start;
}

.article-gallery--scroller {
  scroll-snap-type: x proximity;
}

.article-gallery::-webkit-scrollbar {
  height: 10px;
}

.article-gallery::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(238, 143, 150, 0.78);
}

.article-gallery::-webkit-scrollbar-track {
  background: rgba(148, 163, 184, 0.16);
  border-radius: 999px;
}

.article-audio {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  background: var(--builder-soft);
}

.article-audio__meta {
  display: grid;
  gap: 6px;
}

.article-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 32px);
  align-items: center;
  overflow: hidden;
  padding: clamp(16px, 2.6vw, 28px);
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-xl);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 248, 250, 0.62)),
    radial-gradient(circle at top right, rgba(238, 143, 150, 0.14), transparent 34%);
  box-shadow: var(--builder-shadow);
  backdrop-filter: blur(18px);
}

.article-split__media {
  min-width: 0;
  overflow: hidden;
  border-radius: 26px;
  background: var(--builder-soft);
}

.article-split__media img,
.article-split__media .article-placeholder {
  width: 100%;
  min-height: clamp(260px, 31vw, 420px);
  border-radius: 26px;
}

.article-split--right .article-split__media {
  order: 2;
}

.article-split__content {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 100%;
  padding: clamp(12px, 2vw, 22px);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.42);
}

.article-split__content strong {
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  line-height: 1.25;
}

.article-split__content p {
  margin: 0;
  max-width: 36em;
}

.article-split__content span {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(238, 143, 150, 0.12);
  font-size: 0.92rem;
  font-weight: 800;
}

.article-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--builder-muted);
}

.article-divider::before,
.article-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--builder-line);
}

.article-social {
  display: grid;
  gap: 20px;
  margin-bottom: 36px;
}

.article-social__bar,
.article-comment-box,
.article-comment-card,
.auth-panel {
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-xl);
  background: var(--builder-surface);
  box-shadow: var(--builder-shadow);
  backdrop-filter: blur(18px);
}

.article-social__bar,
.article-comment-box,
.article-comment-card,
.auth-panel {
  padding: 20px;
}

.article-social__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.article-social__stats,
.listing-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.article-social__stats span,
.listing-card__stats span {
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--builder-line);
  color: var(--builder-muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.article-comment-box {
  display: grid;
  gap: 18px;
}

.article-comment-box__head h2 {
  margin: 6px 0 0;
}

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

.article-comment-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.article-comment-card__head span,
.article-comment-card p {
  color: var(--builder-muted);
}

.article-comment-card p {
  margin: 0;
  line-height: 1.8;
}

.auth-shell,
.review-shell {
  display: grid;
  gap: 20px;
}

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

.auth-panel--wide {
  grid-column: 1 / -1;
}

.builder-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #1f232b;
  color: #fff;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: 0.2s ease;
}

.builder-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.listing-shell {
  display: grid;
  gap: 20px;
}

.listing-hero,
.listing-filters,
.listing-card,
.listing-empty {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-xl);
  background: var(--builder-surface);
  box-shadow: var(--builder-shadow);
  backdrop-filter: blur(18px);
}

.listing-hero::before,
.listing-filters::before,
.listing-card::before,
.manage-hero::before,
.manage-panel::before,
.manage-card::before,
.hot-hero::before,
.hot-panel::before,
.hot-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.26), transparent 32%);
  pointer-events: none;
}

.listing-hero,
.listing-filters {
  padding: 24px;
}

.listing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: center;
}

.listing-hero h1,
.listing-filters h2 {
  margin: 6px 0 0;
}

.listing-hero p {
  margin: 14px 0 0;
  color: var(--builder-muted);
  line-height: 1.8;
}

.listing-actions,
.listing-stats {
  display: grid;
  gap: 12px;
}

.listing-search {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.listing-search input {
  width: 100%;
  border: 1px solid var(--builder-line);
  border-radius: 14px;
  background: var(--builder-surface-strong);
  padding: 12px 14px;
}

.listing-stats span:first-child {
  font-size: 1.1rem;
  font-weight: 900;
}

.listing-stats span:last-child {
  color: var(--builder-muted);
}

.listing-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.listing-chip {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--builder-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--builder-muted);
}

.listing-chip.is-active {
  background: var(--builder-accent);
  border-color: transparent;
  color: #fff;
}

.listing-grid {
  display: grid;
  gap: 18px;
}

.listing-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 20px;
  padding: 22px;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.listing-card:hover,
.manage-card:hover,
.hot-card:hover,
.manage-panel:hover,
.hot-panel:hover {
  transform: translateY(-6px);
  border-color: rgba(238, 143, 150, 0.22);
  box-shadow: 0 28px 60px rgba(22, 26, 33, 0.12);
}

.listing-card__meta {
  color: var(--builder-muted);
  font-size: 0.9rem;
}

.listing-card__stats {
  margin-top: 18px;
}

.listing-card__copy h3 {
  margin: 10px 0 12px;
  font-size: 1.4rem;
}

.listing-card__copy h3 a {
  color: inherit;
  text-decoration: none;
}

.listing-card__copy p {
  margin: 0;
  color: var(--builder-muted);
  line-height: 1.85;
}

.listing-card__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.listing-card__cover,
.listing-card__cover img {
  height: 100%;
  min-height: 180px;
  border-radius: 22px;
  object-fit: cover;
}

.listing-empty {
  padding: 28px;
  text-align: center;
}

.manage-shell,
.manage-grid {
  display: grid;
  gap: 20px;
}

.manage-hero,
.manage-panel,
.manage-card,
.manage-empty {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-xl);
  background: var(--builder-surface);
  box-shadow: var(--builder-shadow);
  backdrop-filter: blur(18px);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.manage-hero,
.manage-panel,
.manage-card,
.manage-empty {
  padding: 24px;
}

.manage-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: center;
}

.manage-hero h1,
.manage-panel h2,
.manage-card h3 {
  margin: 6px 0 0;
}

.manage-hero p,
.manage-card p,
.manage-meta {
  color: var(--builder-muted);
  line-height: 1.8;
}

.manage-stats {
  display: grid;
  gap: 10px;
}

.manage-stats strong {
  font-size: 1.1rem;
}

.manage-card-grid {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.manage-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.user-tools {
  display: grid;
  grid-template-columns: minmax(260px, 520px) minmax(0, 1fr);
  gap: 14px;
  align-items: end;
  margin-top: 16px;
}

.user-card {
  border-color: var(--builder-line);
}

.user-card--admin {
  border-color: rgba(238, 143, 150, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top right, rgba(238, 143, 150, 0.16), transparent 34%);
}

.user-card--system {
  border-color: rgba(255, 184, 77, 0.48);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(255, 255, 255, 0.68)),
    radial-gradient(circle at top right, rgba(255, 184, 77, 0.28), transparent 36%);
}

.user-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--builder-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--builder-muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.user-badge--admin {
  border-color: rgba(238, 143, 150, 0.22);
  background: rgba(238, 143, 150, 0.12);
  color: var(--builder-accent-strong);
}

.user-badge--system {
  border-color: rgba(255, 184, 77, 0.46);
  background: rgba(255, 184, 77, 0.16);
  color: #b16f08;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.confirm-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(15, 18, 24, 0.46);
  backdrop-filter: blur(14px);
}

.confirm-modal__panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--builder-line);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 30px 80px rgba(15, 18, 24, 0.22);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.24s ease;
}

.confirm-modal.is-open .confirm-modal__panel {
  transform: translateY(0) scale(1);
}

.confirm-modal__panel h2 {
  margin: 8px 0 10px;
}

.confirm-modal__panel p {
  margin: 0;
  color: var(--builder-muted);
  line-height: 1.8;
}

.confirm-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.manage-media-editor {
  display: grid;
  gap: 16px;
}

.manage-media-card {
  padding: 18px;
  border: 1px solid var(--builder-line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.68);
}

.manage-media-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.manage-media-card__head strong {
  font-size: 1rem;
}

.manage-code {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #171a20;
  color: #eef2f7;
  overflow: auto;
}

.hot-shell {
  display: grid;
  gap: 20px;
}

.hot-overview,
.hot-radar {
  display: grid;
  gap: 16px;
}

.hot-overview {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hot-metric,
.hot-radar-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-xl);
  background: var(--builder-surface);
  box-shadow: var(--builder-shadow);
  backdrop-filter: blur(18px);
}

.hot-metric::before,
.hot-radar-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.04)),
    radial-gradient(circle at top right, rgba(238, 143, 150, 0.16), transparent 34%);
  pointer-events: none;
}

.hot-metric strong {
  display: block;
  margin: 10px 0 8px;
  font-size: clamp(1.6rem, 3vw, 2.8rem);
  line-height: 1;
}

.hot-metric p,
.hot-radar-card p,
.hot-radar__empty {
  margin: 0;
  color: var(--builder-muted);
  line-height: 1.8;
}

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

.hot-radar-card {
  min-height: 180px;
  display: grid;
  align-content: start;
  gap: 10px;
}

.hot-radar-card strong {
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 1;
}

.hot-radar-card__headline {
  margin-top: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.56);
  color: var(--builder-ink);
  font-weight: 800;
  line-height: 1.6;
}

.hot-radar__empty {
  padding: 20px;
  border-radius: 20px;
  border: 1px dashed var(--builder-line);
  text-align: center;
}

.hot-hero,
.hot-panel,
.hot-card {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--builder-line);
  border-radius: var(--builder-radius-xl);
  background: var(--builder-surface);
  box-shadow: var(--builder-shadow);
  backdrop-filter: blur(18px);
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.hot-hero,
.hot-panel {
  padding: 24px;
}

.hot-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  align-items: center;
}

.hot-hero h1,
.hot-panel h2 {
  margin: 6px 0 0;
}

.hot-hero p,
.hot-status span,
.hot-item__copy p,
.hot-card__head span {
  color: var(--builder-muted);
}

.hot-hero__actions,
.hot-status {
  display: grid;
  gap: 12px;
}

.hot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  align-items: stretch;
}

.hot-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 520px;
  max-height: 620px;
  padding: 18px;
  transition:
    transform 0.32s ease,
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.hot-card__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.hot-card__head strong {
  display: block;
}

.hot-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--builder-muted);
  font-size: 0.84rem;
}

.hot-card__hint {
  padding: 6px 10px;
  border: 1px solid var(--builder-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.hot-list {
  display: grid;
  gap: 10px;
  min-height: 0;
  overflow: auto;
  padding-right: 6px;
  align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(238, 143, 150, 0.72) transparent;
}

.hot-list::-webkit-scrollbar {
  width: 8px;
}

.hot-list::-webkit-scrollbar-thumb {
  border-width: 1px;
}

.hot-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: var(--builder-surface-strong);
  text-decoration: none;
  color: inherit;
  transition:
    transform 0.24s ease,
    background 0.24s ease,
    box-shadow 0.24s ease;
}

.hot-item:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 28px rgba(22, 26, 33, 0.08);
}

.hot-item__rank {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(238, 143, 150, 0.12);
  color: var(--builder-accent-strong);
  font-weight: 900;
}

.hot-item__copy {
  display: grid;
  gap: 6px;
}

.hot-item__copy strong {
  line-height: 1.5;
}

.hot-item__copy p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.7;
}

.hot-empty {
  display: grid;
  gap: 12px;
}

.hot-empty p {
  margin: 0;
  line-height: 1.8;
}

@media (max-width: 1180px) {
  .builder-shell,
  .article-hero,
  .article-split,
  .listing-hero,
  .listing-card,
  .manage-hero,
  .hot-hero {
    grid-template-columns: 1fr;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

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

  .builder-panel--sticky {
    position: static;
  }
}

@media (max-width: 760px) {
  .builder-page {
    width: min(100% - 16px, var(--builder-max));
    padding-top: 12px;
  }

  .builder-topbar,
  .builder-stage,
  .builder-preview,
  .builder-panel,
  .article-layout {
    border-radius: 22px;
  }

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

  .user-tools {
    grid-template-columns: 1fr;
  }

  .article-content {
    gap: 22px;
  }

  .article-block {
    width: min(100% - 18px, 1180px);
  }

  .hot-card {
    min-height: 440px;
    max-height: 560px;
  }

  .hot-overview,
  .hot-radar {
    grid-template-columns: 1fr;
  }

  .article-floating-button {
    right: 16px;
    bottom: 16px;
  }

  .article-toc-panel {
    top: auto;
    right: 12px;
    bottom: 76px;
    width: min(100vw - 24px, 420px);
    max-height: min(60vh, 420px);
  }
}
