:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1f2430;
  --muted: #697386;
  --line: #dce1ea;
  --primary: #2b7fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Noto Sans TC", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
}

.container {
  max-width: 980px;
  margin: 24px auto;
  padding: 0 16px 24px;
}

.header h1 {
  margin: 0 0 4px;
}

.header p {
  margin: 0 0 16px;
  color: var(--muted);
}

.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.controls h2 {
  margin: 0;
  font-size: 1.2rem;
}

button {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
}

button:hover {
  border-color: var(--primary);
}

.calendar-section,
.note-section {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 14px;
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekdays div {
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
}

.day-cell {
  min-height: 92px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 8px;
}

.day-cell.empty {
  background: #f9fbff;
}

.day-top {
  font-weight: 600;
  margin-bottom: 6px;
}

.note-chip {
  display: inline-block;
  width: 100%;
  font-size: 0.85rem;
  color: #fff;
  border-radius: 6px;
  padding: 4px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-section h3 {
  margin-top: 0;
}

form label {
  display: block;
  margin-bottom: 10px;
}

input,
textarea {
  width: 100%;
  margin-top: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  font: inherit;
}

input[type="color"] {
  padding: 3px;
  height: 42px;
}

.form-actions {
  display: flex;
  gap: 8px;
}

.danger {
  color: #b42318;
}

.hint {
  color: var(--muted);
  margin: 10px 0 0;
  font-size: 0.9rem;
}
