/* ==========================================================================
   Base & Reset
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html.is-preload-transitions,
html.is-preload-transitions *,
html.is-preload-transitions *::before,
html.is-preload-transitions *::after {
  transition: none !important;
}

html {
  overflow-y: auto;
  scrollbar-width: none;
  transition: background-color 0.25s ease;
}

html::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.page-scrollbar {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 100000;
  width: 12px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  contain: layout paint style;
  isolation: isolate;
  transform: translateZ(0);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}

.page-scrollbar[hidden] {
  display: none;
}

.page-scrollbar-thumb {
  position: absolute;
  top: 0;
  right: 3px;
  width: 6px;
  min-height: 40px;
  border-radius: 999px;
  background: #b9b8b4;
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  will-change: transform;
  cursor: grab;
}

.page-scrollbar-thumb.is-dragging {
  cursor: grabbing;
}

html[data-theme="magazine"] .page-scrollbar-thumb,
html[data-theme="cards"] .page-scrollbar-thumb {
  background: #8e8d89;
}

html[data-theme="cyberdeck"] .page-scrollbar-thumb {
  background: #03702f;
}

body {
  margin: 0;
  min-height: 100vh;
  line-height: 1.7;
}

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

.media-video {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 2.5em 0;
  text-align: center;
}

.media-video video {
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  margin: 0 auto;
  display: block;
}

.media-video.media-video-portrait video {
  width: 100%;
  max-width: 320px;
  max-height: 65vh;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.media-video figcaption {
  text-align: center;
  margin-top: 10px;
}

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

@media (max-width: 640px) {
  .media-grid { grid-template-columns: 1fr; }
}

.media-grid-item { display: flex; flex-direction: column; }
.media-grid-item img, .media-grid-item video { width: 100%; height: auto; display: block; }

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4,
.article-body h5,
.article-body h6 {
  margin: 1.8em 0 0.6em;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.015em;
}
.article-body h1 { font-size: 1.55em; }
.article-body h2 { font-size: 1.35em; }
.article-body h3 { font-size: 1.18em; }
.article-body h4 { font-size: 1.05em; }

.article-body ul,
.article-body ol {
  margin: 0 0 1.6em;
  padding-left: 1.5em;
}
.article-body li {
  margin: 0.45em 0;
  line-height: 1.75;
}
.article-body li::marker {
  color: inherit;
  opacity: 0.7;
}

.article-body hr {
  border: none;
  border-top: 1px solid rgba(128, 128, 128, 0.22);
  margin: 2.5em 0;
}

.cyber-sys-info { display: none; }

/* ==========================================================================
   Floating Theme Dock (Precision Unified Segmented Control)
   ========================================================================== */
.floating-theme-dock {
  position: fixed;
  z-index: 99999;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px 3px 3px 5px;
  height: auto;
  border-radius: 9999px;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  cursor: grab;
  will-change: left, right, top, bottom;
  box-sizing: border-box;
  width: fit-content;
  max-width: calc(100vw - 36px);
  border: 1.5px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.floating-theme-dock.is-dragging {
  cursor: grabbing;
  transform: scale(1.02);
}

.dock-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.45;
  color: currentColor;
  cursor: grab;
  padding: 5px 3px 5px 3px;
  border-radius: 9999px;
  transition: opacity 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

.dock-handle:hover { opacity: 0.9; background: rgba(128, 128, 128, 0.15); }
.floating-theme-dock.is-dragging .dock-handle { cursor: grabbing; opacity: 1; background: rgba(128, 128, 128, 0.2); }

.theme-switcher {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 9999px;
  gap: 2px;
  white-space: nowrap;
  box-sizing: border-box;
  border: 1px solid transparent;
  transition: background-color 0.2s ease, border-color 0.2s ease, gap 0.25s cubic-bezier(0.2, 0, 0, 1);
}

.theme-seg-btn {
  border: none;
  background: transparent;
  color: inherit;
  border-radius: 9999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 32px;
  height: 26px;
  padding: 0;
  opacity: 0.45;
  flex-shrink: 0;
  overflow: hidden;
  transition: width 0.25s cubic-bezier(0.2, 0, 0, 1), opacity 0.2s ease, transform 0.2s cubic-bezier(0.2, 0, 0, 1), background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.theme-seg-btn:hover { opacity: 0.85; }
.theme-seg-btn.active { opacity: 1; }
.theme-seg-btn svg { display: block; pointer-events: none; flex-shrink: 0; }

/* Auto-collapse: show only active button when not hovered */
.floating-theme-dock:not(.is-expanded) .theme-seg-btn:not(.active) {
  width: 0;
  opacity: 0;
  transform: scale(0.7);
  pointer-events: none;
  margin: 0;
  padding: 0;
}
.floating-theme-dock:not(.is-expanded) .theme-switcher { gap: 0; }

/* ==========================================================================
   Language Switcher & Fallback Styles
   ========================================================================== */

.article-fallback-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin: 18px 0 28px;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.5;
  background: rgba(128, 128, 128, 0.08);
  border: 1px dashed rgba(128, 128, 128, 0.3);
  color: inherit;
}
.article-fallback-notice .fallback-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tag-badge.zh-only-badge {
  background: rgba(128, 128, 128, 0.15);
  color: inherit;
  border: 1px solid rgba(128, 128, 128, 0.3);
  font-size: 9.5px;
  margin-left: 4px;
}


/* ==========================================================================
   THEME 1: Editorial (经典报刊 · 默认)
   ========================================================================== */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600 700;
  font-display: block;
  src: url('assets/fonts/cormorant-garamond-700.woff2') format('woff2');
}

html[data-theme="editorial"] {
  --paper: #fffefd;
  --ink: #20201e;
  --muted: #74736e;
  --rule: #deddd8;
  background: var(--paper);
}

html[data-theme="editorial"] body {
  color: var(--ink);
  font-family: ui-serif, Georgia, "Songti SC", "Noto Serif SC", serif;
}

html[data-theme="editorial"] .site-header {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 28px 24px;
  border-bottom: 1px solid var(--rule);
}

html[data-theme="editorial"] .site-header-editorial-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

html[data-theme="editorial"] .header-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  line-height: 1;
}

html[data-theme="editorial"] .header-lang-switch .lang-btn {
  color: var(--muted);
  text-decoration: none !important;
  padding: 1px 2px;
  transition: color 0.15s ease;
}

