/* P9-1：default 多 skin + 首页骨架辅助样式。本地为主；断 CDN 时仍生效。 */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.layout-magazine {
  grid-template-columns: 240px 1fr;
}
.layout-magazine .side-first { order: -1; }
.layout-portal { grid-template-columns: 1fr 280px; }
.layout-columns .column-feed {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.wrap--wide { max-width: 1180px; }
.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.grid-cards--home { margin-bottom: 24px; }
.grid-card {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--card-shadow);
}
.grid-card-thumb {
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  margin-bottom: 10px;
  aspect-ratio: 3 / 2;
  background: var(--bg);
}
.grid-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.grid-card .title { display: block; font-weight: 600; margin-bottom: 4px; overflow-wrap: anywhere; }
.tag-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 20px;
}
.tag-nav a {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: .9rem;
}

/* P9-3：四套首页骨架区块 */
.hero-focus { margin-bottom: 24px; max-width: 100%; min-width: 0; }
.hero-focus-link { display: block; color: inherit; text-decoration: none; max-width: 100%; }
.hero-focus-link:hover { text-decoration: none; }
.hero-focus-media {
  margin: 0 0 12px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 16 / 9;
  max-width: 100%;
  width: 100%;
  min-width: 0;
}
.hero-focus-media img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  display: block;
}
.hero-focus-title {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  margin-bottom: 6px;
}
.hero-focus-link:hover .hero-focus-title { color: var(--link); }
.hero-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.hero-duo-item { display: flex; flex-direction: column; gap: 8px; }
.hero-duo-thumb {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 3 / 2;
}
.hero-duo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-duo-title { font-size: 1.05rem; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.media-list--home .media-item,
.media-list--magazine .media-item,
.media-list--feed .media-item { padding: 14px 0; }
/* 双栏 feed 列宽窄：缩略图必须更小，否则正文被挤成竖条 */
.column-feed .media-item,
.media-list--feed .media-item {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
}
.column-feed .media-thumb,
.media-list--feed .media-thumb {
  max-width: 96px;
}
.column-feed,
.feed-block,
.layout-columns {
  min-width: 0;
}
.layout-columns .card,
.column-feed .media-list {
  min-width: 0;
  max-width: 100%;
}
.media-grid--compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.wall-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}
.wall-block h2 { font-size: 1.05rem; margin-bottom: 10px; }
.feed-block h2 { font-size: 1.05rem; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--accent); }
.site-header--magazine { border-bottom: 3px solid var(--accent); }
.site-header--wide .wrap { max-width: 1180px; }

