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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f0f4f8;
  color: #1e293b;
  min-height: 100vh;
  padding: 16px;
}

.container {
  max-width: 700px;
  margin: 0 auto;
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 16px;
  text-align: center;
}

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #3b82f6;
  margin-bottom: 12px;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-row:last-child {
  margin-bottom: 0;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
}

input[type="text"],
input[type="date"],
input[type="time"],
textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  background: #f8fafc;
  transition: border-color 0.15s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #3b82f6;
  background: #fff;
}

textarea {
  resize: vertical;
}

/* タスク */
.task-item {
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  background: #f8fafc;
}

.task-row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.task-name {
  flex: 1;
  min-width: 140px;
}

.task-start,
.task-end {
  width: 110px;
  padding: 8px 6px;
}

.time-sep {
  font-size: 0.9rem;
  color: #64748b;
  flex-shrink: 0;
}

.task-detail {
  width: 100%;
  font-size: 0.85rem;
}

.btn-remove {
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.btn-remove:hover {
  color: #ef4444;
}

.btn-add {
  display: block;
  width: 100%;
  padding: 10px;
  background: #eff6ff;
  border: 1.5px dashed #93c5fd;
  border-radius: 8px;
  color: #3b82f6;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}

.btn-add:hover {
  background: #dbeafe;
}

/* アクション */
.action-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-generate {
  flex: 1;
  padding: 14px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-generate:hover {
  background: #2563eb;
}

.btn-clear {
  padding: 14px 20px;
  background: #f1f5f9;
  color: #64748b;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-clear:hover {
  background: #e2e8f0;
}

/* 出力 */
.output-section {
  border: 2px solid #3b82f6;
}

.output-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.btn-copy {
  padding: 8px 18px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-copy:hover {
  background: #2563eb;
}

.btn-copy.copied {
  background: #22c55e;
}

#output-text {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: #1e293b;
}

@media (max-width: 480px) {
  .task-row {
    gap: 4px;
  }

  .task-start,
  .task-end {
    width: 90px;
    font-size: 0.85rem;
    padding: 7px 4px;
  }

  .btn-generate,
  .btn-clear {
    padding: 12px;
  }
}