html[data-theme="editorial"] .header-lang-switch .lang-btn:hover {
  color: var(--ink);
  text-decoration: none !important;
}

html[data-theme="editorial"] .header-lang-switch .lang-btn.is-active {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none !important;
  cursor: default;
  pointer-events: none;
}

html[data-theme="editorial"] .header-lang-switch .lang-sep {
  color: var(--rule);
  font-size: 11px;
  user-select: none;
}

html[data-theme="editorial"] .header-nav-divider {
  color: var(--rule);
  font-size: 13px;
  user-select: none;
  margin: 0 -4px;
}

html[data-theme="editorial"] .site-header-mag-masthead,
html[data-theme="editorial"] .site-header-cyber-masthead {
  display: none;
}

html[data-theme="editorial"] .site-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Cormorant Garamond", Georgia, "Songti SC", "Noto Serif SC", serif;
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  color: inherit;
  text-decoration: none;
  transform-origin: left center;
  transition: transform 0.2s cubic-bezier(0.2, 0, 0, 1);
}

html[data-theme="editorial"] .site-title:hover {
  transform: scale(1.06);
}

html[data-theme="editorial"] .site-logo-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  display: block;
}

html[data-theme="editorial"] .nav-editorial {
  display: flex;
  gap: 20px;
  font: 14px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="editorial"] .nav-editorial a { color: var(--muted); text-decoration: none; }
html[data-theme="editorial"] .nav-editorial a:hover,
html[data-theme="editorial"] .nav-editorial a.is-active {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

html[data-theme="editorial"] .page {
  max-width: 900px;
  margin: 0 auto;
  padding: 72px 28px 96px;
}

html[data-theme="editorial"] .eyebrow,
html[data-theme="editorial"] .tag,
html[data-theme="editorial"] time {
  font: 11px/1.2 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
}

html[data-theme="editorial"] .page h1 {
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.15;
  margin: 12px 0 16px;
  font-size: clamp(40px, 7vw, 68px);
}

html[data-theme="editorial"] .intro { max-width: 38em; margin: 0; color: #4a4945; font-size: 20px; }

html[data-theme="editorial"] .post-list {
  margin-top: 62px;
  border-top: 1px solid var(--rule);
}

html[data-theme="editorial"] .mag-col { display: contents; }

html[data-theme="editorial"] .post-item {
  display: block;
  padding: 26px 0 30px;
  border-bottom: 1px solid var(--rule);
}

html[data-theme="editorial"] .list-cover {
  display: none;
}

html[data-theme="editorial"] .post-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
}

html[data-theme="editorial"] .post-date-badge,
html[data-theme="editorial"] .post-date-dot,
html[data-theme="editorial"] .tag-badges,
html[data-theme="editorial"] .archive-tag-badges { display: none; }

html[data-theme="editorial"] .post-item .tag { margin: 0 0 8px; }

html[data-theme="editorial"] .post-item h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

html[data-theme="editorial"] .post-item h2 a { color: inherit; text-decoration: none; }
html[data-theme="editorial"] .post-item h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }

html[data-theme="editorial"] .summary { margin: 8px 0 0; color: #66645f; font-size: 15px; line-height: 1.6; }

html[data-theme="editorial"] .post-date-bottom {
  display: block;
  margin-top: auto;
  padding-top: 18px;
}

html[data-theme="editorial"] .archive-list { margin-top: 54px; border-top: 1px solid var(--rule); }

html[data-theme="editorial"] .archive-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 24px;
  padding: 15px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 16px;
}

html[data-theme="editorial"] .archive-item a { color: inherit; text-decoration: none; }
html[data-theme="editorial"] .archive-item a:hover { text-decoration: underline; text-underline-offset: 3px; }

html[data-theme="editorial"] .archive-link { margin-top: 28px; font: 13px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
html[data-theme="editorial"] .archive-link a { color: var(--muted); text-decoration: none; }
html[data-theme="editorial"] .archive-link a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Article */
html[data-theme="editorial"] .article { max-width: 900px; margin: 0 auto; padding: 72px 28px 96px; }
html[data-theme="editorial"] .article-meta-header { margin-bottom: 16px; }
html[data-theme="editorial"] .article-meta-header .tag { margin: 0 0 14px; }
html[data-theme="editorial"] .article-date { display: block; margin-bottom: 20px; }

html[data-theme="editorial"] .article h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.25;
  margin: 14px 0 20px;
  max-width: 100%;
}

