/* 공고·관리자 페이지 (Worker가 렌더링하는 HTML) 전용 스타일 */
:root {
  --ink: #0a0a0a;
  --muted: #6b7280;
  --line: #e5e7eb;
  --soft: #f9fafb;
  --accent: #2563eb;
  --danger: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
  font-size: 16px;
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

a {
  color: var(--accent);
}

/* 랜딩 페이지와 같은 폭: 헤더·푸터 1280px(max-w-7xl), 본문 1152px(max-w-6xl) */
.wrap,
.bar {
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap {
  max-width: 1200px;
}

.bar {
  max-width: 1280px;
}

main.wrap {
  flex: 1;
  padding-top: 64px;
  padding-bottom: 96px;
}

/* 헤더: 랜딩 헤더의 스크롤 후 모습(src/components/Header.tsx)과 맞춘다 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid #f3f4f6;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.site-header .bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-header .brand {
  color: #000;
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
  letter-spacing: -0.05em;
  text-decoration: none;
}

.site-header .brand:hover {
  opacity: 0.7;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 40px;
}

.site-nav a {
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.3s;
}

.site-nav a:hover {
  color: var(--accent);
}

.site-menu {
  display: none;
}

.site-menu summary {
  display: flex;
  padding: 8px;
  color: #000;
  cursor: pointer;
  list-style: none;
}

.site-menu summary::-webkit-details-marker {
  display: none;
}

.site-menu nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px 24px 16px;
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.site-menu nav a {
  color: #000;
  font-size: 24px;
  font-weight: 300;
  text-decoration: none;
}

@media (max-width: 767px) {
  .site-nav {
    display: none;
  }

  .site-menu {
    display: block;
  }
}

/* 푸터: src/components/Footer.tsx와 맞춘다 */
.site-footer {
  padding: 80px 0;
  border-top: 1px solid #f3f4f6;
  background: #fff;
  line-height: 1.5;
}

.footer-top,
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 48px;
}

.footer-top {
  align-items: flex-end;
}

.footer-brand {
  margin-bottom: 16px;
  font-size: 30px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: -0.05em;
}

.footer-top p {
  max-width: 384px;
  margin: 0;
  color: #6b7280;
  font-weight: 300;
}

.footer-connect {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 24px;
}

.footer-label {
  color: #9ca3af;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-connect a {
  color: #6b7280;
  text-decoration: none;
}

.footer-bottom {
  align-items: center;
  gap: 16px;
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid #f3f4f6;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 300;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.footer-links a {
  color: #9ca3af;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent);
}

@media (max-width: 767px) {
  .footer-top,
  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-top {
    gap: 48px;
  }

  .footer-connect {
    align-items: flex-start;
  }
}

/* 관리자 보조 메뉴 */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.admin-nav a {
  color: var(--muted);
  text-decoration: none;
}

.admin-nav a:hover {
  color: var(--accent);
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(28px, 5vw, 40px);
  line-height: 1.25;
  letter-spacing: -0.03em;
}

h2 {
  margin: 56px 0 16px;
  font-size: 20px;
}

.lead {
  margin: 0 0 40px;
  color: var(--muted);
}

.empty {
  padding: 64px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
}

.back {
  margin: 40px 0 0;
  font-size: 14px;
}

.back:first-child {
  margin: 0 0 24px;
}

.category {
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

/* 공고 목록 */
.notice-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ink);
}

.notice-list a {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 16px;
  align-items: baseline;
  padding: 18px 4px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}

.notice-list a:hover .title {
  text-decoration: underline;
}

.notice-list time {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 32px;
  font-size: 14px;
  color: var(--muted);
}

/* 공고 본문 */
.notice .category {
  margin: 0 0 8px;
}

.notice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  margin: 0 0 32px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--ink);
  font-size: 14px;
}

.notice-meta div {
  display: flex;
  gap: 8px;
}

.notice-meta dt {
  color: var(--muted);
}

.notice-meta dd {
  margin: 0;
}

.notice-body {
  overflow-x: auto;
}

.notice-body h1,
.notice-body h2,
.notice-body h3 {
  margin: 32px 0 12px;
  font-size: 18px;
  letter-spacing: 0;
}

.notice-body table {
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

.notice-body th,
.notice-body td {
  padding: 8px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.notice-body th {
  background: var(--soft);
}

.notice-body blockquote {
  margin: 16px 0;
  padding: 4px 16px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

/* 관리자 */
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.admin-head h1 {
  margin: 0;
}

.table-scroll {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 1px solid var(--ink);
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.admin-table td:nth-child(3),
.admin-table td:nth-child(4) {
  white-space: normal;
}

.admin-table th {
  color: var(--muted);
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-draft {
  background: #f3f4f6;
  color: #374151;
}

.badge-published {
  background: #dbeafe;
  color: #1d4ed8;
}

.badge-withdrawn {
  background: #fee2e2;
  color: var(--danger);
}

.flash,
.error {
  margin: 0 0 24px;
  padding: 12px 16px;
  border-radius: 6px;
  font-size: 14px;
}

.flash {
  background: #eff6ff;
  color: #1e40af;
}

.error {
  background: #fef2f2;
  color: var(--danger);
}

.notice-form {
  display: grid;
  gap: 20px;
}

.notice-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}

.notice-form input,
.notice-form select,
.notice-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 400;
}

.notice-form textarea {
  resize: vertical;
  font-family: Consolas, 'D2Coding', monospace;
  font-size: 14px;
  line-height: 1.6;
}

.notice-form input:focus,
.notice-form select:focus,
.notice-form textarea:focus,
.button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.hint code {
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--soft);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  display: inline-block;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--soft);
}

.button.primary {
  background: var(--ink);
  color: #fff;
}

.button.primary:hover {
  background: #262626;
}

.button.danger {
  border-color: var(--danger);
  color: var(--danger);
}

.button.ghost {
  border-color: transparent;
  color: var(--muted);
}

.preview {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.preview h1 {
  font-size: 24px;
}

@media (max-width: 560px) {
  .notice-list a {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

.inquiry-message {
  margin: 0 0 40px;
  white-space: pre-wrap;
}


.notice-body ul {
  padding-left: 20px;
}

/* 랜딩 푸터는 안쪽 여백을 뺀 폭이 1280px이다 */
.site-footer .bar {
  max-width: 1328px;
}
