*, *::before, *::after { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  overscroll-behavior: none;          /* 手机端下拉不要触发浏览器回弹 */
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;                    /* 画布自己管平移，页面不滚 */
}

h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { font-weight: 600; letter-spacing: -.01em; text-wrap: balance; }

button {
  font: inherit; color: inherit; background: none;
  border: 0; padding: 0; cursor: pointer;
}

a { color: inherit; }

img, svg, video, iframe { display: block; max-width: 100%; }

/* hidden 的默认 display:none 优先级最低，任何显式 display 都能盖掉它。
   “细节拆封”是 grid/flex，不加这条就会「关掉了但还在拦截点击」。 */
[hidden] { display: none !important; }

/* Trae 的「Made with TRAE SOLO」水印。它可能被编辑器预览器或浏览器扩展
   注入到任何页面上——源头我们管不着，但显示与否管得着。
   iframe 里的那份由 site/js/layers/demo.js 单独注入同样的规则。 */
#trae-badge-plugin, .trae-badge, [class*="trae-badge"],
[id*="trae-badge"], [data-trae-edit-ui] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* 数字对齐：票数、学号、时间 */
.tnum { font-variant-numeric: tabular-nums; }

/* 只给读屏用 */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* 细滚动条，避免系统粗滚动条割开面板 */
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.scroll::-webkit-scrollbar { width: 6px; }
.scroll::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: var(--r-pill); }
.scroll::-webkit-scrollbar-track { background: transparent; }
