/* 观澜平台公共样式：三端响应式（手机/PC/平板，微信内置浏览器兼容） */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
:root {
  --pri: #2f6bff; --pri-d: #1f4fd8; --ink: #1a1a2e; --sub: #8a8f99; --line: #e8ebf1;
  --bg: #f2f4f8; --card: #ffffff; --gold: #d4a017; --red: #cf1322; --green: #237804;
  --tpl-main: #b73a3a; --tpl-deep: #7c1f1f; --tpl-bg: #faf6ef;
}
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--ink); min-height: 100vh; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ===== 参与者端 / 控制台（移动优先） ===== */
.mob { max-width: 520px; margin: 0 auto; padding: 16px 14px 90px; }
.mcard { background: var(--card); border-radius: 14px; padding: 20px 16px; box-shadow: 0 2px 12px rgba(20,30,60,.06); margin-bottom: 14px; }
.mtitle { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.msub { color: var(--sub); font-size: 13px; margin-bottom: 14px; }
.btn { display: block; width: 100%; padding: 14px; border-radius: 10px; background: var(--pri); color: #fff; font-size: 16px; text-align: center; }
.btn:active { background: var(--pri-d); }
.btn.ghost { background: #eef1f6; color: #3a4150; }
.btn.warn { background: #faad14; }
.btn.danger { background: #ff4d4f; }
.btn:disabled { background: #b9c4d8; }
.btnrow { display: flex; gap: 10px; }
.btnrow .btn { flex: 1; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 13px; color: #5a6070; margin-bottom: 6px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; padding: 12px; border: 1.5px solid #d5dae3; border-radius: 10px; font-size: 16px; background: #fff; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pri); }
.tag { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; background: #eef1f6; color: #3a4150; margin: 2px 4px 2px 0; }
.tag.focus { background: #fff7e6; color: #ad6800; border: 1px solid #ffe1a8; }
.tag.dim { background: #f5f5f5; color: #aaa; }
.bignum { font-size: 40px; font-weight: 800; text-align: center; }
.bigcd { font-size: 44px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.bigcd.low { color: var(--red); }

/* 底部导航（参与者端） */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); display: flex; z-index: 50; }
.tabbar button { flex: 1; padding: 10px 4px calc(10px + env(safe-area-inset-bottom)); background: none; font-size: 12px; color: var(--sub); }
.tabbar button.on { color: var(--pri); font-weight: 700; }
.tabbar .dot::after { content: ""; display: inline-block; width: 8px; height: 8px; background: #ff4d4f; border-radius: 50%; margin-left: 4px; vertical-align: top; }

/* 顶部横幅提醒 */
.topbar { position: sticky; top: 0; z-index: 40; background: #fff7e6; color: #ad6800; font-size: 13px; padding: 8px 14px; text-align: center; border-bottom: 1px solid #ffe1a8; }

/* ===== 大屏端 ===== */
.screen-stage { position: fixed; inset: 0; overflow: hidden; background: #0e1526; }
.screen-inner { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: 4vh 5vw; }
.qr-float { position: absolute; right: 2.2vw; bottom: 3vh; width: 150px; text-align: center; z-index: 90; opacity: .88; }
.qr-float img { width: 118px; height: 118px; border-radius: 10px; background: #fff; padding: 6px; }
.qr-float .qcap { font-size: 12px; color: rgba(255,255,255,.92); margin-top: 4px; text-shadow: 0 1px 4px rgba(0,0,0,.5); }
.screen-title { font-size: 6vh; font-weight: 800; letter-spacing: .08em; text-shadow: 0 2px 18px rgba(0,0,0,.35); }
.screen-sub { font-size: 2.6vh; opacity: .92; margin-top: 1.2vh; }
.screen-cd { font-size: 9vh; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2vh 0; }
.screen-cd.low { color: #ff7875; }

/* KV 遮罩（深色渐变自上而下60%-40%） */
.kv-layer { position: absolute; inset: 0; z-index: 0; background-size: cover; background-position: center; }
.kv-mask { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(8,10,18,.60), rgba(8,10,18,.40)); }
.screen-body { position: relative; z-index: 2; }

/* toast */
#gl_toast { position: fixed; left: 50%; top: 38%; transform: translate(-50%,-50%) scale(.95); background: rgba(20,24,38,.92); color: #fff; padding: 14px 22px; border-radius: 12px; font-size: 15px; opacity: 0; pointer-events: none; transition: all .18s; z-index: 999; max-width: 82vw; text-align: center; }
#gl_toast.show { opacity: 1; transform: translate(-50%,-50%) scale(1); }

/* 管理后台（PC） */
.pc { max-width: 1080px; margin: 0 auto; padding: 22px 18px 60px; }
.pcard { background: #fff; border-radius: 14px; padding: 22px; box-shadow: 0 2px 12px rgba(20,30,60,.05); margin-bottom: 16px; }
h1 { font-size: 21px; } h2 { font-size: 16px; border-left: 4px solid var(--pri); padding-left: 10px; margin-bottom: 14px; }
.muted { color: var(--sub); font-size: 13px; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
table.grid th, table.grid td { border: 1px solid var(--line); padding: 7px 8px; text-align: left; }
table.grid th { background: #f7f9fc; color: #5a6070; }