html[data-theme="editorial"] .lead { margin: 0 0 48px; font-size: 21px; line-height: 1.65; color: #4a4945; max-width: 100%; }

html[data-theme="editorial"] .article-body { max-width: 100%; font-size: 19px; line-height: 1.8; }
html[data-theme="editorial"] .article-body p { margin: 0 0 1.6em; }
html[data-theme="editorial"] .article-body figure { margin: 2.5em 0; }
html[data-theme="editorial"] .article-body img { border-radius: 2px; }
html[data-theme="editorial"] .article-body video { max-width: 100%; max-height: 65vh; border-radius: 4px; display: block; margin: 0 auto; }
html[data-theme="editorial"] .article-body .media-video { display: flex; flex-direction: column; align-items: center; margin: 2.5em auto; }
html[data-theme="editorial"] .article-body .media-video.media-video-portrait video { width: 100%; max-width: 320px; max-height: 65vh; object-fit: contain; margin: 0 auto; border-radius: 8px; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08); }
html[data-theme="editorial"] .article-body figcaption { margin-top: 10px; color: var(--muted); font: 13px/1.45 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; }
html[data-theme="editorial"] .article-body .media-video figcaption { text-align: center; }
html[data-theme="editorial"] .article-body code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 0.86em; background: #f3f2ee; padding: 3px 7px; border-radius: 4px; color: #1e1e1e; }
html[data-theme="editorial"] .article-body pre { background: #f8f7f4; padding: 18px 22px; border-radius: 6px; overflow-x: auto; border: 1px solid var(--rule); margin: 1.8em 0; }
html[data-theme="editorial"] .article-body pre code { background: none; padding: 0; font-size: 14px; line-height: 1.65; color: #2c2c2a; }
html[data-theme="editorial"] .article-body a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="editorial"] .article-body a:hover { color: var(--muted); }
html[data-theme="editorial"] .article-body h1,
html[data-theme="editorial"] .article-body h2,
html[data-theme="editorial"] .article-body h3,
html[data-theme="editorial"] .article-body h4 {
  color: var(--ink);
  font-family: inherit;
}
html[data-theme="editorial"] .article-body hr {
  border-top: 1px solid var(--rule);
}
html[data-theme="editorial"] .article-body blockquote { margin: 2em 0; padding: 16px 20px; border-left: 3px solid var(--ink); background: #fbfaf7; color: #55534e; font-size: 0.95em; }
html[data-theme="editorial"] .article-body blockquote p { margin: 0; line-height: 1.7; }

html[data-theme="editorial"] .back { display: inline-block; margin-top: 48px; font: 14px/1 ui-sans-serif, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; color: var(--muted); text-decoration: none; }
html[data-theme="editorial"] .back:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Editorial Floating Dock */
html[data-theme="editorial"] .floating-theme-dock {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
  color: #20201e;
}

html[data-theme="editorial"] .floating-theme-dock .theme-switcher { background: rgba(0, 0, 0, 0.05); border-color: transparent; }
html[data-theme="editorial"] .floating-theme-dock .theme-seg-btn.active { background: #ffffff; color: #161513; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); }
html[data-theme="editorial"] .floating-theme-dock.is-dragging { box-shadow: 0 18px 48px rgba(0, 0, 0, 0.18); }

/* ==========================================================================
   THEME 2: Magazine / Quirky Orbit (画报潮流)
   ========================================================================== */
html[data-theme="magazine"],
html[data-theme="cards"] {
  --mag-bg: #ffffff;
  --mag-black: #000000;
  --mag-border: 2px solid #000000;
  --mag-border-thick: 2.5px solid #000000;
  --font-impact: Impact, "Arial Narrow", "Haettenschweiler", "Franklin Gothic Medium", -apple-system, sans-serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--mag-bg);
}

html[data-theme="magazine"] body,
html[data-theme="cards"] body {
  color: #000000;
  font-family: var(--font-sans);
  background: #ffffff;
}

html[data-theme="magazine"] .site-header-editorial-bar,
html[data-theme="cards"] .site-header-editorial-bar,
html[data-theme="magazine"] .site-header-cyber-masthead,
html[data-theme="cards"] .site-header-cyber-masthead { display: none; }

html[data-theme="magazine"] .page-intro-editorial,
html[data-theme="cards"] .page-intro-editorial { display: none; }

html[data-theme="magazine"] .site-header,
html[data-theme="cards"] .site-header { max-width: 1240px; margin: 0 auto; padding: 24px 24px 0; }

html[data-theme="magazine"] .site-header-mag-masthead,
html[data-theme="cards"] .site-header-mag-masthead { display: flex; flex-direction: column; gap: 12px; }

html[data-theme="magazine"] .mag-masthead-main,
html[data-theme="cards"] .mag-masthead-main {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 10px 0 16px;
}

html[data-theme="magazine"] .mag-logo,
html[data-theme="cards"] .mag-logo {
  font-family: var(--font-impact);
  font-size: clamp(38px, 6.2vw, 84px);
  line-height: 0.88;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: #000000;
  text-decoration: none;
  font-weight: 900;
}

html[data-theme="magazine"] .mag-slogan,
html[data-theme="cards"] .mag-slogan {
  display: flex; flex-direction: column;
  font-family: var(--font-impact);
  font-size: clamp(16px, 2.3vw, 26px);
  line-height: 0.96; letter-spacing: -0.01em;
  text-transform: uppercase; text-align: left;
  max-width: 380px; color: #000000; padding-bottom: 4px;
}

html[data-theme="magazine"] .mag-bar-primary,
html[data-theme="cards"] .mag-bar-primary {
  display: flex; justify-content: space-between; align-items: center;
  border: var(--mag-border-thick); padding: 10px 18px; background: #ffffff;
}

html[data-theme="magazine"] .mag-bar-left,
html[data-theme="cards"] .mag-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

html[data-theme="magazine"] .mag-crumb,
html[data-theme="cards"] .mag-crumb {
  font-family: var(--font-impact); font-size: 20px; letter-spacing: 0.04em;
  text-transform: uppercase; color: #000000; text-decoration: none;
}

html[data-theme="magazine"] .mag-crumb-sep,
html[data-theme="cards"] .mag-crumb-sep {
  font-family: var(--font-impact);
  font-size: 16px;
  color: #888888;
  user-select: none;
}

html[data-theme="magazine"] .mag-lang-switch,
html[data-theme="cards"] .mag-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-impact);
  font-size: 15px;
  letter-spacing: 0.04em;
}

html[data-theme="magazine"] .mag-lang-btn,
html[data-theme="cards"] .mag-lang-btn {
  color: #888888;
  text-decoration: none;
  transition: color 0.15s ease;
}

html[data-theme="magazine"] .mag-lang-btn:hover,
html[data-theme="cards"] .mag-lang-btn:hover {
  color: #000000;
}

html[data-theme="magazine"] .mag-lang-btn.is-active,
html[data-theme="cards"] .mag-lang-btn.is-active {
  color: #000000;
  font-weight: 900;
  cursor: default;
  pointer-events: none;
}

html[data-theme="magazine"] .mag-lang-sep,
html[data-theme="cards"] .mag-lang-sep {
  color: #cccccc;
  user-select: none;
}

html[data-theme="magazine"] .mag-nav-links,
html[data-theme="cards"] .mag-nav-links { display: flex; align-items: center; gap: 26px; }

html[data-theme="magazine"] .mag-nav-links a,
html[data-theme="cards"] .mag-nav-links a {
  font-family: var(--font-impact); font-size: 18px; letter-spacing: 0.05em;
  text-transform: uppercase; color: #000000; text-decoration: none; transition: opacity 0.15s ease;
}

html[data-theme="magazine"] .mag-nav-links a:hover,
html[data-theme="cards"] .mag-nav-links a:hover,
html[data-theme="magazine"] .mag-nav-links a.is-current,
html[data-theme="cards"] .mag-nav-links a.is-current { text-decoration: underline; text-underline-offset: 3px; }

html[data-theme="magazine"] .page,
html[data-theme="cards"] .page { max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }

html[data-theme="magazine"] .post-list,
html[data-theme="cards"] .post-list {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 16px;
  border: none;
}

html[data-theme="magazine"] .mag-col,
html[data-theme="cards"] .mag-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
  flex: 1;
  min-width: 0;
}

html[data-theme="magazine"] .post-item,
html[data-theme="cards"] .post-item {
  display: flex;
  flex-direction: column;
  width: 100%;
  background: #ffffff;
  padding: 0;
  border: none;
  min-height: 0;
}

