/* 大雄-OPC百宝箱 · 网页版样式（v2.0 融合版：浅暖灰白 + 淡金 VIP 点睛） */

:root {
  --gold: #a08a4a;
  --gold-bright: #cbb26e;
  --gold-soft: #f7f2e2;
  --gold-line: #e2d8b4;
  --ink: #2e2f32;
  --ink-2: #6b6c6f;
  --ink-3: #a5a49f;
  --line: #ebebe8;
  --bg: #f9f9f7;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .06);
  --shadow-hover: 0 4px 10px rgba(0, 0, 0, .08), 0 14px 32px rgba(0, 0, 0, .12);
  --gold-grad: linear-gradient(135deg, #f7f2e2 0%, #efe7cd 100%);
  --ink-card: linear-gradient(135deg, #ffffff 0%, #fafaf9 100%);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; }
button { font: inherit; cursor: pointer; }

/* ---------------- 顶栏 ---------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 66px;
  padding: 0 22px;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

/* 星晚 LOGO：取自官网 xingwan.art 的「星晚」艺术字（透明底），
   原图是横版 logo-h-navy，这里裁出字形做成方形标记。
   因为是透明底，不能再加圆角底色，否则艺术字会被压住。 */
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand img {
  width: 38px; height: 38px; object-fit: contain;
  border-radius: 0;   /* 透明底不需要圆角 */
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.25; }
.brand-txt b { font-size: 16px; letter-spacing: .3px; }
.brand-txt i { font-size: 11.5px; font-style: normal; color: var(--ink-3); }

.search {
  position: relative;
  flex: 1;
  max-width: 520px;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  background: #f2f2f0;
  border: 1px solid transparent;
  border-radius: 11px;
  transition: .18s;
}
.search:focus-within { background: #fff; border-color: #d5cba6; box-shadow: 0 0 0 4px rgba(160, 138, 74, .1); }
.search .s-ico { font-size: 14px; opacity: .55; margin-right: 8px; }
.search input {
  flex: 1; height: 100%; border: 0; background: transparent; outline: none;
  font: inherit; color: var(--ink);
}
.search input::placeholder { color: var(--ink-3); }
.s-clear { border: 0; background: transparent; color: var(--ink-3); font-size: 13px; }

.dl-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 40px; padding: 0 18px;
  background: #3a3c40;
  color: #fff; font-size: 14px; font-weight: 700;
  border-radius: 11px; white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
  transition: .18s;
}
.dl-btn:hover { transform: translateY(-1px); background: #2e2f32; box-shadow: 0 7px 18px rgba(0, 0, 0, .2); }

/* ---------------- 布局 ---------------- */

.layout {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 22px;
}

.side {
  position: sticky;
  top: 88px;
  flex: 0 0 226px;
  max-height: calc(100vh - 112px);
  overflow-y: auto;
  padding: 12px 8px 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scrollbar-width: thin;
}
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: #d9d8d4; border-radius: 3px; }

.nav-group { padding: 6px 0; }
.nav-group + .nav-group { border-top: 1px dashed var(--line); }
.nav-label {
  padding: 8px 12px 4px; font-size: 11px; letter-spacing: 1.4px;
  color: var(--ink-3); font-weight: 600;
}

.nav-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 8px 12px;
  border: 0; background: transparent; border-radius: 9px;
  color: var(--ink-2); font-size: 13.5px; text-align: left;
  transition: .14s;
}
.nav-item:hover { background: #f5f5f2; color: var(--gold); }
.nav-item.on { background: var(--gold-soft); color: #8a763c; font-weight: 600; box-shadow: inset 2.5px 0 0 #cbb26e; }
.nav-item .n-ico { width: 17px; text-align: center; font-size: 14px; }
.nav-item .n-count {
  margin-left: auto; font-size: 11px; color: var(--ink-3);
  background: #f2f2f0; padding: 1px 7px; border-radius: 20px;
}
.nav-item.on .n-count { background: #fff; color: #8a763c; }
/* 四大板块主标题：大一号加粗，与普通菜单拉开层级 */
.nav-primary { font-size: 15px; font-weight: 700; padding: 10px 12px; letter-spacing: .4px; color: var(--ink); }
.nav-primary .n-ico { font-size: 16px; }

.nav-sub { padding: 2px 0 4px 12px; }
.nav-sub button {
  display: block; width: 100%; padding: 5px 10px;
  border: 0; background: transparent; border-left: 2px solid var(--line);
  color: var(--ink-3); font-size: 12.5px; text-align: left; transition: .14s;
}
.nav-sub button:hover { color: var(--gold); border-left-color: #d5cba6; }
.nav-sub button.on { color: #8a763c; border-left-color: #cbb26e; font-weight: 600; }

.vip-entry {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 16px); margin: 12px 8px 4px; padding: 12px;
  border: 0; border-radius: 11px;
  background: var(--gold-grad);
  border: 1px solid #e2d8b4;
  color: #635a36; text-align: left; box-shadow: 0 2px 8px rgba(160, 138, 74, .15);
}
.vip-entry .v-ico { font-size: 18px; }
.vip-entry .v-txt { display: flex; flex-direction: column; line-height: 1.3; }
.vip-entry .v-txt b { font-size: 13px; color: #635a36; }
.vip-entry .v-txt i { font-size: 10.5px; font-style: normal; color: #968c66; }
.vip-entry:hover { filter: brightness(1.06); }

/* ---------------- 主体 ---------------- */

.main { flex: 1; min-width: 0; padding-bottom: 60px; }

.hero {
  display: flex; align-items: center; gap: 20px;
  padding: 28px 30px;
  background: linear-gradient(120deg, #eceef0 0%, #e6e8eb 52%, #e2e4e8 100%);
  border: 1px solid #e3e3e0;
  color: #2e2f32; border-radius: 18px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .06);
}
.hero img { width: 78px; height: 78px; border-radius: 18px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.hero h1 { margin: 0 0 8px; font-size: 23px; letter-spacing: .4px; color: #2e2f32; }
.hero h1 small { font-size: 13px; font-weight: 400; opacity: .82; margin-left: 10px; }
.hero p { margin: 0; font-size: 13.5px; line-height: 1.9; color: #8b8c90; max-width: 780px; }
.hero-stats { display: flex; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.hero-stat {
  min-width: 92px; padding: 10px 18px;
  background: #fff;
  border: 1px solid #e7e7e4;
  border-radius: 12px; text-align: center;
}
.hero-stat b { display: block; font-size: 25px; line-height: 1.2; letter-spacing: .5px; color: #a08a4a; }
.hero-stat span { display: block; font-size: 11px; color: #a5a49f; margin-top: 4px; letter-spacing: 1px; }

/* VIP 金色横幅（首页位于四大百宝箱上方） */
.course-banner {
  display: flex; align-items: center; gap: 16px; width: 100%;
  background: linear-gradient(120deg, #f7f2e2 0%, #efe7cd 100%);
  border: none; border-radius: 14px; padding: 16px 22px;
  color: #635a36; text-align: left; cursor: pointer;
  box-shadow: 0 6px 18px rgba(160, 138, 74, .35);
  transition: transform .16s, box-shadow .16s;
  margin: 18px 0 4px;
}
.course-banner:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(160, 138, 74, .25); }
.course-banner .cb-ico { font-size: 28px; }
.course-banner .cb-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.course-banner .cb-title { font-size: 16px; font-weight: 800; color: #635a36; }
.course-banner .cb-desc { font-size: 12px; color: #968c66; line-height: 1.6; }
.course-banner .cb-go { font-size: 12.5px; background: rgba(99, 90, 54, .12); border-radius: 16px; padding: 6px 14px; color: #635a36; font-weight: 700; flex: 0 0 auto; white-space: nowrap; }

.board-cards {
  display: grid; gap: 14px; margin-top: 18px;
  grid-template-columns: repeat(auto-fit, minmax(258px, 1fr));
}
.board-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px 20px 18px;
  border: 1px solid var(--line); border-radius: 16px;
  text-align: left; cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .13);
  transition: .2s;
}
.board-card::after {
  content: ""; position: absolute; right: -34px; top: -34px;
  width: 118px; height: 118px; border-radius: 50%;
  background: rgba(0, 0, 0, .02);
}
.board-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(0, 0, 0, .2); border-color: #d9d8d3; }
.bc-ico { font-size: 27px; }
.bc-name { font-size: 16.5px; font-weight: 700; margin-top: 4px; }
.bc-desc { font-size: 12.5px; line-height: 1.6; opacity: .9; }
.bc-count { margin-top: 10px; font-size: 12.5px; font-weight: 600; opacity: .96; }

section.block { margin-top: 34px; scroll-margin-top: 84px; }

.block-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: 14px 14px 0 0;
  color: #3a3c40; border: 1px solid var(--line); border-bottom: 0;
  background: linear-gradient(135deg, #f2f2f0, #e9e9e6);
}
.block-head .bh-ico { font-size: 21px; }
.block-head h2 { margin: 0; font-size: 17.5px; letter-spacing: .3px; }
.block-head .bh-desc { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.block-head .bh-count {
  margin-left: auto; font-size: 12px; padding: 3px 11px;
  background: rgba(0, 0, 0, .06); border-radius: 20px; white-space: nowrap;
}
.block-body {
  padding: 18px; background: var(--card);
  border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 14px 14px; box-shadow: var(--shadow);
}

.cat-head {
  display: flex; align-items: center; gap: 9px;
  margin: 20px 0 12px; padding-left: 11px;
  border-left: 4px solid var(--gold);
  font-size: 15px; font-weight: 700; color: var(--ink);
  scroll-margin-top: 90px;
}
.cat-head:first-child { margin-top: 2px; }
.cat-head .ch-count {
  font-size: 11.5px; font-weight: 500; color: var(--ink-3);
  background: #f2f2f0; padding: 2px 9px; border-radius: 20px;
}

.grid { display: grid; gap: 13px; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); }

/* ---------------- 卡片 ---------------- */

.card {
  display: flex; flex-direction: column;
  padding: 14px 15px 13px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 13px; transition: .18s;
}
.card:hover { border-color: #d9d8d3; box-shadow: var(--shadow-hover); transform: translateY(-2px); }

.card-top { display: flex; align-items: center; gap: 11px; }
.avatar {
  flex: 0 0 40px; width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 17px; font-weight: 700;
  position: relative; overflow: hidden;
}
/* 网站真实 logo 叠在字母兜底头像上；加载失败自动露出字母 */
.avatar-logo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }
.card-name { font-size: 14.5px; font-weight: 650; line-height: 1.35; }
.card-url { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; word-break: break-all; }

.card-purpose {
  flex: 1;
  margin: 11px 0 9px; font-size: 12.8px; line-height: 1.62; color: var(--ink-2);
}
.card-note {
  align-self: flex-start; margin-bottom: 10px;
  font-size: 11.5px; color: #8a763c; background: var(--gold-soft);
  padding: 2px 9px; border-radius: 20px;
}

.card-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.btn {
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink-2); font-size: 12.5px; transition: .15s;
}
.btn:hover { border-color: #d5cba6; color: #8a763c; background: #faf9f4; }
.btn.primary {
  border-color: transparent; color: #635a36; font-weight: 700;
  background: var(--gold-grad);
}
.btn.primary:hover { filter: brightness(1.06); color: #635a36; }

/* ---------------- 小工具 / 课程 ---------------- */

.tool-note {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 16px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: 12px; font-size: 13px; color: #6e6543;
}
.tool-note b { color: #5c543a; }

.course-grid { display: grid; gap: 15px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.course-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 13px;
  transition: .18s;
}
.course-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #ddd3ae; }
.course-card img { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #f1f1ee; }
.cc-body { display: flex; flex-direction: column; flex: 1; padding: 13px 14px 14px; }
.cc-no {
  align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .6px;
  color: #8a763c; background: var(--gold-soft); padding: 2px 9px; border-radius: 20px; margin-bottom: 7px;
}
.cc-name { font-size: 15px; font-weight: 700; }
.cc-sub { font-size: 12px; color: #8a763c; margin: 3px 0 8px; }
.cc-desc { flex: 1; font-size: 12.5px; line-height: 1.62; color: var(--ink-2); }
.cc-go {
  margin-top: 12px; padding: 8px 0; border: 0; border-radius: 9px;
  background: var(--gold-grad);
  color: #635a36; font-size: 13px; font-weight: 700; text-align: center;
}
.cc-go:hover { filter: brightness(1.05); }

/* ---------------- 空态 / 页脚 ---------------- */

.empty { padding: 60px 0; text-align: center; color: var(--ink-3); }
.empty .e-ico { font-size: 34px; margin-bottom: 10px; }

.foot {
  max-width: 1500px; margin: 0 auto; padding: 26px 22px 40px;
  border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px;
  text-align: center; line-height: 1.9;
}
.foot b { color: var(--ink-2); }

.fab-dl {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; display: none;
  align-items: center; gap: 7px; padding: 12px 20px;
  background: var(--gold-grad); color: #635a36; font-weight: 700;
  border-radius: 30px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(160, 138, 74, .38);
}

.toast {
  position: fixed; left: 50%; bottom: 34px; z-index: 90;
  transform: translate(-50%, 16px);
  padding: 11px 22px; border-radius: 11px;
  background: #2e2f32; color: #f2f2ef; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: .24s;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 搜索结果容器是 .layout 的 flex 子项，需要撑满 */
#searchBox { flex: 1; min-width: 0; }

/* ---------------- 关注公众号 ---------------- */

/* 关注公众号：墨黑，非强调 */
.wx-entry {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 16px); margin: 6px 8px 4px; padding: 11px 12px;
  border: 1px solid #e9e8e4; border-radius: 11px;
  background: #fff;
  color: #4a4b4e; text-align: left;
}
.wx-entry .v-ico { font-size: 18px; }
.wx-entry .v-txt { display: flex; flex-direction: column; line-height: 1.3; }
.wx-entry .v-txt b { font-size: 13px; color: #3f4043; }
.wx-entry .v-txt i { font-size: 10.5px; font-style: normal; color: #a5a49f; }
.wx-entry:hover { border-color: #d9d8d3; }

.gzh-panel {
  display: flex; gap: 26px; align-items: center; flex-wrap: wrap;
  background: linear-gradient(120deg, #fdfcfa 0%, #f7f2e2 100%);
  border: 1px solid var(--gold-line); border-radius: 16px; padding: 24px 26px;
}
.gzh-panel-qr {
  width: 190px; height: 190px; flex: 0 0 auto; background: #fff;
  border-radius: 14px; padding: 8px; box-shadow: 0 6px 20px rgba(160, 138, 74, .12);
}
.gzh-panel-qr img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 10px; }
.gzh-panel-txt { flex: 1; min-width: 250px; }
.gzh-panel-txt h3 { margin: 0 0 6px; font-size: 19px; color: var(--ink); }
.gzh-panel-sub { margin: 0 0 12px; font-size: 13px; color: var(--ink-2); }
.gzh-panel-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.gzh-panel-tip { margin: 12px 0 0; font-size: 12px; color: var(--ink-3); }

.gzh-perks { list-style: none; margin: 0 0 16px; padding: 0; }
.gzh-perks li { font-size: 13.5px; color: #6e6543; line-height: 2; padding-left: 22px; position: relative; }
.gzh-perks li::before { content: '✓'; position: absolute; left: 0; color: #a08a4a; font-weight: 700; }

/* 广告位：与关注公众号/商务合作同款墨黑卡片排版 */
.ad-strip { display: flex; flex-direction: column; gap: 8px; margin: 6px 8px 4px; }
.ad-slot {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 16px); margin: 0 8px; padding: 11px 12px;
  border: 1px dashed #d8d7d2; border-radius: 11px;
  background: rgba(255, 255, 255, .6);
  color: #a5a49f; text-align: left; cursor: pointer;
  transition: transform .15s, border-color .15s;
}
.ad-slot .v-ico { font-size: 18px; }
.ad-slot .v-txt { display: flex; flex-direction: column; line-height: 1.3; }
.ad-slot .v-txt b { font-size: 13px; color: #6b6c6f; }
.ad-slot .v-txt i { font-size: 10.5px; font-style: normal; color: #a5a49f; }
.ad-slot:hover { border-color: #c9c8c3; transform: translateY(-1px); }
.ad-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 16px; }
.ad-slot.wide {
  width: 100%; margin: 0; height: 92px; padding: 14px 18px;
  justify-content: center;
}

/* 商务合作（联系客服）入口：墨黑，与关注公众号统一 */
.kefu-entry {
  display: flex; align-items: center; gap: 10px;
  width: calc(100% - 16px); margin: 8px 8px 4px; padding: 11px 12px;
  border: 1px solid #e9e8e4; border-radius: 11px;
  background: #fff;
  color: #4a4b4e; text-align: left; cursor: pointer;
}
.kefu-entry .v-ico { font-size: 18px; }
.kefu-entry .v-txt { display: flex; flex-direction: column; line-height: 1.3; }
.kefu-entry .v-txt b { font-size: 13px; color: #3f4043; }
.kefu-entry .v-txt i { font-size: 10.5px; font-style: normal; color: #a5a49f; }
.kefu-entry:hover { border-color: #d9d8d3; }

.gzh-badge.kefu-badge { color: #8a763c; background: var(--gold-soft); }

/* 公众号板块下方：客服入口 + 广告位横排 */
.gzh-foot { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.kefu-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  height: 92px; border: 1.5px solid #e2d8b4; border-radius: 12px;
  background: linear-gradient(135deg, #fbf9f1, #f5eeda);
  color: #8a763c; font-size: 14.5px; font-weight: 600; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.kefu-btn:hover { background: #fff; border-color: #cbb26e; transform: translateY(-2px); }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(40, 41, 44, .45);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal-card {
  position: relative; background: var(--card); border-radius: 18px;
  padding: 26px 28px 22px; width: 100%; max-width: 380px; max-height: 90vh;
  overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
}
.modal-x {
  position: absolute; top: 12px; right: 12px; width: 30px; height: 30px;
  border: 0; border-radius: 9px; background: #f1f1ee; color: var(--ink-3); font-size: 14px;
}
.modal-x:hover { background: #e8e8e4; color: var(--ink); }

.gzh-card { text-align: center; }
.gzh-head { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-bottom: 16px; }
.gzh-badge {
  display: inline-block; font-size: 10.5px; letter-spacing: 2px; color: #8a763c;
  background: var(--gold-soft); border-radius: 10px; padding: 3px 10px;
}
.gzh-head h3 { margin: 0; font-size: 18px; color: var(--ink); }
.gzh-head p { margin: 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; }
.gzh-qr {
  width: 200px; height: 200px; margin: 0 auto 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; padding: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .08);
}
.gzh-qr img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 8px; }
.gzh-name {
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 14px;
  background: #f1f1ee; border-radius: 20px; padding: 5px 6px 5px 16px;
}
.gzh-name span { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.gzh-card .gzh-perks {
  text-align: left; background: #fbf9f1; border: 1px dashed #e2d8b4;
  border-radius: 10px; padding: 12px 14px;
}
.gzh-ok { width: 100%; }
.gzh-tip { margin-top: 10px; font-size: 11.5px; color: var(--ink-3); line-height: 1.6; }
.gzh-intro { display: block; width: 100%; margin-bottom: 12px; font-size: 13px; color: var(--ink); }
.gzh-intro[hidden] { display: none; }

/* 下载客户端弹窗 */
.dl-card { max-width: 470px; text-align: left; }
.dl-head { text-align: center; margin-bottom: 16px; }
.dl-badge {
  display: inline-block; font-size: 10.5px; letter-spacing: 2px; color: #63676c;
  background: #f1f1ee; border-radius: 10px; padding: 3px 10px; margin-bottom: 9px;
}
.dl-head h3 { margin: 0 0 5px; font-size: 18px; color: var(--ink); }
.dl-head p { margin: 0; font-size: 12.5px; color: var(--ink-3); }

.dl-choice { display: flex; flex-direction: column; gap: 9px; margin-bottom: 15px; }
.dl-pick {
  display: flex; align-items: center; gap: 12px; padding: 13px 15px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
  text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s;
}
.dl-pick:hover { border-color: #cbb26e; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.06); }
.dl-pick.sub { background: #fbfbfa; }
.dl-ico {
  flex: 0 0 auto; width: 38px; height: 38px; border-radius: 10px; background: var(--gold-soft);
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.dl-pick.sub .dl-ico { background: #f0f0ed; }
.dl-pick-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.dl-pick-txt b { font-size: 13.5px; color: var(--ink); }
.dl-pick-txt i { font-style: normal; font-size: 12px; color: var(--ink-3); line-height: 1.5; }

.dl-guide { background: #fbf9f1; border: 1px dashed #e2d8b4; border-radius: 12px; padding: 13px 15px; margin-bottom: 14px; }
.dl-guide-t { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.dl-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.dl-steps li { display: flex; gap: 9px; }
.dl-n {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.dl-steps li b { display: block; font-size: 12.5px; color: var(--ink); margin-bottom: 2px; }
.dl-steps li i { font-style: normal; font-size: 12px; color: var(--ink-2); line-height: 1.6; }
.dl-safe { margin: 11px 0 0; padding-top: 10px; border-top: 1px dashed #e6dcc0; font-size: 11.5px; color: var(--ink-3); line-height: 1.65; }

.dl-verify { background: #f7f7f5; border-radius: 10px; padding: 11px 13px; margin-bottom: 15px; }
.dl-v-label { display: block; font-size: 11px; letter-spacing: .5px; color: var(--ink-3); margin-bottom: 8px; }
.dl-v-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 3px 0; }
.dl-v-row b { flex: 0 0 62px; font-weight: 500; color: var(--ink-2); }
.dl-v-row span { color: var(--ink); }
.dl-v-row code {
  flex: 1 1 auto; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 10.5px;
  color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dl-v-row .btn { flex: 0 0 auto; padding: 3px 9px; font-size: 11.5px; }

/* 手机端浮动关注按钮 */
.fab-wx {
  position: fixed; right: 20px; bottom: 78px; z-index: 60; display: none;
  width: 46px; height: 46px; border: 0; border-radius: 50%;
  background: var(--gold-grad); color: #635a36; font-size: 20px; font-weight: 700;
  align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(160, 138, 74, .4);
}

/* ---------------- 响应式 ---------------- */

@media (max-width: 1080px) {
  .side { display: none; }
  .layout { padding: 16px; }
  .fab-dl { display: inline-flex; }
  .fab-wx { display: flex; }
}

@media (max-width: 720px) {
  .topbar { height: auto; flex-wrap: wrap; gap: 10px; padding: 11px 14px; }
  .brand-txt i { display: none; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
  .dl-btn { margin-left: auto; padding: 0 14px; }
  .hero { flex-direction: column; align-items: flex-start; padding: 22px; }
  .hero h1 { font-size: 20px; }
  .hero h1 small { display: block; margin: 6px 0 0; }
  .hero-stat { min-width: 70px; padding: 7px 10px; }
  .course-banner { flex-direction: column; align-items: flex-start; }
  .grid { grid-template-columns: 1fr; }
  .course-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
  .ad-row { grid-template-columns: 1fr; }
  .gzh-foot { grid-template-columns: 1fr; }
}

/* ---------------- 星晚版新增 ---------------- */

/* 懒渲染网格占位：避免大板块展开时页面跳动 */
.grid-slot { min-height: 1px; }

/* 搜索结果过多时的提示 */
.more-tip {
  margin: -4px 0 6px; padding: 9px 12px;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: 10px; color: #635a36; font-size: 12.5px; text-align: center;
}

/* 课程卡占位图（替代原站的课程封面图） */
.cc-ph {
  width: 100%; aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #f7f2e2 0%, #e7dcc0 100%);
  color: #8d7a45; font-size: 34px; font-weight: 800; letter-spacing: 2px;
}
.cc-go-off { color: #a5a49f; cursor: default; }

/* 二维码占位 */
.qr-ph {
  width: 100%; aspect-ratio: 1/1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #f5f5f2; border: 1px dashed var(--line);
  border-radius: 10px; color: var(--ink-3); font-size: 12px; line-height: 1.7;
}

/* 卡片名称 + 域名竖排（原站是内联 span，工具名变长后会挤成一行） */
.card-meta { display: flex; flex-direction: column; min-width: 0; }
.card-meta .card-name, .card-meta .card-url { display: block; }

/* ---------------- 客户端下载弹窗：平台切换 ---------------- */
.dl-tabs {
  display: flex; gap: 8px; margin: 14px 0 12px;
  padding: 5px; background: #f4f4f1; border-radius: 11px;
}
.dl-tab {
  flex: 1; padding: 9px 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--ink-2);
  font-size: 13.5px; font-weight: 650; cursor: pointer; transition: .15s;
}
.dl-tab:hover { color: var(--ink); }
.dl-tab.on {
  background: #fff; color: #635a36;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .07), 0 0 0 1px var(--gold-line);
}

/* [hidden] 必须压过 .dl-choice{display:flex}。
   两者权重相同，而 .dl-choice 定义在 [hidden] 之后，隐藏会失效——
   表现为切到 Windows 标签时 macOS 的 .dmg 下载项也一起显示。 */
[hidden] { display: none !important; }

/* 安装包未上传：置灰 + 禁用手型，明确区别于可点击项 */
.dl-pick[data-pending] {
  opacity: .55; cursor: not-allowed; pointer-events: auto;
}
.dl-pick[data-pending]:hover { border-color: var(--line); background: #fbfbfa; }
.dl-pick[data-pending] .dl-pick-txt b::after {
  content: '（待上传）'; font-weight: 500; color: var(--ink-3); font-size: 12px;
}

/* ================ 网页版离线小工具 ================ */
.tool-card { max-width: 720px; max-height: 88vh; overflow-y: auto; }
.tp-card { max-width: 720px; margin: 0 auto; }
.tp-head {
  display: flex; align-items: center; gap: 11px;
  margin-bottom: 14px; padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}
.tp-head .tp-ico {
  width: 40px; height: 40px; flex: 0 0 40px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-grad); border-radius: 11px;
  font-size: 20px;
}
.tp-head h3 { margin: 0; font-size: 16.5px; color: var(--ink); }
.tp-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-3); }
.tp-head .tp-priv {
  margin-left: auto; flex-shrink: 0;
  padding: 4px 10px; border-radius: 20px;
  background: #eef5ec; color: #4a7c42;
  font-size: 11.5px; font-weight: 650;
}

.trow { display: flex; flex-direction: column; gap: 13px; }
.fld { display: flex; flex-direction: column; gap: 5px; }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fld input, .fld select, .fld textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink);
  font-size: 14px; font-family: inherit;
}
.fld textarea { resize: vertical; line-height: 1.6; }
.fld input:focus, .fld select:focus, .fld textarea:focus {
  outline: 0; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(160, 138, 74, .12);
}
.fld input[type=range] { padding: 0; border: 0; accent-color: #a08a4a; }

.tbtns { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.tbtn {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 600; cursor: pointer; transition: .15s;
}
.tbtn:hover { border-color: #ddd3ae; color: var(--ink); }
.tbtn.primary {
  background: linear-gradient(135deg, #f7f2e2, #e9dcb2);
  border-color: #ddd3ae; color: #635a36;
}

.tout { margin-top: 15px; }
.tout:empty { display: none; }
.tprev {
  max-width: 100%; display: block; margin: 0 auto;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
}
.tmeta { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); text-align: center; }
.tbig {
  padding: 16px; text-align: center;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-radius: 11px;
  font-size: 19px; font-weight: 700; color: #635a36; word-break: break-all;
}
.tbig .tu { font-size: 13px; font-weight: 500; color: var(--ink-3); }
.terr { padding: 12px; text-align: center; color: #b4453c; font-size: 13px; }

.ttab { width: 100%; border-collapse: collapse; font-size: 13px; }
.ttab th, .ttab td { padding: 8px 11px; text-align: left; border-bottom: 1px solid var(--line); }
.ttab th { width: 38%; color: var(--ink-2); font-weight: 600; }
.ttab td { color: var(--ink); font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.ttab tr:last-child th, .ttab tr:last-child td { border-bottom: 0; }

.tpw { display: flex; flex-direction: column; gap: 5px; max-height: 340px; overflow-y: auto; }
.tpw code {
  display: block; padding: 8px 11px;
  background: #f7f7f5; border: 1px solid var(--line); border-radius: 8px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
  color: var(--ink); word-break: break-all; user-select: all;
}

.ck { display: flex; align-items: center; gap: 7px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.ck input { width: 16px; height: 16px; accent-color: #a08a4a; }

.tunit { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 11px; }
.tup {
  padding: 26px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--line); border-radius: 12px;
  background: #fbfbfa; transition: .15s;
}
.tup:hover, .tup.over { border-color: var(--gold); background: var(--gold-soft); }
.tup p { margin: 0; font-size: 14px; color: var(--ink-2); }
.tup .thint { margin-top: 5px; font-size: 12px; color: var(--ink-3); }

.tswatch { display: flex; align-items: center; gap: 11px; font-size: 13px; color: var(--ink-2); }
.tswatch input[type=color] {
  width: 54px; height: 38px; padding: 2px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer;
}
.tswatch.big { align-items: flex-start; }
.tswatch.big > span {
  width: 74px; height: 74px; flex: 0 0 74px;
  border: 1px solid var(--line); border-radius: 11px;
}
.tswatch.big .tmeta { margin-top: 4px; text-align: left; }

@media (max-width: 640px) {
  .tunit { grid-template-columns: 1fr; }
  .tp-head { flex-wrap: wrap; }
  .tp-head .tp-priv { margin-left: 0; }
}

/* ================ 桌面客户端专用 ================ */
body.client-body .layout { padding-left: 16px; }
.client-body .side { position: sticky; top: 70px; align-self: start; max-height: calc(100vh - 90px); overflow-y: auto; }
@media (max-width: 1080px) {
  .client-body .side { display: none; }
}

/* ================ 星晚商学院课程卡 ================ */
.cc-ph { flex-direction: column; gap: 8px; }
.cc-ph b { font-size: 40px; line-height: 1; letter-spacing: 1px; }
.cc-ph.hot { background: linear-gradient(135deg, #1e1e20, #3a3a3e); color: #d8c68a; }
.cc-tag {
  padding: 3px 10px; border-radius: 20px;
  background: rgba(255, 255, 255, .16);
  font-size: 11.5px; font-weight: 650; letter-spacing: .3px;
}
.cc-for {
  margin: 9px 0 0; padding: 8px 10px;
  background: #fafaf8; border-left: 3px solid var(--gold-line);
  border-radius: 0 7px 7px 0;
  font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
}
.cc-for b { color: var(--ink); }
.cc-foot-note {
  margin: 16px 0 0; padding: 12px 14px; text-align: center;
  background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 11px;
  font-size: 13px; color: #635a36;
}
.cc-foot-note b { font-size: 14px; }
.cc-foot-note a { color: #635a36; font-weight: 600; text-decoration: none; border-bottom: 1px solid #d8c68a; }

/* 安装包未上架时的说明条 */
.dl-pending-note {
  margin: 0 0 14px; padding: 11px 13px;
  background: #fff8e8; border: 1px solid #e8d9a8; border-radius: 10px;
  color: #7a6534; font-size: 12.5px; line-height: 1.65;
}

/* 页脚完整横版 LOGO（官网同款） */
.foot-logo {
  display: block; width: 190px; height: auto;
  margin: 0 auto 14px; opacity: .95;
  border-radius: 8px;
}

/* ==================== 提示词库 ==================== */
.pr-card-modal { max-width: 860px; max-height: 90vh; overflow-y: auto; }
.pr-modal-head { padding-right: 40px; margin-bottom: 16px; }
.pr-modal-head h3 { margin: 0 0 5px; font-size: 19px; color: var(--ink); }
.pr-modal-head p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-3); }
.pr-modal-head b { color: var(--ink-2); }

.pr-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 13px; }
.pr-mode {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px;
  background: #fff; cursor: pointer; text-align: left; transition: .16s;
}
.pr-mode:hover { border-color: #ddd3ae; }
.pr-mode.on {
  background: var(--gold-soft); border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(160, 138, 74, .1);
}
.pr-mode-ico { font-size: 21px; flex-shrink: 0; }
.pr-mode-txt { display: flex; flex-direction: column; line-height: 1.35; }
.pr-mode-txt b { font-size: 13.5px; color: var(--ink); }
.pr-mode.on .pr-mode-txt b { color: #635a36; }
.pr-mode-txt i { font-size: 11.5px; font-style: normal; color: var(--ink-3); }

.pr-tip {
  padding: 10px 13px; margin-bottom: 13px;
  background: #f7f7f5; border-left: 3px solid var(--gold); border-radius: 0 8px 8px 0;
  font-size: 12.5px; line-height: 1.65; color: var(--ink-2);
}
.pr-tip b { color: var(--ink); }

.pr-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 15px; }
.pr-cat {
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 20px;
  background: #fff; color: var(--ink-2);
  font-size: 12.5px; font-weight: 600; cursor: pointer; transition: .15s;
}
.pr-cat span { margin-left: 5px; opacity: .55; font-weight: 500; }
.pr-cat:hover { border-color: #ddd3ae; }
.pr-cat.on { background: #635a36; border-color: #635a36; color: #fff; }

.pr-list { display: flex; flex-direction: column; gap: 11px; }
.pr-item, .pr-list .pr-card {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.pr-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pr-card-head h4 { margin: 0; font-size: 15px; color: var(--ink); flex: 1; }
.pr-badge {
  padding: 3px 10px; border-radius: 20px; flex-shrink: 0;
  background: var(--gold-soft); border: 1px solid var(--gold-line);
  color: #635a36; font-size: 11.5px; font-weight: 650;
}
.pr-for {
  margin: 0 0 9px; font-size: 12.5px; line-height: 1.6; color: var(--ink-2);
}
.pr-for b { color: var(--ink); }
.pr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.pr-tags span { font-size: 11.5px; color: var(--ink-3); }

.pr-detail { margin-bottom: 11px; }
.pr-detail summary {
  cursor: pointer; font-size: 12.5px; font-weight: 600; color: #635a36;
  padding: 5px 0; list-style: none; user-select: none;
}
.pr-detail summary::-webkit-details-marker { display: none; }
.pr-detail summary::before { content: '▸ '; }
.pr-detail[open] summary::before { content: '▾ '; }
.pr-detail summary:hover { color: #4a4230; }
.pr-body {
  margin: 8px 0 0; padding: 13px 15px;
  background: #f8f8f6; border: 1px solid var(--line); border-radius: 10px;
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 12px; line-height: 1.72; color: #33363a;
  white-space: pre-wrap; word-break: break-word;
  max-height: 340px; overflow-y: auto; user-select: all;
}

.pr-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pr-vars {
  margin-top: 12px; padding: 14px;
  background: #fafaf8; border: 1px dashed var(--gold-line); border-radius: 11px;
  display: flex; flex-direction: column; gap: 11px;
}
.pr-vars .fld > span { font-size: 12px; }
.pr-vars .btn { align-self: flex-start; }

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

/* ============ 安装包「发布者未知」说明 ============ */
.dl-note {
  margin: 0 0 14px; padding: 12px 14px;
  background: #fff8e8; border: 1px solid #e8d9a8; border-radius: 10px;
  font-size: 12.5px; line-height: 1.72; color: #6d5a2e;
}
.dl-note b { color: #8a5a00; }

/* SHA-256 校验值行：等宽字体、可点击复制 */
.dl-v-hash { align-items: flex-start; }
.dl-v-hash > b { flex-shrink: 0; padding-top: 2px; }
.dl-v-hash > span {
  font-family: ui-monospace, Consolas, "Courier New", monospace;
  font-size: 11.5px; letter-spacing: .3px; word-break: break-all;
  color: var(--ink-2);
}
.dl-v-hash > span:hover { color: #635a36; text-decoration: underline; }

.dl-v-why {
  margin: 9px 0 0; font-size: 11.5px; line-height: 1.68; color: var(--ink-3);
}
