:root {
  --bg: #ffffff;
  --ink: #111111;
  --muted: #6a6a6a;
  --panel: #d8d8d8;
  --green: #96f6bb;
  --green-pill: #bdf9d8;
  --red: #ff7378;
  --red-pill: #ff8589;
  --blue: #9fc6fb;
  --blue-pill: #aacffc;
  --purple: #8c45ff;
  --shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans KR", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(1000px, calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0 64px;
}

.top-banner {
  display: grid;
  grid-template-columns: 220px minmax(340px, 1fr) 240px;
  gap: 28px;
  align-items: center;
  margin-bottom: 34px;
}

.meme-hero {
  position: relative;
  min-height: 190px;
}

.banner-main {
  position: absolute;
  left: 0;
  top: 12px;
  width: 225px;
  display: block;
  z-index: 2;
}

.banner-title {
  position: absolute;
  left: 210px;
  top: 34px;
  width: 250px;
  z-index: 4;
}

.banner-right {
  width: 100%;
  display: block;
}

.hero-text {
  position: absolute;
  left: 225px;
  top: 32px;
  width: 275px;
  line-height: 1.35;
}

.hero-text p {
  margin: 0;
  font-size: 0.82rem;
  word-break: keep-all;
}

.forest-layout {
  display: grid;
  grid-template-columns: 220px minmax(340px, 1fr) 240px;
  gap: 28px;
  align-items: start;
}

.theme-panel {
  min-height: 420px;
  padding: 20px 22px;
  background: var(--panel);
  text-align: center;
}

.theme-panel h2 {
  margin: 0 0 18px;
  font-size: 0.95rem;
  font-weight: 500;
}

.photo-hole {
  width: 100%;
  height: 282px;
  border-radius: 15px;
  background: #fff;
  overflow: hidden;
}

.photo-hole img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.theme-panel p {
  margin: 28px 0 0;
  font-size: 0.88rem;
}

.stage-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.stage-head button {
  border: 0;
  border-radius: 999px;
  padding: 5px 12px;
  color: #fff;
  background: #111;
  cursor: pointer;
}

.posts {
  display: grid;
  gap: 28px;
}

.post {
  --post-color: var(--green);
  --pill-color: var(--green-pill);
}

.post[data-mood="분리수거 불가능"] {
  --post-color: var(--red);
  --pill-color: var(--red-pill);
}

.post[data-mood="마음의 평화"] {
  --post-color: var(--blue);
  --pill-color: var(--blue-pill);
}

.post-label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.mood-chip,
.category-compose input {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--pill-color);
  font-size: 0.88rem;
}

.mood-chip {
  padding: 0 12px;
  color: #111;
  font-weight: 700;
}

.category-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.category-compose input {
  width: 100%;
  min-width: 0;
  padding: 0 12px;
  border: 0;
  outline: 0;
  color: rgba(0, 0, 0, 0.48);
  overflow: hidden;
  background: var(--pill-color);
}

.category-compose input:focus,
.category-compose input:not(:placeholder-shown) {
  color: #111;
}

.category-compose input:disabled {
  opacity: 0.55;
}

.category-compose button {
  min-height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #111;
  font-size: 0.78rem;
  font-weight: 900;
  cursor: pointer;
}

.category-compose button:disabled {
  opacity: 0.55;
  cursor: wait;
}

.post-card {
  min-height: 166px;
  padding: 20px 10px;
  border-radius: 0 12px 0 0;
  background: var(--post-color);
}

.more-button {
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.post-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.post-card li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  max-width: 92%;
  min-height: 38px;
  font-size: 0.92rem;
  line-height: 1.7;
  text-decoration: underline;
  text-underline-offset: 4px;
  word-break: break-word;
}

.post-card li + li {
  margin-top: 12px;
}

.post-card small {
  color: var(--muted);
  font-size: 0.72rem;
  text-decoration: none;
  white-space: nowrap;
}

.empty-line {
  color: rgba(0, 0, 0, 0.45);
}

.empty-post {
  padding: 36px 20px;
  background: #f1f1f1;
  color: var(--muted);
}

.notice-panel img {
  width: 100%;
  display: block;
}

@media (max-width: 900px) {
  .top-banner,
  .forest-layout {
    grid-template-columns: 1fr;
  }

  .top-banner > div:first-child {
    display: none;
  }

  .banner-right {
    order: 1;
  }

  .meme-hero {
    order: 0;
  }

  .theme-panel {
    position: static;
    order: 0;
  }

  .notice-panel {
    order: 1;
  }

  .post-stage {
    order: 2;
  }

  .theme-panel {
    min-height: 0;
  }

  .photo-hole {
    height: 180px;
  }

  .meme-hero {
    min-height: 210px;
    width: min(520px, 100%);
    margin: 0 auto;
  }

  .banner-right,
  .notice-panel {
    width: min(260px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .page-shell {
    width: min(100% - 24px, 1000px);
    padding-top: 24px;
  }

  .meme-hero {
    min-height: 300px;
  }

  .banner-main {
    width: 210px;
  }

  .banner-title {
    left: 105px;
    top: 120px;
    width: 230px;
  }

  .hero-text {
    left: 0;
    top: 180px;
    width: 100%;
  }

  .post-label {
    grid-template-columns: 1fr;
  }

  .category-compose {
    grid-template-columns: 1fr;
  }
}
