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

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

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

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

h2 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 10px;
}

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

.form-row {
  display: flex;
  gap: 8px;
}

.form-row input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  outline: none;
}

.form-row input[type="text"]:focus {
  border-color: #2563eb;
}

.form-row input[type="number"] {
  width: 70px;
  padding: 10px 8px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  text-align: center;
  outline: none;
}

.form-row input[type="number"]:focus {
  border-color: #2563eb;
}

.form-row button {
  padding: 10px 18px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.form-row button:hover {
  background: #1d4ed8;
}

/* 議題リスト */
.list-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 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: 10px;
}

.list-header h2 {
  margin-bottom: 0;
}

#agendaList {
  list-style: none;
}

#agendaList li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.95rem;
}

#agendaList li:last-child {
  border-bottom: none;
}

#agendaList li.current {
  background: #eff6ff;
  border-radius: 8px;
  padding: 10px 10px;
  border-bottom: none;
  margin-bottom: 2px;
}

#agendaList li.done {
  opacity: 0.4;
  text-decoration: line-through;
}

.agenda-index {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

li.current .agenda-index {
  background: #2563eb;
  color: #fff;
}

.agenda-name {
  flex: 1;
  font-weight: 500;
}

.agenda-time {
  color: #6b7280;
  font-size: 0.85rem;
  white-space: nowrap;
}

li.current .agenda-time {
  color: #2563eb;
  font-weight: 600;
}

.btn-delete {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
}

.btn-delete:hover {
  color: #ef4444;
  background: #fee2e2;
}

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

/* タイマー */
.timer-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  text-align: center;
}

.current-agenda {
  font-size: 1.1rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 12px;
  min-height: 1.5em;
}

.timer-display {
  font-size: 4rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #1e3a8a;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  transition: color 0.3s;
}

.timer-display.warning {
  color: #f59e0b;
}

.timer-display.danger {
  color: #ef4444;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.timer-progress {
  background: #e5e7eb;
  border-radius: 99px;
  height: 8px;
  margin-bottom: 16px;
  overflow: hidden;
}

.timer-bar {
  height: 100%;
  background: #2563eb;
  border-radius: 99px;
  width: 100%;
  transition: width 1s linear, background 0.3s;
}

.timer-bar.warning {
  background: #f59e0b;
}

.timer-bar.danger {
  background: #ef4444;
}

.timer-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  padding: 12px 28px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-width: 120px;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-primary.running {
  background: #6b7280;
}

.btn-primary.running:hover {
  background: #4b5563;
}

.btn-secondary {
  padding: 10px 18px;
  background: #f3f4f6;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #e5e7eb;
}

.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.agenda-status {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #6b7280;
  min-height: 1.2em;
}

/* レスポンシブ */
@media (max-width: 480px) {
  .timer-display {
    font-size: 3rem;
  }

  .form-row {
    flex-wrap: wrap;
  }

  .form-row input[type="text"] {
    flex: 1 0 100%;
  }

  .form-row button {
    flex: 1;
  }
}