body.skin-0 { --bg: #f3f4f6; --card: #fff; --text: #1f2937; --muted: #6b7280; --line: #e5e7eb; --link: #1e3a5f; --link-hover: #0f2744; --accent: #b45309; --header: #132337; --header-fg: #e5e7eb; --header-nav: #24364d; --header-hover: #1c334d; --radius: 6px; --radius-lg: 10px; --info: #374151; --brand-tracking: .04em; --card-shadow: none; }
body.skin-1 { --bg: #f0fdf4; --card: #fff; --text: #14532d; --muted: #4d7c5a; --line: #bbf7d0; --link: #166534; --link-hover: #14532d; --accent: #ca8a04; --header: #14532d; --header-fg: #ecfdf5; --header-nav: #166534; --header-hover: #15803d; --radius: 12px; --radius-lg: 16px; --info: #166534; --brand-tracking: .02em; --card-shadow: 0 1px 3px rgba(20, 83, 45, .08); }
body.skin-2 { --bg: #eff6ff; --card: #fff; --text: #1e3a8a; --muted: #64748b; --line: #bfdbfe; --link: #1d4ed8; --link-hover: #1e40af; --accent: #0ea5e9; --header: #1e3a8a; --header-fg: #dbeafe; --header-nav: #1e40af; --header-hover: #2563eb; --radius: 4px; --radius-lg: 6px; --info: #334155; --brand-tracking: .06em; --card-shadow: none; }
body.skin-3 { --bg: #fdf4ff; --card: #fff; --text: #701a75; --muted: #86198f; --line: #f5d0fe; --link: #a21caf; --link-hover: #701a75; --accent: #db2777; --header: #581c87; --header-fg: #fae8ff; --header-nav: #6b21a8; --header-hover: #7e22ce; --radius: 16px; --radius-lg: 20px; --info: #86198f; --brand-tracking: .08em; --card-shadow: 0 4px 14px rgba(88, 28, 135, .1); }
body.skin-4 { --bg: #fff7ed; --card: #fff; --text: #7c2d12; --muted: #9a3412; --line: #fed7aa; --link: #c2410c; --link-hover: #9a3412; --accent: #ea580c; --header: #7c2d12; --header-fg: #ffedd5; --header-nav: #9a3412; --header-hover: #c2410c; --radius: 8px; --radius-lg: 12px; --info: #9a3412; --brand-tracking: .03em; --card-shadow: 0 2px 0 var(--accent); }
body.skin-5 { --bg: #f8fafc; --card: #fff; --text: #0f172a; --muted: #475569; --line: #e2e8f0; --link: #334155; --link-hover: #0f172a; --accent: #0891b2; --header: #0f172a; --header-fg: #f1f5f9; --header-nav: #1e293b; --header-hover: #334155; --radius: 0; --radius-lg: 0; --info: #475569; --brand-tracking: 0; --card-shadow: none; }
body.skin-6 { --bg: #fef2f2; --card: #fff; --text: #7f1d1d; --muted: #991b1b; --line: #fecaca; --link: #b91c1c; --link-hover: #7f1d1d; --accent: #dc2626; --header: #450a0a; --header-fg: #fee2e2; --header-nav: #7f1d1d; --header-hover: #991b1b; --radius: 2px; --radius-lg: 4px; --info: #7f1d1d; --brand-tracking: .12em; --card-shadow: none; }
body.skin-7 { --bg: #ecfeff; --card: #fff; --text: #164e63; --muted: #155e75; --line: #a5f3fc; --link: #0e7490; --link-hover: #164e63; --accent: #06b6d4; --header: #164e63; --header-fg: #cffafe; --header-nav: #155e75; --header-hover: #0e7490; --radius: 14px; --radius-lg: 18px; --info: #155e75; --brand-tracking: .05em; --card-shadow: 0 8px 24px rgba(22, 78, 99, .08); }

/* P9-4：每套 skin 结构差异（同一 HTML，仅 body.skin-N） */
body.skin-0 .site-header { border-bottom: 3px solid var(--accent); }
body.skin-0 .card h2 { border-left: 3px solid var(--accent); padding-left: 10px; }

body.skin-1 .site-header { border-radius: 0 0 16px 16px; }
body.skin-1 .tag-nav a { border-radius: 999px; background: #dcfce7; }
body.skin-1 .feed-block h2,
body.skin-1 .card h2 { color: var(--accent); border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
body.skin-1 .media-thumb,
body.skin-1 .hero-focus-media { border: 2px solid var(--line); }

body.skin-2 .site-header { box-shadow: inset 4px 0 0 var(--accent); }
body.skin-2 .card { border-left: 3px solid var(--accent); }
body.skin-2 .site-header .brand { text-transform: uppercase; font-size: 1.25rem; }
body.skin-2 .pager a { border: 1px solid var(--line); padding: 4px 10px; border-radius: var(--radius); }

body.skin-3 .site-header { padding-bottom: 4px; }
body.skin-3 .site-header .brand { font-size: 1.7rem; }
body.skin-3 .site-header nav a { border-radius: 999px; margin: 4px 4px 8px; }
body.skin-3 .grid-card,
body.skin-3 .media-card-thumb { border-radius: var(--radius); }
body.skin-3 .hero-focus-title { font-size: 1.5rem; }

body.skin-4 .site-header { border-top: 6px solid var(--accent); }
body.skin-4 .card h1 { border-bottom: 2px solid var(--accent); padding-bottom: 8px; }
body.skin-4 .crumb { font-weight: 600; }
body.skin-4 .media-item { border-bottom-style: dashed; }

body.skin-5 .site-header { border-bottom: 1px solid var(--header-nav); }
body.skin-5 .card { border-width: 0 0 1px; padding-left: 0; padding-right: 0; }
body.skin-5 .site-header .brand { font-weight: 500; font-size: 1.2rem; }
body.skin-5 .media-thumb,
body.skin-5 .media-card-thumb,
body.skin-5 .hero-focus-media { border-radius: 0; }
body.skin-5 .tag-nav a { border-radius: 0; }

body.skin-6 .site-header { border-bottom: 4px solid var(--accent); }
body.skin-6 .site-header .brand { text-transform: uppercase; }
body.skin-6 .card { border: 2px solid var(--line); }
body.skin-6 .card h2 { background: var(--bg); margin-left: -22px; margin-right: -22px; padding: 8px 22px; border-left: 4px solid var(--accent); }
body.skin-6 .hero-focus-title { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 4px; }

body.skin-7 .site-header {
  background: linear-gradient(135deg, #164e63 0%, #0e7490 55%, #0891b2 100%);
}
body.skin-7 .card { border: 0; }
body.skin-7 .grid-card { border: 0; box-shadow: var(--card-shadow); }
body.skin-7 .tag-nav a {
  background: #cffafe;
  border-color: transparent;
  border-radius: 999px;
}
body.skin-7 .site-footer { border-top: 3px solid var(--accent); }

@media (max-width: 768px) {
  .layout-magazine,
  .layout-columns .column-feed,
  .hero-duo,
  .wall-columns {
    grid-template-columns: 1fr;
  }
  .layout-magazine .side-first { order: 0; }
  .hero-focus-title { font-size: 1.15rem; }
  body.skin-3 .site-header .brand { font-size: 1.35rem; }
  body.skin-6 .card h2 { margin-left: -14px; margin-right: -14px; padding-left: 14px; padding-right: 14px; }
}
