/* 首页（模型门户）：浅色底、橙色强调、大图卡片网格。与查看器/后台的深色样式互不影响。 */
:root {
  --bg: #f6f7f9;
  --surface: #fff;
  --ink: #2f3540;
  --ink2: #5b6472;
  --dim: #737c88;
  --line: #e7e9ee;
  --accent: #ff7a1a;
  --accent-ink: #b34d00;
  --navy: #171d27;
  --shadow: 0 10px 30px rgba(24, 32, 45, .09);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 14px/1.6 "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}
body.lock { overflow: hidden; }
a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: #eef1f5; padding: 1px 5px; border-radius: 4px; }
.off { display: none !important; }
img { display: block; max-width: 100%; }
.wrap { width: min(1280px, 100% - 40px); margin: 0 auto; }

/* ——— 顶栏 ——— */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topin { display: flex; align-items: center; gap: 18px; height: 62px; }
.logo { display: flex; align-items: baseline; gap: 8px; font-size: 19px; font-weight: 700; letter-spacing: .5px; }
.logo em { font-style: normal; font-size: 11px; font-weight: 600; color: var(--accent-ink);
  background: rgba(255, 122, 26, .12); border-radius: 4px; padding: 2px 6px; letter-spacing: 1px; }
.tops { display: flex; gap: 22px; margin-left: 6px; }
.tops a { color: var(--ink2); font-size: 14.5px; padding: 4px 0; border-bottom: 2px solid transparent; }
.tops a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }
.grow { flex: 1 1 auto; }
.sbox { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; padding: 0 4px 0 14px; height: 38px; width: 260px; }
.sbox input { border: 0; outline: 0; flex: 1; font: inherit; color: var(--ink); background: none; min-width: 0; }
.sbox button { border: 0; cursor: pointer; background: var(--accent); color: #fff; border-radius: 999px; height: 30px; padding: 0 14px; font: inherit; font-size: 13px; }
.sbox button:hover { filter: brightness(1.06); }
.topadmin { font-size: 12.5px; color: var(--dim); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.topadmin:hover { color: var(--accent-ink); border-color: rgba(255, 122, 26, .5); background: rgba(255, 122, 26, .06); }

/* ——— 头部横幅 ——— */
.hero { position: relative; overflow: hidden; background: var(--navy); color: #eef2f8; }
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(54% 74% at 10% 16%, rgba(48, 243, 240, .16), transparent 62%),
    radial-gradient(48% 70% at 90% 10%, rgba(255, 122, 26, .2), transparent 60%),
    linear-gradient(160deg, #1b2431 0%, #10161f 62%, #182130 100%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; opacity: .12;
  background-image: linear-gradient(rgba(255, 255, 255, .18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .18) 1px, transparent 1px);
  background-size: 46px 46px; mask-image: radial-gradient(66% 58% at 26% 40%, #000, transparent 74%);
}
.heroin { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 336px;
  gap: 34px; align-items: center; padding: 38px 0 42px; }
.herokicker { font-size: 12px; letter-spacing: 4px; color: #7dd3fc; }
.hero h1 { margin: 9px 0 12px; font-size: clamp(26px, 3.7vw, 40px); line-height: 1.24; font-weight: 800; letter-spacing: .5px; }
.hero h1 b { color: var(--accent); font-weight: 800; }
.hero p { margin: 0 0 20px; max-width: 44ch; color: #b6c2d1; font-size: 15px; }
.herobtns { display: flex; flex-wrap: wrap; gap: 11px; }
.big { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 19px; border-radius: 999px;
  background: var(--accent); color: #17202b; font-weight: 700; font-size: 14.5px; transition: transform .18s, filter .18s; }
.big:hover { filter: brightness(1.07); transform: translateY(-1px); }
.big.ghost { background: transparent; color: #dce6f2; border: 1px solid rgba(220, 232, 246, .38); }
.big.ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }
/* 最新上传那张卡：整张可点 */
.shotcard { position: relative; display: block; border-radius: 14px; overflow: hidden; cursor: pointer;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(226, 236, 248, .18);
  box-shadow: 0 18px 40px rgba(6, 10, 16, .42); transition: transform .22s, box-shadow .22s, border-color .22s; }
.shotcard:hover { transform: translateY(-3px); border-color: rgba(255, 178, 106, .55); box-shadow: 0 26px 52px rgba(6, 10, 16, .55); }
.shotcard .shotwrap { display: block; position: relative; height: 200px; }
.shotcard img { width: 100%; height: 200px; object-fit: cover; }
.shotcard .noshot { position: absolute; inset: 0; display: grid; place-items: center; color: #7f8ea1; font-size: 12px; }
.shotbody { display: flex; align-items: center; gap: 10px; padding: 11px 13px 13px; }
.shottext { min-width: 0; }
.shotbody b { display: block; font-size: 15px; color: #f1f5fa; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shottext span { display: block; font-size: 12px; color: #93a2b5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shotbody .mini { flex: 0 0 auto; margin-left: auto; font-size: 12.5px; color: #17202b; background: #9ae6ff;
  border-radius: 999px; padding: 7px 13px; font-weight: 700; transition: filter .18s; }
.shotcard:hover .mini { filter: brightness(1.08); }
.herotag { position: absolute; top: 10px; left: 10px; z-index: 2; font-size: 11px; letter-spacing: 1px;
  background: rgba(10, 15, 22, .62); color: #cfe6ff; border-radius: 6px; padding: 3px 7px; }
.heroval { display: flex; gap: 24px; margin-top: 22px; color: #b6c2d1; font-size: 12.5px; }
.heroval i { font-style: normal; color: #fff; font-weight: 700; font-size: 17px; margin-right: 6px; }

/* ——— 分类条 ——— */
.chips { background: var(--surface); border-bottom: 1px solid var(--line); }
.chipsin { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; padding: 12px 0; }
.chipsin b { font-size: 13px; color: var(--dim); margin-right: 10px; font-weight: 400; }
.chip { border: 1px solid transparent; border-radius: 999px; padding: 6px 14px; font-size: 13.5px; color: var(--ink2);
  background: #f1f3f6; cursor: pointer; }
.chip:hover { color: var(--accent-ink); background: rgba(255, 122, 26, .1); }
.chip.on { color: #fff; background: var(--accent); font-weight: 700; }

/* ——— 卡片网格 ——— */
.gridwrap { padding: 26px 0 6px; }
.sect { display: flex; align-items: baseline; gap: 12px; margin: 0 0 4px; font-size: 19px; font-weight: 800; }
.sect small { font-size: 12.5px; color: var(--dim); font-weight: 400; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 22px; margin: 16px 0 10px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  transition: box-shadow .25s, transform .25s, border-color .25s; cursor: pointer; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(255, 122, 26, .45); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.shot { position: relative; height: 206px; background: linear-gradient(150deg, #e9eef5, #c4cedb); overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s; }
.card:hover .shot img { transform: scale(1.05); }
.fskick { position: absolute; right: 10px; bottom: 10px; opacity: 0; transition: opacity .2s;
  background: rgba(23, 29, 39, .76); color: #fff; border: 0; border-radius: 8px; font-size: 12px; padding: 6px 11px; cursor: pointer; }
.card:hover .fskick, .card:focus-within .fskick { opacity: 1; }
.stamp { position: absolute; left: 10px; top: 10px; font-size: 11px; letter-spacing: .5px; color: var(--accent-ink);
  background: rgba(255, 255, 255, .88); border-radius: 6px; padding: 3px 8px; }
.cinfo { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; min-height: 74px; }
.ctitle { font-size: 15.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.csub { font-size: 12.5px; color: var(--ink2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmeta { font-size: 11.5px; color: var(--dim); font-family: ui-monospace, Consolas, monospace; margin-top: 2px; }
/* 没封面时的占位：等距线框，暗示这是个三维体 */
.ph { position: absolute; inset: 0; display: grid; place-items: center; }
.ph svg { width: 132px; height: 132px; opacity: .62; }
.empty { padding: 46px 0 60px; text-align: center; color: var(--ink2); }
.empty h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.empty p { margin: 0 0 18px; color: var(--dim); }
.state { padding: 18px 0; color: var(--ink2); }
.state .why { display: block; font-size: 12px; color: var(--dim); margin-top: 4px; }

/* ——— 说明区 ——— */
.feats { padding: 34px 0 8px; }
.featin { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; }
.feat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 20px; }
.feat span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(255, 122, 26, .12); color: var(--accent-ink); font-size: 19px; margin-bottom: 12px; }
.feat b { display: block; font-size: 15.5px; margin-bottom: 6px; }
.feat p { margin: 0; font-size: 13px; color: var(--ink2); }
.steps { padding: 26px 0 10px; }
.stepsin { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.step { position: relative; padding: 16px 16px 18px 18px; border-left: 3px solid var(--accent); background: var(--surface);
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 10px 10px 0; }
.step b { display: block; margin-bottom: 5px; font-size: 15px; }
.step p { margin: 0; font-size: 13px; color: var(--ink2); }

/* ——— 页脚 ——— */
.foot { margin-top: 40px; background: var(--navy); color: #b9c4d2; padding: 34px 0 20px; }
.footin { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 24px; }
.foot h4 { margin: 0 0 10px; font-size: 13.5px; color: #fff; font-weight: 700; }
.foot ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.foot a, .foot li { font-size: 12.5px; color: #9fb0c4; }
.foot a:hover { color: #ffd9b3; }
.footbar { margin-top: 26px; padding-top: 14px; border-top: 1px solid rgba(185, 196, 210, .18);
  display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: #7f8ea1; }
.footbar .grow { flex: 1 1 auto; }

/* ——— 全屏展示层 ——— */
.theater { position: fixed; inset: 0; z-index: 90; background: #0d1219; display: flex; flex-direction: column; }
.theater.off { display: none; }
.thbar { display: flex; align-items: center; gap: 10px; padding: 7px 14px; background: #131a24;
  border-bottom: 1px solid rgba(255, 255, 255, .09); flex-wrap: wrap; }
.thbar b { color: #eaf0f7; font-size: 14px; font-weight: 600; }
.thbar span { color: #8494a8; font-size: 12px; }
.thbtns { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.thbtns button, .thbtns a { border: 1px solid rgba(214, 226, 240, .24); background: rgba(255, 255, 255, .05);
  color: #d5e0ee; border-radius: 7px; font: inherit; font-size: 12.5px; padding: 5px 11px; cursor: pointer; }
.thbtns button:disabled { opacity: .38; cursor: default; }
.thbtns button:hover, .thbtns a:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); }
.thbtns .x { background: var(--accent); border-color: var(--accent); color: #17202b; font-weight: 700; }
#thFrame { flex: 1 1 auto; width: 100%; border: 0; background: #0d1219; }

@media (max-width: 900px) {
  .heroin { grid-template-columns: 1fr; padding: 34px 0 38px; }
  .shotcard { order: 2; }
  .sbox { width: 168px; }
  .tops { display: none; }
}
/* 触屏：顶栏毛玻璃每帧都要重采样，卡片悬停位移在触摸上会“粘住”，一律关掉 */
@media (hover: none), (pointer: coarse) {
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(255, 255, 255, .98); }
  .card:hover, .shotcard:hover, .big:hover { transform: none; }
  .card:hover .shot img { transform: none; }
  .card, .shotcard, .big { transition: background-color .18s, border-color .18s; }
  * { -webkit-tap-highlight-color: transparent; }
}
@media (max-width: 620px) {
  .wrap { width: min(1280px, 100% - 26px); }
  .topin { height: 56px; gap: 10px; }
  .logo { font-size: 16.5px; }
  .sbox { flex: 1; width: auto; }
  .topadmin { padding: 6px 9px; }
  .hero p { font-size: 14px; }
  .cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .shot { height: 150px; }
  .cinfo { min-height: 0; padding: 10px 11px 12px; }
  .ctitle { font-size: 13.5px; }
  .csub { display: none; }
  .heroval { gap: 16px; }
  .fskick { display: none; }
  .thbar b { max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .thbar span { display: none; }
  .thbtns { width: 100%; margin-left: 0; }
}

/* ——— 客户链接 /s/<id>：静态托管不会替我们改写页面，所以由首页外壳把查看器铺满 —— */
.shareframe { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; display: none; background: #10151d; }
html[data-mode="share"] .shareframe { display: block; }
html[data-mode="share"] #site, html[data-mode="share"] .theater { display: none !important; }
