:root {
  --bg: #f7fbf8;
  --card: #ffffff;
  --ink: #203a37;
  --muted: #71817c;
  --mint: #2aae9f;
  --mint-soft: #e8faf3;
  --blue-soft: #eef7ff;
  --coral: #e27261;
  --coral-soft: #fff0ec;
  --line: #e4efea;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.shell {
  width: min(430px, 100%);
  margin: 0 auto;
  padding: 22px 16px 36px;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 108px;
  gap: 12px;
}

.memory-side,
.today-card,
.stats article,
.panel,
.form-card {
  border: 1px solid var(--line);
  background: var(--card);
}

.memory-side {
  min-height: 230px;
  padding: 24px 20px;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--mint-soft), #fff 58%, var(--blue-soft));
}

.mark,
.mini-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #fff;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(42, 174, 159, .12);
}

.mark span,
.mini-mark span {
  position: absolute;
  inset: 0 50% 0 0;
  background: #9fe7d6;
}

.mark b,
.mini-mark b {
  position: relative;
  color: #207a72;
  font-size: 25px;
}

.kicker {
  margin: 22px 0 6px;
  color: var(--mint);
  font-weight: 800;
  font-size: 13px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.12;
}

.copy {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
  font-size: 14px;
}

.today-card {
  border-radius: 26px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
}

.today-card small {
  color: var(--mint);
  font-weight: 900;
}

.today-card strong {
  font-size: 46px;
  line-height: 1;
}

.today-card span {
  color: var(--muted);
  font-weight: 800;
}

.actions {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.primary,
.secondary,
.save,
.reset {
  height: 52px;
  border-radius: 18px;
  font-weight: 900;
}

.primary,
.save {
  background: var(--mint);
  color: #fff;
}

.secondary,
.reset {
  background: #eaf7f4;
  color: #207a72;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.stats article {
  height: 82px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
}

.stats strong {
  font-size: 24px;
}

.stats span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 16px 0 12px;
  padding: 6px;
  border-radius: 20px;
  background: #eef4f1;
}

.tab {
  height: 38px;
  border-radius: 15px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.tab.active {
  background: #fff;
  color: var(--ink);
}

.panel {
  display: none;
  border-radius: 24px;
  padding: 16px;
}

.panel.active {
  display: block;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

h2 {
  font-size: 19px;
}

.link {
  background: transparent;
  color: var(--mint);
  font-weight: 900;
}

.focus,
.memo {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: #fbfffd;
  border: 1px solid var(--line);
}

.date {
  border-radius: 17px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 5px;
  background: #eaf7f4;
  color: #207a72;
  font-weight: 900;
}

.date strong {
  font-size: 25px;
  line-height: 1;
}

.memo-title {
  font-weight: 900;
  word-break: break-all;
}

.memo-note,
.memo-meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}

.important {
  display: inline-flex;
  margin-left: 6px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
}

.memo-list {
  display: grid;
  gap: 10px;
}

.memo-actions {
  display: grid;
  gap: 5px;
  align-content: center;
}

.memo-actions button {
  min-width: 44px;
  height: 27px;
  border-radius: 999px;
  background: #eef4f0;
  color: #51645f;
  font-size: 12px;
  font-weight: 900;
}

.memo-actions .danger {
  background: var(--coral-soft);
  color: var(--coral);
}

.filter-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.filter {
  flex: 1;
  height: 36px;
  border-radius: 999px;
  background: #eef4f1;
  color: var(--muted);
  font-weight: 900;
}

.filter.active {
  background: var(--mint);
  color: #fff;
}

.form-card {
  border-radius: 24px;
}

.form-title {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.form-title p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 5px;
}

label {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  color: #60736d;
  font-size: 13px;
  font-weight: 900;
}

input,
select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f7fbf8;
  color: var(--ink);
  padding: 0 14px;
  outline: none;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.check-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  height: 56px;
  border-radius: 18px;
  background: var(--mint-soft);
}

.check-line input {
  width: 20px;
  height: 20px;
}

.save,
.reset {
  width: 100%;
  margin-top: 14px;
}

.empty {
  padding: 28px 14px;
  border-radius: 20px;
  background: #fbfffd;
  color: var(--muted);
  text-align: center;
}

.cat-birthday {
  background: var(--coral-soft);
  color: var(--coral);
}

.cat-anniversary {
  background: #edf4ff;
  color: #5781d4;
}

.cat-work {
  background: #eaf7f4;
  color: #207a72;
}

.cat-life {
  background: #fff8df;
  color: #b28a20;
}

.cat-other {
  background: #eef4f0;
  color: #6f817c;
}
