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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f4f6f8;
  color: #333;
  min-height: 100vh;
}

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

h1 {
  font-size: 1.4rem;
  font-weight: 700;
  text-align: center;
  padding: 16px 0 8px;
  color: #1565c0;
}

/* フォームエリア */
.form-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 4px;
}

.form-group input[type="text"],
.form-group select,
.form-group input[type="time"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background: #fafafa;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group input[type="time"]:focus {
  outline: none;
  border-color: #2196F3;
  background: #fff;
}

.time-group .time-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-group .time-inputs input {
  flex: 1;
}

.time-group .time-inputs span {
  font-size: 1rem;
  color: #555;
  flex-shrink: 0;
}

.btn-primary {
  width: 100%;
  padding: 10px;
  background: #2196F3;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 600;
  margin-top: 4px;
}

.btn-primary:hover {
  background: #1976D2;
}

.btn-primary:active {
  background: #1565C0;
}

/* 一覧エリア */
.list-section {
  background: #fff;
  border-radius: 10px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

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

.list-header h2 {
  font-size: 1rem;
  color: #555;
}

.view-toggle {
  display: flex;
  gap: 6px;
}

.toggle-btn {
  padding: 5px 10px;
  border: 1px solid #2196F3;
  background: #fff;
  color: #2196F3;
  border-radius: 5px;
  font-size: 0.8rem;
  cursor: pointer;
}

.toggle-btn.active {
  background: #2196F3;
  color: #fff;
}

/* グループ表示 */
.group-block {
  margin-bottom: 16px;
}

.group-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: #1565c0;
  background: #e3f2fd;
  padding: 5px 10px;
  border-radius: 5px;
  margin-bottom: 6px;
}

.shift-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.9rem;
}

.shift-item:last-child {
  border-bottom: none;
}

.shift-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.shift-main {
  font-weight: 600;
  color: #333;
}

.shift-sub {
  font-size: 0.78rem;
  color: #888;
}

.delete-btn {
  background: none;
  border: none;
  color: #e57373;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
}

.delete-btn:hover {
  background: #ffeaea;
}

.empty-msg {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  padding: 24px 0;
}

@media (min-width: 500px) {
  .shift-info {
    flex-direction: row;
    gap: 12px;
    align-items: center;
  }

  .shift-sub {
    font-size: 0.85rem;
  }
}
