/* 字体原本是 <link> 从 fonts.googleapis.com 拉的，这里换成本地文件。
   JetBrains Mono 是可变字体，一个 400–700 的文件就够，放在 assets/ 下。 */
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../assets/jetbrains-mono-latin.woff2") format("woff2");
}

:root {
  --bg-top: #f8f3e6; --bg: #f3ecda; --bg2: #ebe1c9;
  --ink: rgba(36,22,18,0.78); --dim: rgba(36,22,18,0.55);
  --faint: rgba(36,22,18,0.38); --cyan: #241612; --cyan-soft: rgba(36,22,18,0.62);
  --stage-bg: rgba(36,22,18,0.04); --glow: 0 1px 6px rgba(36,22,18,0.30);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; min-height: 100%; background: var(--bg); }
body {
  background: radial-gradient(120% 90% at 50% 0%, var(--bg-top) 0%, var(--bg) 45%, var(--bg2) 100%);
  color: var(--ink); font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-weight: 400; overflow: hidden; display: flex; flex-direction: column;
  height: 100vh; min-height: 100vh;
  height: 100dvh; min-height: 100dvh;
}
.frame { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; height: 100%; }
.stage {
  position: relative; flex: 1; min-height: 0;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.05); overflow: hidden;
}
canvas { display: block; width: 100%; height: 100%; cursor: pointer; }
.readout { position: absolute; left: 0; right: 0; bottom: max(clamp(24px, 4vw, 40px), env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; pointer-events: none; text-shadow: var(--glow); }
.readout .time { display: flex; align-items: baseline; gap: 0.1ch; font-weight: 700; font-size: clamp(32px, 7vw, 72px); letter-spacing: 0.05em; color: var(--cyan); line-height: 1; font-variant-numeric: tabular-nums; }
.readout .sep { color: var(--cyan-soft); font-weight: 700; font-size: clamp(26px, 5.5vw, 56px); line-height: 1; margin: 0 0.1ch; animation: blip 1s steps(1,end) infinite; }
@keyframes blip { 50% { opacity: 0.32; } }
.readout .meta { font-size: clamp(10px, 1.2vw, 14px); font-weight: 600; letter-spacing: 0.12em; color: var(--dim); text-transform: uppercase; text-shadow: none; margin-top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-height: 430px) { .readout .meta { display: none; } }
