/* ===== 全域設定：防爆版 ===== */
*, *::before, *::after {
  box-sizing: border-box;
}


/* ===== 基本版面 ===== */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: clamp(14px, 2.5vw, 18px);
  background: #f5f5f5;
  line-height: 1.5;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 20px auto;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
}

h1, h2 {
  font-size: clamp(20px, 4vw, 32px);
  margin: 0 0 16px 0;
}

form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 40px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input.houseno {
  width: 6ch;
  max-width: 100%;
  padding: 8px 10px;
  font-size: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
}

input.doorno {
  width: 16ch;
  max-width: 100%;
  padding: 8px 10px;
  font-size: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
}

select {
  padding: 8px 10px;
  font-size: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}



/* 姓名欄位：視覺約 5 個中文字寬（不限制輸入） */

input.name {
  width: 10ch;
  max-width: 100%;
  padding: 8px 10px;
  font-size: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.radio-group {
  display: flex;
  gap: 20px;
  align-items: center;
  flex-wrap: wrap;
}

.radio-group label {
  cursor: pointer;
  user-select: none;
}

textarea {
  width: 99%;
  min-height: 80px;
  padding: 10px;
  font-size: inherit;
  border: 1px solid #ccc;
  border-radius: 6px;
  resize: vertical;
}

/* ===== 按鈕 ===== */
button {
  width: fit-content;
  padding: 8px 22px;
  font-size: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  background: #007bff;
  color: #fff;
}

button:hover {
  background: #0056b3;
}

/* 手機優化 */
@media (max-width: 600px) {
  .radio-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }


 button {
  width: fit-content;
  padding: 10px 24px;
  font-size: inherit;
  cursor: pointer;
  border: none;
  border-radius: 6px;
  background: #007bff;
  color: white;
  box-sizing: border-box; /* 關鍵 */
} 
}

/* ===== 表格 ===== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden; /* 現在可以安心開 */
  font-family: Arial, sans-serif;
}

.container {
  width: 98%;
  max-width: 1200px;
  margin: 20px auto;
}

/* ===== 表格 ===== */
table.data-table {
  width: 100%;                 /* ⭐ 永遠不超出 */
  border-collapse: collapse;
  table-layout: fixed;         /* ⭐ 比例才會穩 */
}
table.data-table thead th {
  background: #ffff80;
  text-align: center;
  padding: 12px;
  border: 1px solid #ddd;
  white-space: nowrap;         /* 表頭不換行 OK */
}
table.data-table tbody td {
  padding: 22px;
  border: 1px solid #ddd;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;     /* 過長顯示 ... */
  white-space: normal;         /* 內容可換行 */
  word-break: break-word;      /* 中文安全 */
  vertical-align: top;    /* 內容靠上 */
}
/* ===== 欄寬比例（加起來 = 100%）===== */
table.data-table th:nth-child(1),
table.data-table td:nth-child(1) { width: 25%; }
table.data-table th:nth-child(2),
table.data-table td:nth-child(2) { width: 50%; }
table.data-table th:nth-child(3),
table.data-table td:nth-child(3) { width: 25%; }



li {
  margin-bottom: 10px;
  margin-top: 10px;
  list-style: disc; /* 隱藏預設圓點 */
  position: relative;
  padding-left: 5px; /* 為左側圖示留預留空間 */
}