/* ============================================================================
 * 黄蓝设计系统 · 组件样式实现(ds.css)
 * 与 assets/tokens.css 配套;把 token 落地为真实组件样式,供可视化参考页渲染。
 * 仅用于风格指南展示(静态、自包含),同时可作为实现层的视觉基准。
 * ==========================================================================*/
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: var(--font-body);
  line-height: var(--lh-body);
  color: var(--text-primary);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
}
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ============================ 按钮 Button ============================ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; font-family: inherit; font-weight: var(--weight-medium);
  border: 1px solid transparent; border-radius: var(--radius-control);
  cursor: pointer; user-select: none; text-decoration: none; white-space: nowrap;
  transition: background var(--motion-fast) var(--ease-out),
              border-color var(--motion-fast) var(--ease-out),
              color var(--motion-fast) var(--ease-out),
              transform 80ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
/* 尺寸 */
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; border-radius: var(--radius-control); }
.btn-md { height: 44px; padding: 0 20px; font-size: var(--font-body); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; border-radius: var(--radius-sm); }
.btn-xs { height: 28px; padding: 0 10px; font-size: var(--font-label); border-radius: var(--radius-sm); }
.btn-block { display: flex; width: 100%; }
/* 变体:实底主 */
.btn-primary { background: var(--brand-primary); color: var(--text-on-dark); }
.btn-primary:hover { background: var(--brand-primary-hover); }
.btn-primary:active, .btn-primary.is-pressed { background: var(--brand-primary-pressed); }
/* 变体:实底深蓝 */
.btn-deep { background: var(--brand-deep); color: var(--text-on-dark); }
.btn-deep:active, .btn-deep.is-pressed { background: var(--brand-deep-pressed); }
/* 变体:活力黄点睛(仅高价值瞬间,配深字) */
.btn-accent { background: var(--brand-accent); color: var(--text-on-accent); font-weight: var(--weight-semibold); }
.btn-accent:active, .btn-accent.is-pressed { filter: brightness(0.94); }
/* 变体:次级(浅蓝底) */
.btn-secondary { background: var(--brand-primary-soft); color: var(--brand-primary); }
.btn-secondary:active, .btn-secondary.is-pressed { background: var(--brand-primary-border); }
/* 变体:描边 */
.btn-outline { background: var(--surface); color: var(--text-primary); border-color: var(--border-default); }
.btn-outline:active, .btn-outline.is-pressed { background: var(--gray-100); }
.btn-outline-primary { background: var(--surface); color: var(--brand-primary); border-color: var(--brand-primary); }
.btn-outline-primary:active, .btn-outline-primary.is-pressed { background: var(--brand-primary-soft); }
/* 变体:文字 */
.btn-text { background: transparent; color: var(--brand-primary); }
.btn-text:active, .btn-text.is-pressed { background: var(--brand-primary-soft); }
/* 变体:危险 */
.btn-danger { background: var(--danger); color: var(--text-on-dark); }
.btn-danger:active, .btn-danger.is-pressed { background: #B42318; }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger); }
.btn-danger-soft:active, .btn-danger-soft.is-pressed { background: #F5D3CF; }
/* 禁用 */
.btn:disabled, .btn.is-disabled {
  background: var(--gray-100); color: var(--gray-400); border-color: transparent;
  cursor: not-allowed; transform: none; opacity: 0.9;
}
.btn-outline:disabled, .btn-outline.is-disabled, .btn-text:disabled, .btn-text.is-disabled {
  background: transparent; color: var(--gray-400);
}
/* 加载 */
.btn.is-loading { pointer-events: none; }
.btn .spinner {
  width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: ds-spin 0.7s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* 图标按钮 */
.iconbtn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: var(--radius-control);
  border: none; background: transparent; color: var(--text-primary); cursor: pointer;
  transition: background var(--motion-fast) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.iconbtn:active { background: var(--gray-100); }
.iconbtn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.iconbtn.is-disabled { color: var(--gray-400); background: transparent; cursor: not-allowed; }
.iconbtn-sm { width: 36px; height: 36px; }
.iconbtn-bordered { border: 1px solid var(--border-default); background: var(--surface); }

/* ============================ 标签 Tag / 徽章 Badge ============================ */
.tag {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px;
  border-radius: var(--radius-xs); font-size: var(--font-label); font-weight: var(--weight-medium);
  line-height: 1; white-space: nowrap;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag-success { background: var(--success-soft); color: var(--success-text); }
.tag-warning { background: var(--warning-soft); color: var(--warning-text); }
.tag-danger  { background: var(--danger-soft);  color: var(--danger-text); }
.tag-info    { background: var(--info-soft);    color: var(--info-text); }
.tag-primary { background: var(--brand-primary-soft); color: var(--brand-primary); }
.tag-neutral { background: var(--gray-100); color: var(--text-secondary); }
.tag-accent  { background: var(--brand-accent); color: var(--text-on-accent); }
.tag-solid-success { background: var(--success); color: var(--text-on-dark); }
.tag-solid-danger  { background: var(--danger);  color: var(--text-on-dark); }
.tag-outline { background: var(--surface); border: 1px solid var(--border-default); color: var(--text-secondary); }

.badge-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.badge-num {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: var(--radius-full); background: var(--danger); color: #fff;
  font-size: 11px; font-weight: var(--weight-semibold); line-height: 1; font-variant-numeric: tabular-nums;
}
.badge-wrap { position: relative; display: inline-flex; }
.badge-wrap .badge-num, .badge-wrap .badge-dot { position: absolute; top: -4px; right: -6px; }

/* ============================ 头像 Avatar ============================ */
.avatar {
  display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
  background: var(--surface-muted); color: var(--brand-deep); font-weight: var(--weight-semibold);
  overflow: hidden; flex: none;
}
.avatar-lg { width: 56px; height: 56px; font-size: 20px; }
.avatar-md { width: 44px; height: 44px; font-size: 16px; }
.avatar-sm { width: 32px; height: 32px; font-size: 13px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ============================ 表单 Form ============================ */
.field { display: block; margin-bottom: var(--space-4); }
.field-label { display: block; font-size: var(--font-body); font-weight: var(--weight-medium); margin-bottom: 6px; color: var(--text-primary); }
.field-label .req { color: var(--danger); margin-left: 2px; }
.field-help { font-size: var(--font-caption); color: var(--text-secondary); margin-top: 6px; }
.field-error-text { display: flex; align-items: center; gap: 4px; font-size: var(--font-caption); color: var(--danger); margin-top: 6px; }

.input, .textarea, .select {
  display: flex; align-items: center; width: 100%; height: 48px; padding: 0 var(--space-3);
  font-family: inherit; font-size: var(--font-body); color: var(--text-primary);
  background: var(--surface); border: 1px solid var(--border-default); border-radius: var(--radius-control);
  transition: border-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}
.textarea { height: auto; min-height: 96px; padding: var(--space-3); resize: vertical; line-height: var(--lh-body); }
.input::placeholder, .textarea::placeholder { color: var(--text-tertiary); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus, .input.is-focus {
  outline: none; border-color: var(--brand-primary); box-shadow: 0 0 0 3px var(--brand-primary-soft);
}
.input.is-error, .textarea.is-error { border-color: var(--danger); }
.input.is-error:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.input:disabled, .input.is-disabled { background: var(--gray-100); color: var(--text-tertiary); cursor: not-allowed; border-color: var(--gray-200); }
.input-affix { display: inline-flex; align-items: center; gap: 8px; }
.input-affix .input { flex: 1; border: none; height: auto; padding: 0; }
.input-affix .input:focus { box-shadow: none; }

/* 开关 Switch */
.switch { position: relative; display: inline-block; width: 52px; height: 32px; border-radius: var(--radius-full); background: var(--gray-300); cursor: pointer; transition: background var(--motion-fast) var(--ease-out); border: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 28px; height: 28px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform var(--motion-fast) var(--ease-out); }
.switch.is-on { background: var(--brand-primary); }
.switch.is-on::after { transform: translateX(20px); }
.switch.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* 复选 / 单选 */
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 32px; }
.check input { position: absolute; opacity: 0; }
.check .box { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 2px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: #fff; transition: all var(--motion-fast) var(--ease-out); flex: none; }
.check .radio { border-radius: 50%; }
.check input:checked + .box { background: var(--brand-primary); border-color: var(--brand-primary); }
.check input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }
.check.is-disabled { opacity: 0.5; cursor: not-allowed; }

/* 步进器 */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--border-default); border-radius: var(--radius-control); overflow: hidden; background: var(--surface); }
.stepper button { width: 44px; height: 44px; border: none; background: var(--surface); color: var(--text-primary); font-size: 20px; cursor: pointer; }
.stepper button:active { background: var(--gray-100); }
.stepper button:disabled { color: var(--gray-400); background: var(--gray-100); cursor: not-allowed; }
.stepper .val { min-width: 48px; text-align: center; font-size: var(--font-body); font-variant-numeric: tabular-nums; border-left: 1px solid var(--divider); border-right: 1px solid var(--divider); align-self: stretch; display: flex; align-items: center; justify-content: center; }

/* ============================ 导航 Navigation ============================ */
.navbar {
  display: flex; align-items: center; height: var(--topbar-h); padding: 0 var(--space-2);
  background: var(--brand-deep); color: var(--text-on-dark);
}
.navbar .navbar-back { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; color: var(--text-on-dark); }
.navbar .navbar-title { flex: 1; text-align: center; font-size: 17px; font-weight: var(--weight-medium); }
.navbar .navbar-actions { display: inline-flex; gap: 2px; }
.navbar.navbar-light { background: var(--surface); color: var(--text-primary); border-bottom: 1px solid var(--divider); }
.navbar.navbar-light .navbar-back, .navbar.navbar-light .navbar-actions { color: var(--text-primary); }

.tabbar { display: flex; background: var(--surface); border-top: 1px solid var(--divider); padding-bottom: var(--safe-bottom); }
.tabbar-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--tabbar-h); padding: 6px 0; color: var(--text-secondary); text-decoration: none; font-size: 11px; position: relative; }
.tabbar-item.is-active { color: var(--brand-primary); font-weight: var(--weight-medium); }
.tabbar-item .ti-icon { font-size: 22px; line-height: 1; }
.tabbar-item.is-center { }
.tabbar-item.is-center .ti-icon { width: 48px; height: 48px; margin-top: -18px; border-radius: 50%; background: var(--brand-accent); color: var(--text-on-accent); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-2); border: 3px solid var(--surface); font-weight: var(--weight-bold); }

