:root {
  --bg: #f6f8ff;
  --card: #ffffff;
  --border: #d8e0ff;
  --text: #1f2937;
  --muted: #6b7280;
  --accent: #4f46e5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", sans-serif;
  background: radial-gradient(circle at top, #eef2ff 0%, var(--bg) 50%);
  color: var(--text);
}

.container {
  width: min(1000px, 92%);
  margin: 40px auto;
  padding: 24px;
}

h1,
h2 {
  margin: 0 0 16px;
}

.memo-form,
.memo-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.memo-form {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.95rem;
  color: var(--muted);
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  font-size: 1rem;
  color: var(--text);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

button {
  cursor: pointer;
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
}

#add-button {
  background: var(--accent);
  color: #fff;
}

.memo-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#clear-all {
  background: transparent;
  color: var(--accent);
}

.memo-items {
  display: grid;
  gap: 16px;
}

.memo-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  background: #f9fbff;
}

.memo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.memo-title {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.memo-body {
  margin: 0;
  color: var(--text);
  white-space: pre-wrap;
}

.memo-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.memo-actions button {
  background: transparent;
  color: var(--accent);
}

@media (max-width: 640px) {
  .memo-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
