/* =========================================================
   创业路副业圈 · 全局样式
   ========================================================= */
:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #fafbff;
  --ink: #0e1526;
  --ink-2: #2c3a52;
  --muted: #6b7890;
  --muted-2: #93a0b5;
  --line: #e6e9f2;
  --line-2: #eef1f8;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --primary-soft: #eef0ff;
  --primary-ink: #3730a3;
  --ok: #059669;
  --ok-soft: #e7f7f0;
  --warn: #d97706;
  --warn-soft: #fdf3e3;
  --danger: #dc2626;
  --danger-soft: #fdeeee;
  --info: #0284c7;
  --info-soft: #e6f5fd;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px -8px rgba(16, 24, 40, .12), 0 2px 8px rgba(16, 24, 40, .04);
  --shadow-lg: 0 24px 60px -20px rgba(20, 28, 60, .25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-2); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.35; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
::selection { background: #ddd9fe; color: #241f63; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.hidden { display: none !important; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.center { text-align: center; }
.divider { height: 1px; background: var(--line); border: 0; margin: 22px 0; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 18px;
  border-radius: 10px; border: 1px solid transparent;
  background: var(--surface); color: var(--ink-2);
  font-weight: 600; font-size: 14px; cursor: pointer;
  transition: .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: #fff; box-shadow: 0 6px 16px -6px rgba(79, 70, 229, .55); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 22px -8px rgba(79, 70, 229, .6); }
.btn-soft { background: var(--primary-soft); color: var(--primary-ink); }
.btn-soft:hover { background: #e4e6ff; color: var(--primary-ink); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: #fff; border-color: #d5daea; }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger:hover { background: #fbdada; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 26px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.link-btn { border: 0; background: none; color: var(--primary); font-weight: 600; font-size: 13px; cursor: pointer; padding: 4px 6px; border-radius: 6px; }
.link-btn:hover { background: var(--primary-soft); }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { background: var(--danger-soft); }

/* ---------------- forms ---------------- */
.field { margin-bottom: 16px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.field .hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 10px 13px; font-size: 14px; outline: none; transition: .16s;
}
.input:focus, .select:focus, .textarea:focus { border-color: #a5a0f5; box-shadow: 0 0 0 3px rgba(99, 91, 255, .12); }
.input::placeholder, .textarea::placeholder { color: #a8b2c4; }
.textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7890' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }

/* switch */
.switch { position: relative; display: inline-block; width: 44px; height: 25px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #d5daea; border-radius: 99px; transition: .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 19px; height: 19px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.18); }
.switch input:checked + span { background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.switch input:checked + span::after { transform: translateX(19px); }

/* ---------------- badges / chips ---------------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; line-height: 20px; white-space: nowrap; }
.badge-free { background: var(--ok-soft); color: var(--ok); }
.badge-vip { background: linear-gradient(135deg, #fef3c7, #fde68a); color: #92400e; }
.badge-paid { background: var(--primary-soft); color: var(--primary-ink); }
.badge-draft { background: #eef1f8; color: var(--muted); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-neutral { background: var(--line-2); color: var(--muted); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 15px; border-radius: 99px;
  background: #fff; border: 1px solid var(--line); color: var(--ink-2);
  font-size: 13.5px; font-weight: 500; cursor: pointer; transition: .16s;
}
.chip:hover { border-color: #c9cfe2; color: var(--ink); }
.chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .dot { width: 7px; height: 7px; border-radius: 50%; }

.tag { display: inline-flex; padding: 2px 8px; background: var(--line-2); color: var(--muted); border-radius: 6px; font-size: 12px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230, 233, 242, .8);
}
.site-header .inner { height: 68px; display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(140deg, #6366f1, #8b5cf6 55%, #d946ef);
  display: grid; place-items: center; color: #fff;
  box-shadow: 0 6px 14px -5px rgba(99, 102, 241, .7);
}
.brand-mark svg { width: 19px; height: 19px; }
.brand small { display: block; font-size: 10px; letter-spacing: .16em; color: var(--muted-2); font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 13px; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 500; }
.site-nav a:hover, .site-nav a.active { background: var(--line-2); color: var(--ink); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 12px 4px 5px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.user-chip:hover { border-color: #ccd2e4; color: var(--ink); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; background: linear-gradient(135deg, #6366f1, #a855f7); }
.avatar.lg { width: 58px; height: 58px; font-size: 22px; border-radius: 18px; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }

/* ---------------- hero ---------------- */
.hero { padding: 58px 0 34px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto; width: 640px; height: 640px;
  background: radial-gradient(circle at 30% 30%, rgba(124, 58, 237, .13), transparent 62%),
              radial-gradient(circle at 70% 60%, rgba(16, 185, 129, .1), transparent 58%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 48px; align-items: center; position: relative; }
.hero-copy, .hero-visual { min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 99px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 600; color: var(--primary-ink); margin-bottom: 18px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.hero h1 { font-size: clamp(30px, 4vw, 46px); line-height: 1.18; letter-spacing: -.035em; }
.hero h1 .grad { background: linear-gradient(120deg, #4f46e5, #9333ea 55%, #db2777); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { margin-top: 16px; font-size: 16px; color: var(--muted); max-width: 520px; }
.hero-search { margin-top: 28px; display: flex; gap: 10px; max-width: 560px; }
.hero-search .search-box { flex: 1; position: relative; }
.hero-search .search-box svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted-2); }
.hero-search .input { height: 50px; padding-left: 44px; border-radius: 12px; box-shadow: var(--shadow-sm); font-size: 14.5px; }
.hero-search .btn { height: 50px; border-radius: 12px; padding: 0 24px; }
.hero-visual { position: relative; }
.hero-card {
  background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 22px;
  box-shadow: var(--shadow-lg); transform: rotate(1.6deg);
}
.hero-card .hc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.hero-card .hc-title { font-weight: 700; font-size: 15px; }
.hero-card .hc-sub { font-size: 12px; color: var(--muted); }
.score-ring { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--primary-ink); background: conic-gradient(#6366f1 var(--p, 74%), #e9ebf7 0); position: relative; flex: none; }
.score-ring::before { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.score-ring span { position: relative; }
.hero-card .bars { display: grid; gap: 9px; }
.hc-bar { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.hc-bar .lbl { width: 46px; flex: none; }
.hc-bar .track { flex: 1; height: 6px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.hc-bar .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #818cf8, #a855f7); }
.hero-float {
  position: absolute; left: -26px; bottom: -20px; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; padding: 11px 15px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600;
  transform: rotate(-2deg);
}
.hero-float .ico { width: 30px; height: 30px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; }
.hero-float .ico svg { width: 15px; height: 15px; }
.hero-float small { display: block; color: var(--muted); font-weight: 500; font-size: 11px; }

/* ---------------- section ---------------- */
.section { padding: 12px 0 70px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-head h2 { font-size: 22px; letter-spacing: -.02em; }
.section-head .sub { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.filter-bar .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-bar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.filter-bar .select { width: auto; min-width: 120px; height: 34px; padding-top: 0; padding-bottom: 0; font-size: 13px; }

/* ranking title lists */
.rank-tabs { display: none; }
.rank-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 6px 0 28px; }
.rank-col { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 10px; box-shadow: var(--shadow-sm); }
.rank-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.rank-head h3 { font-size: 15.5px; letter-spacing: -.01em; display: flex; align-items: center; gap: 7px; }
.rank-head h3::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; }
.rank-col:last-child .rank-head h3::before { background: #f59e0b; }
.rank-head span { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.rank-list { list-style: none; margin: 0; padding: 0; }
.rank-list li + li { border-top: 1px dashed var(--line); }
.rank-row { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 0; text-decoration: none; }
.rank-no { flex: none; width: 22px; font-size: 11px; font-weight: 800; color: var(--muted-2); font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.rank-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; line-height: 1.5; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-row:hover .rank-title, .rank-row:hover .rank-no { color: var(--primary); }
.rank-list li:nth-child(-n+3) .rank-no { color: var(--primary); }
.rank-empty { padding: 16px 0; text-align: center; color: var(--muted-2); font-size: 12.5px; }
.list-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 2px 0 14px; scroll-margin-top: 92px; }
.list-head h3 { font-size: 17px; letter-spacing: -.01em; }

/* ---------------- project cards ---------------- */
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; position: relative;
  transition: .22s ease;
}
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #d8dcec; }
.project-cover { position: relative; aspect-ratio: 16/9.4; overflow: hidden; background: var(--line-2); }
.project-cover img { width: 100%; height: 100%; object-fit: cover; transition: .4s ease; }
.project-card:hover .project-cover img { transform: scale(1.03); }
.project-cover .cover-fallback { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 18px; color: #fff; }
.cover-fallback::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.35) 1px, transparent 1px); background-size: 14px 14px; opacity: .35; }
.cover-fallback .big { position: relative; font-size: 40px; font-weight: 800; opacity: .92; letter-spacing: -.03em; }
.cover-top { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cover-score { background: rgba(255, 255, 255, .94); backdrop-filter: blur(4px); border-radius: 8px; padding: 3px 9px; font-size: 12px; font-weight: 800; color: var(--primary-ink); display: flex; align-items: center; gap: 4px; }
.cover-score small { font-weight: 600; color: var(--muted); font-size: 10px; }
.card-lock { position: absolute; inset: 0; background: rgba(15, 23, 42, .06); display: grid; place-items: center; }
.card-lock .lk { width: 38px; height: 38px; border-radius: 50%; background: rgba(15,23,42,.62); color: #fff; display: grid; place-items: center; backdrop-filter: blur(2px); }
.project-body { padding: 17px 18px 16px; display: flex; flex-direction: column; flex: 1; gap: 9px; }
.project-body h3 { font-size: 16.5px; line-height: 1.45; letter-spacing: -.01em; }
.project-body h3 a { color: var(--ink); }
.project-body h3 a:hover { color: var(--primary); }
.project-body .desc { font-size: 13.5px; color: var(--muted); line-height: 1.65; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 44px; }
.project-body .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.project-foot { display: flex; align-items: center; gap: 12px; padding-top: 12px; margin-top: 4px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted-2); }
.project-foot .cat { color: var(--muted); font-weight: 600; }
.project-foot .sp { margin-left: auto; }
.empty-state { text-align: center; padding: 70px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.empty-state .ico { width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 14px; }
.empty-state h3 { font-size: 17px; margin-bottom: 6px; }
.empty-state p { color: var(--muted); font-size: 13.5px; }

/* pagination */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 34px; }
.pagination button { min-width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 13.5px; cursor: pointer; padding: 0 10px; }
.pagination button:hover:not(:disabled) { border-color: #c9cfe2; }
.pagination button.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }

/* ---------------- footer ---------------- */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 34px 0; margin-top: 20px; }
.site-footer .inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer .row { display: flex; align-items: flex-start; gap: 11px; min-width: 0; }
.site-footer .row .brand-mark { margin-top: 1px; flex: none; }
.site-footer .copy { font-size: 12.5px; color: var(--muted-2); }
.site-footer .links { display: flex; gap: 18px; font-size: 13px; }

/* ---------------- project detail ---------------- */
.page-head { padding: 30px 0 8px; }
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted-2); margin-bottom: 16px; }
.breadcrumb a { color: var(--muted); }
.detail-head { display: flex; align-items: flex-start; gap: 24px; padding: 6px 0 24px; border-bottom: 1px solid var(--line); }
.detail-head .main { flex: 1; min-width: 0; }
.detail-head h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; margin: 10px 0 10px; }
.detail-head .sub { color: var(--muted); font-size: 15px; max-width: 760px; }
.detail-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--muted); }
.detail-meta .item { display: flex; align-items: center; gap: 5px; }
.detail-actions { display: flex; gap: 8px; flex: none; padding-top: 6px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 30px; padding: 28px 0 70px; align-items: start; }
.detail-main { min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.detail-side { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.panel h3 .ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); }
.panel h3 .ico svg { width: 15px; height: 15px; }
.cover-hero { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; }
.cover-hero img { width: 100%; max-height: 420px; object-fit: cover; }
.content-text { font-size: 15px; line-height: 1.9; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; }
.content-text.truncated { position: relative; }
.lock-panel { background: linear-gradient(150deg, #1e1b4b, #312e81 55%, #4c1d95); color: #fff; border-radius: var(--radius); padding: 30px; text-align: center; position: relative; overflow: hidden; }
.lock-panel::before { content: ""; position: absolute; inset: -50% -20% auto auto; width: 320px; height: 320px; background: radial-gradient(circle, rgba(255,255,255,.14), transparent 60%); }
.lock-panel .lk-ico { width: 54px; height: 54px; border-radius: 16px; background: rgba(255,255,255,.12); display: grid; place-items: center; margin: 0 auto 16px; position: relative; }
.lock-panel h3 { color: #fff; font-size: 19px; justify-content: center; }
.lock-panel p { color: rgba(255,255,255,.72); font-size: 13.5px; margin: 8px auto 18px; max-width: 420px; }
.lock-panel .btn { position: relative; }
.pay-box { margin: 16px auto 0; padding: 14px; border-radius: 14px; max-width: 460px; position: relative; scroll-margin-top: 92px; }
.pay-light { background: #f8f9ff; border: 1px solid var(--line); }
.pay-dark { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.pay-box h4 { font-size: 13px; text-align: center; margin-bottom: 10px; }
.pay-light h4 { color: var(--ink); }
.pay-dark h4 { color: #fff; }
.pay-qrs { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.pay-qr { background: #fff; border-radius: 10px; padding: 7px; width: 128px; text-align: center; color: var(--ink); box-shadow: var(--shadow-sm); }
.pay-qr img { width: 112px; height: 112px; object-fit: contain; display: block; border-radius: 6px; margin: 0 auto; }
.pay-qr b { display: block; margin-top: 5px; font-size: 11.5px; }
.pay-note { max-width: 380px; margin: 9px auto 0; font-size: 11.5px; line-height: 1.65; text-align: center; text-wrap: balance; word-break: keep-all; overflow-wrap: break-word; }
.pay-light .pay-note { color: var(--muted); }
.pay-dark .pay-note { color: rgba(255,255,255,.6); }

/* customer support floating QR */
.support-widget { position: fixed; right: 22px; bottom: 24px; z-index: 240; }
.support-btn { display: flex; align-items: center; gap: 8px; border: 0; cursor: pointer; color: #fff; background: linear-gradient(135deg, #4f46e5, #7c3aed); box-shadow: 0 10px 28px rgba(79,70,229,.32); border-radius: 999px; padding: 11px 16px; font-size: 13px; font-weight: 700; font-family: inherit; transition: .2s ease; }
.support-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(79,70,229,.4); }
.support-btn svg { width: 18px; height: 18px; }
.support-mask { position: fixed; inset: 0; z-index: 360; background: rgba(8,12,22,.58); backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center; padding: 24px; }
.support-mask.show { display: flex; }
.support-card { background: #fff; border-radius: 18px; padding: 26px 26px 22px; max-width: 340px; width: 100%; text-align: center; position: relative; box-shadow: 0 30px 80px rgba(8,12,22,.35); }
.support-card h3 { font-size: 18px; margin-bottom: 6px; }
.support-note { max-width: 280px; margin: 0 auto 16px; color: var(--muted); font-size: 13px; line-height: 1.7; text-wrap: balance; word-break: keep-all; overflow-wrap: break-word; }
.support-qr { background: #f8f9ff; border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: grid; place-items: center; }
.support-qr img { width: 220px; height: 220px; object-fit: contain; cursor: zoom-in; border-radius: 8px; background: #fff; }
.support-tip { font-size: 11.5px; color: var(--muted-2); margin-top: 12px; }
.support-close { position: absolute; top: 12px; right: 12px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.support-close svg { width: 15px; height: 15px; }
@media (max-width: 560px) {
  .hero-float { display: none; }
  .support-widget { right: 14px; bottom: 16px; }
  .support-btn { width: 46px; height: 46px; padding: 0; justify-content: center; border-radius: 50%; }
  .support-btn span { display: none; }
  .support-btn svg { width: 20px; height: 20px; }
  .support-card { padding: 24px 18px 18px; }
  .support-qr img { width: 200px; height: 200px; }
}
.lock-code { display: flex; gap: 8px; max-width: 360px; margin: 14px auto 0; }
.lock-code .input { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); color: #fff; }
.lock-code .input::placeholder { color: rgba(255,255,255,.45); }

/* AI report */
.report-hero { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; gap: 26px; align-items: center; }
.report-hero .ring { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; flex: none; position: relative; background: conic-gradient(#6366f1 var(--p, 0%), #eceef8 0); }
.report-hero .ring::before { content: ""; position: absolute; inset: 8px; background: #fff; border-radius: 50%; }
.report-hero .ring .val { position: relative; text-align: center; }
.report-hero .ring .val b { display: block; font-size: 29px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.report-hero .ring .val small { font-size: 10px; color: var(--muted); }
.report-hero .sum { flex: 1; min-width: 0; }
.report-hero .sum .one { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.report-hero .sum p { font-size: 13.5px; color: var(--muted); line-height: 1.75; }
.score-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 16px; }
.score-item { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; }
.score-item .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 7px; }
.score-item .top b { color: var(--ink); font-size: 13px; }
.score-item .track { height: 6px; background: #e9ecf5; border-radius: 99px; overflow: hidden; }
.score-item .track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #818cf8, #a855f7); }
.analysis-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.analysis-block { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 16px 18px; }
.analysis-block h4 { font-size: 13px; color: var(--primary-ink); display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.analysis-block h4 svg { width: 14px; height: 14px; }
.analysis-block p { font-size: 13.5px; color: var(--ink-2); line-height: 1.8; white-space: pre-wrap; }
.analysis-block.full { grid-column: 1 / -1; }

.timeline { position: relative; padding-left: 6px; }
.tl-item { position: relative; padding: 0 0 22px 28px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 7px; bottom: -2px; width: 2px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-item .dot { position: absolute; left: 0; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid #818cf8; box-shadow: 0 0 0 3px #eef0ff; }
.tl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.tl-head h4 { font-size: 14.5px; }
.tl-head .tf { font-size: 11.5px; color: var(--primary-ink); background: var(--primary-soft); padding: 2px 8px; border-radius: 99px; font-weight: 600; }
.tl-item .goal { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.tl-steps { margin: 0; padding-left: 18px; display: grid; gap: 5px; }
.tl-steps li { font-size: 13.5px; color: var(--ink-2); line-height: 1.7; }

.risk-list { display: grid; gap: 10px; }
.risk-item { display: flex; gap: 12px; padding: 13px 15px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-2); }
.risk-item .lv { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.risk-item.high .lv { background: var(--danger-soft); color: var(--danger); }
.risk-item.mid .lv { background: var(--warn-soft); color: var(--warn); }
.risk-item.low .lv { background: var(--ok-soft); color: var(--ok); }
.risk-item h4 { font-size: 13.5px; margin-bottom: 2px; }
.risk-item p { font-size: 12.5px; color: var(--muted); line-height: 1.7; }

.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 11px; font-size: 12.5px; color: var(--ink-2); }
.comp-list { display: grid; gap: 9px; }
.comp-item { display: flex; gap: 10px; padding: 11px 13px; background: var(--surface-2); border-radius: 10px; font-size: 13px; }
.comp-item b { flex: none; color: var(--ink); }
.comp-item span { color: var(--muted); }

/* materials */
.mat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mat-img { border-radius: 11px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; background: var(--line-2); cursor: zoom-in; position: relative; }
.mat-img img { width: 100%; height: 100%; object-fit: cover; transition: .25s; }
.mat-img:hover img { transform: scale(1.03); }
.mat-video { grid-column: 1 / -1; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.mat-video video { width: 100%; max-height: 420px; display: block; }
.mat-link { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: 13px; color: var(--ink-2); grid-column: 1 / -1; }
.mat-link .ico { width: 28px; height: 28px; border-radius: 8px; background: var(--info-soft); color: var(--info); display: grid; place-items: center; flex: none; }
.mat-link .u { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.mat-text { grid-column: 1 / -1; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; font-size: 13px; color: var(--ink-2); white-space: pre-wrap; }
.mat-text .t { font-weight: 600; color: var(--ink); margin-bottom: 3px; font-size: 12.5px; }
.mat-count { font-size: 12px; color: var(--muted-2); font-weight: 500; }

.side-project-cover { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-bottom: 14px; background: var(--line-2); aspect-ratio: 16/9; }
.side-project-cover img { width: 100%; height: 100%; object-fit: cover; }
.side-list { display: grid; gap: 10px; font-size: 13px; }
.side-list .item { display: flex; justify-content: space-between; gap: 12px; }
.side-list .k { color: var(--muted); flex: none; }
.side-list .v { font-weight: 600; text-align: right; word-break: break-word; }
.side-cta { background: linear-gradient(150deg, #eef0ff, #f7f2ff); border: 1px solid #e3e2fd; border-radius: var(--radius); padding: 20px; }
.side-cta h4 { font-size: 14.5px; margin-bottom: 5px; }
.side-cta p { font-size: 12.5px; color: var(--muted); margin-bottom: 13px; }
.ai-empty { text-align: center; padding: 34px 20px; }
.ai-empty .ico { width: 48px; height: 48px; border-radius: 14px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 12px; }
.ai-empty h4 { font-size: 15px; margin-bottom: 5px; }
.ai-empty p { font-size: 13px; color: var(--muted); }

/* ---------------- auth ---------------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 40px 20px; background: radial-gradient(circle at 15% 20%, #eef0ff, transparent 45%), radial-gradient(circle at 85% 80%, #e9fbf5, transparent 40%), var(--bg); }
.auth-card { width: 100%; max-width: 940px; display: grid; grid-template-columns: 1fr 1fr; background: #fff; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.auth-side { background: linear-gradient(155deg, #1e1b4b, #312e81 45%, #5b21b6); color: #fff; padding: 48px 42px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.auth-side::before { content: ""; position: absolute; inset: -30% -40% auto auto; width: 420px; height: 420px; background: radial-gradient(circle, rgba(167,139,250,.35), transparent 60%); }
.auth-side::after { content: ""; position: absolute; inset: auto -30% -40% auto; width: 380px; height: 380px; background: radial-gradient(circle, rgba(16,185,129,.22), transparent 60%); }
.auth-side .brand { color: #fff; margin-bottom: 44px; position: relative; }
.auth-side .brand small { color: rgba(255,255,255,.5); }
.auth-side h2 { font-size: 28px; line-height: 1.3; letter-spacing: -.03em; position: relative; }
.auth-side .desc { color: rgba(255,255,255,.66); font-size: 14px; margin-top: 12px; line-height: 1.8; position: relative; }
.auth-points { margin-top: auto; display: grid; gap: 15px; position: relative; padding-top: 38px; }
.auth-point { display: flex; gap: 11px; font-size: 13px; color: rgba(255,255,255,.8); }
.auth-point .ic { width: 28px; height: 28px; border-radius: 8px; background: rgba(255,255,255,.1); display: grid; place-items: center; flex: none; }
.auth-point .ic svg { width: 14px; height: 14px; }
.auth-form { padding: 46px 44px; display: flex; flex-direction: column; justify-content: center; }
.auth-form h3 { font-size: 23px; letter-spacing: -.02em; }
.auth-form .sub { color: var(--muted); font-size: 13.5px; margin-top: 5px; margin-bottom: 26px; }
.auth-form .field { margin-bottom: 14px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row .input { flex: 1; }
.captcha-img { width: 132px; height: 46px; border-radius: 9px; overflow: hidden; border: 1px solid var(--line); cursor: pointer; flex: none; background: var(--line-2); }
.captcha-img svg { width: 100%; height: 100%; display: block; }
.auth-foot { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted); }
.auth-foot a { font-weight: 600; }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: 9px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; display: none; }
.form-error.show { display: block; }
.auth-agree { margin: 4px 0 18px; font-size: 12.5px; color: var(--muted); }

/* member */
.member-wrap { padding: 34px 0 72px; }
.member-hero { background: linear-gradient(135deg, #1e1b4b, #312e81 55%, #4c1d95); border-radius: 22px; padding: 30px 32px; color: #fff; display: flex; align-items: center; gap: 20px; position: relative; overflow: hidden; }
.member-hero::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 460px; height: 460px; background: radial-gradient(circle, rgba(167,139,250,.3), transparent 60%); }
.member-hero .info { flex: 1; position: relative; }
.member-hero h1 { font-size: 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.member-hero .sub { color: rgba(255,255,255,.65); font-size: 13px; margin-top: 5px; }
.member-hero .actions { display: flex; gap: 8px; position: relative; }
.member-hero .btn-ghost { border-color: rgba(255,255,255,.2); color: #fff; background: rgba(255,255,255,.06); }
.member-hero .btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.member-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-card .lbl { font-size: 12.5px; color: var(--muted); }
.stat-card .num { font-size: 24px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; }
.stat-card .num small { font-size: 12px; font-weight: 600; color: var(--muted); }
.member-body { margin-top: 26px; }
#tabContent { scroll-margin-top: 92px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tab { padding: 11px 16px; border: 0; background: none; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.vip-box { background: linear-gradient(135deg, #fffbeb, #fef3c7); border: 1px solid #fde68a; border-radius: 14px; padding: 16px 18px; display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.vip-box .ic { width: 38px; height: 38px; border-radius: 11px; background: #f59e0b; color: #fff; display: grid; place-items: center; flex: none; }
.vip-box h4 { font-size: 14px; }
.vip-box p { font-size: 12.5px; color: #92400e; opacity: .8; }

/* ---------------- admin ---------------- */
.admin-shell { display: flex; min-height: 100vh; background: #f5f6fb; }
.admin-side { width: 232px; flex: none; background: #0f1526; color: #aab3c8; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.admin-side .brand { color: #fff; padding: 22px 22px 18px; }
.admin-side .brand small { color: #6b7794; }
.admin-nav { padding: 8px 12px; display: flex; flex-direction: column; gap: 2px; overflow: auto; flex: 1; }
.admin-nav .group-label { font-size: 10.5px; letter-spacing: .12em; color: #5a6684; padding: 16px 12px 7px; font-weight: 700; }
.admin-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; color: #aab3c8; font-size: 13.5px; font-weight: 500; }
.admin-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-nav a.active { background: linear-gradient(135deg, rgba(99,102,241,.9), rgba(139,92,246,.75)); color: #fff; box-shadow: 0 6px 16px -8px rgba(99,102,241,.8); }
.admin-nav a svg { width: 17px; height: 17px; flex: none; }
.admin-nav a .cnt { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.1); padding: 0 7px; border-radius: 99px; line-height: 18px; }
.admin-side .side-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); display: grid; gap: 2px; }
.admin-side .side-foot a { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 8px; color: #8e99b2; font-size: 13px; }
.admin-side .side-foot a:hover { background: rgba(255,255,255,.06); color: #fff; }
.admin-side .side-foot svg { width: 16px; height: 16px; }
.admin-ver { padding: 8px 12px 2px; color: #5f6b85; font-size: 11px; letter-spacing: .04em; }
.admin-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.admin-top { height: 64px; background: rgba(255,255,255,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 28px; position: sticky; top: 0; z-index: 30; }
.admin-top h1 { font-size: 18px; letter-spacing: -.02em; }
.admin-top .crumb { font-size: 12px; color: var(--muted-2); margin-top: 1px; }
.admin-top .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.admin-content { padding: 26px 28px 56px; max-width: 1400px; width: 100%; }
.admin-content.narrow { max-width: 980px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.admin-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: flex; align-items: flex-start; gap: 14px; }
.admin-stat .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.admin-stat .ic svg { width: 19px; height: 19px; }
.admin-stat .ic.i1 { background: var(--primary-soft); color: var(--primary); }
.admin-stat .ic.i2 { background: var(--ok-soft); color: var(--ok); }
.admin-stat .ic.i3 { background: var(--warn-soft); color: var(--warn); }
.admin-stat .ic.i4 { background: var(--info-soft); color: var(--info); }
.admin-stat .lbl { font-size: 12.5px; color: var(--muted); }
.admin-stat .num { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1.2; }
.admin-stat .num small { font-size: 12px; color: var(--muted); font-weight: 600; margin-left: 4px; }

.admin-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; margin-top: 18px; }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.admin-panel .ph { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.admin-panel .ph h3 { font-size: 14.5px; }
.admin-panel .ph .more { font-size: 12px; color: var(--muted); }
.admin-alert { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, #fffbeb, #fef9ee); border: 1px solid #fde68a; border-radius: 12px; padding: 13px 16px; margin-bottom: 18px; }
.admin-alert .ic { width: 34px; height: 34px; border-radius: 9px; background: #f59e0b; color: #fff; display: grid; place-items: center; flex: none; }
.admin-alert h4 { font-size: 13.5px; }
.admin-alert p { font-size: 12.5px; color: #92400e; opacity: .85; }
.admin-alert .btn { margin-left: auto; flex: none; }
.cat-bars { display: grid; gap: 12px; }
.cat-bar .top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 5px; color: var(--ink-2); }
.cat-bar .top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.cat-bar .track { height: 7px; background: var(--line-2); border-radius: 99px; overflow: hidden; }
.cat-bar .track i { display: block; height: 100%; border-radius: 99px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { position: relative; width: 260px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted-2); }
.toolbar .search .input { height: 38px; padding-left: 36px; font-size: 13.5px; }
.toolbar .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.seg { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 12px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: var(--ink); color: #fff; }

 table.table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; background: var(--surface-2); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 16px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #fcfcff; }
.table .t-title { font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.table .t-title .thumb { width: 42px; height: 32px; border-radius: 6px; object-fit: cover; background: var(--line-2); flex: none; }
.table .t-sub { font-size: 11.5px; color: var(--muted-2); font-weight: 500; margin-top: 1px; }
.table .actions { display: flex; gap: 2px; flex-wrap: wrap; }
.table .num { font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.table-empty { padding: 46px 20px; text-align: center; color: var(--muted); font-size: 13.5px; background: #fff; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; }

.pager { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 12.5px; color: var(--muted); }
.pager .btns { display: flex; gap: 6px; }
.pager button { height: 30px; padding: 0 11px; border-radius: 7px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; cursor: pointer; color: var(--ink-2); }
.pager button:disabled { opacity: .4; cursor: not-allowed; }

/* editor */
.editor-head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.editor-head h2 { font-size: 20px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.editor-main { display: flex; flex-direction: column; gap: 16px; }
.editor-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 84px; }
.form-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.form-panel h3 { font-size: 14px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.form-panel h3 .ico { width: 26px; height: 26px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; }
.form-panel h3 .ico svg { width: 14px; height: 14px; }
.form-panel .field:last-child { margin-bottom: 0; }
.radio-cards { display: grid; gap: 8px; }
.radio-card { display: flex; align-items: flex-start; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; cursor: pointer; transition: .15s; background: #fff; }
.radio-card:hover { border-color: #c9cfe2; }
.radio-card input { margin-top: 3px; accent-color: var(--primary); }
.radio-card .rc-title { font-size: 13.5px; font-weight: 600; }
.radio-card .rc-desc { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.radio-card.checked { border-color: #a5a0f5; background: #fafaff; box-shadow: 0 0 0 3px rgba(99,91,255,.08); }
.upload-drop { border: 1.5px dashed #d5daea; border-radius: 11px; padding: 22px; text-align: center; cursor: pointer; transition: .18s; background: var(--surface-2); }
.upload-drop:hover, .upload-drop.drag { border-color: #a5a0f5; background: #f8f8ff; }
.upload-drop .ic { width: 38px; height: 38px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 8px; }
.upload-drop p { font-size: 13px; font-weight: 600; }
.upload-drop small { font-size: 11.5px; color: var(--muted-2); }
.upload-progress { height: 4px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin-top: 10px; display: none; }
.upload-progress.show { display: block; }
.upload-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #6366f1, #a855f7); transition: width .2s; }
.cover-preview { position: relative; border-radius: 11px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/9; background: var(--line-2); margin-bottom: 10px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.cover-preview .rm { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border-radius: 7px; background: rgba(15,23,42,.65); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; }
.mat-list { display: grid; gap: 8px; margin-top: 12px; }
.mat-row { display: flex; align-items: center; gap: 10px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 8px 10px; font-size: 12.5px; }
.mat-row .ic { width: 26px; height: 26px; border-radius: 7px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); flex: none; }
.mat-row .ic svg { width: 13px; height: 13px; }
.mat-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-row .rm { border: 0; background: none; color: var(--muted-2); cursor: pointer; padding: 3px; border-radius: 5px; }
.mat-row .rm:hover { color: var(--danger); background: var(--danger-soft); }
.tag-input { display: flex; flex-wrap: wrap; gap: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 8px; min-height: 42px; background: #fff; }
.tag-input .tag { display: inline-flex; align-items: center; gap: 5px; background: var(--primary-soft); color: var(--primary-ink); border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; }
.tag-input .tag button { border: 0; background: none; color: inherit; cursor: pointer; padding: 0; font-size: 14px; line-height: 1; }
.tag-input input { border: 0; outline: none; flex: 1; min-width: 100px; font-size: 13px; padding: 3px; background: transparent; }
.editor-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.save-bar { position: sticky; bottom: 0; background: rgba(245,246,251,.92); backdrop-filter: blur(8px); padding: 12px 0; display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); margin-top: 4px; z-index: 10; }

/* settings */
.setting-section { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.setting-section > h3 { font-size: 15px; margin-bottom: 4px; }
.setting-section > .sd { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.setting-row { display: flex; align-items: center; gap: 16px; padding: 13px 0; border-bottom: 1px solid var(--line-2); }
.setting-row:last-child { border-bottom: 0; padding-bottom: 0; }
.setting-row .sl { flex: 1; }
.setting-row .sl b { font-size: 13.5px; font-weight: 600; display: block; }
.setting-row .sl span { font-size: 12px; color: var(--muted); }
.setting-row .sr { flex: none; display: flex; align-items: center; gap: 8px; }
.setting-row .sr .input { width: 120px; height: 36px; }
.qr-edit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.qr-edit { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; background: #fbfcff; }
.qr-edit-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.qr-edit-head b { font-size: 13px; }
.qr-edit-head span { font-size: 11px; color: var(--muted-2); }
.qr-edit-preview { height: 150px; border-radius: 9px; background: #fff; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; padding: 6px; overflow: hidden; color: var(--muted-2); font-size: 12px; }
.qr-edit-preview img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.qr-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
@media (max-width: 560px) {
  .qr-edit-grid { grid-template-columns: 1fr; }
  .qr-edit-preview { height: 180px; }
}
.provider-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.provider-tab { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 7px 14px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.provider-tab:hover { border-color: #c9cfe2; }
.provider-tab.active { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-ink); }
.api-status { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 9px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; font-weight: 600; margin-bottom: 16px; }
.api-status.warn { background: var(--warn-soft); color: var(--warn); }
.api-status.err { background: var(--danger-soft); color: var(--danger); }
.api-status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.api-note { font-size: 12px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 11px 13px; line-height: 1.8; }
.api-note code { background: #eef1f8; padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 11.5px; }

/* category & plan editors */
.cat-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.cat-row:last-child { border-bottom: 0; }
.cat-row .swatch { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); padding: 0; cursor: pointer; flex: none; }
.cat-row .input { height: 36px; }
.cat-row .name { flex: 1; }
.cat-row .count { font-size: 12px; color: var(--muted-2); min-width: 46px; text-align: right; }
.plan-row { border: 1px solid var(--line); border-radius: 12px; padding: 15px; margin-bottom: 12px; display: grid; grid-template-columns: 1.1fr .6fr .7fr 1.4fr auto; gap: 10px; align-items: end; }
.plan-row .field { margin: 0; }
.plan-row .field label { font-size: 11px; }
.plan-row .input { height: 36px; }
.plan-row .del { align-self: center; }

/* modal */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 20, 35, .45); backdrop-filter: blur(3px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: .18s; }
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); transform: translateY(8px) scale(.99); transition: .18s; }
.modal-mask.show .modal { transform: none; }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 20px 24px 0; }
.modal-head h3 { font-size: 17px; flex: 1; }
.modal-close { width: 30px; height: 30px; border-radius: 8px; border: 0; background: var(--line-2); color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.modal-close:hover { background: #e6e9f2; color: var(--ink); }
.modal-body { padding: 18px 24px 24px; }
.modal-foot { padding: 0 24px 22px; display: flex; justify-content: flex-end; gap: 8px; }
.modal p.modal-text { font-size: 13.5px; color: var(--muted); line-height: 1.8; }
.code-list { display: grid; gap: 6px; max-height: 260px; overflow: auto; }
.code-row { display: flex; align-items: center; gap: 8px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 7px 11px; font-size: 12.5px; }
.code-row code { font-family: var(--mono); font-weight: 700; letter-spacing: .04em; }
.code-row .st { margin-left: auto; font-size: 11px; color: var(--muted-2); }

/* toast */
.toast-wrap { position: fixed; top: 20px; right: 20px; z-index: 400; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #101625; color: #fff; border-radius: 10px; padding: 11px 16px; font-size: 13px; box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 9px; animation: toastIn .22s ease; max-width: 360px; }
.toast.ok { background: #064e3b; }
.toast.err { background: #7f1d1d; }
.toast .ic { width: 17px; height: 17px; flex: none; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(8, 12, 22, .88); z-index: 300; display: none; align-items: center; justify-content: center; padding: 30px; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lightbox .close { position: absolute; top: 18px; right: 22px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; font-size: 20px; }

/* loaders */
.skeleton { background: linear-gradient(90deg, #eef1f7 25%, #f6f8fc 37%, #eef1f7 63%); background-size: 400% 100%; animation: shimmer 1.3s infinite linear; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spin.dark { border-color: rgba(79,70,229,.2); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* fade in */
.fade-up { animation: fadeUp .4s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* responsive */
@media (max-width: 1080px) {
  .project-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); }
  .detail-side { position: static; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .hero-visual { max-width: 460px; }
  .hero-card { transform: none; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-grid { grid-template-columns: 1fr; }
  .editor-side { position: static; }
  .plan-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .container { padding: 0 18px; }
  .rank-tabs { display: flex; gap: 8px; margin: 2px 0 12px; }
  .rank-tabs button { flex: 1; height: 36px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
  .rank-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
  .rank-board { grid-template-columns: minmax(0, 1fr); gap: 14px; margin-top: 0; }
  .rank-board .rank-col { display: none; min-width: 0; }
  .rank-board .rank-col.active { display: block; }
  .rank-head { display: none; }
  .filter-bar .select { width: 100%; }
  .site-nav { display: none; }
  .auth-card { grid-template-columns: 1fr; max-width: 480px; }
  .auth-side { display: none; }
  .auth-form { padding: 34px 26px; }
  .hero { padding: 38px 0 26px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .filter-bar .right { margin-left: 0; width: 100%; }
  .detail-head { flex-direction: column; }
  .detail-actions { padding-top: 0; }
  .analysis-grid { grid-template-columns: 1fr; }
  .score-grid { grid-template-columns: repeat(2, 1fr); }
  .report-hero { flex-direction: column; text-align: center; }
  .member-hero { flex-direction: column; align-items: flex-start; }
  .member-stats { grid-template-columns: 1fr; }
  .mat-grid { grid-template-columns: 1fr; }
  .admin-side { position: fixed; z-index: 100; transform: translateX(-100%); transition: .22s; }
  .admin-side.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .admin-top { padding: 0 16px; }
  .admin-content { padding: 18px 16px 50px; }
  .admin-panel { overflow-x: auto; }
  .admin-mobile-btn { display: inline-flex !important; }
  .toolbar .search { width: 100%; }
  .toolbar .right { margin-left: 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-stat { padding: 14px; }
  .admin-stat .num { font-size: 22px; }
  .plan-row { grid-template-columns: 1fr; }
  .lock-code { flex-direction: column; }
}
@media (max-width: 560px) {
  .project-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 29px; }
  .hero-search { flex-direction: column; }
  .hero-search .btn { width: 100%; }
  .stat-grid { grid-template-columns: 1fr; }
  .detail-head h1 { font-size: 24px; }
  .panel { padding: 18px; }
  .admin-mobile-btn { display: inline-flex !important; }
}
.admin-mobile-btn { display: none; }

/* ---------- post-pass fixes ---------- */
svg { width: 16px; height: 16px; flex: none; }
.badge svg { width: 12px; height: 12px; }
.btn-sm svg { width: 14px; height: 14px; }
.link-btn svg { width: 13px; height: 13px; vertical-align: -2px; }
.project-foot svg { width: 13px; height: 13px; vertical-align: -2px; }
.detail-meta svg { width: 14px; height: 14px; }
.side-list svg { width: 13px; height: 13px; vertical-align: -2px; }
.small svg, .hint svg { width: 12px; height: 12px; vertical-align: -2px; }
.api-status svg { width: 14px; height: 14px; }
.mat-count { font-weight: 500; }
.table.plain { border: 0; border-radius: 0; }
.table.plain th { background: transparent; padding-left: 0; padding-right: 12px; }
.table.plain td { padding-left: 0; padding-right: 12px; }
.table.plain th:last-child, .table.plain td:last-child { text-align: right; }
@media (min-width: 821px) {
  .plan-row { grid-template-columns: .9fr 1.1fr .55fr .65fr 1.4fr auto; }
}
.admin-panel .table tr:hover td { background: transparent; }
.admin-panel .table td { border-bottom-color: var(--line-2); }
.mat-img img { background: var(--line-2); }

/* hero polish */
.hero::before { filter: blur(34px); opacity: .92; }
.hero-float { left: auto; right: -18px; bottom: -24px; }
.cover-fallback::after {
  content: ""; position: absolute; right: -46px; top: -56px; width: 200px; height: 200px;
  border: 1px solid currentColor; border-radius: 50%; opacity: .16; pointer-events: none;
  box-shadow: 0 0 0 34px currentColor, 0 0 0 68px currentColor;
  opacity: .1;
}
.cover-fallback .big { position: relative; z-index: 1; }
@media (max-width: 560px) {
  .hero-float { right: -4px; bottom: -18px; }
}

/* radio card text layout */
.radio-card .rc-title { display: block; }
.radio-card .rc-desc { display: block; margin-top: 2px; line-height: 1.5; }
.radio-card > span:last-child { min-width: 0; }

/* mobile header */
@media (max-width: 560px) {
  .site-header .inner { height: 60px; gap: 10px; min-width: 0; }
  .brand { font-size: 17px; gap: 8px; min-width: 0; flex: 1; }
  .brand small { display: none; }
  .brand > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .header-right { gap: 6px; flex: none; }
  .header-right .btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
  .user-chip { border-color: transparent; background: transparent; padding: 2px; }
  .user-chip > span:not(.avatar) { display: none; }
  .user-chip .badge { display: none; }
  .header-right #logoutBtn, .header-right a[href="/admin"] { padding: 0 8px; font-size: 12px; }
  .hero-float { right: 4px; }
}

/* rich pasted content */
.content-rich { font-size: 15px; line-height: 1.9; color: var(--ink-2); word-break: break-word; }
.content-rich p { margin: 0 0 12px; }
.content-rich p:last-child { margin-bottom: 0; }
.content-rich img { max-width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); margin: 8px 0; }
.content-rich a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.content-rich h1, .content-rich h2, .content-rich h3, .content-rich h4 { margin: 20px 0 10px; letter-spacing: -.01em; }
.content-rich h1 { font-size: 22px; }
.content-rich h2 { font-size: 19px; }
.content-rich h3 { font-size: 17px; }
.content-rich h4 { font-size: 15px; }
.content-rich ul, .content-rich ol { padding-left: 22px; margin: 8px 0 12px; }
.content-rich li { margin: 3px 0; }
.content-rich blockquote { border-left: 3px solid #c7d2fe; background: var(--surface-2); margin: 10px 0; padding: 8px 14px; color: var(--muted); border-radius: 0 8px 8px 0; }
.content-rich table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13.5px; }
.content-rich th, .content-rich td { border: 1px solid var(--line); padding: 7px 10px; text-align: left; vertical-align: top; }
.content-rich th { background: var(--surface-2); font-weight: 700; }
.content-rich code { background: #eef1f8; padding: 1px 5px; border-radius: 4px; font-family: var(--mono); font-size: 12.5px; }
.content-rich pre { background: #0f1526; color: #dbe4ff; padding: 14px 16px; border-radius: 10px; overflow: auto; font-family: var(--mono); font-size: 12.5px; line-height: 1.7; }
.content-rich pre code { background: transparent; color: inherit; padding: 0; }
.content-rich figure { margin: 12px 0; }
.content-rich figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; }
.content-rich hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }

/* paste editor */
.editor-title-bar { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.editor-title-bar .et-label { font-size: 12px; color: var(--muted); flex: none; }
.editor-title-bar .et-value { font-size: 15px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.paste-panel { padding-bottom: 18px; }
.paste-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.paste-status { margin-left: auto; font-size: 12px; color: var(--primary-ink); }
.paste-editor { min-height: 430px; border: 1.5px dashed #d5daea; border-radius: 12px; padding: 18px 20px; background: #fff; outline: none; font-size: 15px; line-height: 1.9; color: var(--ink-2); overflow-wrap: break-word; }
.paste-editor:focus { border-color: #a5a0f5; box-shadow: 0 0 0 3px rgba(99, 91, 255, .1); }
.paste-editor:empty::before { content: attr(data-placeholder); color: #a8b2c4; pointer-events: none; }
.paste-editor img { max-width: 100%; height: auto; border-radius: 8px; margin: 6px 0; border: 1px solid var(--line); }
.paste-editor a { color: var(--primary); text-decoration: underline; }
.paste-editor p { margin: 0 0 10px; }
.paste-editor ul, .paste-editor ol { padding-left: 22px; }
@media (max-width: 720px) {
  .paste-editor { min-height: 300px; padding: 14px; }
  .editor-title-bar { flex-wrap: wrap; }
  .editor-title-bar .et-value { flex-basis: 100%; white-space: normal; }
}

.input:disabled, .select:disabled, .textarea:disabled { background: #f7f8fc; color: var(--muted); cursor: not-allowed; }

/* panel header with inline status / settings */
.panel-head-row { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.panel-head-row h3 { margin-bottom: 0; flex: 1; min-width: 0; }
.panel-head-row .link-btn { flex: none; }

/* unified content source notice */
.site-notice { font-size: 12px; color: var(--muted-2); margin-top: 5px; }
.auth-notice { text-align: center; font-size: 12px; color: var(--muted-2); margin-top: 16px; max-width: 520px; line-height: 1.7; }
.source-notice { display: flex; align-items: center; gap: 7px; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; font-size: 12px; color: var(--muted); }
.source-notice svg { width: 14px; height: 14px; color: var(--muted-2); flex: none; }

/* keep auth card and source notice vertically stacked */
.auth-page { flex-direction: column; gap: 14px; }
.auth-notice { margin-top: 0; }

/* keep pasted images compact so text stays findable */
.paste-editor img { max-height: 240px; width: auto; max-width: 100%; object-fit: contain; cursor: zoom-in; background: var(--line-2); }
.content-rich img { max-height: 360px; width: auto; max-width: 100%; object-fit: contain; cursor: zoom-in; margin: 10px auto; }
@media (max-width: 720px) {
  .paste-editor img { max-height: 200px; }
  .content-rich img { max-height: 260px; }
}

/* final image sizing: smaller inline previews, click/double-click to zoom */
.paste-editor img { max-height: 200px; }
.content-rich img { max-height: 280px; }
@media (max-width: 720px) {
  .paste-editor img { max-height: 160px; }
  .content-rich img { max-height: 220px; }
}

/* detail cover as a compact banner, full image via lightbox */
.cover-hero img { height: 240px; max-height: none; object-fit: cover; cursor: zoom-in; }
@media (max-width: 720px) {
  .cover-hero img { height: 180px; }
}

/* inline images stay secondary to text */
.content-rich img { max-height: 220px; }
@media (max-width: 720px) {
  .content-rich img { max-height: 180px; }
}

/* editor grows with content up to 65vh, then scrolls; "展开编辑" removes the cap */
.paste-toolbar { flex-wrap: wrap; }
.paste-editor { max-height: 65vh; overflow-y: auto; overflow-x: hidden; scrollbar-gutter: stable; }
.paste-editor.expanded { max-height: none; }
@media (max-width: 720px) {
  .paste-editor { max-height: 55vh; }
}

/* brand logo fills its rounded tile */
.brand-mark { background: transparent; overflow: hidden; }
.brand-mark svg { width: 100%; height: 100%; display: block; }

/* mobile editor save bar */
@media (max-width: 560px) {
  .save-bar { flex-wrap: wrap; }
  .save-bar #saveHint { display: none; }
}

/* mobile table hint */
.table-scroll-hint { display: none; }
@media (max-width: 820px) {
  .table-scroll-hint { display: block; margin-top: 8px; font-size: 11.5px; color: var(--muted-2); text-align: center; }
}

/* mobile project list: compact rows, keep the cover small and text scannable */
@media (max-width: 560px) {
  .project-grid { gap: 10px; }
  .project-card { flex-direction: row; border-radius: 14px; }
  .project-card > a { width: 108px; flex: none; display: block; }
  .project-cover { aspect-ratio: auto; height: 100%; min-height: 112px; }
  .project-cover img { height: 100%; }
  .cover-top { display: none; }
  .cover-fallback { padding: 10px; }
  .cover-fallback .big { font-size: 24px; }
  .project-body { padding: 11px 12px 10px; gap: 5px; min-width: 0; }
  .project-body h3 { font-size: 14px; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .project-body .desc, .project-body .tags { display: none; }
  .project-foot { padding-top: 7px; margin-top: auto; border-top: 0; font-size: 11px; gap: 8px; }
  .project-foot .cat { font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .project-foot span:nth-child(3) { display: none; }
  .section { padding-bottom: 34px; }
  .site-footer { margin-top: 0; padding: 26px 0; }
}

/* compact mobile admin top bar: keep 退出 visible without squeezing the title */
@media (max-width: 560px) {
  .admin-top { gap: 10px; }
  .admin-top .crumb { display: none; }
  .admin-top h1 { font-size: 16px; white-space: nowrap; }
  .admin-top .user-chip { display: none; }
  .admin-top .right { gap: 6px; }
  .admin-top #quickNew { padding: 0 8px; font-size: 12px; }
  .admin-top #topLogout { padding: 0 8px; font-size: 12px; }
}

/* mobile project detail: less duplicated chrome, tighter hierarchy */
@media (max-width: 560px) {
  .page-head { padding: 14px 0 4px; }
  .breadcrumb { margin-bottom: 8px; font-size: 12px; }
  #catBadge { display: none; }
  .detail-head { gap: 12px; padding: 0 0 14px; }
  .detail-head h1 { font-size: 21px; line-height: 1.38; margin: 4px 0 7px; }
  .detail-head .sub { font-size: 13.5px; line-height: 1.65; }
  .detail-meta { gap: 7px 10px; margin-top: 9px; font-size: 12px; }
  .detail-meta .meta-label { display: none; }
  .detail-meta .item { gap: 4px; }
  .detail-actions { gap: 8px; }
  .detail-actions .btn { flex: 1; justify-content: center; height: 36px; padding: 0 12px; font-size: 13px; }
  .detail-layout { padding: 16px 0 36px; gap: 16px; }
  .content-rich { font-size: 14px; line-height: 1.82; }
}

/* member center: explicit way back home on phones */
.member-back { display: none; }
@media (max-width: 820px) {
  .member-back { display: inline-flex; align-items: center; margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }
  .member-back:hover { color: var(--primary); }
  .member-wrap { padding-top: 20px; }
}

/* login gate for guests viewing project content */
.login-gate .ai-empty { padding: 46px 20px; }
.gate-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.gate-actions .btn { min-width: 116px; justify-content: center; }

/* guest preview inside the login gate */
.login-gate .gate-preview {
  position: relative; max-height: 168px; overflow: hidden; text-align: left;
  margin: 14px 0 10px; padding: 13px 15px; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2);
  color: var(--ink-2); font-size: 14px; line-height: 1.8; white-space: pre-wrap; word-break: break-word;
}
.login-gate .gate-preview::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 48px;
  background: linear-gradient(transparent, var(--surface-2));
  pointer-events: none;
}
