/* ============================================================
 * HengSpace · Windows 98 主题 设计系统 v1.0
 * 供逐页核对用；核对通过后拆分进正式站点文件
 * ============================================================ */

/* ---------- 设计令牌 ---------- */
:root{
  --desk:#008080;          /* 桌面青绿 */
  --face:#c0c0c0;          /* 面板银 */
  --light:#ffffff;         /* 凹凸亮边 */
  --hilite:#dfdfdf;        /* 凹凸次亮边 */
  --shadow:#808080;        /* 凹凸暗边 */
  --dark:#000000;          /* 凹凸黑边 */
  --navy:#000080;          /* 标题栏藏青 */
  --navy2:#1084d0;         /* 标题栏渐变蓝 */
  --gray-tbar2:#b5b5b5;    /* 非激活标题栏渐变 */
  --sel:#000080;           /* 选中/高亮 */
  --doc:#ffffff;           /* 文档白 */
  --disabled:#808080;
}

/* ---------- 基础 ---------- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  background:var(--desk);
  color:#000;
  font:12px Tahoma,"MS Sans Serif",SimSun,"宋体",sans-serif;
  -webkit-font-smoothing:none;
}
a{color:#000080;text-decoration:underline}
a:visited{color:#800080}
::selection{background:var(--navy);color:#fff}

/* Win98 立体边框：外凸（按钮/面板） */
.raised{
  background:var(--face);
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
/* 细外凸（工具栏按钮常态） */
.thin-raised{
  background:var(--face);
  box-shadow:inset -1px -1px 0 var(--shadow),inset 1px 1px 0 var(--light);
}
/* 内凹（输入框/列表/状态槽） */
.sunken{
  background:#fff;
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light),
             inset 2px 2px 0 var(--dark),inset -2px -2px 0 var(--hilite);
}
/* 细内凹（状态栏格子/工具栏槽） */
.thin-sunken{
  background:var(--face);
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light);
}

