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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
}

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

header {
  background: #e53935;
  color: #fff;
  padding: 16px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
}

header h1 {
  font-size: 1.3rem;
}

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

h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #e53935;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #fde8e8;
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  background: #fafafa;
  color: #333;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: #e53935;
  background: #fff;
}

.form-group textarea {
  resize: vertical;
  min-height: 72px;
}

.btn-primary {
  width: 100%;
  padding: 10px;
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #c62828;
}

/* フィルター */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #555;
}

.filter-bar select {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.9rem;
  background: #fafafa;
  cursor: pointer;
}

.count-badge {
  margin-left: auto;
  background: #e53935;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

/* リスト */
.list-section {
  padding: 12px 16px;
}

#claimList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.claim-item {
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  border-left: 4px solid #e53935;
}

.claim-item.status-対応中 {
  border-left-color: #f57c00;
}

.claim-item.status-完了 {
  border-left-color: #388e3c;
  opacity: 0.75;
}

.claim-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}

.claim-content {
  font-size: 0.95rem;
  font-weight: 600;
  flex: 1;
  white-space: pre-wrap;
  word-break: break-word;
}

.claim-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.82rem;
  color: #777;
  margin-bottom: 6px;
}

.cause-tag {
  background: #fde8e8;
  color: #c62828;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.8rem;
}

.badge-未対応 { background: #ffebee; color: #c62828; }
.badge-対応中 { background: #fff3e0; color: #e65100; }
.badge-完了   { background: #e8f5e9; color: #2e7d32; }

.claim-date {
  font-size: 0.78rem;
  color: #aaa;
}

.claim-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn-status {
  padding: 4px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fafafa;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-status:hover {
  background: #f0f0f0;
}

.btn-delete {
  padding: 4px 10px;
  border: 1px solid #ffcdd2;
  border-radius: 6px;
  background: #fff;
  color: #e53935;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.2s;
  margin-left: auto;
}

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

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

/* ランキング */
.ranking-section ol {
  padding-left: 20px;
}

.ranking-section li {
  padding: 6px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
}

.ranking-section li:last-child {
  border-bottom: none;
}

.rank-count {
  display: inline-block;
  background: #e53935;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

@media (max-width: 480px) {
  .claim-header {
    flex-direction: column;
  }
  .filter-bar {
    gap: 6px;
  }
}