html[data-theme="magazine"] .list-cover,
html[data-theme="cards"] .list-cover { display: block; width: 100%; margin-bottom: 12px; text-decoration: none; }

html[data-theme="magazine"] .cover-frame,
html[data-theme="cards"] .cover-frame {
  width: 100%; overflow: hidden; display: block; background: #f4f4f4;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

html[data-theme="magazine"] .post-item:hover .cover-frame,
html[data-theme="cards"] .post-item:hover .cover-frame { transform: translateY(-3px); }

html[data-theme="magazine"] .cover-frame img,
html[data-theme="cards"] .cover-frame img { width: 100%; height: auto; display: block; }

/* Colorful frame borders */
html[data-theme="magazine"] .post-item[data-color-index="1"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="1"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 1) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 1) .cover-frame { border: 7px solid #d4c9b8; }

html[data-theme="magazine"] .post-item[data-color-index="2"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="2"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 2) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 2) .cover-frame { border: 7px solid #f99f38; }

html[data-theme="magazine"] .post-item[data-color-index="3"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="3"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 3) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 3) .cover-frame { border: 7px solid #1a1a1a; }

html[data-theme="magazine"] .post-item[data-color-index="4"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="4"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 4) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 4) .cover-frame { border: 7px solid #a3cc69; }

html[data-theme="magazine"] .post-item[data-color-index="5"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="5"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 5) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 5) .cover-frame { border: 7px solid #ff2a9d; }

html[data-theme="magazine"] .post-item[data-color-index="6"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="6"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 6) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 6) .cover-frame { border: 7px solid #f59e0b; }

html[data-theme="magazine"] .post-item[data-color-index="7"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="7"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 7) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 7) .cover-frame { border: 7px solid #c084fc; }

html[data-theme="magazine"] .post-item[data-color-index="8"] .cover-frame,
html[data-theme="cards"] .post-item[data-color-index="8"] .cover-frame,
html[data-theme="magazine"] .post-item:nth-child(8n + 8) .cover-frame,
html[data-theme="cards"] .post-item:nth-child(8n + 8) .cover-frame { border: 7px solid #38bdf8; }

html[data-theme="magazine"] .post-copy,
html[data-theme="cards"] .post-copy { display: flex; flex-direction: column; }

html[data-theme="magazine"] .post-item h2,
html[data-theme="cards"] .post-item h2 {
  font-family: var(--font-impact); font-size: 23px; line-height: 1.14;
  letter-spacing: -0.01em; text-transform: uppercase; font-weight: 900;
  margin: 0 0 10px; color: #000000;
}

html[data-theme="magazine"] .post-item h2 a,
html[data-theme="cards"] .post-item h2 a { color: #000000; text-decoration: none; }
html[data-theme="magazine"] .post-item h2 a:hover,
html[data-theme="cards"] .post-item h2 a:hover { text-decoration: underline; text-underline-offset: 2px; }

html[data-theme="magazine"] .post-date-dot,
html[data-theme="magazine"] .post-date-bottom,
html[data-theme="magazine"] .post-tags-container .tag,
html[data-theme="cards"] .post-date-dot,
html[data-theme="cards"] .post-date-bottom,
html[data-theme="cards"] .post-tags-container .tag { display: none; }

html[data-theme="magazine"] .post-meta-top,
html[data-theme="cards"] .post-meta-top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 6px;
}

html[data-theme="magazine"] .post-date-badge,
html[data-theme="cards"] .post-date-badge {
  display: inline-block; font-family: var(--font-impact); font-size: 13px;
  font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #000000; margin-right: 2px;
}

html[data-theme="magazine"] .tag-badges,
html[data-theme="cards"] .tag-badges { display: inline-flex; flex-wrap: wrap; gap: 5px; }

html[data-theme="magazine"] .tag-badge,
html[data-theme="cards"] .tag-badge {
  display: inline-flex; align-items: center;
  border: 1.5px solid #000000; padding: 2px 7px;
  font-family: var(--font-sans); font-size: 10.5px;
  font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  background: #ffffff; color: #000000; line-height: 1.2;
}

html[data-theme="magazine"] .summary,
html[data-theme="cards"] .summary { display: none; }

/* Archive */
html[data-theme="magazine"] .archive-list,
html[data-theme="cards"] .archive-list { display: grid; gap: 8px; margin-top: 24px; border-top: none; }

html[data-theme="magazine"] .archive-item,
html[data-theme="cards"] .archive-item {
  display: grid; grid-template-columns: 110px 1fr;
  align-items: center; gap: 18px; padding: 14px 18px;
  border: var(--mag-border); background: #ffffff;
  transition: transform 0.15s ease, background 0.15s ease;
}

html[data-theme="magazine"] .archive-item:hover,
html[data-theme="cards"] .archive-item:hover { background: #f9f9f9; transform: translateX(4px); }

html[data-theme="magazine"] .archive-date,
html[data-theme="cards"] .archive-date { font-family: var(--font-impact); font-size: 15px; letter-spacing: 0.04em; color: #000000; }

html[data-theme="magazine"] .archive-title,
html[data-theme="cards"] .archive-title {
  font-family: var(--font-impact); font-size: 19px; text-transform: uppercase;
  color: #000000; text-decoration: none; letter-spacing: -0.01em;
}
html[data-theme="magazine"] .archive-title:hover,
html[data-theme="cards"] .archive-title:hover { text-decoration: underline; text-underline-offset: 3px; }

html[data-theme="magazine"] .archive-link,
html[data-theme="cards"] .archive-link { margin-top: 36px; }
html[data-theme="magazine"] .archive-link a,
html[data-theme="cards"] .archive-link a {
  display: inline-block; border: var(--mag-border-thick); padding: 8px 18px;
  font-family: var(--font-impact); font-size: 16px; letter-spacing: 0.04em;
  text-transform: uppercase; color: #000000; text-decoration: none;
  background: #ffffff; box-shadow: 3px 3px 0 #000000; transition: all 0.15s ease;
}
html[data-theme="magazine"] .archive-link a:hover,
html[data-theme="cards"] .archive-link a:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #000000; }

/* Article */
html[data-theme="magazine"] .article,
html[data-theme="cards"] .article { max-width: 1240px; margin: 28px auto 96px; padding: 0 24px; }

html[data-theme="magazine"] .article-meta-header,
html[data-theme="cards"] .article-meta-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: var(--mag-border-thick); padding-bottom: 14px; margin-bottom: 24px;
}

html[data-theme="magazine"] .article-meta-header .tag,
html[data-theme="cards"] .article-meta-header .tag { display: none; }

html[data-theme="magazine"] .article-date,
html[data-theme="cards"] .article-date { font-family: var(--font-impact); font-size: 16px; letter-spacing: 0.05em; color: #000000; }

html[data-theme="magazine"] .article h1,
html[data-theme="cards"] .article h1 {
  font-family: var(--font-impact); font-size: clamp(40px, 6.5vw, 68px);
  font-weight: 900; letter-spacing: -0.025em; line-height: 1.05;
  text-transform: uppercase; margin: 0 0 24px; color: #000000;
}

html[data-theme="magazine"] .lead,
html[data-theme="cards"] .lead {
  font-size: 20px; line-height: 1.6; font-weight: 500; color: #222222;
  border-left: 5px solid #000000; padding: 6px 0 6px 20px; margin: 0 0 44px;
}

html[data-theme="magazine"] .article-body,
html[data-theme="cards"] .article-body { font-size: 18px; line-height: 1.85; color: #111111; }
html[data-theme="magazine"] .article-body p,
html[data-theme="cards"] .article-body p { margin: 0 0 1.6em; }
html[data-theme="magazine"] .article-body figure,
html[data-theme="cards"] .article-body figure { margin: 2.5em 0; border: none; background: transparent; }
html[data-theme="magazine"] .article-body img,
html[data-theme="cards"] .article-body img { width: 100%; display: block; border-radius: 4px; }
html[data-theme="magazine"] .article-body video,
html[data-theme="cards"] .article-body video { max-width: 100%; max-height: 65vh; display: block; border-radius: 4px; margin: 0 auto; }
html[data-theme="magazine"] .article-body .media-video,
html[data-theme="cards"] .article-body .media-video { display: flex; flex-direction: column; align-items: center; margin: 2.5em auto; }
html[data-theme="magazine"] .article-body .media-video.media-video-portrait video,
html[data-theme="cards"] .article-body .media-video.media-video-portrait video { width: 100%; max-width: 320px; max-height: 65vh; object-fit: contain; margin: 0 auto; border-radius: 8px; box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1); }
html[data-theme="magazine"] .article-body figcaption,
html[data-theme="cards"] .article-body figcaption {
  margin-top: 8px; padding: 0; background: transparent; color: #666666;
  font-family: var(--font-sans); font-size: 13px; font-weight: 500; text-transform: none; border-top: none;
}
html[data-theme="magazine"] .article-body .media-video figcaption,
html[data-theme="cards"] .article-body .media-video figcaption { text-align: center; }
html[data-theme="magazine"] .article-body code,
html[data-theme="cards"] .article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 0.88em; background: #f0f0f0; border: 1px solid #000000;
  padding: 2px 6px; border-radius: 2px; color: #000000;
}
html[data-theme="magazine"] .article-body pre,
html[data-theme="cards"] .article-body pre {
  background: #f9f9f9; border: var(--mag-border); padding: 18px 22px;
  border-radius: 0; box-shadow: 4px 4px 0 #000000; margin: 2em 0;
}
html[data-theme="magazine"] .article-body pre code,
html[data-theme="cards"] .article-body pre code { background: none; border: none; padding: 0; font-size: 14px; }
html[data-theme="magazine"] .article-body a,
html[data-theme="cards"] .article-body a { color: #000000; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
html[data-theme="magazine"] .article-body h1,
html[data-theme="magazine"] .article-body h2,
html[data-theme="magazine"] .article-body h3,
html[data-theme="magazine"] .article-body h4,
html[data-theme="cards"] .article-body h1,
html[data-theme="cards"] .article-body h2,
html[data-theme="cards"] .article-body h3,
html[data-theme="cards"] .article-body h4 {
  color: #000000;
  font-family: var(--font-impact);
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
html[data-theme="magazine"] .article-body hr,
html[data-theme="cards"] .article-body hr {
  border-top: 2px solid #000000;
}
html[data-theme="magazine"] .article-body blockquote,
html[data-theme="cards"] .article-body blockquote {
  margin: 2em 0; padding: 16px 20px; border-left: 4px solid #000000;
  background: #f4f4f4; border: 2px solid #000000; box-shadow: 4px 4px 0 #000000;
}
html[data-theme="magazine"] .article-body blockquote p,
html[data-theme="cards"] .article-body blockquote p { margin: 0; line-height: 1.7; font-weight: 500; }

html[data-theme="magazine"] .back,
html[data-theme="cards"] .back {
  display: inline-block; margin-top: 48px; border: var(--mag-border-thick); padding: 9px 20px;
  font-family: var(--font-impact); font-size: 16px; letter-spacing: 0.04em;
  text-transform: uppercase; color: #000000; text-decoration: none;
  background: #ffffff; box-shadow: 3px 3px 0 #000000; transition: all 0.15s ease;
}
html[data-theme="magazine"] .back:hover,
html[data-theme="cards"] .back:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 #000000; }

/* Magazine Floating Dock */
html[data-theme="magazine"] .floating-theme-dock,
html[data-theme="cards"] .floating-theme-dock {
  background: #ffffff; border-color: #000000; box-shadow: 3px 3px 0 #000000; color: #000000;
}
html[data-theme="magazine"] .floating-theme-dock .theme-switcher,
html[data-theme="cards"] .floating-theme-dock .theme-switcher { background: #f0f0f0; border-color: #000000; }
html[data-theme="magazine"] .floating-theme-dock .theme-seg-btn.active,
html[data-theme="cards"] .floating-theme-dock .theme-seg-btn.active { background: #000000; color: #ffffff; box-shadow: none; }
html[data-theme="magazine"] .floating-theme-dock.is-dragging,
html[data-theme="cards"] .floating-theme-dock.is-dragging { box-shadow: 7px 7px 0 #000000; }

/* ==========================================================================
   THEME 3: Cyberdeck / Netrunner (深潜终端 · 黑客代码流)
   ========================================================================== */
html[data-theme="cyberdeck"] {
  --cyber-bg: #050807;
  --cyber-surface: #090e0b;
  --cyber-surface-hover: #0e1612;
  --cyber-green: #00ff66;
  --cyber-green-dim: #00cc52;
  --cyber-green-glow: rgba(0, 255, 102, 0.35);
  --cyber-cyan: #05d9e8;
  --cyber-cyan-glow: rgba(5, 217, 232, 0.35);
  --cyber-heading: #d0edd9;
  --cyber-text: #b2d4c2;
  --cyber-muted: #5e8a70;
  --cyber-border: 1px solid rgba(0, 255, 102, 0.25);
  --cyber-border-bright: 1.5px solid #00ff66;
  --font-mono: ui-monospace, "JetBrains Mono", "SF Mono", "Cascadia Code", Menlo, Monaco, Consolas, monospace;
  background: var(--cyber-bg);
  background-image:
    linear-gradient(rgba(0, 255, 102, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 102, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
}

html[data-theme="cyberdeck"] body { color: var(--cyber-text); font-family: var(--font-mono); background: transparent; }

html[data-theme="cyberdeck"] .site-header-editorial-bar,
html[data-theme="cyberdeck"] .site-header-mag-masthead { display: none; }

html[data-theme="cyberdeck"] .site-header { max-width: 960px; margin: 0 auto; padding: 24px 24px 0; }

html[data-theme="cyberdeck"] .site-header-cyber-masthead { display: flex; flex-direction: column; gap: 14px; }

html[data-theme="cyberdeck"] .cyber-masthead-main {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px dashed rgba(0, 255, 102, 0.3);
}

html[data-theme="cyberdeck"] .cyber-brand { display: flex; align-items: center; gap: 14px; }

html[data-theme="cyberdeck"] .cyber-logo {
  font-family: var(--font-mono); font-size: clamp(22px, 3.5vw, 32px);
  font-weight: 800; color: var(--cyber-green); text-decoration: none;
  letter-spacing: 0.05em; text-shadow: 0 0 10px var(--cyber-green-glow);
}

html[data-theme="cyberdeck"] .cyber-prompt-sym { color: var(--cyber-cyan); }
html[data-theme="cyberdeck"] .cyber-cursor { animation: cyberBlink 1s infinite steps(2, start); color: var(--cyber-green); }

@keyframes cyberBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

html[data-theme="cyberdeck"] .cyber-status-pill {
  font-size: 11px; letter-spacing: 0.08em; padding: 3px 8px;
  background: rgba(0, 255, 102, 0.12); border: 1px solid var(--cyber-green);
  color: var(--cyber-green); border-radius: 2px; text-shadow: 0 0 6px var(--cyber-green-glow);
}

html[data-theme="cyberdeck"] .cyber-sys-info {
  display: flex;
  gap: 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(0, 255, 102, 0.2);
  font-size: 11.5px;
  color: var(--cyber-muted);
  letter-spacing: 0.05em;
}

html[data-theme="cyberdeck"] .cyber-bar-primary {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--cyber-surface); border: var(--cyber-border);
  padding: 10px 18px; border-left: 4px solid var(--cyber-green);
  box-shadow: inset 0 0 15px rgba(0, 255, 102, 0.04);
}

html[data-theme="cyberdeck"] .cyber-bar-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

html[data-theme="cyberdeck"] .cyber-cli-prompt { color: var(--cyber-cyan); font-weight: 700; font-size: 13.5px; }
html[data-theme="cyberdeck"] .cyber-cli-cmd { color: var(--cyber-green); font-size: 13.5px; margin-left: 2px; }

html[data-theme="cyberdeck"] .cyber-lang-switch {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--cyber-muted);
  margin-left: 10px;
}

html[data-theme="cyberdeck"] .cyber-lang-switch a {
  color: var(--cyber-muted);
  text-decoration: none;
  padding: 1px 3px;
  transition: all 0.15s ease;
}

html[data-theme="cyberdeck"] .cyber-lang-switch a:hover {
  color: var(--cyber-green);
}

html[data-theme="cyberdeck"] .cyber-lang-switch a.is-active {
  color: var(--cyber-green);
  text-shadow: 0 0 6px var(--cyber-green-glow);
  font-weight: 700;
  cursor: default;
  pointer-events: none;
}

html[data-theme="cyberdeck"] .cyber-nav-links { display: flex; align-items: center; gap: 16px; }
html[data-theme="cyberdeck"] .cyber-nav-links a {
  font-family: var(--font-mono); font-size: 13.5px; color: var(--cyber-muted);
  text-decoration: none; transition: all 0.15s ease; padding: 3px 6px;
}
html[data-theme="cyberdeck"] .cyber-nav-links a:hover,
html[data-theme="cyberdeck"] .cyber-nav-links a.is-current {
  color: var(--cyber-green); background: rgba(0, 255, 102, 0.12); text-shadow: 0 0 8px var(--cyber-green-glow);
}

html[data-theme="cyberdeck"] .page { max-width: 960px; margin: 0 auto; padding: 36px 24px 80px; }

html[data-theme="cyberdeck"] .page-intro-editorial {
  border-left: 3px solid var(--cyber-green); background: rgba(0, 255, 102, 0.04);
  padding: 20px 24px; margin-bottom: 36px;
  border-top: 1px solid rgba(0, 255, 102, 0.15);
  border-right: 1px solid rgba(0, 255, 102, 0.15);
  border-bottom: 1px solid rgba(0, 255, 102, 0.15);
}

html[data-theme="cyberdeck"] .page-intro-editorial .eyebrow { color: var(--cyber-cyan); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; }
html[data-theme="cyberdeck"] .page-intro-editorial h1 { color: var(--cyber-heading); font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin: 8px 0 10px; letter-spacing: -0.01em; }
html[data-theme="cyberdeck"] .page-intro-editorial .intro { color: var(--cyber-muted); font-size: 15.5px; line-height: 1.6; }

html[data-theme="cyberdeck"] .post-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 24px; margin-top: 24px; border: none;
}

html[data-theme="cyberdeck"] .mag-col { display: contents; }

html[data-theme="cyberdeck"] .post-item {
  position: relative; cursor: pointer; display: flex; flex-direction: column;
  background: var(--cyber-surface); border: 1px solid rgba(0, 255, 102, 0.25);
  border-left: 3px solid var(--cyber-green); box-shadow: 0 0 15px rgba(0, 255, 102, 0.03);
  padding: 16px; transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); min-height: auto;
}

html[data-theme="cyberdeck"] .post-item h2 a::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
}

html[data-theme="cyberdeck"] .post-item:hover {
  border-color: var(--cyber-green);
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.18), inset 0 0 15px rgba(0, 255, 102, 0.05);
  transform: translateY(-3px); background: var(--cyber-surface-hover);
}

html[data-theme="cyberdeck"] .post-item:hover h2 a { color: var(--cyber-green); text-shadow: 0 0 10px var(--cyber-green-glow); }

html[data-theme="cyberdeck"] .list-cover {
  display: none;
}

html[data-theme="cyberdeck"] .post-copy { display: flex; flex-direction: column; flex: 1; }

html[data-theme="cyberdeck"] .post-date-bottom,
html[data-theme="cyberdeck"] .post-tags-container .tag { display: none; }

html[data-theme="cyberdeck"] .post-meta-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
html[data-theme="cyberdeck"] .post-date-dot { font-size: 11.5px; color: var(--cyber-cyan); letter-spacing: 0.05em; }
html[data-theme="cyberdeck"] .post-date-badge { display: none; }

html[data-theme="cyberdeck"] .tag-badges { position: relative; z-index: 3; display: flex; gap: 5px; flex-wrap: wrap; }
html[data-theme="cyberdeck"] .tag-badge {
  font-size: 10px; font-weight: 700; padding: 1px 6px;
  background: rgba(0, 255, 102, 0.1); color: var(--cyber-green);
  border: 1px solid rgba(0, 255, 102, 0.4); border-radius: 2px; letter-spacing: 0.05em;
}

html[data-theme="cyberdeck"] .post-item h2 { font-size: 18px; font-weight: 700; line-height: 1.4; margin: 0 0 10px; letter-spacing: -0.01em; }
html[data-theme="cyberdeck"] .post-item h2 a { color: var(--cyber-heading); text-decoration: none; transition: color 0.15s ease, text-shadow 0.15s ease; }

html[data-theme="cyberdeck"] .summary { font-size: 13.5px; color: var(--cyber-muted); line-height: 1.6; margin: 0 0 8px; }
html[data-theme="cyberdeck"] .summary::before { content: "> "; color: var(--cyber-green); }

/* Archive */
html[data-theme="cyberdeck"] .archive-list { display: grid; gap: 10px; margin-top: 24px; border-top: none; }
html[data-theme="cyberdeck"] .archive-item {
  display: grid; grid-template-columns: 120px 1fr;
  align-items: center; gap: 16px; background: var(--cyber-surface);
  border: 1px solid rgba(0, 255, 102, 0.2); border-left: 3px solid var(--cyber-cyan);
  padding: 12px 18px; transition: all 0.15s ease;
}
html[data-theme="cyberdeck"] .archive-item:hover {
  border-color: var(--cyber-green); background: var(--cyber-surface-hover);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.15); transform: translateX(4px);
}
html[data-theme="cyberdeck"] .archive-date { color: var(--cyber-cyan); font-size: 13px; letter-spacing: 0.05em; }
html[data-theme="cyberdeck"] .archive-title { color: var(--cyber-heading); font-size: 16px; font-weight: 600; text-decoration: none; }
html[data-theme="cyberdeck"] .archive-item:hover .archive-title { color: var(--cyber-green); text-shadow: 0 0 8px var(--cyber-green-glow); }

html[data-theme="cyberdeck"] .archive-link { margin-top: 36px; }
html[data-theme="cyberdeck"] .archive-link a {
  display: inline-block; background: var(--cyber-surface); border: 1px solid var(--cyber-green);
  color: var(--cyber-green); padding: 8px 18px; text-decoration: none; font-size: 13.5px;
  letter-spacing: 0.05em; box-shadow: 0 0 10px rgba(0, 255, 102, 0.15); transition: all 0.15s ease;
}
html[data-theme="cyberdeck"] .archive-link a:hover {
  background: var(--cyber-green); color: #040706; font-weight: 700; box-shadow: 0 0 20px var(--cyber-green);
}

/* Article */
html[data-theme="cyberdeck"] .article { max-width: 960px; margin: 32px auto 96px; padding: 0 24px; }
html[data-theme="cyberdeck"] .article-meta-header {
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px dashed rgba(0, 255, 102, 0.3); padding-bottom: 14px; margin-bottom: 24px;
}
html[data-theme="cyberdeck"] .article-meta-header .tag { display: none; }
html[data-theme="cyberdeck"] .article-date { color: var(--cyber-cyan); font-size: 13px; letter-spacing: 0.08em; }

html[data-theme="cyberdeck"] .article h1 {
  color: var(--cyber-heading); font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800; line-height: 1.25; letter-spacing: -0.01em;
  margin: 0 0 20px; text-shadow: 0 0 16px rgba(0, 255, 102, 0.15);
}

html[data-theme="cyberdeck"] .lead {
  background: rgba(0, 255, 102, 0.05); border-left: 4px solid var(--cyber-green);
  border-top: 1px solid rgba(0, 255, 102, 0.15); border-right: 1px solid rgba(0, 255, 102, 0.15);
  border-bottom: 1px solid rgba(0, 255, 102, 0.15); padding: 16px 20px;
  font-size: 16.5px; line-height: 1.7; color: #a4cfb7; margin: 0 0 40px;
}

html[data-theme="cyberdeck"] .article-body { max-width: 100%; font-size: 16px; line-height: 1.85; color: var(--cyber-text); }
html[data-theme="cyberdeck"] .article-body p { margin: 0 0 1.6em; }
html[data-theme="cyberdeck"] .article-body figure {
  margin: 2.5em 0; border: 1px solid rgba(0, 255, 102, 0.35); border-radius: 4px;
  background: #000; overflow: hidden; box-shadow: 0 0 20px rgba(0, 255, 102, 0.08);
}
html[data-theme="cyberdeck"] .article-body figure.media-grid { border: none; background: transparent; box-shadow: none; overflow: visible; }
html[data-theme="cyberdeck"] .article-body .media-grid-item {
  border: 1px solid rgba(0, 255, 102, 0.35); border-radius: 4px;
  background: #000; overflow: hidden; box-shadow: 0 0 20px rgba(0, 255, 102, 0.08);
}
html[data-theme="cyberdeck"] .article-body img { width: 100%; display: block; }
html[data-theme="cyberdeck"] .article-body video { max-width: 100%; max-height: 65vh; display: block; margin: 0 auto; }
html[data-theme="cyberdeck"] .article-body .media-video { display: flex; flex-direction: column; align-items: center; margin: 2.5em auto; }
html[data-theme="cyberdeck"] .article-body .media-video.media-video-portrait video { width: 100%; max-width: 320px; max-height: 65vh; object-fit: contain; margin: 0 auto; border: 1px solid rgba(0, 255, 102, 0.4); border-radius: 4px; box-shadow: 0 0 20px rgba(0, 255, 102, 0.15); }
html[data-theme="cyberdeck"] .article-body .media-video figcaption { text-align: center; }
html[data-theme="cyberdeck"] .article-body figcaption {
  padding: 8px 14px; background: #090e0b; color: var(--cyber-green);
  font-size: 12px; letter-spacing: 0.05em; border-top: 1px solid rgba(0, 255, 102, 0.25);
}
html[data-theme="cyberdeck"] .article-body code {
  background: #0d1a13; color: var(--cyber-green);
  border: 1px solid rgba(0, 255, 102, 0.4); padding: 2px 6px; border-radius: 3px; font-size: 0.9em;
}
html[data-theme="cyberdeck"] .article-body pre {
  background: #040806; border: 1px solid rgba(0, 255, 102, 0.35);
  border-left: 4px solid var(--cyber-green); padding: 18px 22px; border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 255, 102, 0.08), inset 0 0 15px rgba(0, 0, 0, 0.8); margin: 2em 0;
}
html[data-theme="cyberdeck"] .article-body pre code { background: none; border: none; padding: 0; color: var(--cyber-green); font-size: 13.5px; }
html[data-theme="cyberdeck"] .article-body a { color: var(--cyber-cyan); text-decoration: underline; text-underline-offset: 3px; transition: all 0.15s ease; }
html[data-theme="cyberdeck"] .article-body a:hover { color: var(--cyber-green); text-shadow: 0 0 8px var(--cyber-green-glow); }
html[data-theme="cyberdeck"] .article-body h1,
html[data-theme="cyberdeck"] .article-body h2,
html[data-theme="cyberdeck"] .article-body h3,
html[data-theme="cyberdeck"] .article-body h4 {
  color: var(--cyber-green);
  text-shadow: 0 0 8px var(--cyber-green-glow);
  font-family: var(--font-mono);
}
html[data-theme="cyberdeck"] .article-body hr {
  border-top: 1px dashed rgba(0, 255, 102, 0.3);
}
html[data-theme="cyberdeck"] .article-body blockquote {
  margin: 2em 0; padding: 14px 20px; border-left: 3px solid var(--cyber-green);
  border-top: 1px solid rgba(0, 255, 102, 0.2); border-right: 1px solid rgba(0, 255, 102, 0.2);
  border-bottom: 1px solid rgba(0, 255, 102, 0.2); background: rgba(0, 255, 102, 0.04);
  box-shadow: 0 0 15px rgba(0, 255, 102, 0.05);
}
html[data-theme="cyberdeck"] .article-body blockquote p { margin: 0; line-height: 1.7; color: #a4cfb7; }

html[data-theme="cyberdeck"] .back {
  display: inline-block; margin-top: 48px; background: var(--cyber-surface);
  border: 1px solid var(--cyber-green); color: var(--cyber-green); padding: 8px 18px;
  text-decoration: none; font-size: 13.5px; letter-spacing: 0.05em; transition: all 0.15s ease;
}
html[data-theme="cyberdeck"] .back:hover { background: var(--cyber-green); color: #040706; font-weight: 700; box-shadow: 0 0 15px var(--cyber-green); }

/* Cyberdeck Floating Dock */
html[data-theme="cyberdeck"] .floating-theme-dock {
  background: rgba(5, 12, 8, 0.92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-color: var(--cyber-green); box-shadow: 0 0 25px rgba(0, 255, 102, 0.3), 0 8px 30px rgba(0, 0, 0, 0.8);
  color: var(--cyber-green);
}
html[data-theme="cyberdeck"] .floating-theme-dock .dock-handle { color: var(--cyber-green); }
html[data-theme="cyberdeck"] .floating-theme-dock .dock-handle:hover { background: rgba(0, 255, 102, 0.15); }
html[data-theme="cyberdeck"] .floating-theme-dock .theme-switcher { background: rgba(0, 255, 102, 0.08); border-color: rgba(0, 255, 102, 0.25); }
html[data-theme="cyberdeck"] .floating-theme-dock .theme-seg-btn { color: var(--cyber-green); }
html[data-theme="cyberdeck"] .floating-theme-dock .theme-seg-btn.active { background: var(--cyber-green); color: #040706; box-shadow: 0 0 12px rgba(0, 255, 102, 0.6); }
html[data-theme="cyberdeck"] .floating-theme-dock.is-dragging { box-shadow: 0 0 35px rgba(0, 255, 102, 0.5); }

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 1024px) {
  html[data-theme="magazine"] .post-list,
  html[data-theme="cards"] .post-list {
    gap: 18px;
  }
  html[data-theme="magazine"] .mag-col,
  html[data-theme="cards"] .mag-col {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .site-header { padding: 20px 18px 0; }
  .page { padding: 24px 18px 60px; }

  html[data-theme="editorial"] .archive-item { grid-template-columns: 1fr; gap: 14px; }
  html[data-theme="editorial"] .archive-item span { display: none; }

  html[data-theme="magazine"] .mag-masthead-main,
  html[data-theme="cards"] .mag-masthead-main { flex-direction: column; align-items: flex-start; gap: 12px; }
  html[data-theme="magazine"] .post-list,
  html[data-theme="cards"] .post-list { gap: 16px; }
  html[data-theme="magazine"] .mag-col,
  html[data-theme="cards"] .mag-col { gap: 20px; }
  html[data-theme="magazine"] .archive-item,
  html[data-theme="cards"] .archive-item { grid-template-columns: 1fr; gap: 8px; }

  html[data-theme="cyberdeck"] .post-list { grid-template-columns: 1fr; }
  html[data-theme="cyberdeck"] .cyber-masthead-main { flex-direction: column; align-items: flex-start; gap: 8px; }
  html[data-theme="cyberdeck"] .cyber-bar-primary { flex-direction: column; align-items: flex-start; gap: 10px; }
  html[data-theme="cyberdeck"] .archive-item { grid-template-columns: 1fr; gap: 6px; }
}

@media (max-width: 480px) {
  html[data-theme="magazine"] .post-list,
  html[data-theme="cards"] .post-list { gap: 0; }
  html[data-theme="magazine"] .mag-col,
  html[data-theme="cards"] .mag-col { gap: 24px; }
}