.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 46px);
  color: #172554;
}

.page-header p {
  margin: 0;
  color: var(--muted);
}

.write-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 19px;
  background: var(--primary);
  color: white;
  border-radius: 14px;
  text-decoration: none;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(59, 91, 219, 0.22);
  transition: 0.2s;
  white-space: nowrap;
}

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

.post-tools {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-top: 24px;
  padding: 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 13px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  transition: 0.18s;
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.filter-chip.active {
  background: var(--primary);
  color: white;
}

.post-search-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.post-search-form select,
.post-search-form input {
  padding: 11px 13px;
  border: 1px solid #d1d5db;
  border-radius: 13px;
  outline: none;
  font-size: 14px;
  background: white;
}

.post-search-form select {
  min-width: 110px;
  font-weight: 900;
  color: #374151;
  cursor: pointer;
}

.post-search-form input {
  width: 240px;
}

.post-search-form select:focus,
.post-search-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(59, 91, 219, 0.12);
}

.post-search-form button,
.reset-search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 13px;
  border: none;
  border-radius: 13px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.post-search-form button {
  background: var(--primary);
  color: white;
}

.reset-search {
  background: #f3f4f6;
  color: #6b7280;
}

.board-guide-row {
  display: block;
  margin-top: 18px;
  padding: 20px 22px;
  background: linear-gradient(135deg, #ffffff, #f8faff);
  border: 1px solid #c7d2fe;
  border-radius: 20px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 22px rgba(59, 91, 219, 0.08);
  transition: 0.18s;
}

.board-guide-row:hover {
  transform: translateY(-3px);
  border-color: #a5b4fc;
  box-shadow: 0 14px 30px rgba(59, 91, 219, 0.14);
}

.board-guide-row span {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 10px;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}

.board-guide-row h2 {
  margin: 0;
  font-size: 20px;
  color: #172554;
}

.post-list {
  display: grid;
  gap: 12px;
  margin-top: 30px;
}

.post-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  text-decoration: none;
  color: var(--text);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: 0.18s;
}

.post-row:hover {
  transform: translateY(-3px);
  border-color: #c7d2fe;
  box-shadow: 0 14px 30px rgba(59, 91, 219, 0.11);
}

.post-row h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

.post-row p {
  margin: 0;
  padding: 7px 11px;
  background: #f3f4f6;
  color: var(--muted);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

/* ==============================
   Tablet
============================== */
@media (max-width: 850px) {
  .post-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .post-search-form {
    width: 100%;
  }

  .post-search-form input {
    flex: 1;
    width: auto;
  }

  .post-search-form select {
    min-width: 110px;
  }
}

/* ==============================
   Mobile
============================== */
@media (max-width: 650px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .page-header h1 {
    font-size: clamp(32px, 10vw, 42px);
    line-height: 1.1;
  }

  .page-header p {
    font-size: 15px;
    line-height: 1.7;
  }

  .write-button {
    width: 100%;
    min-height: 48px;
    padding: 14px 18px;
    border-radius: 15px;
    font-size: 15px;
  }

  .post-tools {
    gap: 14px;
    margin-top: 20px;
    padding: 16px;
    border-radius: 20px;
  }

  .category-filter {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .category-filter::-webkit-scrollbar {
    display: none;
  }

  .filter-chip {
    flex-shrink: 0;
    padding: 9px 13px;
    font-size: 13px;
  }

  .post-search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .post-search-form select,
  .post-search-form input,
  .post-search-form button,
  .reset-search {
    width: 100%;
    min-height: 46px;
    font-size: 16px;
    border-radius: 14px;
  }

  .post-list {
    gap: 12px;
    margin-top: 22px;
  }

  .post-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    border-radius: 17px;
  }

  .post-row h2 {
    width: 100%;
    font-size: 18px;
    line-height: 1.45;
    word-break: keep-all;
  }

  .post-row p {
    max-width: 100%;
    padding: 7px 10px;
    font-size: 13px;
    white-space: normal;
    line-height: 1.5;
    border-radius: 13px;
  }

  .board-guide-row {
    margin-top: 16px;
    padding: 18px;
    border-radius: 18px;
  }

  .board-guide-row h2 {
    font-size: 18px;
    line-height: 1.4;
  }
}

@media (max-width: 430px) {
  .post-tools {
    padding: 14px;
  }

  .post-row {
    padding: 16px;
  }

  .post-row h2 {
    font-size: 17px;
  }

  .board-guide-row {
    padding: 16px;
  }
}

/* ==============================
   v1.2.1 Mobile Posts Redesign
============================== */
@media (max-width: 650px) {
  .page-header {
    padding-bottom: 18px;
  }

  .page-header h1 {
    font-size: clamp(30px, 10vw, 38px);
  }

  .write-button {
    box-shadow: none;
    border-radius: 16px;
    background: #2563eb;
  }

  .post-tools {
    padding: 14px;
    border-radius: 18px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.045);
  }

  .filter-chip {
    background: white;
    border: 1px solid #e5e7eb;
  }

  .filter-chip.active {
    border-color: var(--primary);
  }

  .post-search-form select,
  .post-search-form input,
  .post-search-form button,
  .reset-search {
    border-radius: 15px;
  }

  .post-row {
    padding: 16px;
    border-radius: 16px;
    background: white;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
  }

  .post-row:hover {
    transform: none;
  }

  .post-row h2 {
    font-size: 17px;
  }

  .post-row p {
    background: #f8faff;
    color: #64748b;
  }

  .board-guide-row {
    border-radius: 17px;
    box-shadow: 0 7px 18px rgba(59, 91, 219, 0.06);
  }
}