/* ============================================================
   BASE — reset + 网格背景 + 排版
   ============================================================ */
*,*::before,*::after{ box-sizing:border-box; }

html,body{ height:100%; }

body{
  margin:0;
  background:var(--bg);
  color:var(--txt);
  font-family:var(--mono);
  font-size:13px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  overflow:hidden;
}

/* --- 背景大网格：仅 32px 一层，中性灰，极淡 --- */
.grid-bg{
  position:fixed; inset:0; z-index:0; pointer-events:none;
  background-color:var(--bg);
  background-image:
    linear-gradient(to right,  var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: var(--G) var(--G);
}

/* 四角像素定位角标 */
.scan-corners{
  position:fixed; inset:16px; z-index:1; pointer-events:none;
}
.scan-corners::before,.scan-corners::after{
  content:""; position:absolute; width:16px; height:16px;
  border:1px solid var(--line-3);
}
.scan-corners::before{ top:0; left:0; border-right:0; border-bottom:0; }
.scan-corners::after{ bottom:0; right:0; border-left:0; border-top:0; }

h1,h2,h3,h4,p{ margin:0; }
button{ font:inherit; color:inherit; }
a{ color:inherit; text-decoration:none; }
input,select,textarea{ font:inherit; color:inherit; }

::selection{ background:var(--acid); color:#04120A; }

/* --- 滚动条：像素细条 --- */
*::-webkit-scrollbar{ width:8px; height:8px; }
*::-webkit-scrollbar-track{ background:var(--bg-2); }
*::-webkit-scrollbar-thumb{ background:var(--line-2); }
*::-webkit-scrollbar-thumb:hover{ background:var(--line-3); }
*::-webkit-scrollbar-corner{ background:var(--bg-2); }

/* --- 工具类 --- */
.px{ font-family:var(--pixel); letter-spacing:0; line-height:1.4; }
.mono{ font-family:var(--mono); }
.label{
  font-size:10px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--txt-3); font-weight:500;
}
.num{ font-family:var(--pixel); font-variant-numeric:tabular-nums; }
.truncate{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.hidden{ display:none !important; }
.row{ display:flex; align-items:center; }
.spacer{ flex:1; }
