/* 现代极简 CSS 重置 · 把浏览器默认样式归零 */

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

html, body {
  margin: 0;
  padding: 0;
}

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

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd {
  margin: 0;
}

ul[role='list'], ol[role='list'] {
  list-style: none;
  padding: 0;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

input, textarea {
  font-size: 16px;
}

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

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

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ===== fieldset / legend 全局规范化 =====
 * fieldset 是少数几个 legend 渲染极其依赖 display 模式的元素之一——
 * 不同浏览器对 fieldset + flex 的支持有差异，default 行为里 legend
 * 会"骑"在边框上看起来像"漂在卡片外"。
 * 下面这套强制 legend 当作正常块级流元素渲染，不再依赖原生 fieldset 行为。
 */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;        /* 防止 fieldset 默认的 min-content 约束破坏 flex / grid */
}

legend {
  display: block;
  padding: 0;
  margin: 0;
  width: 100%;
}

/* ===== placeholder 全局规范化 =====
 * 让占位提示一眼能看出是"提示"，不会被误以为是真内容。
 * Firefox 的 placeholder 默认带 opacity，要显式覆盖。
 */
::placeholder {
  color: #b8b3a3;        /* 比正文淡很多的灰，明显是占位 */
  font-style: italic;
  opacity: 1;
}
:focus::placeholder {
  color: #d4cfbf;        /* 聚焦时再淡一档，提示"该输入了" */
}
