/* ══════════════════════════════════════════════════════════════
   GESTO98 · 设计令牌 / Design tokens
   基准 Windows 7 / Vista Aero (2006–2012)。见 docs/DESIGN.md §3。
   组件只许引用令牌，不许写魔法数。
   ══════════════════════════════════════════════════════════════ */

:root{
  /* Aero 只有一套配色 —— 2009 年没有 dark mode。
     强制 light 也顺带阻止 UA 把表单控件渲染成深色。 */
  color-scheme: light;

  /* ---------- 桌面 ---------- */
  --desk-deep:#06305c;
  --desk-mid:#1568ad;
  --desk-light:#63b3e8;
  --desk-glow:rgba(190,230,255,.55);

  /* ---------- Aero 玻璃 ---------- */
  --glass:rgba(214,233,250,.78);        /* 活动窗口标题栏 */
  --glass-idle:rgba(226,234,242,.62);   /* 非活动窗口 */
  --glass-dark:rgba(16,38,64,.78);      /* 任务栏 */
  --glass-flat:#cfe2f2;                 /* 关掉 blur 时的不透明近似色 */
  --glass-dark-flat:#12283f;
  --glass-blur:14px;
  --glass-edge-out:rgba(0,0,0,.42);
  --glass-edge-in:rgba(255,255,255,.72);

  /* ---------- 面 ---------- */
  --surface:#ffffff;                    /* 内容区 */
  --surface-alt:#f4f8fc;                /* 斑马纹 / 次级面 */
  --surface-sunk:#3a3a3a;               /* 图片查看器底 */
  --chrome:#eef3f8;                     /* 工具条 / 状态栏 */
  --chrome-edge:#b8ccdd;

  /* ---------- 蓝（Aero 主色） ---------- */
  --blue-900:#0a3e70; --blue-700:#1063ab; --blue-500:#2f8fd8;
  --blue-300:#8fcdf2; --blue-100:#d8ecfb;
  --focus-glow:rgba(60,148,210,.62);

  /* ---------- 语义色 ---------- */
  --ok:#3faa3f; --ok-2:#7fd47f;
  --warn:#e8a317;
  --danger:#c62828; --danger-2:#f08a8a;
  --gold:#f5b731; --silver:#c9c9c9; --bronze:#cd8b52;

  /* ---------- 文字 ---------- */
  --text:#1a2c3d;
  --text-soft:#52697e;
  --text-link:#0645ad;
  --text-title:#0d3a5c;
  --text-onglass-glow:0 0 4px rgba(255,255,255,.95), 0 0 9px rgba(255,255,255,.7);

  /* ---------- 字体 ----------
     Segoe UI 是 Aero 的原生面，只在 Windows 上有；macOS / iOS 落到 Tahoma 或
     Verdana —— 恰好也是那个年代的系统字，比换成任何现代无衬线都更对味。
     不引外链字体：现场要断网可用。 */
  --font:"Segoe UI","Selawik",Tahoma,Verdana,"Microsoft YaHei","PingFang SC",sans-serif;
  --font-num:ui-monospace,"SF Mono",Menlo,Consolas,monospace;

  --fs-xs:11px; --fs-sm:12px; --fs-base:14px; --fs-md:16px;
  --fs-lg:20px; --fs-xl:28px;
  --fs-hero:clamp(30px,7vw,52px);       /* 比赛题目：全屏最显眼的字 */

  /* ---------- 尺寸 ----------
     触屏上整体加高一档（见下方 hover:none 覆写）：Win7 的 26px 控件
     用鼠标刚好，用拇指点不中。 */
  --titlebar-h:30px;
  --toolbar-h:36px;
  --statusbar-h:24px;
  --taskbar-h:40px;
  --ctl-h:26px;                          /* 按钮 / 输入框基准高 */
  --winbtn-w:29px;
  --winbtn-close-w:45px;

  --radius-win:8px 8px 3px 3px;
  --radius-ctl:3px;
  --radius-panel:6px;

  /* ---------- 间距（4 的倍数） ---------- */
  --s1:4px; --s2:8px; --s3:12px; --s4:16px; --s5:24px; --s6:32px;

  /* ---------- 安全区（iPhone 刘海 / home indicator） ---------- */
  --safe-t:env(safe-area-inset-top,0px);
  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-l:env(safe-area-inset-left,0px);
  --safe-r:env(safe-area-inset-right,0px);

  /* ---------- 阴影 ---------- */
  --shadow-win:0 0 0 1px var(--glass-edge-out), 0 14px 38px rgba(0,0,0,.48), 0 2px 8px rgba(0,0,0,.3);
  --shadow-ctl:inset 0 0 0 1px rgba(255,255,255,.8), 0 1px 0 rgba(0,0,0,.07);
  --shadow-sunk:inset 0 1px 3px rgba(0,0,0,.22), inset 0 0 0 1px rgba(0,0,0,.1);

  /* ---------- 渐变（Aero 的灵魂：45% 硬断点，中间不过渡） ---------- */
  --grad-ctl:linear-gradient(#fdfefe 0%,#eff6fb 45%,#dbe9f5 46%,#cbdff0 100%);
  --grad-ctl-hov:linear-gradient(#eaf7fe 0%,#d6effc 45%,#b6e2fa 46%,#9fd6f6 100%);
  --grad-ctl-act:linear-gradient(#b4d8ee 0%,#9cc9e6 45%,#8bbfe0 46%,#a8d0ea 100%);
  --grad-header:linear-gradient(#e8f4fb,#c7e3f4);
  --grad-cmdbar:linear-gradient(#f4f4f4,#e6e6e6);
  --grad-close:linear-gradient(#f7b5b5 0%,#e35b5b 45%,#cf3030 46%,#b02020 100%);
  --grad-close-hov:linear-gradient(#ffcccc 0%,#f07070 45%,#e04040 46%,#c02828 100%);
  --grad-progress:linear-gradient(#c6efc6 0%,#86d986 40%,#3faa3f 41%,#55bb55 100%);

  /* ---------- 动效 ---------- */
  --ease:cubic-bezier(.25,.8,.35,1);
  --t-fast:120ms; --t-base:200ms; --t-slow:340ms;
}

/* 触屏：控件整体加高，窗口按钮加宽。
   保留 Aero 的造型和渐变，只改尺寸 —— 手机是主战场，点不中比不像更糟。 */
@media (hover:none){
  :root{
    --titlebar-h:44px;
    --toolbar-h:48px;
    --taskbar-h:50px;
    --ctl-h:44px;
    --winbtn-w:44px;
    --winbtn-close-w:52px;
  }
}
