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

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

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

h1 {
  font-size: 1.5rem;
  color: #4a7cf7;
  margin-bottom: 20px;
  text-align: center;
}

/* フォーム */
.form-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

input[type="text"],
textarea,
select {
  width: 100%;
  border: 1px solid #dde3f0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #333;
  background: #fafbff;
  transition: border-color 0.2s;
  resize: vertical;
}

input[type="text"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #4a7cf7;
  background: #fff;
}

.btn-primary {
  background: #4a7cf7;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px;
  font-size: 0.95rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #3566e0;
}

/* フィルター */
.filter-section {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.filter-section input {
  flex: 1;
}

.filter-section select {
  width: 130px;
  flex-shrink: 0;
}

/* 一覧 */
.item-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.item-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

.item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.item-title {
  font-weight: bold;
  font-size: 0.95rem;
  flex: 1;
  word-break: break-all;
}

.item-category {
  font-size: 0.75rem;
  background: #eef1ff;
  color: #4a7cf7;
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
}

.item-body {
  font-size: 0.9rem;
  color: #555;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: 12px;
  line-height: 1.6;
}

.item-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.btn-copy {
  background: #4a7cf7;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 18px;
  font-size: 0.88rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-copy:hover {
  background: #3566e0;
}

.btn-delete {
  background: #fff;
  color: #e05a5a;
  border: 1px solid #e05a5a;
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-delete:hover {
  background: #e05a5a;
  color: #fff;
}

/* 空メッセージ */
.empty-msg {
  text-align: center;
  color: #999;
  font-size: 0.92rem;
  margin-top: 30px;
}

/* トースト */
.toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: #333;
  color: #fff;
  padding: 10px 24px;
  border-radius: 30px;
  font-size: 0.9rem;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 480px) {
  .filter-section {
    flex-direction: column;
  }
  .filter-section select {
    width: 100%;
  }
}
