:root {
  color-scheme: light;
  --background: #eef5ff;
  --surface: #fbfdff;
  --surface-strong: #ffffff;
  --text: #27384f;
  --muted: #687993;
  --line: #d6e3f2;
  --accent: #4b83c4;
  --accent-dark: #356aa7;
  --accent-soft: #e1efff;
  --danger: #aa5869;
  --danger-soft: #fbecef;
  --success: #376fae;
  --success-soft: #e5f1ff;
  --shadow: 0 20px 50px rgba(66, 102, 145, 0.1);
  font-family:
    Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic",
    system-ui, sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(120, 178, 236, 0.25), transparent 26rem),
    radial-gradient(circle at 92% 20%, rgba(177, 194, 250, 0.22), transparent 24rem),
    var(--background);
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.page-shell {
  width: min(100% - 40px, 820px);
  margin: 0 auto;
  padding: 72px 0 88px;
}

.hero {
  max-width: 630px;
  margin-bottom: 42px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Nanum Myeongjo", serif;
  font-size: clamp(2.3rem, 7vw, 4.3rem);
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1.08;
}

.hero-description {
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.8;
  word-break: keep-all;
}

.composer-card {
  padding: 32px;
  border: 1px solid rgba(214, 227, 242, 0.92);
  border-radius: 22px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.section-heading,
.board-heading,
.form-footer,
.post-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-heading {
  align-items: flex-start;
  margin-bottom: 28px;
}

.section-heading h2,
.board-heading h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.035em;
}

.local-badge {
  flex: none;
  padding: 7px 11px;
  border: 1px solid #c7ddf5;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.76rem;
  font-weight: 700;
}

.field-group + .field-group {
  margin-top: 22px;
}

.field-group label {
  display: inline-block;
  margin-bottom: 9px;
  font-size: 0.91rem;
  font-weight: 700;
}

.field-group input,
.field-group textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--text);
  background: var(--surface-strong);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background-color 160ms ease;
}

.field-group input {
  height: 50px;
  padding: 0 15px;
}

.field-group textarea {
  min-height: 150px;
  padding: 14px 15px;
  line-height: 1.65;
  resize: vertical;
}

.field-group input::placeholder,
.field-group textarea::placeholder {
  color: #98a8bc;
}

.field-group input:hover,
.field-group textarea:hover {
  border-color: #b6cce5;
}

.field-group input:focus,
.field-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(75, 131, 196, 0.16);
}

.form-footer {
  margin-top: 24px;
}

.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.primary-button,
.delete-button {
  min-height: 44px;
  border: 0;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 750;
  transition:
    transform 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.primary-button {
  min-width: 128px;
  padding: 0 20px;
  color: #ffffff;
  background: var(--accent);
  box-shadow: 0 8px 18px rgba(75, 131, 196, 0.22);
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.primary-button:active,
.delete-button:active {
  transform: translateY(0);
}

.primary-button:disabled,
.delete-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
  transform: none;
}

.delete-button:disabled:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.primary-button:focus-visible,
.delete-button:focus-visible {
  outline: 3px solid rgba(75, 131, 196, 0.3);
  outline-offset: 3px;
}

.app-message {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  line-height: 1.5;
}

.app-message[data-type="error"] {
  color: #914557;
  background: var(--danger-soft);
}

.app-message[data-type="success"] {
  color: var(--success);
  background: var(--success-soft);
}

.board-section {
  margin-top: 54px;
}

.board-heading {
  align-items: flex-end;
  padding: 0 4px 18px;
  border-bottom: 1px solid var(--line);
}

.board-heading h2:focus {
  outline: none;
}

.post-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent-dark);
  background: var(--accent-soft);
  font-size: 0.86rem;
  font-weight: 800;
}

.empty-state {
  padding: 70px 24px;
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 18px;
  place-items: center;
  border: 1px solid #c7ddf5;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 1.2rem;
}

.empty-state h3 {
  margin: 0;
  font-size: 1.05rem;
}

.empty-state p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.post-list {
  display: grid;
  gap: 16px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.post-card {
  padding: 26px 28px;
  overflow: hidden;
  border: 1px solid rgba(214, 227, 242, 0.95);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: 0 10px 30px rgba(66, 102, 145, 0.06);
  animation: card-in 260ms ease both;
}

.post-header {
  align-items: flex-start;
}

.post-meta {
  min-width: 0;
}

.post-title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.18rem;
  letter-spacing: -0.025em;
  line-height: 1.45;
}

.post-time {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.78rem;
}

.post-content {
  margin: 20px 0 0;
  color: #495e78;
  font-size: 0.95rem;
  line-height: 1.8;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.delete-button {
  flex: none;
  min-height: 38px;
  padding: 0 14px;
  color: var(--danger);
  background: var(--danger-soft);
  font-size: 0.82rem;
}

.delete-button:hover {
  color: #ffffff;
  background: var(--danger);
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 28px, 820px);
    padding: 44px 0 64px;
  }

  .hero {
    margin-bottom: 30px;
  }

  .hero-description {
    font-size: 0.95rem;
  }

  .composer-card {
    padding: 23px 20px;
    border-radius: 17px;
  }

  .local-badge {
    display: none;
  }

  .form-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .primary-button {
    width: 100%;
  }

  .board-section {
    margin-top: 44px;
  }

  .post-card {
    padding: 22px 20px;
  }

  .post-header {
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
