:root { --ok: #2fdc7a; --warn: #ffb347; --bad: #ff6b6b; --fg: #f5f5f5; --muted: #a9a9a9; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: #000; color: var(--fg); font-family: -apple-system, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; font-size: 14px; }
.hidden { display: none !important; }
#app { height: 100dvh; display: flex; flex-direction: column; }
.bar { flex: none; display: flex; align-items: center; justify-content: space-between; padding: calc(6px + env(safe-area-inset-top)) 12px 6px; background: #111; }
.brand { font-weight: 700; font-size: 16px; } .brand small { font-weight: 400; color: var(--muted); font-size: 12px; margin-left: 4px; }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 99px; border: 1px solid #444; color: var(--muted); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge.on { border-color: var(--ok); color: var(--ok); }
.muted { color: var(--muted); } .small { font-size: 12px; }
.btn { padding: 8px 12px; border-radius: 10px; border: 1px solid #555; background: #1c1c1c; color: var(--fg); font-size: 13px; cursor: pointer; text-decoration: none; }
.btn.on { border-color: var(--ok); color: var(--ok); }
.btn.primary { background: #ff7a59; border-color: #ff7a59; color: #fff; font-weight: 600; }
.btn.big { padding: 14px 20px; font-size: 17px; width: 100%; margin: 12px 0; }
.start { flex: 1; overflow: auto; padding: 24px 18px; max-width: 520px; margin: 0 auto; }
.start h1 { font-size: 22px; margin: 8px 0 14px; }
.steps { padding-left: 0; list-style: none; } .steps li { background: #161616; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; line-height: 1.5; color: #ddd; }
.opt { display: block; margin: 10px 0 0; color: #ddd; }
#live { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#stage { position: relative; flex: 1 1 auto; min-height: 52vh; background: #000; overflow: hidden; }
#video, #overlay { position: absolute; inset: 0; width: 100%; height: 100%; }
#video { object-fit: contain; }
.stages { position: absolute; top: 6px; left: 6px; right: 6px; display: flex; gap: 4px; flex-wrap: wrap; pointer-events: none; }
.stage-chip { font-size: 11px; padding: 2px 7px; border-radius: 99px; background: rgba(0,0,0,.6); color: #ccc; white-space: nowrap; }
.stage-chip b { font-weight: 600; color: #fff; } .stage-chip.ok b { color: var(--ok); } .stage-chip.bad b { color: var(--bad); }
#shutter { position: absolute; bottom: 10px; right: 10px; width: 54px; height: 54px; border-radius: 50%; border: 4px solid #fff; background: rgba(255,255,255,.25); cursor: pointer; }
#shutter.ready { border-color: var(--ok); background: rgba(47,220,122,.45); box-shadow: 0 0 0 6px rgba(47,220,122,.35); animation: pulse 1s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 12px rgba(47,220,122,.1); } }
#flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; } #flash.go { animation: flash .35s; } @keyframes flash { 0% { opacity: .8; } 100% { opacity: 0; } }
#panel { flex: 0 1 auto; max-height: 44vh; overflow-y: auto; background: #111; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid #222; }
.head { display: flex; align-items: center; gap: 8px; }
.head h2 { font-size: 17px; margin: 2px 0; line-height: 1.35; }
.status { flex: none; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: #333; } .status:empty { display: none; }
.status.adjust { background: #5a3d10; color: var(--warn); } .status.almost { background: #1d3d5a; color: #7cc8ff; } .status.ready { background: #11452a; color: var(--ok); }
.checks { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.chk { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: #2a2116; color: var(--warn); } .chk.ok { background: #12301f; color: var(--ok); } .chk i { font-style: normal; color: #ddd; margin-left: 2px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cols h3 { font-size: 12px; color: var(--muted); margin: 4px 0; font-weight: 500; }
.cols ul { margin: 0; padding-left: 16px; } .cols li { margin-bottom: 5px; line-height: 1.4; } .cols li b { font-weight: 600; display: block; } .cols li small { color: var(--muted); font-size: 11px; }
.targets { margin: 6px 0 0; font-size: 12px; color: #ffcf8a; } .tip { margin: 2px 0; font-size: 12px; color: #9fe6bd; }
details { margin-top: 6px; } summary { font-size: 12px; color: var(--muted); cursor: pointer; } .scene { font-size: 12px; line-height: 1.5; color: #ccc; margin: 4px 0; } .scene span { color: #aaa; } .scene .warn { color: var(--warn); }
.tools { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.meta { font-size: 10.5px; color: #777; margin: 6px 0 0; }
.preview { position: fixed; inset: 0; background: rgba(0,0,0,.92); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; z-index: 10; }
.preview img { max-width: 100%; max-height: 72vh; border-radius: 8px; } .preview .row { display: flex; gap: 10px; }
