/* 原 styles.css L2186-L2597 连续区间纯移动（UI 重构阶段 A）。内容：文章选项卡 + article-preview 公共排版（区间内含少量编辑器规则，保持原序未拆）。层叠顺序由 01→12 的 <link> 顺序保持。 */
.pages.article-mode {
  display: flex;
  justify-content: center;
  padding: 36px 28px 54px;
}

.article-settings {
  position: sticky;
  top: 118px;
  display: grid;
  gap: 20px;
  width: 260px;
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
}

.article-settings[hidden] {
  display: none;
}

.article-settings section {
  display: grid;
  gap: 10px;
}

.article-settings h3 {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
}

.article-option-grid,
.article-color-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.article-option-grid.three {
  grid-template-columns: repeat(3, 1fr);
}

.article-option,
.article-color {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--control-text);
  background: var(--control-bg);
  font-size: 13px;
  font-weight: 800;
}

.article-option.active,
.article-color.active {
  border-color: var(--active-border);
  /* 描边加强由 border 自己完成，不挂 inset ring（按钮不挂 box-shadow）。 */
  outline: 1px solid var(--active-border);
  outline-offset: -2px;
}

.article-color {
  position: relative;
  justify-content: flex-start;
  padding-left: 28px;
  text-align: left;
}

.article-color::before {
  content: "";
  position: absolute;
  left: 10px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--swatch);
  transform: translateY(-50%);
}

.article-preview {
  width: min(520px, 100%);
  min-height: 820px;
  padding: 44px 42px 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #1f2937;
  background: #fff;
  box-shadow: var(--shadow-card);
  font-family: var(--article-font, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  letter-spacing: 0.02em;
  line-height: 2;
}

.article-font-serif {
  --article-font: Georgia, "Times New Roman", "Songti SC", SimSun, serif;
}

.article-font-mono {
  --article-font: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.article-font-kai {
  --article-font: "Kaiti SC", STKaiti, KaiTi, serif;
}

.article-size-small {
  font-size: 15px;
}

.article-size-normal {
  font-size: 17px;
}

.article-size-large {
  font-size: 19px;
}

.article-preview h1,
.article-preview h2,
.article-preview h3,
.article-preview p,
.article-preview blockquote,
.article-preview ul,
.article-preview pre,
.article-preview figure,
.article-table-wrap {
  margin: 0 0 24px;
}

.article-preview h1 {
  position: relative;
  padding-bottom: 14px;
  color: #111827;
  font-size: 1.45em;
  line-height: 1.35;
}

.article-preview h2 {
  margin-top: 34px;
  font-size: 1.16em;
  line-height: 1.45;
}

.article-preview h3 {
  font-size: 1.02em;
}

.article-preview p {
  letter-spacing: inherit;
}

.article-preview strong {
  font-weight: 800;
  display: inline !important;
}

.article-preview blockquote {
  padding: 18px 20px;
  border-left: 4px solid var(--article-accent);
  border-radius: 8px;
  color: #273445;
}

.article-preview code {
  padding: 2px 5px;
  border-radius: 4px;
  color: #1f2937;
  background: #eef0f3;
  font-family: "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", Menlo, monospace;
}

.article-preview pre {
  overflow: auto;
  padding: 18px;
  border-radius: 8px;
  color: #dbeafe;
  background: #0b1117;
  white-space: normal;
}

.article-preview pre code {
  padding: 0;
  color: inherit;
  background: transparent;
}

.article-preview img {
  display: block;
  max-width: 100%;
  border-radius: 8px;
}

.article-live-stage {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #05070b;
}

.article-live-stage > img {
  width: 100%;
  height: auto;
}

.article-live-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.article-live-badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 8, 14, 0.56);
  backdrop-filter: blur(8px);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.08em;
}

.article-live-badge svg {
  width: 13px;
  height: 13px;
}

/* 和 LIVE 角标对角摆，避免压住画面主体。 */
.article-live-actions {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.article-live-stage:hover .article-live-actions,
.article-live-actions:focus-within {
  opacity: 1;
}

.article-live-action {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.56);
  border-radius: 999px;
  color: #fff;
  background: rgba(5, 8, 14, 0.56);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.article-live-action:hover {
  color: #05080e;
  background: rgba(255, 255, 255, 0.92);
}

.article-live-action svg {
  width: 15px;
  height: 15px;
}

/* 触摸设备没有 hover，直接常显。 */
@media (hover: none) {
  .article-live-actions {
    opacity: 1;
  }
}

.article-table-wrap {
  overflow-x: auto;
  border: 1px solid #d7dde5;
  border-radius: 8px;
}

.article-preview table {
  width: 100%;
  min-width: 360px;
  border-collapse: collapse;
  font-size: 0.88em;
  line-height: 1.55;
}

.article-preview th,
.article-preview td {
  padding: 10px 12px;
  border-right: 1px solid #e4e8ee;
  border-bottom: 1px solid #e4e8ee;
  text-align: left;
  vertical-align: top;
}

.article-preview th:last-child,
.article-preview td:last-child {
  border-right: 0;
}

.article-preview tbody tr:last-child td {
  border-bottom: 0;
}

.article-preview th {
  font-weight: 800;
}

/* 经典皮肤。公共层只留排版结构；色条、色块和取色器默认值都归这里。 */
.article-theme-classic {
  --article-accent: #145da0;
}

.article-theme-classic h1 {
  text-align: center;
}

.article-theme-classic h1::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 2px;
  background: var(--article-accent);
}

.article-theme-classic h2 {
  display: table;
  padding: 3px 8px;
  color: var(--article-accent);
  background: color-mix(in srgb, var(--article-accent) 14%, white);
}

.article-theme-classic h3,
.article-theme-classic th {
  color: var(--article-accent);
}

.article-theme-classic th {
  background: color-mix(in srgb, var(--article-accent) 11%, #fff);
}

.article-theme-classic strong {
  background: color-mix(in srgb, var(--article-accent) 18%, transparent);
}

.article-theme-classic blockquote {
  background: color-mix(in srgb, var(--article-accent) 10%, white);
  font-style: italic;
}

.article-theme-classic .article-table-wrap {
  border-color: color-mix(in srgb, var(--article-accent) 26%, #d7dde5);
}

.article-theme-classic {
  --article-underline-color: var(--article-accent);
}

.article-theme-classic ul li::before {
  content: "•";
  font-size: 1.15em;
  margin-right: 10px;
  vertical-align: -1px;
}

.article-theme-classic figure img,
.article-theme-classic .article-live-stage {
  border: 3px solid var(--article-accent);
  border-radius: 8px;
}

.article-theme-classic .article-live-badge,
.article-theme-classic .article-live-action {
  color: #fff;
  background: var(--article-accent);
  border-color: var(--article-accent);
}

.article-empty {
  /* 空态提示跟随皮肤次级文字色：写死的 #94a3b8 在两套皮肤下都不到 4.5:1。 */
  color: var(--muted);
  text-align: center;
}

.page-shell {
  display: grid;
  gap: 10px;
  width: min(100%, 864px);
  justify-self: center;
}

