* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #F0F4FA;
  color: #1a1a1a;
  padding: 16px;
  max-width: 800px;
  margin: 0 auto;
}
h1 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 16px;
  color: #5B8DEF;
}
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid #5B8DEF;
}
.tab-btn {
  flex: 1;
  padding: 12px;
  font-size: 18px;
  font-weight: bold;
  border: none;
  background: #fff;
  color: #333;
  cursor: pointer;
  min-height: 48px;
  border-radius: 0;
}
.tab-btn.active {
  background: #5B8DEF;
  color: #fff;
}
label {
  display: block;
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 8px;
  color: #2C3E50;
}
textarea {
  width: 100%;
  font-size: 16px;
  padding: 14px;
  border: 2px solid #5B8DEF;
  border-radius: 8px;
  font-family: inherit;
  resize: vertical;
  min-height: 160px;
  line-height: 1.6;
}
textarea:focus, button:focus { outline: 3px solid #5B8DEF; outline-offset: 2px; }
.btn-row { margin: 14px 0; text-align: center; display: flex; gap: 12px; justify-content: center; }
button {
  font-size: 20px;
  padding: 14px 40px;
  background: #5B8DEF;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  min-height: 52px;
}
button:hover { background: #4A7DD4; }
button:active { background: #3D6BBF; }
.result-box {
  margin-top: 16px;
  background: #fff;
  border: 2px solid #5B8DEF;
  border-radius: 10px;
  overflow: hidden;
  display: none;
}
#preview {
  padding: 12px;
  overflow-x: auto;
  font-size: 15px;
  line-height: 1.8;
}
#preview table, #monthPreview table {
  width: 100%;
  border-collapse: collapse;
  min-width: 300px;
  border: 2px solid #5B8DEF;
  border-radius: 8px;
  overflow: hidden;
}
#preview th, #preview td, #monthPreview th, #monthPreview td {
  border: 1px solid #E8EDF3;
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
}
#preview td:first-child, #preview th:first-child,
#monthPreview td:first-child, #monthPreview th:first-child {
  border-right: 2px dashed #D6E2F0;
}
#preview th, #monthPreview th { background: #EBF2FF; font-weight: bold; color: #2C3E50; }
#preview td:last-child, #monthPreview td:last-child { text-align: left; padding-left: 16px; }
#monthPreview { padding: 12px; overflow-x: auto; font-size: 15px; line-height: 1.8; }
.copy-row {
  padding: 10px 16px;
  background: #f9f9f9;
  border-top: 1px solid #ddd;
  text-align: center;
}
.action-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 12px 16px;
  border-bottom: 1px solid #ddd;
  background: #f9f9f9;
}
.action-btns button {
  padding: 10px 24px;
  font-size: 16px;
  min-height: 44px;
}
.btn-copy { background: #5B8DEF; }
.btn-copy:hover { background: #4A7DD4; }
.btn-img { background: #FF9800; }
.btn-img:hover { background: #F57C00; }
.btn-clear { background: #E74C3C; }
.btn-clear:hover { background: #C0392B; }
.btn-row .btn-clear { font-size: 16px; padding: 12px 24px; min-height: 44px; }
.copy-row button {
  background: #5B8DEF;
  padding: 12px 32px;
  font-size: 18px;
}
.copy-row button:hover { background: #4A7DD4; }
.hint {
  margin-top: 12px;
  font-size: 14px;
  color: #666;
  text-align: center;
}
.date-picker {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 12px 0;
  font-size: 18px;
  font-weight: bold;
  color: #2C3E50;
}
.date-picker button {
  font-size: 18px;
  padding: 6px 16px;
  min-height: 36px;
  border-radius: 6px;
}
.date-picker .date-display {
  min-width: 140px;
  text-align: center;
}
.status {
  text-align: center;
  font-size: 18px;
  color: #5B8DEF;
  margin: 10px 0;
  min-height: 28px;
}
@media (max-width: 480px) {
  body { padding: 10px; }
  h1 { font-size: 18px; }
  label { font-size: 16px; }
  textarea { font-size: 15px; min-height: 140px; }
  button { font-size: 18px; padding: 12px 28px; }
  .tab-btn { font-size: 16px; padding: 10px; }
  #preview { font-size: 14px; }
  #preview th, #preview td { padding: 8px 8px; }
}
