/* ==========================================================================
   base.css — 公共基礎樣式（reset + 全站通用規則）
   ========================================================================== */

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

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

body {
  font-family: var(--font-family);
  font-size: var(--fs-text);
  color: var(--color-text-primary);
  background-color: #fdeef6;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  display: block;
}

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

button,
input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

/* 確保 hidden 屬性始終生效（避免被 display:flex 等覆蓋） */
[hidden] {
  display: none !important;
}

/* 去除 input 自動填充時的預設底色（WebKit） */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--color-text-primary);
  -webkit-box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.95) inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* 聚焦可見性（鍵盤導航友善） */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
