/* 全站字體一律 >=16px（基準 18px，任何元素不得低於 16px） */
html {
  font-size: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "PingFang TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #1f2933;
  background: #f7f8fa;
}

.site-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.2rem 2rem;
  background: #1d4e6b;
  color: #fff;
}

.site-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.site-subtitle {
  font-size: 1rem;
  opacity: 0.85;
}

.site-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

h1 {
  font-size: 1.7rem;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.3rem;
}

.hint {
  font-size: 1rem;
  color: #52606d;
  margin-bottom: 1.5rem;
}

.back-link {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #1d4e6b;
  text-decoration: none;
}

.disease-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.disease-card {
  display: block;
  padding: 1.2rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d7dde3;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease;
}

.disease-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  border-color: #1d4e6b;
}

.disease-card--disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.disease-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.disease-code {
  font-size: 1rem;
  color: #52606d;
}

.privacy-notice {
  background: #fff4e5;
  border: 1px solid #f0b429;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  font-size: 1rem;
  margin-bottom: 1.5rem;
}

.field-label {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  margin: 1.4rem 0 0.5rem;
}

textarea,
input[type="text"] {
  width: 100%;
  font-size: 1rem;
  font-family: inherit;
  padding: 0.8rem;
  border: 1px solid #cbd2d9;
  border-radius: 8px;
  line-height: 1.6;
}

input[type="file"] {
  font-size: 1rem;
}

.photo-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.photo-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  background: #fff;
}

.photo-item img {
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.photo-item-body {
  flex: 1;
}

.photo-item-filename {
  font-size: 1rem;
  color: #52606d;
  margin-bottom: 0.4rem;
  word-break: break-all;
}

.photo-item-caption {
  width: 100%;
  font-size: 1rem;
  padding: 0.6rem;
  border: 1px solid #cbd2d9;
  border-radius: 6px;
  font-family: inherit;
}

.primary-btn {
  margin-top: 1.8rem;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.9rem 2rem;
  background: #1d4e6b;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

.primary-btn:hover {
  background: #163c53;
}

.primary-btn:disabled {
  background: #9aa5b1;
  cursor: not-allowed;
}

.download-btn {
  display: inline-block;
  margin-top: 1rem;
  text-decoration: none;
  text-align: center;
}

.login-form {
  max-width: 420px;
  margin-top: 1rem;
}

.login-form input[type="password"] {
  width: 100%;
  font-size: 1.1rem;
  padding: 0.8rem;
  border: 1px solid #cbd2d9;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.header-logout {
  margin-left: auto;
  font-size: 1rem;
  color: #fff;
  text-decoration: underline;
}

.secondary-btn {
  font-size: 1.05rem;
  padding: 0.7rem 1.5rem;
  background: #fff;
  color: #1d4e6b;
  border: 1px solid #1d4e6b;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
}

.loading {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  color: #1d4e6b;
}

.hidden {
  display: none !important;
}

.result-panel {
  margin-top: 1.8rem;
  padding: 1.4rem;
  border-radius: 10px;
  font-size: 1.05rem;
}

.result-panel--warn {
  background: #fff4e5;
  border: 1px solid #f0b429;
}

.result-panel--error {
  background: #fde8e8;
  border: 1px solid #e12d39;
}

.result-panel--ok {
  background: #e3f9e5;
  border: 1px solid #2f9e44;
}

.result-panel ul {
  font-size: 1.05rem;
  line-height: 1.8;
}

.result-panel pre {
  white-space: pre-wrap;
  font-size: 1rem;
  font-family: inherit;
}

/* ── WPI 勞動能力減損表單專用（純新增，不影響既有頁面）── */
.parts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.2rem;
}

.part-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.9rem;
  background: #fff;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
}

.part-option input {
  width: 1.1rem;
  height: 1.1rem;
}

.preview-text {
  white-space: pre-wrap;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.7;
  background: #fff;
  border: 1px solid #d7dde3;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  max-height: 32rem;
  overflow-y: auto;
}

#copy-done {
  margin-left: 0.6rem;
  color: #2f9e44;
  font-weight: 700;
}

#download-buttons {
  margin: 0.5rem 0 1rem;
}

.usage-info {
  margin-top: 16px;
  padding: 12px 16px;
  border: 1px solid #d0d7de;
  border-radius: 8px;
  background: #f6f8fa;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
}
.usage-info .usage-detail {
  font-size: 16px;
  color: #666;
}
