/* ZHITONG 技能广场：纸与墨。深浅两套，朱砂红一个强调色，细线分隔而不是堆卡片。 */
:root {
  --bg: #11110f; --surface: #181815; --surface-2: #1f1f1b; --ink: #ece8dc; --muted: #9b9588; --faint: #6f6a5f;
  --line: #2c2b26; --line-2: #3a3933;
  --accent: #ff6a47; --accent-ink: #1b0a04; --accent-soft: rgba(255,106,71,.12);
  --ok: #7fd1a0; --ok-soft: rgba(127,209,160,.12); --warn: #f0b95a; --warn-soft: rgba(240,185,90,.12);
  --shadow: 0 18px 50px -20px rgba(0,0,0,.6);
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --r: 10px; --wrap: 1120px; --tabh: 58px;
}
[data-theme="light"] {
  --bg: #f5f2ea; --surface: #fffdf8; --surface-2: #efebe0; --ink: #1c1a16; --muted: #6a6558; --faint: #948e7f;
  --line: #ddd7c8; --line-2: #c9c2b0;
  --accent: #c8381a; --accent-ink: #fff; --accent-soft: rgba(200,56,26,.09);
  --ok: #2c7a4b; --ok-soft: rgba(44,122,75,.1); --warn: #9a6200; --warn-soft: rgba(154,98,0,.1);
  --shadow: 0 18px 40px -22px rgba(60,40,10,.35);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.6 var(--sans); min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, dl, dd, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
img, video, svg { max-width: 100%; }
code { font-family: var(--mono); font-size: .86em; background: var(--surface-2); padding: .1em .4em; border-radius: 5px; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }
.ic-s { width: .95em; height: .95em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }
.offscreen { position: fixed; left: -9999px; top: 0; }
[hidden] { display: none !important; }

/* ---------- 顶栏与导航 */
.top { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 30; }
.top-in { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .02em; flex: none; }
.brand:hover { color: inherit; }
.brand-mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font: 700 15px/1 var(--mono); }
.brand-s { color: var(--muted); font-weight: 500; font-size: 13px; padding-left: 9px; border-left: 1px solid var(--line-2); }
.topsearch { flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--muted); }
.topsearch:focus-within { border-color: var(--accent); }
.topsearch input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); font-size: 14px; }
html[data-route="home"] .topsearch { visibility: hidden; }
.top-ctl { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { height: 34px; min-width: 34px; padding: 0 9px; border: 1px solid var(--line); background: transparent; border-radius: 8px; cursor: pointer; font-size: 13px; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { color: var(--ink); border-color: var(--line-2); }
.tabs { border-bottom: 1px solid var(--line); background: var(--bg); }
.tabs-in { display: flex; gap: 4px; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 11px 12px; color: var(--muted); font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a .ic { display: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs a:hover { color: var(--ink); }
#view { padding-top: 28px; padding-bottom: 72px; min-height: 60vh; outline: none; }
.foot { display: flex; gap: 16px; justify-content: space-between; padding-top: 20px; padding-bottom: 28px; border-top: 1px solid var(--line); color: var(--faint); font-size: 13px; }

/* ---------- 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 9px; background: transparent; color: var(--ink); cursor: pointer; font-weight: 500; font-size: 14px; white-space: nowrap; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); border-color: var(--accent); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 17px; border-radius: 12px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.btn-done { background: var(--ok-soft); border-color: transparent; color: var(--ok); cursor: default; }
.btn-block { width: 100%; justify-content: flex-start; }
.btn:disabled { opacity: .7; cursor: default; }
.btn.is-busy { opacity: .6; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.lnk { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.lnk:hover { color: var(--accent); }

/* ---------- 文字与标签 */
.eyebrow { font: 600 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 18px; }
.lead { color: var(--muted); font-size: 16px; max-width: 62ch; }
.muted { color: var(--muted); }
.fine { color: var(--faint); font-size: 12.5px; margin-top: 8px; }
.note { margin: 10px 0; padding: 10px 12px; border-left: 2px solid var(--line-2); color: var(--muted); font-size: 13.5px; overflow-wrap: anywhere; }
.badges, .row-title, .sk-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid var(--line-2); border-radius: 5px; font: 500 11.5px/1 var(--sans); color: var(--muted); white-space: nowrap; }
.badge-official { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: var(--accent-soft); }
.badge-ok { color: var(--ok); border-color: transparent; background: var(--ok-soft); }
.badge-warn { color: var(--warn); border-color: transparent; background: var(--warn-soft); }
.chip { display: inline-flex; align-items: center; height: 32px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; font-size: 13.5px; color: var(--muted); background: transparent; white-space: nowrap; }
.chip:hover { color: var(--ink); border-color: var(--line-2); }
.chip.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.chip-s { height: 26px; padding: 0 10px; font-size: 12.5px; }
.quick, .tabs-inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 6px; align-items: center; }
.tabs-inline .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 4px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--faint); font-size: 13px; margin-bottom: 18px; }
.crumbs span:last-child { color: var(--muted); overflow-wrap: anywhere; }

