/* 0xlab 名片：共用樣式（App、模組教學頁、隱私權政策都用這份） */
  :root {
    --nc-bg: #f6f7f5; --nc-surface: #ffffff; --nc-ink: #14171a; --nc-sub: #5a615c; --nc-dim: #868c88; --nc-line: #e1e5e1;
    --nc-accent: #0a7a3d; --nc-accent-ink: #ffffff; --nc-soft: #eaf4ee; --nc-warn: #fff4cc; --nc-warn-ink: #6b5200; --nc-danger: #b3261e;
    --nc-r-sm: 8px; --nc-r: 12px; --nc-r-lg: 16px; --nc-gap: 12px; --nc-pad: 16px;
    --nc-fs-xs: 13px; --nc-fs-sm: 14px; --nc-fs: 16px; --nc-fs-lg: 19px; --nc-fs-xl: 24px;
    --nc-shadow: 0 6px 24px rgba(20, 23, 26, .10);
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --nc-bg: #0b0f0c; --nc-surface: #121914; --nc-ink: #e8efe9; --nc-sub: #a9b4ad; --nc-dim: #7d8b82; --nc-line: #24302a;
      --nc-accent: #39ff88; --nc-accent-ink: #06110a; --nc-soft: #12301e; --nc-warn: #3a3212; --nc-warn-ink: #f2d675; --nc-danger: #ff8a80;
      --nc-shadow: 0 6px 24px rgba(0, 0, 0, .45);
    }
  }
  :root[data-theme="dark"] {
    --nc-bg: #0b0f0c; --nc-surface: #121914; --nc-ink: #e8efe9; --nc-sub: #a9b4ad; --nc-dim: #7d8b82; --nc-line: #24302a;
    --nc-accent: #39ff88; --nc-accent-ink: #06110a; --nc-soft: #12301e; --nc-warn: #3a3212; --nc-warn-ink: #f2d675; --nc-danger: #ff8a80;
    --nc-shadow: 0 6px 24px rgba(0, 0, 0, .45);
  }
  * { box-sizing: border-box; }
  html, body { overflow-x: hidden; }
  body { margin: 0; background: var(--nc-bg); color: var(--nc-ink); font: var(--nc-fs)/1.6 -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif; -webkit-text-size-adjust: 100%; }
  .nc-hide { display: none !important; }
  .nc-wrap { max-width: 520px; margin: 0 auto; padding: max(12px, env(safe-area-inset-top)) var(--nc-pad) max(32px, env(safe-area-inset-bottom)); }
  .nc-icon { width: 20px; height: 20px; flex: 0 0 20px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

  /* 標題列＋分頁 */
  .nc-top { display: flex; align-items: center; justify-content: space-between; gap: var(--nc-gap); padding: 8px 0 12px; }
  .nc-brand { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: var(--nc-fs-lg); white-space: nowrap; }
  .nc-brand b { color: var(--nc-accent); }
  .nc-tabs { display: flex; background: var(--nc-surface); border: 1px solid var(--nc-line); border-radius: 999px; padding: 3px; }
  .nc-tab { min-height: 44px; min-width: 76px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--nc-sub); font: inherit; font-size: var(--nc-fs-sm); font-weight: 700; white-space: nowrap; cursor: pointer; }
  .nc-tab[aria-selected="true"] { background: var(--nc-accent); color: var(--nc-accent-ink); }

  /* 卡片區塊 */
  .nc-panel { background: var(--nc-surface); border: 1px solid var(--nc-line); border-radius: var(--nc-r-lg); padding: var(--nc-pad); margin-top: var(--nc-gap); }
  .nc-h1 { font-size: var(--nc-fs-xl); line-height: 1.3; margin: 4px 0 6px; }
  .nc-h2 { font-size: var(--nc-fs-lg); margin: 0 0 8px; }
  .nc-p { color: var(--nc-sub); margin: 0 0 12px; font-size: var(--nc-fs-sm); }
  .nc-note { font-size: var(--nc-fs-xs); color: var(--nc-dim); margin: 10px 0 0; }

  /* 按鈕（只有這一種，用選項變化） */
  .nc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--nc-r); border: 1px solid var(--nc-line);
    background: var(--nc-surface); color: var(--nc-ink); font: inherit; font-weight: 700; font-size: var(--nc-fs); white-space: nowrap; flex-shrink: 0; cursor: pointer; text-decoration: none; }
  .nc-btn--main { background: var(--nc-accent); border-color: var(--nc-accent); color: var(--nc-accent-ink); }
  .nc-btn--danger { color: var(--nc-danger); }
  .nc-btn--block { width: 100%; }
  .nc-btn--sm { min-height: 44px; font-size: var(--nc-fs-sm); padding: 0 14px; }
  .nc-btn:disabled { opacity: .55; cursor: default; }
  .nc-btn input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
  .nc-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .nc-row > .nc-btn { flex: 1 1 140px; }
  .nc-link { display: inline-flex; align-items: center; min-height: 44px; border: 0; background: none; color: var(--nc-accent); font: inherit; font-size: var(--nc-fs-sm); font-weight: 700; padding: 0; cursor: pointer; }

  /* 表單 */
  .nc-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 10px; }
  .nc-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
  .nc-field--full { grid-column: 1 / -1; }
  .nc-label { font-size: var(--nc-fs-xs); color: var(--nc-sub); font-weight: 700; }
  .nc-input { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--nc-line); border-radius: var(--nc-r-sm); background: var(--nc-bg); color: var(--nc-ink); font: inherit; font-size: 16px; }
  .nc-input:focus { outline: 2px solid var(--nc-accent); outline-offset: 1px; }
  .nc-field.is-unsure .nc-input { background: var(--nc-warn); border-color: var(--nc-warn-ink); }
  .nc-field .nc-hint { display: none; font-size: var(--nc-fs-xs); color: var(--nc-warn-ink); }
  .nc-field.is-unsure .nc-hint { display: block; }
  @media (max-width: 359px) { .nc-form { grid-template-columns: 1fr; } }

  /* 選項小方塊 */
  .nc-chips { display: flex; gap: 8px; overflow-x: auto; overflow-y: hidden; touch-action: pan-x; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .nc-chips--wrap { flex-wrap: wrap; overflow: visible; touch-action: auto; }
  .nc-chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--nc-line); background: var(--nc-bg); color: var(--nc-ink); font: inherit; font-size: var(--nc-fs-sm); white-space: nowrap; flex-shrink: 0; cursor: pointer; }
  .nc-chip[aria-pressed="true"] { background: var(--nc-soft); border-color: var(--nc-accent); color: var(--nc-ink); font-weight: 700; }
  .nc-section-label { font-size: var(--nc-fs-sm); font-weight: 700; margin: 16px 0 8px; }

  /* 名片預覽 */
  .nc-preview { margin: 16px auto 0; max-width: 320px; }
  .nc-preview.is-giga { max-width: 100%; }
  .fx-bubble { display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; box-shadow: var(--nc-shadow); font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", sans-serif; line-height: 1.45; }
  .fx-box { display: flex; min-width: 0; position: relative; }
  .fx-v { flex-direction: column; } .fx-h { flex-direction: row; }
  .fx-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fx-wrap { white-space: normal; overflow-wrap: anywhere; }
  .nc-preview-note { text-align: center; font-size: var(--nc-fs-xs); color: var(--nc-dim); margin: 8px 0 0; }

  /* 進度 */
  .nc-bar { height: 8px; background: var(--nc-line); border-radius: 99px; overflow: hidden; margin: 12px 0 4px; }
  .nc-bar > i { display: block; height: 100%; width: 0; background: var(--nc-accent); transition: width .2s; }

  /* 名片夾 */
  .nc-search { position: relative; }
  .nc-search .nc-icon { position: absolute; left: 12px; top: 13px; color: var(--nc-dim); }
  .nc-search .nc-input { padding-left: 40px; }
  .nc-list { list-style: none; margin: 8px 0 0; padding: 0; }
  .nc-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 4px; border: 0; border-bottom: 1px solid var(--nc-line); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
  .nc-avatar { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: var(--nc-soft); color: var(--nc-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; }
  .nc-item-main { flex: 1; min-width: 0; }
  .nc-item-name, .nc-item-sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nc-item-name { font-weight: 700; }
  .nc-item-sub { font-size: var(--nc-fs-xs); color: var(--nc-sub); }
  .nc-tag { flex-shrink: 0; font-size: var(--nc-fs-xs); color: var(--nc-sub); border: 1px solid var(--nc-line); border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
  .nc-empty { text-align: center; padding: 24px 8px; color: var(--nc-sub); }
  .nc-count { font-size: var(--nc-fs-xs); color: var(--nc-dim); margin: 10px 0 0; }

  /* 彈出視窗、提示 */
  .nc-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 20; }
  .nc-modal-box { background: var(--nc-surface); color: var(--nc-ink); border-radius: var(--nc-r-lg); padding: 20px; width: 100%; max-width: 360px; max-height: 90vh; overflow: auto; }
  .nc-qr { background: #fff; border-radius: var(--nc-r); padding: 12px; margin: 8px auto 12px; width: 240px; max-width: 100%; aspect-ratio: 1; }
  .nc-qr svg { width: 100%; height: 100%; display: block; }
  .nc-toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--nc-ink); color: var(--nc-bg); padding: 10px 16px; border-radius: 999px; font-size: var(--nc-fs-sm); z-index: 30; max-width: calc(100% - 32px); text-align: center; }
  .nc-foot { margin-top: 28px; color: var(--nc-dim); font-size: var(--nc-fs-xs); text-align: center; }
  .nc-foot a { color: var(--nc-accent); }
