/* =============================================================================
 * 🎨 KFC 薪资查询 · 样式表
 * =============================================================================
 * 一般不用改。如果需要调整样式（颜色、间距、字体），在这里改。
 * ============================================================================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  background: linear-gradient(135deg, #fff8f0 0%, #ffead4 100%);
  color: #2c2c2c;
  min-height: 100vh;
  padding: 18px 14px 100px;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;   /* 长文本自动换行，防止溢出 */
  word-break: normal;
}

/* ---------- 顶部 ---------- */
.header {
  text-align: center;
  padding: 4px 0 18px;
}
.header .title {
  font-size: 22px;
  font-weight: 700;
  color: #d62300;
  margin-bottom: 4px;
}
.header .title .emoji {
  font-size: 26px;
  margin-right: 4px;
}
.header .subtitle {
  font-size: 12px;
  color: #888;
}

/* ---------- View 切换动画 ---------- */
.view {
  display: none;
  opacity: 0;
  transform: translateY(8px);
}
.view.is-active {
  display: block;
  animation: fadeIn 0.32s ease-out forwards;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- 步骤卡 ---------- */
.step-card {
  background: #fff;
  border-radius: 16px;
  padding: 22px 18px;
  box-shadow: 0 4px 14px rgba(214,35,0,0.08);
  margin-bottom: 12px;
}
.badge {
  display: inline-block;
  background: linear-gradient(135deg, #d62300 0%, #ff6028 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}
.step-card h2 {
  font-size: 17px;
  font-weight: 700;
  color: #2c2c2c;
  margin-bottom: 8px;
  line-height: 1.5;
}
.step-card h2 strong { color: #d62300; }
.step-card .hint {
  font-size: 12px;
  color: #888;
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ---------- 选项按钮 ---------- */
.option-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #ff8c42;
  border-radius: 12px;
  background: #fff;
  color: #d62300;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
  text-align: center;
  margin-bottom: 10px;
}
.option-btn:active {
  background: #fff5e6;
  transform: scale(0.98);
}
.option-btn.primary {
  background: linear-gradient(135deg, #d62300 0%, #ff6028 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(214,35,0,0.25);
}
.option-btn.primary:active {
  box-shadow: 0 1px 4px rgba(214,35,0,0.2);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 14px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  font-family: inherit;
}
.back-btn:active { color: #666; }

/* ---------- 结果卡 ---------- */
.result-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px 18px;
  box-shadow: 0 4px 14px rgba(214,35,0,0.08);
  text-align: center;
}
.check-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 4px 12px rgba(76,175,80,0.3);
}
.result-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 6px;
}
.result-type {
  font-size: 22px;
  font-weight: 700;
  color: #d62300;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.result-type .code {
  display: inline-block;
  background: #fff5e6;
  color: #d62300;
  font-size: 13px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
  margin-right: 6px;
  vertical-align: middle;
}
.result-sub {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
}
.result-tag {
  display: inline-block;
  background: #faf6f0;
  color: #d62300;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  margin-top: 4px;
}
.result-note {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
  background: #faf8f5;
  padding: 10px 12px;
  border-radius: 8px;
  margin-top: 14px;
  text-align: left;
  border-left: 3px solid #ff8c42;
}
.result-note strong { color: #d62300; }

.divider {
  height: 1px;
  background: linear-gradient(to right, transparent, #e0e0e0, transparent);
  margin: 20px 0 16px;
}

.city-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
  text-align: left;
}

/* ---------- 城市按钮 ---------- */
.cities {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.city-btn {
  background: #fff;
  border: 2px solid #ff8c42;
  border-radius: 14px;
  padding: 18px 0;
  font-size: 16px;
  font-weight: 600;
  color: #d62300;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
  box-shadow: 0 2px 6px rgba(214,35,0,0.08);
  font-family: inherit;
}
.city-btn:active {
  transform: scale(0.96);
  background: #fff5e6;
}
.city-btn .emoji {
  font-size: 24px;
  display: block;
  margin-bottom: 4px;
}

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s;
}
.modal-overlay.show { display: flex; }
.modal {
  background: #fff;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  border-radius: 20px 20px 0 0;
  padding: 22px 22px 28px;
  overflow-y: auto;
  overflow-x: hidden;   /* 防止表格撑破弹窗横向滚动 */
  animation: slideUp 0.3s ease-out;
  -webkit-overflow-scrolling: touch;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #f0f0f0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 1;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #d62300;
  line-height: 1.4;
}
.modal-title .emoji {
  font-size: 22px;
  margin-right: 4px;
}
.modal-title .sub {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #888;
  margin-top: 4px;
}
.modal-title .code-tag {
  display: inline-block;
  background: #fff5e6;
  color: #d62300;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-right: 4px;
  vertical-align: middle;
}
.close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: #f5f5f5;
  border-radius: 50%;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.close-btn:active { background: #e0e0e0; }

/* ---------- 区块 / 表格 ---------- */
.section { margin-bottom: 14px; }
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: #d62300;
  margin-bottom: 10px;
  padding-left: 10px;
  border-left: 4px solid #ff8c42;
  line-height: 1.4;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: fixed;   /* 固定列宽，防止内容撑破 */
}
th, td {
  padding: 10px 6px;
  text-align: right;
  border-bottom: 1px solid #f5f5f5;
  overflow-wrap: break-word;
}
th:first-child, td:first-child {
  text-align: left;
  font-weight: 600;
  color: #555;
  width: 34%;           /* 工时分档列固定比例 */
}
th:nth-child(2), td:nth-child(2) {
  width: 42%;           /* 金额列 */
}
th:nth-child(3), td:nth-child(3) {
  width: 24%;           /* 补贴/时薪列 */
}
th {
  background: #faf6f0;
  color: #888;
  font-weight: 600;
  font-size: 11px;
  border-bottom: none;
}
td.amount {
  color: #d62300;
  font-weight: 700;
  font-size: 14px;
}
td.subsidy {
  color: #888;
  font-size: 12px;
}
td.rate {
  color: #d62300;
  font-weight: 600;
  font-size: 13px;
}
tr:last-child td { border-bottom: none; }

/* ---------- 表格备注 ---------- */
.table-note {
  font-size: 11px;
  color: #666;
  background: #fff8f0;
  padding: 8px 10px;
  border-radius: 6px;
  margin-top: 8px;
  line-height: 1.6;
  border-left: 3px solid #ff8c42;
}

/* ---------- 顶部信息卡（时薪 + 构成） ---------- */
.info-card {
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.info-card.primary {
  background: linear-gradient(135deg, #fff8f0 0%, #fef3e7 100%);
  border: 1px solid #ffe0b8;
}
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.info-label {
  font-size: 13px;
  color: #888;
  font-weight: 600;
}
.info-value {
  font-size: 18px;
  color: #d62300;
  font-weight: 700;
}
.info-composition {
  font-size: 12px;
  color: #666;
  line-height: 1.6;
  padding-top: 8px;
  border-top: 1px dashed #f0d4a8;
  overflow-wrap: break-word;
}

/* ---------- 额外说明卡（春节福利 / 季度全勤） ---------- */
.extra-card {
  background: linear-gradient(135deg, #fff5f5 0%, #ffe8e8 100%);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #c00;
  font-weight: 600;
  border: 1px solid #ffd0d0;
  line-height: 1.5;
}

/* ---------- 福利待遇卡 ---------- */
.benefits-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border: 1px solid #f0e8d8;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.benefits-title {
  font-size: 13px;
  font-weight: 700;
  color: #d62300;
  margin-bottom: 8px;
  padding-left: 8px;
  border-left: 3px solid #ff8c42;
}
.benefits-text {
  font-size: 13px;
  color: #555;
  line-height: 1.7;
  overflow-wrap: break-word;
}

.modal-note {
  font-size: 12px;
  color: #888;
  line-height: 1.6;
  background: #faf8f5;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.modal-note strong { color: #d62300; }

.disclaimer {
  text-align: center;
  color: #c00;
  font-size: 12px;
  font-weight: 600;
  padding: 12px;
  background: #fff5f5;
  border-radius: 10px;
  margin-top: 16px;
  border: 1px dashed #ffcccc;
  line-height: 1.5;
}

/* ---------- 底部 ---------- */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  text-align: center;
  padding: 10px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 11px;
  color: #999;
  border-top: 1px solid #f0f0f0;
}