/* 分段控件 */
.segmented { display: inline-flex; padding: 3px; background: var(--surface-muted); border-radius: var(--radius-control); gap: 2px; }
.segmented button { border: none; background: transparent; padding: 8px 16px; min-height: 36px; border-radius: var(--radius-sm); font-size: 14px; color: var(--text-secondary); cursor: pointer; font-family: inherit; transition: all var(--motion-fast) var(--ease-out); white-space: nowrap; }
.segmented button.is-active { background: var(--surface); color: var(--text-primary); font-weight: var(--weight-medium); box-shadow: var(--shadow-1); }

/* 顶部 Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--divider); background: var(--surface); }
.tabs button { flex: 1; border: none; background: none; padding: 12px 8px; min-height: 44px; font-size: var(--font-body); color: var(--text-secondary); cursor: pointer; font-family: inherit; position: relative; }
.tabs button.is-active { color: var(--brand-primary); font-weight: var(--weight-medium); }
.tabs button.is-active::after { content: ""; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%); width: 32px; height: 3px; border-radius: 3px; background: var(--brand-primary); }

/* 步骤条 */
.steps { display: flex; align-items: flex-start; }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; text-align: center; }
.step .step-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border-strong); color: var(--text-secondary); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: var(--weight-medium); z-index: 1; }
.step .step-label { font-size: var(--font-label); color: var(--text-secondary); }
.step::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--divider); }
.step:first-child::before { display: none; }
.step.is-done .step-dot { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.step.is-done::before { background: var(--brand-primary); }
.step.is-active .step-dot { border-color: var(--brand-primary); color: var(--brand-primary); }
.step.is-active .step-label { color: var(--text-primary); font-weight: var(--weight-medium); }

/* ============================ 卡片 / 列表 ============================ */
.card { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: var(--space-4); }
.card + .card { margin-top: var(--space-3); }
.card-shadow { border: none; box-shadow: var(--shadow-1); }
.card-pressable { cursor: pointer; transition: transform 80ms var(--ease-out), box-shadow var(--motion-fast) var(--ease-out); }
.card-pressable:active { transform: scale(0.99); box-shadow: var(--shadow-2); }

.list { background: var(--surface); border-radius: var(--radius-card); border: 1px solid var(--divider); overflow: hidden; }
.cell { display: flex; align-items: center; gap: var(--space-3); min-height: 52px; padding: var(--space-3) var(--space-4); background: var(--surface); position: relative; }
.cell + .cell::before { content: ""; position: absolute; top: 0; left: var(--space-4); right: 0; height: 1px; background: var(--divider); }
.cell .cell-icon { flex: none; color: var(--brand-primary); }
.cell .cell-body { flex: 1; min-width: 0; }
.cell .cell-title { font-size: var(--font-body); color: var(--text-primary); }
.cell .cell-desc { font-size: var(--font-caption); color: var(--text-secondary); margin-top: 2px; }
.cell .cell-extra { flex: none; color: var(--text-secondary); font-size: var(--font-caption); }
.cell .cell-arrow { flex: none; color: var(--gray-400); }
.cell-pressable { cursor: pointer; transition: background var(--motion-fast) var(--ease-out); }
.cell-pressable:active { background: var(--gray-100); }

.divider { display: flex; align-items: center; gap: var(--space-3); color: var(--text-tertiary); font-size: var(--font-label); margin: var(--space-4) 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--divider); }
.divider-line { height: 1px; background: var(--divider); border: none; margin: var(--space-4) 0; }