/* ---------- 色块图标（不用 emoji，不用渐变） */
.tile { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; font: 700 18px/1 var(--mono); flex: none; color: var(--t-fg); background: var(--t-bg); border: 1px solid var(--t-bd); }
.tile-lg { width: 64px; height: 64px; border-radius: 14px; font-size: 28px; }
.tile-0  { --t-bg:#3a2a22; --t-fg:#ffb59c; --t-bd:#5a4034; } .tile-1  { --t-bg:#2c3328; --t-fg:#b9dba0; --t-bd:#43503b; }
.tile-2  { --t-bg:#22313a; --t-fg:#9fd0ea; --t-bd:#35505e; } .tile-3  { --t-bg:#352a3a; --t-fg:#d8b3e6; --t-bd:#52405a; }
.tile-4  { --t-bg:#3a3422; --t-fg:#ecd08a; --t-bd:#58502f; } .tile-5  { --t-bg:#2a3836; --t-fg:#a3e0d3; --t-bd:#3f5753; }
.tile-6  { --t-bg:#3a2530; --t-fg:#f0a9c4; --t-bd:#583a49; } .tile-7  { --t-bg:#2b2e3d; --t-fg:#aab6f0; --t-bd:#424861; }
.tile-8  { --t-bg:#38302a; --t-fg:#e2c1a1; --t-bd:#54483f; } .tile-9  { --t-bg:#303827; --t-fg:#cfe08f; --t-bd:#485335; }
.tile-10 { --t-bg:#262f38; --t-fg:#93c1e8; --t-bd:#3c4a58; } .tile-11 { --t-bg:#38272a; --t-fg:#eba4a4; --t-bd:#573c3f; }
[data-theme="light"] .tile-0  { --t-bg:#f6e2d9; --t-fg:#a8381a; --t-bd:#e8c5b6; } [data-theme="light"] .tile-1  { --t-bg:#e6edd9; --t-fg:#3e6a1f; --t-bd:#cddbb6; }
[data-theme="light"] .tile-2  { --t-bg:#dcebf3; --t-fg:#1f5f82; --t-bd:#bcd6e5; } [data-theme="light"] .tile-3  { --t-bg:#eadff0; --t-fg:#74408f; --t-bd:#d6c3e0; }
[data-theme="light"] .tile-4  { --t-bg:#f3ecd2; --t-fg:#7d5f0b; --t-bd:#e2d6a6; } [data-theme="light"] .tile-5  { --t-bg:#d9eeea; --t-fg:#1d6b5e; --t-bd:#b5d9d2; }
[data-theme="light"] .tile-6  { --t-bg:#f5dfe7; --t-fg:#9e2f5d; --t-bd:#e6c0cf; } [data-theme="light"] .tile-7  { --t-bg:#e1e4f6; --t-fg:#3b4aa0; --t-bd:#c4cbe9; }
[data-theme="light"] .tile-8  { --t-bg:#efe3d6; --t-fg:#7a4c22; --t-bd:#dcc8b3; } [data-theme="light"] .tile-9  { --t-bg:#eaf0d3; --t-fg:#58701a; --t-bd:#d3dfa9; }
[data-theme="light"] .tile-10 { --t-bg:#dfe9f2; --t-fg:#2a5a8c; --t-bd:#c0d3e4; } [data-theme="light"] .tile-11 { --t-bg:#f3dede; --t-fg:#9a2c2c; --t-bd:#e4bfbf; }

/* ---------- 首页 */
.hero { padding: 28px 0 14px; }
.hero h1 { font-size: clamp(30px, 6vw, 52px); line-height: 1.12; letter-spacing: -.025em; font-weight: 750; max-width: 24ch; }
html[lang="en"] .hero h1 { max-width: 20ch; }
.hero .lead { margin-top: 16px; }
.bigsearch { display: flex; align-items: center; gap: 10px; margin-top: 28px; height: 58px; padding: 0 8px 0 18px; max-width: 680px; border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface); color: var(--muted); }
.bigsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.bigsearch input[type=search], .topsearch input[type=search] { padding: 0; width: auto; border: 0; border-radius: 0; }
.bigsearch input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 16px; color: var(--ink); }
.bigsearch .btn { height: 44px; }
.bigsearch-s { margin-top: 0; height: 52px; max-width: none; }
.sec { margin-top: 56px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--ink); }
.sec-head h2 { font-size: 20px; letter-spacing: -.01em; }
.sec-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; }
.flags { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; border-left: 1px solid var(--line); }
.flag { position: relative; grid-column: span 2; padding: 22px 22px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.flag:hover { background: var(--surface); color: inherit; }
.flag-lead { grid-column: span 4; background: var(--surface); }
.flag:nth-child(2) { grid-column: span 2; }
.flag:nth-child(n+3) { grid-column: span 3; }
.flag:nth-child(n+3):last-child:nth-child(odd) { grid-column: span 6; }
.flag-no { position: absolute; top: 18px; right: 20px; font: 600 12px var(--mono); color: var(--faint); }
.flag-name { font-size: 18px; margin-top: 6px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.flag-lead .flag-name { font-size: 28px; }
.flag-sum { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.flag-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 8px; }
.flag-stats { display: inline-flex; gap: 10px; color: var(--faint); font: 12px var(--mono); }
.boards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.board { padding: 14px 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.board:last-child { border-right: 0; }
.board:hover { background: var(--surface); }
.board-k { font-weight: 650; }
.board-d { font-size: 12.5px; color: var(--faint); }
.boards + .rows { margin-top: 12px; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 32px; margin-top: 4px; }
.cat { padding: 18px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.cat-t { display: flex; justify-content: space-between; gap: 10px; font-weight: 650; font-size: 16px; }
.cat-n { font: 12px var(--mono); color: var(--faint); font-weight: 400; }
.cat-d { color: var(--muted); font-size: 13px; margin-top: 3px; }
.cat-kids { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cta { margin-top: 64px; padding: 28px; border: 1px solid var(--line-2); border-radius: 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; background: var(--surface); }
.cta h2 { font-size: 20px; }
.cta p { color: var(--muted); margin-top: 4px; max-width: 52ch; }

/* ---------- 列表行 */
.rows { border-top: 0; }
.row { display: flex; align-items: flex-start; gap: 14px; padding: 16px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line); border-radius: 8px; min-width: 0; }
.row:hover { background: var(--surface); color: inherit; }
.row-rank { width: 26px; flex: none; padding-top: 10px; font: 600 13px var(--mono); color: var(--faint); }
.row-main { flex: 1; min-width: 0; }
.row-name { font-weight: 650; font-size: 16px; overflow-wrap: anywhere; }
.row-sum { color: var(--muted); font-size: 14px; margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 7px; font: 12px var(--mono); color: var(--faint); align-items: center; }
.row-meta i { font-style: normal; }
.row-go { color: var(--faint); align-self: center; flex: none; }
.row:hover .row-go { color: var(--accent); }
.count { color: var(--muted); font-size: 13.5px; margin: 14px 0 4px; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.pager-n { font: 13px var(--mono); color: var(--muted); }
.page-head { margin-bottom: 20px; }
.page-head h1 { font-size: clamp(26px, 4.5vw, 36px); letter-spacing: -.02em; }
.page-head .lead { margin-top: 8px; }
.head-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.filter-box { margin: 14px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.filter-box summary { cursor: pointer; padding: 11px 14px; font-size: 13.5px; color: var(--muted); list-style: none; }
.filter-box summary::-webkit-details-marker { display: none; }
.filters { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; padding: 4px 14px 14px; }
.f { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--faint); min-width: 0; margin-bottom: 12px; }
.filters .f { margin-bottom: 0; }
select, input[type="text"], input:not([type]), input[type="search"], textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg); color: var(--ink); font-size: 14px; }
select { height: 38px; }
textarea { resize: vertical; }
.empty { text-align: center; padding: 56px 16px; border: 1px dashed var(--line-2); border-radius: 14px; margin-top: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-t { font-weight: 650; font-size: 17px; }
.empty-s { color: var(--muted); max-width: 44ch; }
.empty .btn, .empty .btn-row { margin-top: 10px; justify-content: center; }
.skel-row { display: flex; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.skel-lines { flex: 1; display: grid; gap: 10px; }
.skel { display: block; height: 14px; border-radius: 6px; background: var(--surface-2); animation: pulse 1.2s ease-in-out infinite; }
.skel-tile { width: 42px; height: 42px; border-radius: 9px; }
.skel-short { width: 55%; }
@keyframes pulse { 50% { opacity: .45; } }

/* ---------- 技能详情 */
.sk-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 36px; align-items: start; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.sk-hero:not(:has(.demo)) { grid-template-columns: minmax(0, 760px); }
.sk-title { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; min-width: 0; }
.sk-title h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.1; letter-spacing: -.025em; overflow-wrap: anywhere; min-width: 0; }
.sk-lead { margin-top: 16px; font-size: 19px; line-height: 1.5; color: var(--ink); overflow-wrap: anywhere; }
.sk-stats { margin-top: 14px; font: 13px var(--mono); color: var(--muted); gap: 4px 18px; }
.sk-stats span { display: inline-flex; align-items: center; gap: 5px; }
.sk-stats i { font-style: normal; color: var(--faint); }
.install { margin-top: 26px; }
.install > .btn-lg { width: 100%; max-width: 420px; }
.install .btn-row { margin-top: 12px; }
.install-inline { margin: 0 0 20px; }
.btn-row-full { flex-direction: column; align-items: stretch; }
.btn-row-full .btn { width: 100%; max-width: none; }
.notice { display: flex; gap: 12px; padding: 14px; border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent); background: var(--warn-soft); border-radius: 12px; margin-bottom: 14px; align-items: flex-start; }
.notice .ic { width: 22px; height: 22px; margin-top: 2px; color: var(--warn); }
.notice p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.sk-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.sk-actions .btn { height: 36px; font-size: 13.5px; padding: 0 12px; }
.sk-actions i { font-style: normal; font: 12px var(--mono); color: var(--faint); }
.demo { border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: #000; aspect-ratio: 16 / 9; box-shadow: var(--shadow); }
.demo video, .demo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sk-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 44px; margin-top: 32px; }
.sk-main section { margin-bottom: 40px; }
.sk-main h2 { font-size: 20px; margin-bottom: 14px; letter-spacing: -.01em; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); max-width: 68ch; }
.files { margin: -16px 0 40px; border-top: 1px solid var(--line); }
.files summary { cursor: pointer; padding: 12px 0; color: var(--muted); font-size: 14px; }
.files li { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; font-size: 13px; color: var(--muted); }
.files li code { overflow-wrap: anywhere; }
.panel { border: 1px solid var(--line-2); border-radius: 14px; padding: 18px 18px 16px; background: var(--surface); margin-bottom: 18px; }
.panel h2, .panel-t { font-size: 15px; margin-bottom: 10px; }
.panel h3 { font-size: 12px; font: 600 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); margin: 16px 0 6px; }
.panel-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel-h h2 { margin: 0; }
.seal { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); transform: rotate(-4deg); }
.seal .ic { width: 18px; height: 18px; }
.review { border-color: color-mix(in srgb, var(--accent) 35%, var(--line-2)); }
.kv { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--faint); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.kv dd a { color: var(--accent); }
.kv code { margin: 0 4px 4px 0; display: inline-block; }
.rating-sum { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.rating-sum .big { font: 700 34px var(--mono); }
.your-rate { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.rate { display: inline-flex; gap: 2px; }
.rate-b { width: 38px; height: 38px; display: grid; place-items: center; background: none; border: 0; cursor: pointer; color: var(--line-2); border-radius: 8px; }
.rate-b .ic { width: 24px; height: 24px; }
.rate-b.on { color: var(--warn); }
.rate-b:hover { color: var(--warn); }
.cm-form { display: grid; gap: 10px; margin-bottom: 20px; }
.cm-list { display: grid; gap: 0; }
.cm { padding: 14px 0; border-top: 1px solid var(--line); }
.cm-r { margin-left: 20px; padding-left: 14px; border-left: 2px solid var(--line); border-top: 0; }
.cm-h { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.cm-a { font-weight: 650; }
.cm-h time { color: var(--faint); font: 12px var(--mono); }
.cm-b { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-f { display: flex; gap: 14px; }
.sk-side { min-width: 0; }

/* ---------- 创作者 / 求技能 / 其它 */
.profile { display: flex; gap: 20px; align-items: flex-start; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.profile-main { min-width: 0; display: grid; gap: 8px; }
.profile h1 { font-size: 30px; letter-spacing: -.02em; overflow-wrap: anywhere; }
.handle { font: 14px var(--mono); color: var(--muted); }
.bio { max-width: 60ch; overflow-wrap: anywhere; }
.reqs { margin-top: 8px; }
.req { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.req h3 { font-size: 16px; overflow-wrap: anywhere; }
.req p { color: var(--muted); font-size: 14px; margin-top: 4px; overflow-wrap: anywhere; white-space: pre-wrap; }
.req-main { min-width: 0; flex: 1; }
.vote { flex: none; width: 54px; height: 62px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 1px solid var(--line-2); border-radius: 10px; background: transparent; cursor: pointer; color: var(--muted); }
.vote b { font: 700 16px var(--mono); color: var(--ink); }
.vote-a { font-size: 11px; }
.vote.on, .vote:hover { border-color: var(--accent); color: var(--accent); }
.pick { display: grid; gap: 8px; margin-bottom: 14px; max-height: 50vh; overflow: auto; }
.chk { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 14px; }
.chk input { width: auto; }

/* ---------- 弹窗与提示 */
#modal-root .modal-bg { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.55); display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 440px; max-height: 90vh; overflow: auto; background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); }
.modal h3 { font-size: 18px; margin-bottom: 12px; }
.modal .muted { margin-bottom: 16px; }
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); max-width: min(90vw, 420px); background: var(--ink); color: var(--bg); padding: 11px 16px; border-radius: 10px; font-size: 14px; opacity: 0; pointer-events: none; transition: .2s; z-index: 80; text-align: center; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 内嵌：隐藏外层导航，保留内部页签 */
html.embed .top, html.embed .foot { display: none; }
html.embed #view { padding-top: 18px; padding-bottom: 28px; min-height: 0; }
html.embed .tabs { position: sticky; top: 0; z-index: 30; }

/* ---------- 平板与手机 */
@media (max-width: 900px) {
  .sk-hero { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .sk-cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .filters { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .flags { grid-template-columns: repeat(2, 1fr); }
  .flag, .flag:nth-child(n) { grid-column: span 1 !important; }
  .flag-lead { grid-column: span 2 !important; }
}
@media (max-width: 720px) {
  body { font-size: 15px; }
  .wrap { padding: 0 16px; }
  .top-in { height: 54px; gap: 10px; }
  .topsearch, .top-dl, .brand-s { display: none; }
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; border-top: 1px solid var(--line); border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  .tabs-in { padding: 0; gap: 0; }
  .tabs a { flex: 1; flex-direction: column; gap: 3px; padding: 8px 0 7px; font-size: 11px; justify-content: center; border-bottom: 0; margin: 0; min-width: 0; }
  .tabs a .ic { display: block; width: 22px; height: 22px; }
  .tabs a.on { color: var(--accent); }
  html.embed .tabs { position: sticky; top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--line); }
  html.embed .tabs a { flex-direction: row; font-size: 13px; padding: 10px 0; }
  html.embed .tabs a .ic { display: none; }
  #view { padding-top: 20px; padding-bottom: calc(var(--tabh) + 40px + env(safe-area-inset-bottom)); }
  html.embed #view { padding-bottom: 24px; }
  .foot { padding-bottom: calc(var(--tabh) + 20px); flex-direction: column; gap: 6px; }
  html.embed .foot { display: none; }
  .hero { padding-top: 10px; }
  .bigsearch { height: 54px; padding-left: 14px; margin-top: 22px; }
  .bigsearch .btn { padding: 0 14px; }
  .sec { margin-top: 40px; }
  .flags { grid-template-columns: minmax(0, 1fr); }
  .flag, .flag-lead { grid-column: span 1; padding: 18px 16px; }
  .flag-lead .flag-name { font-size: 22px; }
  .boards { grid-template-columns: repeat(2, 1fr); }
  .board:nth-child(2) { border-right: 0; }
  .board:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cats { grid-template-columns: minmax(0, 1fr); }
  .cta { flex-direction: column; align-items: flex-start; padding: 20px; }
  .filters { grid-template-columns: repeat(2, 1fr); }
  .row { gap: 12px; }
  .row-go { display: none; }
  .tile-lg { width: 52px; height: 52px; font-size: 22px; }
  .sk-lead { font-size: 17px; }
  .install > .btn-lg, .btn-row-full .btn { max-width: none; width: 100%; }
  .sk-actions .btn { flex: 1 1 auto; }
  .demo { margin: 0 -16px; border-radius: 0; border-left: 0; border-right: 0; }
  .profile { flex-direction: column; gap: 14px; }
  .req { gap: 12px; }
  .head-row .btn { width: 100%; }
  .kv { grid-template-columns: 5.5em minmax(0, 1fr); }
  .cm-r { margin-left: 10px; }
  #toast { bottom: calc(var(--tabh) + 16px); }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* 上传与创作者 */
.pub-rules { margin: 0 0 16px; padding-left: 20px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 16px; margin-bottom: 18px; border: 1.5px dashed var(--line, currentColor); border-radius: 12px; text-align: center; }
.drop.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.drop .ic { width: 26px; height: 26px; color: var(--muted); }
.drop .btn-row { justify-content: center; flex-wrap: wrap; }
.pub-msg { padding: 12px 14px; margin-bottom: 16px; border-radius: 10px; font-size: 14px; overflow-wrap: anywhere; }
.pub-err { color: var(--warn); background: var(--warn-soft); }
.pub-err ul { margin: 8px 0 0; padding-left: 18px; }
.pub-summary { margin-bottom: 16px; overflow-wrap: anywhere; }
.pub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.f small { color: var(--faint); font-size: 12px; }
@media (max-width: 720px) { .pub-grid { grid-template-columns: minmax(0, 1fr); } }
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sub { padding: 14px; border: 1px solid var(--line, rgba(127,127,127,.25)); border-radius: 10px; min-width: 0; overflow-wrap: anywhere; }
.sub-h { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.sub .btn-row { margin-top: 10px; flex-wrap: wrap; }
.profile-form { max-width: 520px; }
.vote.on { color: var(--accent); }
.pub-summary .fine { margin-bottom: 18px; }
.pub-summary .files { margin-top: 6px; }
.pub-rules li { list-style: disc; }
