/* 芯标注code 成员端（手机优先，电脑上也能用） */
:root {
  color-scheme: light dark;
  --bg: #f5f6fa; --card: #fff; --input: #fff; --chip: #eef0f4; --line: #e7e9f0; --line2: #f0f1f6;
  --text: #1d2230; --text2: #555c70; --muted: #8a90a0;
  --brand: #6d5cff; --brand-text: #4a37e0; --brand-soft: #f3f1ff;
  --grad: linear-gradient(135deg, #7c5cff, #4f8cff);
  --ok: #0f9a57; --ok-soft: #ebf8f1; --warn: #b25e00; --warn-soft: #fff6ea; --err: #d9142a; --err-soft: #fff1f2;
  --shadow: 0 1px 2px rgba(20, 24, 40, .04), 0 6px 20px rgba(20, 24, 40, .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12141b; --card: #1b1e27; --input: #222632; --chip: #2a2f3d; --line: #2c3140; --line2: #252937;
    --text: #e6e8ef; --text2: #b3b9c8; --muted: #8389a0; --brand: #8c7dff; --brand-text: #b3a8ff; --brand-soft: #262447;
    --ok: #3fcf8e; --ok-soft: #173126; --warn: #f0a64a; --warn-soft: #33281a; --err: #ff6b7a; --err-soft: #3a1d22;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; }
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
header { position: sticky; top: 0; z-index: 5; background: var(--grad); color: #fff; padding: calc(8px + env(safe-area-inset-top)) 14px 8px; }
.brand { font-weight: 700; letter-spacing: .3px; }
.bar { font-size: 12px; opacity: .92; display: flex; gap: 10px; flex-wrap: wrap; min-height: 18px; }
main { padding: 12px; max-width: 760px; margin: 0 auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); }
.card h3 { margin: 0 0 8px; font-size: 15px; }
.muted { color: var(--muted); font-size: 13px; }
.err { color: var(--err); }
.row { display: flex; gap: 8px; align-items: center; }
.row > .grow { flex: 1; min-width: 0; }
input, select, textarea { width: 100%; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--input); color: var(--text); font: inherit; }
textarea { resize: vertical; min-height: 64px; }
button { border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 10px; padding: 10px 14px; font: inherit; cursor: pointer; white-space: nowrap; }
button.primary { background: var(--grad); color: #fff; border-color: transparent; font-weight: 600; }
button.small { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
button.danger { color: var(--err); }
button:disabled { opacity: .5; }
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--chip); color: var(--text2); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.err { background: var(--err-soft); color: var(--err); }
.pill.brand { background: var(--brand-soft); color: var(--brand-text); }
.list .item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.list .item:last-child { border-bottom: 0; }
.item .main { flex: 1; min-width: 0; }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .s { color: var(--text2); font-size: 13px; }
.item input[type=checkbox] { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); }
.price { font-weight: 700; color: var(--brand-text); }
.sticky-act { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; background: var(--card); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav button { flex: 1; border: 0; border-radius: 0; background: none; padding: 7px 0 6px; font-size: 11px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 1px; }
nav button span { font-size: 19px; line-height: 1.1; }
nav button.on { color: var(--brand-text); font-weight: 600; }
.hidden { display: none !important; }
.seg { display: flex; background: var(--chip); border-radius: 10px; padding: 3px; gap: 3px; }
.seg button { flex: 1; border: 0; background: none; padding: 7px 4px; font-size: 13px; color: var(--text2); border-radius: 8px; }
.seg button.on { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.screen { position: relative; background: #000; border-radius: 10px; overflow: hidden; min-height: 160px; display: flex; align-items: center; justify-content: center; touch-action: manipulation; }
.screen video { display: block; width: 100%; height: auto; background: #000; pointer-events: none; }
.screen img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-drag: none; }
.screen .hint { color: #aaa; padding: 30px 12px; text-align: center; font-size: 13px; }
.screen .tapdot { position: absolute; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 50%; border: 2px solid #fff; background: rgba(109,92,255,.5); pointer-events: none; animation: tap .5s ease-out forwards; }
@keyframes tap { from { transform: scale(.4); opacity: 1; } to { transform: scale(1.4); opacity: 0; } }
.keys { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.code { font: 600 18px ui-monospace, Menlo, monospace; letter-spacing: 1px; background: var(--brand-soft); color: var(--brand-text); border-radius: 10px; padding: 10px; text-align: center; user-select: all; margin: 8px 0; }
#toast { position: fixed; left: 50%; bottom: calc(80px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); background: rgba(20,22,30,.92); color: #fff; padding: 9px 14px; border-radius: 12px; font-size: 14px; opacity: 0; transition: .25s; pointer-events: none; max-width: 88vw; z-index: 20; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.log div { display: grid; grid-template-columns: 92px 1fr; gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--line2); font-size: 13px; }
.join { max-width: 420px; margin: 30px auto; }