/* 排行行 */
.rankrow { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface); }
.rankrow .rank-no { width: 28px; text-align: center; font-size: var(--font-title); font-weight: var(--weight-semibold); color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.rankrow .rank-no.r1 { color: #C9A227; } .rankrow .rank-no.r2 { color: #9AA5B1; } .rankrow .rank-no.r3 { color: #B0803B; }
.rankrow .rank-score { margin-left: auto; font-size: var(--font-title); font-weight: var(--weight-semibold); color: var(--brand-deep); font-variant-numeric: tabular-nums; }
.rankrow .rank-delta { font-size: var(--font-label); font-variant-numeric: tabular-nums; }
.rank-delta.up { color: var(--success); } .rank-delta.down { color: var(--danger); }

/* ============================ 反馈 Feedback ============================ */
.toast { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: 76vw; background: rgba(20,33,28,0.88); color: #fff; padding: 12px 18px; border-radius: var(--radius-control); font-size: var(--font-body); text-align: center; z-index: var(--z-toast); box-shadow: var(--shadow-3); }
.toast .toast-icon { display: block; font-size: 28px; margin-bottom: 6px; }

.mask { position: fixed; inset: 0; background: var(--overlay); z-index: var(--z-overlay); }

.dialog { position: fixed; left: 50%; top: 50%; transform: translate(-50%,-50%); width: min(320px, 84vw); background: var(--surface); border-radius: var(--radius-card); z-index: var(--z-modal); box-shadow: var(--shadow-4); overflow: hidden; }
.dialog .dialog-body { padding: var(--space-5) var(--space-5) var(--space-4); text-align: center; }
.dialog .dialog-title { font-size: 17px; font-weight: var(--weight-semibold); color: var(--text-primary); }
.dialog .dialog-desc { font-size: var(--font-body); color: var(--text-secondary); margin-top: 8px; line-height: var(--lh-body); }
.dialog .dialog-actions { display: flex; border-top: 1px solid var(--divider); }
.dialog .dialog-actions button { flex: 1; height: 50px; border: none; background: var(--surface); font-size: 16px; font-family: inherit; cursor: pointer; color: var(--text-secondary); }
.dialog .dialog-actions button + button { border-left: 1px solid var(--divider); }
.dialog .dialog-actions button.btn-main { color: var(--brand-primary); font-weight: var(--weight-semibold); }
.dialog .dialog-actions button.btn-danger-text { color: var(--danger); font-weight: var(--weight-semibold); }
.dialog .dialog-actions button:active { background: var(--gray-100); }

.sheet { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; z-index: var(--z-modal); box-shadow: var(--shadow-3); padding-bottom: calc(var(--space-3) + var(--safe-bottom)); }
.sheet .sheet-grabber { width: 36px; height: 4px; border-radius: 4px; background: var(--gray-300); margin: 8px auto; }
.sheet .sheet-title { text-align: center; font-size: var(--font-caption); color: var(--text-secondary); padding: var(--space-2) var(--space-4); }
.sheet .sheet-item { display: flex; align-items: center; justify-content: center; min-height: 52px; font-size: 17px; color: var(--text-primary); background: var(--surface); border: none; width: 100%; cursor: pointer; font-family: inherit; }
.sheet .sheet-item + .sheet-item { border-top: 1px solid var(--divider); }
.sheet .sheet-item:active { background: var(--gray-100); }
.sheet .sheet-item.danger { color: var(--danger); }
.sheet .sheet-cancel { margin-top: var(--space-2); border-top: 6px solid var(--canvas); font-weight: var(--weight-medium); }

/* 骨架屏 */
.skeleton { display: block; background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 37%, var(--gray-100) 63%); background-size: 400% 100%; border-radius: var(--radius-sm); animation: ds-shimmer 1.4s ease infinite; }
@keyframes ds-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-line { height: 14px; margin: 8px 0; }
.sk-circle { border-radius: 50%; }

/* 空态 */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--space-8) var(--space-5); }
.empty .empty-art { font-size: 56px; line-height: 1; margin-bottom: var(--space-4); }
.empty .empty-title { font-size: var(--font-body); font-weight: var(--weight-medium); color: var(--text-primary); }
.empty .empty-desc { font-size: var(--font-caption); color: var(--text-secondary); margin-top: 6px; max-width: 260px; }
.empty .empty-cta { margin-top: var(--space-4); }

