/* =====================================================================
   reset.css — 极简重置
   ===================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden; /* 桌面不滚动，滚动交给窗口内部 */
  background: var(--bg-deep);
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

/* 界面组件禁止选中文本 */
.win9x-window__titlebar,
.win9x-window__controls,
.win9x-window__btn,
.win9x-button,
.taskbar,
.start-menu,
.sidebar,
.crt-overlay,
.barkley__header,
.works-card {
  -webkit-user-select: none;
  user-select: none;
}

/* 可阅读区域放行选中 */
.notepad__text,
.main-window__tagline,
.works-detail__summary,
.barkley__bubble,
.word__page {
  -webkit-user-select: text;
  user-select: text;
}

/* 屏幕阅读器可见 */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 键盘焦点：只在键盘操作时出现 */
:focus-visible {
  outline: 2px dotted var(--accent-cyan);
  outline-offset: 2px;
}

/* 减少动效：一次性关掉所有动画/过渡 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
