* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hiragino Sans', 'Noto Sans JP', sans-serif;
  background: #f5f5f7;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
  padding-top: calc(48px + 2rem);
}

h1 {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
}

.subtitle {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 2rem;
}

/* ファイル変換セクション */
.file-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.file-section h2 {
  font-size: 1rem;
  margin-bottom: 1rem;
  color: #555;
}

#drop-zone {
  border: 2px dashed #ccc;
  border-radius: 10px;
  padding: 2.5rem;
  text-align: center;
  color: #999;
  cursor: pointer;
  transition: all 0.2s;
  background: #fafafa;
}

#drop-zone:hover {
  border-color: #4a90d9;
  color: #4a90d9;
}

#drop-zone.dragover {
  border-color: #4a90d9;
  background: #e8f0fe;
  color: #4a90d9;
}

#drop-zone .drop-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

#drop-zone .drop-text {
  font-size: 0.9rem;
}

#file-input {
  display: none;
}

#file-info {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #555;
}

/* プレビュー */
#preview-section {
  display: none;
  margin-top: 1.5rem;
}

.options-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.options-row label {
  font-size: 0.8rem;
  color: #888;
}

.options-row select {
  padding: 0.4rem 0.6rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
}

.preview-tables {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.preview-block h3 {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 0.5rem;
}

.preview-block:last-child .date-col {
  background: #e8fde8;
}

.preview-block:last-child th.date-col {
  background: #c8e5c8;
}

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 1rem;
}

.preview-block table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.preview-block table th,
.preview-block table td {
  padding: 0.4rem 0.6rem;
  border: 1px solid #eee;
  white-space: nowrap;
}

.preview-block table th {
  background: #f0f0f0;
  font-weight: 600;
  position: sticky;
  top: 0;
}

.preview-block table .date-col {
  background: #e8f4fd;
}

.preview-block table th.date-col {
  background: #c8e2f5;
}

#convert-btn {
  padding: 0.6rem 1.5rem;
  background: #4a90d9;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

#convert-btn:hover {
  background: #3a7bc8;
}

#convert-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

#status-msg {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #4a90d9;
}

/* ヘルプセクション */
.help-section {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.help-section summary {
  font-size: 0.9rem;
  color: #555;
  cursor: pointer;
  font-weight: 600;
}

.help-section .help-content {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: #666;
}

.help-section table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}

.help-section th,
.help-section td {
  padding: 0.3rem 0.5rem;
  border: 1px solid #eee;
  text-align: left;
}

.help-section th {
  background: #f8f8f8;
}

/* レスポンシブ */
@media (max-width: 600px) {
  .options-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
