:root {
  color-scheme: light;
  --ink: #232722;
  --muted: #74786f;
  --line: #dedfd7;
  --surface: rgba(255, 255, 252, 0.92);
  --surface-soft: #f4f4ed;
  --background: #edeee6;
  --accent: #245d45;
  --accent-deep: #174832;
  --accent-soft: #dce9df;
  --danger: #b8493f;
  --danger-soft: #f9e8e5;
  --shadow: 0 18px 48px rgba(48, 55, 45, 0.08);
  --radius-large: 28px;
  --radius-medium: 18px;
  --radius-small: 12px;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.35) 1px, transparent 1px),
    var(--background);
  background-size: 32px 32px;
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

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

.page-glow {
  position: fixed;
  z-index: -1;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(12px);
  pointer-events: none;
}

.page-glow--top {
  top: -230px;
  right: -100px;
  background: rgba(191, 215, 196, 0.55);
}

.page-glow--bottom {
  bottom: -270px;
  left: -120px;
  background: rgba(231, 205, 174, 0.42);
}

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

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.2em;
}

.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", "Batang", serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1.08;
}

.hero__description {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.75;
}

.hero__mark {
  display: grid;
  flex: 0 0 auto;
  width: 76px;
  height: 76px;
  place-items: center;
  border: 1px solid rgba(36, 93, 69, 0.2);
  border-radius: 50%;
  color: var(--accent);
  background: rgba(255, 255, 252, 0.65);
}

.hero__mark svg {
  width: 42px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.board-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.84fr) minmax(400px, 1.16fr);
  align-items: start;
  gap: 28px;
}

.panel,
.posts-section {
  border: 1px solid rgba(55, 62, 51, 0.11);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.composer {
  position: sticky;
  top: 28px;
  padding: 30px;
}

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.section-heading__number {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.section-heading h2 {
  margin: 2px 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

#post-form {
  margin-top: 30px;
}

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

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

.field label {
  font-size: 0.88rem;
  font-weight: 750;
}

.character-count {
  color: #969990;
  font-size: 0.72rem;
  font-variant-numeric: tabular-nums;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  outline: none;
  color: var(--ink);
  background: rgba(250, 250, 246, 0.75);
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

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

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

.field input::placeholder,
.field textarea::placeholder {
  color: #a4a79f;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36, 93, 69, 0.1);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(184, 73, 63, 0.09);
}

.form-error {
  margin: 14px 0 0;
  color: var(--danger);
  font-size: 0.8rem;
  line-height: 1.5;
}

.primary-button {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  border: 0;
  border-radius: var(--radius-small);
  color: #fff;
  background: var(--accent);
  box-shadow: 0 8px 20px rgba(36, 93, 69, 0.19);
  font-weight: 750;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.primary-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  box-shadow: 0 11px 24px rgba(36, 93, 69, 0.24);
}

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

.primary-button:focus-visible,
.delete-button:focus-visible {
  outline: 3px solid rgba(36, 93, 69, 0.28);
  outline-offset: 3px;
}

.storage-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

.storage-note svg {
  flex: 0 0 auto;
  width: 17px;
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.posts-section {
  min-height: 520px;
  padding: 30px;
}

.posts-header {
  margin-bottom: 24px;
}

.posts-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.post-count {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  place-items: center;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.72rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.empty-state {
  display: grid;
  min-height: 360px;
  place-content: center;
  justify-items: center;
  padding: 40px 20px;
  border: 1px dashed #d2d4ca;
  border-radius: var(--radius-medium);
  text-align: center;
  background: rgba(247, 247, 241, 0.55);
}

.empty-state[hidden] {
  display: none;
}

.empty-state__icon {
  display: grid;
  width: 64px;
  height: 64px;
  margin-bottom: 18px;
  place-items: center;
  border-radius: 50%;
  color: #858b80;
  background: var(--surface-soft);
}

.empty-state__icon svg {
  width: 38px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

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

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

.post-list {
  display: grid;
  gap: 14px;
}

.post-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: #fff;
  animation: card-in 280ms ease both;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.post-card::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent);
  content: "";
  opacity: 0;
  transition: opacity 160ms ease;
}

.post-card:hover {
  border-color: rgba(36, 93, 69, 0.28);
  box-shadow: 0 12px 28px rgba(48, 55, 45, 0.07);
  transform: translateY(-1px);
}

.post-card:hover::before {
  opacity: 1;
}

.post-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.post-card__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.post-card__ownership {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 0.67rem;
  font-weight: 750;
  white-space: nowrap;
}

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

.post-card__title {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.07rem;
  letter-spacing: -0.025em;
  line-height: 1.5;
}

.post-card__time {
  display: block;
  margin-top: 7px;
  color: #8a8e85;
  font-size: 0.72rem;
  line-height: 1.4;
}

.post-card__content {
  margin: 18px 0 0;
  padding-top: 17px;
  overflow-wrap: anywhere;
  border-top: 1px solid #edeee9;
  color: #555a52;
  font-size: 0.9rem;
  line-height: 1.75;
  white-space: pre-wrap;
}

.delete-button {
  display: grid;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #8d9189;
  background: transparent;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.delete-button svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.55;
}

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

.delete-button:disabled {
  border-color: transparent;
  color: #c1c4bc;
  background: transparent;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  z-index: 10;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100% - 40px));
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  color: #fff;
  background: #28332c;
  box-shadow: 0 15px 38px rgba(28, 34, 29, 0.23);
  font-size: 0.82rem;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: #73352f;
}

.noscript-message {
  position: fixed;
  right: 20px;
  bottom: 20px;
  left: 20px;
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  color: #fff;
  background: #73352f;
  text-align: center;
}

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

@media (max-width: 820px) {
  .page-shell {
    padding-top: 52px;
  }

  .board-layout {
    grid-template-columns: 1fr;
  }

  .composer {
    position: static;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 24px, 1120px);
    padding: 34px 0 56px;
  }

  .hero {
    align-items: center;
    margin-bottom: 30px;
  }

  .hero__description br {
    display: none;
  }

  .hero__mark {
    width: 58px;
    height: 58px;
  }

  .hero__mark svg {
    width: 34px;
  }

  .composer,
  .posts-section {
    padding: 22px;
    border-radius: 22px;
  }

  .post-card {
    padding: 19px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100% - 24px);
  }
}

@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;
  }
}
