* {
  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: 680px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

h1 {
  font-size: 1.6rem;
  color: #4a7fa5;
  text-align: center;
  margin-bottom: 24px;
}

/* 入力フォーム */
.input-section {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

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

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

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

textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-primary {
  width: 100%;
  padding: 12px;
  background: #4a7fa5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  margin-top: 4px;
  transition: background 0.2s;
}

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

/* 一覧 */
.list-section h2 {
  font-size: 1.1rem;
  color: #555;
  margin-bottom: 14px;
}

.empty-msg {
  text-align: center;
  color: #aaa;
  font-size: 0.9rem;
  margin-top: 20px;
}

.diary-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  position: relative;
}

.diary-card .card-date {
  font-size: 0.78rem;
  color: #888;
  margin-bottom: 4px;
}

.diary-card .card-title {
  font-size: 1rem;
  font-weight: bold;
  color: #4a7fa5;
  margin-bottom: 8px;
}

.diary-card .card-content {
  font-size: 0.92rem;
  color: #444;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
}

.delete-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: none;
  color: #bbb;
  font-size: 1.2rem;
  cursor: pointer;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.delete-btn:hover {
  color: #e05555;
  background: #fff0f0;
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.3rem;
  }
  .input-section {
    padding: 16px;
  }
}
