:root {
  --bg: #f7f2e9;
  --ink: #1f1a14;
  --card: #fffaf0;
  --line: #d8ccb6;
  --accent: #d45113;
  --accent-2: #0f7b6c;
  --error: #b3261e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Pretendard", "Apple SD Gothic Neo", sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at 10% 20%, #ffe8c5 0%, transparent 40%),
              radial-gradient(circle at 90% 10%, #bfe9df 0%, transparent 35%),
              var(--bg);
  overflow-x: hidden;
}

.bg-blur {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  z-index: -1;
}

.bg-1 {
  width: 220px;
  height: 220px;
  background: #ffd99a;
  top: -40px;
  right: -40px;
}

.bg-2 {
  width: 300px;
  height: 300px;
  background: #8fd8cb;
  bottom: -120px;
  left: -80px;
}

.wrap {
  width: min(980px, 92vw);
  margin: 36px auto 48px;
  display: grid;
  gap: 18px;
  animation: rise 500ms ease;
}

.hero {
  text-align: center;
}

.tag {
  display: inline-block;
  border: 1px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  letter-spacing: 1px;
}

h1, h2 {
  font-family: "Black Han Sans", sans-serif;
  font-weight: 400;
  margin: 0;
}

h1 {
  margin-top: 8px;
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.05;
}

.sub {
  margin: 8px 0 0;
}

.card {
  background: linear-gradient(160deg, var(--card), #fff6e4);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 20px rgba(31, 26, 20, 0.08);
}

#noteForm {
  display: grid;
  gap: 8px;
}

label {
  font-size: 14px;
  font-weight: 700;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  width: 100%;
  border: 1px solid #c8bba4;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.form-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

button {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  filter: brightness(0.95);
}

.wall-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

#reloadBtn {
  background: var(--accent-2);
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.note {
  border: 1px dashed #c7b796;
  border-radius: 12px;
  background: #fff;
  padding: 12px;
  animation: pop 220ms ease;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  color: #5c4f42;
  margin-bottom: 8px;
}

.note-message {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.status {
  min-height: 20px;
  margin: 8px 0 0;
  font-size: 14px;
}

.error {
  color: var(--error);
  font-weight: 700;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.98);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 640px) {
  .wrap {
    margin-top: 20px;
  }

  .card {
    padding: 14px;
  }

  .form-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  button {
    width: 100%;
  }
}
