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

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

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

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2c2c2c;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #e0e0e0;
}

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

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

.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 {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4a7fd4;
}

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

.btn-primary:hover {
  background: #3a6fc4;
}

.filter-section {
  background: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-section label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #555;
  white-space: nowrap;
}

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

.count-display {
  font-size: 0.8rem;
  color: #888;
  margin-left: auto;
}

.list-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-card {
  background: #fff;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: relative;
}

.note-card .note-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.note-card .subject-tag {
  background: #e8f0fe;
  color: #4a7fd4;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}

.note-card .note-date {
  font-size: 0.75rem;
  color: #aaa;
  margin-left: auto;
  white-space: nowrap;
}

.note-card .note-question {
  font-size: 0.95rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-card .note-cause-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #e07b4a;
  margin-bottom: 2px;
}

.note-card .note-cause {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff8f5;
  padding: 6px 10px;
  border-radius: 6px;
  border-left: 3px solid #e07b4a;
}

.note-card .delete-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  color: #ccc;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 2px 4px;
  transition: color 0.2s;
}

.note-card .delete-btn:hover {
  color: #e05555;
}

.empty-state {
  text-align: center;
  color: #aaa;
  padding: 40px 20px;
  font-size: 0.95rem;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.3rem;
  }
}