/* 下拉刷新指示 */
.ptr { display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; color: var(--text-secondary); font-size: var(--font-caption); }
.ptr .spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--brand-primary); border-top-color: transparent; animation: ds-spin 0.7s linear infinite; }

/* 上拉加载终态 */
.loadmore { display: flex; align-items: center; justify-content: center; gap: 8px; padding: var(--space-4); color: var(--text-secondary); font-size: var(--font-caption); }
.loadmore.end { color: var(--text-tertiary); }

/* 左滑操作 */
.swipe { position: relative; overflow: hidden; border-radius: var(--radius-card); }
.swipe .swipe-actions { position: absolute; top: 0; bottom: 0; right: 0; display: flex; }
.swipe .swipe-actions button { width: 72px; border: none; color: #fff; font-size: var(--font-body); cursor: pointer; font-family: inherit; }
.swipe .swipe-actions .act-edit { background: var(--info); }
.swipe .swipe-actions .act-del { background: var(--danger); }
.swipe .swipe-content { position: relative; background: var(--surface); }

/* 吸底动作栏 */
.bottombar { position: sticky; bottom: 0; display: flex; gap: var(--space-3); padding: var(--space-3) var(--space-4); padding-bottom: calc(var(--space-3) + var(--safe-bottom)); background: var(--surface); border-top: 1px solid var(--divider); box-shadow: 0 -2px 8px rgba(20,33,28,0.04); }

/* 评分 */
.rate { display: inline-flex; gap: 4px; }
.rate .star { font-size: 20px; color: var(--gray-300); }
.rate .star.on { color: #F5A623; }

/* 评分/进度条 */
.progress { height: 6px; border-radius: 6px; background: var(--surface-muted); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: var(--brand-primary); transition: width var(--motion-base) var(--ease-out); }

/* ============================================================================
 * 以下是“风格指南页面”自身的排版(非组件,仅用于展示页)
 * ==========================================================================*/
.sg-page { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--canvas); }
.sg-hero { background: linear-gradient(135deg, #0B3D91 0%, #0068C4 60%, #1FA6F5 100%); color: var(--text-on-dark); padding: calc(var(--space-6) + var(--safe-top)) var(--space-5) var(--space-6); }
.sg-hero h1 { margin: 0; font-size: 26px; font-weight: var(--weight-bold); letter-spacing: 0.5px; }
.sg-hero p { margin: 8px 0 0; color: rgba(255,255,255,0.82); font-size: var(--font-caption); }
.sg-hero .sg-chip { display: inline-block; margin-top: var(--space-3); background: var(--brand-accent); color: var(--text-on-accent); font-size: var(--font-label); font-weight: var(--weight-bold); padding: 4px 10px; border-radius: var(--radius-full); }
.sg-body { padding: var(--space-4); }
.sg-section { margin-bottom: var(--space-6); }
.sg-h2 { font-size: var(--font-title); font-weight: var(--weight-semibold); margin: 0 0 var(--space-3); display: flex; align-items: baseline; gap: 8px; }
.sg-h2::before { content: ""; width: 4px; height: 18px; border-radius: 4px; background: var(--brand-primary); align-self: center; }
.sg-h3 { font-size: var(--font-body); font-weight: var(--weight-medium); color: var(--text-secondary); margin: var(--space-4) 0 var(--space-2); }
.sg-note { font-size: var(--font-caption); color: var(--text-tertiary); margin-top: var(--space-2); line-height: 1.5; }
.sg-demo { background: var(--surface); border: 1px solid var(--divider); border-radius: var(--radius-card); padding: var(--space-4); }
.sg-demo.dark { background: var(--brand-deep); border-color: transparent; }
.sg-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.sg-row + .sg-row { margin-top: var(--space-3); }
.sg-label { font-size: var(--font-label); color: var(--text-tertiary); width: 100%; margin-bottom: -4px; }
.sg-swatch { display: flex; flex-direction: column; gap: 4px; width: calc(33.333% - 8px); }
.sg-swatch .sw { height: 56px; border-radius: var(--radius-sm); border: 1px solid rgba(20,33,28,0.06); display: flex; align-items: flex-end; padding: 4px 6px; font-size: 10px; font-weight: var(--weight-medium); }
.sg-swatch .nm { font-size: 11px; color: var(--text-secondary); }
.sg-swatch .hx { font-size: 10px; color: var(--text-tertiary); font-variant-numeric: tabular-nums; }
.sg-frame { border: 1px solid var(--divider); border-radius: var(--radius-card); overflow: hidden; background: var(--surface); }
.sg-frame .sg-frame-bar { background: var(--surface-muted); padding: 6px 12px; font-size: var(--font-label); color: var(--text-secondary); border-bottom: 1px solid var(--divider); }
.sg-state-tag { display: inline-block; font-size: 10px; color: var(--text-tertiary); background: var(--gray-100); border-radius: 4px; padding: 1px 5px; margin-bottom: 6px; }
.sg-col { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.sg-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.sg-grid3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-3); }
.sg-type { display: flex; align-items: baseline; gap: var(--space-3); padding: var(--space-2) 0; border-bottom: 1px solid var(--divider); }
.sg-type:last-child { border-bottom: none; }
.sg-type .meta { font-size: 11px; color: var(--text-tertiary); margin-left: auto; text-align: right; white-space: nowrap; }
