/* ================================
   Blink | 瞬睫管家 系統 - 基礎樣式
   ================================ */

/* ==================== 防止水平滾動 ==================== */

/* 確保 HTML 和 Body 不會水平滾動 */
html {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100%;
    position: relative;
    /* 平滑滾動 */
    -webkit-overflow-scrolling: touch;
}

/* 統一盒模型 */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 防止元素溢出 */
img,
video,
iframe,
canvas {
    max-width: 100%;
    height: auto;
}

/* 表格響應式 */
table {
    width: 100%;
    max-width: 100%;
    table-layout: auto;
}

/* 長文字處理 */
p, h1, h2, h3, h4, h5, h6, span, div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 防止 pre 和 code 溢出 */
pre,
code {
    max-width: 100%;
    overflow-x: auto;
}

/* ================================
   CSS 變數來源說明
   ================================

   注意：基礎變數已移至 design-tokens.css
   本檔案只定義基礎重置樣式

   變數來源：
   - 顏色、間距、陰影：design-tokens.css
   - 品牌色：tablet_base.html 注入 或 theme-presets.css
   - 漸層色：functional-gradients.css
   ================================ */

/* ================================
   基礎重置樣式
   ================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
                 'PingFang TC', 'Microsoft JhengHei', sans-serif);
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--gray-50);
}

/* 連結樣式 */
a {
    color: inherit;
    text-decoration: none;
}

/* 按鈕樣式重置 */
button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

/* 表單元素樣式重置 */
input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* 列表樣式重置 */
ul,
ol {
    list-style: none;
}

/* 圖片樣式 */
img {
    max-width: 100%;
    height: auto;
    display: block;
}
