*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{margin:0;padding:0;min-height:100%;-webkit-text-size-adjust:100%;text-size-adjust:100%;tab-size:4;scroll-behavior:smooth}
body{margin:0;padding:0;min-height:100%;font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Noto Sans SC",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
h1,h2,h3,h4,h5,h6,p,figure,blockquote,dl,dd,pre{margin:0}
h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}
b,strong{font-weight:inherit}
i,em,address,cite,dfn,var{font-style:inherit}
pre,code,kbd,samp{font-family:inherit;font-size:inherit}
abbr[title]{text-decoration:none}
ol,ul,menu{list-style:none;margin:0;padding:0}
button,input,select,optgroup,textarea{font:inherit;line-height:inherit;color:inherit;letter-spacing:inherit;text-transform:none;margin:0;border-radius:0;box-shadow:none}
button,input,select,textarea{appearance:none;-webkit-appearance:none}
button{border:0;padding:0;background:transparent;cursor:pointer;text-align:inherit}
button:disabled{cursor:not-allowed}
input,select,textarea{border:0;background:transparent;outline:none;min-width:0}
input[type=checkbox],input[type=radio]{-webkit-appearance:none;appearance:none;width:18px;height:18px;display:inline-grid;place-content:center;border:1px solid #b7c0cf;border-radius:5px;background:#fff;vertical-align:middle;cursor:pointer;flex:0 0 auto}
input[type=radio]{border-radius:50%}
input[type=checkbox]:checked,input[type=radio]:checked{border-color:#4361ee;background:#4361ee}
input[type=checkbox]:checked::after{content:"✓";font-size:13px;line-height:1;color:#fff;font-weight:800}
input[type=radio]:checked::after{content:"";width:8px;height:8px;border-radius:50%;background:#fff}
input[type=search]{-webkit-appearance:none;appearance:none}
input[type=number]{-moz-appearance:textfield}
input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}
a{color:inherit;text-decoration:none;background-color:transparent}
img,picture,svg,video,canvas{display:block;max-width:100%}
img{height:auto;border-style:none}
iframe{border:0}
table{border-collapse:collapse;border-spacing:0;border-color:inherit;text-indent:0}
th,td{text-align:inherit;font-weight:inherit}
fieldset{margin:0;padding:0;min-width:0;border:0}
legend{padding:0}
textarea{display:block;resize:vertical;overflow:auto}
summary{display:list-item;cursor:pointer}
small{font-size:80%}
[hidden]{display:none!important}
:focus-visible{outline:2px solid #4361ee;outline-offset:2px}
::placeholder{opacity:1;color:inherit}
::selection{background:rgba(67,97,238,.18)}
/* 不对 body 使用 transform：否则其后代 position:fixed 会以 body 为包含块，移动端弹窗会随页面滚动。 */
body{animation:hia-page-enter .18s ease-out both}
body.hia-page-leaving{opacity:0;transition:opacity .14s ease;pointer-events:none}
@keyframes hia-page-enter{from{opacity:.7}to{opacity:1}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}body{animation:none}body.hia-page-leaving{transition:none}}

/* 全局 Toast 提示 */
#toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast { background: white; border-radius: 8px; padding: 12px 24px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); font-weight: 500; font-size: 0.95rem; display: flex; align-items: center; gap: 8px; pointer-events: auto; min-width: 200px; justify-content: center; animation: toastSlideIn 0.3s ease-out; }
.toast.success { border-left: 4px solid #2a9d8f; color: #2a9d8f; }
.toast.error { border-left: 4px solid #e63946; color: #e63946; }
.toast.info { border-left: 4px solid #4361ee; color: #4361ee; }
.toast.removing { animation: toastSlideOut 0.3s ease-in forwards; }
@keyframes toastSlideIn { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes toastSlideOut { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-20px); } }

/* 全局模态框基础样式 */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; height: 100vh; height: 100dvh; background: rgba(0,0,0,0.4); z-index: 5000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s; padding: 15px; box-sizing: border-box; }
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal { background: white; border-radius: 12px; box-shadow: 0 20px 40px rgba(0,0,0,0.2); padding: 20px; width: 90%; max-width: 800px; max-height: 85vh; overflow: hidden; transform: scale(0.9) translateY(20px); transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); position: relative; box-sizing: border-box; }
.modal-overlay.active .modal { transform: scale(1) translateY(0); }
.modal-small { max-width: 450px; text-align: center; }
.modal-close { position: absolute; top: 15px; right: 20px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #6c757d; }
.modal-close:hover { color: #e63946; }
.modal h3 { margin-bottom: 15px; font-weight: 600; font-size: 1.3rem; }