/* ---------- 窗口 ---------- */
.win{
  background:var(--face);
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
  padding:3px;
}
.win-tbar{
  display:flex;align-items:center;gap:4px;
  height:20px;padding:2px 3px;
  background:linear-gradient(90deg,var(--navy),var(--navy2));
  color:#fff;font-weight:bold;font-size:12px;
  user-select:none;
}
.win.inactive .win-tbar{background:linear-gradient(90deg,#808080,var(--gray-tbar2))}
.win-tbar .ico{width:14px;height:14px;flex:0 0 14px;display:inline-flex}
.win-tbar .title{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.win-btns{display:flex;gap:2px}
/* 按钮体 16×14：2px 凹凸；字形全部自绘（不用字体符号，保证像素精确） */
.win-btns :is(b,button){
  --gb:#000;                        /* 字形颜色（禁用时转灰） */
  position:relative;
  width:16px;height:14px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--face);color:transparent;
  font:0/0 Tahoma,"MS Sans Serif";  /* 兜底：即使残留字体符号也不显示 */
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
  cursor:default;
}
.win-btns button{appearance:none;border:0;padding:0}
.win-btns button:focus-visible{outline:1px dotted #000;outline-offset:-3px}
.win-btns :is(b,button)::before,.win-btns :is(b,button)::after{content:'';position:absolute}
.win-btns :is(b,button):active{box-shadow:inset 1px 1px 0 var(--dark),inset -1px -1px 0 var(--light),inset 2px 2px 0 var(--shadow)}
.win-btns .bt-min,.win-btns .bt-max,.win-btns .bt-rs,.win-btns .bt-close{cursor:pointer}

/* _ 最小化：底部 6×2 横条 */
.win-btns .bt-min::before{
  left:5px;bottom:3px;width:6px;height:2px;background:var(--gb);
}
/* □ 最大化：9×9 方框，上边 2px（当年就是这个形状） */
.win-btns .bt-max::before{
  left:3px;top:2px;width:9px;height:9px;
  border:1px solid var(--gb);border-top-width:2px;
}
/* ▣ 还原：两个 8×8 方框错位 2px，前面的盖住后面的 */
.win-btns .bt-rs::before{
  left:3px;top:2px;width:7px;height:7px;border:1px solid var(--gb);
}
.win-btns .bt-rs::after{
  left:5px;top:4px;width:7px;height:7px;border:1px solid var(--gb);border-top-width:2px;
  background:var(--face);
}
/* × 关闭：7×7 像素对角叉（2px 粗，硬边不虚） */
.win-btns .bt-close::before{
  left:4px;top:3px;width:1px;height:1px;background:var(--gb);
  box-shadow:
    1px 0 0 0 var(--gb),5px 0 0 0 var(--gb),6px 0 0 0 var(--gb),
    0 1px 0 0 var(--gb),1px 1px 0 0 var(--gb),2px 1px 0 0 var(--gb),4px 1px 0 0 var(--gb),5px 1px 0 0 var(--gb),6px 1px 0 0 var(--gb),
    1px 2px 0 0 var(--gb),2px 2px 0 0 var(--gb),3px 2px 0 0 var(--gb),4px 2px 0 0 var(--gb),5px 2px 0 0 var(--gb),
    2px 3px 0 0 var(--gb),3px 3px 0 0 var(--gb),4px 3px 0 0 var(--gb),
    1px 4px 0 0 var(--gb),2px 4px 0 0 var(--gb),3px 4px 0 0 var(--gb),4px 4px 0 0 var(--gb),5px 4px 0 0 var(--gb),
    0 5px 0 0 var(--gb),1px 5px 0 0 var(--gb),2px 5px 0 0 var(--gb),4px 5px 0 0 var(--gb),5px 5px 0 0 var(--gb),6px 5px 0 0 var(--gb),
    0 6px 0 0 var(--gb),1px 6px 0 0 var(--gb),5px 6px 0 0 var(--gb),6px 6px 0 0 var(--gb);
}

/* ---------- 窗口按钮：禁用态（最大化全站禁用） ---------- */
.win-btns b.dis{
  --gb:var(--disabled);cursor:default !important;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.win-btns b.dis:active{   /* 禁用态按下无反馈 */
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}

/* ---------- 窗口最小化：缩到只剩标题栏（下方窗口自然上移） ---------- */
.win.mini > .win-menu,
.win.mini > .win-body,
.win.mini > .win-sbar,
.win.mini > .win-tbar ~ *{display:none}
.win.mini > .win-tbar{cursor:default}
.win-menu{
  display:flex;gap:0;padding:1px 2px;
  font-size:12px;user-select:none;
}
.win-menu span{padding:2px 7px}
.win-menu span:hover{background:var(--navy);color:#fff}
.win-menu span u{text-decoration:underline}
.win-body{padding:6px}
.win-sbar{display:flex;gap:2px;padding:2px 0 0}
.win-sbar .cell{flex:1;padding:2px 6px;font-size:11px;color:#000;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}   /* 格内不折行：宁可省略，也不把「heng · 2026-10-11」拆两行把状态栏撑高 */
.win-sbar .cell.grow2{flex:2}

/* ---------- 按钮 ---------- */
.b98{
  display:inline-flex;align-items:center;justify-content:center;gap:5px;
  min-width:75px;height:23px;padding:0 12px;
  background:var(--face);color:#000;border:0;
  font:12px Tahoma,"MS Sans Serif",SimSun,"宋体";
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
  cursor:pointer;user-select:none;text-decoration:none;
  white-space:nowrap;   /* 按钮里的字永不折行：宁可整组换行，也不把词拆两行压出边框 */
}
.b98:hover{text-decoration:none}
.b98:active{box-shadow:inset 1px 1px 0 var(--dark),inset -1px -1px 0 var(--light),inset 2px 2px 0 var(--shadow);padding:1px 11px 0 13px}
.b98:focus{outline:1px dotted #000;outline-offset:-4px}
.b98.def{outline:1px solid #000;outline-offset:-1px}   /* 默认按钮：外圈黑线 */
.b98:disabled{color:var(--disabled);text-shadow:1px 1px 0 var(--light)}

/* 工具栏小按钮 */
.tb98{
  width:23px;height:22px;display:inline-flex;align-items:center;justify-content:center;
  background:var(--face);border:0;font-size:13px;color:#000;cursor:pointer;
}
.tb98:hover{box-shadow:inset -1px -1px 0 var(--shadow),inset 1px 1px 0 var(--light)}
.tb98:active{box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light)}

/* ---------- 输入控件 ---------- */
.f98{
  background:#fff;border:0;padding:3px 4px;
  font:13px SimSun,"宋体";
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light),
             inset 2px 2px 0 var(--dark),inset -2px -2px 0 var(--hilite);
  outline:none;
}
.f98:focus{outline:none}
textarea.f98{resize:none;line-height:1.7}
select.f98{padding:2px}

/* 标签页 */
.tabs{display:flex;position:relative;top:1px}
.tabs .tab{
  padding:3px 10px 4px;background:var(--face);cursor:default;
  box-shadow:inset 1px 1px 0 var(--light),inset -1px 0 0 var(--dark),inset -2px 0 0 var(--shadow);
  margin-right:2px;border-radius:3px 3px 0 0;
}
.tabs .tab.on{font-weight:bold;position:relative;z-index:2;padding-bottom:6px;top:0}

/* ---------- 菜单栏/状态栏文字 ---------- */
.mtext{font-size:12px}

/* ---------- 任务栏（桌面页用） ---------- */
.taskbar{
  position:fixed;left:0;right:0;bottom:0;height:32px;z-index:100;
  display:flex;align-items:center;gap:4px;padding:3px 4px;
  background:var(--face);
  box-shadow:inset 0 1px 0 var(--light),inset 0 2px 0 var(--hilite);
}
.tstart{
  height:24px;min-width:0;display:inline-flex;align-items:center;gap:4px;padding:0 8px;
  background:var(--face);border:0;color:#000;font:inherit;font-weight:bold;cursor:pointer;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.tstart:active,.tstart.open{box-shadow:inset 1px 1px 0 var(--dark),inset -1px -1px 0 var(--light),inset 2px 2px 0 var(--shadow)}
.taskbtn{
  flex:0 1 160px;height:24px;display:inline-flex;align-items:center;gap:5px;padding:0 8px;
  background:var(--face);border:0;color:#000;font:inherit;overflow:hidden;white-space:nowrap;cursor:pointer;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.taskbtn.on{font-weight:bold;
  box-shadow:inset 1px 1px 0 var(--dark),inset -1px -1px 0 var(--light),inset 2px 2px 0 var(--shadow);
  background:repeating-conic-gradient(var(--face) 0 25%,var(--hilite) 0 50%) 0 0/2px 2px;
}
.task-divider{width:2px;height:22px;flex:none;background:var(--shadow);border-right:1px solid var(--light)}
.taskbtn .task-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
.taskbar button:focus-visible{outline:1px dotted #000;outline-offset:-4px}
.tray{
  margin-left:auto;height:24px;display:inline-flex;align-items:center;gap:6px;padding:0 10px;
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light);
  font-size:12px;
}

/* 开始菜单 */
.startmenu{
  position:fixed;left:2px;bottom:32px;z-index:101;display:none;
  background:var(--face);padding:3px;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.startmenu.open{display:flex}
.startmenu .side{
  width:26px;flex:none;background:linear-gradient(180deg,var(--navy),var(--navy2));
  color:#fff;font-weight:bold;font-size:16px;
  display:flex;align-items:flex-end;justify-content:center;padding:7px 0;
}
.startmenu .side span{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}
.startmenu .side b{font-weight:normal}
.startmenu .items{min-width:190px}
.startmenu .mi{
  display:flex;align-items:center;gap:8px;padding:4px 10px;font-size:12px;min-height:28px;cursor:pointer;white-space:nowrap;
  color:#000;text-decoration:none;   /* 基础色放这里，hover 才能整体翻白 */
}
.startmenu .mi:hover,.startmenu .mi:focus-visible{background:var(--navy);color:#fff}
.startmenu .mi:focus-visible{outline:1px dotted #fff;outline-offset:-2px}
.startmenu .sep{height:2px;margin:3px 4px;background:var(--shadow);border-bottom:1px solid var(--light)}
.startmenu .menu-icon{width:21px;height:21px;flex:0 0 21px}
.taskbar .task-icon{width:16px;height:16px;flex:0 0 16px}

/* ---------- 桌面图标 ---------- */
.dicons{display:flex;flex-direction:column;flex-wrap:wrap;align-content:flex-start;gap:8px;max-height:calc(100vh / var(--ui-scale) - 56px);padding:18px}
.dicon{
  width:86px;padding:4px 2px;display:flex;flex-direction:column;align-items:center;gap:3px;
  cursor:pointer;user-select:none;text-decoration:none;outline:none;
}
.dicon .glyph{width:32px;height:32px;display:flex;align-items:center;justify-content:center}
.dicon .lbl{
  color:#fff;font-size:12px;text-align:center;line-height:1.3;padding:1px 3px;
  text-shadow:1px 1px 0 #000;
}
.dicon:hover .lbl{background:var(--navy);text-shadow:none}
.dicon:active .lbl,.dicon:focus-visible .lbl{background:var(--navy);text-shadow:none;outline:1px dotted #fff}

/* ---------- 列表（详细信息视图） ---------- */
.lv{background:#fff;overflow:auto}
.lv table{border-collapse:collapse;width:100%;font-size:12px;
  /* .lv 是 flex 容器（05 页给固定高），表格被 stretch 后多出的高度会分摊到唯一那行，
     只剩一条记录时整行被拉成一大块蓝底。按内容高度贴顶即可。 */
  align-self:flex-start}
.lv th{
  position:sticky;top:0;text-align:left;font-weight:normal;padding:3px 6px;
  background:var(--face);
  box-shadow:inset -1px -1px 0 var(--shadow),inset 1px 1px 0 var(--light);
  cursor:default;white-space:nowrap;
}
.lv td{padding:3px 6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lv tr.sel td{background:var(--navy);color:#fff}
.lv tr.sel td a,.lv tr.sel td a:visited{color:#fff}   /* 选中行内链接翻白，别被访问色带紫 */
.lv tr:hover td a{color:#000080}                       /* 悬停淡蓝底上链接保持藏青 */
.lv tr.sel:hover td a,.lv tr.sel:hover td a:visited{color:#fff}
.lv tr:hover td{background:#e8f0fe}
.lv tr.sel:hover td{background:var(--navy)}

/* 资源管理器布局 */
.explorer{display:flex;gap:3px;height:100%}
.explorer .pane{flex:1;min-width:0;display:flex;flex-direction:column}

/* ---------- 文档正文（文章/关于内容） ---------- */
.doc98{background:var(--doc);padding:22px 26px;font-family:SimSun,"宋体",serif;font-size:13.5px;line-height:2}
.doc98 h2{font-size:15px;font-weight:bold;margin:22px 0 8px;color:var(--navy)}
.doc98 p{margin:10px 0}
.doc98 blockquote{border-left:3px solid var(--shadow);background:#f1f1f1;padding:8px 12px;margin:12px 0;color:#333}
.doc98 ul{margin:8px 0 8px 22px}
.doc98 li{margin:4px 0;list-style:square}
.doc98 figure{margin:14px 0;border:1px solid var(--shadow);padding:4px;background:#fff}
.doc98 figcaption{font-size:11px;color:#666;padding-top:4px;font-family:Tahoma,SimSun}

/* ============================================================
 * 自绘 Win98 滚动条（窗口内滚动 · PC 端）
 * 结构：<div class="w98sb"><div class="w98sb-view">…</div></div>
 * JS 自动补 .w98sb-v（纵向）/ .w98sb-h（横向）
 * 上端三角 = 回到顶部，下端三角 = 到底部
 * 手机（≤640px）：不出滚动条，内容交回页面自然滚动
 * ============================================================ */
.w98sb{display:grid;grid-template-columns:1fr auto;grid-template-rows:minmax(0,1fr) auto;min-height:0}
.w98sb>.w98sb-view{
  grid-area:1/1;min-height:0;min-width:0;overflow:auto;
  scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;
}
.w98sb>.w98sb-view::-webkit-scrollbar{width:0;height:0}
.w98sb-v{
  grid-area:1/2;width:17px;display:flex;flex-direction:column;padding:1px;background:var(--face);
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light),
             inset 2px 2px 0 var(--dark),inset -2px -2px 0 var(--hilite);
}
.w98sb-h{
  grid-area:2/1;height:17px;display:flex;align-items:center;padding:1px;background:var(--face);
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light),
             inset 2px 2px 0 var(--dark),inset -2px -2px 0 var(--hilite);
}
.w98sb-v .arr,.w98sb-h .arr{
  flex:0 0 15px;display:flex;align-items:center;justify-content:center;
  font:8px Tahoma,"MS Sans Serif";color:#000;cursor:default;user-select:none;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.w98sb-h .arr{height:15px}
.w98sb-v .arr.u::before{content:'▲'}
.w98sb-v .arr.d::before{content:'▼'}
.w98sb-h .arr.u::before{content:'◀'}
.w98sb-h .arr.d::before{content:'▶'}
.w98sb-v .arr:active,.w98sb-h .arr:active{
  box-shadow:inset 1px 1px 0 var(--dark),inset -1px -1px 0 var(--light),inset 2px 2px 0 var(--shadow);
}
.w98sb-v .trk,.w98sb-h .trk{
  position:relative;flex:1;
  background:repeating-conic-gradient(#fff 0 25%,var(--face) 0 50%) 0 0/2px 2px;
}
.w98sb-v .trk{margin:1px 0}
.w98sb-h .trk{margin:0 1px}
.w98sb-v .thumb{
  position:absolute;left:0;right:0;top:0;height:24px;background:var(--face);cursor:default;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.w98sb-h .thumb{
  position:absolute;top:0;bottom:0;left:0;width:24px;background:var(--face);cursor:default;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
/* 手机端：不出滚动条，内容自然排开（上下滑滚文章/页面） */
@media (max-width:640px){
  .w98sb{display:block !important;height:auto !important}
  .w98sb-v,.w98sb-h{display:none !important}
  .w98sb>.w98sb-view{overflow:visible}
}

/* ---------- 评论区（Win98 对话框语言） ---------- */
.cmt98{font-family:SimSun,"宋体";font-size:13px}
.cmt98 .ident{display:flex;align-items:center;gap:8px;margin-bottom:8px}
.nick98{width:150px}   /* 昵称输入框：桌面固定 150px，手机改整行（见下方 @media） */
.cmt98 .item{border:1px solid var(--shadow);background:#fff;margin-bottom:8px}
.cmt98 .item .head{
  display:flex;align-items:center;gap:8px;padding:3px 8px;
  background:var(--face);
  box-shadow:inset -1px -1px 0 var(--shadow),inset 1px 1px 0 var(--light);
  font-size:12px;
}
.cmt98 .item .head .nick{font-weight:bold}
.cmt98 .item .head .time{margin-left:auto;color:#444;font-size:11px;font-family:Tahoma,SimSun}
.cmt98 .item .body{padding:8px 10px;line-height:1.9;white-space:pre-wrap}
.cmt98 .item .ops{display:flex;gap:4px;padding:0 8px 6px}
.cmt98 .item .ops .mini{
  min-width:0;height:18px;padding:0 8px;font-size:11px;display:inline-flex;align-items:center;
  background:var(--face);border:0;cursor:pointer;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.cmt98 .item .ops .mini:active{box-shadow:inset 1px 1px 0 var(--dark),inset -1px -1px 0 var(--light)}
.cmt98 .item .children{margin:6px 10px 10px 22px}
.cmt98 .edited{display:block;font-size:11px;color:#666;margin-top:6px;font-family:Tahoma,SimSun}
.cmt98 .tomb{color:#808080;font-style:normal}
.cmt98 .masked{color:#a0522d}
.cmt98 .replying{font-size:11px;background:#ffffcc;border:1px solid var(--shadow);padding:3px 8px;margin-bottom:6px;display:flex;justify-content:space-between;align-items:center}

/* 表情面板（小调色板窗口） */
.emoji98{
  position:absolute;background:var(--face);padding:3px;z-index:50;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.emoji98 .etabs{display:flex;gap:1px;margin-bottom:3px}
.emoji98 .etabs b{padding:2px 6px;font-size:11px;font-weight:normal;cursor:pointer}
.emoji98 .etabs b.on{font-weight:bold;background:#fff;
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light)}
.emoji98 .egrid{display:grid;grid-template-columns:repeat(8,1fr);gap:1px;width:232px}
.emoji98 .egrid button{
  height:26px;background:var(--face);border:0;font-size:15px;cursor:pointer;font-family:inherit;
}
.emoji98 .egrid button:hover{box-shadow:inset -1px -1px 0 var(--shadow),inset 1px 1px 0 var(--light)}
.emoji98 .egrid button:active{box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light)}

/* ---------- 滚动条（Webkit） ---------- */
::-webkit-scrollbar{width:16px;height:16px}
::-webkit-scrollbar-track{background:#dfdfdf}
::-webkit-scrollbar-thumb{background:var(--face);
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite)}
::-webkit-scrollbar-button:single-button{
  background:var(--face);height:16px;width:16px;display:block;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}

/* ---------- 主题通用装饰 ---------- */
.preview-note{
  position:fixed;right:8px;top:8px;z-index:120;font-size:11px;
  background:#ffffcc;padding:4px 8px;
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light);
}
.preview-note a{color:#000080}

/* ---------- 全局缩放（对应当年「大字体 / 120DPI」） ---------- */
/* 首次进入：PC 与手机统一默认 125%（大字体）；用户选过档位后以 localStorage 缓存为准（win98.js） */
/* PC / 手机分开存档：手机不继承 PC 档位，避免 390px 屏被大档位压扁 */
:root{--ui-scale:1.25}
/* 手机默认 100%：屏宽本就有限，125% 会让应用页的排版宽度只剩 屏宽/1.25
   （390 的屏 → 312），筛选栏等一行放不下就挤断行。用户仍可在
   开始菜单 → 设置(S) → 字体大小 里自行改大，PC 不受影响。 */
@media (max-width:640px){:root{--ui-scale:1}}
html{zoom:var(--ui-scale)}

/* 开始菜单 · 设置(S) 子菜单 */
.startmenu .items{position:relative}
.mi.sub{position:relative}
.mi.sub .arr{margin-left:auto;padding-left:10px}
button.mi{background:none;border:0;font:inherit;color:inherit;text-align:left;width:100%}
.uisub{
  display:none;position:absolute;left:100%;bottom:0;min-width:210px;
  background:var(--face);padding:3px;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite);
}
.uisub.open{display:block}
.uisub .uisub-t{padding:4px 12px 2px;font-size:11px;color:#444}
.uisub .mi{white-space:nowrap}
.uisub .mi.on{background:var(--navy);color:#fff}
.uisub .uisub-now{padding:5px 12px 3px;font-size:11px;color:#444;border-top:1px solid var(--hilite);margin-top:3px}
.uisub .uisub-now b{color:#800000}
@media (max-width:640px){
  .uisub{left:auto;right:0;bottom:100%;min-width:190px}
}

/* ---------- 响应式适配（全站） ---------- */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,svg,video{max-width:100%;height:auto}
.lv{-webkit-overflow-scrolling:touch}

/* 平板 / 窄桌面（≤900px）：窗口自动缩到满宽，正文留白收紧 */
@media (max-width:900px){
  .doc98{padding:16px 18px}
}

/* 手机（≤640px） */
@media (max-width:640px){
  /* 桌面隐喻竖屏：内容窗口满宽铺开（各页 .pagewin 的固定宽让位）
     注意必须写 width/max-width:100%，不能写 auto/none——auto 在 flex 下由内容撑开，
     窗口会超出视口（横向溢出、右侧被裁）；左右留白交给各页 .stage 的 padding */
  .pagewin{width:100% !important;max-width:100% !important;margin:8px 0 !important}
  /* 窗口内部件允许收缩，避免用 min-content 把窗口撑宽 */
  .win-tbar,.win-menu,.win-body,.win-sbar,.wptool,.addr,.filters{min-width:0}
  .win-menu{flex-wrap:wrap}
  /* 状态栏：窄屏每格按内容占宽、格内不折行；放不下就整条横向滚动（真 98 的格子也是定宽裁剪）
     不能让它 wrap——折行会把格高撑成两行，四格高矮不一，看着就「乱套」 */
  .win-sbar{flex-wrap:nowrap;overflow-x:auto;overflow-y:hidden;padding-bottom:0}
  .win-sbar .cell{flex:0 0 auto;overflow:visible;text-overflow:clip}
  .win-sbar .cell.grow2{flex:0 0 auto}
  .dicons{flex-direction:row;max-height:none;gap:6px;padding:12px 8px}
  .dicon{width:72px}
  .doc98{padding:12px 14px;font-size:13px;line-height:1.85}
  .doc98 blockquote{padding:6px 10px}
  /* 列表：字号收紧、允许横向滚动查看全部列 */
  .lv table{font-size:11px;min-width:520px}
  .lv td,.lv th{padding:3px 5px}
  /* 标题栏 / 菜单栏 / 任务栏：触控友好 */
  .win-tbar{height:26px}
  .win-btns :is(b,button){width:26px;height:20px}
  .win-btns .bt-min::before{left:9px;bottom:5px;width:8px;height:2px}
  .win-btns .bt-max::before{left:8px;top:4px;width:10px;height:10px}
  .win-btns .bt-rs::before{left:8px;top:4px;width:8px;height:8px}
  .win-btns .bt-rs::after{left:10px;top:6px;width:8px;height:8px}
  .win-btns .bt-close::before{left:9px;top:6px}
  .win-menu span{padding:4px 8px}
  .taskbar{height:38px}
  .tstart{height:30px}
  .taskbtn{flex:1 1 0;min-width:0;height:30px;font-size:11px;padding:0 5px;gap:4px}
  .taskbar .task-icon{width:14px;height:14px;flex-basis:14px}
  .tb-opt{display:none}   /* 手机任务栏只显示播放器名称 */
  .tray{padding:0 6px;gap:4px}
  .startmenu{bottom:38px}
  .startmenu .items{min-width:170px}
  .startmenu .mi{padding:8px 12px;font-size:14px;min-height:40px}
  /* 按钮 / 输入：触控目标加大 */
  .b98{min-width:64px;height:30px;font-size:13px}
  .f98{font-size:16px}   /* ≥16px 防止 iOS 聚焦自动放大 */
  .cmt98 .item .ops .mini{height:24px;font-size:12px}
  /* 昵称输入：座位行太挤，手机上整行铺开，否则占位文字「改个昵称（可选）」被切一半 */
  .cmt98 .ident{flex-wrap:wrap;gap:6px}
  .nick98{flex:1 1 100%;width:auto;min-width:0}
  /* 对话框：满宽弹出 */
  .overlay{padding:10px}
}
/* 超窄屏（≤360px）：桌面图标单列不溢出 */
@media (max-width:360px){
  .dicons{flex-wrap:wrap}
  .dicon{width:64px}
}

/* ============================================================
 * Winamp 98 播放器（纯 CSS 绘制 · Win98 扁平控件风格）
 * 三窗：主窗 WinAmp 98-Main / Equaliser（外观装饰）/ Playlist
 * 凹凸边框、复选框、滑杆、传输键图标全部自绘 —— 不使用任何位图
 * ============================================================ */
.ampdock{
  --ampw:340px;                    /* 三窗同宽 */
  position:fixed;right:14px;bottom:42px;z-index:90;
  display:flex;flex-direction:column;gap:4px;width:var(--ampw);
  max-height:calc(100vh / var(--ui-scale) - 56px);
  font-family:Tahoma,"MS Sans Serif",SimSun,sans-serif;font-size:12px;
  user-select:none;
}
/* 注意：display 写在 .amp 上（0,1,0），不要写成 .amp.win —— 那样会盖掉下面的
   .amp-plwin{display:none} 和 win98.css 的 .win.mini 收起规则 */
.amp{display:flex;flex-direction:column;padding:3px}
.amp .win-tbar{height:20px;font-size:12px;letter-spacing:0;cursor:move}
.amp-ct{text-align:center}                     /* 子窗标题居中：Equaliser / Playlist */
/* 标题栏左侧：金色闪电标 */
.amp-zap{position:relative;width:14px;height:14px;flex:0 0 14px}
.amp-zap::before,.amp-zap::after{content:'';position:absolute;inset:0;
  clip-path:polygon(58% 0,18% 54%,45% 54%,34% 100%,84% 40%,54% 40%)}
.amp-zap::before{background:#3a2a00}
.amp-zap::after{background:#ffd21e;transform:scale(.72)}

.amp-body{display:flex;flex-direction:column;gap:3px;padding:3px 2px 0}

/* ---------- 显示屏：左（播放指示 + WINAMP 标）/ 右（时间·走马灯·曲目·码率·声道） ---------- */
.amp-screens{display:flex;gap:3px;height:62px}
.amp-lcd{position:relative;background:#000;overflow:hidden;
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light),
             inset 2px 2px 0 var(--dark),inset -2px -2px 0 var(--hilite)}
.amp-lcd-l{flex:0 0 30%;container-type:inline-size}   /* 容器查询：WINAMP 标随面板宽度缩放 */
.amp-lcd-r{
  flex:1 1 auto;min-width:0;padding:4px 6px;
  /* 4 列：第 3 列放喇叭、第 4 列放 Mono/Stereo —— 两者各占一格，窄屏也不会叠在一起 */
  display:grid;grid-template-columns:auto auto auto minmax(0,1fr);grid-template-rows:1fr 1fr;
  align-items:center;gap:1px 6px;
}
/* 播放指示：绿方块（播放时亮、停时暗） */
.amp-vu{position:absolute;left:8px;top:6px;width:15px;height:15px;background:#0b3a0b;
  box-shadow:inset 0 0 0 1px #000}
.amp.playing .amp-vu{background:#00d000;box-shadow:inset 0 0 0 1px #004a00,0 0 5px rgba(0,208,0,.75)}
/* WINAMP 标：蓝底 + 银灰字牌 */
.amp-logo{position:absolute;left:6px;right:6px;bottom:6px;height:29px;
  background:#14149c;display:flex;align-items:center;justify-content:center;
  box-shadow:0 0 0 2px #3c3cd0,inset 0 0 0 1px #00006a}
.amp-logo b{background:#a9a9c9;color:#1414a0;line-height:1;padding:2px 5px;
  font:bold min(16px,13cqw) "Arial Black","Arial Bold",Tahoma,sans-serif;letter-spacing:1px;
  box-shadow:inset 0 0 0 1px #6a6ab0;white-space:nowrap}
.amp-led{grid-area:1/1;color:#d8d8f4;font:bold 14px "Lucida Console",Consolas,monospace;
  letter-spacing:-1px;text-shadow:1px 1px 0 #000;white-space:nowrap}
.amp-led b{font-weight:inherit;font-size:11px;color:#8f97c8}   /* /总时长 淡一档 */
.amp-dots{grid-area:1/2;position:relative;width:52px;height:14px;overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
          mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.amp-dots i{position:absolute;top:3px;width:9px;height:9px;background:#9fb0ff;
  clip-path:polygon(50% 0,60% 40%,100% 50%,60% 60%,50% 100%,40% 60%,0 50%,40% 40%)}
.amp-dots i:nth-child(1){left:1px}
.amp-dots i:nth-child(2){left:14px}
.amp-dots i:nth-child(3){left:27px}
.amp-dots i:nth-child(4){left:40px}
.amp.playing .amp-dots i{animation:ampdot 1.5s linear infinite}
.amp-dots i:nth-child(2){animation-delay:.37s}
.amp-dots i:nth-child(3){animation-delay:.75s}
.amp-dots i:nth-child(4){animation-delay:1.12s}
@keyframes ampdot{from{transform:translateX(52px)}to{transform:translateX(-14px)}}
.amp-tname{grid-area:1/3/2/5;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  color:#c8c8c8;font:11px Tahoma,"MS Sans Serif",SimSun,sans-serif}
/* 码率 / 采样率：数字是 mp3 帧头解析出的真值（JS 探测），读不到显示 -- */
.amp-kbps,.amp-khz{display:inline-flex;align-items:baseline;gap:3px;
  color:#c8c8c8;font-size:11px;letter-spacing:1px;white-space:nowrap}
.amp-kbps{grid-area:2/1;justify-self:start}
.amp-khz{grid-area:2/2;justify-self:start}
.amp-kbps b,.amp-khz b{font:bold 13px "Lucida Console",Consolas,monospace;
  color:#d8d8f4;letter-spacing:0;min-width:23px;text-align:right}
.amp-spk{grid-area:2/3;justify-self:start;width:14px;height:14px;position:relative}
.amp-spk::before{content:'';position:absolute;left:0;top:4px;width:7px;height:6px;background:#e0c000;
  box-shadow:inset 0 0 0 1px #6b5a00}
.amp-spk::after{content:'';position:absolute;left:5px;top:1px;width:9px;height:12px;background:#e0c000;
  clip-path:polygon(0 30%,100% 0,100% 100%,0 70%);box-shadow:0 0 0 1px #6b5a00}
.amp-mst{grid-area:2/4;justify-self:end;font-size:11px;white-space:nowrap}
.amp-mst i{font-style:normal;color:#6a6a6a}
.amp-mst b{font-weight:normal;color:#d8d8d8;margin-left:6px}
/* 声道也是 mp3 真值：单声道时把 Mono 点亮、Stereo 压暗（未探测出来时维持原样） */
.amp-mst.mono i{color:#d8d8d8}
.amp-mst.mono b{color:#6a6a6a}

/* ---------- 滑杆（进度 / 音量）：内凹槽 + 立体滑钮 ----------
   位置由 --p（0..1）表达，槽两端各留 6px —— 滑钮永远不会越出机身边框 */
.amp-slider{position:relative;background:var(--face);--p:0}
.amp-slider::before{content:'';position:absolute;left:6px;right:6px;background:#606060;
  box-shadow:inset 0 1px 0 #303030,0 1px 0 #fff}
.amp-seek{flex:1 1 auto;min-width:0;height:20px;cursor:pointer}
.amp-seek::before{top:8px;height:4px}
.amp-fill{position:absolute;left:6px;top:8px;height:4px;width:calc((100% - 12px) * var(--p));background:#1a1aa8}
.amp-knob{position:absolute;transform:translateX(-50%);background:var(--face);
  left:calc(6px + (100% - 12px) * var(--p));
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite)}
.amp-seek .amp-knob{top:1px;height:18px;width:11px}
.amp-row2{display:flex;align-items:center;gap:6px;height:20px}
.amp-vol{width:100%;height:14px;cursor:pointer}
.amp-vol::before{top:5px;height:3px}
.amp-vol .amp-knob{top:0;height:14px;width:12px}

/* ---------- 复选框（Eq / Pl / Suffle / Rep / On / Auto） ---------- */
.amp-chk{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;white-space:nowrap;
  font:12px Tahoma,"MS Sans Serif",SimSun,sans-serif;color:#000;cursor:pointer}
.amp-chk>i{position:relative;width:13px;height:13px;flex:0 0 13px;background:#fff;
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light),
             inset 2px 2px 0 var(--dark),inset -2px -2px 0 var(--hilite)}
.amp-chk.on>i::before,.amp-chk.on>i::after{content:'';position:absolute;background:#000}
.amp-chk.on>i::before{left:1px;top:5px;width:6px;height:2px;transform:rotate(45deg);transform-origin:left center}
.amp-chk.on>i::after{left:4px;top:9px;width:9px;height:2px;transform:rotate(-45deg);transform-origin:left center}

/* ---------- 传输键 ---------- */
.amp-row3{display:flex;align-items:center;gap:4px;height:26px}
.amp-tbtn{position:relative;flex:0 0 30px;width:30px;height:26px;padding:0;border:0;
  display:flex;align-items:center;justify-content:center;background:var(--face);cursor:pointer;
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite)}
.amp-tbtn:active{box-shadow:inset 1px 1px 0 var(--dark),inset -1px -1px 0 var(--light),inset 2px 2px 0 var(--shadow)}
.amp-tbtn svg{width:16px;height:14px;fill:#000;display:block}
.amp-tbtn-ej{background:#fff}
.amp-mark{margin-left:auto;width:16px;height:16px;flex:0 0 16px}
.amp-mark svg{display:block;width:16px;height:16px}

/* ---------- 窗口显隐：播放列表窗（Eq 窗已按需求去掉） ---------- */
.amp-plwin{display:none}
.amp-plwin.on{display:flex}
/* _ 收起：只留标题栏（比 win98.css 的 .win.mini 规则更靠后，确保压得住 .on） */
.amp.mini > .amp-body{display:none}
/* ---------- 播放列表窗 ---------- */
.amp-plbody{gap:4px}
.amp-plbox{flex:1 1 auto;min-height:0;background:#fff;
  box-shadow:inset 1px 1px 0 var(--shadow),inset -1px -1px 0 var(--light),
             inset 2px 2px 0 var(--dark),inset -2px -2px 0 var(--hilite)}
.amp-pllist{margin:0;padding:2px;list-style:none;max-height:92px;overflow-x:hidden;overflow-y:scroll}
.amp-pllist li{display:flex;align-items:center;gap:6px;height:18px;padding:0 4px;cursor:pointer;
  font:12px Tahoma,"MS Sans Serif",SimSun,sans-serif;color:#000;white-space:nowrap}
.amp-pllist li .t{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}
.amp-pllist li em{flex:0 0 auto;font-style:normal;color:#444}
.amp-pllist li:hover{background:#e8f0fe}
.amp-pllist li.cur{background:var(--navy);color:#fff}
.amp-pllist li.cur em{color:#fff}
/* Win98 滚动条：棋盘轨道 + 立体滑块 */
.amp-pllist::-webkit-scrollbar{width:15px}
.amp-pllist::-webkit-scrollbar-track{background:repeating-conic-gradient(#fff 0 25%,var(--face) 0 50%) 0 0/2px 2px;
  box-shadow:inset 1px 1px 0 var(--shadow)}
.amp-pllist::-webkit-scrollbar-thumb{background:var(--face);
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite)}
/* Firefox 不认 ::-webkit-scrollbar：给个近似配色（必须隔离，否则会盖掉上面的自定义滚动条） */
@supports not selector(::-webkit-scrollbar){
  .amp-pllist{scrollbar-color:var(--face) #dfdfdf}
}
.amp-plfoot{display:flex;align-items:center;gap:3px;height:22px}
.amp-plbtn{flex:0 0 auto;min-width:0;height:22px;padding:0 7px;font-size:11px}
.amp-plbtn svg{display:block;width:14px;height:14px}
.amp-pltime{margin-left:auto;height:20px;padding:0 7px;display:inline-flex;align-items:center;
  font:12px "Lucida Console",Consolas,monospace;color:#000;background:var(--face)}

/* ---------- 手机：两窗在文档流里顺排，控件收一档，保证不横向溢出 ---------- */
@media (max-width:640px){
  .ampdock{
    position:relative;right:auto;bottom:auto;margin:14px auto 0;z-index:auto;max-height:none;
    --ampw:min(340px, calc(100vw / var(--ui-scale) - 20px));
  }
  .amp.win{box-shadow:none}
  .amp-pllist{max-height:150px}
  /* 传输行在窄窗里必须收窄，否则 Rep + 彩色标会顶出机身边框 */
  .amp-row3{gap:3px}
  .amp-tbtn{flex:0 1 26px;width:26px;height:24px}
  .amp-tbtn svg{width:14px;height:12px}
  .amp-mark{margin-left:auto;width:14px;height:14px;flex:0 0 14px}
  .amp-mark svg{width:14px;height:14px}
  .amp-chk{font-size:11px;gap:3px}
  .amp-led{font-size:12px}
  /* 显示屏第二行：窄窗放不下「数字 + 标签 + 喇叭 + Mono/Stereo」，
     收字号/间隙并藏掉纯装饰的喇叭（音量条就在正下方），否则 Stereo 会被 LCD 裁掉 */
  .amp-lcd-r{gap:1px 4px}
  .amp-kbps,.amp-khz{font-size:10px;letter-spacing:0;gap:2px}
  .amp-kbps b,.amp-khz b{font-size:12px;min-width:20px}
  .amp-spk{display:none}
  .amp-mst{font-size:10px}
  .amp-mst b{margin-left:4px}
}

/* ---------- 文章正文元素（articles-skin.js 动态渲染） ---------- */
.doc98 h3{font-size:14px;font-weight:bold;margin:18px 0 6px;color:var(--navy)}
.doc98 hr{border:0;border-top:1px solid var(--shadow);margin:16px 0}
.doc98 .aside{color:#666;font-size:12px;font-family:Tahoma,SimSun}
.doc98 img{max-width:100%;height:auto;display:block}
.doc98 pre{background:#f1f1f1;border:1px solid var(--shadow);padding:8px 10px;overflow:auto;margin:12px 0;
  font-family:"Courier New",monospace;font-size:12px}
.doc98 pre code{font-family:inherit}
.doc98 ol{margin:8px 0 8px 24px}
.doc98 ol li{list-style:decimal}
.doc98 a{color:var(--navy)}

/* ============================================================
 * 外壳内嵌（iframe）模式：内页被 98 桌面外壳（index.html）加载时
 *   <html class="hs-framed"> 由各内页 head 先行脚本 / win98.js 打上
 *   —— 窗口框与标题栏由外壳提供（避免双层窗口栏），内页只出内容
 * ============================================================ */
html.hs-framed body{background:var(--face)}      /* 应用窗里不露出桌面青绿 */
html.hs-framed .stage{min-height:0;padding:0;gap:0;display:block}
html.hs-framed .stage > .pagewin:first-child{
  width:auto !important;max-width:none !important;margin:0 !important;
  padding:0;background:transparent;box-shadow:none;
}
/* 同页里跟在首窗之后的窗口（06 的评论窗）：同样拉满，与文章窗左右对齐。
   否则内页 <style> 里的 .pagewin{width:780px} 会让它比文章窗窄一截、右边留缝。 */
html.hs-framed .stage > .pagewin:not(:first-child){
  width:auto !important;max-width:none !important;
  margin-left:0 !important;margin-right:0 !important;
}
html.hs-framed .stage > .pagewin:first-child > .win-tbar{display:none}
html.hs-framed .stage > *:not(.pagewin):not([data-float]){margin-top:12px;margin-left:12px;margin-right:12px;max-width:calc(100% - 24px)}   /* 无窗口框的页（07）留点边距；浮动窗自带定位，不加边距。max-width 钳掉 width:100% + 左右边距的 12px 横向溢出 */
html.hs-framed .artwin{height:auto}              /* 文章窗不再钉一屏高：外壳窗口自己滚 */
html.hs-framed .artwin > .win-body{flex:none}
/* 外壳内页的原生滚动条也画成 Win98 样子（自绘的 .w98sb 不受影响） */
html.hs-framed ::-webkit-scrollbar{width:16px;height:16px;background:var(--face)}
html.hs-framed ::-webkit-scrollbar-track{background:repeating-conic-gradient(var(--face) 0 25%,#fff 0 50%) 0 0/4px 4px}
html.hs-framed ::-webkit-scrollbar-thumb{background:var(--face);
  box-shadow:inset -1px -1px 0 var(--dark),inset 1px 1px 0 var(--light),
             inset -2px -2px 0 var(--shadow),inset 2px 2px 0 var(--hilite)}
html.hs-framed ::-webkit-scrollbar-thumb:hover{background:#d6d6d6}
html.hs-framed ::-webkit-scrollbar-corner{background:var(--face)}
