/* 班级小喇叭 —— 基础样式与设计变量 */
:root {
  --cream: #fff8ee;
  --paper: #ffffff;
  --ink: #1b2430;
  --muted: #6b7684;
  --line: #ece0cf;
  --amber: #f59e0b;
  --orange: #f97316;
  --orange-soft: #fff1e2;
  --blue: #2f6fed;
  --green: #16a34a;
  --red: #e11d48;
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --shadow: 0 18px 40px rgba(80, 55, 20, 0.10), 0 2px 8px rgba(80, 55, 20, 0.06);
  --shadow-sm: 0 4px 14px rgba(80, 55, 20, 0.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; height: 100%; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; font-size: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }

.hide { display: none !important; }

/* 通用按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 999px; padding: 12px 22px; font-weight: 600;
  background: #fff; border: 1.5px solid var(--line); color: var(--ink);
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn.primary {
  background: linear-gradient(135deg, #fb8c2e, #f2660c);
  color: #fff; border-color: transparent;
  box-shadow: 0 10px 22px rgba(242, 102, 12, .28);
}
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line); }
.btn.sm { padding: 8px 14px; font-size: 14px; }

/* 状态圆点 */
.dot { width: 9px; height: 9px; border-radius: 50%; background: #c7b9a5; display: inline-block; flex: 0 0 auto; }
.dot.ok { background: var(--green); box-shadow: 0 0 0 4px rgba(22, 163, 74, .12); }
.dot.warn { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 158, 11, .14); animation: breathe 1.4s ease-in-out infinite; }
.dot.down { background: var(--red); box-shadow: 0 0 0 4px rgba(225, 29, 72, .12); }

@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* 吐司提示 */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px);
  background: rgba(27, 36, 48, .94); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 15px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .22s ease;
  z-index: 90; max-width: 88vw; text-align: center; backdrop-filter: blur(6px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 二维码 */
#qrcode canvas, #qrcode img { display: block; width: 100%; height: 100%; }
