@font-face {
  font-family: "OngleipParkDahyeon";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/2411-3@1.0/Ownglyph_ParkDaHyun.woff2")
    format("woff2");
  font-weight: normal;
  font-display: swap;
}

@font-face {
  font-family: "JejuStoneWall";
  src: url("https://cdn.jsdelivr.net/gh/projectnoonnu/noonfonts_2210-EF@1.0/EF_jejudoldam.woff2")
    format("woff2");
  font-weight: normal;
  font-display: swap;
}

:root {
  --bg: #fbf9f1;
  --surface: #fffdf4;
  --surface-strong: #f7f1d9;
  --text: #3d392e;
  --muted: #6d6554;
  --primary: #c7a23b;
  --primary-strong: #8d6c06;
  --secondary: #6aa66b;
  --border: rgba(61, 57, 46, 0.12);
  --shadow: 0 14px 40px rgba(101, 84, 31, 0.12);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(255, 214, 87, 0.18), transparent 30%),
    linear-gradient(180deg, #fffdf5 0%, #f7f1df 100%);
  font-family: "Be Vietnam Pro", system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.home-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.home-shell {
  width: min(720px, 100%);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  padding: 40px;
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin: 0 0 12px;
  font-family: "JejuStoneWall", serif;
  color: var(--primary-strong);
  letter-spacing: 0.04em;
}

.hero-title,
.page-title,
.home-card h2,
.section-head h2 {
  margin: 0;
  font-family: "OngleipParkDahyeon", serif;
  color: var(--primary-strong);
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  line-height: 1;
}

.hero-copy {
  margin: 18px 0 28px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 26px;
}

.primary-btn,
.ghost-btn,
.delete-btn {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 0 var(--primary-strong);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid rgba(61, 57, 46, 0.18);
  color: var(--text);
}

.primary-btn:hover,
.ghost-btn:hover,
.delete-btn:hover {
  transform: translateY(-1px);
}

.home-card {
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 22px;
}

.home-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: rgba(251, 249, 241, 0.82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(61, 57, 46, 0.08);
}

.back-link,
.home-link {
  font-size: 0.95rem;
  color: var(--primary-strong);
}

.sound-btn {
  justify-self: end;
  min-width: 110px;
}

.memo-body {
  min-height: 100vh;
}

.memo-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
  display: grid;
  gap: 24px;
}

.page-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

.writer-panel,
.list-panel {
  background: rgba(255, 253, 244, 0.9);
  border: 1px solid var(--border);
  border-radius: 28px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.memo-form {
  display: grid;
  gap: 14px;
}

.field-label,
.list-hint {
  color: var(--muted);
}

textarea {
  width: 100%;
  min-height: 160px;
  resize: vertical;
  border-radius: 18px;
  border: 1.5px solid rgba(61, 57, 46, 0.12);
  background: #fffef7;
  padding: 16px;
  font: inherit;
  line-height: 1.7;
  color: var(--text);
}

textarea:focus {
  outline: 2px solid rgba(106, 166, 107, 0.55);
  border-color: transparent;
}

.form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

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

.small-btn {
  padding: 10px 14px;
}

.memo-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.memo-card {
  min-height: 180px;
  border-radius: 24px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 24px rgba(101, 84, 31, 0.08);
}

.memo-tone-0 {
  background: #ffe98b;
}

.memo-tone-1 {
  background: #d8f2c7;
}

.memo-tone-2 {
  background: #ffd3c7;
}

.memo-date {
  font-size: 0.85rem;
  color: rgba(61, 57, 46, 0.72);
}

.memo-content {
  margin: 14px 0;
  white-space: pre-wrap;
  line-height: 1.75;
  font-size: 1rem;
}

.memo-actions {
  display: flex;
  justify-content: flex-end;
}

.delete-btn {
  background: rgba(255, 255, 255, 0.55);
  color: var(--text);
}

@media (max-width: 720px) {
  .home-shell {
    padding: 28px 20px;
    border-radius: 24px;
  }

  .topbar {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .sound-btn {
    justify-self: stretch;
  }

  .memo-shell {
    width: min(100%, calc(100% - 24px));
  }

  .section-head,
  .form-actions,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
}
